diff --git a/contrib/media/updf/BuildUPDF.sh b/contrib/media/updf/BuildUPDF.sh new file mode 100644 index 0000000000..14306b04f6 --- /dev/null +++ b/contrib/media/updf/BuildUPDF.sh @@ -0,0 +1,23 @@ +#!/bin/sh +ok=`tput setaf 2` +error=`tput setaf 1` +reset=`tput sgr0` + +clear +rm build/kos_main.o +rm build/mupdf +make +if [ ! -f build/mupdf ]; then + echo "${error} Compilation error ${reset}" + $SHELL +fi +echo "${ok} OK ${reset}" +objcopy -O binary build/mupdf +rm updf +cp build/mupdf updf +ncftpput -u xxxx -p xxxx kolibri-n.org /public_ftp ~/Desktop/updf/updf +if [ $? -ne 0 ]; then echo \"Upload failed\"; fi + + + + diff --git a/contrib/media/updf/COPYING b/contrib/media/updf/COPYING new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/contrib/media/updf/COPYING @@ -0,0 +1,674 @@ + 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/contrib/media/updf/Makefile b/contrib/media/updf/Makefile new file mode 100644 index 0000000000..a56841c5a0 --- /dev/null +++ b/contrib/media/updf/Makefile @@ -0,0 +1,114 @@ +# GNU Makefile + +OUT := build +GEN := generated + +# --- Variables, Commands, etc... --- + +default: all +LDFLAGS = -Tinclude/scripts/menuetos_app_v01.ld -nostdlib -L include/lib +CFLAGS += -Ifitz -Ipdf -Iscripts -fno-stack-protector -nostdinc -fno-builtin -m32 -I include -fno-pic -w +LIBS += -lfreetype2 -lpng -ljbig2dec -ljpeg -lopenjpeg -lz -lm -lc + +THIRD_LIBS := $(FREETYPE_LIB) $(JBIG2DEC_LIB) $(JPEG_LIB) $(OPENJPEG_LIB) $(ZLIB_LIB) + +ifeq "$(verbose)" "" +QUIET_AR = @ echo ' ' ' ' AR $@ ; +QUIET_CC = @ echo ' ' ' ' CC $@ ; +QUIET_GEN = @ echo ' ' ' ' GEN $@ ; +QUIET_LINK = @ echo ' ' ' ' LINK $@ ; +QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ; +endif + +CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $< +AR_CMD = $(QUIET_AR) $(AR) cru $@ $^ +LINK_CMD = $(QUIET_LINK) ld $(LDFLAGS) -o $@ include/stub/crt0.o $^ build/snprintf.o $(LIBS) +MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ + +# --- Rules --- + +$(OUT) $(GEN) : + $(MKDIR_CMD) + +$(OUT)/%.a : + $(AR_CMD) + +$(OUT)/% : $(OUT)/%.o + $(LINK_CMD) + +$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : scripts/%.c | $(OUT) + $(CC_CMD) + +# --- Fitz and MuPDF libraries --- + +FITZ_LIB := $(OUT)/libfitz.a +MUPDF_LIB := $(OUT)/libmupdf.a + +FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c)) +MUPDF_SRC := $(notdir $(wildcard pdf/*.c)) + +$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) +$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) + +libs: $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) + +# --- Generated CMAP and FONT files --- + +CMAPDUMP := scripts/cmapdump + +CMAP_CNS_SRC := $(wildcard cmaps/cns/*) +CMAP_GB_SRC := $(wildcard cmaps/gb/*) +CMAP_JAPAN_SRC := $(wildcard cmaps/japan/*) +CMAP_KOREA_SRC := $(wildcard cmaps/korea/*) +FONT_BASE14_SRC := $(wildcard fonts/*.cff) +FONT_DROID_SRC := fonts/droid/DroidSans.ttf fonts/droid/DroidSansMono.ttf +FONT_CJK_SRC := fonts/droid/DroidSansFallback.ttf + +$(GEN)/cmap_cns.h : $(CMAP_CNS_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_CNS_SRC) +$(GEN)/cmap_gb.h : $(CMAP_GB_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_GB_SRC) +$(GEN)/cmap_japan.h : $(CMAP_JAPAN_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_JAPAN_SRC) +$(GEN)/cmap_korea.h : $(CMAP_KOREA_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_KOREA_SRC) + +$(GEN)/font_base14.h : $(FONT_BASE14_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_BASE14_SRC) +$(GEN)/font_droid.h : $(FONT_DROID_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_DROID_SRC) +$(GEN)/font_cjk.h : $(FONT_CJK_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_CJK_SRC) + +CMAP_HDR := $(addprefix $(GEN)/, cmap_cns.h cmap_gb.h cmap_japan.h cmap_korea.h) +FONT_HDR := $(GEN)/font_base14.h $(GEN)/font_droid.h $(GEN)/font_cjk.h + +ifeq "$(CROSSCOMPILE)" "" +$(CMAP_HDR) : $(CMAPDUMP) | $(GEN) +$(FONT_HDR) : $(FONTDUMP) | $(GEN) +endif + +generate: $(CMAP_HDR) $(FONT_HDR) + +$(OUT)/pdf_cmap_table.o : $(CMAP_HDR) +$(OUT)/pdf_fontfile.o : $(FONT_HDR) +$(OUT)/cmapdump.o : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c + +# --- Tools and Apps --- + +MUPDF := $(OUT)/mupdf +$(MUPDF) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) +ifeq "$(NOX11)" "" +$(MUPDF) : $(addprefix $(OUT)/, kos_main.o pdfapp.o) + $(LINK_CMD) +endif + +all: $(THIRD_LIBS) $(FITZ_LIB) $(PDF_APPS) $(MUPDF) diff --git a/contrib/media/updf/Makefile_2 b/contrib/media/updf/Makefile_2 new file mode 100755 index 0000000000..6cc0fb3e7d --- /dev/null +++ b/contrib/media/updf/Makefile_2 @@ -0,0 +1,114 @@ +# GNU Makefile + +OUT := build +GEN := generated + +# --- Variables, Commands, etc... --- + +default: all +LDFLAGS = -Tinclude/scripts/menuetos_app_v01.ld -nostdlib -L include/lib +CFLAGS += -Ifitz -Ipdf -Iscripts -fno-stack-protector -nostdinc -fno-builtin -m32 -I include -fno-pic -w +LIBS += -lfreetype2 -lpng -ljbig2dec -ljpeg -lopenjpeg -lz -lm -lc + +THIRD_LIBS := $(FREETYPE_LIB) $(JBIG2DEC_LIB) $(JPEG_LIB) $(OPENJPEG_LIB) $(ZLIB_LIB) + +ifeq "$(verbose)" "" +QUIET_AR = @ echo ' ' ' ' AR $@ ; +QUIET_CC = @ echo ' ' ' ' CC $@ ; +QUIET_GEN = @ echo ' ' ' ' GEN $@ ; +QUIET_LINK = @ echo ' ' ' ' LINK $@ ; +QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ; +endif + +CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $< +AR_CMD = $(QUIET_AR) $(AR) cru $@ $^ +LINK_CMD = $(QUIET_LINK) LD/ld.bfd $(LDFLAGS) -o $@ include/stub/crt0.o $^ build/snprintf.o $(LIBS) +MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ + +# --- Rules --- + +$(OUT) $(GEN) : + $(MKDIR_CMD) + +$(OUT)/%.a : + $(AR_CMD) + +$(OUT)/% : $(OUT)/%.o + $(LINK_CMD) + +$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) + $(CC_CMD) +$(OUT)/%.o : scripts/%.c | $(OUT) + $(CC_CMD) + +# --- Fitz and MuPDF libraries --- + +FITZ_LIB := $(OUT)/libfitz.a +MUPDF_LIB := $(OUT)/libmupdf.a + +FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c)) +MUPDF_SRC := $(notdir $(wildcard pdf/*.c)) + +$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) +$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) + +libs: $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) + +# --- Generated CMAP and FONT files --- + +CMAPDUMP := scripts/cmapdump + +CMAP_CNS_SRC := $(wildcard cmaps/cns/*) +CMAP_GB_SRC := $(wildcard cmaps/gb/*) +CMAP_JAPAN_SRC := $(wildcard cmaps/japan/*) +CMAP_KOREA_SRC := $(wildcard cmaps/korea/*) +FONT_BASE14_SRC := $(wildcard fonts/*.cff) +FONT_DROID_SRC := fonts/droid/DroidSans.ttf fonts/droid/DroidSansMono.ttf +FONT_CJK_SRC := fonts/droid/DroidSansFallback.ttf + +$(GEN)/cmap_cns.h : $(CMAP_CNS_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_CNS_SRC) +$(GEN)/cmap_gb.h : $(CMAP_GB_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_GB_SRC) +$(GEN)/cmap_japan.h : $(CMAP_JAPAN_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_JAPAN_SRC) +$(GEN)/cmap_korea.h : $(CMAP_KOREA_SRC) + $(QUIET_GEN) ./$(CMAPDUMP) $@ $(CMAP_KOREA_SRC) + +$(GEN)/font_base14.h : $(FONT_BASE14_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_BASE14_SRC) +$(GEN)/font_droid.h : $(FONT_DROID_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_DROID_SRC) +$(GEN)/font_cjk.h : $(FONT_CJK_SRC) + $(QUIET_GEN) ./$(FONTDUMP) $@ $(FONT_CJK_SRC) + +CMAP_HDR := $(addprefix $(GEN)/, cmap_cns.h cmap_gb.h cmap_japan.h cmap_korea.h) +FONT_HDR := $(GEN)/font_base14.h $(GEN)/font_droid.h $(GEN)/font_cjk.h + +ifeq "$(CROSSCOMPILE)" "" +$(CMAP_HDR) : $(CMAPDUMP) | $(GEN) +$(FONT_HDR) : $(FONTDUMP) | $(GEN) +endif + +generate: $(CMAP_HDR) $(FONT_HDR) + +$(OUT)/pdf_cmap_table.o : $(CMAP_HDR) +$(OUT)/pdf_fontfile.o : $(FONT_HDR) +$(OUT)/cmapdump.o : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c + +# --- Tools and Apps --- + +MUPDF := $(OUT)/mupdf +$(MUPDF) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) +ifeq "$(NOX11)" "" +$(MUPDF) : $(addprefix $(OUT)/, kos_main.o pdfapp.o) + $(LINK_CMD) +endif + +all: $(THIRD_LIBS) $(FITZ_LIB) $(PDF_APPS) $(MUPDF) diff --git a/contrib/media/updf/README b/contrib/media/updf/README new file mode 100644 index 0000000000..c30e7cbea1 --- /dev/null +++ b/contrib/media/updf/README @@ -0,0 +1,64 @@ +ABOUT + +MuPDF is a lightweight PDF and XPS viewer and parser/rendering library. + +The renderer in MuPDF is tailored for high quality anti-aliased graphics. It +renders text with metrics and spacing accurate to within fractions of a pixel +for the highest fidelity in reproducing the look of a printed page on screen. + +MuPDF is also small, fast, and yet complete. We support PDF 1.7 with +transparency, encryption, hyperlinks, annotations, search and many other bells +and whistles. MuPDF can also read XPS documents (OpenXPS / ECMA-388). + +We don't support interactive features such as form filling, javascript and +transitions. MuPDF is written modularly, so such features can be added on by +integrators if they so desire. + +LICENSE + +MuPDF is Copyright 2006-2011 Artifex Software, Inc. + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +For commercial licensing please contact sales@artifex.com. + +COMPILING + +If you are compiling from source you will need several third party libraries: +freetype2, jbig2dec, libjpeg, openjpeg, and zlib. We have prepared a package +(mupdf-thirdparty.zip) that you can unzip in the mupdf source tree if you don't +have them installed on your system. + +You must unpack mupdf-thirdparty.zip to build using the Visual Studio project. + +DOWNLOAD + +The latest development source is available directly from the git repository: + + git clone http://mupdf.com/repos/mupdf.git + +INSTALLING + +Typing "make prefix=/usr/local install" will install the binaries, man-pages, +static libraries and header files on your system. + +REPORTING BUGS AND PROBLEMS + +The MuPDF developers hang out on IRC in the #ghostscript channel on irc.freenode.net. + +Report bugs on the ghostscript bugzilla, with MuPDF as the selected component. + + http://bugs.ghostscript.com/ + +If you are reporting a problem with PDF parsing, please include the problematic +file as an attachment. diff --git a/contrib/media/updf/apps/icons/allbtns.h b/contrib/media/updf/apps/icons/allbtns.h new file mode 100644 index 0000000000..8f457b0d08 --- /dev/null +++ b/contrib/media/updf/apps/icons/allbtns.h @@ -0,0 +1,940 @@ +// 26x144 + +unsigned char toolbar_image[14976] = { + 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA5, 0xA5, 0xA5, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, 0xB0, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, 0xB0, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xA5, 0xA5, + 0xA5, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA5, 0xA5, 0xA5, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xA5, 0xA5, 0xA5, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, + 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x98, 0x98, 0x98, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x98, 0x98, 0x98, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEC, 0xEC, 0xEC, 0x87, 0x87, + 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xB1, 0xB1, 0xB1, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, + 0xB1, 0xB1, 0xB1, 0x87, 0x87, 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xEC, 0xEC, 0xEC, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEC, 0xEC, 0xEC, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xC2, + 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xEC, 0xEC, 0xEC, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0x87, 0x87, 0x87, 0x76, 0x76, 0x76, 0xDB, 0xDB, 0xDB, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xDB, 0xDB, 0xDB, 0x76, 0x76, 0x76, 0x87, 0x87, 0x87, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, + 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, + 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, + 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, + 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0xF3, 0xF3, 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, 0xF3, 0xF3, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, + 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, + 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, + 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, + 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0x86, 0x86, 0x86, 0x75, 0x75, 0x75, 0xD9, 0xD9, 0xD9, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xD9, 0xD9, 0xD9, 0x75, 0x75, 0x75, 0x86, 0x86, 0x86, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xEA, 0xEA, 0xEA, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, + 0xC0, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xEA, 0xEA, 0xEA, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xEA, 0xEA, 0xEA, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, 0x86, 0x86, 0xAF, 0xAF, 0xAF, + 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xAF, 0xAF, 0xAF, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, + 0x86, 0x86, 0xEA, 0xEA, 0xEA, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, 0xC0, 0x97, 0x97, 0x97, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, + 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x97, 0x97, 0x97, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x98, 0x98, 0x98, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x98, 0x98, 0x98, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEC, 0xEC, 0xEC, 0x87, 0x87, + 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xB1, 0xB1, 0xB1, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, + 0xB1, 0xB1, 0xB1, 0x87, 0x87, 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xEC, 0xEC, 0xEC, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEC, 0xEC, 0xEC, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xC2, + 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xEC, 0xEC, 0xEC, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0x87, 0x87, 0x87, 0x76, 0x76, 0x76, 0xDB, 0xDB, 0xDB, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xDB, 0xDB, 0xDB, 0x76, 0x76, 0x76, 0x87, 0x87, 0x87, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, + 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, + 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, + 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, + 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0xF3, 0xF3, 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, 0xF3, 0xF3, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, + 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, + 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, + 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, + 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0x86, 0x86, 0x86, 0x75, 0x75, 0x75, 0xD9, 0xD9, 0xD9, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xD9, 0xD9, 0xD9, 0x75, 0x75, 0x75, 0x86, 0x86, 0x86, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xEA, 0xEA, 0xEA, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, + 0xC0, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xEA, 0xEA, 0xEA, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xEA, 0xEA, 0xEA, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, 0x86, 0x86, 0xAF, 0xAF, 0xAF, + 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xAF, 0xAF, 0xAF, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, + 0x86, 0x86, 0xEA, 0xEA, 0xEA, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, 0xC0, 0x97, 0x97, 0x97, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, + 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x97, 0x97, 0x97, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, + 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x98, 0x98, 0x98, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x98, 0x98, 0x98, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x87, 0x87, + 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xB1, 0xB1, 0xB1, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, + 0xB1, 0xB1, 0xB1, 0x87, 0x87, 0x87, 0x6E, 0x6E, 0x6E, 0x87, 0x87, 0x87, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xC2, + 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0x87, 0x87, 0x87, 0x76, 0x76, 0x76, 0xDB, 0xDB, 0xDB, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xDB, 0xDB, 0xDB, 0x76, 0x76, 0x76, 0x87, 0x87, 0x87, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, + 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0x8F, 0x8F, 0x8F, 0x87, 0x87, 0x87, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xC2, 0xC2, 0xC2, 0x6E, 0x6E, 0x6E, 0xC2, 0xC2, 0xC2, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, + 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xDA, 0xDA, 0xDA, 0xDA, 0xDA, 0xDA, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, + 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, + 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xC9, 0xC9, 0xC9, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, + 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xC9, 0xC9, 0xC9, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0xB0, 0xB0, 0xB0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xB0, + 0xB0, 0xB0, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0x8F, 0x8F, 0x8F, 0x86, 0x86, 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x86, 0x86, 0x86, + 0x8F, 0x8F, 0x8F, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xC1, 0xC1, 0xC1, 0x6E, 0x6E, 0x6E, 0xC1, 0xC1, + 0xC1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0x86, 0x86, 0x86, 0x75, 0x75, 0x75, 0xD9, 0xD9, 0xD9, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xD9, 0xD9, 0xD9, 0x75, 0x75, 0x75, 0x86, 0x86, 0x86, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, + 0xC0, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, 0x86, 0x86, 0xAF, 0xAF, 0xAF, + 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xAF, 0xAF, 0xAF, 0x86, 0x86, 0x86, 0x6D, 0x6D, 0x6D, 0x86, + 0x86, 0x86, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xC0, 0xC0, 0xC0, 0x97, 0x97, 0x97, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, + 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x97, 0x97, 0x97, 0xC0, 0xC0, 0xC0, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, + 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA7, 0xA7, 0xA7, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0x94, 0x94, 0x94, 0x67, 0x67, 0x67, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEF, 0xEF, 0xEF, 0x83, 0x83, 0x83, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xE1, 0xE1, 0xE1, 0x77, 0x77, 0x77, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x72, 0x72, 0x72, 0x8C, 0x8C, 0x8C, 0xB7, 0xB7, 0xB7, 0xED, 0xED, + 0xED, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xD1, 0xD1, + 0xD1, 0x6F, 0x6F, 0x6F, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x6A, 0x6A, 0x6A, 0xAD, + 0xAD, 0xAD, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xBD, 0xBD, 0xBD, 0x68, 0x68, 0x68, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x8E, 0x8E, 0x8E, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xBD, 0xBD, 0xBD, 0x68, 0x68, 0x68, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0xA2, 0xA2, 0xA2, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xD1, 0xD1, 0xD1, 0x6F, 0x6F, 0x6F, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0xE3, 0xE3, 0xE3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xE1, 0xE1, 0xE1, 0x77, 0x77, 0x77, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0xAB, 0xAB, 0xAB, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0x83, 0x83, 0x83, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0xD1, 0xD1, 0xD1, 0x9A, 0x9A, 0x9A, 0x67, 0x67, 0x67, 0x86, 0x86, + 0x86, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x94, 0x94, + 0x94, 0x67, 0x67, 0x67, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xB9, 0xB9, 0xB9, 0x71, 0x71, 0x71, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA7, + 0xA7, 0xA7, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x8B, 0x8B, 0x8B, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA7, 0xA7, + 0xA7, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x67, 0x67, 0x67, 0x94, + 0x94, 0x94, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x83, 0x83, 0x83, 0xEF, 0xEF, 0xEF, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xED, 0xED, 0xED, 0xB7, 0xB7, 0xB7, 0x8C, + 0x8C, 0x8C, 0x72, 0x72, 0x72, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x77, 0x77, 0x77, 0xE1, 0xE1, 0xE1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xAD, 0xAD, 0xAD, 0x6A, 0x6A, 0x6A, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x6F, 0x6F, 0x6F, 0xD1, 0xD1, 0xD1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x8E, + 0x8E, 0x8E, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x68, 0x68, 0x68, 0xBD, 0xBD, 0xBD, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA2, 0xA2, 0xA2, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x68, 0x68, 0x68, 0xBD, 0xBD, 0xBD, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xE3, 0xE3, 0xE3, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x6F, 0x6F, 0x6F, 0xD1, + 0xD1, 0xD1, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xAB, 0xAB, 0xAB, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x77, 0x77, 0x77, 0xE1, 0xE1, 0xE1, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0x86, 0x86, 0x86, 0x67, 0x67, 0x67, 0x9A, 0x9A, 0x9A, 0xD1, 0xD1, 0xD1, 0xEF, 0xEF, 0xEF, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0x67, 0x67, 0x67, 0x67, + 0x67, 0x67, 0x83, 0x83, 0x83, 0xEF, 0xEF, 0xEF, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x71, + 0x71, 0x71, 0xB9, 0xB9, 0xB9, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x67, 0x67, 0x67, 0x94, 0x94, 0x94, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x8B, 0x8B, 0x8B, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA7, 0xA7, 0xA7, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, + 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEF, 0xEF, + 0xEF, 0xA0, 0xA0, 0xA0, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, + 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x8E, + 0x8E, 0x8E, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEF, 0xEF, 0xEF, 0x73, + 0x73, 0x73, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x83, 0x83, 0x83, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x83, 0x83, 0x83, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x83, 0x83, 0x83, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xDC, 0xDC, 0xDC, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xDC, 0xDC, 0xDC, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, + 0xBE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xBE, 0xBE, 0xBE, + 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xF5, 0xF5, 0xF5, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF5, 0xF5, 0xF5, 0x81, 0x81, 0x81, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0xB4, 0xB4, 0xB4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF5, 0xF5, 0xF5, 0x77, 0x77, 0x77, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xA0, 0xA0, 0xA0, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF5, 0xF5, 0xF5, 0x73, 0x73, 0x73, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x97, 0x97, 0x97, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF4, 0xF4, 0xF4, 0x6E, 0x6E, 0x6E, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x8A, 0x8A, 0x8A, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xEC, 0xEC, 0xEC, 0x6C, 0x6C, 0x6C, 0x81, 0x81, 0x81, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xD8, 0xD8, 0xD8, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2, 0xA5, 0xA5, + 0xA5, 0xEE, 0xEE, 0xEE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, + 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xEE, 0xEE, 0xEE, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x8E, 0x8E, 0x8E, 0x79, 0x79, 0x79, 0x79, 0x79, + 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, + 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x9C, 0x9C, 0x9C, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x83, 0x83, 0x83, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x73, 0x73, 0x73, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x83, 0x83, 0x83, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0x83, 0x83, 0x83, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, + 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xF4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xDA, 0xDA, 0xDA, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xEF, 0xEF, 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xEF, 0xEF, + 0xEF, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xEF, 0xEF, 0xEF, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xEB, 0xEB, 0xEB, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, + 0xBE, 0xBE, 0xF5, 0xF5, 0xF5, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF5, + 0xF5, 0xF5, 0x81, 0x81, 0x81, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xB4, 0xB4, 0xB4, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF5, 0xF5, 0xF5, 0x77, 0x77, 0x77, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0xA0, 0xA0, 0xA0, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, + 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF5, 0xF5, 0xF5, 0x73, 0x73, 0x73, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, + 0x6C, 0x6C, 0x6C, 0x97, 0x97, 0x97, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF4, 0xF4, 0xF4, 0x6E, 0x6E, 0x6E, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x8A, 0x8A, + 0x8A, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xEC, 0xEC, 0xEC, 0x6C, 0x6C, 0x6C, 0x81, 0x81, 0x81, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xD8, 0xD8, 0xD8, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xE9, 0xE9, 0xE9, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, + 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xE9, 0xE9, 0xE9, 0xA5, + 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, + 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xC2, 0xC2, 0xC2 +}; \ No newline at end of file diff --git a/contrib/media/updf/apps/icons/toolbar.png b/contrib/media/updf/apps/icons/toolbar.png new file mode 100644 index 0000000000..075089d300 Binary files /dev/null and b/contrib/media/updf/apps/icons/toolbar.png differ diff --git a/contrib/media/updf/apps/icons/toolbar.raw b/contrib/media/updf/apps/icons/toolbar.raw new file mode 100644 index 0000000000..1f354a0b43 --- /dev/null +++ b/contrib/media/updf/apps/icons/toolbar.raw @@ -0,0 +1 @@ +ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂ¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôô¥¥¥nnnnnnnnnnnnnnnnnn°°°ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôônnnnnnnnnnnnnnnnnnnnnnnn°°°ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôônnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn¥¥¥ôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôônnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòònnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòò¥¥¥nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn¥¥¥òòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôô˜˜˜nnnnnnnnnnnn˜˜˜ÂÂÂôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôìì쇇‡nnn‡‡‡±±±ÊÊÊÊÊʱ±±‡‡‡nnn‡‡‡ìììôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôìììvvvvvvÂÂÂôôôôôôôôôôôôôôôôôôÂÂÂvvvvvvìììôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôô‡‡‡vvvÛÛÛôôôôôôôôôôôôôôôôôôôôôôôôÛÛÛvvv‡‡‡ôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòò†††uuuÙÙÙòòòòòòòòòòòòòòòòòòòòòòòòÙÙÙuuu†††òòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòêêêuuuuuuÀÀÀòòòòòòòòòòòòòòòòòòÀÀÀuuuuuuêêêòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòêêꆆ†mmm†††¯¯¯ÈÈÈÈÈȯ¯¯†††mmm†††êêêòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòÀÀÀ———mmmmmmmmmmmm———ÀÀÀòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂ¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôô˜˜˜nnnnnnnnnnnn˜˜˜ÂÂÂôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôìì쇇‡nnn‡‡‡±±±ÊÊÊÊÊʱ±±‡‡‡nnn‡‡‡ìììôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôìììvvvvvvÂÂÂôôôôôôôôôôôôôôôôôôÂÂÂvvvvvvìììôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôô‡‡‡vvvÛÛÛôôôôôôôôônnnnnnôôôôôôôôôÛÛÛvvv‡‡‡ôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôônnnnnnôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóónnnnnnnnnnnnnnnnnnnnnnnnnnnnnnóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóóónnnnnnóóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòò†††uuuÙÙÙòòòòòòòòònnnnnnòòòòòòòòòÙÙÙuuu†††òòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòêêêuuuuuuÀÀÀòòòòòòòòòòòòòòòòòòÀÀÀuuuuuuêêêòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòêêꆆ†mmm†††¯¯¯ÈÈÈÈÈȯ¯¯†††mmm†††êêêòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòÀÀÀ———mmmmmmmmmmmm———ÀÀÀòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂ¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôô˜˜˜nnnnnnnnnnnn˜˜˜ÂÂÂôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôô‡‡‡nnn‡‡‡±±±ÊÊÊÊÊʱ±±‡‡‡nnn‡‡‡ôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôvvvvvvÂÂÂôôôôôôôôôôôôôôôôôôÂÂÂvvvvvvôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôô‡‡‡vvvÛÛÛôôôôôôôôôôôôôôôôôôôôôôôôÛÛÛvvv‡‡‡ôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôô‡‡‡ôôôôôôôôôôôôÂÂÂnnnÂÂÂôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóóÚÚÚÚÚÚóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnnÉÉÉóóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóóÉÉÉnnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóónnn°°°óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóóó°°°nnnóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóó󆆆óóóóóóóóóóóóóóónnnnnnóóóóóóóóóóóóóó󆆆óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóóónnnnnnóóóóóóóóóóóóÁÁÁnnnÁÁÁóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòò†††uuuÙÙÙòòòòòòòòòòòòòòòòòòòòòòòòÙÙÙuuu†††òòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòuuuuuuÀÀÀòòòòòòòòòòòòòòòòòòÀÀÀuuuuuuòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòò†††mmm†††¯¯¯ÈÈÈÈÈȯ¯¯†††mmm†††òòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòÀÀÀ———mmmmmmmmmmmm———ÀÀÀòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô§§§ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôô”””gggôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôïïƒggggggôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóóóóóóóóóáááwwwggggggggggggrrrŒŒŒ···íííóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóÑÑÑoooggggggggggggggggggggggggjjj­­­óóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóó½½½hhhgggggggggggggggggggggggggggggggggŽŽŽóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóó½½½hhhgggggggggggggggggggggggggggggggggggg¢¢¢óóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóÑÑÑoooggggggggggggggggggggggggggggggggggggãããóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóáááwwwggggggggggggggggggggggggggggggggg«««óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóïïƒggggggóóóóóóóóóóóóïïïÑÑÑšššggg†††óóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòò”””gggòòòòòòòòòòòòòòòòòòòòò¹¹¹qqqòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòò§§§òòòòòòòòòòòòòòòòòòòòòòòò‹‹‹òòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂ¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô§§§ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôggg”””ôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôggggggƒƒƒïïïôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóííí···ŒŒŒrrrggggggggggggwwwáááóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóó­­­jjjggggggggggggggggggggggggoooÑÑÑóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóŽŽŽggggggggggggggggggggggggggggggggghhh½½½óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóó¢¢¢gggggggggggggggggggggggggggggggggggghhh½½½óóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóãããggggggggggggggggggggggggggggggggggggoooÑÑÑóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóó«««gggggggggggggggggggggggggggggggggwwwáááóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóó󆆆gggšššÑÑÑïïïóóóóóóóóóóóóggggggƒƒƒïïïóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòqqq¹¹¹òòòòòòòòòòòòòòòòòòòòòggg”””òòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòò‹‹‹òòòòòòòòòòòòòòòòòòòòòòòò§§§òòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôïïï   yyyyyyyyyyyyyyyyyyyyyyyyyyyŽŽŽôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôïïïsssllllllllllllllllllllllllƒƒƒôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôïïïllllllllllllllllllllllllƒƒƒôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôïïïlllllllllllllllllllllƒƒƒôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóóóóóóóóóóóóïïïllllllllllllÜÜÜóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóÜÜܾ¾¾¾¾¾¾¾¾llllllllllll¾¾¾¾¾¾¾¾¾õõõóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóõõõllllllllllllllllllllllll´´´óóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóõõõwwwllllllllllllllllll   óóóóóóóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòòòòòõõõsssllllllllllll———òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòôôônnnllllllŠŠŠòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòìììlllòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòØØØòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥ÂÂÂ¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥ÂÂÂ¥¥¥îîî÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷îî¥¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôŽŽŽyyyyyyyyyyyyyyyyyyyyyyyyyyyœœœôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôƒƒƒllllllllllllllllllllllllsssôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôƒƒƒllllllllllllllllllllllllôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤ôôôôôôôôôôôôôôôôôôôôôôôôƒƒƒlllllllllllllllllllllôôôôôôôôôôôôôôôôôôôôôôôô¤¤¤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóÚÚÚllllllllllllóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóïïïllllllllllllóóóóóóóóóóóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóëëë¾¾¾¾¾¾¾¾¾llllllllllll¾¾¾¾¾¾¾¾¾õõõóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóõõõllllllllllllllllllllllll´´´óóóóóóóóóóóóóó󤤤¤¤¤óóóóóóóóóóóóóóóóóóóóóóóóóóóõõõwwwllllllllllllllllll   óóóóóóóóóóóóóóóóó󤤤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòõõõsssllllllllllll———òòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòôôônnnllllllŠŠŠòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòìììlllòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòØØØòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¤¤¤òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòò¤¤¤¥¥¥éééììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììììéé饥¥¤¤¤¥¥¥¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥Â \ No newline at end of file diff --git a/contrib/media/updf/apps/icons/updf.png b/contrib/media/updf/apps/icons/updf.png new file mode 100644 index 0000000000..276e461d11 Binary files /dev/null and b/contrib/media/updf/apps/icons/updf.png differ diff --git a/contrib/media/updf/apps/kolibri.c b/contrib/media/updf/apps/kolibri.c new file mode 100644 index 0000000000..47583f8b6b --- /dev/null +++ b/contrib/media/updf/apps/kolibri.c @@ -0,0 +1,485 @@ +#include "kolibri.h" +#include "string.h" + + +extern char KOL_PATH[256]; +extern char KOL_PARAM[256]; +extern char KOL_DIR[256]; + + +void kol_exit() +{ +asm volatile ("int $0x40"::"a"(-1)); +} + + +void kol_sleep(unsigned d) +{ +asm volatile ("int $0x40"::"a"(5), "b"(d)); +} + + +// define a window +// x, y - position; w, h - size; cs - color and style; c - caption; b - boder +void kol_wnd_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned cs, unsigned b, char *t) +{ +asm volatile ("int $0x40"::"a"(0), "b"(x*65536+w), "c"(y*65536+h), "d"(cs), "D"(t), "S"(b) ); +} + + +void kol_wnd_move(unsigned x, unsigned y) +{ +asm volatile ("int $0x40"::"a"(67), "b"(x), "c"(y), "d"(-1), "S"(-1)); +} + + +void kol_event_mask(unsigned e) +{ +asm volatile ("int $0x40"::"a"(40), "b"(e)); +} + + +unsigned kol_event_wait() +{ +asm volatile ("int $0x40"::"a"(10)); +} + + +unsigned kol_event_wait_time(unsigned time) +{ +asm volatile ("int $0x40"::"a"(23), "b"(time)); +} + + +unsigned kol_event_check() +{ +asm volatile ("int $0x40"::"a"(11)); +} + + +inline void __attribute__((__always_inline__)) kol_paint_start() +{ +asm volatile ("int $0x40"::"a"(12), "b"(1)); +} + + +inline void __attribute__((__always_inline__)) kol_paint_end() +{ +asm volatile ("int $0x40"::"a"(12), "b"(2)); +} + + +void kol_paint_pixel(unsigned x, unsigned y, unsigned c) +{ +asm volatile ("int $0x40"::"a"(1), "b"(x), "c"(y), "d"(c)); +} + + +void kol_paint_bar(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c) +{ +asm volatile ("int $0x40"::"a"(13), "b"(x*65536+w), "c"(y*65536+h), "d"(c)); +} + + +void kol_paint_line(unsigned x1, unsigned y1, unsigned x2, unsigned y2, unsigned c) +{ +asm volatile ("int $0x40"::"a"(38), "b"(x1*65536+x2), "c"(y1*65536+y2), "d"(c)); +} + + +void kol_paint_string(unsigned x, unsigned y, char *s, unsigned c) +{ +asm volatile ("int $0x40"::"a"(4), "b"(x*65536+y), "c"(c), "d"(s)); +} + + +void kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d) +{ +asm volatile ("int $0x40"::"a"(7), "c"(w*65536+h), "d"(x*65536+y), "b"(d)); +} + + +void kol_paint_image_24(unsigned x, unsigned y, unsigned w, unsigned h, char *d) +{ +asm volatile ("int $0x40"::"a"(65), "b"(d), "c"(w*65536+h), "d"(x*65536+y), "S"(32)); +} + + +unsigned kol_key_get() +{ +asm volatile ("int $0x40"::"a"(2)); +} + + +unsigned kol_key_control() +{ +asm volatile ("int $0x40"::"a"(66), "b"(3)); +} + + +void kol_key_lang_set(unsigned lang) +{ +asm volatile ("int $0x40"::"a"(21), "b"(2), "c"(9), "d"(lang)); +} + + +unsigned kol_key_lang_get() +{ +asm volatile ("int $0x40"::"a"(26), "b"(2), "c"(9)); +} + + +void kol_key_mode_set(unsigned mode) +{ +asm volatile ("int $0x40"::"a"(66), "b"(1), "c"(mode)); +} + + +unsigned kol_key_mode_get() +{ +asm volatile ("int $0x40"::"a"(66), "b"(2)); +} + + +unsigned kol_btn_get() +{ +asm volatile ("int $0x40"::"a"(17)); +} + + +void kol_btn_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned d, unsigned c) +{ +asm volatile ("int $0x40"::"a"(8), "b"(x*65536+w), "c"(y*65536+h), "d"(d), "S"(c)); +} + + +void kol_btn_type(unsigned t) +{ +asm volatile ("int $0x40"::"a"(48), "b"(1), "c"(t)); +} + + +void kol_wnd_caption(char *s) +{ +asm volatile ("int $0x40"::"a"(71), "b"(1), "c"(s)); +} + + +unsigned kol_mouse_pos() +{ +asm volatile ("int $0x40"::"a"(37), "b"(0)); +} + + +unsigned kol_mouse_posw() +{ +asm volatile ("int $0x40"::"a"(37), "b"(1)); +} + + +unsigned kol_mouse_btn() +{ +asm volatile ("int $0x40"::"a"(37), "b"(2)); +} + + +void kol_board_putc(char c) +{ +asm volatile ("int $0x40"::"a"(63), "b"(1), "c"(c)); +} + + +void kol_board_puts(char *s) +{ +unsigned i; +i = 0; +while (*(s+i)) + { + asm volatile ("int $0x40"::"a"(63), "b"(1), "c"(*(s+i))); + i++; + } +} + + +void kol_board_puti(int n) +{ +char c; + +if ( n > 1 ) + kol_board_puti(n / 10); + +c = n % 10 + '0'; +asm volatile ("int $0x40"::"a"(63), "b"(1), "c"(c)); + +} + + +int kol_file_70(kol_struct70 *k) +{ +asm volatile ("int $0x40"::"a"(70), "b"(k)); +} + + +kol_struct_import* kol_cofflib_load(char *name) +{ +asm volatile ("int $0x40"::"a"(68), "b"(19), "c"(name)); +} + + +void* kol_cofflib_procload (kol_struct_import *imp, char *name) +{ +int i; +for (i=0;;i++) + if ( NULL == ((imp+i) -> name)) + break; + else + if ( 0 == strcmp(name, (imp+i)->name) ) + return (imp+i)->data; +return NULL; +} + + +unsigned kol_cofflib_procnum (kol_struct_import *imp) +{ +unsigned i, n; + +for (i=n=0;;i++) + if ( NULL == ((imp+i) -> name)) + break; + else + n++; + +return n; +} + + +void kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n) +{ +unsigned i; +*name = 0; + +for (i=0;;i++) + if ( NULL == ((imp+i) -> name)) + break; + else + if ( i == n ) + { + strcpy(name, ((imp+i)->name)); + break; + } + +} + + +unsigned kol_system_cpufreq() +{ +asm volatile ("int $0x40"::"a"(18), "b"(5)); +} + + +unsigned kol_system_mem() +{ +asm volatile ("int $0x40"::"a"(18), "b"(17)); +} + + +unsigned kol_system_memfree() +{ +asm volatile ("int $0x40"::"a"(18), "b"(16)); +} + + +unsigned kol_system_time_get() +{ +asm volatile ("int $0x40"::"a"(3)); +} + + +unsigned kol_system_date_get() +{ +asm volatile ("int $0x40"::"a"(29)); +} + + +unsigned kol_system_end(unsigned param) +{ +asm volatile ("int $0x40"::"a"(18), "b"(9), "c"(param)); +} + + +void kol_path_file2dir(char *dir, char *fname) +{ +unsigned i; +strcpy (dir, fname); +for ( i = strlen(dir);; --i) + if ( '/' == dir[i]) + { + dir[i] = '\0'; + return; + } +} + + +void kol_path_full(char *full, char *fname) +{ +char temp[256]; + +switch (*fname) + { + + case '/': + strncpy(temp, fname+1, 2); + temp[2]=0; + if ( (!strcmp("rd", temp)) || (!strcmp("hd", temp)) || (!strcmp("cd", temp)) ) + strcpy (full, fname); + break; + + case '.': + break; + + default: + break; + + }; + +} + + + +inline void __attribute__((__always_inline__)) kol_screen_wait_rr() +{ +asm volatile ("int $0x40"::"a"(18), "b"(14)); +} + + + +void kol_screen_get_size(unsigned *w, unsigned *h) +{ +unsigned size; +asm volatile ("int $0x40":"=a"(size):"a"(14)); +*w = size / 65536; +*h = size % 65536; +} + + + +unsigned kol_skin_height() +{ +asm volatile ("int $0x40"::"a"(48), "b"(4)); +} + + +unsigned kol_thread_start(unsigned start, unsigned stack) +{ +asm volatile ("int $0x40"::"a"(51), "b"(1), "c"(start), "d"(stack)); +} + + +unsigned kol_time_tick() +{ +asm volatile ("int $0x40"::"a"(26), "b"(9)); +} + + +unsigned kol_sound_speaker(char data[]) +{ +asm volatile ("movl %0, %%esi"::"a"(data)); +asm volatile ("int $0x40"::"a"(55), "b"(55)); +} + + +unsigned kol_process_info(unsigned slot, char buf1k[]) +{ +asm volatile ("int $0x40"::"a"(9), "b"(buf1k), "c"(slot)); +} + + +int kol_process_kill_pid(unsigned process) +{ +asm volatile ("int $0x40"::"a"(18), "b"(18), "c"(process)); +} + +int kol_kill_process(unsigned process) +{ +asm volatile ("int $0x40"::"a"(18), "b"(2), "c"(process)); +} + +void kol_get_kernel_ver(char buff16b[]) +{ +asm volatile ("int $0x40"::"a"(18), "b"(13), "c"(buff16b)); +} + +int kol_buffer_open(char name[], int mode, int size, char **buf) +{ +int error; +asm volatile ("int $0x40":"=a"(*buf), "=d"(error):"a"(68), "b"(22), "c"(name), "d"(size), "S"(mode)); +return error; +} + +void kol_buffer_close(char name[]) +{ +asm volatile ("int $0x40"::"a"(68), "b"(23), "c"(name)); +} + +int kol_clip_num() +{ +asm volatile ("int $0x40"::"a"(54), "b"(0)); +} + +char* kol_clip_get(int n) +{ +asm volatile ("int $0x40"::"a"(54), "b"(1), "c"(n)); +} + +int kol_clip_set(int n, char buffer[]) +{ +asm volatile ("int $0x40"::"a"(54), "b"(2), "c"(n), "d"(buffer)); +} + +int kos_random(int num) +{ + srand(kol_time_tick()); + return rand() % num; +} + +int kos_get_mouse_wheels(void) +{ + int val; + asm ("int $0x40":"=a"(val):"a"(37),"b"(7)); + return val; +}; + + +struct blit_call +{ + int dstx; + int dsty; + int w; + int h; + + int srcx; + int srcy; + int srcw; + int srch; + + unsigned char *d; + int stride; +}; + +void kos_blit(int dstx, int dsty, int w, int h, int srcx, + int srcy,int srcw, int srch, int stride, char *d) +{ + struct blit_call image; + image.dstx=dstx; + image.dsty=dsty; + image.w=w; + image.h=h; + image.srcx=srcx; + image.srcy=srcy; + image.srcw=srcw; + image.srch=srch; + image.stride=stride; + image.d=d; + asm ("int $0x40"::"a"(73),"b"(0),"c"(&image)); +} + diff --git a/contrib/media/updf/apps/kolibri.h b/contrib/media/updf/apps/kolibri.h new file mode 100644 index 0000000000..6da79c023a --- /dev/null +++ b/contrib/media/updf/apps/kolibri.h @@ -0,0 +1,145 @@ + +#define NULL ((void*)0) + +#define SHM_OPEN 0 +#define SHM_OPEN_ALWAYS 0x04 +#define SHM_CREATE 0x08 +#define SHM_READ 0x00 +#define SHM_WRITE 0x01 + +#define E_NOTFOUND 5 +#define E_ACCESS 10 +#define E_NOMEM 30 +#define E_PARAM 33 + +#define FILENAME_MAX 1024 + +#define BT_DEL 0x80000000 +#define BT_HIDE 0x40000000 +#define BT_NOFRAME 0x20000000 + +#define evReDraw 1 +#define evKey 2 +#define evButton 3 +#define evMouse 6 +#define evNetwork 8 + +#define ASCII_KEY_LEFT 176 +#define ASCII_KEY_RIGHT 179 +#define ASCII_KEY_DOWN 177 +#define ASCII_KEY_UP 178 +#define ASCII_KEY_HOME 180 +#define ASCII_KEY_END 181 +#define ASCII_KEY_PGDN 183 +#define ASCII_KEY_PGUP 184 + +#define ASCII_KEY_BS 8 +#define ASCII_KEY_TAB 9 +#define ASCII_KEY_ENTER 13 +#define ASCII_KEY_ESC 27 +#define ASCII_KEY_DEL 182 +#define ASCII_KEY_INS 185 +#define ASCII_KEY_SPACE 032 + +#pragma pack(push,1) +typedef struct +{ +unsigned p00; +unsigned p04; +unsigned p08; +unsigned p12; +unsigned p16; +char p20; +char *p21; +} kol_struct70; +#pragma pack(pop) + + +#pragma pack(push,1) +typedef struct +{ +unsigned p00; +char p04; +char p05[3]; +unsigned p08; +unsigned p12; +unsigned p16; +unsigned p20; +unsigned p24; +unsigned p28; +unsigned long long p32; +unsigned p40; +} kol_struct_BDVK; +#pragma pack(pop) + + +#pragma pack(push,1) +typedef struct +{ +char *name; +void *data; +} kol_struct_import; +#pragma pack(pop) + + +void kol_exit(); +void kol_sleep(unsigned d); +void kol_wnd_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned cs, unsigned b, char *t); +void kol_wnd_move(unsigned x, unsigned y); +void kol_wnd_caption(char *s); +void kol_event_mask(unsigned e); +unsigned kol_event_wait(); +unsigned kol_event_wait_time(unsigned time); +unsigned kol_event_check(); +void kol_paint_start(); +void kol_paint_end(); +void kol_paint_pixel(unsigned x, unsigned y, unsigned c); +void kol_paint_bar(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c); +void kol_paint_line(unsigned x1, unsigned y1, unsigned x2, unsigned y2, unsigned c); +void kol_paint_string(unsigned x, unsigned y, char *s, unsigned c); +void kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d); +void kol_paint_image_pal(unsigned x, unsigned y, unsigned w, unsigned h, char *buf, unsigned bits, unsigned palette); +unsigned kol_key_get(); +unsigned kol_key_control(); +void kol_key_lang_set(unsigned lang); +unsigned kol_key_lang_get(); +void kol_key_mode_set(unsigned mode); +unsigned kol_key_mode_get(); +void kol_paint_image_24(unsigned x, unsigned y, unsigned w, unsigned h, char *d); +unsigned kol_btn_get(); +void kol_btn_type(unsigned t); +unsigned kol_mouse_pos(); +unsigned kol_mouse_posw(); +unsigned kol_mouse_btn(); +void kol_board_putc(char c); +void kol_board_puts(char *s); +void kol_board_puti(int n); +int kol_file_70(kol_struct70 *k); +kol_struct_import* kol_cofflib_load(char *name); +void* kol_cofflib_procload (kol_struct_import *imp, char *name); +unsigned kol_cofflib_procnum (kol_struct_import *imp); +void kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n); +unsigned kol_system_end(unsigned param); +unsigned kol_system_cpufreq(); +unsigned kol_system_mem(); +unsigned kol_system_memfree(); +unsigned kol_system_time_get(); +unsigned kol_system_date_get(); +void kol_path_file2dir(char *dir, char *fname); +void kol_path_full(char *full, char *fname); +void kol_screen_wait_rr(); +void kol_screen_get_size(unsigned *w, unsigned *h); +unsigned kol_skin_height(); +unsigned kol_thread_start(unsigned start, unsigned stack); +unsigned kol_time_tick(); +unsigned kol_sound_speaker(char data[]); +unsigned kol_process_info(unsigned slot, char buf1k[]); +int kol_process_kill_pid(unsigned process); +void kol_get_kernel_ver(char buff16b[]); +int kol_kill_process(unsigned process); +int kol_buffer_open(char name[], int mode, int size, char **buf); +void kol_buffer_close(char name[]); +int kol_clip_num(); +char* kol_clip_get(int n); +int kol_clip_set(int n, char buffer[]); + diff --git a/contrib/media/updf/apps/kos_main.c b/contrib/media/updf/apps/kos_main.c new file mode 100644 index 0000000000..63cc668414 --- /dev/null +++ b/contrib/media/updf/apps/kos_main.c @@ -0,0 +1,465 @@ +#include +#define _WIN32 +#include "fitz.h" +#include "mupdf.h" +#include "pdfapp.h" +#include "icons/allbtns.h" +#include "kolibri.c" + +void run_app() +{ + return; +} + +/*==== DATA ====*/ + +static char Title[1024] = "uPDF"; +static pdfapp_t gapp; +char debugstr[256]; +char do_not_blit=0; + +#define TOOLBAR_HEIGHT 34 +struct process_table_entry Form; + +#define DOCUMENT_BORDER 0x979797 +#define DOCUMENT_BG 0xABABAB + +#define SCROLL_H 25 + +short show_area_w = 65; +short show_area_x; + +char key_mode_enter_page_number; +int new_page_number; + +static short window_center, draw_h, draw_w; + +const char *help[] = { + "Keys:", + " ", + "PageUp - go to previous page", + "PageDown - go to next page", + "Home - go to first page", + "End - go to last page", + "Down arrow - scroll current page down", + "Up arrow - scroll current page up", + "+/- - zoom in/out", + "[ or l - rotate page 90 deg to the left", + "] or r - rotate page 90 deg to the right", + "g - grayscale on/off", + " ", + "Press Escape to hide help", + 0 +}; + +/*==== CODE ====*/ + + +// not implemented yet +void wincursor(pdfapp_t *app, int curs) { } +void winhelp(pdfapp_t *app) { } +void winresize(pdfapp_t *app, int w, int h) { } +void windocopy(pdfapp_t *app) { } +void winopenuri(pdfapp_t *app, char *buf) { } +void winrepaintsearch(pdfapp_t *app) { } + + +void winwarn(pdfapp_t *app, char *msg) +{ + fprintf(stderr, "mupdf: %s\n", msg); +} + + +void winerror(pdfapp_t *app, fz_error error) +{ + fz_catch(error, "aborting"); + exit(1); +} + + +char *winpassword(pdfapp_t *app, char *filename) +{ + char *r = ""; + return r; + random(); +} + + +void wintitle(pdfapp_t *app, char *s) +{ + char* param = *(char**)0x1C; + sprintf(Title,"%s - uPDF", strrchr(param, '/') + 1 ); +} + + +void winreloadfile(pdfapp_t *app) +{ + //pdfapp_close(app); + //pdfapp_open(app, filename, 0, 1); +} + +void winclose(pdfapp_t *app) +{ + pdfapp_close(&gapp); + __menuet__sys_exit(); +} + +void RunOpenApp() +{ + RunApp("/sys/lod", "*pdf* /kolibrios/media/updf"); +} + + +void winrepaint(pdfapp_t *app) +{ + winblit(&gapp); +} + + +void winblit(pdfapp_t *app) +{ + + if (do_not_blit) return; + + if (key_mode_enter_page_number==1) HandleNewPageNumber(0); else DrawPagination(); + + if (Form.client_width > gapp.image->w) window_center = (Form.client_width - gapp.image->w) / 2; else window_center = 0; + + gapp.panx = 0; + if (gapp.image->n == 4) { + kos_blit(window_center + Form.client_left, + Form.client_top + TOOLBAR_HEIGHT, + Form.client_width, + Form.client_height - TOOLBAR_HEIGHT, + gapp.panx, + gapp.pany, + gapp.image->w, + gapp.image->h, + gapp.image->w * gapp.image->n, + gapp.image->samples + ); + } + else if (gapp.image->n == 2) + { + int i = gapp.image->w*gapp.image->h; + unsigned char *color = malloc(i*4); + if (color != NULL) + { + unsigned char *s = gapp.image->samples; + unsigned char *d = color; + for (; i > 0 ; i--) + { + d[2] = d[1] = d[0] = *s++; + d[3] = *s++; + d += 4; + } + kos_blit(window_center + Form.client_left, + Form.client_top + TOOLBAR_HEIGHT, + Form.client_width, + Form.client_height - TOOLBAR_HEIGHT, + gapp.panx, + gapp.pany, + gapp.image->w, + gapp.image->h, + gapp.image->w * 4, + color + ); + free(color); + } + } +} + + +void DrawPageSides(void) +{ + if (gapp.image->h < Form.client_height - TOOLBAR_HEIGHT) { + draw_h = gapp.image->h - gapp.pany; + } else { + draw_h = Form.client_height - TOOLBAR_HEIGHT; + } + + if (gapp.image->w < Form.client_width) { + window_center = (Form.client_width - gapp.image->w) / 2; + draw_w = gapp.image->w + 2; + kol_paint_bar(0, TOOLBAR_HEIGHT, window_center-1, Form.client_height - TOOLBAR_HEIGHT, DOCUMENT_BG); + kol_paint_bar(window_center-1, TOOLBAR_HEIGHT, 1, draw_h, DOCUMENT_BORDER); + kol_paint_bar(window_center + gapp.image->w, TOOLBAR_HEIGHT, 1, draw_h, DOCUMENT_BORDER); + kol_paint_bar(window_center + gapp.image->w+1, TOOLBAR_HEIGHT, Form.client_width - window_center - gapp.image->w - 1, Form.client_height - TOOLBAR_HEIGHT, DOCUMENT_BG); + } else { + window_center = 1; + draw_w = Form.client_width; + } + + kol_paint_bar(window_center - 1, gapp.image->h - gapp.pany + TOOLBAR_HEIGHT, draw_w, 1, DOCUMENT_BORDER); + kol_paint_bar(window_center - 1, gapp.image->h - gapp.pany + TOOLBAR_HEIGHT + 1, + draw_w, Form.client_height - gapp.image->h - TOOLBAR_HEIGHT + gapp.pany - 1, DOCUMENT_BG); +} + + +void GetNewPageNumber(void) +{ + new_page_number = gapp.pageno; + key_mode_enter_page_number = 1; + HandleNewPageNumber(0); +} + +void HandleNewPageNumber(unsigned char key) +{ + char label_new_page[8]; + + if ((key >= '0') && (key <= '9')) + { + new_page_number = new_page_number * 10 + key - '0'; + } + if (key == ASCII_KEY_BS) + { + new_page_number /= 10; + } + if (key == ASCII_KEY_ENTER) + { + ApplyNewPageNumber(); + return; + } + if (key==ASCII_KEY_ESC) + { + key_mode_enter_page_number = 0; + DrawWindow(); + return; + } + + itoa(new_page_number, label_new_page, 10); + strcat(label_new_page, "_"); + kol_paint_bar(show_area_x, 6, show_area_w, 22, 0xFDF88E); + __menuet__write_text(show_area_x + show_area_w/2 - strlen(label_new_page)*6/2, 14, 0x000000, label_new_page, strlen(label_new_page)); + + if (new_page_number > gapp.pagecount) ApplyNewPageNumber(); +} + +void ApplyNewPageNumber(void) +{ + key_mode_enter_page_number = 0; + gapp.pageno = new_page_number -1; + pdfapp_onkey(&gapp, ']'); +} + +void DrawPagination(void) +{ + char pages_display[12]; + kol_paint_bar(show_area_x, 6, show_area_w, 22, 0xF4F4F4); + sprintf (pages_display, "%d/%d", gapp.pageno, gapp.pagecount); + __menuet__write_text(show_area_x + show_area_w/2 - strlen(pages_display)*6/2, 14, 0x000000, pages_display, strlen(pages_display)); +} + +void DrawToolbarButton(int x, char image_id) +{ + __menuet__make_button(x, 5, 26-1, 24-1, 10 + image_id + BT_HIDE, 0); + __menuet__putimage(x, 5, 26, 24, image_id * 24 * 26 * 3 + toolbar_image); +} + +void DrawWindow(void) +{ + kol_paint_bar(0, 0, Form.client_width, TOOLBAR_HEIGHT - 1, 0xe1e1e1); // bar on the top (buttons holder) + kol_paint_bar(0, TOOLBAR_HEIGHT - 1, Form.client_width, 1, 0x7F7F7F); + DrawToolbarButton(8,0); //open_folder + DrawToolbarButton(42,1); //magnify - + DrawToolbarButton(67,2); //magnify + + DrawToolbarButton(101,6); //rotate left + DrawToolbarButton(126,7); //rotate right + DrawToolbarButton(Form.client_width - 160,3); //show help + show_area_x = Form.client_width - show_area_w - 34; + DrawToolbarButton(show_area_x - 26,4); //prev page + DrawToolbarButton(show_area_x + show_area_w,5); //nex page + __menuet__make_button(show_area_x-1, 5, show_area_w+1, 23, 20 + BT_HIDE, 0xA4A4A4); + kol_paint_bar(show_area_x, 5, show_area_w, 1, 0xA4A4A4); + kol_paint_bar(show_area_x, 28, show_area_w, 1, 0xA4A4A4); + winblit(&gapp); + DrawPageSides(); +} + + +/* Actions */ + +void PageScrollDown(void) +{ + //pdfapp_onkey(&gapp, 'k'); //move down + if (gapp.image->h - gapp.pany - SCROLL_H < Form.client_height - TOOLBAR_HEIGHT) + { + pdfapp_onkey(&gapp, '.'); + } + else { + gapp.pany += SCROLL_H; + winblit(&gapp); + } +} + + +void PageScrollUp(void) +{ + //pdfapp_onkey(&gapp, 'j'); //move up + if (gapp.pany >= SCROLL_H) { + gapp.pany -= SCROLL_H; + winblit(&gapp); + } + else { + //not very nice way of using do_not_blit, but it simple + if (gapp.pageno == 1) return; + do_not_blit = 1; + pdfapp_onkey(&gapp, ','); + do_not_blit = 0; + gapp.pany = gapp.image->h - SCROLL_H - Form.client_height + TOOLBAR_HEIGHT; + if (gapp.pany < 0) gapp.pany = 0; + //sprintf (debugstr, "gapp.pany: %d \n", gapp.pany); + //kol_board_puts(debugstr); + winblit(&gapp); + } +} + +void RunApp(char app[], char param[]) +{ + kol_struct70 r; + r.p00 = 7; + r.p04 = 0; + r.p08 = param; + r.p12 = 0; + r.p16 = 0; + r.p20 = 0; + r.p21 = app; + kol_file_70(&r); +} + + +void PageZoomIn(void) +{ + pdfapp_onkey(&gapp, '+'); + DrawPageSides(); +} + + +void PageZoomOut(void) +{ + pdfapp_onkey(&gapp, '-'); + DrawPageSides(); +} + +void PageRotateLeft(void) +{ + pdfapp_onkey(&gapp, 'L'); + DrawPageSides(); +} + +void PageRotateRight(void) +{ + pdfapp_onkey(&gapp, 'R'); + DrawPageSides(); +} + +int main (void) +{ + char ii, mouse_wheels_state; + char* original_command_line = *(char**)0x1C; + + if (*original_command_line == 0) { + kol_board_puts("uPDF: no param set, showing OpenDialog"); + RunOpenApp(); + __menuet__sys_exit(); + } + + kol_board_puts(original_command_line); + kol_board_puts("\n"); + + char buf[128]; + int resolution = 72; + int pageno = 1; + fz_accelerate(); + kol_board_puts("PDF init\n"); + pdfapp_init(&gapp); + gapp.scrw = 600; + gapp.scrh = 400; + gapp.resolution = resolution; + gapp.pageno = pageno; + kol_board_puts("PDF Open\n"); + pdfapp_open(&gapp, original_command_line, 0, 0); + kol_board_puts("PDF Opened\n"); + wintitle(&gapp, 0); + + kol_board_puts("Inital paint\n"); + + int butt, key, screen_max_x, screen_max_y; + __menuet__get_screen_max(&screen_max_x, &screen_max_y); + __menuet__set_bitfield_for_wanted_events(EVENT_REDRAW+EVENT_KEY+EVENT_BUTTON+EVENT_MOUSE_CHANGE); + + for(;;) + { + + switch(__menuet__wait_for_event()) + { + case evReDraw: + // gapp.shrinkwrap = 2; + __menuet__window_redraw(1); + __menuet__define_window(screen_max_x / 2 - 350-50+kos_random(50), + screen_max_y / 2 - 300-50+kos_random(50), + 700, 600, 0x73000000, 0x800000FF, Title); + __menuet__window_redraw(2); + __menuet__get_process_table(&Form, PID_WHOAMI); + if (Form.window_state > 2) continue; //fix rolled up + Form.client_width++; //fix for Menuet kernel bug + Form.client_height++; //fix for Menuet kernel bug + DrawWindow(); + break; + + case evKey: + key = __menuet__getkey(); + if (key_mode_enter_page_number) + { + HandleNewPageNumber(key); + break; + } + if (key==ASCII_KEY_ESC) DrawWindow(); //close help + if (key==ASCII_KEY_PGDN) pdfapp_onkey(&gapp, ']'); + if (key==ASCII_KEY_PGUP) pdfapp_onkey(&gapp, '['); + if (key==ASCII_KEY_HOME) pdfapp_onkey(&gapp, 'g'); + if (key==ASCII_KEY_END ) pdfapp_onkey(&gapp, 'G'); + if (key=='g' ) pdfapp_onkey(&gapp, 'c'); + if ((key=='[' ) || (key=='l')) PageRotateLeft(); + if ((key==']' ) || (key=='r')) PageRotateRight(); + if (key==ASCII_KEY_DOWN ) PageScrollDown(); + if (key==ASCII_KEY_UP ) PageScrollUp(); + if (key=='-') PageZoomOut(); + if ((key=='=') || (key=='+')) PageZoomIn(); + break; + + case evButton: + butt = __menuet__get_button_id(); + if(butt==1) __menuet__sys_exit(); + if(butt==10) RunOpenApp(); + if(butt==11) PageZoomOut(); //magnify - + if(butt==12) PageZoomIn(); //magnify + + if(butt==13) //show help + { + kol_paint_bar(0, TOOLBAR_HEIGHT, Form.client_width, Form.client_height - TOOLBAR_HEIGHT, 0xF2F2F2); + __menuet__write_text(20, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0); + __menuet__write_text(21, TOOLBAR_HEIGHT + 20 , 0x90000000, "uPDF for KolibriOS v1.2", 0); + for (ii=0; help[ii]!=0; ii++) { + __menuet__write_text(20, TOOLBAR_HEIGHT + 60 + ii * 15, 0x80000000, help[ii], 0); + } + } + if(butt==14) pdfapp_onkey(&gapp, '['); //previous page + if(butt==15) pdfapp_onkey(&gapp, ']'); //next page + if(butt==16) PageRotateLeft(); + if(butt==17) PageRotateRight(); + if(butt==20) GetNewPageNumber(); + break; + + case evMouse: + if (mouse_wheels_state = kos_get_mouse_wheels()) + { + if (mouse_wheels_state==1) { PageScrollDown(); PageScrollDown(); } + if (mouse_wheels_state==-1) { PageScrollUp(); PageScrollUp(); } + } + //sprintf (debugstr, "mouse_wheels_state: %d \n", mouse_wheels_state); + //kol_board_puts(debugstr); + //pdfapp_onmouse(&gapp, int x, int y, int btn, int modifiers, int state) + break; + } + } +} \ No newline at end of file diff --git a/contrib/media/updf/apps/pdfapp.c b/contrib/media/updf/apps/pdfapp.c new file mode 100644 index 0000000000..5e2b88be1f --- /dev/null +++ b/contrib/media/updf/apps/pdfapp.c @@ -0,0 +1,1171 @@ +#include "fitz.h" +#include "mupdf.h" +#include "pdfapp.h" + +#include /* for tolower() */ + +#define ZOOMSTEP 1.142857 +#define BEYOND_THRESHHOLD 40 + +enum panning +{ + DONT_PAN = 0, + PAN_TO_TOP, + PAN_TO_BOTTOM +}; + +static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repaint); + +static void pdfapp_warn(pdfapp_t *app, const char *fmt, ...) +{ + char buf[1024]; + va_list ap; + va_start(ap, fmt); + vsprintf(buf, fmt, ap); + va_end(ap); + winwarn(app, buf); +} + +static void pdfapp_error(pdfapp_t *app, fz_error error) +{ + winerror(app, error); +} + +char *pdfapp_version(pdfapp_t *app) +{ + return + "MuPDF 0.9\n" + "Copyright 2006-2011 Artifex Sofware, Inc.\n"; +} + +char *pdfapp_usage(pdfapp_t *app) +{ + return " "; + /* + "L\t\t-- rotate left\n" + "R\t\t-- rotate right\n" + "h\t\t-- scroll left\n" + "j down\t\t-- scroll down\n" + "k up\t\t-- scroll up\n" + "l\t\t-- scroll right\n" + "+\t\t-- zoom in\n" + "-\t\t-- zoom out\n" + "w\t\t-- shrinkwrap\n" + "r\t\t-- reload file\n" + ". pgdn right space\t-- next page\n" + ", pgup left b\t-- previous page\n" + ">\t\t-- next 10 pages\n" + "<\t\t-- back 10 pages\n" + "m\t\t-- mark page for snap back\n" + "t\t\t-- pop back to latest mark\n" + "1m\t\t-- mark page in register 1\n" + "1t\t\t-- go to page in register 1\n" + "123g\t\t-- go to page 123\n" + "/\t\t-- search for text\n" + "n\t\t-- find next search result\n" + "N\t\t-- find previous search result\n" + "c\t\t-- toggle between color and grayscale\n" + ; + */ +} + +void pdfapp_init(pdfapp_t *app) +{ + memset(app, 0, sizeof(pdfapp_t)); + app->scrw = 640; + app->scrh = 480; + app->resolution = 72; +} + +void pdfapp_invert(pdfapp_t *app, fz_bbox rect) +{ + unsigned char *p; + int x, y, n; + + int x0 = CLAMP(rect.x0 - app->image->x, 0, app->image->w - 1); + int x1 = CLAMP(rect.x1 - app->image->x, 0, app->image->w - 1); + int y0 = CLAMP(rect.y0 - app->image->y, 0, app->image->h - 1); + int y1 = CLAMP(rect.y1 - app->image->y, 0, app->image->h - 1); + + for (y = y0; y < y1; y++) + { + p = app->image->samples + (y * app->image->w + x0) * app->image->n; + for (x = x0; x < x1; x++) + { + for (n = app->image->n; n > 0; n--, p++) + *p = 255 - *p; + } + } +} + +static void pdfapp_open_pdf(pdfapp_t *app, char *filename, int fd) +{ + fz_error error; + fz_stream *file; + char *password = ""; + fz_obj *obj; + fz_obj *info; + + /* + * Open PDF and load xref table + */ +__menuet__debug_out("FZ OPEN\n"); + //file = fz_open_fd(fd); + __menuet__debug_out("FZ ready\n"); + error = pdf_open_xref(&app->xref, filename, NULL); + if (error){ + __menuet__debug_out("FZ can't open\n"); + pdfapp_error(app, fz_rethrow(error, "cannot open document '%s'", filename));} + fz_close(file); + + /* + * Handle encrypted PDF files + */ +/* + if (pdf_needs_password(app->xref)) + { + int okay = pdf_authenticate_password(app->xref, password); + while (!okay) + { + password = winpassword(app, filename); + if (!password) + exit(1); + okay = pdf_authenticate_password(app->xref, password); + if (!okay) + pdfapp_warn(app, "Invalid password."); + } + } + * */ + + /* + * Load meta information + */ + +/* + app->outline = pdf_load_outline(app->xref); + + app->doctitle = filename; + if (strrchr(app->doctitle, '\\')) + app->doctitle = strrchr(app->doctitle, '\\') + 1; + if (strrchr(app->doctitle, '/')) + app->doctitle = strrchr(app->doctitle, '/') + 1; + info = fz_dict_gets(app->xref->trailer, "Info"); + if (info) + { + obj = fz_dict_gets(info, "Title"); + if (obj) + app->doctitle = pdf_to_utf8(obj); + } */ + + /* + * Start at first page + */ + __menuet__debug_out("Start at first page\n"); + + error = pdf_load_page_tree(app->xref); + if (error) { + __menuet__debug_out("Can't load tree\n"); + pdfapp_error(app, fz_rethrow(error, "cannot load page tree"));} + +__menuet__debug_out("Page counter\n"); + app->pagecount = pdf_count_pages(app->xref); + __menuet__debug_out("All is set!\n"); +} + +void pdfapp_open(pdfapp_t *app, char *filename, int fd, int reload) +{ + pdfapp_open_pdf(app, filename, fd); + + app->cache = fz_new_glyph_cache(); + + if (app->pageno < 1) + app->pageno = 1; + if (app->pageno > app->pagecount) + app->pageno = app->pagecount; + if (app->resolution < MINRES) + app->resolution = MINRES; + if (app->resolution > MAXRES) + app->resolution = MAXRES; + + if (!reload) + { + app->shrinkwrap = 1; + app->rotate = 0; + app->panx = 0; + app->pany = 0; + } + + pdfapp_showpage(app, 1, 1, 1); +} + +void pdfapp_close(pdfapp_t *app) +{ + if (app->cache) + fz_free_glyph_cache(app->cache); + app->cache = NULL; + + if (app->image) + fz_drop_pixmap(app->image); + app->image = NULL; + + if (app->outline) + pdf_free_outline(app->outline); + app->outline = NULL; + + if (app->xref) + { + if (app->xref->store) + pdf_free_store(app->xref->store); + app->xref->store = NULL; + + pdf_free_xref(app->xref); + app->xref = NULL; + } + + fz_flush_warnings(); +} + +static fz_matrix pdfapp_viewctm(pdfapp_t *app) +{ + fz_matrix ctm; + ctm = fz_identity; + ctm = fz_concat(ctm, fz_translate(0, -app->page_bbox.y1)); + if (app->xref) + ctm = fz_concat(ctm, fz_scale(app->resolution/72.0f, -app->resolution/72.0f)); + else + ctm = fz_concat(ctm, fz_scale(app->resolution/96.0f, app->resolution/96.0f)); + ctm = fz_concat(ctm, fz_rotate(app->rotate + app->page_rotate)); + return ctm; +} + +static void pdfapp_panview(pdfapp_t *app, int newx, int newy) +{ + if (newx < 0) + newx = 0; + if (newy < 0) + newy = 0; + + if (newx + app->image->w < app->winw) + newx = app->winw - app->image->w; + if (newy + app->image->h < app->winh) + newy = app->winh - app->image->h; + + if (app->winw >= app->image->w) + newx = (app->winw - app->image->w) / 2; + if (app->winh >= app->image->h) + newy = (app->winh - app->image->h) / 2; + + if (newx != app->panx || newy != app->pany) + winrepaint(app); + + if (newy > app->image->h) { + + app->pageno++; + + + if (app->pageno > app->pagecount) + app->pageno = app->pagecount; + + + newy = 0; + app->pany = newy; + + pdfapp_showpage(app, 1, 1, 1); + } + + app->panx = newx; + app->pany = newy; +} + +static void pdfapp_loadpage_pdf(pdfapp_t *app) +{ + pdf_page *page; + fz_error error; + fz_device *mdev; + + error = pdf_load_page(&page, app->xref, app->pageno - 1); + if (error) + pdfapp_error(app, error); + + app->page_bbox = page->mediabox; + app->page_rotate = page->rotate; + app->page_links = page->links; + page->links = NULL; + + /* Create display list */ + app->page_list = fz_new_display_list(); + mdev = fz_new_list_device(app->page_list); + error = pdf_run_page(app->xref, page, mdev, fz_identity); + if (error) + { + error = fz_rethrow(error, "cannot draw page %d in '%s'", app->pageno, app->doctitle); + pdfapp_error(app, error); + } + fz_free_device(mdev); + + pdf_free_page(page); + + pdf_age_store(app->xref->store, 3); +} + +static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repaint) +{ + char buf[256]; + fz_device *idev; + fz_device *tdev; + fz_colorspace *colorspace; + fz_matrix ctm; + fz_bbox bbox; + + wincursor(app, WAIT); + + if (loadpage) + { + if (app->page_list) + fz_free_display_list(app->page_list); + if (app->page_text) + fz_free_text_span(app->page_text); + if (app->page_links) + pdf_free_link(app->page_links); + + if (app->xref) + pdfapp_loadpage_pdf(app); + + /* Zero search hit position */ + app->hit = -1; + app->hitlen = 0; + + /* Extract text */ + app->page_text = fz_new_text_span(); + tdev = fz_new_text_device(app->page_text); + fz_execute_display_list(app->page_list, tdev, fz_identity, fz_infinite_bbox); + fz_free_device(tdev); + } + + if (drawpage) + { + sprintf(buf, "%s - %d/%d (%d dpi)", app->doctitle, + app->pageno, app->pagecount, app->resolution); + wintitle(app, buf); + + ctm = pdfapp_viewctm(app); + bbox = fz_round_rect(fz_transform_rect(ctm, app->page_bbox)); + + /* Draw */ + if (app->image) + fz_drop_pixmap(app->image); + if (app->grayscale) + colorspace = fz_device_gray; + else +//#ifdef _WIN32 + colorspace = fz_device_bgr; +//#else + // colorspace = fz_device_rgb; +//#endif + app->image = fz_new_pixmap_with_rect(colorspace, bbox); + fz_clear_pixmap_with_color(app->image, 255); + idev = fz_new_draw_device(app->cache, app->image); + fz_execute_display_list(app->page_list, idev, ctm, bbox); + fz_free_device(idev); + } + + if (repaint) + { + pdfapp_panview(app, app->panx, app->pany); + + if (app->shrinkwrap) + { + __menuet__debug_out ("SHRINK\n"); + int w = app->image->w; + int h = app->image->h; + if (app->winw == w) + app->panx = 0; + if (app->winh == h) + app->pany = 0; + if (w > app->scrw * 90 / 100) + w = app->scrw * 90 / 100; + if (h > app->scrh * 90 / 100) + h = app->scrh * 90 / 100; + if (w != app->winw || h != app->winh) + winresize(app, w, h); + } + + winrepaint(app); + + wincursor(app, ARROW); + } + + fz_flush_warnings(); +} + +static void pdfapp_gotouri(pdfapp_t *app, fz_obj *uri) +{ + char *buf; + buf = fz_malloc(fz_to_str_len(uri) + 1); + memcpy(buf, fz_to_str_buf(uri), fz_to_str_len(uri)); + buf[fz_to_str_len(uri)] = 0; + winopenuri(app, buf); + fz_free(buf); +} + +static void pdfapp_gotopage(pdfapp_t *app, fz_obj *obj) +{ + int number; + + number = pdf_find_page_number(app->xref, obj); + if (number < 0) + return; + + if (app->histlen + 1 == 256) + { + memmove(app->hist, app->hist + 1, sizeof(int) * 255); + app->histlen --; + } + app->hist[app->histlen++] = app->pageno; + app->pageno = number + 1; + pdfapp_showpage(app, 1, 1, 1); +} + +static inline fz_bbox bboxcharat(fz_text_span *span, int idx) +{ + int ofs = 0; + while (span) + { + if (idx < ofs + span->len) + return span->text[idx - ofs].bbox; + if (span->eol) + { + if (idx == ofs + span->len) + return fz_empty_bbox; + ofs ++; + } + ofs += span->len; + span = span->next; + } + return fz_empty_bbox; +} + +void pdfapp_inverthit(pdfapp_t *app) +{ + fz_bbox hitbox, bbox; + fz_matrix ctm; + int i; + + if (app->hit < 0) + return; + + hitbox = fz_empty_bbox; + ctm = pdfapp_viewctm(app); + + for (i = app->hit; i < app->hit + app->hitlen; i++) + { + bbox = bboxcharat(app->page_text, i); + if (fz_is_empty_rect(bbox)) + { + if (!fz_is_empty_rect(hitbox)) + pdfapp_invert(app, fz_transform_bbox(ctm, hitbox)); + hitbox = fz_empty_bbox; + } + else + { + hitbox = fz_union_bbox(hitbox, bbox); + } + } + + if (!fz_is_empty_rect(hitbox)) + pdfapp_invert(app, fz_transform_bbox(ctm, hitbox)); +} + +static inline int charat(fz_text_span *span, int idx) +{ + int ofs = 0; + while (span) + { + if (idx < ofs + span->len) + return span->text[idx - ofs].c; + if (span->eol) + { + if (idx == ofs + span->len) + return ' '; + ofs ++; + } + ofs += span->len; + span = span->next; + } + return 0; +} + +static int textlen(fz_text_span *span) +{ + int len = 0; + while (span) + { + len += span->len; + if (span->eol) + len ++; + span = span->next; + } + return len; +} + +static int match(char *s, fz_text_span *span, int n) +{ + int orig = n; + int c; + while ((c = *s++)) + { + if (c == ' ' && charat(span, n) == ' ') + { + while (charat(span, n) == ' ') + n++; + } + else + { + if (tolower(c) != tolower(charat(span, n))) + return 0; + n++; + } + } + return n - orig; +} + +static void pdfapp_searchforward(pdfapp_t *app, enum panning *panto) +{ + int matchlen; + int test; + int len; + int startpage; + + wincursor(app, WAIT); + + startpage = app->pageno; + + do + { + len = textlen(app->page_text); + + if (app->hit >= 0) + test = app->hit + strlen(app->search); + else + test = 0; + + while (test < len) + { + matchlen = match(app->search, app->page_text, test); + if (matchlen) + { + app->hit = test; + app->hitlen = matchlen; + wincursor(app, HAND); + winrepaint(app); + return; + } + test++; + } + + app->pageno++; + if (app->pageno > app->pagecount) + app->pageno = 1; + + pdfapp_showpage(app, 1, 0, 0); + *panto = PAN_TO_TOP; + + } while (app->pageno != startpage); + + if (app->pageno == startpage) + { + pdfapp_warn(app, "String '%s' not found.", app->search); + winrepaintsearch(app); + } + else + winrepaint(app); + + wincursor(app, HAND); +} + +static void pdfapp_searchbackward(pdfapp_t *app, enum panning *panto) +{ + int matchlen; + int test; + int len; + int startpage; + + wincursor(app, WAIT); + + startpage = app->pageno; + + do + { + len = textlen(app->page_text); + + if (app->hit >= 0) + test = app->hit - 1; + else + test = len; + + while (test >= 0) + { + matchlen = match(app->search, app->page_text, test); + if (matchlen) + { + app->hit = test; + app->hitlen = matchlen; + wincursor(app, HAND); + winrepaint(app); + return; + } + test--; + } + + app->pageno--; + if (app->pageno < 1) + app->pageno = app->pagecount; + + pdfapp_showpage(app, 1, 0, 0); + *panto = PAN_TO_BOTTOM; + + } while (app->pageno != startpage); + + if (app->pageno == startpage) + { + pdfapp_warn(app, "String '%s' not found.", app->search); + winrepaintsearch(app); + } + else + winrepaint(app); + + wincursor(app, HAND); +} + +void pdfapp_onresize(pdfapp_t *app, int w, int h) +{ + if (app->winw != w || app->winh != h) + { + app->winw = w; + app->winh = h; + pdfapp_panview(app, app->panx, app->pany); + winrepaint(app); + } +} + +void pdfapp_onkey(pdfapp_t *app, int c) +{ + int oldpage = app->pageno; + enum panning panto = PAN_TO_TOP; + int loadpage = 1; + + if (app->isediting) + { + int n = strlen(app->search); + if (c < ' ') + { + if (c == '\b' && n > 0) + { + app->search[n - 1] = 0; + winrepaintsearch(app); + } + if (c == '\n' || c == '\r') + { + app->isediting = 0; + if (n > 0) + { + winrepaintsearch(app); + pdfapp_onkey(app, 'n'); + } + else + winrepaint(app); + } + if (c == '\033') + { + app->isediting = 0; + winrepaint(app); + } + } + else + { + if (n + 2 < sizeof app->search) + { + app->search[n] = c; + app->search[n + 1] = 0; + winrepaintsearch(app); + } + } + return; + } + + /* + * Save numbers typed for later + */ + + if (c >= '0' && c <= '9') + { + app->number[app->numberlen++] = c; + app->number[app->numberlen] = '\0'; + } + + switch (c) + { + + case '?': + winhelp(app); + break; + + case 'q': + winclose(app); + break; + + /* + * Zoom and rotate + */ + + case '+': + case '=': + app->resolution *= ZOOMSTEP; + if (app->resolution > MAXRES) + app->resolution = MAXRES; + pdfapp_showpage(app, 0, 1, 1); + break; + case '-': + app->resolution /= ZOOMSTEP; + if (app->resolution < MINRES) + app->resolution = MINRES; + pdfapp_showpage(app, 0, 1, 1); + break; + + case 'L': + app->rotate -= 90; + pdfapp_showpage(app, 0, 1, 1); + break; + case 'R': + app->rotate += 90; + pdfapp_showpage(app, 0, 1, 1); + break; + + case 'c': + app->grayscale ^= 1; + pdfapp_showpage(app, 0, 1, 1); + break; + +#ifndef NDEBUG + case 'a': + app->rotate -= 15; + pdfapp_showpage(app, 0, 1, 1); + break; + case 's': + app->rotate += 15; + pdfapp_showpage(app, 0, 1, 1); + break; +#endif + + /* + * Pan view, but dont need to repaint image + */ + + case 'w': + app->shrinkwrap = 1; + app->panx = app->pany = 0; + pdfapp_showpage(app, 0, 0, 1); + break; + + case 'h': + app->panx += app->image->w / 10; + pdfapp_showpage(app, 0, 0, 1); + break; + + case 'j': + app->pany -= app->image->h / 10; + pdfapp_showpage(app, 0, 0, 1); + break; + + case 'k': + app->pany += app->image->h / 10; + pdfapp_showpage(app, 0, 0, 1); + break; + + case 'l': + app->panx -= app->image->w / 10; + pdfapp_showpage(app, 0, 0, 1); + break; + + /* + * Page navigation + */ + + case 'g': + case '\n': + case '\r': + if (app->numberlen > 0) + app->pageno = atoi(app->number); + else + app->pageno = 1; + break; + + case 'G': + app->pageno = app->pagecount; + break; + + case 'm': + if (app->numberlen > 0) + { + int idx = atoi(app->number); + + if (idx >= 0 && idx < nelem(app->marks)) + app->marks[idx] = app->pageno; + } + else + { + if (app->histlen + 1 == 256) + { + memmove(app->hist, app->hist + 1, sizeof(int) * 255); + app->histlen --; + } + app->hist[app->histlen++] = app->pageno; + } + break; + + case 't': + if (app->numberlen > 0) + { + int idx = atoi(app->number); + + if (idx >= 0 && idx < nelem(app->marks)) + if (app->marks[idx] > 0) + app->pageno = app->marks[idx]; + } + else if (app->histlen > 0) + app->pageno = app->hist[--app->histlen]; + break; + + /* + * Back and forth ... + */ + + case ',': + panto = PAN_TO_BOTTOM; + if (app->numberlen > 0) + app->pageno -= atoi(app->number); + else + app->pageno--; + break; + + case '.': + panto = PAN_TO_TOP; + if (app->numberlen > 0) + app->pageno += atoi(app->number); + else + app->pageno++; + break; + + case 'b': + panto = DONT_PAN; + if (app->numberlen > 0) + app->pageno -= atoi(app->number); + else + app->pageno--; + break; + + case ' ': + panto = DONT_PAN; + if (app->numberlen > 0) + app->pageno += atoi(app->number); + else + app->pageno++; + break; + +case ']': + panto = PAN_TO_TOP; + app->pageno++; + break; + +case '[': + panto = PAN_TO_TOP; + app->pageno--; + break; + + + case '<': + panto = PAN_TO_TOP; + app->pageno -= 10; + break; + case '>': + panto = PAN_TO_TOP; + app->pageno += 10; + break; + + /* + * Reloading the file... + */ + + case 'r': + panto = DONT_PAN; + oldpage = -1; + winreloadfile(app); + break; + + /* + * Searching + */ + + case '/': + app->isediting = 1; + app->search[0] = 0; + app->hit = -1; + app->hitlen = 0; + winrepaintsearch(app); + break; + + case 'n': + pdfapp_searchforward(app, &panto); + loadpage = 0; + break; + + case 'N': + pdfapp_searchbackward(app, &panto); + loadpage = 0; + break; + + } + + if (c < '0' || c > '9') + app->numberlen = 0; + + if (app->pageno < 1) + app->pageno = 1; + if (app->pageno > app->pagecount) + app->pageno = app->pagecount; + + if (app->pageno != oldpage) + { + switch (panto) + { + case PAN_TO_TOP: + app->pany = 0; + break; + case PAN_TO_BOTTOM: + app->pany = -2000; + break; + case DONT_PAN: + break; + } + pdfapp_showpage(app, loadpage, 1, 1); + } +} + +void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int state) +{ + pdf_link *link; + fz_matrix ctm; + fz_point p; + + p.x = x - app->panx + app->image->x; + p.y = y - app->pany + app->image->y; + + ctm = pdfapp_viewctm(app); + ctm = fz_invert_matrix(ctm); + + p = fz_transform_point(ctm, p); + + for (link = app->page_links; link; link = link->next) + { + if (p.x >= link->rect.x0 && p.x <= link->rect.x1) + if (p.y >= link->rect.y0 && p.y <= link->rect.y1) + break; + } + + if (link) + { + wincursor(app, HAND); + if (btn == 1 && state == 1) + { + if (link->kind == PDF_LINK_URI) + pdfapp_gotouri(app, link->dest); + else if (link->kind == PDF_LINK_GOTO) + pdfapp_gotopage(app, fz_array_get(link->dest, 0)); /* [ pageobj ... ] */ + return; + } + } + else + { + wincursor(app, ARROW); + } + + if (state == 1) + { + if (btn == 1 && !app->iscopying) + { + app->ispanning = 1; + app->selx = x; + app->sely = y; + app->beyondy = 0; + } + if (btn == 3 && !app->ispanning) + { + app->iscopying = 1; + app->selx = x; + app->sely = y; + app->selr.x0 = x; + app->selr.x1 = x; + app->selr.y0 = y; + app->selr.y1 = y; + } + if (btn == 4 || btn == 5) /* scroll wheel */ + { + int dir = btn == 4 ? 1 : -1; + app->ispanning = app->iscopying = 0; + if (modifiers & (1<<2)) + { + /* zoom in/out if ctrl is pressed */ + if (dir > 0) + app->resolution *= ZOOMSTEP; + else + app->resolution /= ZOOMSTEP; + if (app->resolution > MAXRES) + app->resolution = MAXRES; + if (app->resolution < MINRES) + app->resolution = MINRES; + pdfapp_showpage(app, 0, 1, 1); + } + else + { + /* scroll up/down, or left/right if + shift is pressed */ + int isx = (modifiers & (1<<0)); + int xstep = isx ? 20 * dir : 0; + int ystep = !isx ? 20 * dir : 0; + pdfapp_panview(app, app->panx + xstep, app->pany + ystep); + } + } + } + + else if (state == -1) + { + if (app->iscopying) + { + app->iscopying = 0; + app->selr.x0 = MIN(app->selx, x) - app->panx + app->image->x; + app->selr.x1 = MAX(app->selx, x) - app->panx + app->image->x; + app->selr.y0 = MIN(app->sely, y) - app->pany + app->image->y; + app->selr.y1 = MAX(app->sely, y) - app->pany + app->image->y; + winrepaint(app); + if (app->selr.x0 < app->selr.x1 && app->selr.y0 < app->selr.y1) + windocopy(app); + } + if (app->ispanning) + app->ispanning = 0; + } + + else if (app->ispanning) + { + int newx = app->panx + x - app->selx; + int newy = app->pany + y - app->sely; + /* Scrolling beyond limits implies flipping pages */ + /* Are we requested to scroll beyond limits? */ + if (newy + app->image->h < app->winh || newy > 0) + { + /* Yes. We can assume that deltay != 0 */ + int deltay = y - app->sely; + /* Check whether the panning has occured in the + * direction that we are already crossing the + * limit it. If not, we can conclude that we + * have switched ends of the page and will thus + * start over counting. + */ + if( app->beyondy == 0 || (app->beyondy ^ deltay) >= 0 ) + { + /* Updating how far we are beyond and + * flipping pages if beyond threshhold + */ + app->beyondy += deltay; + if (app->beyondy > BEYOND_THRESHHOLD) + { + if( app->pageno > 1 ) + { + app->pageno--; + pdfapp_showpage(app, 1, 1, 1); + newy = -app->image->h; + } + app->beyondy = 0; + } + else if (app->beyondy < -BEYOND_THRESHHOLD) + { + if( app->pageno < app->pagecount ) + { + app->pageno++; + pdfapp_showpage(app, 1, 1, 1); + newy = 0; + } + app->beyondy = 0; + } + } + else + app->beyondy = 0; + } + /* Although at this point we've already determined that + * or that no scrolling will be performed in + * y-direction, the x-direction has not yet been taken + * care off. Therefore + */ + pdfapp_panview(app, newx, newy); + + app->selx = x; + app->sely = y; + } + + else if (app->iscopying) + { + app->selr.x0 = MIN(app->selx, x) - app->panx + app->image->x; + app->selr.x1 = MAX(app->selx, x) - app->panx + app->image->x; + app->selr.y0 = MIN(app->sely, y) - app->pany + app->image->y; + app->selr.y1 = MAX(app->sely, y) - app->pany + app->image->y; + winrepaint(app); + } + +} + +void pdfapp_oncopy(pdfapp_t *app, unsigned short *ucsbuf, int ucslen) +{ + fz_bbox hitbox; + fz_matrix ctm; + fz_text_span *span; + int c, i, p; + int seen; + + int x0 = app->selr.x0; + int x1 = app->selr.x1; + int y0 = app->selr.y0; + int y1 = app->selr.y1; + + ctm = pdfapp_viewctm(app); + + p = 0; + for (span = app->page_text; span; span = span->next) + { + seen = 0; + + for (i = 0; i < span->len; i++) + { + hitbox = fz_transform_bbox(ctm, span->text[i].bbox); + c = span->text[i].c; + if (c < 32) + c = '?'; + if (hitbox.x1 >= x0 && hitbox.x0 <= x1 && hitbox.y1 >= y0 && hitbox.y0 <= y1) + { + if (p < ucslen - 1) + ucsbuf[p++] = c; + seen = 1; + } + } + + if (seen && span->eol) + { +#ifdef _WIN32 + if (p < ucslen - 1) + ucsbuf[p++] = '\r'; +#endif + if (p < ucslen - 1) + ucsbuf[p++] = '\n'; + } + } + + ucsbuf[p] = 0; +} diff --git a/contrib/media/updf/apps/pdfapp.h b/contrib/media/updf/apps/pdfapp.h new file mode 100644 index 0000000000..8efb4d3872 --- /dev/null +++ b/contrib/media/updf/apps/pdfapp.h @@ -0,0 +1,104 @@ +/* + * Utility object for handling a pdf application / view + * Takes care of PDF loading and displaying and navigation, + * uses a number of callbacks to the GUI app. + */ + +#define MINRES 54 +#define MAXRES 300 + +typedef struct pdfapp_s pdfapp_t; + +enum { ARROW, HAND, WAIT }; + +extern void winwarn(pdfapp_t*, char *s); +extern void winerror(pdfapp_t*, fz_error error); +extern void wintitle(pdfapp_t*, char *title); +extern void winresize(pdfapp_t*, int w, int h); +extern void winrepaint(pdfapp_t*); +extern void winrepaintsearch(pdfapp_t*); +extern char *winpassword(pdfapp_t*, char *filename); +extern void winopenuri(pdfapp_t*, char *s); +extern void wincursor(pdfapp_t*, int curs); +extern void windocopy(pdfapp_t*); +extern void winreloadfile(pdfapp_t*); +extern void windrawstring(pdfapp_t*, int x, int y, char *s); +extern void winclose(pdfapp_t*); +extern void winhelp(pdfapp_t*); + +struct pdfapp_s +{ + /* current document params */ + char *doctitle; + pdf_xref *xref; + pdf_outline *outline; + + int pagecount; + fz_glyph_cache *cache; + + /* current view params */ + int resolution; + int rotate; + fz_pixmap *image; + int grayscale; + + /* current page params */ + int pageno; + fz_rect page_bbox; + float page_rotate; + fz_display_list *page_list; + fz_text_span *page_text; + pdf_link *page_links; + + /* snapback history */ + int hist[256]; + int histlen; + int marks[10]; + + /* window system sizes */ + int winw, winh; + int scrw, scrh; + int shrinkwrap; + + /* event handling state */ + char number[256]; + int numberlen; + + int ispanning; + int panx, pany; + + int iscopying; + int selx, sely; + /* TODO - While sely keeps track of the relative change in + * cursor position between two ticks/events, beyondy shall keep + * track of the relative change in cursor position from the + * point where the user hits a scrolling limit. This is ugly. + * Used in pdfapp.c:pdfapp_onmouse. + */ + int beyondy; + fz_bbox selr; + + /* search state */ + int isediting; + char search[512]; + int hit; + int hitlen; + + /* client context storage */ + void *userdata; +}; + +void pdfapp_init(pdfapp_t *app); +void pdfapp_open(pdfapp_t *app, char *filename, int fd, int reload); +void pdfapp_close(pdfapp_t *app); + +char *pdfapp_version(pdfapp_t *app); +char *pdfapp_usage(pdfapp_t *app); + +void pdfapp_onkey(pdfapp_t *app, int c); +void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int state); +void pdfapp_oncopy(pdfapp_t *app, unsigned short *ucsbuf, int ucslen); +void pdfapp_onresize(pdfapp_t *app, int w, int h); + +void pdfapp_invert(pdfapp_t *app, fz_bbox rect); +void pdfapp_inverthit(pdfapp_t *app); diff --git a/contrib/media/updf/apps/pdfdraw.c b/contrib/media/updf/apps/pdfdraw.c new file mode 100644 index 0000000000..a5f6aa1e8b --- /dev/null +++ b/contrib/media/updf/apps/pdfdraw.c @@ -0,0 +1,405 @@ +/* + * pdfdraw -- command line tool for drawing pdf documents + */ + +#include "fitz.h" +#include "mupdf.h" + +#ifdef _MSC_VER +#include +#else +#include +#endif + +char *output = NULL; +float resolution = 72; +float rotation = 0; + +int showxml = 0; +int showtext = 0; +int showtime = 0; +int showmd5 = 0; +int savealpha = 0; +int uselist = 1; +int alphabits = 8; +float gamma_value = 1; +int invert = 0; + +fz_colorspace *colorspace; +fz_glyph_cache *glyphcache; +char *filename; + +struct { + int count, total; + int min, max; + int minpage, maxpage; +} timing; + +static void die(fz_error error) +{ + fz_catch(error, "aborting"); + exit(1); +} + +static void usage(void) +{ + fprintf(stderr, + "usage: pdfdraw [options] input.pdf [pages]\n" + "\t-o -\toutput filename (%%d for page number)\n" + "\t\tsupported formats: pgm, ppm, pam, png, pbm\n" + "\t-p -\tpassword\n" + "\t-r -\tresolution in dpi (default: 72)\n" + "\t-A\tdisable accelerated functions\n" + "\t-a\tsave alpha channel (only pam and png)\n" + "\t-b -\tnumber of bits of antialiasing (0 to 8)\n" + "\t-g\trender in grayscale\n" + "\t-m\tshow timing information\n" + "\t-t\tshow text (-tt for xml)\n" + "\t-x\tshow display list\n" + "\t-d\tdisable use of display list\n" + "\t-5\tshow md5 checksums\n" + "\t-R -\trotate clockwise by given number of degrees\n" + "\t-G gamma\tgamma correct output\n" + "\t-I\tinvert output\n" + "\tpages\tcomma separated list of ranges\n"); + exit(1); +} + +static int gettime(void) +{ + static struct timeval first; + static int once = 1; + struct timeval now; + if (once) + { + gettimeofday(&first, NULL); + once = 0; + } + gettimeofday(&now, NULL); + return (now.tv_sec - first.tv_sec) * 1000 + (now.tv_usec - first.tv_usec) / 1000; +} + +static int isrange(char *s) +{ + while (*s) + { + if ((*s < '0' || *s > '9') && *s != '-' && *s != ',') + return 0; + s++; + } + return 1; +} + +static void drawpage(pdf_xref *xref, int pagenum) +{ + fz_error error; + pdf_page *page; + fz_display_list *list; + fz_device *dev; + int start; + + if (showtime) + { + start = gettime(); + } + + error = pdf_load_page(&page, xref, pagenum - 1); + if (error) + die(fz_rethrow(error, "cannot load page %d in file '%s'", pagenum, filename)); + + list = NULL; + + if (uselist) + { + list = fz_new_display_list(); + dev = fz_new_list_device(list); + error = pdf_run_page(xref, page, dev, fz_identity); + if (error) + die(fz_rethrow(error, "cannot draw page %d in file '%s'", pagenum, filename)); + fz_free_device(dev); + } + + if (showxml) + { + dev = fz_new_trace_device(); + printf("\n", pagenum); + if (list) + fz_execute_display_list(list, dev, fz_identity, fz_infinite_bbox); + else + pdf_run_page(xref, page, dev, fz_identity); + printf("\n"); + fz_free_device(dev); + } + + if (showtext) + { + fz_text_span *text = fz_new_text_span(); + dev = fz_new_text_device(text); + if (list) + fz_execute_display_list(list, dev, fz_identity, fz_infinite_bbox); + else + pdf_run_page(xref, page, dev, fz_identity); + fz_free_device(dev); + printf("[Page %d]\n", pagenum); + if (showtext > 1) + fz_debug_text_span_xml(text); + else + fz_debug_text_span(text); + printf("\n"); + fz_free_text_span(text); + } + + if (showmd5 || showtime) + printf("page %s %d", filename, pagenum); + + if (output || showmd5 || showtime) + { + float zoom; + fz_matrix ctm; + fz_bbox bbox; + fz_pixmap *pix; + + zoom = resolution / 72; + ctm = fz_translate(0, -page->mediabox.y1); + ctm = fz_concat(ctm, fz_scale(zoom, -zoom)); + ctm = fz_concat(ctm, fz_rotate(page->rotate)); + ctm = fz_concat(ctm, fz_rotate(rotation)); + bbox = fz_round_rect(fz_transform_rect(ctm, page->mediabox)); + + /* TODO: banded rendering and multi-page ppm */ + + pix = fz_new_pixmap_with_rect(colorspace, bbox); + + if (savealpha) + fz_clear_pixmap(pix); + else + fz_clear_pixmap_with_color(pix, 255); + + dev = fz_new_draw_device(glyphcache, pix); + if (list) + fz_execute_display_list(list, dev, ctm, bbox); + else + pdf_run_page(xref, page, dev, ctm); + fz_free_device(dev); + + if (invert) + fz_invert_pixmap(pix); + if (gamma_value != 1) + fz_gamma_pixmap(pix, gamma_value); + + if (output) + { + char buf[512]; + sprintf(buf, output, pagenum); + if (strstr(output, ".pgm") || strstr(output, ".ppm") || strstr(output, ".pnm")) + fz_write_pnm(pix, buf); + else if (strstr(output, ".pam")) + fz_write_pam(pix, buf, savealpha); + else if (strstr(output, ".png")) + fz_write_png(pix, buf, savealpha); + else if (strstr(output, ".pbm")) { + fz_halftone *ht = fz_get_default_halftone(1); + fz_bitmap *bit = fz_halftone_pixmap(pix, ht); + fz_write_pbm(bit, buf); + fz_drop_bitmap(bit); + fz_drop_halftone(ht); + } + } + + if (showmd5) + { + fz_md5 md5; + unsigned char digest[16]; + int i; + + fz_md5_init(&md5); + fz_md5_update(&md5, pix->samples, pix->w * pix->h * pix->n); + fz_md5_final(&md5, digest); + + printf(" "); + for (i = 0; i < 16; i++) + printf("%02x", digest[i]); + } + + fz_drop_pixmap(pix); + } + + if (list) + fz_free_display_list(list); + + pdf_free_page(page); + + if (showtime) + { + int end = gettime(); + int diff = end - start; + + if (diff < timing.min) + { + timing.min = diff; + timing.minpage = pagenum; + } + if (diff > timing.max) + { + timing.max = diff; + timing.maxpage = pagenum; + } + timing.total += diff; + timing.count ++; + + printf(" %dms", diff); + } + + if (showmd5 || showtime) + printf("\n"); + + pdf_age_store(xref->store, 3); + + fz_flush_warnings(); +} + +static void drawrange(pdf_xref *xref, char *range) +{ + int page, spage, epage; + char *spec, *dash; + + spec = fz_strsep(&range, ","); + while (spec) + { + dash = strchr(spec, '-'); + + if (dash == spec) + spage = epage = pdf_count_pages(xref); + else + spage = epage = atoi(spec); + + if (dash) + { + if (strlen(dash) > 1) + epage = atoi(dash + 1); + else + epage = pdf_count_pages(xref); + } + + spage = CLAMP(spage, 1, pdf_count_pages(xref)); + epage = CLAMP(epage, 1, pdf_count_pages(xref)); + + if (spage < epage) + for (page = spage; page <= epage; page++) + drawpage(xref, page); + else + for (page = spage; page >= epage; page--) + drawpage(xref, page); + + spec = fz_strsep(&range, ","); + } +} + +int main(int argc, char **argv) +{ + char *password = ""; + int grayscale = 0; + int accelerate = 1; + pdf_xref *xref; + fz_error error; + int c; + + while ((c = fz_getopt(argc, argv, "o:p:r:R:Aab:dgmtx5G:I")) != -1) + { + switch (c) + { + case 'o': output = fz_optarg; break; + case 'p': password = fz_optarg; break; + case 'r': resolution = atof(fz_optarg); break; + case 'R': rotation = atof(fz_optarg); break; + case 'A': accelerate = 0; break; + case 'a': savealpha = 1; break; + case 'b': alphabits = atoi(fz_optarg); break; + case 'm': showtime++; break; + case 't': showtext++; break; + case 'x': showxml++; break; + case '5': showmd5++; break; + case 'g': grayscale++; break; + case 'd': uselist = 0; break; + case 'G': gamma_value = atof(fz_optarg); break; + case 'I': invert++; break; + default: usage(); break; + } + } + + fz_set_aa_level(alphabits); + + if (fz_optind == argc) + usage(); + + if (!showtext && !showxml && !showtime && !showmd5 && !output) + { + printf("nothing to do\n"); + exit(0); + } + + if (accelerate) + fz_accelerate(); + + glyphcache = fz_new_glyph_cache(); + + colorspace = fz_device_rgb; + if (grayscale) + colorspace = fz_device_gray; + if (output && strstr(output, ".pgm")) + colorspace = fz_device_gray; + if (output && strstr(output, ".ppm")) + colorspace = fz_device_rgb; + if (output && strstr(output, ".pbm")) + colorspace = fz_device_gray; + + timing.count = 0; + timing.total = 0; + timing.min = 1 << 30; + timing.max = 0; + timing.minpage = 0; + timing.maxpage = 0; + + if (showxml) + printf("\n"); + + while (fz_optind < argc) + { + filename = argv[fz_optind++]; + + error = pdf_open_xref(&xref, filename, password); + if (error) + die(fz_rethrow(error, "cannot open document: %s", filename)); + + error = pdf_load_page_tree(xref); + if (error) + die(fz_rethrow(error, "cannot load page tree: %s", filename)); + + if (showxml) + printf("\n", filename); + + if (fz_optind == argc || !isrange(argv[fz_optind])) + drawrange(xref, "1-"); + if (fz_optind < argc && isrange(argv[fz_optind])) + drawrange(xref, argv[fz_optind++]); + + if (showxml) + printf("\n"); + + pdf_free_xref(xref); + } + + if (showtime) + { + printf("total %dms / %d pages for an average of %dms\n", + timing.total, timing.count, timing.total / timing.count); + printf("fastest page %d: %dms\n", timing.minpage, timing.min); + printf("slowest page %d: %dms\n", timing.maxpage, timing.max); + } + + fz_free_glyph_cache(glyphcache); + + fz_flush_warnings(); + + return 0; +} diff --git a/contrib/media/updf/apps/pdfextract.c b/contrib/media/updf/apps/pdfextract.c new file mode 100644 index 0000000000..7e6e4ace46 --- /dev/null +++ b/contrib/media/updf/apps/pdfextract.c @@ -0,0 +1,222 @@ +/* + * pdfextract -- the ultimate way to extract images and fonts from pdfs + */ + +#include "fitz.h" +#include "mupdf.h" + +static pdf_xref *xref = NULL; +static int dorgb = 0; + +void die(fz_error error) +{ + fz_catch(error, "aborting"); + if (xref) + pdf_free_xref(xref); + exit(1); +} + +static void usage(void) +{ + fprintf(stderr, "usage: pdfextract [options] file.pdf [object numbers]\n"); + fprintf(stderr, "\t-p\tpassword\n"); + fprintf(stderr, "\t-r\tconvert images to rgb\n"); + exit(1); +} + +static int isimage(fz_obj *obj) +{ + fz_obj *type = fz_dict_gets(obj, "Subtype"); + return fz_is_name(type) && !strcmp(fz_to_name(type), "Image"); +} + +static int isfontdesc(fz_obj *obj) +{ + fz_obj *type = fz_dict_gets(obj, "Type"); + return fz_is_name(type) && !strcmp(fz_to_name(type), "FontDescriptor"); +} + +static void saveimage(int num) +{ + fz_error error; + fz_pixmap *img; + fz_obj *ref; + char name[1024]; + + ref = fz_new_indirect(num, 0, xref); + + /* TODO: detect DCTD and save as jpeg */ + + error = pdf_load_image(&img, xref, ref); + if (error) + die(error); + + if (dorgb && img->colorspace && img->colorspace != fz_device_rgb) + { + fz_pixmap *temp; + temp = fz_new_pixmap_with_rect(fz_device_rgb, fz_bound_pixmap(img)); + fz_convert_pixmap(img, temp); + fz_drop_pixmap(img); + img = temp; + } + + if (img->n <= 4) + { + sprintf(name, "img-%04d.png", num); + printf("extracting image %s\n", name); + fz_write_png(img, name, 0); + } + else + { + sprintf(name, "img-%04d.pam", num); + printf("extracting image %s\n", name); + fz_write_pam(img, name, 0); + } + + fz_drop_pixmap(img); + fz_drop_obj(ref); +} + +static void savefont(fz_obj *dict, int num) +{ + fz_error error; + char name[1024]; + char *subtype; + fz_buffer *buf; + fz_obj *stream = NULL; + fz_obj *obj; + char *ext = ""; + FILE *f; + char *fontname = "font"; + int n; + + obj = fz_dict_gets(dict, "FontName"); + if (obj) + fontname = fz_to_name(obj); + + obj = fz_dict_gets(dict, "FontFile"); + if (obj) + { + stream = obj; + ext = "pfa"; + } + + obj = fz_dict_gets(dict, "FontFile2"); + if (obj) + { + stream = obj; + ext = "ttf"; + } + + obj = fz_dict_gets(dict, "FontFile3"); + if (obj) + { + stream = obj; + + obj = fz_dict_gets(obj, "Subtype"); + if (obj && !fz_is_name(obj)) + die(fz_throw("Invalid font descriptor subtype")); + + subtype = fz_to_name(obj); + if (!strcmp(subtype, "Type1C")) + ext = "cff"; + else if (!strcmp(subtype, "CIDFontType0C")) + ext = "cid"; + else + die(fz_throw("Unhandled font type '%s'", subtype)); + } + + if (!stream) + { + fz_warn("Unhandled font type"); + return; + } + + buf = fz_new_buffer(0); + + error = pdf_load_stream(&buf, xref, fz_to_num(stream), fz_to_gen(stream)); + if (error) + die(error); + + sprintf(name, "%s-%04d.%s", fontname, num, ext); + printf("extracting font %s\n", name); + + f = fopen(name, "wb"); + if (f == NULL) + die(fz_throw("Error creating font file")); + + n = fwrite(buf->data, 1, buf->len, f); + if (n < buf->len) + die(fz_throw("Error writing font file")); + + if (fclose(f) < 0) + die(fz_throw("Error closing font file")); + + fz_drop_buffer(buf); +} + +static void showobject(int num) +{ + fz_error error; + fz_obj *obj; + + if (!xref) + die(fz_throw("no file specified")); + + error = pdf_load_object(&obj, xref, num, 0); + if (error) + die(error); + + if (isimage(obj)) + saveimage(num); + else if (isfontdesc(obj)) + savefont(obj, num); + + fz_drop_obj(obj); +} + +int main(int argc, char **argv) +{ + fz_error error; + char *infile; + char *password = ""; + int c, o; + + while ((c = fz_getopt(argc, argv, "p:r")) != -1) + { + switch (c) + { + case 'p': password = fz_optarg; break; + case 'r': dorgb++; break; + default: usage(); break; + } + } + + if (fz_optind == argc) + usage(); + + infile = argv[fz_optind++]; + error = pdf_open_xref(&xref, infile, password); + if (error) + die(fz_rethrow(error, "cannot open input file '%s'", infile)); + + if (fz_optind == argc) + { + for (o = 0; o < xref->len; o++) + showobject(o); + } + else + { + while (fz_optind < argc) + { + showobject(atoi(argv[fz_optind])); + fz_optind++; + } + } + + pdf_free_xref(xref); + + fz_flush_warnings(); + + return 0; +} diff --git a/contrib/media/updf/build.zip b/contrib/media/updf/build.zip new file mode 100644 index 0000000000..cb981536be Binary files /dev/null and b/contrib/media/updf/build.zip differ diff --git a/contrib/media/updf/build2.sh b/contrib/media/updf/build2.sh new file mode 100755 index 0000000000..8127df1527 --- /dev/null +++ b/contrib/media/updf/build2.sh @@ -0,0 +1,7 @@ +#!/bin/bash +rm mupdf +rm -rf build +make -f Makefile_2 +mv build/mupdf ./ +objcopy mupdf -O binary +sleep 10 diff --git a/contrib/media/updf/cmaps/README b/contrib/media/updf/cmaps/README new file mode 100644 index 0000000000..fb352e929c --- /dev/null +++ b/contrib/media/updf/cmaps/README @@ -0,0 +1,6 @@ +These resources are from Adobe and are covered by their +own copyright and license. + +http://opensource.adobe.com/wiki/display/cmap/CMap+Resources +http://opensource.adobe.com/wiki/display/pdfmapping/Mapping+Resources+for+PDF + diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-0 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-0 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-0 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-1 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-1 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-1 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-2 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-3 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-3 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-3 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-4 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-4 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-4 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-5 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-5 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-5 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-6 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-6 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-6 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/Adobe-CNS1-UCS2 b/contrib/media/updf/cmaps/cns/Adobe-CNS1-UCS2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/Adobe-CNS1-UCS2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/B5-H b/contrib/media/updf/cmaps/cns/B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/B5-V b/contrib/media/updf/cmaps/cns/B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/B5pc-H b/contrib/media/updf/cmaps/cns/B5pc-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/B5pc-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/B5pc-V b/contrib/media/updf/cmaps/cns/B5pc-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/B5pc-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS-EUC-H b/contrib/media/updf/cmaps/cns/CNS-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS-EUC-V b/contrib/media/updf/cmaps/cns/CNS-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS1-H b/contrib/media/updf/cmaps/cns/CNS1-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS1-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS1-V b/contrib/media/updf/cmaps/cns/CNS1-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS1-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS2-H b/contrib/media/updf/cmaps/cns/CNS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/CNS2-V b/contrib/media/updf/cmaps/cns/CNS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/CNS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETHK-B5-H b/contrib/media/updf/cmaps/cns/ETHK-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETHK-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETHK-B5-V b/contrib/media/updf/cmaps/cns/ETHK-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETHK-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETen-B5-H b/contrib/media/updf/cmaps/cns/ETen-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETen-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETen-B5-V b/contrib/media/updf/cmaps/cns/ETen-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETen-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETenms-B5-H b/contrib/media/updf/cmaps/cns/ETenms-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETenms-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/ETenms-B5-V b/contrib/media/updf/cmaps/cns/ETenms-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/ETenms-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKdla-B5-H b/contrib/media/updf/cmaps/cns/HKdla-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKdla-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKdla-B5-V b/contrib/media/updf/cmaps/cns/HKdla-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKdla-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKdlb-B5-H b/contrib/media/updf/cmaps/cns/HKdlb-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKdlb-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKdlb-B5-V b/contrib/media/updf/cmaps/cns/HKdlb-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKdlb-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKgccs-B5-H b/contrib/media/updf/cmaps/cns/HKgccs-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKgccs-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKgccs-B5-V b/contrib/media/updf/cmaps/cns/HKgccs-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKgccs-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKm314-B5-H b/contrib/media/updf/cmaps/cns/HKm314-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKm314-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKm314-B5-V b/contrib/media/updf/cmaps/cns/HKm314-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKm314-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKm471-B5-H b/contrib/media/updf/cmaps/cns/HKm471-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKm471-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKm471-B5-V b/contrib/media/updf/cmaps/cns/HKm471-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKm471-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKscs-B5-H b/contrib/media/updf/cmaps/cns/HKscs-B5-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKscs-B5-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/HKscs-B5-V b/contrib/media/updf/cmaps/cns/HKscs-B5-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/HKscs-B5-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/UniCNS-UCS2-H b/contrib/media/updf/cmaps/cns/UniCNS-UCS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/UniCNS-UCS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/UniCNS-UCS2-V b/contrib/media/updf/cmaps/cns/UniCNS-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/UniCNS-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/UniCNS-UTF16-H b/contrib/media/updf/cmaps/cns/UniCNS-UTF16-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/UniCNS-UTF16-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/cns/UniCNS-UTF16-V b/contrib/media/updf/cmaps/cns/UniCNS-UTF16-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/cns/UniCNS-UTF16-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-0 b/contrib/media/updf/cmaps/gb/Adobe-GB1-0 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-0 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-1 b/contrib/media/updf/cmaps/gb/Adobe-GB1-1 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-1 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-2 b/contrib/media/updf/cmaps/gb/Adobe-GB1-2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-3 b/contrib/media/updf/cmaps/gb/Adobe-GB1-3 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-3 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-4 b/contrib/media/updf/cmaps/gb/Adobe-GB1-4 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-4 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-5 b/contrib/media/updf/cmaps/gb/Adobe-GB1-5 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-5 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/Adobe-GB1-UCS2 b/contrib/media/updf/cmaps/gb/Adobe-GB1-UCS2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/Adobe-GB1-UCS2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GB-EUC-H b/contrib/media/updf/cmaps/gb/GB-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GB-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GB-EUC-V b/contrib/media/updf/cmaps/gb/GB-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GB-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GB-H b/contrib/media/updf/cmaps/gb/GB-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GB-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GB-V b/contrib/media/updf/cmaps/gb/GB-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GB-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBK-EUC-H b/contrib/media/updf/cmaps/gb/GBK-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBK-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBK-EUC-V b/contrib/media/updf/cmaps/gb/GBK-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBK-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBK2K-H b/contrib/media/updf/cmaps/gb/GBK2K-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBK2K-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBK2K-V b/contrib/media/updf/cmaps/gb/GBK2K-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBK2K-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBKp-EUC-H b/contrib/media/updf/cmaps/gb/GBKp-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBKp-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBKp-EUC-V b/contrib/media/updf/cmaps/gb/GBKp-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBKp-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBT-EUC-H b/contrib/media/updf/cmaps/gb/GBT-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBT-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBT-EUC-V b/contrib/media/updf/cmaps/gb/GBT-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBT-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBT-H b/contrib/media/updf/cmaps/gb/GBT-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBT-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBT-V b/contrib/media/updf/cmaps/gb/GBT-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBT-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBTpc-EUC-H b/contrib/media/updf/cmaps/gb/GBTpc-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBTpc-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBTpc-EUC-V b/contrib/media/updf/cmaps/gb/GBTpc-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBTpc-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBpc-EUC-H b/contrib/media/updf/cmaps/gb/GBpc-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBpc-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/GBpc-EUC-V b/contrib/media/updf/cmaps/gb/GBpc-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/GBpc-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/UniGB-UCS2-H b/contrib/media/updf/cmaps/gb/UniGB-UCS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/UniGB-UCS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/UniGB-UCS2-V b/contrib/media/updf/cmaps/gb/UniGB-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/UniGB-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/UniGB-UTF16-H b/contrib/media/updf/cmaps/gb/UniGB-UTF16-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/UniGB-UTF16-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/gb/UniGB-UTF16-V b/contrib/media/updf/cmaps/gb/UniGB-UTF16-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/gb/UniGB-UTF16-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-EUC-H b/contrib/media/updf/cmaps/japan/78-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-EUC-V b/contrib/media/updf/cmaps/japan/78-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-H b/contrib/media/updf/cmaps/japan/78-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-RKSJ-H b/contrib/media/updf/cmaps/japan/78-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-RKSJ-V b/contrib/media/updf/cmaps/japan/78-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78-V b/contrib/media/updf/cmaps/japan/78-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78ms-RKSJ-H b/contrib/media/updf/cmaps/japan/78ms-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78ms-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/78ms-RKSJ-V b/contrib/media/updf/cmaps/japan/78ms-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/78ms-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/83pv-RKSJ-H b/contrib/media/updf/cmaps/japan/83pv-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/83pv-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90ms-RKSJ-H b/contrib/media/updf/cmaps/japan/90ms-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90ms-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90ms-RKSJ-V b/contrib/media/updf/cmaps/japan/90ms-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90ms-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90msp-RKSJ-H b/contrib/media/updf/cmaps/japan/90msp-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90msp-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90msp-RKSJ-V b/contrib/media/updf/cmaps/japan/90msp-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90msp-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90pv-RKSJ-H b/contrib/media/updf/cmaps/japan/90pv-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90pv-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/90pv-RKSJ-V b/contrib/media/updf/cmaps/japan/90pv-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/90pv-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Add-H b/contrib/media/updf/cmaps/japan/Add-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Add-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Add-RKSJ-H b/contrib/media/updf/cmaps/japan/Add-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Add-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Add-RKSJ-V b/contrib/media/updf/cmaps/japan/Add-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Add-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Add-V b/contrib/media/updf/cmaps/japan/Add-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Add-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-0 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-0 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-0 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-1 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-1 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-1 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-2 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-3 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-3 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-3 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-4 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-4 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-4 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-5 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-5 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-5 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-6 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-6 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-6 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan1-UCS2 b/contrib/media/updf/cmaps/japan/Adobe-Japan1-UCS2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan1-UCS2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Adobe-Japan2-0 b/contrib/media/updf/cmaps/japan/Adobe-Japan2-0 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Adobe-Japan2-0 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/EUC-H b/contrib/media/updf/cmaps/japan/EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/EUC-V b/contrib/media/updf/cmaps/japan/EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Ext-H b/contrib/media/updf/cmaps/japan/Ext-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Ext-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Ext-RKSJ-H b/contrib/media/updf/cmaps/japan/Ext-RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Ext-RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Ext-RKSJ-V b/contrib/media/updf/cmaps/japan/Ext-RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Ext-RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Ext-V b/contrib/media/updf/cmaps/japan/Ext-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Ext-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/H b/contrib/media/updf/cmaps/japan/H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hankaku b/contrib/media/updf/cmaps/japan/Hankaku new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hankaku @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hiragana b/contrib/media/updf/cmaps/japan/Hiragana new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hiragana @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hojo-EUC-H b/contrib/media/updf/cmaps/japan/Hojo-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hojo-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hojo-EUC-V b/contrib/media/updf/cmaps/japan/Hojo-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hojo-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hojo-H b/contrib/media/updf/cmaps/japan/Hojo-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hojo-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Hojo-V b/contrib/media/updf/cmaps/japan/Hojo-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Hojo-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Katakana b/contrib/media/updf/cmaps/japan/Katakana new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Katakana @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/NWP-H b/contrib/media/updf/cmaps/japan/NWP-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/NWP-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/NWP-V b/contrib/media/updf/cmaps/japan/NWP-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/NWP-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/RKSJ-H b/contrib/media/updf/cmaps/japan/RKSJ-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/RKSJ-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/RKSJ-V b/contrib/media/updf/cmaps/japan/RKSJ-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/RKSJ-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/Roman b/contrib/media/updf/cmaps/japan/Roman new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/Roman @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniHojo-UCS2-H b/contrib/media/updf/cmaps/japan/UniHojo-UCS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniHojo-UCS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniHojo-UCS2-V b/contrib/media/updf/cmaps/japan/UniHojo-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniHojo-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniHojo-UTF16-H b/contrib/media/updf/cmaps/japan/UniHojo-UTF16-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniHojo-UTF16-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniHojo-UTF16-V b/contrib/media/updf/cmaps/japan/UniHojo-UTF16-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniHojo-UTF16-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UCS2-H b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-H b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-V b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-HW-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UCS2-V b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UTF16-H b/contrib/media/updf/cmaps/japan/UniJIS-UTF16-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UTF16-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJIS-UTF16-V b/contrib/media/updf/cmaps/japan/UniJIS-UTF16-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJIS-UTF16-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-HW-V b/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-HW-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-HW-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-V b/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/UniJISPro-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/V b/contrib/media/updf/cmaps/japan/V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/japan/WP-Symbol b/contrib/media/updf/cmaps/japan/WP-Symbol new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/japan/WP-Symbol @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/Adobe-Korea1-0 b/contrib/media/updf/cmaps/korea/Adobe-Korea1-0 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/Adobe-Korea1-0 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/Adobe-Korea1-1 b/contrib/media/updf/cmaps/korea/Adobe-Korea1-1 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/Adobe-Korea1-1 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/Adobe-Korea1-2 b/contrib/media/updf/cmaps/korea/Adobe-Korea1-2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/Adobe-Korea1-2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/Adobe-Korea1-UCS2 b/contrib/media/updf/cmaps/korea/Adobe-Korea1-UCS2 new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/Adobe-Korea1-UCS2 @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-EUC-H b/contrib/media/updf/cmaps/korea/KSC-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-EUC-V b/contrib/media/updf/cmaps/korea/KSC-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-H b/contrib/media/updf/cmaps/korea/KSC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-Johab-H b/contrib/media/updf/cmaps/korea/KSC-Johab-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-Johab-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-Johab-V b/contrib/media/updf/cmaps/korea/KSC-Johab-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-Johab-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSC-V b/contrib/media/updf/cmaps/korea/KSC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCms-UHC-H b/contrib/media/updf/cmaps/korea/KSCms-UHC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCms-UHC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-H b/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-V b/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCms-UHC-HW-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCms-UHC-V b/contrib/media/updf/cmaps/korea/KSCms-UHC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCms-UHC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCpc-EUC-H b/contrib/media/updf/cmaps/korea/KSCpc-EUC-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCpc-EUC-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/KSCpc-EUC-V b/contrib/media/updf/cmaps/korea/KSCpc-EUC-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/KSCpc-EUC-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/UniKS-UCS2-H b/contrib/media/updf/cmaps/korea/UniKS-UCS2-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/UniKS-UCS2-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/UniKS-UCS2-V b/contrib/media/updf/cmaps/korea/UniKS-UCS2-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/UniKS-UCS2-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/UniKS-UTF16-H b/contrib/media/updf/cmaps/korea/UniKS-UTF16-H new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/UniKS-UTF16-H @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/cmaps/korea/UniKS-UTF16-V b/contrib/media/updf/cmaps/korea/UniKS-UTF16-V new file mode 100644 index 0000000000..80d7f7859a --- /dev/null +++ b/contrib/media/updf/cmaps/korea/UniKS-UTF16-V @@ -0,0 +1,90 @@ +%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%DocumentNeededResources: CMap (B5-H) +%%IncludeResource: ProcSet (CIDInit) +%%IncludeResource: CMap (B5-H) +%%BeginResource: CMap (B5-V) +%%Title: (B5-V Adobe CNS1 0) +%%Version: 10.003 +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- +%%EndComments + +/CIDInit /ProcSet findresource begin + +12 dict begin + +begincmap + +/B5-H usecmap + +/CIDSystemInfo 3 dict dup begin + /Registry (Adobe) def + /Ordering (CNS1) def + /Supplement 0 def +end def + +/CMapName /B5-V def +/CMapVersion 10.003 def +/CMapType 1 def + +/UIDOffset 910 def +/XUID [1 10 25381] def + +/WMode 1 def + +12 begincidrange + 13646 + 13743 + 13745 + 130 + 134 + 138 + 142 + 146 + 150 + 154 + 158 + 13647 +endcidrange +endcmap +CMapName currentdict /CMap defineresource pop +end +end + +%%EndResource +%%EOF diff --git a/contrib/media/updf/draw/arch_arm.c b/contrib/media/updf/draw/arch_arm.c new file mode 100644 index 0000000000..55016a8bd2 --- /dev/null +++ b/contrib/media/updf/draw/arch_arm.c @@ -0,0 +1,232 @@ +/* + * ARM specific render optims live here + */ + +#include "fitz.h" + +typedef unsigned char byte; + +/* always surround cpu specific code with HAVE_XXX */ +#ifdef ARCH_ARM + +/* from imagescalearm.s */ +extern void fz_srow4_arm(byte *src, byte *dst, int w, int denom); +extern void fz_scol4_arm(byte *src, byte *dst, int w, int denom); + +static void +path_w4i1o4_arm(byte * restrict rgba, byte * restrict src, byte cov, int len, byte * restrict dst) +{ + /* The ARM code here is a hand coded implementation of the optimized C version. */ + + if (len <= 0) + return; + + asm volatile( + "ldr %0, [%0] @ %0 = rgba \n" + "mov r11,#0 \n" + "mov r8, #0xFF00 \n" + "mov r14,%0,lsr #24 @ r14= alpha \n" + "orr %0, %0, #0xFF000000 @ %0 = rgba |= 0xFF000000 \n" + "orr r8, r8, r8, LSL #16 @ r8 = 0xFF00FF00 \n" + "adds r14,r14,r14,LSR #7 @ r14 = alpha += alpha>>7 \n" + "beq 9f @ if (alpha == 0) bale \n" + "and r6, %0, r8 @ r6 = ga<<8 \n" + "bic %0, %0, r8 @ %0 = rb \n" + "mov r6, r6, LSR #8 @ r6 = ga \n" + "cmp r14,#256 @ if (alpha == 256) \n" + "beq 4f @ no-alpha loop \n" + "B 2f @ enter the loop \n" + "1: @ Loop used for when coverage*alpha == 0 \n" + "subs %3, %3, #1 @ len-- \n" + "ble 9f \n" + "2: \n" + "ldrb r12,[%1] @ r12= *src \n" + "ldr r9, [%4], #4 @ r9 = drb = *dst32++ \n" + "strb r11,[%1], #1 @ r11= *src++ = 0 \n" + "add %2, r12, %2 @ %2 = cov += r12 \n" + "ands %2, %2, #255 @ %2 = cov &= 255 \n" + "beq 1b @ if coverage == 0 loop back \n" + "add r10,%2, %2, LSR #7 @ r10= ca = cov+(cov>>7) \n" + "mul r10,r14,r10 @ r10= ca *= alpha \n" + "and r7, r8, r9 @ r7 = dga = drb & MASK \n" + "mov r10,r10,LSR #8 @ r10= ca >>= 8 \n" + "and r9, r8, r9, LSL #8 @ r9 = drb = (drb<<8) & MASK \n" + "sub r12,r6, r7, LSR #8 @ r12= cga = ga - (dga>>8) \n" + "sub r5, %0, r9, LSR #8 @ r5 = crb = rb - (drb>>8) \n" + "mla r7, r12,r10,r7 @ r7 = dga += cga * ca \n" + "subs %3, %3, #1 @ len-- \n" + "mla r9, r5, r10,r9 @ r9 = drb += crb * ca \n" + "and r7, r8, r7 @ r7 = dga &= MASK \n" + "and r9, r8, r9 @ r9 = drb &= MASK \n" + "orr r9, r7, r9, LSR #8 @ r9 = drb = dga | (drb>>8) \n" + "str r9, [%4, #-4] @ dst32[-1] = r9 \n" + "bgt 2b \n" + "b 9f \n" + "@ --- Solid alpha loop --------------------------------------- \n" + "3: @ Loop used when coverage == 256 \n" + "orr r9, %0, r6, LSL #8 @ r9 = rgba \n" + "str r9, [%4, #-4] @ dst32[-1] = r9 \n" + "4: @ Loop used for when coverage*alpha == 0 \n" + "subs %3, %3, #1 @ len-- \n" + "ble 9f \n" + "5: \n" + "ldrb r12,[%1] @ r12= *src \n" + "ldr r9, [%4], #4 @ r9 = drb = *dst32++ \n" + "strb r11,[%1], #1 @ r11= *src++ = 0 \n" + "add %2, r12, %2 @ %2 = cov += r12 \n" + "ands %2, %2, #255 @ %2 = cov &= 255 \n" + "beq 4b @ if coverage == 0 loop back \n" + "cmp %2, #255 @ if coverage == solid \n" + "beq 3b @ loop back \n" + "add r10,%2, %2, LSR #7 @ r10= ca = cov+(cov>>7) \n" + "and r7, r8, r9 @ r7 = dga = drb & MASK \n" + "and r9, r8, r9, LSL #8 @ r9 = dga = (drb<<8) & MASK \n" + "sub r12,r6, r7, LSR #8 @ r12= cga = ga - (dga>>8) \n" + "sub r5, %0, r9, LSR #8 @ r5 = crb = rb - (drb>>8) \n" + "mla r7, r12,r10,r7 @ r7 = dga += cga * ca \n" + "subs %3, %3, #1 @ len-- \n" + "mla r9, r5, r10,r9 @ r9 = drb += crb * ca \n" + "and r7, r8, r7 @ r7 = dga &= MASK \n" + "and r9, r8, r9 @ r9 = drb &= MASK \n" + "orr r9, r7, r9, LSR #8 @ r9 = drb = dga | (drb>>8) \n" + "str r9, [%4, #-4] @ dst32[-1] = r9 \n" + "bgt 5b \n" + "9: @ End \n" + : + "+r" (rgba), + "+r" (src), + "+r" (cov), + "+r" (len), + "+r" (dst) + : + : + "r5","r6","r7","r8","r9","r10","r11","r12","r14","memory","cc" + ); +} + +static void load_tile8_arm(byte * restrict src, int sw, byte * restrict dst, int dw, int w, int h, int pad) +{ + if ((h == 0) || (w == 0)) + return; + + switch (pad) + { + case 0: + while (h--) + { + memcpy(dst, src, w); + src += sw; + dst += dw; + } + break; + + case 1: + sw -= w; + dw -= w<<1; + asm volatile( + "MOV r11,#255 \n" + "1: \n" + "MOV r5, %[w] @ r5 = x = w \n" + "2: \n" + "LDRB r4, [%[src]], #1 @ r4 = *src++ \n" + "SUBS r5, r5, #1 \n" + "STRB r4, [%[dst]], #1 @ *dst++ = r4 \n" + "STRB r11,[%[dst]], #1 @ *dst++ = 255 \n" + "BGT 2b \n" + "ADD %[src],%[src],%[sw] @ src += sw \n" + "ADD %[dst],%[dst],%[dw] @ dst += dw \n" + "SUBS %[h],%[h],#1 \n" + "BGT 1b \n" + : + [src] "+r" (src), + [sw] "+r" (sw), + [dst] "+r" (dst), + [dw] "+r" (dw), + [h] "+r" (h), + [w] "+r" (w) + : + : + "r4","r5","r11","memory","cc" + ); + break; + + case 3: + sw -= w; + asm volatile( + "MOV r11,#255 \n" + "1: \n" + "MOV r5, %[w] @ r5 = x = w \n" + "MOV r8, %[dst] @ r8 = dp = dst \n" + "2: \n" + "LDRB r4, [%[src]], #1 @ r4 = *src++ \n" + "LDRB r6, [%[src]], #1 @ r6 = *src++ \n" + "LDRB r7, [%[src]], #1 @ r7 = *src++ \n" + "SUBS r5, r5, #3 \n" + "STRB r4, [r8], #1 @ *dp++ = r4 \n" + "STRB r6, [r8], #1 @ *dp++ = r6 \n" + "STRB r7, [r8], #1 @ *dp++ = r7 \n" + "STRB r11,[r8], #1 @ *dp++ = 255 \n" + "BGT 2b \n" + "ADD %[src],%[src],%[sw] @ src += sw \n" + "ADD %[dst],%[dst],%[dw] @ dst += dw \n" + "SUBS %[h],%[h],#1 \n" + "BGT 1b \n" + : + [src] "+r" (src), + [sw] "+r" (sw), + [dst] "+r" (dst), + [dw] "+r" (dw), + [h] "+r" (h), + [w] "+r" (w) + : + : + "r4","r5","r6","r7","r8","r11","memory","cc" + ); + break; + + default: + sw -= w; + asm volatile( + "mov r9,#255 \n" + "1: \n" + "mov r7, %[dst] @ r7 = dp = dst \n" + "mov r8, #1 @ r8 = tpad = 1 \n" + "mov r14,%[w] @ r11= x = w \n" + "2: \n" + "ldrb r10,[%[src]],#1 \n" + "subs r8, r8, #1 \n" + "moveq r8, %[pad] \n" + "streqb r9, [r7], #1 \n" + "strb r10,[r7], #1 \n" + "subs r14,r14, #1 \n" + "bgt 2b \n" + "add %[src],%[src],%[sw] \n" + "add %[dst],%[dst],%[dw] \n" + "subs %[h], %[h], #1 \n" + "bgt 1b \n" + : + [src] "+r" (src), + [sw] "+r" (sw), + [dst] "+r" (dst), + [dw] "+r" (dw), + [h] "+r" (h), + [w] "+r" (w), + [pad] "+r" (pad) + : + : + "r7","r8","r9","r10","r14","memory","cc" + ); + break; + } +} + +void +fz_accelerate_arch(void) +{ + fz_path_w4i1o4 = path_w4i1o4_arm; + fz_loadtile8 = load_tile8_arm; + fz_srow4 = fz_srow4_arm; + fz_scol4 = fz_scol4_arm; +} + +#endif diff --git a/contrib/media/updf/draw/arch_port.c b/contrib/media/updf/draw/arch_port.c new file mode 100644 index 0000000000..fa5890b5f1 --- /dev/null +++ b/contrib/media/updf/draw/arch_port.c @@ -0,0 +1,486 @@ +#include "fitz.h" + +typedef unsigned char byte; + +/* These C implementations use SWAR (SIMD-within-a-register) techniques. */ + +#if 0 /* TODO: move into porterduff.c functions */ + +#define MASK 0xFF00FF00; + +static void +path_w4i1o4_32bit(byte *rgba, + byte * restrict src, byte cov, int len, byte * restrict dst) +{ + /* COLOR * coverage + DST * (256-coverage) = (COLOR - DST)*coverage + DST*256 */ + unsigned int *dst32 = (unsigned int *)(void *)dst; + int alpha = rgba[3]; + unsigned int rb = rgba[0] | (rgba[2] << 16); + unsigned int ga = rgba[1] | 0xFF0000; + + if (alpha == 0) + return; + + if (alpha != 255) + { + alpha += alpha>>7; /* alpha is now in the 0...256 range */ + while (len--) + { + unsigned int ca, drb, dga, crb, cga; + cov += *src; *src++ = 0; + ca = cov + (cov>>7); /* ca is in 0...256 range */ + ca = (ca*alpha)>>8; /* ca is is in 0...256 range */ + drb = *dst32++; + if (ca != 0) + { + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga | (drb>>8); + dst32[-1] = drb; + } + } + } + else + { + while (len--) + { + unsigned int ca, drb, dga, crb, cga; + cov += *src; *src++ = 0; + ca = cov + (cov>>7); /* ca is in 0...256 range */ + drb = *dst32++; + if (ca == 0) + continue; + if (ca == 255) + { + drb = (ga<<8) | rb; + } + else + { + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga |(drb>>8); + } + dst32[-1] = drb; + } + } +} + +static void +text_w4i1o4_32bit(byte *rgba, + byte * restrict src, int srcw, + byte * restrict dst, int dstw, int w0, int h) +{ + unsigned int *dst32 = (unsigned int *)(void *)dst; + unsigned int alpha = rgba[3]; + unsigned int rb = rgba[0] | (rgba[2] << 16); + unsigned int ga = rgba[1] | 0xFF0000; + + if (alpha == 0) + return; + + srcw -= w0; + dstw = (dstw>>2)-w0; + + if (alpha != 255) + { + alpha += alpha>>7; /* alpha is now in the 0...256 range */ + while (h--) + { + int w = w0; + while (w--) + { + unsigned int ca, drb, dga, crb, cga; + ca = *src++; + drb = *dst32++; + ca += ca>>7; + ca = (ca*alpha)>>8; + if (ca == 0) + continue; + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga | (drb>>8); + dst32[-1] = drb; + } + src += srcw; + dst32 += dstw; + } + } + else + { + while (h--) + { + int w = w0; + while (w--) + { + unsigned int ca, drb, dga, crb, cga; + ca = *src++; + drb = *dst32++; + ca += ca>>7; + if (ca == 0) + continue; + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga | (drb>>8); + dst32[-1] = drb; + } + src += srcw; + dst32 += dstw; + } + } +} + +static void +img_4o4_32bit(byte * restrict src, byte cov, int len, byte * restrict dst, + fz_pixmap *image, int u, int v, int fa, int fb) +{ + unsigned int *dst32 = (unsigned int *)(void *)dst; + unsigned int *samples = (unsigned int *)(void *)image->samples; + int w = image->w; + int h = image->h-1; + + while (len--) + { + unsigned int a, a1, d, d1; + int sa; + cov += *src; *src = 0; src++; + /* (a,a1) = sampleargb(samples, w, h, u, v, argb); */ + { + int ui, ui1, vi, vi1, ud, vd; + unsigned int b, b1, c, c1; + ui1 = 1; + ui = u >> 16; + if (ui < 0) + { + ui = 0; + ui1 = 0; + } + else if (ui >= w-1) + { + ui = w-1; + ui1 = 0; + } + vi1 = w; + vi = v >> 16; + if (vi < 0) + { + vi = 0; + vi1 = 0; + } + else if (vi >= h) + { + vi = h; + vi1 = 0; + } + ui += vi*w; + a = samples[ui]; + b = samples[ui + ui1]; + c = samples[ui + vi1]; + d = samples[ui + ui1 + vi1]; + ud = (u>>8) & 0xFF; + vd = (v>>8) & 0xFF; + ud = FZ_EXPAND(ud); + vd = FZ_EXPAND(vd); + /* (a,a1) = blend(a,b,ud) */ + a1 = a & MASK; + a = (a<<8) & MASK; + b1 = (b>>8) & ~MASK; + b = b & ~MASK; + a = ((b -(a >>8)) * ud + a ) & MASK; + a1 = ((b1-(a1>>8)) * ud + a1) & MASK; + /* (c,c1) = blend(c,d,ud) */ + c1 = c & MASK; + c = (c<<8) & MASK; + d1 = (d>>8) & ~MASK; + d = d & ~MASK; + c = ((d -(c >>8)) * ud + c ) & MASK; + c1 = ((d1-(c1>>8)) * ud + c1) & MASK; + /* (a,a1) = blend((a,a1),(c,c1),vd) */ + a = (((c >>8)-(a >>8)) * vd + a ) & MASK; + a1 = (((c1>>8)-(a1>>8)) * vd + a1) & MASK; + } + sa = (a1>>24); + sa = FZ_COMBINE(FZ_EXPAND(sa), FZ_EXPAND(cov)); + a1 |= 0xFF000000; + d = *dst32++; + d1 = d & MASK; + d = (d<<8) & MASK; + a = (((a >>8)-(d >>8)) * sa + d ) & MASK; + a1 = (((a1>>8)-(d1>>8)) * sa + d1) & MASK; + dst32[-1] = (a>>8) | a1; + u += fa; + v += fb; + } +} + +static void +img_w4i1o4_32bit(byte *rgba, byte * restrict src, byte cov, int len, + byte * restrict dst, fz_pixmap *image, int u, int v, int fa, int fb) +{ + byte *samples = image->samples; + int w = image->w; + int h = image->h-1; + int alpha = FZ_EXPAND(rgba[3]); + unsigned int rb = rgba[0] | (rgba[2] << 16); + unsigned int ga = rgba[1] | 0xFF0000; + unsigned int *dst32 = (unsigned int *)(void *)dst; + + if (alpha == 0) + return; + if (alpha != 256) + { + while (len--) + { + unsigned int ca, drb, dga, crb, cga; + unsigned int a, b; + cov += *src; *src = 0; src++; + drb = *dst32++; + ca = FZ_COMBINE(FZ_EXPAND(cov), alpha); + if (ca != 0) + { + int ui, ui1, vi, vi1, ud, vd; + /* a = samplemask(samples, w, h, u, v); */ + ui1 = 1; + ui = u >> 16; + if (ui < 0) + { + ui = 0; + ui1 = 0; + } + else if (ui >= w-1) + { + ui = w-1; + ui1 = 0; + } + vi1 = w; + vi = v >> 16; + if (vi < 0) + { + vi = 0; + vi1 = 0; + } + else if (vi >= h) + { + vi = h; + vi1 = 0; + } + ui += vi*w; + a = samples[ui]; + b = samples[ui + ui1]; + a |= samples[ui + vi1]<<16; + b |= samples[ui + ui1 + vi1]<<16; + ud = (u>>8) & 0xFF; + vd = (v>>8) & 0xFF; + ud = FZ_EXPAND(ud); + vd = FZ_EXPAND(vd); + /* a = blend(a,b,ud) */ + a = ((b-a) * ud + (a<<8)) & MASK; + /* a = blend(a,a>>16,vd) */ + a = (((a>>24)-(a>>8)) * vd + a); + a = (a>>8) & 0xFF; + ca = FZ_COMBINE(ca, FZ_EXPAND(a)); + } + if (ca != 0) + { + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga | (drb>>8); + dst32[-1] = drb; + } + u += fa; + v += fb; + } + } + else + { + while (len--) + { + unsigned int ca, drb, dga, crb, cga; + unsigned int a, b; + cov += *src; *src = 0; src++; + drb = *dst32++; + if (cov != 0) + { + int ui, ui1, vi, vi1, ud, vd; + /* a = samplemask(samples, w, h, u, v); */ + ui1 = 1; + ui = u >> 16; + if (ui < 0) + { + ui = 0; + ui1 = 0; + } + else if (ui >= w-1) + { + ui = w-1; + ui1 = 0; + } + vi1 = w; + vi = v >> 16; + if (vi < 0) + { + vi = 0; + vi1 = 0; + } + else if (vi >= h) + { + vi = h; + vi1 = 0; + } + ui += vi*w; + a = samples[ui]; + b = samples[ui + ui1]; + a |= samples[ui + vi1]<<16; + b |= samples[ui + ui1 + vi1]<<16; + ud = (u>>8) & 0xFF; + vd = (v>>8) & 0xFF; + ud = FZ_EXPAND(ud); + vd = FZ_EXPAND(vd); + /* a = blend(a,b,ud) */ + a = ((b-a) * ud + (a<<8)) & MASK; + /* a = blend(a,a>>16,vd) */ + a = (((a>>24)-(a>>8)) * vd + a); + a = (a>>8) & 0xFF; + ca = FZ_COMBINE(FZ_EXPAND(cov),FZ_EXPAND(a)); + if (ca != 0) + { + if (ca == 256) + { + drb = (ga<<8) | rb; + } + else + { + dga = drb & MASK; + drb = (drb<<8) & MASK; + cga = ga - (dga>>8); + crb = rb - (drb>>8); + dga += cga * ca; + drb += crb * ca; + dga &= MASK; + drb &= MASK; + drb = dga | (drb>>8); + } + dst32[-1] = drb; + } + } + u += fa; + v += fb; + } + } +} + +static void +img_1o1_32bit(byte * restrict src, byte cov, int len, byte * restrict dst, + fz_pixmap *image, int u, int v, int fa, int fb) +{ + byte *samples = image->samples; + int w = image->w; + int h = image->h-1; + + while (len--) + { + unsigned int a, b; + cov += *src; *src = 0; src++; + if (cov != 0) + { + int ui, ui1, vi, vi1, ud, vd; + /* sa = samplemask(samples, w, h, u, v); */ + ui1 = 1; + ui = u >> 16; + if (ui < 0) + { + ui = 0; + ui1 = 0; + } + else if (ui >= w-1) + { + ui = w-1; + ui1 = 0; + } + vi1 = w; + vi = v >> 16; + if (vi < 0) + { + vi = 0; + vi1 = 0; + } + else if (vi >= h) + { + vi = h; + vi1 = 0; + } + ui += vi*w; + a = samples[ui]; + b = samples[ui + ui1]; + a |= samples[ui + vi1]<<16; + b |= samples[ui + ui1 + vi1]<<16; + ud = (u>>8) & 0xFF; + vd = (v>>8) & 0xFF; + ud = FZ_EXPAND(ud); + vd = FZ_EXPAND(vd); + /* a = blend(a,b,ud) */ + a = ((b-a) * ud + (a<<8)) & MASK; + /* a = blend(a,a>>16,vd) */ + a = (((a>>24)-(a>>8)) * vd + a); + a = (a>>8) & 0xFF; + a = FZ_COMBINE(FZ_EXPAND(a), FZ_EXPAND(cov)); + if (a != 0) + { + if (a == 256) + dst[0] = 255; + else + dst[0] = FZ_BLEND(255, dst[0], a); + } + } + dst++; + u += fa; + v += fb; + } +} + +#endif + +void fz_accelerate(void) +{ + if (sizeof(int) == 4 && sizeof(unsigned int) == 4 && !fz_is_big_endian()) + { +// fz_path_w4i1o4 = path_w4i1o4_32bit; +// fz_text_w4i1o4 = text_w4i1o4_32bit; +// fz_img_4o4 = img_4o4_32bit; +// fz_img_w4i1o4 = img_w4i1o4_32bit; +// fz_img_1o1 = img_1o1_32bit; + } + +#ifdef HAVE_CPUDEP + fz_accelerate_arch(); +#endif +} diff --git a/contrib/media/updf/draw/draw_affine.c b/contrib/media/updf/draw/draw_affine.c new file mode 100644 index 0000000000..95d28beac7 --- /dev/null +++ b/contrib/media/updf/draw/draw_affine.c @@ -0,0 +1,588 @@ +#include "fitz.h" + +typedef unsigned char byte; + +static inline float roundup(float x) +{ + return (x < 0) ? floorf(x) : ceilf(x); +} + +static inline int lerp(int a, int b, int t) +{ + return a + (((b - a) * t) >> 16); +} + +static inline int bilerp(int a, int b, int c, int d, int u, int v) +{ + return lerp(lerp(a, b, u), lerp(c, d, u), v); +} + +static inline byte *sample_nearest(byte *s, int w, int h, int n, int u, int v) +{ + if (u < 0) u = 0; + if (v < 0) v = 0; + if (u >= w) u = w - 1; + if (v >= h) v = h - 1; + return s + (v * w + u) * n; +} + +/* Blend premultiplied source image in constant alpha over destination */ + +static inline void +fz_paint_affine_alpha_N_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *hp) +{ + int k; + int n1 = n-1; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int uf = u & 0xffff; + int vf = v & 0xffff; + byte *a = sample_nearest(sp, sw, sh, n, ui, vi); + byte *b = sample_nearest(sp, sw, sh, n, ui+1, vi); + byte *c = sample_nearest(sp, sw, sh, n, ui, vi+1); + byte *d = sample_nearest(sp, sw, sh, n, ui+1, vi+1); + int xa = bilerp(a[n1], b[n1], c[n1], d[n1], uf, vf); + int t; + xa = fz_mul255(xa, alpha); + t = 255 - xa; + for (k = 0; k < n1; k++) + { + int x = bilerp(a[k], b[k], c[k], d[k], uf, vf); + dp[k] = fz_mul255(x, alpha) + fz_mul255(dp[k], t); + } + dp[n1] = xa + fz_mul255(dp[n1], t); + if (hp) + hp[0] = xa + fz_mul255(hp[n1], t); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +/* Special case code for gray -> rgb */ +static inline void +fz_paint_affine_alpha_g2rgb_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int alpha, byte *hp) +{ + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int uf = u & 0xffff; + int vf = v & 0xffff; + byte *a = sample_nearest(sp, sw, sh, 2, ui, vi); + byte *b = sample_nearest(sp, sw, sh, 2, ui+1, vi); + byte *c = sample_nearest(sp, sw, sh, 2, ui, vi+1); + byte *d = sample_nearest(sp, sw, sh, 2, ui+1, vi+1); + int y = bilerp(a[1], b[1], c[1], d[1], uf, vf); + int x = bilerp(a[0], b[0], c[0], d[0], uf, vf); + int t; + x = fz_mul255(x, alpha); + y = fz_mul255(y, alpha); + t = 255 - y; + dp[0] = x + fz_mul255(dp[0], t); + dp[1] = x + fz_mul255(dp[1], t); + dp[2] = x + fz_mul255(dp[2], t); + dp[3] = y + fz_mul255(dp[3], t); + if (hp) + hp[0] = y + fz_mul255(hp[0], t); + } + dp += 4; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_alpha_N_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *hp) +{ + int k; + int n1 = n-1; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + byte *sample = sp + ((vi * sw + ui) * n); + int a = fz_mul255(sample[n-1], alpha); + int t = 255 - a; + for (k = 0; k < n1; k++) + dp[k] = fz_mul255(sample[k], alpha) + fz_mul255(dp[k], t); + dp[n1] = a + fz_mul255(dp[n1], t); + if (hp) + hp[0] = a + fz_mul255(hp[n1], t); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_alpha_g2rgb_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int alpha, byte *hp) +{ + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + byte *sample = sp + ((vi * sw + ui) * 2); + int x = fz_mul255(sample[0], alpha); + int a = fz_mul255(sample[1], alpha); + int t = 255 - a; + dp[0] = x + fz_mul255(dp[0], t); + dp[1] = x + fz_mul255(dp[1], t); + dp[2] = x + fz_mul255(dp[2], t); + dp[3] = a + fz_mul255(dp[3], t); + if (hp) + hp[0] = a + fz_mul255(hp[0], t); + } + dp += 4; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +/* Blend premultiplied source image over destination */ + +static inline void +fz_paint_affine_N_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, byte *hp) +{ + int k; + int n1 = n-1; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int uf = u & 0xffff; + int vf = v & 0xffff; + byte *a = sample_nearest(sp, sw, sh, n, ui, vi); + byte *b = sample_nearest(sp, sw, sh, n, ui+1, vi); + byte *c = sample_nearest(sp, sw, sh, n, ui, vi+1); + byte *d = sample_nearest(sp, sw, sh, n, ui+1, vi+1); + int y = bilerp(a[n1], b[n1], c[n1], d[n1], uf, vf); + int t = 255 - y; + for (k = 0; k < n1; k++) + { + int x = bilerp(a[k], b[k], c[k], d[k], uf, vf); + dp[k] = x + fz_mul255(dp[k], t); + } + dp[n1] = y + fz_mul255(dp[n1], t); + if (hp) + hp[0] = y + fz_mul255(hp[0], t); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_solid_g2rgb_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, byte *hp) +{ + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int uf = u & 0xffff; + int vf = v & 0xffff; + byte *a = sample_nearest(sp, sw, sh, 2, ui, vi); + byte *b = sample_nearest(sp, sw, sh, 2, ui+1, vi); + byte *c = sample_nearest(sp, sw, sh, 2, ui, vi+1); + byte *d = sample_nearest(sp, sw, sh, 2, ui+1, vi+1); + int y = bilerp(a[1], b[1], c[1], d[1], uf, vf); + int t = 255 - y; + int x = bilerp(a[0], b[0], c[0], d[0], uf, vf); + dp[0] = x + fz_mul255(dp[0], t); + dp[1] = x + fz_mul255(dp[1], t); + dp[2] = x + fz_mul255(dp[2], t); + dp[3] = y + fz_mul255(dp[3], t); + if (hp) + hp[0] = y + fz_mul255(hp[0], t); + } + dp += 4; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_N_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, byte *hp) +{ + int k; + int n1 = n-1; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + byte *sample = sp + ((vi * sw + ui) * n); + int a = sample[n1]; + int t = 255 - a; + for (k = 0; k < n1; k++) + dp[k] = sample[k] + fz_mul255(dp[k], t); + dp[n1] = a + fz_mul255(dp[n1], t); + if (hp) + hp[0] = a + fz_mul255(hp[0], t); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_solid_g2rgb_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, byte *hp) +{ + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + byte *sample = sp + ((vi * sw + ui) * 2); + int x = sample[0]; + int a = sample[1]; + int t = 255 - a; + dp[0] = x + fz_mul255(dp[0], t); + dp[1] = x + fz_mul255(dp[1], t); + dp[2] = x + fz_mul255(dp[2], t); + dp[3] = a + fz_mul255(dp[3], t); + if (hp) + hp[0] = a + fz_mul255(hp[0], t); + } + dp += 4; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +/* Blend non-premultiplied color in source image mask over destination */ + +static inline void +fz_paint_affine_color_N_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, byte *color, byte *hp) +{ + int n1 = n - 1; + int sa = color[n1]; + int k; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int uf = u & 0xffff; + int vf = v & 0xffff; + byte *a = sample_nearest(sp, sw, sh, 1, ui, vi); + byte *b = sample_nearest(sp, sw, sh, 1, ui+1, vi); + byte *c = sample_nearest(sp, sw, sh, 1, ui, vi+1); + byte *d = sample_nearest(sp, sw, sh, 1, ui+1, vi+1); + int ma = bilerp(a[0], b[0], c[0], d[0], uf, vf); + int masa = FZ_COMBINE(FZ_EXPAND(ma), sa); + for (k = 0; k < n1; k++) + dp[k] = FZ_BLEND(color[k], dp[k], masa); + dp[n1] = FZ_BLEND(255, dp[n1], masa); + if (hp) + hp[0] = FZ_BLEND(255, hp[0], masa); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static inline void +fz_paint_affine_color_N_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, byte *color, byte *hp) +{ + int n1 = n-1; + int sa = color[n1]; + int k; + + while (w--) + { + int ui = u >> 16; + int vi = v >> 16; + if (ui >= 0 && ui < sw && vi >= 0 && vi < sh) + { + int ma = sp[vi * sw + ui]; + int masa = FZ_COMBINE(FZ_EXPAND(ma), sa); + for (k = 0; k < n1; k++) + dp[k] = FZ_BLEND(color[k], dp[k], masa); + dp[n1] = FZ_BLEND(255, dp[n1], masa); + if (hp) + hp[n1] = FZ_BLEND(255, hp[n1], masa); + } + dp += n; + if (hp) + hp++; + u += fa; + v += fb; + } +} + +static void +fz_paint_affine_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *color/*unused*/, byte *hp) +{ + if (alpha == 255) + { + switch (n) + { + case 1: fz_paint_affine_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 1, hp); break; + case 2: fz_paint_affine_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, hp); break; + case 4: fz_paint_affine_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, hp); break; + default: fz_paint_affine_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, n, hp); break; + } + } + else if (alpha > 0) + { + switch (n) + { + case 1: fz_paint_affine_alpha_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha, hp); break; + case 2: fz_paint_affine_alpha_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha, hp); break; + case 4: fz_paint_affine_alpha_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha, hp); break; + default: fz_paint_affine_alpha_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha, hp); break; + } + } +} + +static void +fz_paint_affine_g2rgb_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *color/*unused*/, byte *hp) +{ + if (alpha == 255) + { + fz_paint_affine_solid_g2rgb_lerp(dp, sp, sw, sh, u, v, fa, fb, w, hp); + } + else if (alpha > 0) + { + fz_paint_affine_alpha_g2rgb_lerp(dp, sp, sw, sh, u, v, fa, fb, w, alpha, hp); + } +} + +static void +fz_paint_affine_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *color/*unused */, byte *hp) +{ + if (alpha == 255) + { + switch (n) + { + case 1: fz_paint_affine_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 1, hp); break; + case 2: fz_paint_affine_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 2, hp); break; + case 4: fz_paint_affine_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 4, hp); break; + default: fz_paint_affine_N_near(dp, sp, sw, sh, u, v, fa, fb, w, n, hp); break; + } + } + else if (alpha > 0) + { + switch (n) + { + case 1: fz_paint_affine_alpha_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 1, alpha, hp); break; + case 2: fz_paint_affine_alpha_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 2, alpha, hp); break; + case 4: fz_paint_affine_alpha_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 4, alpha, hp); break; + default: fz_paint_affine_alpha_N_near(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha, hp); break; + } + } +} + +static void +fz_paint_affine_g2rgb_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *color/*unused*/, byte *hp) +{ + if (alpha == 255) + { + fz_paint_affine_solid_g2rgb_near(dp, sp, sw, sh, u, v, fa, fb, w, hp); + } + else if (alpha > 0) + { + fz_paint_affine_alpha_g2rgb_near(dp, sp, sw, sh, u, v, fa, fb, w, alpha, hp); + } +} + +static void +fz_paint_affine_color_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha/*unused*/, byte *color, byte *hp) +{ + switch (n) + { + case 2: fz_paint_affine_color_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 2, color, hp); break; + case 4: fz_paint_affine_color_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, 4, color, hp); break; + default: fz_paint_affine_color_N_lerp(dp, sp, sw, sh, u, v, fa, fb, w, n, color, hp); break; + } +} + +static void +fz_paint_affine_color_near(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha/*unused*/, byte *color, byte *hp) +{ + switch (n) + { + case 2: fz_paint_affine_color_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 2, color, hp); break; + case 4: fz_paint_affine_color_N_near(dp, sp, sw, sh, u, v, fa, fb, w, 4, color, hp); break; + default: fz_paint_affine_color_N_near(dp, sp, sw, sh, u, v, fa, fb, w, n, color, hp); break; + } +} + +/* Draw an image with an affine transform on destination */ + +static void +fz_paint_image_imp(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap *img, fz_matrix ctm, byte *color, int alpha) +{ + byte *dp, *sp, *hp; + int u, v, fa, fb, fc, fd; + int x, y, w, h; + int sw, sh, n, hw; + fz_matrix inv; + fz_bbox bbox; + int dolerp; + void (*paintfn)(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *color, byte *hp); + + /* grid fit the image */ + if (fz_is_rectilinear(ctm)) + { + ctm.a = roundup(ctm.a); + ctm.b = roundup(ctm.b); + ctm.c = roundup(ctm.c); + ctm.d = roundup(ctm.d); + ctm.e = floorf(ctm.e); + ctm.f = floorf(ctm.f); + } + + /* turn on interpolation for upscaled and non-rectilinear transforms */ + dolerp = 0; + if (!fz_is_rectilinear(ctm)) + dolerp = 1; + if (sqrtf(ctm.a * ctm.a + ctm.b * ctm.b) > img->w) + dolerp = 1; + if (sqrtf(ctm.c * ctm.c + ctm.d * ctm.d) > img->h) + dolerp = 1; + + /* except when we shouldn't, at large magnifications */ + if (!img->interpolate) + { + if (sqrtf(ctm.a * ctm.a + ctm.b * ctm.b) > img->w * 2) + dolerp = 0; + if (sqrtf(ctm.c * ctm.c + ctm.d * ctm.d) > img->h * 2) + dolerp = 0; + } + + bbox = fz_round_rect(fz_transform_rect(ctm, fz_unit_rect)); + bbox = fz_intersect_bbox(bbox, scissor); + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + + /* map from screen space (x,y) to image space (u,v) */ + inv = fz_scale(1.0f / img->w, -1.0f / img->h); + inv = fz_concat(inv, fz_translate(0, 1)); + inv = fz_concat(inv, ctm); + inv = fz_invert_matrix(inv); + + fa = inv.a * 65536; + fb = inv.b * 65536; + fc = inv.c * 65536; + fd = inv.d * 65536; + + /* Calculate initial texture positions. Do a half step to start. */ + u = (fa * x) + (fc * y) + inv.e * 65536 + ((fa + fc) >> 1); + v = (fb * x) + (fd * y) + inv.f * 65536 + ((fb + fd) >> 1); + + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; + n = dst->n; + sp = img->samples; + sw = img->w; + sh = img->h; + if (shape) + { + hw = shape->w; + hp = shape->samples + ((y - shape->y) * hw) + x - dst->x; + } + else + { + hw = 0; + hp = NULL; + } + + /* TODO: if (fb == 0 && fa == 1) call fz_paint_span */ + + if (dst->n == 4 && img->n == 2) + { + assert(color == NULL); + if (dolerp) + paintfn = fz_paint_affine_g2rgb_lerp; + else + paintfn = fz_paint_affine_g2rgb_near; + } + else + { + if (dolerp) + { + if (color) + paintfn = fz_paint_affine_color_lerp; + else + paintfn = fz_paint_affine_lerp; + } + else + { + if (color) + paintfn = fz_paint_affine_color_near; + else + paintfn = fz_paint_affine_near; + } + } + + while (h--) + { + paintfn(dp, sp, sw, sh, u, v, fa, fb, w, n, alpha, color, hp); + dp += dst->w * n; + hp += hw; + u += fc; + v += fd; + } +} + +void +fz_paint_image_with_color(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap *img, fz_matrix ctm, byte *color) +{ + assert(img->n == 1); + fz_paint_image_imp(dst, scissor, shape, img, ctm, color, 255); +} + +void +fz_paint_image(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap *img, fz_matrix ctm, int alpha) +{ + assert(dst->n == img->n || (dst->n == 4 && img->n == 2)); + fz_paint_image_imp(dst, scissor, shape, img, ctm, NULL, alpha); +} diff --git a/contrib/media/updf/draw/draw_blend.c b/contrib/media/updf/draw/draw_blend.c new file mode 100644 index 0000000000..2f72ec9cfe --- /dev/null +++ b/contrib/media/updf/draw/draw_blend.c @@ -0,0 +1,567 @@ +#include "fitz.h" + +/* PDF 1.4 blend modes. These are slow. */ + +typedef unsigned char byte; + +static const char *fz_blendmode_names[] = +{ + "Normal", + "Multiply", + "Screen", + "Overlay", + "Darken", + "Lighten", + "ColorDodge", + "ColorBurn", + "HardLight", + "SoftLight", + "Difference", + "Exclusion", + "Hue", + "Saturation", + "Color", + "Luminosity", +}; + +int fz_find_blendmode(char *name) +{ + int i; + for (i = 0; i < nelem(fz_blendmode_names); i++) + if (!strcmp(name, fz_blendmode_names[i])) + return i; + return FZ_BLEND_NORMAL; +} + +char *fz_blendmode_name(int blendmode) +{ + if (blendmode >= 0 && blendmode < nelem(fz_blendmode_names)) + return (char*)fz_blendmode_names[blendmode]; + return "Normal"; +} + +/* Separable blend modes */ + +static inline int fz_screen_byte(int b, int s) +{ + return b + s - fz_mul255(b, s); +} + +static inline int fz_hard_light_byte(int b, int s) +{ + int s2 = s << 1; + if (s <= 127) + return fz_mul255(b, s2); + else + return fz_screen_byte(b, s2 - 255); +} + +static inline int fz_overlay_byte(int b, int s) +{ + return fz_hard_light_byte(s, b); /* note swapped order */ +} + +static inline int fz_darken_byte(int b, int s) +{ + return MIN(b, s); +} + +static inline int fz_lighten_byte(int b, int s) +{ + return MAX(b, s); +} + +static inline int fz_color_dodge_byte(int b, int s) +{ + s = 255 - s; + if (b == 0) + return 0; + else if (b >= s) + return 255; + else + return (0x1fe * b + s) / (s << 1); +} + +static inline int fz_color_burn_byte(int b, int s) +{ + b = 255 - b; + if (b == 0) + return 255; + else if (b >= s) + return 0; + else + return 0xff - (0x1fe * b + s) / (s << 1); +} + +static inline int fz_soft_light_byte(int b, int s) +{ + /* review this */ + if (s < 128) { + return b - fz_mul255(fz_mul255((255 - (s<<1)), b), 255 - b); + } + else { + int dbd; + if (b < 64) + dbd = fz_mul255(fz_mul255((b << 4) - 12, b) + 4, b); + else + dbd = (int)sqrtf(255.0f * b); + return b + fz_mul255(((s<<1) - 255), (dbd - b)); + } +} + +static inline int fz_difference_byte(int b, int s) +{ + return ABS(b - s); +} + +static inline int fz_exclusion_byte(int b, int s) +{ + return b + s - (fz_mul255(b, s)<<1); +} + +/* Non-separable blend modes */ + +static void +fz_luminosity_rgb(int *rd, int *gd, int *bd, int rb, int gb, int bb, int rs, int gs, int bs) +{ + int delta, scale; + int r, g, b, y; + + /* 0.3, 0.59, 0.11 in fixed point */ + delta = ((rs - rb) * 77 + (gs - gb) * 151 + (bs - bb) * 28 + 0x80) >> 8; + r = rb + delta; + g = gb + delta; + b = bb + delta; + + if ((r | g | b) & 0x100) + { + y = (rs * 77 + gs * 151 + bs * 28 + 0x80) >> 8; + if (delta > 0) + { + int max; + max = MAX(r, MAX(g, b)); + scale = ((255 - y) << 16) / (max - y); + } + else + { + int min; + min = MIN(r, MIN(g, b)); + scale = (y << 16) / (y - min); + } + r = y + (((r - y) * scale + 0x8000) >> 16); + g = y + (((g - y) * scale + 0x8000) >> 16); + b = y + (((b - y) * scale + 0x8000) >> 16); + } + + *rd = r; + *gd = g; + *bd = b; +} + +static void +fz_saturation_rgb(int *rd, int *gd, int *bd, int rb, int gb, int bb, int rs, int gs, int bs) +{ + int minb, maxb; + int mins, maxs; + int y; + int scale; + int r, g, b; + + minb = MIN(rb, MIN(gb, bb)); + maxb = MAX(rb, MAX(gb, bb)); + if (minb == maxb) + { + /* backdrop has zero saturation, avoid divide by 0 */ + *rd = gb; + *gd = gb; + *bd = gb; + return; + } + + mins = MIN(rs, MIN(gs, bs)); + maxs = MAX(rs, MAX(gs, bs)); + + scale = ((maxs - mins) << 16) / (maxb - minb); + y = (rb * 77 + gb * 151 + bb * 28 + 0x80) >> 8; + r = y + ((((rb - y) * scale) + 0x8000) >> 16); + g = y + ((((gb - y) * scale) + 0x8000) >> 16); + b = y + ((((bb - y) * scale) + 0x8000) >> 16); + + if ((r | g | b) & 0x100) + { + int scalemin, scalemax; + int min, max; + + min = MIN(r, MIN(g, b)); + max = MAX(r, MAX(g, b)); + + if (min < 0) + scalemin = (y << 16) / (y - min); + else + scalemin = 0x10000; + + if (max > 255) + scalemax = ((255 - y) << 16) / (max - y); + else + scalemax = 0x10000; + + scale = MIN(scalemin, scalemax); + r = y + (((r - y) * scale + 0x8000) >> 16); + g = y + (((g - y) * scale + 0x8000) >> 16); + b = y + (((b - y) * scale + 0x8000) >> 16); + } + + *rd = r; + *gd = g; + *bd = b; +} + +static void +fz_color_rgb(int *rr, int *rg, int *rb, int br, int bg, int bb, int sr, int sg, int sb) +{ + fz_luminosity_rgb(rr, rg, rb, sr, sg, sb, br, bg, bb); +} + +static void +fz_hue_rgb(int *rr, int *rg, int *rb, int br, int bg, int bb, int sr, int sg, int sb) +{ + int tr, tg, tb; + fz_luminosity_rgb(&tr, &tg, &tb, sr, sg, sb, br, bg, bb); + fz_saturation_rgb(rr, rg, rb, tr, tg, tb, br, bg, bb); +} + +/* Blending loops */ + +void +fz_blend_separable(byte * restrict bp, byte * restrict sp, int n, int w, int blendmode) +{ + int k; + int n1 = n - 1; + while (w--) + { + int sa = sp[n1]; + int ba = bp[n1]; + int saba = fz_mul255(sa, ba); + + /* ugh, division to get non-premul components */ + int invsa = sa ? 255 * 256 / sa : 0; + int invba = ba ? 255 * 256 / ba : 0; + + for (k = 0; k < n1; k++) + { + int sc = (sp[k] * invsa) >> 8; + int bc = (bp[k] * invba) >> 8; + int rc; + + switch (blendmode) + { + default: + case FZ_BLEND_NORMAL: rc = sc; break; + case FZ_BLEND_MULTIPLY: rc = fz_mul255(bc, sc); break; + case FZ_BLEND_SCREEN: rc = fz_screen_byte(bc, sc); break; + case FZ_BLEND_OVERLAY: rc = fz_overlay_byte(bc, sc); break; + case FZ_BLEND_DARKEN: rc = fz_darken_byte(bc, sc); break; + case FZ_BLEND_LIGHTEN: rc = fz_lighten_byte(bc, sc); break; + case FZ_BLEND_COLOR_DODGE: rc = fz_color_dodge_byte(bc, sc); break; + case FZ_BLEND_COLOR_BURN: rc = fz_color_burn_byte(bc, sc); break; + case FZ_BLEND_HARD_LIGHT: rc = fz_hard_light_byte(bc, sc); break; + case FZ_BLEND_SOFT_LIGHT: rc = fz_soft_light_byte(bc, sc); break; + case FZ_BLEND_DIFFERENCE: rc = fz_difference_byte(bc, sc); break; + case FZ_BLEND_EXCLUSION: rc = fz_exclusion_byte(bc, sc); break; + } + + bp[k] = fz_mul255(255 - sa, bp[k]) + fz_mul255(255 - ba, sp[k]) + fz_mul255(saba, rc); + } + + bp[k] = ba + sa - saba; + + sp += n; + bp += n; + } +} + +void +fz_blend_nonseparable(byte * restrict bp, byte * restrict sp, int w, int blendmode) +{ + while (w--) + { + int rr, rg, rb; + + int sa = sp[3]; + int ba = bp[3]; + int saba = fz_mul255(sa, ba); + + /* ugh, division to get non-premul components */ + int invsa = sa ? 255 * 256 / sa : 0; + int invba = ba ? 255 * 256 / ba : 0; + + int sr = (sp[0] * invsa) >> 8; + int sg = (sp[1] * invsa) >> 8; + int sb = (sp[2] * invsa) >> 8; + + int br = (bp[0] * invba) >> 8; + int bg = (bp[1] * invba) >> 8; + int bb = (bp[2] * invba) >> 8; + + switch (blendmode) + { + default: + case FZ_BLEND_HUE: + fz_hue_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_SATURATION: + fz_saturation_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_COLOR: + fz_color_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_LUMINOSITY: + fz_luminosity_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + } + + bp[0] = fz_mul255(255 - sa, bp[0]) + fz_mul255(255 - ba, sp[0]) + fz_mul255(saba, rr); + bp[1] = fz_mul255(255 - sa, bp[1]) + fz_mul255(255 - ba, sp[1]) + fz_mul255(saba, rg); + bp[2] = fz_mul255(255 - sa, bp[2]) + fz_mul255(255 - ba, sp[2]) + fz_mul255(saba, rb); + bp[3] = ba + sa - saba; + + sp += 4; + bp += 4; + } +} + +static void +fz_blend_separable_nonisolated(byte * restrict bp, byte * restrict sp, int n, int w, int blendmode, byte * restrict hp, int alpha) +{ + int k; + int n1 = n - 1; + + if (alpha == 255 && blendmode == 0) + { + /* In this case, the uncompositing and the recompositing + * cancel one another out, and it's just a simple copy. */ + /* FIXME: Maybe we can avoid using the shape plane entirely + * and just copy? */ + while (w--) + { + int ha = fz_mul255(*hp++, alpha); /* ha = shape_alpha */ + /* If ha == 0 then leave everything unchanged */ + if (ha != 0) + { + for (k = 0; k < n; k++) + { + bp[k] = sp[k]; + } + } + + sp += n; + bp += n; + } + return; + } + while (w--) + { + int ha = *hp++; + int haa = fz_mul255(ha, alpha); /* ha = shape_alpha */ + /* If haa == 0 then leave everything unchanged */ + if (haa != 0) + { + int sa = sp[n1]; + int ba = bp[n1]; + int baha = fz_mul255(ba, haa); + + /* ugh, division to get non-premul components */ + int invsa = sa ? 255 * 256 / sa : 0; + int invba = ba ? 255 * 256 / ba : 0; + + /* Calculate result_alpha */ + int ra = bp[n1] = ba - baha + haa; + + /* Because we are a non-isolated group, we need to + * 'uncomposite' before we blend (recomposite). + * We assume that normal blending has been done inside + * the group, so: ra.rc = (1-ha).bc + ha.sc + * A bit of rearrangement, and that gives us that: + * sc = (ra.rc - bc)/ha + bc + * Now, the result of the blend was stored in src, so: + */ + int invha = ha ? 255 * 256 / ha : 0; + + if (ra != 0) for (k = 0; k < n1; k++) + { + int sc = (sp[k] * invsa) >> 8; + int bc = (bp[k] * invba) >> 8; + int rc; + + /* Uncomposite */ + sc = (((sc-bc)*invha)>>8) + bc; + if (sc < 0) sc = 0; + if (sc > 255) sc = 255; + + switch (blendmode) + { + default: + case FZ_BLEND_NORMAL: rc = sc; break; + case FZ_BLEND_MULTIPLY: rc = fz_mul255(bc, sc); break; + case FZ_BLEND_SCREEN: rc = fz_screen_byte(bc, sc); break; + case FZ_BLEND_OVERLAY: rc = fz_overlay_byte(bc, sc); break; + case FZ_BLEND_DARKEN: rc = fz_darken_byte(bc, sc); break; + case FZ_BLEND_LIGHTEN: rc = fz_lighten_byte(bc, sc); break; + case FZ_BLEND_COLOR_DODGE: rc = fz_color_dodge_byte(bc, sc); break; + case FZ_BLEND_COLOR_BURN: rc = fz_color_burn_byte(bc, sc); break; + case FZ_BLEND_HARD_LIGHT: rc = fz_hard_light_byte(bc, sc); break; + case FZ_BLEND_SOFT_LIGHT: rc = fz_soft_light_byte(bc, sc); break; + case FZ_BLEND_DIFFERENCE: rc = fz_difference_byte(bc, sc); break; + case FZ_BLEND_EXCLUSION: rc = fz_exclusion_byte(bc, sc); break; + } + rc = fz_mul255(255 - haa, bc) + fz_mul255(fz_mul255(255 - ba, sc), haa) + fz_mul255(baha, rc); + if (rc < 0) rc = 0; + if (rc > 255) rc = 255; + bp[k] = fz_mul255(rc, ra); + } + } + + sp += n; + bp += n; + } +} + +static void +fz_blend_nonseparable_nonisolated(byte * restrict bp, byte * restrict sp, int w, int blendmode, byte * restrict hp, int alpha) +{ + while (w--) + { + int ha = *hp++; + int haa = fz_mul255(ha, alpha); + if (haa != 0) + { + int sa = sp[3]; + int ba = bp[3]; + int baha = fz_mul255(ba, haa); + + /* Calculate result_alpha */ + int ra = bp[3] = ba - baha + haa; + if (ra != 0) + { + /* Because we are a non-isolated group, we + * need to 'uncomposite' before we blend + * (recomposite). We assume that normal + * blending has been done inside the group, + * so: ra.rc = (1-ha).bc + ha.sc + * A bit of rearrangement, and that gives us + * that: sc = (ra.rc - bc)/ha + bc + * Now, the result of the blend was stored in + * src, so: */ + int invha = ha ? 255 * 256 / ha : 0; + + int rr, rg, rb; + + /* ugh, division to get non-premul components */ + int invsa = sa ? 255 * 256 / sa : 0; + int invba = ba ? 255 * 256 / ba : 0; + + int sr = (sp[0] * invsa) >> 8; + int sg = (sp[1] * invsa) >> 8; + int sb = (sp[2] * invsa) >> 8; + + int br = (bp[0] * invba) >> 8; + int bg = (bp[1] * invba) >> 8; + int bb = (bp[2] * invba) >> 8; + + /* Uncomposite */ + sr = (((sr-br)*invha)>>8) + br; + sg = (((sg-bg)*invha)>>8) + bg; + sb = (((sb-bb)*invha)>>8) + bb; + + switch (blendmode) + { + default: + case FZ_BLEND_HUE: + fz_hue_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_SATURATION: + fz_saturation_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_COLOR: + fz_color_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + case FZ_BLEND_LUMINOSITY: + fz_luminosity_rgb(&rr, &rg, &rb, br, bg, bb, sr, sg, sb); + break; + } + + rr = fz_mul255(255 - haa, bp[0]) + fz_mul255(fz_mul255(255 - ba, sr), haa) + fz_mul255(baha, rr); + rg = fz_mul255(255 - haa, bp[1]) + fz_mul255(fz_mul255(255 - ba, sg), haa) + fz_mul255(baha, rg); + rb = fz_mul255(255 - haa, bp[2]) + fz_mul255(fz_mul255(255 - ba, sb), haa) + fz_mul255(baha, rb); + bp[0] = fz_mul255(ra, rr); + bp[1] = fz_mul255(ra, rg); + bp[2] = fz_mul255(ra, rb); + } + } + + sp += 4; + bp += 4; + } +} + +void +fz_blend_pixmap(fz_pixmap *dst, fz_pixmap *src, int alpha, int blendmode, int isolated, fz_pixmap *shape) +{ + unsigned char *sp, *dp; + fz_bbox bbox; + int x, y, w, h, n; + + /* TODO: fix this hack! */ + if (isolated && alpha < 255) + { + sp = src->samples; + n = src->w * src->h * src->n; + while (n--) + { + *sp = fz_mul255(*sp, alpha); + sp++; + } + } + + bbox = fz_bound_pixmap(dst); + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(src)); + + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + + n = src->n; + sp = src->samples + ((y - src->y) * src->w + (x - src->x)) * n; + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * n; + + assert(src->n == dst->n); + + if (!isolated) + { + unsigned char *hp = shape->samples + (y - shape->y) * shape->w + (x - shape->x); + + while (h--) + { + if (n == 4 && blendmode >= FZ_BLEND_HUE) + fz_blend_nonseparable_nonisolated(dp, sp, w, blendmode, hp, alpha); + else + fz_blend_separable_nonisolated(dp, sp, n, w, blendmode, hp, alpha); + sp += src->w * n; + dp += dst->w * n; + hp += shape->w; + } + } + else + { + while (h--) + { + if (n == 4 && blendmode >= FZ_BLEND_HUE) + fz_blend_nonseparable(dp, sp, w, blendmode); + else + fz_blend_separable(dp, sp, n, w, blendmode); + sp += src->w * n; + dp += dst->w * n; + } + } +} diff --git a/contrib/media/updf/draw/draw_device.c b/contrib/media/updf/draw/draw_device.c new file mode 100644 index 0000000000..76b5527664 --- /dev/null +++ b/contrib/media/updf/draw/draw_device.c @@ -0,0 +1,1582 @@ +#include "fitz.h" + +#define QUANT(x,a) (((int)((x) * (a))) / (a)) +#define HSUBPIX 5.0 +#define VSUBPIX 5.0 + +#define STACK_SIZE 96 + +/* Enable the following to attempt to support knockout and/or isolated + * blending groups. This code is known to give incorrect results currently + * so disabled by default. See bug 692377. */ +#undef ATTEMPT_KNOCKOUT_AND_ISOLATED + +/* Enable the following to help debug group blending. */ +#undef DUMP_GROUP_BLENDS + +/* Note #1: At various points in this code (notably when clipping with non + * rectangular masks), we create a new (empty) destination pixmap. We then + * render this pixmap, then plot it back into the original destination + * through a mask. This works well for normal blending, but falls down for + * non-zero blending modes; effectively we are forcing ourselves to use an + * isolated group. + * + * The fix for this would be to copy the contents from the underlying dest + * into the newly created dest. This would enable us to use a non + * FZ_BLEND_ISOLATED blendmode. Unfortunately, tt would break tiling, as + * we could no longer render once and blend back multiple times. + */ + + +typedef struct fz_draw_device_s fz_draw_device; + +enum { + FZ_DRAWDEV_FLAGS_TYPE3 = 1, +}; + +struct fz_draw_device_s +{ + fz_glyph_cache *cache; + fz_gel *gel; + + fz_pixmap *dest; + fz_pixmap *shape; + fz_bbox scissor; + + int flags; + int top; + int blendmode; + struct { + fz_bbox scissor; + fz_pixmap *dest; + fz_pixmap *mask; + fz_pixmap *shape; + int blendmode; + int luminosity; + float alpha; + fz_matrix ctm; + float xstep, ystep; + fz_rect area; + } stack[STACK_SIZE]; +}; + +#ifdef DUMP_GROUP_BLENDS +static int group_dump_count = 0; + +static void fz_dump_blend(fz_pixmap *pix, const char *s) +{ + char name[80]; + + if (pix == NULL) + return; + + sprintf(name, "dump%02d.png", group_dump_count); + if (s) + printf("%s%02d", s, group_dump_count); + group_dump_count++; + + fz_write_png(pix, name, (pix->n > 1)); +} + +static void dump_spaces(int x, const char *s) +{ + int i; + for (i = 0; i < x; i++) + printf(" "); + printf("%s", s); +} + +#endif + +static void fz_knockout_begin(void *user) +{ + fz_draw_device *dev = user; + fz_bbox bbox; + fz_pixmap *dest, *shape; + int isolated = dev->blendmode & FZ_BLEND_ISOLATED; + + if ((dev->blendmode & FZ_BLEND_KNOCKOUT) == 0) + return; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + bbox = fz_bound_pixmap(dev->dest); + bbox = fz_intersect_bbox(bbox, dev->scissor); + dest = fz_new_pixmap_with_rect(dev->dest->colorspace, bbox); + + if (isolated) + { + fz_clear_pixmap(dest); + } + else + { + fz_pixmap *prev; + int i = dev->top; + do + prev = dev->stack[--i].dest; + while (prev == NULL); + fz_copy_pixmap_rect(dest, prev, bbox); + } + + if (dev->blendmode == 0 && isolated) + { + /* We can render direct to any existing shape plane. If there + * isn't one, we don't need to make one. */ + shape = dev->shape; + } + else + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + dev->stack[dev->top].blendmode = dev->blendmode; + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Knockout begin\n"); +#endif + dev->top++; + + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; + dev->blendmode &= ~FZ_BLEND_MODEMASK; +} + +static void fz_knockout_end(void *user) +{ + fz_draw_device *dev = user; + fz_pixmap *group = dev->dest; + fz_pixmap *shape = dev->shape; + int blendmode; + int isolated; + + if ((dev->blendmode & FZ_BLEND_KNOCKOUT) == 0) + return; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (dev->top > 0) + { + dev->top--; + blendmode = dev->blendmode & FZ_BLEND_MODEMASK; + isolated = dev->blendmode & FZ_BLEND_ISOLATED; + dev->blendmode = dev->stack[dev->top].blendmode; + dev->shape = dev->stack[dev->top].shape; + dev->dest = dev->stack[dev->top].dest; + dev->scissor = dev->stack[dev->top].scissor; + +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, ""); + fz_dump_blend(group, "Blending "); + if (shape) + fz_dump_blend(shape, "/"); + fz_dump_blend(dev->dest, " onto "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + if (blendmode != 0) + printf(" (blend %d)", blendmode); + if (isolated != 0) + printf(" (isolated)"); + printf(" (knockout)"); +#endif + if ((blendmode == 0) && (shape == NULL)) + fz_paint_pixmap(dev->dest, group, 255); + else + fz_blend_pixmap(dev->dest, group, 255, blendmode, isolated, shape); + + fz_drop_pixmap(group); + if (shape != dev->shape) + { + if (dev->shape) + { + fz_paint_pixmap(dev->shape, shape, 255); + } + fz_drop_pixmap(shape); + } +#ifdef DUMP_GROUP_BLENDS + fz_dump_blend(dev->dest, " to get "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + printf("\n"); +#endif + } +} + +static void +fz_draw_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + float expansion = fz_matrix_expansion(ctm); + float flatness = 0.3f / expansion; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + float colorfv[FZ_MAX_COLORS]; + fz_bbox bbox; + int i; + + fz_reset_gel(dev->gel, dev->scissor); + fz_flatten_fill_path(dev->gel, path, ctm, flatness); + fz_sort_gel(dev->gel); + + bbox = fz_bound_gel(dev->gel); + bbox = fz_intersect_bbox(bbox, dev->scissor); + + if (fz_is_empty_rect(bbox)) + return; + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + fz_convert_color(colorspace, color, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = alpha * 255; + + fz_scan_convert(dev->gel, even_odd, bbox, dev->dest, colorbv); + if (dev->shape) + { + fz_reset_gel(dev->gel, dev->scissor); + fz_flatten_fill_path(dev->gel, path, ctm, flatness); + fz_sort_gel(dev->gel); + + colorbv[0] = alpha * 255; + fz_scan_convert(dev->gel, even_odd, bbox, dev->shape, colorbv); + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + float expansion = fz_matrix_expansion(ctm); + float flatness = 0.3f / expansion; + float linewidth = stroke->linewidth; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + float colorfv[FZ_MAX_COLORS]; + fz_bbox bbox; + int i; + + if (linewidth * expansion < 0.1f) + linewidth = 1 / expansion; + + fz_reset_gel(dev->gel, dev->scissor); + if (stroke->dash_len > 0) + fz_flatten_dash_path(dev->gel, path, stroke, ctm, flatness, linewidth); + else + fz_flatten_stroke_path(dev->gel, path, stroke, ctm, flatness, linewidth); + fz_sort_gel(dev->gel); + + bbox = fz_bound_gel(dev->gel); + bbox = fz_intersect_bbox(bbox, dev->scissor); + + if (fz_is_empty_rect(bbox)) + return; + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + fz_convert_color(colorspace, color, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = alpha * 255; + + fz_scan_convert(dev->gel, 0, bbox, dev->dest, colorbv); + if (dev->shape) + { + fz_reset_gel(dev->gel, dev->scissor); + if (stroke->dash_len > 0) + fz_flatten_dash_path(dev->gel, path, stroke, ctm, flatness, linewidth); + else + fz_flatten_stroke_path(dev->gel, path, stroke, ctm, flatness, linewidth); + fz_sort_gel(dev->gel); + + colorbv[0] = 255; + fz_scan_convert(dev->gel, 0, bbox, dev->shape, colorbv); + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_clip_path(void *user, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + float expansion = fz_matrix_expansion(ctm); + float flatness = 0.3f / expansion; + fz_pixmap *mask, *dest, *shape; + fz_bbox bbox; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + fz_reset_gel(dev->gel, dev->scissor); + fz_flatten_fill_path(dev->gel, path, ctm, flatness); + fz_sort_gel(dev->gel); + + bbox = fz_bound_gel(dev->gel); + bbox = fz_intersect_bbox(bbox, dev->scissor); + if (rect) + bbox = fz_intersect_bbox(bbox, fz_round_rect(*rect)); + + if (fz_is_empty_rect(bbox) || fz_is_rect_gel(dev->gel)) + { + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = NULL; + dev->stack[dev->top].dest = NULL; + dev->stack[dev->top].shape = dev->shape; + dev->stack[dev->top].blendmode = dev->blendmode; + dev->scissor = bbox; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (rectangular) begin\n"); +#endif + dev->top++; + return; + } + + mask = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(mask); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + if (dev->shape) + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + else + shape = NULL; + + fz_scan_convert(dev->gel, even_odd, bbox, mask, NULL); + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = mask; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (non-rectangular) begin\n"); +#endif + dev->top++; +} + +static void +fz_draw_clip_stroke_path(void *user, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + float expansion = fz_matrix_expansion(ctm); + float flatness = 0.3f / expansion; + float linewidth = stroke->linewidth; + fz_pixmap *mask, *dest, *shape; + fz_bbox bbox; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (linewidth * expansion < 0.1f) + linewidth = 1 / expansion; + + fz_reset_gel(dev->gel, dev->scissor); + if (stroke->dash_len > 0) + fz_flatten_dash_path(dev->gel, path, stroke, ctm, flatness, linewidth); + else + fz_flatten_stroke_path(dev->gel, path, stroke, ctm, flatness, linewidth); + fz_sort_gel(dev->gel); + + bbox = fz_bound_gel(dev->gel); + bbox = fz_intersect_bbox(bbox, dev->scissor); + if (rect) + bbox = fz_intersect_bbox(bbox, fz_round_rect(*rect)); + + mask = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(mask); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + if (dev->shape) + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + else + shape = NULL; + + if (!fz_is_empty_rect(bbox)) + fz_scan_convert(dev->gel, 0, bbox, mask, NULL); + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = mask; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (stroke) begin\n"); +#endif + dev->top++; +} + +static void +draw_glyph(unsigned char *colorbv, fz_pixmap *dst, fz_pixmap *msk, + int xorig, int yorig, fz_bbox scissor) +{ + unsigned char *dp, *mp; + fz_bbox bbox; + int x, y, w, h; + + bbox = fz_bound_pixmap(msk); + bbox.x0 += xorig; + bbox.y0 += yorig; + bbox.x1 += xorig; + bbox.y1 += yorig; + + bbox = fz_intersect_bbox(bbox, scissor); /* scissor < dst */ + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + + mp = msk->samples + ((y - msk->y - yorig) * msk->w + (x - msk->x - xorig)); + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; + + assert(msk->n == 1); + + while (h--) + { + if (dst->colorspace) + fz_paint_span_with_color(dp, mp, dst->n, w, colorbv); + else + fz_paint_span(dp, mp, 1, w, 255); + dp += dst->w * dst->n; + mp += msk->w; + } +} + +static void +fz_draw_fill_text(void *user, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + unsigned char shapebv; + float colorfv[FZ_MAX_COLORS]; + fz_matrix tm, trm; + fz_pixmap *glyph; + int i, x, y, gid; + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + fz_convert_color(colorspace, color, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = alpha * 255; + shapebv = 255; + + tm = text->trm; + + for (i = 0; i < text->len; i++) + { + gid = text->items[i].gid; + if (gid < 0) + continue; + + tm.e = text->items[i].x; + tm.f = text->items[i].y; + trm = fz_concat(tm, ctm); + x = floorf(trm.e); + y = floorf(trm.f); + trm.e = QUANT(trm.e - floorf(trm.e), HSUBPIX); + trm.f = QUANT(trm.f - floorf(trm.f), VSUBPIX); + + glyph = fz_render_glyph(dev->cache, text->font, gid, trm, model); + if (glyph) + { + if (glyph->n == 1) + { + draw_glyph(colorbv, dev->dest, glyph, x, y, dev->scissor); + if (dev->shape) + draw_glyph(&shapebv, dev->shape, glyph, x, y, dev->scissor); + } + else + { + fz_matrix ctm = {glyph->w, 0.0, 0.0, -glyph->h, x + glyph->x, y + glyph->y + glyph->h}; + fz_paint_image(dev->dest, dev->scissor, dev->shape, glyph, ctm, alpha * 255); + } + fz_drop_pixmap(glyph); + } + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + float colorfv[FZ_MAX_COLORS]; + fz_matrix tm, trm; + fz_pixmap *glyph; + int i, x, y, gid; + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + fz_convert_color(colorspace, color, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = alpha * 255; + + tm = text->trm; + + for (i = 0; i < text->len; i++) + { + gid = text->items[i].gid; + if (gid < 0) + continue; + + tm.e = text->items[i].x; + tm.f = text->items[i].y; + trm = fz_concat(tm, ctm); + x = floorf(trm.e); + y = floorf(trm.f); + trm.e = QUANT(trm.e - floorf(trm.e), HSUBPIX); + trm.f = QUANT(trm.f - floorf(trm.f), VSUBPIX); + + glyph = fz_render_stroked_glyph(dev->cache, text->font, gid, trm, ctm, stroke); + if (glyph) + { + draw_glyph(colorbv, dev->dest, glyph, x, y, dev->scissor); + if (dev->shape) + draw_glyph(colorbv, dev->shape, glyph, x, y, dev->scissor); + fz_drop_pixmap(glyph); + } + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_clip_text(void *user, fz_text *text, fz_matrix ctm, int accumulate) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_bbox bbox; + fz_pixmap *mask, *dest, *shape; + fz_matrix tm, trm; + fz_pixmap *glyph; + int i, x, y, gid; + + /* If accumulate == 0 then this text object is guaranteed complete */ + /* If accumulate == 1 then this text object is the first (or only) in a sequence */ + /* If accumulate == 2 then this text object is a continuation */ + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (accumulate == 0) + { + /* make the mask the exact size needed */ + bbox = fz_round_rect(fz_bound_text(text, ctm)); + bbox = fz_intersect_bbox(bbox, dev->scissor); + } + else + { + /* be conservative about the size of the mask needed */ + bbox = dev->scissor; + } + + if (accumulate == 0 || accumulate == 1) + { + mask = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(mask); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + if (dev->shape) + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + else + shape = NULL; + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = mask; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (text) begin\n"); +#endif + dev->top++; + } + else + { + mask = dev->stack[dev->top-1].mask; + } + + if (!fz_is_empty_rect(bbox)) + { + tm = text->trm; + + for (i = 0; i < text->len; i++) + { + gid = text->items[i].gid; + if (gid < 0) + continue; + + tm.e = text->items[i].x; + tm.f = text->items[i].y; + trm = fz_concat(tm, ctm); + x = floorf(trm.e); + y = floorf(trm.f); + trm.e = QUANT(trm.e - floorf(trm.e), HSUBPIX); + trm.f = QUANT(trm.f - floorf(trm.f), VSUBPIX); + + glyph = fz_render_glyph(dev->cache, text->font, gid, trm, model); + if (glyph) + { + draw_glyph(NULL, mask, glyph, x, y, bbox); + if (dev->shape) + draw_glyph(NULL, dev->shape, glyph, x, y, bbox); + fz_drop_pixmap(glyph); + } + } + } +} + +static void +fz_draw_clip_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_bbox bbox; + fz_pixmap *mask, *dest, *shape; + fz_matrix tm, trm; + fz_pixmap *glyph; + int i, x, y, gid; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + /* make the mask the exact size needed */ + bbox = fz_round_rect(fz_bound_text(text, ctm)); + bbox = fz_intersect_bbox(bbox, dev->scissor); + + mask = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(mask); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + if (dev->shape) + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + else + shape = dev->shape; + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = mask; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (stroke text) begin\n"); +#endif + dev->top++; + + if (!fz_is_empty_rect(bbox)) + { + tm = text->trm; + + for (i = 0; i < text->len; i++) + { + gid = text->items[i].gid; + if (gid < 0) + continue; + + tm.e = text->items[i].x; + tm.f = text->items[i].y; + trm = fz_concat(tm, ctm); + x = floorf(trm.e); + y = floorf(trm.f); + trm.e = QUANT(trm.e - floorf(trm.e), HSUBPIX); + trm.f = QUANT(trm.f - floorf(trm.f), VSUBPIX); + + glyph = fz_render_stroked_glyph(dev->cache, text->font, gid, trm, ctm, stroke); + if (glyph) + { + draw_glyph(NULL, mask, glyph, x, y, bbox); + if (dev->shape) + draw_glyph(NULL, dev->shape, glyph, x, y, bbox); + fz_drop_pixmap(glyph); + } + } + } +} + +static void +fz_draw_ignore_text(void *user, fz_text *text, fz_matrix ctm) +{ +} + +static void +fz_draw_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_pixmap *dest = dev->dest; + fz_rect bounds; + fz_bbox bbox, scissor; + float colorfv[FZ_MAX_COLORS]; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + + bounds = fz_bound_shade(shade, ctm); + bbox = fz_intersect_bbox(fz_round_rect(bounds), dev->scissor); + scissor = dev->scissor; + + // TODO: proper clip by shade->bbox + + if (fz_is_empty_rect(bbox)) + return; + + if (!model) + { + fz_warn("cannot render shading directly to an alpha mask"); + return; + } + + if (alpha < 1) + { + dest = fz_new_pixmap_with_rect(dev->dest->colorspace, bbox); + fz_clear_pixmap(dest); + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + if (shade->use_background) + { + unsigned char *s; + int x, y, n, i; + fz_convert_color(shade->colorspace, shade->background, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = 255; + + n = dest->n; + for (y = scissor.y0; y < scissor.y1; y++) + { + s = dest->samples + ((scissor.x0 - dest->x) + (y - dest->y) * dest->w) * dest->n; + for (x = scissor.x0; x < scissor.x1; x++) + { + for (i = 0; i < n; i++) + *s++ = colorbv[i]; + } + } + if (dev->shape) + { + for (y = scissor.y0; y < scissor.y1; y++) + { + s = dev->shape->samples + (scissor.x0 - dev->shape->x) + (y - dev->shape->y) * dev->shape->w; + for (x = scissor.x0; x < scissor.x1; x++) + { + *s++ = 255; + } + } + } + } + + fz_paint_shade(shade, ctm, dest, bbox); + if (dev->shape) + fz_clear_pixmap_rect_with_color(dev->shape, 255, bbox); + + if (alpha < 1) + { + fz_paint_pixmap(dev->dest, dest, alpha * 255); + fz_drop_pixmap(dest); + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static fz_pixmap * +fz_transform_pixmap(fz_pixmap *image, fz_matrix *ctm, int x, int y, int dx, int dy, int gridfit) +{ + fz_pixmap *scaled; + + if (ctm->a != 0 && ctm->b == 0 && ctm->c == 0 && ctm->d != 0) + { + /* Unrotated or X-flip or Y-flip or XY-flip */ + scaled = fz_scale_pixmap_gridfit(image, ctm->e, ctm->f, ctm->a, ctm->d, gridfit); + if (scaled == NULL) + return NULL; + ctm->a = scaled->w; + ctm->d = scaled->h; + ctm->e = scaled->x; + ctm->f = scaled->y; + return scaled; + } + + if (ctm->a == 0 && ctm->b != 0 && ctm->c != 0 && ctm->d == 0) + { + /* Other orthogonal flip/rotation cases */ + scaled = fz_scale_pixmap_gridfit(image, ctm->f, ctm->e, ctm->b, ctm->c, gridfit); + if (scaled == NULL) + return NULL; + ctm->b = scaled->w; + ctm->c = scaled->h; + ctm->f = scaled->x; + ctm->e = scaled->y; + return scaled; + } + + /* Downscale, non rectilinear case */ + if (dx > 0 && dy > 0) + { + scaled = fz_scale_pixmap(image, 0, 0, (float)dx, (float)dy); + return scaled; + } + + return NULL; +} + +static void +fz_draw_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_pixmap *converted = NULL; + fz_pixmap *scaled = NULL; + int after; + int dx, dy; + + if (!model) + { + fz_warn("cannot render image directly to an alpha mask"); + return; + } + + if (image->w == 0 || image->h == 0) + return; + + /* convert images with more components (cmyk->rgb) before scaling */ + /* convert images with fewer components (gray->rgb after scaling */ + /* convert images with expensive colorspace transforms after scaling */ + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + after = 0; + if (image->colorspace == fz_device_gray) + after = 1; + + if (image->colorspace != model && !after) + { + converted = fz_new_pixmap_with_rect(model, fz_bound_pixmap(image)); + fz_convert_pixmap(image, converted); + image = converted; + } + + dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b); + dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d); + if (dx < image->w && dy < image->h) + { + int gridfit = alpha == 1.0f && !(dev->flags & FZ_DRAWDEV_FLAGS_TYPE3); + scaled = fz_transform_pixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy, gridfit); + if (scaled == NULL) + { + if (dx < 1) + dx = 1; + if (dy < 1) + dy = 1; + scaled = fz_scale_pixmap(image, image->x, image->y, dx, dy); + } + if (scaled != NULL) + image = scaled; + } + + if (image->colorspace != model) + { + if ((image->colorspace == fz_device_gray && model == fz_device_rgb) || + (image->colorspace == fz_device_gray && model == fz_device_bgr)) + { + /* We have special case rendering code for gray -> rgb/bgr */ + } + else + { + converted = fz_new_pixmap_with_rect(model, fz_bound_pixmap(image)); + fz_convert_pixmap(image, converted); + image = converted; + } + } + + fz_paint_image(dev->dest, dev->scissor, dev->shape, image, ctm, alpha * 255); + + if (scaled) + fz_drop_pixmap(scaled); + if (converted) + fz_drop_pixmap(converted); + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + unsigned char colorbv[FZ_MAX_COLORS + 1]; + float colorfv[FZ_MAX_COLORS]; + fz_pixmap *scaled = NULL; + int dx, dy; + int i; + + if (image->w == 0 || image->h == 0) + return; + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b); + dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d); + if (dx < image->w && dy < image->h) + { + int gridfit = alpha == 1.0f && !(dev->flags & FZ_DRAWDEV_FLAGS_TYPE3); + scaled = fz_transform_pixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy, gridfit); + if (scaled == NULL) + { + if (dx < 1) + dx = 1; + if (dy < 1) + dy = 1; + scaled = fz_scale_pixmap(image, image->x, image->y, dx, dy); + } + if (scaled != NULL) + image = scaled; + } + + fz_convert_color(colorspace, color, model, colorfv); + for (i = 0; i < model->n; i++) + colorbv[i] = colorfv[i] * 255; + colorbv[i] = alpha * 255; + + fz_paint_image_with_color(dev->dest, dev->scissor, dev->shape, image, ctm, colorbv); + + if (scaled) + fz_drop_pixmap(scaled); + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); +} + +static void +fz_draw_clip_image_mask(void *user, fz_pixmap *image, fz_rect *rect, fz_matrix ctm) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_bbox bbox; + fz_pixmap *mask, *dest, *shape; + fz_pixmap *scaled = NULL; + int dx, dy; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip (image mask) begin\n"); +#endif + + if (image->w == 0 || image->h == 0) + { + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = NULL; + dev->stack[dev->top].dest = NULL; + dev->stack[dev->top].blendmode = dev->blendmode; + dev->scissor = fz_empty_bbox; + dev->top++; + return; + } + + bbox = fz_round_rect(fz_transform_rect(ctm, fz_unit_rect)); + bbox = fz_intersect_bbox(bbox, dev->scissor); + if (rect) + bbox = fz_intersect_bbox(bbox, fz_round_rect(*rect)); + + mask = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(mask); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + if (dev->shape) + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + else + shape = NULL; + + dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b); + dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d); + if (dx < image->w && dy < image->h) + { + int gridfit = !(dev->flags & FZ_DRAWDEV_FLAGS_TYPE3); + scaled = fz_transform_pixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy, gridfit); + if (scaled == NULL) + { + if (dx < 1) + dx = 1; + if (dy < 1) + dy = 1; + scaled = fz_scale_pixmap(image, image->x, image->y, dx, dy); + } + if (scaled != NULL) + image = scaled; + } + + fz_paint_image(mask, bbox, dev->shape, image, ctm, 255); + + if (scaled) + fz_drop_pixmap(scaled); + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = mask; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; + dev->top++; +} + +static void +fz_draw_pop_clip(void *user) +{ + fz_draw_device *dev = user; + fz_pixmap *mask, *dest, *shape; + if (dev->top > 0) + { + dev->top--; + dev->scissor = dev->stack[dev->top].scissor; + mask = dev->stack[dev->top].mask; + dest = dev->stack[dev->top].dest; + shape = dev->stack[dev->top].shape; + dev->blendmode = dev->stack[dev->top].blendmode; + + /* We can get here with mask == NULL if the clipping actually + * resolved to a rectangle earlier. In this case, we will + * have a dest, and the shape will be unchanged. + */ + if (mask) + { + assert(dest); + +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, ""); + fz_dump_blend(dev->dest, "Clipping "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + fz_dump_blend(dest, " onto "); + if (shape) + fz_dump_blend(shape, "/"); + fz_dump_blend(mask, " with "); +#endif + fz_paint_pixmap_with_mask(dest, dev->dest, mask); + if (shape != NULL) + { + assert(shape != dev->shape); + fz_paint_pixmap_with_mask(shape, dev->shape, mask); + fz_drop_pixmap(dev->shape); + dev->shape = shape; + } + fz_drop_pixmap(mask); + fz_drop_pixmap(dev->dest); + dev->dest = dest; +#ifdef DUMP_GROUP_BLENDS + fz_dump_blend(dev->dest, " to get "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + printf("\n"); +#endif + } + else + { +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Clip End\n"); +#endif + assert(dest == NULL); + assert(shape == dev->shape); + } + } +} + +static void +fz_draw_begin_mask(void *user, fz_rect rect, int luminosity, fz_colorspace *colorspace, float *colorfv) +{ + fz_draw_device *dev = user; + fz_pixmap *dest; + fz_pixmap *shape = dev->shape; + fz_bbox bbox; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + bbox = fz_round_rect(rect); + bbox = fz_intersect_bbox(bbox, dev->scissor); + dest = fz_new_pixmap_with_rect(fz_device_gray, bbox); + if (dev->shape) + { + /* FIXME: If we ever want to support AIS true, then we + * probably want to create a shape pixmap here, using: + * shape = fz_new_pixmap_with_rect(NULL, bbox); + * then, in the end_mask code, we create the mask from this + * rather than dest. + */ + shape = NULL; + } + + if (luminosity) + { + float bc; + if (!colorspace) + colorspace = fz_device_gray; + fz_convert_color(colorspace, colorfv, fz_device_gray, &bc); + fz_clear_pixmap_with_color(dest, bc * 255); + if (shape) + fz_clear_pixmap_with_color(shape, 255); + } + else + { + fz_clear_pixmap(dest); + if (shape) + fz_clear_pixmap(shape); + } + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].luminosity = luminosity; + dev->stack[dev->top].shape = dev->shape; + dev->stack[dev->top].blendmode = dev->blendmode; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Mask begin\n"); +#endif + dev->top++; + + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; +} + +static void +fz_draw_end_mask(void *user) +{ + fz_draw_device *dev = user; + fz_pixmap *mask = dev->dest; + fz_pixmap *maskshape = dev->shape; + fz_pixmap *temp, *dest; + fz_bbox bbox; + int luminosity; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (dev->top > 0) + { + /* pop soft mask buffer */ + dev->top--; + luminosity = dev->stack[dev->top].luminosity; + dev->scissor = dev->stack[dev->top].scissor; + dev->dest = dev->stack[dev->top].dest; + dev->shape = dev->stack[dev->top].shape; + + /* convert to alpha mask */ + temp = fz_alpha_from_gray(mask, luminosity); + fz_drop_pixmap(mask); + fz_drop_pixmap(maskshape); + + /* create new dest scratch buffer */ + bbox = fz_bound_pixmap(temp); + dest = fz_new_pixmap_with_rect(dev->dest->colorspace, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + + /* push soft mask as clip mask */ + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].mask = temp; + dev->stack[dev->top].dest = dev->dest; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + /* If we have a shape, then it'll need to be masked with the + * clip mask when we pop. So create a new shape now. */ + if (dev->shape) + { + dev->stack[dev->top].shape = dev->shape; + dev->shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(dev->shape); + } + dev->scissor = bbox; + dev->dest = dest; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Mask -> Clip\n"); +#endif + dev->top++; + } +} + +static void +fz_draw_begin_group(void *user, fz_rect rect, int isolated, int knockout, int blendmode, float alpha) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_bbox bbox; + fz_pixmap *dest, *shape; + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + bbox = fz_round_rect(rect); + bbox = fz_intersect_bbox(bbox, dev->scissor); + dest = fz_new_pixmap_with_rect(model, bbox); + +#ifndef ATTEMPT_KNOCKOUT_AND_ISOLATED + knockout = 0; + isolated = 1; +#endif + + if (isolated) + { + fz_clear_pixmap(dest); + } + else + { + fz_copy_pixmap_rect(dest, dev->dest, bbox); + } + + if (blendmode == 0 && alpha == 1.0 && isolated) + { + /* We can render direct to any existing shape plane. If there + * isn't one, we don't need to make one. */ + shape = dev->shape; + } + else + { + shape = fz_new_pixmap_with_rect(NULL, bbox); + fz_clear_pixmap(shape); + } + + dev->stack[dev->top].alpha = alpha; + dev->stack[dev->top].blendmode = dev->blendmode; + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Group Begin\n"); +#endif + dev->top++; + + dev->scissor = bbox; + dev->dest = dest; + dev->shape = shape; + dev->blendmode = blendmode | (isolated ? FZ_BLEND_ISOLATED : 0) | (knockout ? FZ_BLEND_KNOCKOUT : 0); +} + +static void +fz_draw_end_group(void *user) +{ + fz_draw_device *dev = user; + fz_pixmap *group = dev->dest; + fz_pixmap *shape = dev->shape; + int blendmode; + int isolated; + float alpha; + + if (dev->top > 0) + { + dev->top--; + alpha = dev->stack[dev->top].alpha; + blendmode = dev->blendmode & FZ_BLEND_MODEMASK; + isolated = dev->blendmode & FZ_BLEND_ISOLATED; + dev->blendmode = dev->stack[dev->top].blendmode; + dev->shape = dev->stack[dev->top].shape; + dev->dest = dev->stack[dev->top].dest; + dev->scissor = dev->stack[dev->top].scissor; + +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, ""); + fz_dump_blend(group, "Blending "); + if (shape) + fz_dump_blend(shape, "/"); + fz_dump_blend(dev->dest, " onto "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + if (alpha != 1.0f) + printf(" (alpha %g)", alpha); + if (blendmode != 0) + printf(" (blend %d)", blendmode); + if (isolated != 0) + printf(" (isolated)"); + if (blendmode & FZ_BLEND_KNOCKOUT) + printf(" (knockout)"); +#endif + if ((blendmode == 0) && (shape == NULL)) + fz_paint_pixmap(dev->dest, group, alpha * 255); + else + fz_blend_pixmap(dev->dest, group, alpha * 255, blendmode, isolated, shape); + + fz_drop_pixmap(group); + if (shape != dev->shape) + { + if (dev->shape) + { + fz_paint_pixmap(dev->shape, shape, alpha * 255); + } + fz_drop_pixmap(shape); + } +#ifdef DUMP_GROUP_BLENDS + fz_dump_blend(dev->dest, " to get "); + if (dev->shape) + fz_dump_blend(dev->shape, "/"); + printf("\n"); +#endif + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_end(dev); +} + +static void +fz_draw_begin_tile(void *user, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) +{ + fz_draw_device *dev = user; + fz_colorspace *model = dev->dest->colorspace; + fz_pixmap *dest; + fz_bbox bbox; + + /* area, view, xstep, ystep are in pattern space */ + /* ctm maps from pattern space to device space */ + + if (dev->top == STACK_SIZE) + { + fz_warn("assert: too many buffers on stack"); + return; + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); + + bbox = fz_round_rect(fz_transform_rect(ctm, view)); + dest = fz_new_pixmap_with_rect(model, bbox); + /* FIXME: See note #1 */ + fz_clear_pixmap(dest); + + dev->stack[dev->top].scissor = dev->scissor; + dev->stack[dev->top].dest = dev->dest; + dev->stack[dev->top].shape = dev->shape; + /* FIXME: See note #1 */ + dev->stack[dev->top].blendmode = dev->blendmode | FZ_BLEND_ISOLATED; + dev->stack[dev->top].xstep = xstep; + dev->stack[dev->top].ystep = ystep; + dev->stack[dev->top].area = area; + dev->stack[dev->top].ctm = ctm; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Tile begin\n"); +#endif + dev->top++; + + dev->scissor = bbox; + dev->dest = dest; +} + +static void +fz_draw_end_tile(void *user) +{ + fz_draw_device *dev = user; + fz_pixmap *tile = dev->dest; + float xstep, ystep; + fz_matrix ctm, ttm; + fz_rect area; + int x0, y0, x1, y1, x, y; + + if (dev->top > 0) + { + dev->top--; +#ifdef DUMP_GROUP_BLENDS + dump_spaces(dev->top, "Tile end\n"); +#endif + xstep = dev->stack[dev->top].xstep; + ystep = dev->stack[dev->top].ystep; + area = dev->stack[dev->top].area; + ctm = dev->stack[dev->top].ctm; + dev->scissor = dev->stack[dev->top].scissor; + dev->dest = dev->stack[dev->top].dest; + dev->blendmode = dev->stack[dev->top].blendmode; + + + x0 = floorf(area.x0 / xstep); + y0 = floorf(area.y0 / ystep); + x1 = ceilf(area.x1 / xstep); + y1 = ceilf(area.y1 / ystep); + + ctm.e = tile->x; + ctm.f = tile->y; + + for (y = y0; y < y1; y++) + { + for (x = x0; x < x1; x++) + { + ttm = fz_concat(fz_translate(x * xstep, y * ystep), ctm); + tile->x = ttm.e; + tile->y = ttm.f; + fz_paint_pixmap_with_rect(dev->dest, tile, 255, dev->scissor); + } + } + + fz_drop_pixmap(tile); + } + + if (dev->blendmode & FZ_BLEND_KNOCKOUT) + fz_knockout_begin(dev); +} + +static void +fz_draw_free_user(void *user) +{ + fz_draw_device *dev = user; + /* TODO: pop and free the stacks */ + if (dev->top > 0) + fz_warn("items left on stack in draw device: %d", dev->top); + fz_free_gel(dev->gel); + fz_free(dev); +} + +fz_device * +fz_new_draw_device(fz_glyph_cache *cache, fz_pixmap *dest) +{ + fz_device *dev; + fz_draw_device *ddev = fz_malloc(sizeof(fz_draw_device)); + ddev->cache = cache; + ddev->gel = fz_new_gel(); + ddev->dest = dest; + ddev->shape = NULL; + ddev->top = 0; + ddev->blendmode = 0; + ddev->flags = 0; + + ddev->scissor.x0 = dest->x; + ddev->scissor.y0 = dest->y; + ddev->scissor.x1 = dest->x + dest->w; + ddev->scissor.y1 = dest->y + dest->h; + + dev = fz_new_device(ddev); + dev->free_user = fz_draw_free_user; + + dev->fill_path = fz_draw_fill_path; + dev->stroke_path = fz_draw_stroke_path; + dev->clip_path = fz_draw_clip_path; + dev->clip_stroke_path = fz_draw_clip_stroke_path; + + dev->fill_text = fz_draw_fill_text; + dev->stroke_text = fz_draw_stroke_text; + dev->clip_text = fz_draw_clip_text; + dev->clip_stroke_text = fz_draw_clip_stroke_text; + dev->ignore_text = fz_draw_ignore_text; + + dev->fill_image_mask = fz_draw_fill_image_mask; + dev->clip_image_mask = fz_draw_clip_image_mask; + dev->fill_image = fz_draw_fill_image; + dev->fill_shade = fz_draw_fill_shade; + + dev->pop_clip = fz_draw_pop_clip; + + dev->begin_mask = fz_draw_begin_mask; + dev->end_mask = fz_draw_end_mask; + dev->begin_group = fz_draw_begin_group; + dev->end_group = fz_draw_end_group; + + dev->begin_tile = fz_draw_begin_tile; + dev->end_tile = fz_draw_end_tile; + + return dev; +} + +fz_device * +fz_new_draw_device_type3(fz_glyph_cache *cache, fz_pixmap *dest) +{ + fz_device *dev = fz_new_draw_device(cache, dest); + fz_draw_device *ddev = dev->user; + ddev->flags |= FZ_DRAWDEV_FLAGS_TYPE3; + return dev; +} diff --git a/contrib/media/updf/draw/draw_edge.c b/contrib/media/updf/draw/draw_edge.c new file mode 100644 index 0000000000..123c3268d6 --- /dev/null +++ b/contrib/media/updf/draw/draw_edge.c @@ -0,0 +1,735 @@ +#include "fitz.h" + +#define BBOX_MIN -(1<<20) +#define BBOX_MAX (1<<20) + +/* divide and floor towards -inf */ +static inline int fz_idiv(int a, int b) +{ + return a < 0 ? (a - b + 1) / b : a / b; +} + +/* If AA_BITS is defined, then we assume constant N bits of antialiasing. We + * will attempt to provide at least that number of bits of accuracy in the + * antialiasing (to a maximum of 8). If it is defined to be 0 then no + * antialiasing is done. If it is undefined to we will leave the antialiasing + * accuracy as a run time choice. + */ + +#ifndef AA_BITS +#define AA_SCALE(x) ((x * fz_aa_scale) >> 8) +static int fz_aa_hscale = 17; +static int fz_aa_vscale = 15; +static int fz_aa_scale = 256; +static int fz_aa_level = 8; + +#elif AA_BITS > 6 +#define AA_SCALE(x) (x) +#define fz_aa_hscale 17 +#define fz_aa_vscale 15 +#define fz_aa_level 8 + +#elif AA_BITS > 4 +#define AA_SCALE(x) ((x * 255) >> 6) +#define fz_aa_hscale 8 +#define fz_aa_vscale 8 +#define fz_aa_level 6 + +#elif AA_BITS > 2 +#define AA_SCALE(x) (x * 17) +#define fz_aa_hscale 5 +#define fz_aa_vscale 3 +#define fz_aa_level 4 + +#elif AA_BITS > 0 +#define AA_SCALE(x) ((x * 255) >> 2) +#define fz_aa_hscale 2 +#define fz_aa_vscale 2 +#define fz_aa_level 2 + +#else +#define AA_SCALE(x) (x * 255) +#define fz_aa_hscale 1 +#define fz_aa_vscale 1 +#define fz_aa_level 0 + +#endif + +int +fz_get_aa_level(void) +{ + return fz_aa_level; +} + +void +fz_set_aa_level(int level) +{ +#ifdef AA_BITS + fz_warn("anti-aliasing was compiled with a fixed precision of %d bits", fz_aa_level); +#else + if (level > 6) + { + fz_aa_hscale = 17; + fz_aa_vscale = 15; + fz_aa_level = 8; + } + else if (level > 4) + { + fz_aa_hscale = 8; + fz_aa_vscale = 8; + fz_aa_level = 6; + } + else if (level > 2) + { + fz_aa_hscale = 5; + fz_aa_vscale = 3; + fz_aa_level = 4; + } + else if (level > 0) + { + fz_aa_hscale = 2; + fz_aa_vscale = 2; + fz_aa_level = 2; + } + else + { + fz_aa_hscale = 1; + fz_aa_vscale = 1; + fz_aa_level = 0; + } + fz_aa_scale = 0xFF00 / (fz_aa_hscale * fz_aa_vscale); +#endif +} + +/* + * Global Edge List -- list of straight path segments for scan conversion + * + * Stepping along the edges is with bresenham's line algorithm. + * + * See Mike Abrash -- Graphics Programming Black Book (notably chapter 40) + */ + +typedef struct fz_edge_s fz_edge; + +struct fz_edge_s +{ + int x, e, h, y; + int adj_up, adj_down; + int xmove; + int xdir, ydir; /* -1 or +1 */ +}; + +struct fz_gel_s +{ + fz_bbox clip; + fz_bbox bbox; + int cap, len; + fz_edge *edges; + int acap, alen; + fz_edge **active; +}; + +fz_gel * +fz_new_gel(void) +{ + fz_gel *gel; + + gel = fz_malloc(sizeof(fz_gel)); + gel->cap = 512; + gel->len = 0; + gel->edges = fz_calloc(gel->cap, sizeof(fz_edge)); + + gel->clip.x0 = gel->clip.y0 = BBOX_MAX; + gel->clip.x1 = gel->clip.y1 = BBOX_MIN; + + gel->bbox.x0 = gel->bbox.y0 = BBOX_MAX; + gel->bbox.x1 = gel->bbox.y1 = BBOX_MIN; + + gel->acap = 64; + gel->alen = 0; + gel->active = fz_calloc(gel->acap, sizeof(fz_edge*)); + + return gel; +} + +void +fz_reset_gel(fz_gel *gel, fz_bbox clip) +{ + if (fz_is_infinite_rect(clip)) + { + gel->clip.x0 = gel->clip.y0 = BBOX_MAX; + gel->clip.x1 = gel->clip.y1 = BBOX_MIN; + } + else { + gel->clip.x0 = clip.x0 * fz_aa_hscale; + gel->clip.x1 = clip.x1 * fz_aa_hscale; + gel->clip.y0 = clip.y0 * fz_aa_vscale; + gel->clip.y1 = clip.y1 * fz_aa_vscale; + } + + gel->bbox.x0 = gel->bbox.y0 = BBOX_MAX; + gel->bbox.x1 = gel->bbox.y1 = BBOX_MIN; + + gel->len = 0; +} + +void +fz_free_gel(fz_gel *gel) +{ + fz_free(gel->active); + fz_free(gel->edges); + fz_free(gel); +} + +fz_bbox +fz_bound_gel(fz_gel *gel) +{ + fz_bbox bbox; + if (gel->len == 0) + return fz_empty_bbox; + bbox.x0 = fz_idiv(gel->bbox.x0, fz_aa_hscale); + bbox.y0 = fz_idiv(gel->bbox.y0, fz_aa_vscale); + bbox.x1 = fz_idiv(gel->bbox.x1, fz_aa_hscale) + 1; + bbox.y1 = fz_idiv(gel->bbox.y1, fz_aa_vscale) + 1; + return bbox; +} + +enum { INSIDE, OUTSIDE, LEAVE, ENTER }; + +#define clip_lerp_y(v,m,x0,y0,x1,y1,t) clip_lerp_x(v,m,y0,x0,y1,x1,t) + +static int +clip_lerp_x(int val, int m, int x0, int y0, int x1, int y1, int *out) +{ + int v0out = m ? x0 > val : x0 < val; + int v1out = m ? x1 > val : x1 < val; + + if (v0out + v1out == 0) + return INSIDE; + + if (v0out + v1out == 2) + return OUTSIDE; + + if (v1out) + { + *out = y0 + (y1 - y0) * (val - x0) / (x1 - x0); + return LEAVE; + } + + else + { + *out = y1 + (y0 - y1) * (val - x1) / (x0 - x1); + return ENTER; + } +} + +static void +fz_insert_gel_raw(fz_gel *gel, int x0, int y0, int x1, int y1) +{ + fz_edge *edge; + int dx, dy; + int winding; + int width; + int tmp; + + if (y0 == y1) + return; + + if (y0 > y1) { + winding = -1; + tmp = x0; x0 = x1; x1 = tmp; + tmp = y0; y0 = y1; y1 = tmp; + } + else + winding = 1; + + if (x0 < gel->bbox.x0) gel->bbox.x0 = x0; + if (x0 > gel->bbox.x1) gel->bbox.x1 = x0; + if (x1 < gel->bbox.x0) gel->bbox.x0 = x1; + if (x1 > gel->bbox.x1) gel->bbox.x1 = x1; + + if (y0 < gel->bbox.y0) gel->bbox.y0 = y0; + if (y1 > gel->bbox.y1) gel->bbox.y1 = y1; + + if (gel->len + 1 == gel->cap) { + gel->cap = gel->cap + 512; + gel->edges = fz_realloc(gel->edges, gel->cap, sizeof(fz_edge)); + } + + edge = &gel->edges[gel->len++]; + + dy = y1 - y0; + dx = x1 - x0; + width = ABS(dx); + + edge->xdir = dx > 0 ? 1 : -1; + edge->ydir = winding; + edge->x = x0; + edge->y = y0; + edge->h = dy; + edge->adj_down = dy; + + /* initial error term going l->r and r->l */ + if (dx >= 0) + edge->e = 0; + else + edge->e = -dy + 1; + + /* y-major edge */ + if (dy >= width) { + edge->xmove = 0; + edge->adj_up = width; + } + + /* x-major edge */ + else { + edge->xmove = (width / dy) * edge->xdir; + edge->adj_up = width % dy; + } +} + +void +fz_insert_gel(fz_gel *gel, float fx0, float fy0, float fx1, float fy1) +{ + int x0, y0, x1, y1; + int d, v; + + fx0 = floorf(fx0 * fz_aa_hscale); + fx1 = floorf(fx1 * fz_aa_hscale); + fy0 = floorf(fy0 * fz_aa_vscale); + fy1 = floorf(fy1 * fz_aa_vscale); + + x0 = CLAMP(fx0, BBOX_MIN, BBOX_MAX); + y0 = CLAMP(fy0, BBOX_MIN, BBOX_MAX); + x1 = CLAMP(fx1, BBOX_MIN, BBOX_MAX); + y1 = CLAMP(fy1, BBOX_MIN, BBOX_MAX); + + d = clip_lerp_y(gel->clip.y0, 0, x0, y0, x1, y1, &v); + if (d == OUTSIDE) return; + if (d == LEAVE) { y1 = gel->clip.y0; x1 = v; } + if (d == ENTER) { y0 = gel->clip.y0; x0 = v; } + + d = clip_lerp_y(gel->clip.y1, 1, x0, y0, x1, y1, &v); + if (d == OUTSIDE) return; + if (d == LEAVE) { y1 = gel->clip.y1; x1 = v; } + if (d == ENTER) { y0 = gel->clip.y1; x0 = v; } + + d = clip_lerp_x(gel->clip.x0, 0, x0, y0, x1, y1, &v); + if (d == OUTSIDE) { + x0 = x1 = gel->clip.x0; + } + if (d == LEAVE) { + fz_insert_gel_raw(gel, gel->clip.x0, v, gel->clip.x0, y1); + x1 = gel->clip.x0; + y1 = v; + } + if (d == ENTER) { + fz_insert_gel_raw(gel, gel->clip.x0, y0, gel->clip.x0, v); + x0 = gel->clip.x0; + y0 = v; + } + + d = clip_lerp_x(gel->clip.x1, 1, x0, y0, x1, y1, &v); + if (d == OUTSIDE) { + x0 = x1 = gel->clip.x1; + } + if (d == LEAVE) { + fz_insert_gel_raw(gel, gel->clip.x1, v, gel->clip.x1, y1); + x1 = gel->clip.x1; + y1 = v; + } + if (d == ENTER) { + fz_insert_gel_raw(gel, gel->clip.x1, y0, gel->clip.x1, v); + x0 = gel->clip.x1; + y0 = v; + } + + fz_insert_gel_raw(gel, x0, y0, x1, y1); +} + +void +fz_sort_gel(fz_gel *gel) +{ + fz_edge *a = gel->edges; + int n = gel->len; + + int h, i, k; + fz_edge t; + + h = 1; + if (n < 14) { + h = 1; + } + else { + while (h < n) + h = 3 * h + 1; + h /= 3; + h /= 3; + } + + while (h > 0) + { + for (i = 0; i < n; i++) { + t = a[i]; + k = i - h; + /* TODO: sort on y major, x minor */ + while (k >= 0 && a[k].y > t.y) { + a[k + h] = a[k]; + k -= h; + } + a[k + h] = t; + } + + h /= 3; + } +} + +int +fz_is_rect_gel(fz_gel *gel) +{ + /* a rectangular path is converted into two vertical edges of identical height */ + if (gel->len == 2) + { + fz_edge *a = gel->edges + 0; + fz_edge *b = gel->edges + 1; + return a->y == b->y && a->h == b->h && + a->xmove == 0 && a->adj_up == 0 && + b->xmove == 0 && b->adj_up == 0; + } + return 0; +} + +/* + * Active Edge List -- keep track of active edges while sweeping + */ + +static void +sort_active(fz_edge **a, int n) +{ + int h, i, k; + fz_edge *t; + + h = 1; + if (n < 14) { + h = 1; + } + else { + while (h < n) + h = 3 * h + 1; + h /= 3; + h /= 3; + } + + while (h > 0) + { + for (i = 0; i < n; i++) { + t = a[i]; + k = i - h; + while (k >= 0 && a[k]->x > t->x) { + a[k + h] = a[k]; + k -= h; + } + a[k + h] = t; + } + + h /= 3; + } +} + +static void +insert_active(fz_gel *gel, int y, int *e) +{ + /* insert edges that start here */ + while (*e < gel->len && gel->edges[*e].y == y) { + if (gel->alen + 1 == gel->acap) { + int newcap = gel->acap + 64; + fz_edge **newactive = fz_realloc(gel->active, newcap, sizeof(fz_edge*)); + gel->active = newactive; + gel->acap = newcap; + } + gel->active[gel->alen++] = &gel->edges[(*e)++]; + } + + /* shell-sort the edges by increasing x */ + sort_active(gel->active, gel->alen); +} + +static void +advance_active(fz_gel *gel) +{ + fz_edge *edge; + int i = 0; + + while (i < gel->alen) + { + edge = gel->active[i]; + + edge->h --; + + /* terminator! */ + if (edge->h == 0) { + gel->active[i] = gel->active[--gel->alen]; + } + + else { + edge->x += edge->xmove; + edge->e += edge->adj_up; + if (edge->e > 0) { + edge->x += edge->xdir; + edge->e -= edge->adj_down; + } + i ++; + } + } +} + +/* + * Anti-aliased scan conversion. + */ + +static inline void add_span_aa(int *list, int x0, int x1, int xofs) +{ + int x0pix, x0sub; + int x1pix, x1sub; + + if (x0 == x1) + return; + + /* x between 0 and width of bbox */ + x0 -= xofs; + x1 -= xofs; + + x0pix = x0 / fz_aa_hscale; + x0sub = x0 % fz_aa_hscale; + x1pix = x1 / fz_aa_hscale; + x1sub = x1 % fz_aa_hscale; + + if (x0pix == x1pix) + { + list[x0pix] += x1sub - x0sub; + list[x0pix+1] += x0sub - x1sub; + } + + else + { + list[x0pix] += fz_aa_hscale - x0sub; + list[x0pix+1] += x0sub; + list[x1pix] += x1sub - fz_aa_hscale; + list[x1pix+1] += -x1sub; + } +} + +static inline void non_zero_winding_aa(fz_gel *gel, int *list, int xofs) +{ + int winding = 0; + int x = 0; + int i; + for (i = 0; i < gel->alen; i++) + { + if (!winding && (winding + gel->active[i]->ydir)) + x = gel->active[i]->x; + if (winding && !(winding + gel->active[i]->ydir)) + add_span_aa(list, x, gel->active[i]->x, xofs); + winding += gel->active[i]->ydir; + } +} + +static inline void even_odd_aa(fz_gel *gel, int *list, int xofs) +{ + int even = 0; + int x = 0; + int i; + for (i = 0; i < gel->alen; i++) + { + if (!even) + x = gel->active[i]->x; + else + add_span_aa(list, x, gel->active[i]->x, xofs); + even = !even; + } +} + +static inline void undelta_aa(unsigned char * restrict out, int * restrict in, int n) +{ + int d = 0; + while (n--) + { + d += *in++; + *out++ = AA_SCALE(d); + } +} + +static inline void blit_aa(fz_pixmap *dst, int x, int y, + unsigned char *mp, int w, unsigned char *color) +{ + unsigned char *dp; + dp = dst->samples + ( (y - dst->y) * dst->w + (x - dst->x) ) * dst->n; + if (color) + fz_paint_span_with_color(dp, mp, dst->n, w, color); + else + fz_paint_span(dp, mp, 1, w, 255); +} + +static void +fz_scan_convert_aa(fz_gel *gel, int eofill, fz_bbox clip, + fz_pixmap *dst, unsigned char *color) +{ + unsigned char *alphas; + int *deltas; + int y, e; + int yd, yc; + + int xmin = fz_idiv(gel->bbox.x0, fz_aa_hscale); + int xmax = fz_idiv(gel->bbox.x1, fz_aa_hscale) + 1; + + int xofs = xmin * fz_aa_hscale; + + int skipx = clip.x0 - xmin; + int clipn = clip.x1 - clip.x0; + + if (gel->len == 0) + return; + + assert(clip.x0 >= xmin); + assert(clip.x1 <= xmax); + + alphas = fz_malloc(xmax - xmin + 1); + deltas = fz_malloc((xmax - xmin + 1) * sizeof(int)); + memset(deltas, 0, (xmax - xmin + 1) * sizeof(int)); + + e = 0; + y = gel->edges[0].y; + yc = fz_idiv(y, fz_aa_vscale); + yd = yc; + + while (gel->alen > 0 || e < gel->len) + { + yc = fz_idiv(y, fz_aa_vscale); + if (yc != yd) + { + if (yd >= clip.y0 && yd < clip.y1) + { + undelta_aa(alphas, deltas, skipx + clipn); + blit_aa(dst, xmin + skipx, yd, alphas + skipx, clipn, color); + memset(deltas, 0, (skipx + clipn) * sizeof(int)); + } + } + yd = yc; + + insert_active(gel, y, &e); + + if (yd >= clip.y0 && yd < clip.y1) + { + if (eofill) + even_odd_aa(gel, deltas, xofs); + else + non_zero_winding_aa(gel, deltas, xofs); + } + + advance_active(gel); + + if (gel->alen > 0) + y ++; + else if (e < gel->len) + y = gel->edges[e].y; + } + + if (yd >= clip.y0 && yd < clip.y1) + { + undelta_aa(alphas, deltas, skipx + clipn); + blit_aa(dst, xmin + skipx, yd, alphas + skipx, clipn, color); + } + + fz_free(deltas); + fz_free(alphas); +} + +/* + * Sharp (not anti-aliased) scan conversion + */ + +static inline void blit_sharp(int x0, int x1, int y, + fz_bbox clip, fz_pixmap *dst, unsigned char *color) +{ + unsigned char *dp; + x0 = CLAMP(x0, dst->x, dst->x + dst->w); + x1 = CLAMP(x1, dst->x, dst->x + dst->w); + if (x0 < x1) + { + dp = dst->samples + ( (y - dst->y) * dst->w + (x0 - dst->x) ) * dst->n; + if (color) + fz_paint_solid_color(dp, dst->n, x1 - x0, color); + else + fz_paint_solid_alpha(dp, x1 - x0, 255); + } +} + +static inline void non_zero_winding_sharp(fz_gel *gel, int y, + fz_bbox clip, fz_pixmap *dst, unsigned char *color) +{ + int winding = 0; + int x = 0; + int i; + for (i = 0; i < gel->alen; i++) + { + if (!winding && (winding + gel->active[i]->ydir)) + x = gel->active[i]->x; + if (winding && !(winding + gel->active[i]->ydir)) + blit_sharp(x, gel->active[i]->x, y, clip, dst, color); + winding += gel->active[i]->ydir; + } +} + +static inline void even_odd_sharp(fz_gel *gel, int y, + fz_bbox clip, fz_pixmap *dst, unsigned char *color) +{ + int even = 0; + int x = 0; + int i; + for (i = 0; i < gel->alen; i++) + { + if (!even) + x = gel->active[i]->x; + else + blit_sharp(x, gel->active[i]->x, y, clip, dst, color); + even = !even; + } +} + +static void +fz_scan_convert_sharp(fz_gel *gel, int eofill, fz_bbox clip, + fz_pixmap *dst, unsigned char *color) +{ + int e = 0; + int y = gel->edges[0].y; + + while (gel->alen > 0 || e < gel->len) + { + insert_active(gel, y, &e); + + if (y >= clip.y0 && y < clip.y1) + { + if (eofill) + even_odd_sharp(gel, y, clip, dst, color); + else + non_zero_winding_sharp(gel, y, clip, dst, color); + } + + advance_active(gel); + + if (gel->alen > 0) + y ++; + else if (e < gel->len) + y = gel->edges[e].y; + } +} + +void +fz_scan_convert(fz_gel *gel, int eofill, fz_bbox clip, + fz_pixmap *dst, unsigned char *color) +{ + if (fz_aa_level > 0) + fz_scan_convert_aa(gel, eofill, clip, dst, color); + else + fz_scan_convert_sharp(gel, eofill, clip, dst, color); +} diff --git a/contrib/media/updf/draw/draw_glyph.c b/contrib/media/updf/draw/draw_glyph.c new file mode 100644 index 0000000000..95f3955d82 --- /dev/null +++ b/contrib/media/updf/draw/draw_glyph.c @@ -0,0 +1,134 @@ +#include "fitz.h" + +#define MAX_FONT_SIZE 1000 +#define MAX_GLYPH_SIZE 256 +#define MAX_CACHE_SIZE (1024*1024) + +typedef struct fz_glyph_key_s fz_glyph_key; + +struct fz_glyph_cache_s +{ + fz_hash_table *hash; + int total; +}; + +struct fz_glyph_key_s +{ + fz_font *font; + int a, b; + int c, d; + unsigned short gid; + unsigned char e, f; +}; + +fz_glyph_cache * +fz_new_glyph_cache(void) +{ + fz_glyph_cache *cache; + + cache = fz_malloc(sizeof(fz_glyph_cache)); + cache->hash = fz_new_hash_table(509, sizeof(fz_glyph_key)); + cache->total = 0; + + return cache; +} + +static void +fz_evict_glyph_cache(fz_glyph_cache *cache) +{ + fz_glyph_key *key; + fz_pixmap *pixmap; + int i; + + for (i = 0; i < fz_hash_len(cache->hash); i++) + { + key = fz_hash_get_key(cache->hash, i); + if (key->font) + fz_drop_font(key->font); + pixmap = fz_hash_get_val(cache->hash, i); + if (pixmap) + fz_drop_pixmap(pixmap); + } + + cache->total = 0; + + fz_empty_hash(cache->hash); +} + +void +fz_free_glyph_cache(fz_glyph_cache *cache) +{ + fz_evict_glyph_cache(cache); + fz_free_hash(cache->hash); + fz_free(cache); +} + +fz_pixmap * +fz_render_stroked_glyph(fz_glyph_cache *cache, fz_font *font, int gid, fz_matrix trm, fz_matrix ctm, fz_stroke_state *stroke) +{ + if (font->ft_face) + return fz_render_ft_stroked_glyph(font, gid, trm, ctm, stroke); + return fz_render_glyph(cache, font, gid, trm, NULL); +} + +fz_pixmap * +fz_render_glyph(fz_glyph_cache *cache, fz_font *font, int gid, fz_matrix ctm, fz_colorspace *model) +{ + fz_glyph_key key; + fz_pixmap *val; + float size = fz_matrix_expansion(ctm); + + if (size > MAX_FONT_SIZE) + { + /* TODO: this case should be handled by rendering glyph as a path fill */ + fz_warn("font size too large (%g), not rendering glyph", size); + return NULL; + } + + memset(&key, 0, sizeof key); + key.font = font; + key.gid = gid; + key.a = ctm.a * 65536; + key.b = ctm.b * 65536; + key.c = ctm.c * 65536; + key.d = ctm.d * 65536; + key.e = (ctm.e - floorf(ctm.e)) * 256; + key.f = (ctm.f - floorf(ctm.f)) * 256; + + val = fz_hash_find(cache->hash, &key); + if (val) + return fz_keep_pixmap(val); + + ctm.e = floorf(ctm.e) + key.e / 256.0f; + ctm.f = floorf(ctm.f) + key.f / 256.0f; + + if (font->ft_face) + { + val = fz_render_ft_glyph(font, gid, ctm); + } + else if (font->t3procs) + { + val = fz_render_t3_glyph(font, gid, ctm, model); + } + else + { + fz_warn("assert: uninitialized font structure"); + return NULL; + } + + if (val) + { + if (val->w < MAX_GLYPH_SIZE && val->h < MAX_GLYPH_SIZE) + { + if (cache->total + val->w * val->h > MAX_CACHE_SIZE) + fz_evict_glyph_cache(cache); + fz_keep_font(key.font); + fz_hash_insert(cache->hash, &key, val); + cache->total += val->w * val->h; + return fz_keep_pixmap(val); + } + return val; + } + + return NULL; +} diff --git a/contrib/media/updf/draw/draw_mesh.c b/contrib/media/updf/draw/draw_mesh.c new file mode 100644 index 0000000000..4254cb649c --- /dev/null +++ b/contrib/media/updf/draw/draw_mesh.c @@ -0,0 +1,574 @@ +#include "fitz.h" + +/* + * polygon clipping + */ + +enum { IN, OUT, ENTER, LEAVE }; +enum { MAXV = 3 + 4 }; +enum { MAXN = 2 + FZ_MAX_COLORS }; + +static int clipx(float val, int ismax, float *v1, float *v2, int n) +{ + float t; + int i; + int v1o = ismax ? v1[0] > val : v1[0] < val; + int v2o = ismax ? v2[0] > val : v2[0] < val; + if (v1o + v2o == 0) + return IN; + if (v1o + v2o == 2) + return OUT; + if (v2o) + { + t = (val - v1[0]) / (v2[0] - v1[0]); + v2[0] = val; + v2[1] = v1[1] + t * (v2[1] - v1[1]); + for (i = 2; i < n; i++) + v2[i] = v1[i] + t * (v2[i] - v1[i]); + return LEAVE; + } + else + { + t = (val - v2[0]) / (v1[0] - v2[0]); + v1[0] = val; + v1[1] = v2[1] + t * (v1[1] - v2[1]); + for (i = 2; i < n; i++) + v1[i] = v2[i] + t * (v1[i] - v2[i]); + return ENTER; + } +} + +static int clipy(float val, int ismax, float *v1, float *v2, int n) +{ + float t; + int i; + int v1o = ismax ? v1[1] > val : v1[1] < val; + int v2o = ismax ? v2[1] > val : v2[1] < val; + if (v1o + v2o == 0) + return IN; + if (v1o + v2o == 2) + return OUT; + if (v2o) + { + t = (val - v1[1]) / (v2[1] - v1[1]); + v2[0] = v1[0] + t * (v2[0] - v1[0]); + v2[1] = val; + for (i = 2; i < n; i++) + v2[i] = v1[i] + t * (v2[i] - v1[i]); + return LEAVE; + } + else + { + t = (val - v2[1]) / (v1[1] - v2[1]); + v1[0] = v2[0] + t * (v1[0] - v2[0]); + v1[1] = val; + for (i = 2; i < n; i++) + v1[i] = v2[i] + t * (v1[i] - v2[i]); + return ENTER; + } +} + +static inline void copy_vert(float *dst, float *src, int n) +{ + while (n--) + *dst++ = *src++; +} + +static int clip_poly(float src[MAXV][MAXN], + float dst[MAXV][MAXN], int len, int n, + float val, int isy, int ismax) +{ + float cv1[MAXN]; + float cv2[MAXN]; + int v1, v2, cp; + int r; + + v1 = len - 1; + cp = 0; + + for (v2 = 0; v2 < len; v2++) + { + copy_vert(cv1, src[v1], n); + copy_vert(cv2, src[v2], n); + + if (isy) + r = clipy(val, ismax, cv1, cv2, n); + else + r = clipx(val, ismax, cv1, cv2, n); + + switch (r) + { + case IN: + copy_vert(dst[cp++], cv2, n); + break; + case OUT: + break; + case LEAVE: + copy_vert(dst[cp++], cv2, n); + break; + case ENTER: + copy_vert(dst[cp++], cv1, n); + copy_vert(dst[cp++], cv2, n); + break; + } + v1 = v2; + } + + return cp; +} + +/* + * gouraud shaded polygon scan conversion + */ + +static void paint_scan(fz_pixmap *pix, int y, int x1, int x2, int *v1, int *v2, int n) +{ + unsigned char *p = pix->samples + ((y - pix->y) * pix->w + (x1 - pix->x)) * pix->n; + int v[FZ_MAX_COLORS]; + int dv[FZ_MAX_COLORS]; + int w = x2 - x1; + int k; + + assert(w >= 0); + assert(y >= pix->y); + assert(y < pix->y + pix->h); + assert(x1 >= pix->x); + assert(x2 <= pix->x + pix->w); + + if (w == 0) + return; + + for (k = 0; k < n; k++) + { + v[k] = v1[k]; + dv[k] = (v2[k] - v1[k]) / w; + } + + while (w--) + { + for (k = 0; k < n; k++) + { + *p++ = v[k] >> 16; + v[k] += dv[k]; + } + *p++ = 255; + } +} + +static int find_next(int gel[MAXV][MAXN], int len, int a, int *s, int *e, int d) +{ + int b; + + while (1) + { + b = a + d; + if (b == len) + b = 0; + if (b == -1) + b = len - 1; + + if (gel[b][1] == gel[a][1]) + { + a = b; + continue; + } + + if (gel[b][1] > gel[a][1]) + { + *s = a; + *e = b; + return 0; + } + + return 1; + } +} + +static void load_edge(int gel[MAXV][MAXN], int s, int e, int *ael, int *del, int n) +{ + int swp, k, dy; + + if (gel[s][1] > gel[e][1]) + { + swp = s; s = e; e = swp; + } + + dy = gel[e][1] - gel[s][1]; + + ael[0] = gel[s][0]; + del[0] = (gel[e][0] - gel[s][0]) / dy; + for (k = 2; k < n; k++) + { + ael[k] = gel[s][k]; + del[k] = (gel[e][k] - gel[s][k]) / dy; + } +} + +static inline void step_edge(int *ael, int *del, int n) +{ + int k; + ael[0] += del[0]; + for (k = 2; k < n; k++) + ael[k] += del[k]; +} + +static void +fz_paint_triangle(fz_pixmap *pix, float *av, float *bv, float *cv, int n, fz_bbox bbox) +{ + float poly[MAXV][MAXN]; + float temp[MAXV][MAXN]; + float cx0 = bbox.x0; + float cy0 = bbox.y0; + float cx1 = bbox.x1; + float cy1 = bbox.y1; + + int gel[MAXV][MAXN]; + int ael[2][MAXN]; + int del[2][MAXN]; + int y, s0, s1, e0, e1; + int top, bot, len; + + int i, k; + + copy_vert(poly[0], av, n); + copy_vert(poly[1], bv, n); + copy_vert(poly[2], cv, n); + + len = clip_poly(poly, temp, 3, n, cx0, 0, 0); + len = clip_poly(temp, poly, len, n, cx1, 0, 1); + len = clip_poly(poly, temp, len, n, cy0, 1, 0); + len = clip_poly(temp, poly, len, n, cy1, 1, 1); + + if (len < 3) + return; + + for (i = 0; i < len; i++) + { + gel[i][0] = floorf(poly[i][0] + 0.5f) * 65536; /* trunc and fix */ + gel[i][1] = floorf(poly[i][1] + 0.5f); /* y is not fixpoint */ + for (k = 2; k < n; k++) + gel[i][k] = poly[i][k] * 65536; /* fix with precision */ + } + + top = bot = 0; + for (i = 0; i < len; i++) + { + if (gel[i][1] < gel[top][1]) + top = i; + if (gel[i][1] > gel[bot][1]) + bot = i; + } + + if (gel[bot][1] - gel[top][1] == 0) + return; + + y = gel[top][1]; + + if (find_next(gel, len, top, &s0, &e0, 1)) + return; + if (find_next(gel, len, top, &s1, &e1, -1)) + return; + + load_edge(gel, s0, e0, ael[0], del[0], n); + load_edge(gel, s1, e1, ael[1], del[1], n); + + while (1) + { + int x0 = ael[0][0] >> 16; + int x1 = ael[1][0] >> 16; + + if (ael[0][0] < ael[1][0]) + paint_scan(pix, y, x0, x1, ael[0]+2, ael[1]+2, n-2); + else + paint_scan(pix, y, x1, x0, ael[1]+2, ael[0]+2, n-2); + + step_edge(ael[0], del[0], n); + step_edge(ael[1], del[1], n); + y ++; + + if (y >= gel[e0][1]) + { + if (find_next(gel, len, e0, &s0, &e0, 1)) + return; + load_edge(gel, s0, e0, ael[0], del[0], n); + } + + if (y >= gel[e1][1]) + { + if (find_next(gel, len, e1, &s1, &e1, -1)) + return; + load_edge(gel, s1, e1, ael[1], del[1], n); + } + } +} + +static void +fz_paint_quad(fz_pixmap *pix, + fz_point p0, fz_point p1, fz_point p2, fz_point p3, + float c0, float c1, float c2, float c3, + int n, fz_bbox bbox) +{ + float v[4][3]; + + v[0][0] = p0.x; + v[0][1] = p0.y; + v[0][2] = c0; + + v[1][0] = p1.x; + v[1][1] = p1.y; + v[1][2] = c1; + + v[2][0] = p2.x; + v[2][1] = p2.y; + v[2][2] = c2; + + v[3][0] = p3.x; + v[3][1] = p3.y; + v[3][2] = c3; + + fz_paint_triangle(pix, v[0], v[2], v[3], n, bbox); + fz_paint_triangle(pix, v[0], v[3], v[1], n, bbox); +} + +/* + * linear, radial and mesh painting + */ + +#define HUGENUM 32000 /* how far to extend axial/radial shadings */ +#define RADSEGS 32 /* how many segments to generate for radial meshes */ + +static fz_point +fz_point_on_circle(fz_point p, float r, float theta) +{ + p.x = p.x + cosf(theta) * r; + p.y = p.y + sinf(theta) * r; + + return p; +} + +static void +fz_paint_linear(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) +{ + fz_point p0, p1; + fz_point v0, v1, v2, v3; + fz_point e0, e1; + float theta; + + p0.x = shade->mesh[0]; + p0.y = shade->mesh[1]; + p0 = fz_transform_point(ctm, p0); + + p1.x = shade->mesh[3]; + p1.y = shade->mesh[4]; + p1 = fz_transform_point(ctm, p1); + + theta = atan2f(p1.y - p0.y, p1.x - p0.x); + theta += (float)M_PI * 0.5f; + + v0 = fz_point_on_circle(p0, HUGENUM, theta); + v1 = fz_point_on_circle(p1, HUGENUM, theta); + v2 = fz_point_on_circle(p0, -HUGENUM, theta); + v3 = fz_point_on_circle(p1, -HUGENUM, theta); + + fz_paint_quad(dest, v0, v1, v2, v3, 0, 255, 0, 255, 3, bbox); + + if (shade->extend[0]) + { + e0.x = v0.x - (p1.x - p0.x) * HUGENUM; + e0.y = v0.y - (p1.y - p0.y) * HUGENUM; + + e1.x = v2.x - (p1.x - p0.x) * HUGENUM; + e1.y = v2.y - (p1.y - p0.y) * HUGENUM; + + fz_paint_quad(dest, e0, e1, v0, v2, 0, 0, 0, 0, 3, bbox); + } + + if (shade->extend[1]) + { + e0.x = v1.x + (p1.x - p0.x) * HUGENUM; + e0.y = v1.y + (p1.y - p0.y) * HUGENUM; + + e1.x = v3.x + (p1.x - p0.x) * HUGENUM; + e1.y = v3.y + (p1.y - p0.y) * HUGENUM; + + fz_paint_quad(dest, e0, e1, v1, v3, 255, 255, 255, 255, 3, bbox); + } +} + +static void +fz_paint_annulus(fz_matrix ctm, + fz_point p0, float r0, float c0, + fz_point p1, float r1, float c1, + fz_pixmap *dest, fz_bbox bbox) +{ + fz_point t0, t1, t2, t3, b0, b1, b2, b3; + float theta, step; + int i; + + theta = atan2f(p1.y - p0.y, p1.x - p0.x); + step = (float)M_PI * 2 / RADSEGS; + + for (i = 0; i < RADSEGS / 2; i++) + { + t0 = fz_point_on_circle(p0, r0, theta + i * step); + t1 = fz_point_on_circle(p0, r0, theta + i * step + step); + t2 = fz_point_on_circle(p1, r1, theta + i * step); + t3 = fz_point_on_circle(p1, r1, theta + i * step + step); + b0 = fz_point_on_circle(p0, r0, theta - i * step); + b1 = fz_point_on_circle(p0, r0, theta - i * step - step); + b2 = fz_point_on_circle(p1, r1, theta - i * step); + b3 = fz_point_on_circle(p1, r1, theta - i * step - step); + + t0 = fz_transform_point(ctm, t0); + t1 = fz_transform_point(ctm, t1); + t2 = fz_transform_point(ctm, t2); + t3 = fz_transform_point(ctm, t3); + b0 = fz_transform_point(ctm, b0); + b1 = fz_transform_point(ctm, b1); + b2 = fz_transform_point(ctm, b2); + b3 = fz_transform_point(ctm, b3); + + fz_paint_quad(dest, t0, t1, t2, t3, c0, c0, c1, c1, 3, bbox); + fz_paint_quad(dest, b0, b1, b2, b3, c0, c0, c1, c1, 3, bbox); + } +} + +static void +fz_paint_radial(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) +{ + fz_point p0, p1; + float r0, r1; + fz_point e; + float er, rs; + + p0.x = shade->mesh[0]; + p0.y = shade->mesh[1]; + r0 = shade->mesh[2]; + + p1.x = shade->mesh[3]; + p1.y = shade->mesh[4]; + r1 = shade->mesh[5]; + + if (shade->extend[0]) + { + if (r0 < r1) + rs = r0 / (r0 - r1); + else + rs = -HUGENUM; + + e.x = p0.x + (p1.x - p0.x) * rs; + e.y = p0.y + (p1.y - p0.y) * rs; + er = r0 + (r1 - r0) * rs; + + fz_paint_annulus(ctm, e, er, 0, p0, r0, 0, dest, bbox); + } + + fz_paint_annulus(ctm, p0, r0, 0, p1, r1, 255, dest, bbox); + + if (shade->extend[1]) + { + if (r0 > r1) + rs = r1 / (r1 - r0); + else + rs = -HUGENUM; + + e.x = p1.x + (p0.x - p1.x) * rs; + e.y = p1.y + (p0.y - p1.y) * rs; + er = r1 + (r0 - r1) * rs; + + fz_paint_annulus(ctm, p1, r1, 255, e, er, 255, dest, bbox); + } +} + +static void +fz_paint_mesh(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) +{ + float tri[3][MAXN]; + fz_point p; + float *mesh; + int ntris; + int i, k; + + mesh = shade->mesh; + + if (shade->use_function) + ntris = shade->mesh_len / 9; + else + ntris = shade->mesh_len / ((2 + shade->colorspace->n) * 3); + + while (ntris--) + { + for (k = 0; k < 3; k++) + { + p.x = *mesh++; + p.y = *mesh++; + p = fz_transform_point(ctm, p); + tri[k][0] = p.x; + tri[k][1] = p.y; + if (shade->use_function) + tri[k][2] = *mesh++ * 255; + else + { + fz_convert_color(shade->colorspace, mesh, dest->colorspace, tri[k] + 2); + for (i = 0; i < dest->colorspace->n; i++) + tri[k][i + 2] *= 255; + mesh += shade->colorspace->n; + } + } + fz_paint_triangle(dest, tri[0], tri[1], tri[2], 2 + dest->colorspace->n, bbox); + } +} + +void +fz_paint_shade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) +{ + unsigned char clut[256][FZ_MAX_COLORS]; + fz_pixmap *temp, *conv; + float color[FZ_MAX_COLORS]; + int i, k; + + ctm = fz_concat(shade->matrix, ctm); + + if (shade->use_function) + { + for (i = 0; i < 256; i++) + { + fz_convert_color(shade->colorspace, shade->function[i], dest->colorspace, color); + for (k = 0; k < dest->colorspace->n; k++) + clut[i][k] = color[k] * 255; + clut[i][k] = shade->function[i][shade->colorspace->n] * 255; + } + conv = fz_new_pixmap_with_rect(dest->colorspace, bbox); + temp = fz_new_pixmap_with_rect(fz_device_gray, bbox); + fz_clear_pixmap(temp); + } + else + { + temp = dest; + } + + switch (shade->type) + { + case FZ_LINEAR: fz_paint_linear(shade, ctm, temp, bbox); break; + case FZ_RADIAL: fz_paint_radial(shade, ctm, temp, bbox); break; + case FZ_MESH: fz_paint_mesh(shade, ctm, temp, bbox); break; + } + + if (shade->use_function) + { + unsigned char *s = temp->samples; + unsigned char *d = conv->samples; + int len = temp->w * temp->h; + while (len--) + { + int v = *s++; + int a = fz_mul255(*s++, clut[v][conv->n - 1]); + for (k = 0; k < conv->n - 1; k++) + *d++ = fz_mul255(clut[v][k], a); + *d++ = a; + } + fz_paint_pixmap(dest, conv, 255); + fz_drop_pixmap(conv); + fz_drop_pixmap(temp); + } +} diff --git a/contrib/media/updf/draw/draw_paint.c b/contrib/media/updf/draw/draw_paint.c new file mode 100644 index 0000000000..3b02b87093 --- /dev/null +++ b/contrib/media/updf/draw/draw_paint.c @@ -0,0 +1,471 @@ +#include "fitz.h" + +/* + +The functions in this file implement various flavours of Porter-Duff blending. + +We take the following as definitions: + + Cx = Color (from plane x) + ax = Alpha (from plane x) + cx = Cx.ax = Premultiplied color (from plane x) + +The general PorterDuff blending equation is: + + Blend Z = X op Y cz = Fx.cx + Fy. cy where Fx and Fy depend on op + +The two operations we use in this file are: '(X in Y) over Z' and +'S over Z'. The definitions of the 'over' and 'in' operations are as +follows: + + For S over Z, Fs = 1, Fz = 1-as + For X in Y, Fx = ay, Fy = 0 + +We have 2 choices; we can either work with premultiplied data, or non +premultiplied data. Our + +First the premultiplied case: + + Let S = (X in Y) + Let R = (X in Y) over Z = S over Z + + cs = cx.Fx + cy.Fy (where Fx = ay, Fy = 0) + = cx.ay + as = ax.Fx + ay.Fy + = ax.ay + + cr = cs.Fs + cz.Fz (where Fs = 1, Fz = 1-as) + = cs + cz.(1-as) + = cx.ay + cz.(1-ax.ay) + ar = as.Fs + az.Fz + = as + az.(1-as) + = ax.ay + az.(1-ax.ay) + +This has various nice properties, like not needing any divisions, and +being symmetric in color and alpha, so this is what we use. Because we +went through the pain of deriving the non premultiplied forms, we list +them here too, though they are not used. + +Non Pre-multiplied case: + + Cs.as = Fx.Cx.ax + Fy.Cy.ay (where Fx = ay, Fy = 0) + = Cx.ay.ax + Cs = (Cx.ay.ax)/(ay.ax) + = Cx + Cr.ar = Fs.Cs.as + Fz.Cz.az (where Fs = 1, Fz = 1-as) + = Cs.as + (1-as).Cz.az + = Cx.ax.ay + Cz.az.(1-ax.ay) + Cr = (Cx.ax.ay + Cz.az.(1-ax.ay))/(ax.ay + az.(1-ax-ay)) + +Much more complex, it seems. However, if we could restrict ourselves to +the case where we were always plotting onto an opaque background (i.e. +az = 1), then: + + Cr = Cx.(ax.ay) + Cz.(1-ax.ay) + = (Cx-Cz)*(1-ax.ay) + Cz (a single MLA operation) + ar = 1 + +Sadly, this is not true in the general case, so we abandon this effort +and stick to using the premultiplied form. + +*/ + +typedef unsigned char byte; + +/* These are used by the non-aa scan converter */ + +void +fz_paint_solid_alpha(byte * restrict dp, int w, int alpha) +{ + int t = FZ_EXPAND(255 - alpha); + while (w--) + { + *dp = alpha + FZ_COMBINE(*dp, t); + dp ++; + } +} + +void +fz_paint_solid_color(byte * restrict dp, int n, int w, byte *color) +{ + int n1 = n - 1; + int sa = FZ_EXPAND(color[n1]); + int k; + while (w--) + { + int ma = FZ_COMBINE(FZ_EXPAND(255), sa); + for (k = 0; k < n1; k++) + dp[k] = FZ_BLEND(color[k], dp[k], ma); + dp[k] = FZ_BLEND(255, dp[k], ma); + dp += n; + } +} + +/* Blend a non-premultiplied color in mask over destination */ + +static inline void +fz_paint_span_with_color_2(byte * restrict dp, byte * restrict mp, int w, byte *color) +{ + int sa = FZ_EXPAND(color[1]); + int g = color[0]; + while (w--) + { + int ma = *mp++; + ma = FZ_COMBINE(FZ_EXPAND(ma), sa); + dp[0] = FZ_BLEND(g, dp[0], ma); + dp[1] = FZ_BLEND(255, dp[1], ma); + dp += 2; + } +} + +static inline void +fz_paint_span_with_color_4(byte * restrict dp, byte * restrict mp, int w, byte *color) +{ + int sa = FZ_EXPAND(color[3]); + int r = color[0]; + int g = color[1]; + int b = color[2]; + while (w--) + { + int ma = *mp++; + ma = FZ_COMBINE(FZ_EXPAND(ma), sa); + dp[0] = FZ_BLEND(r, dp[0], ma); + dp[1] = FZ_BLEND(g, dp[1], ma); + dp[2] = FZ_BLEND(b, dp[2], ma); + dp[3] = FZ_BLEND(255, dp[3], ma); + dp += 4; + } +} + +static inline void +fz_paint_span_with_color_N(byte * restrict dp, byte * restrict mp, int n, int w, byte *color) +{ + int n1 = n - 1; + int sa = FZ_EXPAND(color[n1]); + int k; + while (w--) + { + int ma = *mp++; + ma = FZ_COMBINE(FZ_EXPAND(ma), sa); + for (k = 0; k < n1; k++) + dp[k] = FZ_BLEND(color[k], dp[k], ma); + dp[k] = FZ_BLEND(255, dp[k], ma); + dp += n; + } +} + +void +fz_paint_span_with_color(byte * restrict dp, byte * restrict mp, int n, int w, byte *color) +{ + switch (n) + { + case 2: fz_paint_span_with_color_2(dp, mp, w, color); break; + case 4: fz_paint_span_with_color_4(dp, mp, w, color); break; + default: fz_paint_span_with_color_N(dp, mp, n, w, color); break; + } +} + +/* Blend source in mask over destination */ + +static inline void +fz_paint_span_with_mask_2(byte * restrict dp, byte * restrict sp, byte * restrict mp, int w) +{ + while (w--) + { + int masa; + int ma = *mp++; + ma = FZ_EXPAND(ma); + masa = FZ_COMBINE(sp[1], ma); + masa = 255 - masa; + masa = FZ_EXPAND(masa); + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + } +} + +static inline void +fz_paint_span_with_mask_4(byte * restrict dp, byte * restrict sp, byte * restrict mp, int w) +{ + while (w--) + { + int masa; + int ma = *mp++; + ma = FZ_EXPAND(ma); + masa = FZ_COMBINE(sp[3], ma); + masa = 255 - masa; + masa = FZ_EXPAND(masa); + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + } +} + +static inline void +fz_paint_span_with_mask_N(byte * restrict dp, byte * restrict sp, byte * restrict mp, int n, int w) +{ + while (w--) + { + int k = n; + int masa; + int ma = *mp++; + ma = FZ_EXPAND(ma); + masa = FZ_COMBINE(sp[n-1], ma); + masa = 255-masa; + masa = FZ_EXPAND(masa); + while (k--) + { + *dp = FZ_COMBINE2(*sp, ma, *dp, masa); + sp++; dp++; + } + } +} + +static void +fz_paint_span_with_mask(byte * restrict dp, byte * restrict sp, byte * restrict mp, int n, int w) +{ + switch (n) + { + case 2: fz_paint_span_with_mask_2(dp, sp, mp, w); break; + case 4: fz_paint_span_with_mask_4(dp, sp, mp, w); break; + default: fz_paint_span_with_mask_N(dp, sp, mp, n, w); break; + } +} + +/* Blend source in constant alpha over destination */ + +static inline void +fz_paint_span_2_with_alpha(byte * restrict dp, byte * restrict sp, int w, int alpha) +{ + alpha = FZ_EXPAND(alpha); + while (w--) + { + int masa = FZ_COMBINE(sp[1], alpha); + *dp = FZ_BLEND(*sp, *dp, masa); + dp++; sp++; + *dp = FZ_BLEND(*sp, *dp, masa); + dp++; sp++; + } +} + +static inline void +fz_paint_span_4_with_alpha(byte * restrict dp, byte * restrict sp, int w, int alpha) +{ + alpha = FZ_EXPAND(alpha); + while (w--) + { + int masa = FZ_COMBINE(sp[3], alpha); + *dp = FZ_BLEND(*sp, *dp, masa); + sp++; dp++; + *dp = FZ_BLEND(*sp, *dp, masa); + sp++; dp++; + *dp = FZ_BLEND(*sp, *dp, masa); + sp++; dp++; + *dp = FZ_BLEND(*sp, *dp, masa); + sp++; dp++; + } +} + +static inline void +fz_paint_span_N_with_alpha(byte * restrict dp, byte * restrict sp, int n, int w, int alpha) +{ + alpha = FZ_EXPAND(alpha); + while (w--) + { + int masa = FZ_COMBINE(sp[n-1], alpha); + int k = n; + while (k--) + { + *dp = FZ_BLEND(*sp++, *dp, masa); + dp++; + } + } +} + +/* Blend source over destination */ + +static inline void +fz_paint_span_1(byte * restrict dp, byte * restrict sp, int w) +{ + while (w--) + { + int t = FZ_EXPAND(255 - sp[0]); + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp ++; + } +} + +static inline void +fz_paint_span_2(byte * restrict dp, byte * restrict sp, int w) +{ + while (w--) + { + int t = FZ_EXPAND(255 - sp[1]); + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + } +} + +static inline void +fz_paint_span_4(byte * restrict dp, byte * restrict sp, int w) +{ + while (w--) + { + int t = FZ_EXPAND(255 - sp[3]); + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + } +} + +static inline void +fz_paint_span_N(byte * restrict dp, byte * restrict sp, int n, int w) +{ + while (w--) + { + int k = n; + int t = FZ_EXPAND(255 - sp[n-1]); + while (k--) + { + *dp = *sp++ + FZ_COMBINE(*dp, t); + dp++; + } + } +} + +void +fz_paint_span(byte * restrict dp, byte * restrict sp, int n, int w, int alpha) +{ + if (alpha == 255) + { + switch (n) + { + case 1: fz_paint_span_1(dp, sp, w); break; + case 2: fz_paint_span_2(dp, sp, w); break; + case 4: fz_paint_span_4(dp, sp, w); break; + default: fz_paint_span_N(dp, sp, n, w); break; + } + } + else if (alpha > 0) + { + switch (n) + { + case 2: fz_paint_span_2_with_alpha(dp, sp, w, alpha); break; + case 4: fz_paint_span_4_with_alpha(dp, sp, w, alpha); break; + default: fz_paint_span_N_with_alpha(dp, sp, n, w, alpha); break; + } + } +} + +/* + * Pixmap blending functions + */ + +void +fz_paint_pixmap_with_rect(fz_pixmap *dst, fz_pixmap *src, int alpha, fz_bbox bbox) +{ + unsigned char *sp, *dp; + int x, y, w, h, n; + + assert(dst->n == src->n); + + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(dst)); + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(src)); + + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + if ((w | h) == 0) + return; + + n = src->n; + sp = src->samples + ((y - src->y) * src->w + (x - src->x)) * src->n; + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; + + while (h--) + { + fz_paint_span(dp, sp, n, w, alpha); + sp += src->w * n; + dp += dst->w * n; + } +} + +void +fz_paint_pixmap(fz_pixmap *dst, fz_pixmap *src, int alpha) +{ + unsigned char *sp, *dp; + fz_bbox bbox; + int x, y, w, h, n; + + assert(dst->n == src->n); + + bbox = fz_bound_pixmap(dst); + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(src)); + + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + if ((w | h) == 0) + return; + + n = src->n; + sp = src->samples + ((y - src->y) * src->w + (x - src->x)) * src->n; + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; + + while (h--) + { + fz_paint_span(dp, sp, n, w, alpha); + sp += src->w * n; + dp += dst->w * n; + } +} + +void +fz_paint_pixmap_with_mask(fz_pixmap *dst, fz_pixmap *src, fz_pixmap *msk) +{ + unsigned char *sp, *dp, *mp; + fz_bbox bbox; + int x, y, w, h, n; + + assert(dst->n == src->n); + assert(msk->n == 1); + + bbox = fz_bound_pixmap(dst); + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(src)); + bbox = fz_intersect_bbox(bbox, fz_bound_pixmap(msk)); + + x = bbox.x0; + y = bbox.y0; + w = bbox.x1 - bbox.x0; + h = bbox.y1 - bbox.y0; + if ((w | h) == 0) + return; + + n = src->n; + sp = src->samples + ((y - src->y) * src->w + (x - src->x)) * src->n; + mp = msk->samples + ((y - msk->y) * msk->w + (x - msk->x)) * msk->n; + dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; + + while (h--) + { + fz_paint_span_with_mask(dp, sp, mp, n, w); + sp += src->w * n; + dp += dst->w * n; + mp += msk->w; + } +} diff --git a/contrib/media/updf/draw/draw_path.c b/contrib/media/updf/draw/draw_path.c new file mode 100644 index 0000000000..efa881eff5 --- /dev/null +++ b/contrib/media/updf/draw/draw_path.c @@ -0,0 +1,807 @@ +#include "fitz.h" + +#define MAX_DEPTH 8 + +enum { BUTT = 0, ROUND = 1, SQUARE = 2, TRIANGLE = 3, MITER = 0, BEVEL = 2 }; + +static void +line(fz_gel *gel, fz_matrix *ctm, float x0, float y0, float x1, float y1) +{ + float tx0 = ctm->a * x0 + ctm->c * y0 + ctm->e; + float ty0 = ctm->b * x0 + ctm->d * y0 + ctm->f; + float tx1 = ctm->a * x1 + ctm->c * y1 + ctm->e; + float ty1 = ctm->b * x1 + ctm->d * y1 + ctm->f; + fz_insert_gel(gel, tx0, ty0, tx1, ty1); +} + +static void +bezier(fz_gel *gel, fz_matrix *ctm, float flatness, + float xa, float ya, + float xb, float yb, + float xc, float yc, + float xd, float yd, int depth) +{ + float dmax; + float xab, yab; + float xbc, ybc; + float xcd, ycd; + float xabc, yabc; + float xbcd, ybcd; + float xabcd, yabcd; + + /* termination check */ + dmax = ABS(xa - xb); + dmax = MAX(dmax, ABS(ya - yb)); + dmax = MAX(dmax, ABS(xd - xc)); + dmax = MAX(dmax, ABS(yd - yc)); + if (dmax < flatness || depth >= MAX_DEPTH) + { + line(gel, ctm, xa, ya, xd, yd); + return; + } + + xab = xa + xb; + yab = ya + yb; + xbc = xb + xc; + ybc = yb + yc; + xcd = xc + xd; + ycd = yc + yd; + + xabc = xab + xbc; + yabc = yab + ybc; + xbcd = xbc + xcd; + ybcd = ybc + ycd; + + xabcd = xabc + xbcd; + yabcd = yabc + ybcd; + + xab *= 0.5f; yab *= 0.5f; + xbc *= 0.5f; ybc *= 0.5f; + xcd *= 0.5f; ycd *= 0.5f; + + xabc *= 0.25f; yabc *= 0.25f; + xbcd *= 0.25f; ybcd *= 0.25f; + + xabcd *= 0.125f; yabcd *= 0.125f; + + bezier(gel, ctm, flatness, xa, ya, xab, yab, xabc, yabc, xabcd, yabcd, depth + 1); + bezier(gel, ctm, flatness, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd, depth + 1); +} + +void +fz_flatten_fill_path(fz_gel *gel, fz_path *path, fz_matrix ctm, float flatness) +{ + float x1, y1, x2, y2, x3, y3; + float cx = 0; + float cy = 0; + float bx = 0; + float by = 0; + int i = 0; + + while (i < path->len) + { + switch (path->items[i++].k) + { + case FZ_MOVETO: + /* implicit closepath before moveto */ + if (i && (cx != bx || cy != by)) + line(gel, &ctm, cx, cy, bx, by); + x1 = path->items[i++].v; + y1 = path->items[i++].v; + cx = bx = x1; + cy = by = y1; + break; + + case FZ_LINETO: + x1 = path->items[i++].v; + y1 = path->items[i++].v; + line(gel, &ctm, cx, cy, x1, y1); + cx = x1; + cy = y1; + break; + + case FZ_CURVETO: + x1 = path->items[i++].v; + y1 = path->items[i++].v; + x2 = path->items[i++].v; + y2 = path->items[i++].v; + x3 = path->items[i++].v; + y3 = path->items[i++].v; + bezier(gel, &ctm, flatness, cx, cy, x1, y1, x2, y2, x3, y3, 0); + cx = x3; + cy = y3; + break; + + case FZ_CLOSE_PATH: + line(gel, &ctm, cx, cy, bx, by); + cx = bx; + cy = by; + break; + } + } + + if (i && (cx != bx || cy != by)) + line(gel, &ctm, cx, cy, bx, by); +} + +struct sctx +{ + fz_gel *gel; + fz_matrix *ctm; + float flatness; + + int linejoin; + float linewidth; + float miterlimit; + fz_point beg[2]; + fz_point seg[2]; + int sn, bn; + int dot; + + float *dash_list; + float dash_phase; + int dash_len; + int toggle, cap; + int offset; + float phase; + fz_point cur; +}; + +static void +fz_add_line(struct sctx *s, float x0, float y0, float x1, float y1) +{ + float tx0 = s->ctm->a * x0 + s->ctm->c * y0 + s->ctm->e; + float ty0 = s->ctm->b * x0 + s->ctm->d * y0 + s->ctm->f; + float tx1 = s->ctm->a * x1 + s->ctm->c * y1 + s->ctm->e; + float ty1 = s->ctm->b * x1 + s->ctm->d * y1 + s->ctm->f; + fz_insert_gel(s->gel, tx0, ty0, tx1, ty1); +} + +static void +fz_add_arc(struct sctx *s, + float xc, float yc, + float x0, float y0, + float x1, float y1) +{ + float th0, th1, r; + float theta; + float ox, oy, nx, ny; + int n, i; + + r = fabsf(s->linewidth); + theta = 2 * (float)M_SQRT2 * sqrtf(s->flatness / r); + th0 = atan2f(y0, x0); + th1 = atan2f(y1, x1); + + if (r > 0) + { + if (th0 < th1) + th0 += (float)M_PI * 2; + n = ceilf((th0 - th1) / theta); + } + else + { + if (th1 < th0) + th1 += (float)M_PI * 2; + n = ceilf((th1 - th0) / theta); + } + + ox = x0; + oy = y0; + for (i = 1; i < n; i++) + { + theta = th0 + (th1 - th0) * i / n; + nx = cosf(theta) * r; + ny = sinf(theta) * r; + fz_add_line(s, xc + ox, yc + oy, xc + nx, yc + ny); + ox = nx; + oy = ny; + } + + fz_add_line(s, xc + ox, yc + oy, xc + x1, yc + y1); +} + +static void +fz_add_line_stroke(struct sctx *s, fz_point a, fz_point b) +{ + float dx = b.x - a.x; + float dy = b.y - a.y; + float scale = s->linewidth / sqrtf(dx * dx + dy * dy); + float dlx = dy * scale; + float dly = -dx * scale; + fz_add_line(s, a.x - dlx, a.y - dly, b.x - dlx, b.y - dly); + fz_add_line(s, b.x + dlx, b.y + dly, a.x + dlx, a.y + dly); +} + +static void +fz_add_line_join(struct sctx *s, fz_point a, fz_point b, fz_point c) +{ + float miterlimit = s->miterlimit; + float linewidth = s->linewidth; + int linejoin = s->linejoin; + float dx0, dy0; + float dx1, dy1; + float dlx0, dly0; + float dlx1, dly1; + float dmx, dmy; + float dmr2; + float scale; + float cross; + + dx0 = b.x - a.x; + dy0 = b.y - a.y; + + dx1 = c.x - b.x; + dy1 = c.y - b.y; + + if (dx0 * dx0 + dy0 * dy0 < FLT_EPSILON) + linejoin = BEVEL; + if (dx1 * dx1 + dy1 * dy1 < FLT_EPSILON) + linejoin = BEVEL; + + scale = linewidth / sqrtf(dx0 * dx0 + dy0 * dy0); + dlx0 = dy0 * scale; + dly0 = -dx0 * scale; + + scale = linewidth / sqrtf(dx1 * dx1 + dy1 * dy1); + dlx1 = dy1 * scale; + dly1 = -dx1 * scale; + + cross = dx1 * dy0 - dx0 * dy1; + + dmx = (dlx0 + dlx1) * 0.5f; + dmy = (dly0 + dly1) * 0.5f; + dmr2 = dmx * dmx + dmy * dmy; + + if (cross * cross < FLT_EPSILON && dx0 * dx1 + dy0 * dy1 >= 0) + linejoin = BEVEL; + + if (linejoin == MITER) + if (dmr2 * miterlimit * miterlimit < linewidth * linewidth) + linejoin = BEVEL; + + if (linejoin == BEVEL) + { + fz_add_line(s, b.x - dlx0, b.y - dly0, b.x - dlx1, b.y - dly1); + fz_add_line(s, b.x + dlx1, b.y + dly1, b.x + dlx0, b.y + dly0); + } + + if (linejoin == MITER) + { + scale = linewidth * linewidth / dmr2; + dmx *= scale; + dmy *= scale; + + if (cross < 0) + { + fz_add_line(s, b.x - dlx0, b.y - dly0, b.x - dlx1, b.y - dly1); + fz_add_line(s, b.x + dlx1, b.y + dly1, b.x + dmx, b.y + dmy); + fz_add_line(s, b.x + dmx, b.y + dmy, b.x + dlx0, b.y + dly0); + } + else + { + fz_add_line(s, b.x + dlx1, b.y + dly1, b.x + dlx0, b.y + dly0); + fz_add_line(s, b.x - dlx0, b.y - dly0, b.x - dmx, b.y - dmy); + fz_add_line(s, b.x - dmx, b.y - dmy, b.x - dlx1, b.y - dly1); + } + } + + if (linejoin == ROUND) + { + if (cross < 0) + { + fz_add_line(s, b.x - dlx0, b.y - dly0, b.x - dlx1, b.y - dly1); + fz_add_arc(s, b.x, b.y, dlx1, dly1, dlx0, dly0); + } + else + { + fz_add_line(s, b.x + dlx1, b.y + dly1, b.x + dlx0, b.y + dly0); + fz_add_arc(s, b.x, b.y, -dlx0, -dly0, -dlx1, -dly1); + } + } +} + +static void +fz_add_line_cap(struct sctx *s, fz_point a, fz_point b, int linecap) +{ + float flatness = s->flatness; + float linewidth = s->linewidth; + + float dx = b.x - a.x; + float dy = b.y - a.y; + + float scale = linewidth / sqrtf(dx * dx + dy * dy); + float dlx = dy * scale; + float dly = -dx * scale; + + if (linecap == BUTT) + fz_add_line(s, b.x - dlx, b.y - dly, b.x + dlx, b.y + dly); + + if (linecap == ROUND) + { + int i; + int n = ceilf((float)M_PI / (2.0f * (float)M_SQRT2 * sqrtf(flatness / linewidth))); + float ox = b.x - dlx; + float oy = b.y - dly; + for (i = 1; i < n; i++) + { + float theta = (float)M_PI * i / n; + float cth = cosf(theta); + float sth = sinf(theta); + float nx = b.x - dlx * cth - dly * sth; + float ny = b.y - dly * cth + dlx * sth; + fz_add_line(s, ox, oy, nx, ny); + ox = nx; + oy = ny; + } + fz_add_line(s, ox, oy, b.x + dlx, b.y + dly); + } + + if (linecap == SQUARE) + { + fz_add_line(s, b.x - dlx, b.y - dly, + b.x - dlx - dly, b.y - dly + dlx); + fz_add_line(s, b.x - dlx - dly, b.y - dly + dlx, + b.x + dlx - dly, b.y + dly + dlx); + fz_add_line(s, b.x + dlx - dly, b.y + dly + dlx, + b.x + dlx, b.y + dly); + } + + if (linecap == TRIANGLE) + { + float mx = -dly; + float my = dlx; + fz_add_line(s, b.x - dlx, b.y - dly, b.x + mx, b.y + my); + fz_add_line(s, b.x + mx, b.y + my, b.x + dlx, b.y + dly); + } +} + +static void +fz_add_line_dot(struct sctx *s, fz_point a) +{ + float flatness = s->flatness; + float linewidth = s->linewidth; + int n = ceilf((float)M_PI / ((float)M_SQRT2 * sqrtf(flatness / linewidth))); + float ox = a.x - linewidth; + float oy = a.y; + int i; + + for (i = 1; i < n; i++) + { + float theta = (float)M_PI * 2 * i / n; + float cth = cosf(theta); + float sth = sinf(theta); + float nx = a.x - cth * linewidth; + float ny = a.y + sth * linewidth; + fz_add_line(s, ox, oy, nx, ny); + ox = nx; + oy = ny; + } + + fz_add_line(s, ox, oy, a.x - linewidth, a.y); +} + +static void +fz_stroke_flush(struct sctx *s, int start_cap, int end_cap) +{ + if (s->sn == 2) + { + fz_add_line_cap(s, s->beg[1], s->beg[0], start_cap); + fz_add_line_cap(s, s->seg[0], s->seg[1], end_cap); + } + else if (s->dot) + { + fz_add_line_dot(s, s->beg[0]); + } +} + +static void +fz_stroke_moveto(struct sctx *s, fz_point cur) +{ + s->seg[0] = cur; + s->beg[0] = cur; + s->sn = 1; + s->bn = 1; + s->dot = 0; +} + +static void +fz_stroke_lineto(struct sctx *s, fz_point cur) +{ + float dx = cur.x - s->seg[s->sn-1].x; + float dy = cur.y - s->seg[s->sn-1].y; + + if (dx * dx + dy * dy < FLT_EPSILON) + { + if (s->cap == ROUND || s->dash_list) + s->dot = 1; + return; + } + + fz_add_line_stroke(s, s->seg[s->sn-1], cur); + + if (s->sn == 2) + { + fz_add_line_join(s, s->seg[0], s->seg[1], cur); + s->seg[0] = s->seg[1]; + s->seg[1] = cur; + } + + if (s->sn == 1) + s->seg[s->sn++] = cur; + if (s->bn == 1) + s->beg[s->bn++] = cur; +} + +static void +fz_stroke_closepath(struct sctx *s) +{ + if (s->sn == 2) + { + fz_stroke_lineto(s, s->beg[0]); + if (s->seg[1].x == s->beg[0].x && s->seg[1].y == s->beg[0].y) + fz_add_line_join(s, s->seg[0], s->beg[0], s->beg[1]); + else + fz_add_line_join(s, s->seg[1], s->beg[0], s->beg[1]); + } + else if (s->dot) + { + fz_add_line_dot(s, s->beg[0]); + } + + s->seg[0] = s->beg[0]; + s->bn = 1; + s->sn = 1; + s->dot = 0; +} + +static void +fz_stroke_bezier(struct sctx *s, + float xa, float ya, + float xb, float yb, + float xc, float yc, + float xd, float yd, int depth) +{ + float dmax; + float xab, yab; + float xbc, ybc; + float xcd, ycd; + float xabc, yabc; + float xbcd, ybcd; + float xabcd, yabcd; + + /* termination check */ + dmax = ABS(xa - xb); + dmax = MAX(dmax, ABS(ya - yb)); + dmax = MAX(dmax, ABS(xd - xc)); + dmax = MAX(dmax, ABS(yd - yc)); + if (dmax < s->flatness || depth >= MAX_DEPTH) + { + fz_point p; + p.x = xd; + p.y = yd; + fz_stroke_lineto(s, p); + return; + } + + xab = xa + xb; + yab = ya + yb; + xbc = xb + xc; + ybc = yb + yc; + xcd = xc + xd; + ycd = yc + yd; + + xabc = xab + xbc; + yabc = yab + ybc; + xbcd = xbc + xcd; + ybcd = ybc + ycd; + + xabcd = xabc + xbcd; + yabcd = yabc + ybcd; + + xab *= 0.5f; yab *= 0.5f; + xbc *= 0.5f; ybc *= 0.5f; + xcd *= 0.5f; ycd *= 0.5f; + + xabc *= 0.25f; yabc *= 0.25f; + xbcd *= 0.25f; ybcd *= 0.25f; + + xabcd *= 0.125f; yabcd *= 0.125f; + + fz_stroke_bezier(s, xa, ya, xab, yab, xabc, yabc, xabcd, yabcd, depth + 1); + fz_stroke_bezier(s, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd, depth + 1); +} + +void +fz_flatten_stroke_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, float flatness, float linewidth) +{ + struct sctx s; + fz_point p0, p1, p2, p3; + int i; + + s.gel = gel; + s.ctm = &ctm; + s.flatness = flatness; + + s.linejoin = stroke->linejoin; + s.linewidth = linewidth * 0.5f; /* hairlines use a different value from the path value */ + s.miterlimit = stroke->miterlimit; + s.sn = 0; + s.bn = 0; + s.dot = 0; + + s.dash_list = NULL; + s.dash_phase = 0; + s.dash_len = 0; + s.toggle = 0; + s.offset = 0; + s.phase = 0; + + s.cap = stroke->start_cap; + + i = 0; + + if (path->len > 0 && path->items[0].k != FZ_MOVETO) + { + fz_warn("assert: path must begin with moveto"); + return; + } + + p0.x = p0.y = 0; + + while (i < path->len) + { + switch (path->items[i++].k) + { + case FZ_MOVETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + fz_stroke_flush(&s, stroke->start_cap, stroke->end_cap); + fz_stroke_moveto(&s, p1); + p0 = p1; + break; + + case FZ_LINETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + fz_stroke_lineto(&s, p1); + p0 = p1; + break; + + case FZ_CURVETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + p2.x = path->items[i++].v; + p2.y = path->items[i++].v; + p3.x = path->items[i++].v; + p3.y = path->items[i++].v; + fz_stroke_bezier(&s, p0.x, p0.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, 0); + p0 = p3; + break; + + case FZ_CLOSE_PATH: + fz_stroke_closepath(&s); + break; + } + } + + fz_stroke_flush(&s, stroke->start_cap, stroke->end_cap); +} + +static void +fz_dash_moveto(struct sctx *s, fz_point a, int start_cap, int end_cap) +{ + s->toggle = 1; + s->offset = 0; + s->phase = s->dash_phase; + + while (s->phase >= s->dash_list[s->offset]) + { + s->toggle = !s->toggle; + s->phase -= s->dash_list[s->offset]; + s->offset ++; + if (s->offset == s->dash_len) + s->offset = 0; + } + + s->cur = a; + + if (s->toggle) + { + fz_stroke_flush(s, s->cap, end_cap); + s->cap = start_cap; + fz_stroke_moveto(s, a); + } +} + +static void +fz_dash_lineto(struct sctx *s, fz_point b, int dash_cap) +{ + float dx, dy; + float total, used, ratio; + fz_point a; + fz_point m; + + a = s->cur; + dx = b.x - a.x; + dy = b.y - a.y; + total = sqrtf(dx * dx + dy * dy); + used = 0; + + while (total - used > s->dash_list[s->offset] - s->phase) + { + used += s->dash_list[s->offset] - s->phase; + ratio = used / total; + m.x = a.x + ratio * dx; + m.y = a.y + ratio * dy; + + if (s->toggle) + { + fz_stroke_lineto(s, m); + } + else + { + fz_stroke_flush(s, s->cap, dash_cap); + s->cap = dash_cap; + fz_stroke_moveto(s, m); + } + + s->toggle = !s->toggle; + s->phase = 0; + s->offset ++; + if (s->offset == s->dash_len) + s->offset = 0; + } + + s->phase += total - used; + + s->cur = b; + + if (s->toggle) + { + fz_stroke_lineto(s, b); + } +} + +static void +fz_dash_bezier(struct sctx *s, + float xa, float ya, + float xb, float yb, + float xc, float yc, + float xd, float yd, int depth, + int dash_cap) +{ + float dmax; + float xab, yab; + float xbc, ybc; + float xcd, ycd; + float xabc, yabc; + float xbcd, ybcd; + float xabcd, yabcd; + + /* termination check */ + dmax = ABS(xa - xb); + dmax = MAX(dmax, ABS(ya - yb)); + dmax = MAX(dmax, ABS(xd - xc)); + dmax = MAX(dmax, ABS(yd - yc)); + if (dmax < s->flatness || depth >= MAX_DEPTH) + { + fz_point p; + p.x = xd; + p.y = yd; + fz_dash_lineto(s, p, dash_cap); + return; + } + + xab = xa + xb; + yab = ya + yb; + xbc = xb + xc; + ybc = yb + yc; + xcd = xc + xd; + ycd = yc + yd; + + xabc = xab + xbc; + yabc = yab + ybc; + xbcd = xbc + xcd; + ybcd = ybc + ycd; + + xabcd = xabc + xbcd; + yabcd = yabc + ybcd; + + xab *= 0.5f; yab *= 0.5f; + xbc *= 0.5f; ybc *= 0.5f; + xcd *= 0.5f; ycd *= 0.5f; + + xabc *= 0.25f; yabc *= 0.25f; + xbcd *= 0.25f; ybcd *= 0.25f; + + xabcd *= 0.125f; yabcd *= 0.125f; + + fz_dash_bezier(s, xa, ya, xab, yab, xabc, yabc, xabcd, yabcd, depth + 1, dash_cap); + fz_dash_bezier(s, xabcd, yabcd, xbcd, ybcd, xcd, ycd, xd, yd, depth + 1, dash_cap); +} + +void +fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, float flatness, float linewidth) +{ + struct sctx s; + fz_point p0, p1, p2, p3, beg; + float phase_len; + int i; + + s.gel = gel; + s.ctm = &ctm; + s.flatness = flatness; + + s.linejoin = stroke->linejoin; + s.linewidth = linewidth * 0.5f; + s.miterlimit = stroke->miterlimit; + s.sn = 0; + s.bn = 0; + s.dot = 0; + + s.dash_list = stroke->dash_list; + s.dash_phase = stroke->dash_phase; + s.dash_len = stroke->dash_len; + s.toggle = 0; + s.offset = 0; + s.phase = 0; + + s.cap = stroke->start_cap; + + if (path->len > 0 && path->items[0].k != FZ_MOVETO) + { + fz_warn("assert: path must begin with moveto"); + return; + } + + phase_len = 0; + for (i = 0; i < stroke->dash_len; i++) + phase_len += stroke->dash_list[i]; + if (phase_len < 0.01f || phase_len < stroke->linewidth * 0.5f) + { + fz_flatten_stroke_path(gel, path, stroke, ctm, flatness, linewidth); + return; + } + + p0.x = p0.y = 0; + i = 0; + + while (i < path->len) + { + switch (path->items[i++].k) + { + case FZ_MOVETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + fz_dash_moveto(&s, p1, stroke->start_cap, stroke->end_cap); + beg = p0 = p1; + break; + + case FZ_LINETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + fz_dash_lineto(&s, p1, stroke->dash_cap); + p0 = p1; + break; + + case FZ_CURVETO: + p1.x = path->items[i++].v; + p1.y = path->items[i++].v; + p2.x = path->items[i++].v; + p2.y = path->items[i++].v; + p3.x = path->items[i++].v; + p3.y = path->items[i++].v; + fz_dash_bezier(&s, p0.x, p0.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, 0, stroke->dash_cap); + p0 = p3; + break; + + case FZ_CLOSE_PATH: + fz_dash_lineto(&s, beg, stroke->dash_cap); + p0 = p1 = beg; + break; + } + } + + fz_stroke_flush(&s, s.cap, stroke->end_cap); +} diff --git a/contrib/media/updf/draw/draw_scale.c b/contrib/media/updf/draw/draw_scale.c new file mode 100644 index 0000000000..427512ced6 --- /dev/null +++ b/contrib/media/updf/draw/draw_scale.c @@ -0,0 +1,1250 @@ +/* +This code does smooth scaling of a pixmap. + +This function returns a new pixmap representing the area starting at (0,0) +given by taking the source pixmap src, scaling it to width w, and height h, +and then positioning it at (frac(x),frac(y)). +*/ + +#include "fitz.h" + +/* Do we special case handling of single pixel high/wide images? The + * 'purest' handling is given by not special casing them, but certain + * files that use such images 'stack' them to give full images. Not + * special casing them results in then being fainter and giving noticable + * rounding errors. + */ +#define SINGLE_PIXEL_SPECIALS + +#ifdef DEBUG_SCALING +#ifdef WIN32 +#include +static void debug_print(const char *fmt, ...) +{ + va_list args; + char text[256]; + va_start(args, fmt); + vsprintf(text, fmt, args); + va_end(args); + OutputDebugStringA(text); + printf(text); +} +#else +static void debug_print(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} +#endif +#endif +#ifdef DEBUG_SCALING +#define DBUG(A) debug_print A +#else +#define DBUG(A) do {} while(0==1) +#endif + +/* +Consider a row of source samples, src, of width src_w, positioned at x, +scaled to width dst_w. + +src[i] is centred at: x + (i + 0.5)*dst_w/src_w + +Therefore the distance between the centre of the jth output pixel and +the centre of the ith source sample is: + +dist[j,i] = j + 0.5 - (x + (i + 0.5)*dst_w/src_w) + +When scaling up, therefore: + +dst[j] = SUM(filter(dist[j,i]) * src[i]) + (for all ints i) + +This can be simplified by noticing that filters are only non zero within +a given filter width (henceforth called W). So: + +dst[j] = SUM(filter(dist[j,i]) * src[i]) + (for ints i, s.t. (j*src_w/dst_w)-W < i < (j*src_w/dst_w)+W) + +When scaling down, each filtered source sample is stretched to be wider +to avoid aliasing issues. This effectively reduces the distance between +centres. + +dst[j] = SUM(filter(dist[j,i] * F) * F * src[i]) + (where F = dst_w/src_w) + (for ints i, s.t. (j-W)/F < i < (j+W)/F) + +*/ + +typedef struct fz_scale_filter_s fz_scale_filter; + +struct fz_scale_filter_s +{ + int width; + float (*fn)(fz_scale_filter *, float); +}; + +/* Image scale filters */ + +static float +triangle(fz_scale_filter *filter, float f) +{ + if (f >= 1) + return 0; + return 1-f; +} + +static float +box(fz_scale_filter *filter, float f) +{ + if (f >= 0.5f) + return 0; + return 1; +} + +static float +simple(fz_scale_filter *filter, float x) +{ + if (x >= 1) + return 0; + return 1 + (2*x - 3)*x*x; +} + +static float +lanczos2(fz_scale_filter *filter, float x) +{ + if (x >= 2) + return 0; + return sinf(M_PI*x) * sinf(M_PI*x/2) / (M_PI*x) / (M_PI*x/2); +} + +static float +lanczos3(fz_scale_filter *filter, float f) +{ + if (f >= 3) + return 0; + return sinf(M_PI*f) * sinf(M_PI*f/3) / (M_PI*f) / (M_PI*f/3); +} + +/* +The Mitchell family of filters is defined: + + f(x) = 1 { (12-9B-6C)x^3 + (-18+12B+6C)x^2 + (6-2B) for x < 1 + - { + 6 { (-B-6C)x^3+(6B+30C)x^2+(-12B-48C)x+(8B+24C) for 1<=x<=2 + +The 'best' ones lie along the line B+2C = 1. +The literature suggests that B=1/3, C=1/3 is best. + + f(x) = 1 { (12-3-2)x^3 - (-18+4+2)x^2 + (16/3) for x < 1 + - { + 6 { (-7/3)x^3 + 12x^2 - 20x + (32/3) for 1<=x<=2 + + f(x) = 1 { 21x^3 - 36x^2 + 16 for x < 1 + - { + 18{ -7x^3 + 36x^2 - 60x + 32 for 1<=x<=2 +*/ + +static float +mitchell(fz_scale_filter *filter, float x) +{ + if (x >= 2) + return 0; + if (x >= 1) + return (32 + x*(-60 + x*(36 - 7*x)))/18; + return (16 + x*x*(-36 + 21*x))/18; +} + +fz_scale_filter fz_scale_filter_box = { 1, box }; +fz_scale_filter fz_scale_filter_triangle = { 1, triangle }; +fz_scale_filter fz_scale_filter_simple = { 1, simple }; +fz_scale_filter fz_scale_filter_lanczos2 = { 2, lanczos2 }; +fz_scale_filter fz_scale_filter_lanczos3 = { 3, lanczos3 }; +fz_scale_filter fz_scale_filter_mitchell = { 2, mitchell }; + +/* +We build ourselves a set of tables to contain the precalculated weights +for a given set of scale settings. + +The first dst_w entries in index are the index into index of the +sets of weight for each destination pixel. + +Each of the sets of weights is a set of values consisting of: + the minimum source pixel index used for this destination pixel + the number of weights used for this destination pixel + the weights themselves + +So to calculate dst[i] we do the following: + + weights = &index[index[i]]; + min = *weights++; + len = *weights++; + dst[i] = 0; + while (--len > 0) + dst[i] += src[min++] * *weights++ + +in addition, we guarantee that at the end of this process weights will now +point to the weights value for dst pixel i+1. + +In the simplest version of this algorithm, we would scale the whole image +horizontally first into a temporary buffer, then scale that temporary +buffer again vertically to give us our result. Using such a simple +algorithm would mean that could use the same style of weights for both +horizontal and vertical scaling. + +Unfortunately, this would also require a large temporary buffer, +particularly in the case where we are scaling up. + +We therefore modify the algorithm as follows; we scale scanlines from the +source image horizontally into a temporary buffer, until we have all the +contributors for a given output scanline. We then produce that output +scanline from the temporary buffer. In this way we restrict the height +of the temporary buffer to a small fraction of the final size. + +Unfortunately, this means that the pseudo code for recombining a +scanline of fully scaled pixels is as follows: + + weights = &index[index[y]]; + min = *weights++; + len = *weights++; + for (x=0 to dst_w) + min2 = min + len2 = len + weights2 = weights + dst[x] = 0; + while (--len2 > 0) + dst[x] += temp[x][(min2++) % tmp_buf_height] * *weights2++ + +i.e. it requires a % operation for every source pixel - this is typically +expensive. + +To avoid this, we alter the order in which vertical weights are stored, +so that they are ordered in the same order as the temporary buffer lines +would appear. This simplifies the algorithm to: + + weights = &index[index[y]]; + min = *weights++; + len = *weights++; + for (x=0 to dst_w) + min2 = 0 + len2 = len + weights2 = weights + dst[x] = 0; + while (--len2 > 0) + dst[x] += temp[i][min2++] * *weights2++ + +This means that len may be larger than it needs to be (due to the +possible inclusion of a zero weight row or two), but in practise this +is only an increase of 1 or 2 at worst. + +We implement this by generating the weights as normal (but ensuring we +leave enough space) and then reordering afterwards. + +*/ + +typedef struct fz_weights_s fz_weights; + +struct fz_weights_s +{ + int count; + int max_len; + int n; + int flip; + int new_line; + int index[1]; +}; + +static fz_weights * +new_weights(fz_scale_filter *filter, int src_w, float dst_w, int dst_w_i, int n, int flip) +{ + int max_len; + fz_weights *weights; + + if (src_w > dst_w) + { + /* Scaling down, so there will be a maximum of + * 2*filterwidth*src_w/dst_w src pixels + * contributing to each dst pixel. */ + max_len = (int)ceilf((2 * filter->width * src_w)/dst_w); + if (max_len > src_w) + max_len = src_w; + } + else + { + /* Scaling up, so there will be a maximum of + * 2*filterwidth src pixels contributing to each dst pixel. + */ + max_len = 2 * filter->width; + } + /* We need the size of the struct, + * plus dst_w*sizeof(int) for the index + * plus (2+max_len)*sizeof(int) for the weights + * plus room for an extra set of weights for reordering. + */ + weights = fz_malloc(sizeof(*weights)+(max_len+3)*(dst_w_i+1)*sizeof(int)); + if (weights == NULL) + return NULL; + weights->count = -1; + weights->max_len = max_len; + weights->index[0] = dst_w_i; + weights->n = n; + weights->flip = flip; + return weights; +} + +static void +init_weights(fz_weights *weights, int j) +{ + int index; + + assert(weights->count == j-1); + weights->count++; + weights->new_line = 1; + if (j == 0) + index = weights->index[0]; + else + { + index = weights->index[j-1]; + index += 2 + weights->index[index+1]; + } + weights->index[j] = index; /* row pointer */ + weights->index[index] = 0; /* min */ + weights->index[index+1] = 0; /* len */ +} + +static void +add_weight(fz_weights *weights, int j, int i, fz_scale_filter *filter, + float x, float F, float G, int src_w, float dst_w) +{ + float dist = j - x + 0.5f - ((i + 0.5f)*dst_w/src_w); + float f; + int min, len, index, weight; + + dist *= G; + if (dist < 0) + dist = -dist; + f = filter->fn(filter, dist)*F; + weight = (int)(256*f+0.5f); + if (weight == 0) + return; + + /* wrap i back into range */ +#ifdef MIRROR_WRAP + do + { + if (i < 0) + i = -1-i; + else if (i >= src_w) + i = 2*src_w-1-i; + else + break; + } + while (1); +#elif defined(WRAP) + if (i < 0) + i = 0; + else if (i >= src_w) + i = src_w-1; +#else + if (i < 0) + { + i = 0; + weight = 0; + } + else if (i >= src_w) + { + i = src_w-1; + weight = 0; + } + if (weight == 0) + return; +#endif + + DBUG(("add_weight[%d][%d] = %d(%g) dist=%g\n",j,i,weight,f,dist)); + + if (weights->new_line) + { + /* New line */ + weights->new_line = 0; + index = weights->index[j]; /* row pointer */ + weights->index[index] = i; /* min */ + weights->index[index+1] = 0; /* len */ + } + index = weights->index[j]; + min = weights->index[index++]; + len = weights->index[index++]; + while (i < min) + { + /* This only happens in rare cases, but we need to insert + * one earlier. In exceedingly rare cases we may need to + * insert more than one earlier. */ + int k; + + for (k = len; k > 0; k--) + { + weights->index[index+k] = weights->index[index+k-1]; + } + weights->index[index] = 0; + min--; + len++; + weights->index[index-2] = min; + weights->index[index-1] = len; + } + if (i-min >= len) + { + /* The usual case */ + while (i-min >= ++len) + { + weights->index[index+len-1] = 0; + } + assert(len-1 == i-min); + weights->index[index+i-min] = weight; + weights->index[index-1] = len; + assert(len <= weights->max_len); + } + else + { + /* Infrequent case */ + weights->index[index+i-min] += weight; + } +} + +static void +reorder_weights(fz_weights *weights, int j, int src_w) +{ + int idx = weights->index[j]; + int min = weights->index[idx++]; + int len = weights->index[idx++]; + int max = weights->max_len; + int tmp = idx+max; + int i, off; + + /* Copy into the temporary area */ + memcpy(&weights->index[tmp], &weights->index[idx], sizeof(int)*len); + + /* Pad out if required */ + assert(len <= max); + assert(min+len <= src_w); + off = 0; + if (len < max) + { + memset(&weights->index[tmp+len], 0, sizeof(int)*(max-len)); + len = max; + if (min + len > src_w) + { + off = min + len - src_w; + min = src_w - len; + weights->index[idx-2] = min; + } + weights->index[idx-1] = len; + } + + /* Copy back into the proper places */ + for (i = 0; i < len; i++) + { + weights->index[idx+((min+i+off) % max)] = weights->index[tmp+i]; + } +} + +/* Due to rounding and edge effects, the sums for the weights sometimes don't + * add up to 256. This causes visible rendering effects. Therefore, we take + * pains to ensure that they 1) never exceed 256, and 2) add up to exactly + * 256 for all pixels that are completely covered. See bug #691629. */ +static void +check_weights(fz_weights *weights, int j, int w, float x, float wf) +{ + int idx, len; + int sum = 0; + int max = -256; + int maxidx = 0; + int i; + + idx = weights->index[j]; + idx++; /* min */ + len = weights->index[idx++]; + + for(i=0; i < len; i++) + { + int v = weights->index[idx++]; + sum += v; + if (v > max) + { + max = v; + maxidx = idx; + } + } + /* If we aren't the first or last pixel, OR if the sum is too big + * then adjust it. */ + if (((j != 0) && (j != w-1)) || (sum > 256)) + weights->index[maxidx-1] += 256-sum; + /* Otherwise, if we are the first pixel, and it's fully covered, then + * adjust it. */ + else if ((j == 0) && (x < 0.0001F) && (sum != 256)) + weights->index[maxidx-1] += 256-sum; + /* Finally, if we are the last pixel, and it's fully covered, then + * adjust it. */ + else if ((j == w-1) && ((float)w-wf < 0.0001F) && (sum != 256)) + weights->index[maxidx-1] += 256-sum; + DBUG(("total weight %d = %d\n", j, sum)); +} + +static fz_weights * +make_weights(int src_w, float x, float dst_w, fz_scale_filter *filter, int vertical, int dst_w_int, int n, int flip) +{ + fz_weights *weights; + float F, G; + float window; + int j; + + if (dst_w < src_w) + { + /* Scaling down */ + F = dst_w / src_w; + G = 1; + } + else + { + /* Scaling up */ + F = 1; + G = src_w / dst_w; + } + window = filter->width / F; + DBUG(("make_weights src_w=%d x=%g dst_w=%g dst_w_int=%d F=%g window=%g\n", src_w, x, dst_w, dst_w_int, F, window)); + weights = new_weights(filter, src_w, dst_w, dst_w_int, n, flip); + if (weights == NULL) + return NULL; + for (j = 0; j < dst_w_int; j++) + { + /* find the position of the centre of dst[j] in src space */ + float centre = (j - x + 0.5f)*src_w/dst_w - 0.5f; + int l, r; + l = ceilf(centre - window); + r = floorf(centre + window); + DBUG(("%d: centre=%g l=%d r=%d\n", j, centre, l, r)); + init_weights(weights, j); + for (; l <= r; l++) + { + add_weight(weights, j, l, filter, x, F, G, src_w, dst_w); + } + check_weights(weights, j, dst_w_int, x, dst_w); + if (vertical) + { + reorder_weights(weights, j, src_w); + } + } + weights->count++; /* weights->count = dst_w_int now */ + return weights; +} + +static void +scale_row_to_temp(int *dst, unsigned char *src, fz_weights *weights) +{ + int *contrib = &weights->index[weights->index[0]]; + int len, i, j, n; + unsigned char *min; + + n = weights->n; + if (weights->flip) + { + dst += (weights->count-1)*n; + for (i=weights->count; i > 0; i--) + { + min = &src[n * *contrib++]; + len = *contrib++; + for (j = 0; j < n; j++) + dst[j] = 0; + while (len-- > 0) + { + for (j = n; j > 0; j--) + *dst++ += *min++ * *contrib; + dst -= n; + contrib++; + } + dst -= n; + } + } + else + { + for (i=weights->count; i > 0; i--) + { + min = &src[n * *contrib++]; + len = *contrib++; + for (j = 0; j < n; j++) + dst[j] = 0; + while (len-- > 0) + { + for (j = n; j > 0; j--) + *dst++ += *min++ * *contrib; + dst -= n; + contrib++; + } + dst += n; + } + } +} + +static void +scale_row_to_temp1(int *dst, unsigned char *src, fz_weights *weights) +{ + int *contrib = &weights->index[weights->index[0]]; + int len, i; + unsigned char *min; + + assert(weights->n == 1); + if (weights->flip) + { + dst += weights->count; + for (i=weights->count; i > 0; i--) + { + int val = 0; + min = &src[*contrib++]; + len = *contrib++; + while (len-- > 0) + { + val += *min++ * *contrib++; + } + *--dst = val; + } + } + else + { + for (i=weights->count; i > 0; i--) + { + int val = 0; + min = &src[*contrib++]; + len = *contrib++; + while (len-- > 0) + { + val += *min++ * *contrib++; + } + *dst++ = val; + } + } +} + +static void +scale_row_to_temp2(int *dst, unsigned char *src, fz_weights *weights) +{ + int *contrib = &weights->index[weights->index[0]]; + int len, i; + unsigned char *min; + + assert(weights->n == 2); + if (weights->flip) + { + dst += 2*weights->count; + for (i=weights->count; i > 0; i--) + { + int c1 = 0; + int c2 = 0; + min = &src[2 * *contrib++]; + len = *contrib++; + while (len-- > 0) + { + c1 += *min++ * *contrib; + c2 += *min++ * *contrib++; + } + *--dst = c2; + *--dst = c1; + } + } + else + { + for (i=weights->count; i > 0; i--) + { + int c1 = 0; + int c2 = 0; + min = &src[2 * *contrib++]; + len = *contrib++; + while (len-- > 0) + { + c1 += *min++ * *contrib; + c2 += *min++ * *contrib++; + } + *dst++ = c1; + *dst++ = c2; + } + } +} + +static void +scale_row_to_temp4(int *dst, unsigned char *src, fz_weights *weights) +{ + int *contrib = &weights->index[weights->index[0]]; +#ifndef ARCH_ARM + int len, i; + unsigned char *min; +#endif + + assert(weights->n == 4); + if (weights->flip) + { + dst += 4*weights->count; +#ifdef ARCH_ARM + asm volatile( + "1:" + "ldr r4, [%2], #4 @ r4 = *contrib++ \n" + "ldr r9, [%2], #4 @ r9 = len = *contrib++ \n" + "mov r5, #0 @ r5 = r = 0 \n" + "mov r6, #0 @ r6 = g = 0 \n" + "mov r7, #0 @ r7 = b = 0 \n" + "mov r8, #0 @ r8 = a = 0 \n" + "add r4, %1, r4, LSL #2 @ r4 = min = &src[4*r4] \n" + "cmp r9, #0 @ while (len-- > 0) \n" + "beq 3f @ { \n" + "2: \n" + "ldr r10,[%2], #4 @ r10 = *contrib++ \n" + "ldrb r11,[r4], #1 @ r11 = *min++ \n" + "ldrb r12,[r4], #1 @ r12 = *min++ \n" + "ldrb r14,[r4], #1 @ r14 = *min++ \n" + "mla r5, r10,r11,r5 @ r += r11 * r10 \n" + "ldrb r11,[r4], #1 @ r11 = *min++ \n" + "mla r6, r10,r12,r6 @ g += r12 * r10 \n" + "mla r7, r10,r14,r7 @ b += r14 * r10 \n" + "mla r8, r10,r11,r8 @ a += r11 * r10 \n" + "subs r9, r9, #1 @ r9 = len-- \n" + "bgt 2b @ } \n" + "stmdb %0!,{r5,r6,r7,r8} @ *--dst=a;*--dst=b; \n" + "3: @ *--dst=g;*--dst=r; \n" + "subs %3, %3, #1 @ i-- \n" + "bgt 1b @ \n" + : + : + "r" (dst), + "r" (src), + "r" (contrib), + "r" (weights->count) + : + "r4","r5","r6","r7","r8","r9","r10","r11","r12","r14", + "memory","cc" + ); +#else + for (i=weights->count; i > 0; i--) + { + int r = 0; + int g = 0; + int b = 0; + int a = 0; + min = &src[4 * *contrib++]; + len = *contrib++; + while (len-- > 0) + { + r += *min++ * *contrib; + g += *min++ * *contrib; + b += *min++ * *contrib; + a += *min++ * *contrib++; + } + *--dst = a; + *--dst = b; + *--dst = g; + *--dst = r; + } +#endif + } + else + { +#ifdef ARCH_ARM + asm volatile( + "1:" + "ldr r4, [%2], #4 @ r4 = *contrib++ \n" + "ldr r9, [%2], #4 @ r9 = len = *contrib++ \n" + "mov r5, #0 @ r5 = r = 0 \n" + "mov r6, #0 @ r6 = g = 0 \n" + "mov r7, #0 @ r7 = b = 0 \n" + "mov r8, #0 @ r8 = a = 0 \n" + "add r4, %1, r4, LSL #2 @ r4 = min = &src[4*r4] \n" + "cmp r9, #0 @ while (len-- > 0) \n" + "beq 3f @ { \n" + "2: \n" + "ldr r10,[%2], #4 @ r10 = *contrib++ \n" + "ldrb r11,[r4], #1 @ r11 = *min++ \n" + "ldrb r12,[r4], #1 @ r12 = *min++ \n" + "ldrb r14,[r4], #1 @ r14 = *min++ \n" + "mla r5, r10,r11,r5 @ r += r11 * r10 \n" + "ldrb r11,[r4], #1 @ r11 = *min++ \n" + "mla r6, r10,r12,r6 @ g += r12 * r10 \n" + "mla r7, r10,r14,r7 @ b += r14 * r10 \n" + "mla r8, r10,r11,r8 @ a += r11 * r10 \n" + "subs r9, r9, #1 @ r9 = len-- \n" + "bgt 2b @ } \n" + "stmia %0!,{r5,r6,r7,r8} @ *dst++=r;*dst++=g; \n" + "3: @ *dst++=b;*dst++=a; \n" + "subs %3, %3, #1 @ i-- \n" + "bgt 1b @ \n" + : + : + "r" (dst), + "r" (src), + "r" (contrib), + "r" (weights->count) + : + "r4","r5","r6","r7","r8","r9","r10","r11","r12","r14", + "memory","cc" + ); +#else + for (i=weights->count; i > 0; i--) + { + int r = 0; + int g = 0; + int b = 0; + int a = 0; + min = &src[4 * *contrib++]; + len = *contrib++; + while (len-- > 0) + { + r += *min++ * *contrib; + g += *min++ * *contrib; + b += *min++ * *contrib; + a += *min++ * *contrib++; + } + *dst++ = r; + *dst++ = g; + *dst++ = b; + *dst++ = a; + } +#endif + } +} + +static void +scale_row_from_temp(unsigned char *dst, int *src, fz_weights *weights, int width, int row) +{ + int *contrib = &weights->index[weights->index[row]]; + int len, x; + + contrib++; /* Skip min */ + len = *contrib++; + for (x=width; x > 0; x--) + { + int *min = src; + int val = 0; + int len2 = len; + int *contrib2 = contrib; + + while (len2-- > 0) + { + val += *min * *contrib2++; + min += width; + } + val = (val+(1<<15))>>16; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + *dst++ = val; + src++; + } +} + +#ifdef SINGLE_PIXEL_SPECIALS +static void +duplicate_single_pixel(unsigned char *dst, unsigned char *src, int n, int w, int h) +{ + int i; + + for (i = n; i > 0; i--) + *dst++ = *src++; + for (i = (w*h-1)*n; i > 0; i--) + { + *dst = dst[-n]; + dst++; + } +} + +static void +scale_single_row(unsigned char *dst, unsigned char *src, fz_weights *weights, int src_w, int h) +{ + int *contrib = &weights->index[weights->index[0]]; + int min, len, i, j, val, n; + int tmp[FZ_MAX_COLORS]; + + n = weights->n; + /* Scale a single row */ + if (weights->flip) + { + dst += (weights->count-1)*n; + for (i=weights->count; i > 0; i--) + { + min = *contrib++; + len = *contrib++; + min *= n; + for (j = 0; j < n; j++) + tmp[j] = 0; + while (len-- > 0) + { + for (j = 0; j < n; j++) + tmp[j] += src[min++] * *contrib; + contrib++; + } + for (j = 0; j < n; j++) + { + val = (tmp[j]+(1<<7))>>8; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + *dst++ = val; + } + dst -= 2*n; + } + dst += n * (weights->count+1); + } + else + { + for (i=weights->count; i > 0; i--) + { + min = *contrib++; + len = *contrib++; + min *= n; + for (j = 0; j < n; j++) + tmp[j] = 0; + while (len-- > 0) + { + for (j = 0; j < n; j++) + tmp[j] += src[min++] * *contrib; + contrib++; + } + for (j = 0; j < n; j++) + { + val = (tmp[j]+(1<<7))>>8; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + *dst++ = val; + } + } + } + /* And then duplicate it h times */ + n *= weights->count; + while (--h > 0) + { + memcpy(dst, dst-n, n); + dst += n; + } +} + +static void +scale_single_col(unsigned char *dst, unsigned char *src, fz_weights *weights, int src_w, int n, int w, int flip_y) +{ + int *contrib = &weights->index[weights->index[0]]; + int min, len, i, j, val; + int tmp[FZ_MAX_COLORS]; + + if (flip_y) + { + src_w = (src_w-1)*n; + w = (w-1)*n; + for (i=weights->count; i > 0; i--) + { + /* Scale the next pixel in the column */ + min = *contrib++; + len = *contrib++; + min = src_w-min*n; + for (j = 0; j < n; j++) + tmp[j] = 0; + while (len-- > 0) + { + for (j = 0; j < n; j++) + tmp[j] += src[src_w-min+j] * *contrib; + contrib++; + } + for (j = 0; j < n; j++) + { + val = (tmp[j]+(1<<7))>>8; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + *dst++ = val; + } + /* And then duplicate it across the row */ + for (j = w; j > 0; j--) + { + *dst = dst[-n]; + dst++; + } + } + } + else + { + w = (w-1)*n; + for (i=weights->count; i > 0; i--) + { + /* Scale the next pixel in the column */ + min = *contrib++; + len = *contrib++; + min *= n; + for (j = 0; j < n; j++) + tmp[j] = 0; + while (len-- > 0) + { + for (j = 0; j < n; j++) + tmp[j] += src[min++] * *contrib; + contrib++; + } + for (j = 0; j < n; j++) + { + val = (tmp[j]+(1<<7))>>8; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + *dst++ = val; + } + /* And then duplicate it across the row */ + for (j = w; j > 0; j--) + { + *dst = dst[-n]; + dst++; + } + } + } +} +#endif /* SINGLE_PIXEL_SPECIALS */ + +fz_pixmap * +fz_scale_pixmap_gridfit(fz_pixmap *src, float x, float y, float w, float h, int gridfit) +{ + if (gridfit) { + float n; + if (w > 0) { + /* Adjust the left hand edge, leftwards to a pixel boundary */ + n = (float)(int)x; /* n is now on a pixel boundary */ + if (n > x) /* Ensure it's the pixel boundary BELOW x */ + n -= 1.0f; + w += x-n; /* width gets wider as x >= n */ + x = n; + /* Adjust the right hand edge rightwards to a pixel boundary */ + n = (float)(int)w; /* n is now the integer width <= w */ + if (n != w) /* If w isn't an integer already, bump it */ + w = 1.0f + n;/* up to the next integer. */ + } else { + /* Adjust the right hand edge, rightwards to a pixel boundary */ + n = (float)(int)x; /* n is now on a pixel boundary */ + if (n > x) /* Ensure it's the pixel boundary <= x */ + n -= 1.0f; + if (n != x) /* If x isn't on a pixel boundary already, */ + n += 1.0f; /* make n be the pixel boundary above x. */ + w -= n-x; /* Expand width (more negative!) as n >= x */ + x = n; + /* Adjust the left hand edge leftwards to a pixel boundary */ + n = (float)(int)w; + if (n != w) + w = n - 1.0f; + } + if (h > 0) { + /* Adjust the bottom edge, downwards to a pixel boundary */ + n = (float)(int)y; /* n is now on a pixel boundary */ + if (n > y) /* Ensure it's the pixel boundary BELOW y */ + n -= 1.0f; + h += y-n; /* height gets larger as y >= n */ + y = n; + /* Adjust the top edge upwards to a pixel boundary */ + n = (float)(int)h; /* n is now the integer height <= h */ + if (n != h) /* If h isn't an integer already, bump it */ + h = 1.0f + n;/* up to the next integer. */ + } else { + /* Adjust the top edge, upwards to a pixel boundary */ + n = (float)(int)y; /* n is now on a pixel boundary */ + if (n > y) /* Ensure it's the pixel boundary <= y */ + n -= 1.0f; + if (n != y) /* If y isn't on a pixel boundary already, */ + n += 1.0f; /* make n be the pixel boundary above y. */ + h -= n-y; /* Expand height (more negative!) as n >= y */ + y = n; + /* Adjust the bottom edge downwards to a pixel boundary */ + n = (float)(int)h; + if (n != h) + h = n - 1.0f; + } + } + return fz_scale_pixmap(src, x, y, w, h); +} + +fz_pixmap * +fz_scale_pixmap(fz_pixmap *src, float x, float y, float w, float h) +{ + fz_scale_filter *filter = &fz_scale_filter_simple; + fz_weights *contrib_rows = NULL; + fz_weights *contrib_cols = NULL; + fz_pixmap *output = NULL; + int *temp = NULL; + int max_row, temp_span, temp_rows, row; + int dst_w_int, dst_h_int, dst_x_int, dst_y_int; + int flip_x, flip_y; + + DBUG(("Scale: (%d,%d) to (%g,%g) at (%g,%g)\n",src->w,src->h,w,h,x,y)); + + /* Find the destination bbox, width/height, and sub pixel offset, + * allowing for whether we're flipping or not. */ + /* Note that the x and y sub pixel offsets here are different. + * The (x,y) position given describes where the bottom left corner + * of the source image should be mapped to (i.e. where (0,h) in image + * space ends up, not the more logical and sane (0,0)). Also there + * are differences in the way we scale horizontally and vertically. + * When scaling rows horizontally, we always read forwards through + * the source, and store either forwards or in reverse as required. + * When scaling vertically, we always store out forwards, but may + * feed source rows in in a different order. + * + * Consider the image rectange 'r' to which the image is mapped, + * and the (possibly) larger rectangle 'R', given by expanding 'r' to + * complete pixels. + * + * x can either be r.xmin-R.xmin or R.xmax-r.xmax depending on whether + * the image is x flipped or not. Whatever happens 0 <= x < 1. + * y is always R.ymax - r.ymax. + */ + /* dst_x_int is calculated to be the left of the scaled image, and + * x (the sub_pixel_offset) is the distance in from either the left + * or right pixel expanded edge. */ + flip_x = (w < 0); + if (flip_x) + { + float tmp; + w = -w; + dst_x_int = floor(x-w); + tmp = ceilf(x); + dst_w_int = (int)tmp; + x = tmp - x; + dst_w_int -= dst_x_int; + } + else + { + dst_x_int = floor(x); + x -= (float)dst_x_int; + dst_w_int = (int)ceilf(x + w); + } + flip_y = (h < 0); + /* dst_y_int is calculated to be the bottom of the scaled image, but + * y (the sub pixel offset) has to end up being the value at the top. + */ + if (flip_y) + { + h = -h; + dst_y_int = floor(y-h); + dst_h_int = (int)ceilf(y) - dst_y_int; + } else { + dst_y_int = floor(y); + y += h; + dst_h_int = (int)ceilf(y) - dst_y_int; + } + /* y is the top edge position in floats. We want it to be the + * distance down from the next pixel boundary. */ + y = ceilf(y) - y; + + DBUG(("Result image: (%d,%d) at (%d,%d) (subpix=%g,%g)\n", dst_w_int, dst_h_int, dst_x_int, dst_y_int, x, y)); + + /* Step 1: Calculate the weights for columns and rows */ +#ifdef SINGLE_PIXEL_SPECIALS + if (src->w == 1) + { + contrib_cols = NULL; + } + else +#endif /* SINGLE_PIXEL_SPECIALS */ + { + contrib_cols = make_weights(src->w, x, w, filter, 0, dst_w_int, src->n, flip_x); + if (contrib_cols == NULL) + goto cleanup; + } +#ifdef SINGLE_PIXEL_SPECIALS + if (src->h == 1) + { + contrib_rows = NULL; + } + else +#endif /* SINGLE_PIXEL_SPECIALS */ + { + contrib_rows = make_weights(src->h, y, h, filter, 1, dst_h_int, src->n, flip_y); + if (contrib_rows == NULL) + goto cleanup; + } + + assert(contrib_cols == NULL || contrib_cols->count == dst_w_int); + assert(contrib_rows == NULL || contrib_rows->count == dst_h_int); + output = fz_new_pixmap(src->colorspace, dst_w_int, dst_h_int); + output->x = dst_x_int; + output->y = dst_y_int; + + /* Step 2: Apply the weights */ +#ifdef SINGLE_PIXEL_SPECIALS + if (contrib_rows == NULL) + { + /* Only 1 source pixel high. */ + if (contrib_cols == NULL) + { + /* Only 1 pixel in the entire image! */ + duplicate_single_pixel(output->samples, src->samples, src->n, dst_w_int, dst_h_int); + } + else + { + /* Scale the row once, then copy it. */ + scale_single_row(output->samples, src->samples, contrib_cols, src->w, dst_h_int); + } + } + else if (contrib_cols == NULL) + { + /* Only 1 source pixel wide. Scale the col and duplicate. */ + scale_single_col(output->samples, src->samples, contrib_rows, src->h, src->n, dst_w_int, flip_y); + } + else +#endif /* SINGLE_PIXEL_SPECIALS */ + { + void (*row_scale)(int *dst, unsigned char *src, fz_weights *weights); + + temp_span = contrib_cols->count * src->n; + temp_rows = contrib_rows->max_len; + if (temp_span <= 0 || temp_rows > INT_MAX / temp_span) + goto cleanup; + temp = fz_calloc(temp_span*temp_rows, sizeof(int)); + if (temp == NULL) + goto cleanup; + switch (src->n) + { + default: + row_scale = scale_row_to_temp; + break; + case 1: /* Image mask case */ + row_scale = scale_row_to_temp1; + break; + case 2: /* Greyscale with alpha case */ + row_scale = scale_row_to_temp2; + break; + case 4: /* RGBA */ + row_scale = scale_row_to_temp4; + break; + } + max_row = 0; + for (row = 0; row < contrib_rows->count; row++) + { + /* + Which source rows do we need to have scaled into the + temporary buffer in order to be able to do the final + scale? + */ + int row_index = contrib_rows->index[row]; + int row_min = contrib_rows->index[row_index++]; + int row_len = contrib_rows->index[row_index++]; + while (max_row < row_min+row_len) + { + /* Scale another row */ + assert(max_row < src->h); + DBUG(("scaling row %d to temp\n", max_row)); + (*row_scale)(&temp[temp_span*(max_row % temp_rows)], &src->samples[(flip_y ? (src->h-1-max_row): max_row)*src->w*src->n], contrib_cols); + max_row++; + } + + DBUG(("scaling row %d from temp\n", row)); + scale_row_from_temp(&output->samples[row*output->w*output->n], temp, contrib_rows, temp_span, row); + } + fz_free(temp); + } + +cleanup: + fz_free(contrib_rows); + fz_free(contrib_cols); + return output; +} diff --git a/contrib/media/updf/draw/draw_unpack.c b/contrib/media/updf/draw/draw_unpack.c new file mode 100644 index 0000000000..b60de3b8cd --- /dev/null +++ b/contrib/media/updf/draw/draw_unpack.c @@ -0,0 +1,235 @@ +#include "fitz.h" + +/* Unpack image samples and optionally pad pixels with opaque alpha */ + +#define get1(buf,x) ((buf[x >> 3] >> ( 7 - (x & 7) ) ) & 1 ) +#define get2(buf,x) ((buf[x >> 2] >> ( ( 3 - (x & 3) ) << 1 ) ) & 3 ) +#define get4(buf,x) ((buf[x >> 1] >> ( ( 1 - (x & 1) ) << 2 ) ) & 15 ) +#define get8(buf,x) (buf[x]) +#define get16(buf,x) (buf[x << 1]) + +static unsigned char get1_tab_1[256][8]; +static unsigned char get1_tab_1p[256][16]; +static unsigned char get1_tab_255[256][8]; +static unsigned char get1_tab_255p[256][16]; + +static void +init_get1_tables(void) +{ + static int once = 0; + unsigned char bits[1]; + int i, k, x; + + /* TODO: mutex lock here */ + + if (once) + return; + + for (i = 0; i < 256; i++) + { + bits[0] = i; + for (k = 0; k < 8; k++) + { + x = get1(bits, k); + + get1_tab_1[i][k] = x; + get1_tab_1p[i][k * 2] = x; + get1_tab_1p[i][k * 2 + 1] = 255; + + get1_tab_255[i][k] = x * 255; + get1_tab_255p[i][k * 2] = x * 255; + get1_tab_255p[i][k * 2 + 1] = 255; + } + } + + once = 1; +} + +void +fz_unpack_tile(fz_pixmap *dst, unsigned char * restrict src, int n, int depth, int stride, int scale) +{ + int pad, x, y, k; + int w = dst->w; + + pad = 0; + if (dst->n > n) + pad = 255; + + if (depth == 1) + init_get1_tables(); + + if (scale == 0) + { + switch (depth) + { + case 1: scale = 255; break; + case 2: scale = 85; break; + case 4: scale = 17; break; + } + } + + for (y = 0; y < dst->h; y++) + { + unsigned char *sp = src + y * stride; + unsigned char *dp = dst->samples + y * (dst->w * dst->n); + + /* Specialized loops */ + + if (n == 1 && depth == 1 && scale == 1 && !pad) + { + int w3 = w >> 3; + for (x = 0; x < w3; x++) + { + memcpy(dp, get1_tab_1[*sp++], 8); + dp += 8; + } + x = x << 3; + if (x < w) + memcpy(dp, get1_tab_1[*sp], w - x); + } + + else if (n == 1 && depth == 1 && scale == 255 && !pad) + { + int w3 = w >> 3; + for (x = 0; x < w3; x++) + { + memcpy(dp, get1_tab_255[*sp++], 8); + dp += 8; + } + x = x << 3; + if (x < w) + memcpy(dp, get1_tab_255[*sp], w - x); + } + + else if (n == 1 && depth == 1 && scale == 1 && pad) + { + int w3 = w >> 3; + for (x = 0; x < w3; x++) + { + memcpy(dp, get1_tab_1p[*sp++], 16); + dp += 16; + } + x = x << 3; + if (x < w) + memcpy(dp, get1_tab_1p[*sp], (w - x) << 1); + } + + else if (n == 1 && depth == 1 && scale == 255 && pad) + { + int w3 = w >> 3; + for (x = 0; x < w3; x++) + { + memcpy(dp, get1_tab_255p[*sp++], 16); + dp += 16; + } + x = x << 3; + if (x < w) + memcpy(dp, get1_tab_255p[*sp], (w - x) << 1); + } + + else if (depth == 8 && !pad) + { + int len = w * n; + while (len--) + *dp++ = *sp++; + } + + else if (depth == 8 && pad) + { + for (x = 0; x < w; x++) + { + for (k = 0; k < n; k++) + *dp++ = *sp++; + *dp++ = 255; + } + } + + else + { + int b = 0; + for (x = 0; x < w; x++) + { + for (k = 0; k < n; k++) + { + switch (depth) + { + case 1: *dp++ = get1(sp, b) * scale; break; + case 2: *dp++ = get2(sp, b) * scale; break; + case 4: *dp++ = get4(sp, b) * scale; break; + case 8: *dp++ = get8(sp, b); break; + case 16: *dp++ = get16(sp, b); break; + } + b++; + } + if (pad) + *dp++ = 255; + } + } + } +} + +/* Apply decode array */ + +void +fz_decode_indexed_tile(fz_pixmap *pix, float *decode, int maxval) +{ + int add[FZ_MAX_COLORS]; + int mul[FZ_MAX_COLORS]; + unsigned char *p = pix->samples; + int len = pix->w * pix->h; + int n = pix->n - 1; + int needed; + int k; + + needed = 0; + for (k = 0; k < n; k++) + { + int min = decode[k * 2] * 256; + int max = decode[k * 2 + 1] * 256; + add[k] = min; + mul[k] = (max - min) / maxval; + needed |= min != 0 || max != maxval * 256; + } + + if (!needed) + return; + + while (len--) + { + for (k = 0; k < n; k++) + p[k] = (add[k] + (((p[k] << 8) * mul[k]) >> 8)) >> 8; + p += n + 1; + } +} + +void +fz_decode_tile(fz_pixmap *pix, float *decode) +{ + int add[FZ_MAX_COLORS]; + int mul[FZ_MAX_COLORS]; + unsigned char *p = pix->samples; + int len = pix->w * pix->h; + int n = MAX(1, pix->n - 1); + int needed; + int k; + + needed = 0; + for (k = 0; k < n; k++) + { + int min = decode[k * 2] * 255; + int max = decode[k * 2 + 1] * 255; + add[k] = min; + mul[k] = max - min; + needed |= min != 0 || max != 255; + } + + if (!needed) + return; + + while (len--) + { + for (k = 0; k < n; k++) + p[k] = add[k] + fz_mul255(p[k], mul[k]); + p += pix->n; + } +} diff --git a/contrib/media/updf/fitz/base_error.c b/contrib/media/updf/fitz/base_error.c new file mode 100644 index 0000000000..a0efa29001 --- /dev/null +++ b/contrib/media/updf/fitz/base_error.c @@ -0,0 +1,159 @@ +#include "fitz.h" + +enum { LINE_LEN = 160, LINE_COUNT = 25 }; + +static char warn_message[LINE_LEN] = ""; +static int warn_count = 0; + +void fz_flush_warnings(void) +{ + if (warn_count > 1) + fprintf(stderr, "warning: ... repeated %d times ...\n", warn_count); + warn_message[0] = 0; + warn_count = 0; +} + +void fz_warn(char *fmt, ...) +{ + va_list ap; + char buf[LINE_LEN]; + + va_start(ap, fmt); + vsnprintf(buf, sizeof buf, fmt, ap); + va_end(ap); + + if (!strcmp(buf, warn_message)) + { + warn_count++; + } + else + { + fz_flush_warnings(); + fprintf(stderr, "warning: %s\n", buf); + fz_strlcpy(warn_message, buf, sizeof warn_message); + warn_count = 1; + } +} + +static char error_message[LINE_COUNT][LINE_LEN]; +static int error_count = 0; + +static void +fz_emit_error(char what, char *location, char *message) +{ + fz_flush_warnings(); + + fprintf(stderr, "%c %s%s\n", what, location, message); + + if (error_count < LINE_COUNT) + { + fz_strlcpy(error_message[error_count], location, LINE_LEN); + fz_strlcat(error_message[error_count], message, LINE_LEN); + error_count++; + } +} + +int +fz_get_error_count(void) +{ + return error_count; +} + +char * +fz_get_error_line(int n) +{ + return error_message[n]; +} + +fz_error +fz_throw_imp(const char *file, int line, const char *func, char *fmt, ...) +{ + va_list ap; + char one[LINE_LEN], two[LINE_LEN]; + + error_count = 0; + + snprintf(one, sizeof one, "%s:%d: %s(): ", file, line, func); + va_start(ap, fmt); + vsnprintf(two, sizeof two, fmt, ap); + va_end(ap); + + fz_emit_error('+', one, two); + + return -1; +} + +fz_error +fz_rethrow_imp(const char *file, int line, const char *func, fz_error cause, char *fmt, ...) +{ + va_list ap; + char one[LINE_LEN], two[LINE_LEN]; + + snprintf(one, sizeof one, "%s:%d: %s(): ", file, line, func); + va_start(ap, fmt); + vsnprintf(two, sizeof two, fmt, ap); + va_end(ap); + + fz_emit_error('|', one, two); + + return cause; +} + +void +fz_catch_imp(const char *file, int line, const char *func, fz_error cause, char *fmt, ...) +{ + va_list ap; + char one[LINE_LEN], two[LINE_LEN]; + + snprintf(one, sizeof one, "%s:%d: %s(): ", file, line, func); + va_start(ap, fmt); + vsnprintf(two, sizeof two, fmt, ap); + va_end(ap); + + fz_emit_error('\\', one, two); +} + +fz_error +fz_throw_impx(char *fmt, ...) +{ + va_list ap; + char buf[LINE_LEN]; + + error_count = 0; + + va_start(ap, fmt); + vsnprintf(buf, sizeof buf, fmt, ap); + va_end(ap); + + fz_emit_error('+', "", buf); + + return -1; +} + +fz_error +fz_rethrow_impx(fz_error cause, char *fmt, ...) +{ + va_list ap; + char buf[LINE_LEN]; + + va_start(ap, fmt); + vsnprintf(buf, sizeof buf, fmt, ap); + va_end(ap); + + fz_emit_error('|', "", buf); + + return cause; +} + +void +fz_catch_impx(fz_error cause, char *fmt, ...) +{ + va_list ap; + char buf[LINE_LEN]; + + va_start(ap, fmt); + vsnprintf(buf, sizeof buf, fmt, ap); + va_end(ap); + + fz_emit_error('\\', "", buf); +} diff --git a/contrib/media/updf/fitz/base_geometry.c b/contrib/media/updf/fitz/base_geometry.c new file mode 100644 index 0000000000..00a85c9bc9 --- /dev/null +++ b/contrib/media/updf/fitz/base_geometry.c @@ -0,0 +1,268 @@ +#include "fitz.h" + +#define MAX4(a,b,c,d) MAX(MAX(a,b), MAX(c,d)) +#define MIN4(a,b,c,d) MIN(MIN(a,b), MIN(c,d)) + +/* Matrices, points and affine transformations */ + +const fz_matrix fz_identity = { 1, 0, 0, 1, 0, 0 }; + +fz_matrix +fz_concat(fz_matrix one, fz_matrix two) +{ + fz_matrix dst; + dst.a = one.a * two.a + one.b * two.c; + dst.b = one.a * two.b + one.b * two.d; + dst.c = one.c * two.a + one.d * two.c; + dst.d = one.c * two.b + one.d * two.d; + dst.e = one.e * two.a + one.f * two.c + two.e; + dst.f = one.e * two.b + one.f * two.d + two.f; + return dst; +} + +fz_matrix +fz_scale(float sx, float sy) +{ + fz_matrix m; + m.a = sx; m.b = 0; + m.c = 0; m.d = sy; + m.e = 0; m.f = 0; + return m; +} + +fz_matrix +fz_shear(float h, float v) +{ + fz_matrix m; + m.a = 1; m.b = v; + m.c = h; m.d = 1; + m.e = 0; m.f = 0; + return m; +} + +fz_matrix +fz_rotate(float theta) +{ + fz_matrix m; + float s; + float c; + + while (theta < 0) + theta += 360; + while (theta >= 360) + theta -= 360; + + if (fabsf(0 - theta) < FLT_EPSILON) + { + s = 0; + c = 1; + } + else if (fabsf(90.0f - theta) < FLT_EPSILON) + { + s = 1; + c = 0; + } + else if (fabsf(180.0f - theta) < FLT_EPSILON) + { + s = 0; + c = -1; + } + else if (fabsf(270.0f - theta) < FLT_EPSILON) + { + s = -1; + c = 0; + } + else + { + s = sinf(theta * (float)M_PI / 180); + c = cosf(theta * (float)M_PI / 180); + } + + m.a = c; m.b = s; + m.c = -s; m.d = c; + m.e = 0; m.f = 0; + return m; +} + +fz_matrix +fz_translate(float tx, float ty) +{ + fz_matrix m; + m.a = 1; m.b = 0; + m.c = 0; m.d = 1; + m.e = tx; m.f = ty; + return m; +} + +fz_matrix +fz_invert_matrix(fz_matrix src) +{ + fz_matrix dst; + float rdet = 1 / (src.a * src.d - src.b * src.c); + dst.a = src.d * rdet; + dst.b = -src.b * rdet; + dst.c = -src.c * rdet; + dst.d = src.a * rdet; + dst.e = -src.e * dst.a - src.f * dst.c; + dst.f = -src.e * dst.b - src.f * dst.d; + return dst; +} + +int +fz_is_rectilinear(fz_matrix m) +{ + return (fabsf(m.b) < FLT_EPSILON && fabsf(m.c) < FLT_EPSILON) || + (fabsf(m.a) < FLT_EPSILON && fabsf(m.d) < FLT_EPSILON); +} + +float +fz_matrix_expansion(fz_matrix m) +{ + return sqrtf(fabsf(m.a * m.d - m.b * m.c)); +} + +fz_point +fz_transform_point(fz_matrix m, fz_point p) +{ + fz_point t; + t.x = p.x * m.a + p.y * m.c + m.e; + t.y = p.x * m.b + p.y * m.d + m.f; + return t; +} + +fz_point +fz_transform_vector(fz_matrix m, fz_point p) +{ + fz_point t; + t.x = p.x * m.a + p.y * m.c; + t.y = p.x * m.b + p.y * m.d; + return t; +} + +/* Rectangles and bounding boxes */ + +const fz_rect fz_infinite_rect = { 1, 1, -1, -1 }; +const fz_rect fz_empty_rect = { 0, 0, 0, 0 }; +const fz_rect fz_unit_rect = { 0, 0, 1, 1 }; + +const fz_bbox fz_infinite_bbox = { 1, 1, -1, -1 }; +const fz_bbox fz_empty_bbox = { 0, 0, 0, 0 }; +const fz_bbox fz_unit_bbox = { 0, 0, 1, 1 }; + +fz_bbox +fz_round_rect(fz_rect f) +{ + fz_bbox i; + i.x0 = floorf(f.x0 + 0.001f); /* adjust by 0.001 to compensate for precision errors */ + i.y0 = floorf(f.y0 + 0.001f); + i.x1 = ceilf(f.x1 - 0.001f); + i.y1 = ceilf(f.y1 - 0.001f); + return i; +} + +fz_rect +fz_intersect_rect(fz_rect a, fz_rect b) +{ + fz_rect r; + if (fz_is_infinite_rect(a)) return b; + if (fz_is_infinite_rect(b)) return a; + if (fz_is_empty_rect(a)) return fz_empty_rect; + if (fz_is_empty_rect(b)) return fz_empty_rect; + r.x0 = MAX(a.x0, b.x0); + r.y0 = MAX(a.y0, b.y0); + r.x1 = MIN(a.x1, b.x1); + r.y1 = MIN(a.y1, b.y1); + return (r.x1 < r.x0 || r.y1 < r.y0) ? fz_empty_rect : r; +} + +fz_rect +fz_union_rect(fz_rect a, fz_rect b) +{ + fz_rect r; + if (fz_is_infinite_rect(a)) return a; + if (fz_is_infinite_rect(b)) return b; + if (fz_is_empty_rect(a)) return b; + if (fz_is_empty_rect(b)) return a; + r.x0 = MIN(a.x0, b.x0); + r.y0 = MIN(a.y0, b.y0); + r.x1 = MAX(a.x1, b.x1); + r.y1 = MAX(a.y1, b.y1); + return r; +} + +fz_bbox +fz_intersect_bbox(fz_bbox a, fz_bbox b) +{ + fz_bbox r; + if (fz_is_infinite_rect(a)) return b; + if (fz_is_infinite_rect(b)) return a; + if (fz_is_empty_rect(a)) return fz_empty_bbox; + if (fz_is_empty_rect(b)) return fz_empty_bbox; + r.x0 = MAX(a.x0, b.x0); + r.y0 = MAX(a.y0, b.y0); + r.x1 = MIN(a.x1, b.x1); + r.y1 = MIN(a.y1, b.y1); + return (r.x1 < r.x0 || r.y1 < r.y0) ? fz_empty_bbox : r; +} + +fz_bbox +fz_union_bbox(fz_bbox a, fz_bbox b) +{ + fz_bbox r; + if (fz_is_infinite_rect(a)) return a; + if (fz_is_infinite_rect(b)) return b; + if (fz_is_empty_rect(a)) return b; + if (fz_is_empty_rect(b)) return a; + r.x0 = MIN(a.x0, b.x0); + r.y0 = MIN(a.y0, b.y0); + r.x1 = MAX(a.x1, b.x1); + r.y1 = MAX(a.y1, b.y1); + return r; +} + +fz_rect +fz_transform_rect(fz_matrix m, fz_rect r) +{ + fz_point s, t, u, v; + + if (fz_is_infinite_rect(r)) + return r; + + s.x = r.x0; s.y = r.y0; + t.x = r.x0; t.y = r.y1; + u.x = r.x1; u.y = r.y1; + v.x = r.x1; v.y = r.y0; + s = fz_transform_point(m, s); + t = fz_transform_point(m, t); + u = fz_transform_point(m, u); + v = fz_transform_point(m, v); + r.x0 = MIN4(s.x, t.x, u.x, v.x); + r.y0 = MIN4(s.y, t.y, u.y, v.y); + r.x1 = MAX4(s.x, t.x, u.x, v.x); + r.y1 = MAX4(s.y, t.y, u.y, v.y); + return r; +} + +fz_bbox +fz_transform_bbox(fz_matrix m, fz_bbox b) +{ + fz_point s, t, u, v; + + if (fz_is_infinite_bbox(b)) + return b; + + s.x = b.x0; s.y = b.y0; + t.x = b.x0; t.y = b.y1; + u.x = b.x1; u.y = b.y1; + v.x = b.x1; v.y = b.y0; + s = fz_transform_point(m, s); + t = fz_transform_point(m, t); + u = fz_transform_point(m, u); + v = fz_transform_point(m, v); + b.x0 = MIN4(s.x, t.x, u.x, v.x); + b.y0 = MIN4(s.y, t.y, u.y, v.y); + b.x1 = MAX4(s.x, t.x, u.x, v.x); + b.y1 = MAX4(s.y, t.y, u.y, v.y); + return b; + +} diff --git a/contrib/media/updf/fitz/base_getopt.c b/contrib/media/updf/fitz/base_getopt.c new file mode 100644 index 0000000000..2c198ba1e0 --- /dev/null +++ b/contrib/media/updf/fitz/base_getopt.c @@ -0,0 +1,66 @@ +/* + * This is a version of the public domain getopt implementation by + * Henry Spencer originally posted to net.sources. + * + * This file is in the public domain. + */ + +#include +#include + +#define getopt fz_getopt +#define optarg fz_optarg +#define optind fz_optind + +char *optarg; /* Global argument pointer. */ +int optind = 0; /* Global argv index. */ + +static char *scan = NULL; /* Private scan pointer. */ + +int +getopt(int argc, char *argv[], char *optstring) +{ + char c; + char *place; + + optarg = NULL; + + if (scan == NULL || *scan == '\0') { + if (optind == 0) + optind++; + + if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0') + return EOF; + if (argv[optind][1] == '-' && argv[optind][2] == '\0') { + optind++; + return EOF; + } + + scan = argv[optind]+1; + optind++; + } + + c = *scan++; + place = strchr(optstring, c); + + if (place == NULL || c == ':') { + fprintf(stderr, "%s: unknown option -%c\n", argv[0], c); + return '?'; + } + + place++; + if (*place == ':') { + if (*scan != '\0') { + optarg = scan; + scan = NULL; + } else if( optind < argc ) { + optarg = argv[optind]; + optind++; + } else { + fprintf(stderr, "%s: option requires argument -%c\n", argv[0], c); + return ':'; + } + } + + return c; +} diff --git a/contrib/media/updf/fitz/base_hash.c b/contrib/media/updf/fitz/base_hash.c new file mode 100644 index 0000000000..fcfc1f611a --- /dev/null +++ b/contrib/media/updf/fitz/base_hash.c @@ -0,0 +1,241 @@ +#include "fitz.h" + +/* +Simple hashtable with open adressing linear probe. +Unlike text book examples, removing entries works +correctly in this implementation, so it wont start +exhibiting bad behaviour if entries are inserted +and removed frequently. +*/ + +enum { MAX_KEY_LEN = 48 }; +typedef struct fz_hash_entry_s fz_hash_entry; + +struct fz_hash_entry_s +{ + unsigned char key[MAX_KEY_LEN]; + void *val; +}; + +struct fz_hash_table_s +{ + int keylen; + int size; + int load; + fz_hash_entry *ents; +}; + +static unsigned hash(unsigned char *s, int len) +{ + unsigned val = 0; + int i; + for (i = 0; i < len; i++) + { + val += s[i]; + val += (val << 10); + val ^= (val >> 6); + } + val += (val << 3); + val ^= (val >> 11); + val += (val << 15); + return val; +} + +fz_hash_table * +fz_new_hash_table(int initialsize, int keylen) +{ + fz_hash_table *table; + + assert(keylen <= MAX_KEY_LEN); + + table = fz_malloc(sizeof(fz_hash_table)); + table->keylen = keylen; + table->size = initialsize; + table->load = 0; + table->ents = fz_calloc(table->size, sizeof(fz_hash_entry)); + memset(table->ents, 0, sizeof(fz_hash_entry) * table->size); + + return table; +} + +void +fz_empty_hash(fz_hash_table *table) +{ + table->load = 0; + memset(table->ents, 0, sizeof(fz_hash_entry) * table->size); +} + +int +fz_hash_len(fz_hash_table *table) +{ + return table->size; +} + +void * +fz_hash_get_key(fz_hash_table *table, int idx) +{ + return table->ents[idx].key; +} + +void * +fz_hash_get_val(fz_hash_table *table, int idx) +{ + return table->ents[idx].val; +} + +void +fz_free_hash(fz_hash_table *table) +{ + fz_free(table->ents); + fz_free(table); +} + +static void +fz_resize_hash(fz_hash_table *table, int newsize) +{ + fz_hash_entry *oldents = table->ents; + int oldsize = table->size; + int oldload = table->load; + int i; + + if (newsize < oldload * 8 / 10) + { + fz_throw("assert: resize hash too small"); + return; + } + + table->ents = fz_calloc(newsize, sizeof(fz_hash_entry)); + memset(table->ents, 0, sizeof(fz_hash_entry) * newsize); + table->size = newsize; + table->load = 0; + + for (i = 0; i < oldsize; i++) + { + if (oldents[i].val) + { + fz_hash_insert(table, oldents[i].key, oldents[i].val); + } + } + + fz_free(oldents); +} + +void * +fz_hash_find(fz_hash_table *table, void *key) +{ + fz_hash_entry *ents = table->ents; + unsigned size = table->size; + unsigned pos = hash(key, table->keylen) % size; + + while (1) + { + if (!ents[pos].val) + return NULL; + + if (memcmp(key, ents[pos].key, table->keylen) == 0) + return ents[pos].val; + + pos = (pos + 1) % size; + } +} + +void +fz_hash_insert(fz_hash_table *table, void *key, void *val) +{ + fz_hash_entry *ents; + unsigned size; + unsigned pos; + + if (table->load > table->size * 8 / 10) + { + fz_resize_hash(table, table->size * 2); + } + + ents = table->ents; + size = table->size; + pos = hash(key, table->keylen) % size; + + while (1) + { + if (!ents[pos].val) + { + memcpy(ents[pos].key, key, table->keylen); + ents[pos].val = val; + table->load ++; + return; + } + + if (memcmp(key, ents[pos].key, table->keylen) == 0) + fz_warn("assert: overwrite hash slot"); + + pos = (pos + 1) % size; + } +} + +void +fz_hash_remove(fz_hash_table *table, void *key) +{ + fz_hash_entry *ents = table->ents; + unsigned size = table->size; + unsigned pos = hash(key, table->keylen) % size; + unsigned hole, look, code; + + while (1) + { + if (!ents[pos].val) + { + fz_warn("assert: remove inexistant hash entry"); + return; + } + + if (memcmp(key, ents[pos].key, table->keylen) == 0) + { + ents[pos].val = NULL; + + hole = pos; + look = (hole + 1) % size; + + while (ents[look].val) + { + code = hash(ents[look].key, table->keylen) % size; + if ((code <= hole && hole < look) || + (look < code && code <= hole) || + (hole < look && look < code)) + { + ents[hole] = ents[look]; + ents[look].val = NULL; + hole = look; + } + + look = (look + 1) % size; + } + + table->load --; + + return; + } + + pos = (pos + 1) % size; + } +} + +void +fz_debug_hash(fz_hash_table *table) +{ + int i, k; + + printf("cache load %d / %d\n", table->load, table->size); + + for (i = 0; i < table->size; i++) + { + if (!table->ents[i].val) + printf("table % 4d: empty\n", i); + else + { + printf("table % 4d: key=", i); + for (k = 0; k < MAX_KEY_LEN; k++) + printf("%02x", ((char*)table->ents[i].key)[k]); + printf(" val=$%p\n", table->ents[i].val); + } + } +} diff --git a/contrib/media/updf/fitz/base_memory.c b/contrib/media/updf/fitz/base_memory.c new file mode 100644 index 0000000000..f1b668ebe8 --- /dev/null +++ b/contrib/media/updf/fitz/base_memory.c @@ -0,0 +1,77 @@ +#include "fitz.h" + +void * +fz_malloc(int size) +{ + void *p = malloc(size); + if (!p) + { + fprintf(stderr, "fatal error: out of memory\n"); + abort(); + } + return p; +} + +void * +fz_calloc(int count, int size) +{ + void *p; + + if (count == 0 || size == 0) + return 0; + + if (count < 0 || size < 0 || count > INT_MAX / size) + { + fprintf(stderr, "fatal error: out of memory (integer overflow)\n"); + abort(); + } + + p = malloc(count * size); + if (!p) + { + fprintf(stderr, "fatal error: out of memory\n"); + abort(); + } + return p; +} + +void * +fz_realloc(void *p, int count, int size) +{ + void *np; + + if (count == 0 || size == 0) + { + fz_free(p); + return 0; + } + + if (count < 0 || size < 0 || count > INT_MAX / size) + { + fprintf(stderr, "fatal error: out of memory (integer overflow)\n"); + abort(); + } + + np = realloc(p, count * size); + if (np == NULL) + { + fprintf(stderr, "fatal error: out of memory\n"); + abort(); + } + return np; +} + +void +fz_free(void *p) +{ + free(p); +} + +char * +fz_strdup(char *s) +{ + int len = strlen(s) + 1; + char *ns = fz_malloc(len); + memcpy(ns, s, len); + return ns; +} diff --git a/contrib/media/updf/fitz/base_object.c b/contrib/media/updf/fitz/base_object.c new file mode 100644 index 0000000000..5c20767a21 --- /dev/null +++ b/contrib/media/updf/fitz/base_object.c @@ -0,0 +1,802 @@ +#include "fitz.h" + +typedef enum fz_objkind_e +{ + FZ_NULL, + FZ_BOOL, + FZ_INT, + FZ_REAL, + FZ_STRING, + FZ_NAME, + FZ_ARRAY, + FZ_DICT, + FZ_INDIRECT +} fz_objkind; + +struct keyval +{ + fz_obj *k; + fz_obj *v; +}; + +struct fz_obj_s +{ + int refs; + fz_objkind kind; + union + { + int b; + int i; + float f; + struct { + unsigned short len; + char buf[1]; + } s; + char n[1]; + struct { + int len; + int cap; + fz_obj **items; + } a; + struct { + char sorted; + int len; + int cap; + struct keyval *items; + } d; + struct { + int num; + int gen; + struct pdf_xref_s *xref; + } r; + } u; +}; + +static fz_obj *fz_resolve_indirect_null(fz_obj *ref) +{ + return ref; +} + +fz_obj* (*fz_resolve_indirect)(fz_obj*) = fz_resolve_indirect_null; + +fz_obj * +fz_new_null(void) +{ + fz_obj *obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_NULL; + return obj; +} + +fz_obj * +fz_new_bool(int b) +{ + fz_obj *obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_BOOL; + obj->u.b = b; + return obj; +} + +fz_obj * +fz_new_int(int i) +{ + fz_obj *obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_INT; + obj->u.i = i; + return obj; +} + +fz_obj * +fz_new_real(float f) +{ + fz_obj *obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_REAL; + obj->u.f = f; + return obj; +} + +fz_obj * +fz_new_string(char *str, int len) +{ + fz_obj *obj = fz_malloc(offsetof(fz_obj, u.s.buf) + len + 1); + obj->refs = 1; + obj->kind = FZ_STRING; + obj->u.s.len = len; + memcpy(obj->u.s.buf, str, len); + obj->u.s.buf[len] = '\0'; + return obj; +} + +fz_obj * +fz_new_name(char *str) +{ + fz_obj *obj = fz_malloc(offsetof(fz_obj, u.n) + strlen(str) + 1); + obj->refs = 1; + obj->kind = FZ_NAME; + strcpy(obj->u.n, str); + return obj; +} + +fz_obj * +fz_new_indirect(int num, int gen, void *xref) +{ + fz_obj *obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_INDIRECT; + obj->u.r.num = num; + obj->u.r.gen = gen; + obj->u.r.xref = xref; + return obj; +} + +fz_obj * +fz_keep_obj(fz_obj *obj) +{ + assert(obj != NULL); + obj->refs ++; + return obj; +} + +int fz_is_indirect(fz_obj *obj) +{ + return obj ? obj->kind == FZ_INDIRECT : 0; +} + +int fz_is_null(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_NULL : 0; +} + +int fz_is_bool(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_BOOL : 0; +} + +int fz_is_int(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_INT : 0; +} + +int fz_is_real(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_REAL : 0; +} + +int fz_is_string(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_STRING : 0; +} + +int fz_is_name(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_NAME : 0; +} + +int fz_is_array(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_ARRAY : 0; +} + +int fz_is_dict(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + return obj ? obj->kind == FZ_DICT : 0; +} + +int fz_to_bool(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_bool(obj)) + return obj->u.b; + return 0; +} + +int fz_to_int(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_int(obj)) + return obj->u.i; + if (fz_is_real(obj)) + return obj->u.f; + return 0; +} + +float fz_to_real(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_real(obj)) + return obj->u.f; + if (fz_is_int(obj)) + return obj->u.i; + return 0; +} + +char *fz_to_name(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_name(obj)) + return obj->u.n; + return ""; +} + +char *fz_to_str_buf(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_string(obj)) + return obj->u.s.buf; + return ""; +} + +int fz_to_str_len(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_string(obj)) + return obj->u.s.len; + return 0; +} + +/* for use by pdf_crypt_obj_imp to decrypt AES string in place */ +void fz_set_str_len(fz_obj *obj, int newlen) +{ + obj = fz_resolve_indirect(obj); + if (fz_is_string(obj)) + if (newlen < obj->u.s.len) + obj->u.s.len = newlen; +} + +int fz_to_num(fz_obj *obj) +{ + if (fz_is_indirect(obj)) + return obj->u.r.num; + return 0; +} + +int fz_to_gen(fz_obj *obj) +{ + if (fz_is_indirect(obj)) + return obj->u.r.gen; + return 0; +} + +void *fz_get_indirect_xref(fz_obj *obj) +{ + if (fz_is_indirect(obj)) + return obj->u.r.xref; + return NULL; +} + +int +fz_objcmp(fz_obj *a, fz_obj *b) +{ + int i; + + if (a == b) + return 0; + + if (!a || !b) + return 1; + + if (a->kind != b->kind) + return 1; + + switch (a->kind) + { + case FZ_NULL: + return 0; + + case FZ_BOOL: + return a->u.b - b->u.b; + + case FZ_INT: + return a->u.i - b->u.i; + + case FZ_REAL: + if (a->u.f < b->u.f) + return -1; + if (a->u.f > b->u.f) + return 1; + return 0; + + case FZ_STRING: + if (a->u.s.len < b->u.s.len) + { + if (memcmp(a->u.s.buf, b->u.s.buf, a->u.s.len) <= 0) + return -1; + return 1; + } + if (a->u.s.len > b->u.s.len) + { + if (memcmp(a->u.s.buf, b->u.s.buf, b->u.s.len) >= 0) + return 1; + return -1; + } + return memcmp(a->u.s.buf, b->u.s.buf, a->u.s.len); + + case FZ_NAME: + return strcmp(a->u.n, b->u.n); + + case FZ_INDIRECT: + if (a->u.r.num == b->u.r.num) + return a->u.r.gen - b->u.r.gen; + return a->u.r.num - b->u.r.num; + + case FZ_ARRAY: + if (a->u.a.len != b->u.a.len) + return a->u.a.len - b->u.a.len; + for (i = 0; i < a->u.a.len; i++) + if (fz_objcmp(a->u.a.items[i], b->u.a.items[i])) + return 1; + return 0; + + case FZ_DICT: + if (a->u.d.len != b->u.d.len) + return a->u.d.len - b->u.d.len; + for (i = 0; i < a->u.d.len; i++) + { + if (fz_objcmp(a->u.d.items[i].k, b->u.d.items[i].k)) + return 1; + if (fz_objcmp(a->u.d.items[i].v, b->u.d.items[i].v)) + return 1; + } + return 0; + + } + return 1; +} + +static char * +fz_objkindstr(fz_obj *obj) +{ + if (obj == NULL) + return ""; + switch (obj->kind) + { + case FZ_NULL: return "null"; + case FZ_BOOL: return "boolean"; + case FZ_INT: return "integer"; + case FZ_REAL: return "real"; + case FZ_STRING: return "string"; + case FZ_NAME: return "name"; + case FZ_ARRAY: return "array"; + case FZ_DICT: return "dictionary"; + case FZ_INDIRECT: return "reference"; + } + return ""; +} + +fz_obj * +fz_new_array(int initialcap) +{ + fz_obj *obj; + int i; + + obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_ARRAY; + + obj->u.a.len = 0; + obj->u.a.cap = initialcap > 1 ? initialcap : 6; + + obj->u.a.items = fz_calloc(obj->u.a.cap, sizeof(fz_obj*)); + for (i = 0; i < obj->u.a.cap; i++) + obj->u.a.items[i] = NULL; + + return obj; +} + +fz_obj * +fz_copy_array(fz_obj *obj) +{ + fz_obj *new; + int i; + + if (fz_is_indirect(obj) || !fz_is_array(obj)) + fz_warn("assert: not an array (%s)", fz_objkindstr(obj)); + + new = fz_new_array(fz_array_len(obj)); + for (i = 0; i < fz_array_len(obj); i++) + fz_array_push(new, fz_array_get(obj, i)); + + return new; +} + +int +fz_array_len(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (!fz_is_array(obj)) + return 0; + return obj->u.a.len; +} + +fz_obj * +fz_array_get(fz_obj *obj, int i) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_array(obj)) + return NULL; + + if (i < 0 || i >= obj->u.a.len) + return NULL; + + return obj->u.a.items[i]; +} + +void +fz_array_put(fz_obj *obj, int i, fz_obj *item) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_array(obj)) + fz_warn("assert: not an array (%s)", fz_objkindstr(obj)); + else if (i < 0) + fz_warn("assert: index %d < 0", i); + else if (i >= obj->u.a.len) + fz_warn("assert: index %d > length %d", i, obj->u.a.len); + else + { + if (obj->u.a.items[i]) + fz_drop_obj(obj->u.a.items[i]); + obj->u.a.items[i] = fz_keep_obj(item); + } +} + +void +fz_array_push(fz_obj *obj, fz_obj *item) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_array(obj)) + fz_warn("assert: not an array (%s)", fz_objkindstr(obj)); + else + { + if (obj->u.a.len + 1 > obj->u.a.cap) + { + int i; + obj->u.a.cap = (obj->u.a.cap * 3) / 2; + obj->u.a.items = fz_realloc(obj->u.a.items, obj->u.a.cap, sizeof(fz_obj*)); + for (i = obj->u.a.len ; i < obj->u.a.cap; i++) + obj->u.a.items[i] = NULL; + } + obj->u.a.items[obj->u.a.len] = fz_keep_obj(item); + obj->u.a.len++; + } +} + +void +fz_array_insert(fz_obj *obj, fz_obj *item) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_array(obj)) + fz_warn("assert: not an array (%s)", fz_objkindstr(obj)); + else + { + if (obj->u.a.len + 1 > obj->u.a.cap) + { + int i; + obj->u.a.cap = (obj->u.a.cap * 3) / 2; + obj->u.a.items = fz_realloc(obj->u.a.items, obj->u.a.cap, sizeof(fz_obj*)); + for (i = obj->u.a.len ; i < obj->u.a.cap; i++) + obj->u.a.items[i] = NULL; + } + memmove(obj->u.a.items + 1, obj->u.a.items, obj->u.a.len * sizeof(fz_obj*)); + obj->u.a.items[0] = fz_keep_obj(item); + obj->u.a.len++; + } +} + +/* dicts may only have names as keys! */ + +static int keyvalcmp(const void *ap, const void *bp) +{ + const struct keyval *a = ap; + const struct keyval *b = bp; + return strcmp(fz_to_name(a->k), fz_to_name(b->k)); +} + +fz_obj * +fz_new_dict(int initialcap) +{ + fz_obj *obj; + int i; + + obj = fz_malloc(sizeof(fz_obj)); + obj->refs = 1; + obj->kind = FZ_DICT; + + obj->u.d.sorted = 1; + obj->u.d.len = 0; + obj->u.d.cap = initialcap > 1 ? initialcap : 10; + + obj->u.d.items = fz_calloc(obj->u.d.cap, sizeof(struct keyval)); + for (i = 0; i < obj->u.d.cap; i++) + { + obj->u.d.items[i].k = NULL; + obj->u.d.items[i].v = NULL; + } + + return obj; +} + +fz_obj * +fz_copy_dict(fz_obj *obj) +{ + fz_obj *new; + int i; + + if (fz_is_indirect(obj) || !fz_is_dict(obj)) + fz_throw("assert: not a dict (%s)", fz_objkindstr(obj)); + + new = fz_new_dict(fz_dict_len(obj)); + for (i = 0; i < fz_dict_len(obj); i++) + fz_dict_put(new, fz_dict_get_key(obj, i), fz_dict_get_val(obj, i)); + + return new; +} + +int +fz_dict_len(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (!fz_is_dict(obj)) + return 0; + return obj->u.d.len; +} + +fz_obj * +fz_dict_get_key(fz_obj *obj, int i) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_dict(obj)) + return NULL; + + if (i < 0 || i >= obj->u.d.len) + return NULL; + + return obj->u.d.items[i].k; +} + +fz_obj * +fz_dict_get_val(fz_obj *obj, int i) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_dict(obj)) + return NULL; + + if (i < 0 || i >= obj->u.d.len) + return NULL; + + return obj->u.d.items[i].v; +} + +static int +fz_dict_finds(fz_obj *obj, char *key) +{ + if (obj->u.d.sorted) + { + int l = 0; + int r = obj->u.d.len - 1; + while (l <= r) + { + int m = (l + r) >> 1; + int c = -strcmp(fz_to_name(obj->u.d.items[m].k), key); + if (c < 0) + r = m - 1; + else if (c > 0) + l = m + 1; + else + return m; + } + } + + else + { + int i; + for (i = 0; i < obj->u.d.len; i++) + if (strcmp(fz_to_name(obj->u.d.items[i].k), key) == 0) + return i; + } + + return -1; +} + +fz_obj * +fz_dict_gets(fz_obj *obj, char *key) +{ + int i; + + obj = fz_resolve_indirect(obj); + + if (!fz_is_dict(obj)) + return NULL; + + i = fz_dict_finds(obj, key); + if (i >= 0) + return obj->u.d.items[i].v; + + return NULL; +} + +fz_obj * +fz_dict_get(fz_obj *obj, fz_obj *key) +{ + if (fz_is_name(key)) + return fz_dict_gets(obj, fz_to_name(key)); + return NULL; +} + +fz_obj * +fz_dict_getsa(fz_obj *obj, char *key, char *abbrev) +{ + fz_obj *v; + v = fz_dict_gets(obj, key); + if (v) + return v; + return fz_dict_gets(obj, abbrev); +} + +void +fz_dict_put(fz_obj *obj, fz_obj *key, fz_obj *val) +{ + char *s; + int i; + + obj = fz_resolve_indirect(obj); + + if (!fz_is_dict(obj)) + { + fz_warn("assert: not a dict (%s)", fz_objkindstr(obj)); + return; + } + + if (fz_is_name(key)) + s = fz_to_name(key); + else + { + fz_warn("assert: key is not a name (%s)", fz_objkindstr(obj)); + return; + } + + if (!val) + { + fz_warn("assert: val does not exist for key (%s)", s); + return; + } + + i = fz_dict_finds(obj, s); + if (i >= 0) + { + fz_drop_obj(obj->u.d.items[i].v); + obj->u.d.items[i].v = fz_keep_obj(val); + return; + } + + if (obj->u.d.len + 1 > obj->u.d.cap) + { + obj->u.d.cap = (obj->u.d.cap * 3) / 2; + obj->u.d.items = fz_realloc(obj->u.d.items, obj->u.d.cap, sizeof(struct keyval)); + for (i = obj->u.d.len; i < obj->u.d.cap; i++) + { + obj->u.d.items[i].k = NULL; + obj->u.d.items[i].v = NULL; + } + } + + /* borked! */ + if (obj->u.d.len) + if (strcmp(fz_to_name(obj->u.d.items[obj->u.d.len - 1].k), s) > 0) + obj->u.d.sorted = 0; + + obj->u.d.items[obj->u.d.len].k = fz_keep_obj(key); + obj->u.d.items[obj->u.d.len].v = fz_keep_obj(val); + obj->u.d.len ++; +} + +void +fz_dict_puts(fz_obj *obj, char *key, fz_obj *val) +{ + fz_obj *keyobj = fz_new_name(key); + fz_dict_put(obj, keyobj, val); + fz_drop_obj(keyobj); +} + +void +fz_dict_dels(fz_obj *obj, char *key) +{ + obj = fz_resolve_indirect(obj); + + if (!fz_is_dict(obj)) + fz_warn("assert: not a dict (%s)", fz_objkindstr(obj)); + else + { + int i = fz_dict_finds(obj, key); + if (i >= 0) + { + fz_drop_obj(obj->u.d.items[i].k); + fz_drop_obj(obj->u.d.items[i].v); + obj->u.d.sorted = 0; + obj->u.d.items[i] = obj->u.d.items[obj->u.d.len-1]; + obj->u.d.len --; + } + } +} + +void +fz_dict_del(fz_obj *obj, fz_obj *key) +{ + if (fz_is_name(key)) + fz_dict_dels(obj, fz_to_name(key)); + else + fz_warn("assert: key is not a name (%s)", fz_objkindstr(obj)); +} + +void +fz_sort_dict(fz_obj *obj) +{ + obj = fz_resolve_indirect(obj); + if (!fz_is_dict(obj)) + return; + if (!obj->u.d.sorted) + { + qsort(obj->u.d.items, obj->u.d.len, sizeof(struct keyval), keyvalcmp); + obj->u.d.sorted = 1; + } +} + +static void +fz_free_array(fz_obj *obj) +{ + int i; + + for (i = 0; i < obj->u.a.len; i++) + if (obj->u.a.items[i]) + fz_drop_obj(obj->u.a.items[i]); + + fz_free(obj->u.a.items); + fz_free(obj); +} + +static void +fz_free_dict(fz_obj *obj) +{ + int i; + + for (i = 0; i < obj->u.d.len; i++) { + if (obj->u.d.items[i].k) + fz_drop_obj(obj->u.d.items[i].k); + if (obj->u.d.items[i].v) + fz_drop_obj(obj->u.d.items[i].v); + } + + fz_free(obj->u.d.items); + fz_free(obj); +} + +void +fz_drop_obj(fz_obj *obj) +{ + assert(obj != NULL); + if (--obj->refs == 0) + { + if (obj->kind == FZ_ARRAY) + fz_free_array(obj); + else if (obj->kind == FZ_DICT) + fz_free_dict(obj); + else + fz_free(obj); + } +} diff --git a/contrib/media/updf/fitz/base_string.c b/contrib/media/updf/fitz/base_string.c new file mode 100644 index 0000000000..76748e20fe --- /dev/null +++ b/contrib/media/updf/fitz/base_string.c @@ -0,0 +1,265 @@ +#include "fitz.h" + +int +fz_is_big_endian(void) +{ + static const int one = 1; + return *(char*)&one == 0; +} + +char * +fz_strsep(char **stringp, const char *delim) +{ + char *ret = *stringp; + if (ret == NULL) return NULL; + if ((*stringp = strpbrk(*stringp, delim)) != NULL) + *((*stringp)++) = '\0'; + return ret; +} + +int +fz_strlcpy(char *dst, const char *src, int siz) +{ + register char *d = dst; + register const char *s = src; + register int n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} + +int +fz_strlcat(char *dst, const char *src, int siz) +{ + register char *d = dst; + register const char *s = src; + register int n = siz; + int dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (*d != '\0' && n-- != 0) + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return dlen + strlen(s); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return dlen + (s - src); /* count does not include NUL */ +} + +enum +{ + UTFmax = 4, /* maximum bytes per rune */ + Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ + Runeself = 0x80, /* rune and UTF sequences are the same (<) */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* maximum rune value */ +}; + +enum +{ + Bit1 = 7, + Bitx = 6, + Bit2 = 5, + Bit3 = 4, + Bit4 = 3, + Bit5 = 2, + + T1 = ((1<<(Bit1+1))-1) ^ 0xFF, /* 0000 0000 */ + Tx = ((1<<(Bitx+1))-1) ^ 0xFF, /* 1000 0000 */ + T2 = ((1<<(Bit2+1))-1) ^ 0xFF, /* 1100 0000 */ + T3 = ((1<<(Bit3+1))-1) ^ 0xFF, /* 1110 0000 */ + T4 = ((1<<(Bit4+1))-1) ^ 0xFF, /* 1111 0000 */ + T5 = ((1<<(Bit5+1))-1) ^ 0xFF, /* 1111 1000 */ + + Rune1 = (1<<(Bit1+0*Bitx))-1, /* 0000 0000 0111 1111 */ + Rune2 = (1<<(Bit2+1*Bitx))-1, /* 0000 0111 1111 1111 */ + Rune3 = (1<<(Bit3+2*Bitx))-1, /* 1111 1111 1111 1111 */ + Rune4 = (1<<(Bit4+3*Bitx))-1, /* 0001 1111 1111 1111 1111 1111 */ + + Maskx = (1< T1 + */ + c = *(unsigned char*)str; + if(c < Tx) { + *rune = c; + return 1; + } + + /* + * two character sequence + * 0080-07FF => T2 Tx + */ + c1 = *(unsigned char*)(str+1) ^ Tx; + if(c1 & Testx) + goto bad; + if(c < T3) { + if(c < T2) + goto bad; + l = ((c << Bitx) | c1) & Rune2; + if(l <= Rune1) + goto bad; + *rune = l; + return 2; + } + + /* + * three character sequence + * 0800-FFFF => T3 Tx Tx + */ + c2 = *(unsigned char*)(str+2) ^ Tx; + if(c2 & Testx) + goto bad; + if(c < T4) { + l = ((((c << Bitx) | c1) << Bitx) | c2) & Rune3; + if(l <= Rune2) + goto bad; + *rune = l; + return 3; + } + + /* + * four character sequence (21-bit value) + * 10000-1FFFFF => T4 Tx Tx Tx + */ + c3 = *(unsigned char*)(str+3) ^ Tx; + if (c3 & Testx) + goto bad; + if (c < T5) { + l = ((((((c << Bitx) | c1) << Bitx) | c2) << Bitx) | c3) & Rune4; + if (l <= Rune3) + goto bad; + *rune = l; + return 4; + } + /* + * Support for 5-byte or longer UTF-8 would go here, but + * since we don't have that, we'll just fall through to bad. + */ + + /* + * bad decoding + */ +bad: + *rune = Bad; + return 1; +} + +int +runetochar(char *str, int *rune) +{ + /* Runes are signed, so convert to unsigned for range check. */ + unsigned long c; + + /* + * one character sequence + * 00000-0007F => 00-7F + */ + c = *rune; + if(c <= Rune1) { + str[0] = c; + return 1; + } + + /* + * two character sequence + * 0080-07FF => T2 Tx + */ + if(c <= Rune2) { + str[0] = T2 | (c >> 1*Bitx); + str[1] = Tx | (c & Maskx); + return 2; + } + + /* + * If the Rune is out of range, convert it to the error rune. + * Do this test here because the error rune encodes to three bytes. + * Doing it earlier would duplicate work, since an out of range + * Rune wouldn't have fit in one or two bytes. + */ + if (c > Runemax) + c = Runeerror; + + /* + * three character sequence + * 0800-FFFF => T3 Tx Tx + */ + if (c <= Rune3) { + str[0] = T3 | (c >> 2*Bitx); + str[1] = Tx | ((c >> 1*Bitx) & Maskx); + str[2] = Tx | (c & Maskx); + return 3; + } + + /* + * four character sequence (21-bit value) + * 10000-1FFFFF => T4 Tx Tx Tx + */ + str[0] = T4 | (c >> 3*Bitx); + str[1] = Tx | ((c >> 2*Bitx) & Maskx); + str[2] = Tx | ((c >> 1*Bitx) & Maskx); + str[3] = Tx | (c & Maskx); + return 4; +} + +int +runelen(int c) +{ + char str[10]; + return runetochar(str, &c); +} + +float fz_atof(const char *s) +{ + double d; + + /* The errno voodoo here checks for us reading numbers that are too + * big to fit into a double. The checks for FLT_MAX ensure that we + * don't read a number that's OK as a double and then become invalid + * as we convert to a float. */ + errno = 0; + d = strtod(s, NULL); + if (errno == ERANGE || d > FLT_MAX || d < -FLT_MAX) { + /* Return 1.0, as it's a small known value that won't cause a + * divide by 0. */ + return 1.0; + } + return (float)d; +} diff --git a/contrib/media/updf/fitz/base_time.c b/contrib/media/updf/fitz/base_time.c new file mode 100644 index 0000000000..a369099ca0 --- /dev/null +++ b/contrib/media/updf/fitz/base_time.c @@ -0,0 +1,42 @@ +#ifdef _WIN32 + +#include +#include +#include + +#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) +#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 +#else +#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL +#endif + +struct timeval; + +int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + unsigned __int64 tmpres = 0; + + if (tv) + { + GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + tmpres /= 10; /*convert into microseconds*/ + /*converting file time to unix epoch*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + return 0; +} + +#else + +void fz_gettimeofday_dummy() { } + +#endif diff --git a/contrib/media/updf/fitz/crypt_aes.c b/contrib/media/updf/fitz/crypt_aes.c new file mode 100644 index 0000000000..afdff0fe69 --- /dev/null +++ b/contrib/media/updf/fitz/crypt_aes.c @@ -0,0 +1,565 @@ +/* + * FIPS-197 compliant AES implementation + * + * Copyright (C) 2006-2007 Christophe Devine + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code _must_ retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form may or may not reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of XySSL nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "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 COPYRIGHT + * OWNER OR CONTRIBUTORS 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. + */ +/* + * The AES block cipher was designed by Vincent Rijmen and Joan Daemen. + * + * http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf + * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf + */ + +#include "fitz.h" + +#define aes_context fz_aes + +/* AES block cipher implementation from XYSSL */ + +/* + * 32-bit integer manipulation macros (little endian) + */ +#ifndef GET_ULONG_LE +#define GET_ULONG_LE(n,b,i) \ +{ \ + (n) = ( (unsigned long) (b)[(i)] ) \ + | ( (unsigned long) (b)[(i) + 1] << 8 ) \ + | ( (unsigned long) (b)[(i) + 2] << 16 ) \ + | ( (unsigned long) (b)[(i) + 3] << 24 ); \ +} +#endif + +#ifndef PUT_ULONG_LE +#define PUT_ULONG_LE(n,b,i) \ +{ \ + (b)[(i) ] = (unsigned char) ( (n) ); \ + (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ + (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ + (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +} +#endif + +/* + * Forward S-box & tables + */ +static unsigned char FSb[256]; +static unsigned long FT0[256]; +static unsigned long FT1[256]; +static unsigned long FT2[256]; +static unsigned long FT3[256]; + +/* + * Reverse S-box & tables + */ +static unsigned char RSb[256]; +static unsigned long RT0[256]; +static unsigned long RT1[256]; +static unsigned long RT2[256]; +static unsigned long RT3[256]; + +/* + * Round constants + */ +static unsigned long RCON[10]; + +/* + * Tables generation code + */ +#define ROTL8(x) ( ( x << 8 ) & 0xFFFFFFFF ) | ( x >> 24 ) +#define XTIME(x) ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) ) +#define MUL(x,y) ( ( x && y ) ? pow[(log[x]+log[y]) % 255] : 0 ) + +static int aes_init_done = 0; + +static void aes_gen_tables( void ) +{ + int i, x, y, z; + int pow[256]; + int log[256]; + + /* + * compute pow and log tables over GF(2^8) + */ + for( i = 0, x = 1; i < 256; i++ ) + { + pow[i] = x; + log[x] = i; + x = ( x ^ XTIME( x ) ) & 0xFF; + } + + /* + * calculate the round constants + */ + for( i = 0, x = 1; i < 10; i++ ) + { + RCON[i] = (unsigned long) x; + x = XTIME( x ) & 0xFF; + } + + /* + * generate the forward and reverse S-boxes + */ + FSb[0x00] = 0x63; + RSb[0x63] = 0x00; + + for( i = 1; i < 256; i++ ) + { + x = pow[255 - log[i]]; + + y = x; y = ( (y << 1) | (y >> 7) ) & 0xFF; + x ^= y; y = ( (y << 1) | (y >> 7) ) & 0xFF; + x ^= y; y = ( (y << 1) | (y >> 7) ) & 0xFF; + x ^= y; y = ( (y << 1) | (y >> 7) ) & 0xFF; + x ^= y ^ 0x63; + + FSb[i] = (unsigned char) x; + RSb[x] = (unsigned char) i; + } + + /* + * generate the forward and reverse tables + */ + for( i = 0; i < 256; i++ ) + { + x = FSb[i]; + y = XTIME( x ) & 0xFF; + z = ( y ^ x ) & 0xFF; + + FT0[i] = ( (unsigned long) y ) ^ + ( (unsigned long) x << 8 ) ^ + ( (unsigned long) x << 16 ) ^ + ( (unsigned long) z << 24 ); + + FT1[i] = ROTL8( FT0[i] ); + FT2[i] = ROTL8( FT1[i] ); + FT3[i] = ROTL8( FT2[i] ); + + x = RSb[i]; + + RT0[i] = ( (unsigned long) MUL( 0x0E, x ) ) ^ + ( (unsigned long) MUL( 0x09, x ) << 8 ) ^ + ( (unsigned long) MUL( 0x0D, x ) << 16 ) ^ + ( (unsigned long) MUL( 0x0B, x ) << 24 ); + + RT1[i] = ROTL8( RT0[i] ); + RT2[i] = ROTL8( RT1[i] ); + RT3[i] = ROTL8( RT2[i] ); + } +} + +/* + * AES key schedule (encryption) + */ +void aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) +{ + int i; + unsigned long *RK; + +#if !defined(XYSSL_AES_ROM_TABLES) + if( aes_init_done == 0 ) + { + aes_gen_tables(); + aes_init_done = 1; + } +#endif + + switch( keysize ) + { + case 128: ctx->nr = 10; break; + case 192: ctx->nr = 12; break; + case 256: ctx->nr = 14; break; + default : return; + } + +#if defined(PADLOCK_ALIGN16) + ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); +#else + ctx->rk = RK = ctx->buf; +#endif + + for( i = 0; i < (keysize >> 5); i++ ) + { + GET_ULONG_LE( RK[i], key, i << 2 ); + } + + switch( ctx->nr ) + { + case 10: + + for( i = 0; i < 10; i++, RK += 4 ) + { + RK[4] = RK[0] ^ RCON[i] ^ + ( FSb[ ( RK[3] >> 8 ) & 0xFF ] ) ^ + ( FSb[ ( RK[3] >> 16 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( RK[3] >> 24 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( RK[3] ) & 0xFF ] << 24 ); + + RK[5] = RK[1] ^ RK[4]; + RK[6] = RK[2] ^ RK[5]; + RK[7] = RK[3] ^ RK[6]; + } + break; + + case 12: + + for( i = 0; i < 8; i++, RK += 6 ) + { + RK[6] = RK[0] ^ RCON[i] ^ + ( FSb[ ( RK[5] >> 8 ) & 0xFF ] ) ^ + ( FSb[ ( RK[5] >> 16 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( RK[5] >> 24 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( RK[5] ) & 0xFF ] << 24 ); + + RK[7] = RK[1] ^ RK[6]; + RK[8] = RK[2] ^ RK[7]; + RK[9] = RK[3] ^ RK[8]; + RK[10] = RK[4] ^ RK[9]; + RK[11] = RK[5] ^ RK[10]; + } + break; + + case 14: + + for( i = 0; i < 7; i++, RK += 8 ) + { + RK[8] = RK[0] ^ RCON[i] ^ + ( FSb[ ( RK[7] >> 8 ) & 0xFF ] ) ^ + ( FSb[ ( RK[7] >> 16 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( RK[7] >> 24 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( RK[7] ) & 0xFF ] << 24 ); + + RK[9] = RK[1] ^ RK[8]; + RK[10] = RK[2] ^ RK[9]; + RK[11] = RK[3] ^ RK[10]; + + RK[12] = RK[4] ^ + ( FSb[ ( RK[11] ) & 0xFF ] ) ^ + ( FSb[ ( RK[11] >> 8 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( RK[11] >> 16 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( RK[11] >> 24 ) & 0xFF ] << 24 ); + + RK[13] = RK[5] ^ RK[12]; + RK[14] = RK[6] ^ RK[13]; + RK[15] = RK[7] ^ RK[14]; + } + break; + + default: + + break; + } +} + +/* + * AES key schedule (decryption) + */ +void aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize ) +{ + int i, j; + aes_context cty; + unsigned long *RK; + unsigned long *SK; + + switch( keysize ) + { + case 128: ctx->nr = 10; break; + case 192: ctx->nr = 12; break; + case 256: ctx->nr = 14; break; + default : return; + } + +#if defined(PADLOCK_ALIGN16) + ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); +#else + ctx->rk = RK = ctx->buf; +#endif + + aes_setkey_enc( &cty, key, keysize ); + SK = cty.rk + cty.nr * 4; + + *RK++ = *SK++; + *RK++ = *SK++; + *RK++ = *SK++; + *RK++ = *SK++; + + for( i = ctx->nr - 1, SK -= 8; i > 0; i--, SK -= 8 ) + { + for( j = 0; j < 4; j++, SK++ ) + { + *RK++ = RT0[ FSb[ ( *SK ) & 0xFF ] ] ^ + RT1[ FSb[ ( *SK >> 8 ) & 0xFF ] ] ^ + RT2[ FSb[ ( *SK >> 16 ) & 0xFF ] ] ^ + RT3[ FSb[ ( *SK >> 24 ) & 0xFF ] ]; + } + } + + *RK++ = *SK++; + *RK++ = *SK++; + *RK++ = *SK++; + *RK++ = *SK++; + + memset( &cty, 0, sizeof( aes_context ) ); +} + +#define AES_FROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \ +{ \ + X0 = *RK++ ^ FT0[ ( Y0 ) & 0xFF ] ^ \ + FT1[ ( Y1 >> 8 ) & 0xFF ] ^ \ + FT2[ ( Y2 >> 16 ) & 0xFF ] ^ \ + FT3[ ( Y3 >> 24 ) & 0xFF ]; \ + \ + X1 = *RK++ ^ FT0[ ( Y1 ) & 0xFF ] ^ \ + FT1[ ( Y2 >> 8 ) & 0xFF ] ^ \ + FT2[ ( Y3 >> 16 ) & 0xFF ] ^ \ + FT3[ ( Y0 >> 24 ) & 0xFF ]; \ + \ + X2 = *RK++ ^ FT0[ ( Y2 ) & 0xFF ] ^ \ + FT1[ ( Y3 >> 8 ) & 0xFF ] ^ \ + FT2[ ( Y0 >> 16 ) & 0xFF ] ^ \ + FT3[ ( Y1 >> 24 ) & 0xFF ]; \ + \ + X3 = *RK++ ^ FT0[ ( Y3 ) & 0xFF ] ^ \ + FT1[ ( Y0 >> 8 ) & 0xFF ] ^ \ + FT2[ ( Y1 >> 16 ) & 0xFF ] ^ \ + FT3[ ( Y2 >> 24 ) & 0xFF ]; \ +} + +#define AES_RROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \ +{ \ + X0 = *RK++ ^ RT0[ ( Y0 ) & 0xFF ] ^ \ + RT1[ ( Y3 >> 8 ) & 0xFF ] ^ \ + RT2[ ( Y2 >> 16 ) & 0xFF ] ^ \ + RT3[ ( Y1 >> 24 ) & 0xFF ]; \ + \ + X1 = *RK++ ^ RT0[ ( Y1 ) & 0xFF ] ^ \ + RT1[ ( Y0 >> 8 ) & 0xFF ] ^ \ + RT2[ ( Y3 >> 16 ) & 0xFF ] ^ \ + RT3[ ( Y2 >> 24 ) & 0xFF ]; \ + \ + X2 = *RK++ ^ RT0[ ( Y2 ) & 0xFF ] ^ \ + RT1[ ( Y1 >> 8 ) & 0xFF ] ^ \ + RT2[ ( Y0 >> 16 ) & 0xFF ] ^ \ + RT3[ ( Y3 >> 24 ) & 0xFF ]; \ + \ + X3 = *RK++ ^ RT0[ ( Y3 ) & 0xFF ] ^ \ + RT1[ ( Y2 >> 8 ) & 0xFF ] ^ \ + RT2[ ( Y1 >> 16 ) & 0xFF ] ^ \ + RT3[ ( Y0 >> 24 ) & 0xFF ]; \ +} + +/* + * AES-ECB block encryption/decryption + */ +void aes_crypt_ecb( aes_context *ctx, + int mode, + const unsigned char input[16], + unsigned char output[16] ) +{ + int i; + unsigned long *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; + +#if defined(XYSSL_PADLOCK_C) && defined(XYSSL_HAVE_X86) + if( padlock_supports( PADLOCK_ACE ) ) + { + if( padlock_xcryptecb( ctx, mode, input, output ) == 0 ) + return; + } +#endif + + RK = ctx->rk; + + GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++; + GET_ULONG_LE( X1, input, 4 ); X1 ^= *RK++; + GET_ULONG_LE( X2, input, 8 ); X2 ^= *RK++; + GET_ULONG_LE( X3, input, 12 ); X3 ^= *RK++; + + if( mode == AES_DECRYPT ) + { + for( i = (ctx->nr >> 1) - 1; i > 0; i-- ) + { + AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); + AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 ); + } + + AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); + + X0 = *RK++ ^ ( RSb[ ( Y0 ) & 0xFF ] ) ^ + ( RSb[ ( Y3 >> 8 ) & 0xFF ] << 8 ) ^ + ( RSb[ ( Y2 >> 16 ) & 0xFF ] << 16 ) ^ + ( RSb[ ( Y1 >> 24 ) & 0xFF ] << 24 ); + + X1 = *RK++ ^ ( RSb[ ( Y1 ) & 0xFF ] ) ^ + ( RSb[ ( Y0 >>8 ) & 0xFF ] << 8 ) ^ + ( RSb[ ( Y3 >> 16 ) & 0xFF ] << 16 ) ^ + ( RSb[ ( Y2 >> 24 ) & 0xFF ] << 24 ); + + X2 = *RK++ ^ ( RSb[ ( Y2 ) & 0xFF ] ) ^ + ( RSb[ ( Y1 >> 8 ) & 0xFF ] << 8 ) ^ + ( RSb[ ( Y0 >> 16 ) & 0xFF ] << 16 ) ^ + ( RSb[ ( Y3 >> 24 ) & 0xFF ] << 24 ); + + X3 = *RK++ ^ ( RSb[ ( Y3 ) & 0xFF ] ) ^ + ( RSb[ ( Y2 >> 8 ) & 0xFF ] << 8 ) ^ + ( RSb[ ( Y1 >> 16 ) & 0xFF ] << 16 ) ^ + ( RSb[ ( Y0 >> 24 ) & 0xFF ] << 24 ); + } + else /* AES_ENCRYPT */ + { + for( i = (ctx->nr >> 1) - 1; i > 0; i-- ) + { + AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); + AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 ); + } + + AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); + + X0 = *RK++ ^ ( FSb[ ( Y0 ) & 0xFF ] ) ^ + ( FSb[ ( Y1 >> 8 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( Y2 >> 16 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( Y3 >> 24 ) & 0xFF ] << 24 ); + + X1 = *RK++ ^ ( FSb[ ( Y1 ) & 0xFF ] ) ^ + ( FSb[ ( Y2 >> 8 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( Y3 >> 16 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( Y0 >> 24 ) & 0xFF ] << 24 ); + + X2 = *RK++ ^ ( FSb[ ( Y2 ) & 0xFF ] ) ^ + ( FSb[ ( Y3 >> 8 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( Y0 >> 16 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( Y1 >> 24 ) & 0xFF ] << 24 ); + + X3 = *RK++ ^ ( FSb[ ( Y3 ) & 0xFF ] ) ^ + ( FSb[ ( Y0 >> 8 ) & 0xFF ] << 8 ) ^ + ( FSb[ ( Y1 >> 16 ) & 0xFF ] << 16 ) ^ + ( FSb[ ( Y2 >> 24 ) & 0xFF ] << 24 ); + } + + PUT_ULONG_LE( X0, output, 0 ); + PUT_ULONG_LE( X1, output, 4 ); + PUT_ULONG_LE( X2, output, 8 ); + PUT_ULONG_LE( X3, output, 12 ); +} + +/* + * AES-CBC buffer encryption/decryption + */ +void aes_crypt_cbc( aes_context *ctx, + int mode, + int length, + unsigned char iv[16], + const unsigned char *input, + unsigned char *output ) +{ + int i; + unsigned char temp[16]; + +#if defined(XYSSL_PADLOCK_C) && defined(XYSSL_HAVE_X86) + if( padlock_supports( PADLOCK_ACE ) ) + { + if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 ) + return; + } +#endif + + if( mode == AES_DECRYPT ) + { + while( length > 0 ) + { + memcpy( temp, input, 16 ); + aes_crypt_ecb( ctx, mode, input, output ); + + for( i = 0; i < 16; i++ ) + output[i] = (unsigned char)( output[i] ^ iv[i] ); + + memcpy( iv, temp, 16 ); + + input += 16; + output += 16; + length -= 16; + } + } + else + { + while( length > 0 ) + { + for( i = 0; i < 16; i++ ) + output[i] = (unsigned char)( input[i] ^ iv[i] ); + + aes_crypt_ecb( ctx, mode, output, output ); + memcpy( iv, output, 16 ); + + input += 16; + output += 16; + length -= 16; + } + } +} + +/* + * AES-CFB buffer encryption/decryption + */ +void aes_crypt_cfb( aes_context *ctx, + int mode, + int length, + int *iv_off, + unsigned char iv[16], + const unsigned char *input, + unsigned char *output ) +{ + int c, n = *iv_off; + + if( mode == AES_DECRYPT ) + { + while( length-- ) + { + if( n == 0 ) + aes_crypt_ecb( ctx, AES_ENCRYPT, iv, iv ); + + c = *input++; + *output++ = (unsigned char)( c ^ iv[n] ); + iv[n] = (unsigned char) c; + + n = (n + 1) & 0x0F; + } + } + else + { + while( length-- ) + { + if( n == 0 ) + aes_crypt_ecb( ctx, AES_ENCRYPT, iv, iv ); + + iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ ); + + n = (n + 1) & 0x0F; + } + } + + *iv_off = n; +} diff --git a/contrib/media/updf/fitz/crypt_arc4.c b/contrib/media/updf/fitz/crypt_arc4.c new file mode 100644 index 0000000000..72871386a8 --- /dev/null +++ b/contrib/media/updf/fitz/crypt_arc4.c @@ -0,0 +1,98 @@ +/* This code illustrates a sample implementation + * of the Arcfour algorithm + * Copyright (c) April 29, 1997 Kalle Kaukonen. + * All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that this copyright + * notice and disclaimer are retained. + * + * THIS SOFTWARE IS PROVIDED BY KALLE KAUKONEN AND CONTRIBUTORS ``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 KALLE + * KAUKONEN OR CONTRIBUTORS 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. + */ + +#include "fitz.h" + +void +fz_arc4_init(fz_arc4 *arc4, const unsigned char *key, const unsigned keylen) +{ + unsigned int t, u; + unsigned int keyindex; + unsigned int stateindex; + unsigned char *state; + unsigned int counter; + + state = arc4->state; + + arc4->x = 0; + arc4->y = 0; + + for (counter = 0; counter < 256; counter++) + { + state[counter] = counter; + } + + keyindex = 0; + stateindex = 0; + + for (counter = 0; counter < 256; counter++) + { + t = state[counter]; + stateindex = (stateindex + key[keyindex] + t) & 0xff; + u = state[stateindex]; + + state[stateindex] = t; + state[counter] = u; + + if (++keyindex >= keylen) + { + keyindex = 0; + } + } +} + +static unsigned char +fz_arc4_next(fz_arc4 *arc4) +{ + unsigned int x; + unsigned int y; + unsigned int sx, sy; + unsigned char *state; + + state = arc4->state; + + x = (arc4->x + 1) & 0xff; + sx = state[x]; + y = (sx + arc4->y) & 0xff; + sy = state[y]; + + arc4->x = x; + arc4->y = y; + + state[y] = sx; + state[x] = sy; + + return state[(sx + sy) & 0xff]; +} + +void +fz_arc4_encrypt(fz_arc4 *arc4, unsigned char *dest, const unsigned char *src, const unsigned len) +{ + unsigned int i; + for (i = 0; i < len; i++) + { + unsigned char x; + x = fz_arc4_next(arc4); + dest[i] = src[i] ^ x; + } +} diff --git a/contrib/media/updf/fitz/crypt_md5.c b/contrib/media/updf/fitz/crypt_md5.c new file mode 100644 index 0000000000..ba2571c4ee --- /dev/null +++ b/contrib/media/updf/fitz/crypt_md5.c @@ -0,0 +1,272 @@ +/* +MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + +Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. +All rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD5 Message-Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD5 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. +*/ + +#include "fitz.h" + +/* Constants for MD5Transform routine */ +enum +{ + S11 = 7, S12 = 12, S13 = 17, S14 = 22, + S21 = 5, S22 = 9, S23 = 14, S24 = 20, + S31 = 4, S32 = 11, S33 = 16, S34 = 23, + S41 = 6, S42 = 10, S43 = 15, S44 = 21 +}; + +static void encode(unsigned char *, const unsigned int *, const unsigned); +static void decode(unsigned int *, const unsigned char *, const unsigned); +static void transform(unsigned int state[4], const unsigned char block[64]); + +static unsigned char padding[64] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* F, G, H and I are basic MD5 functions */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE rotates x left n bits */ +#define ROTATE(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. + * Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (unsigned int)(ac); \ + (a) = ROTATE ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (unsigned int)(ac); \ + (a) = ROTATE ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (unsigned int)(ac); \ + (a) = ROTATE ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (unsigned int)(ac); \ + (a) = ROTATE ((a), (s)); \ + (a) += (b); \ + } + +static void encode(unsigned char *output, const unsigned int *input, const unsigned len) +{ + unsigned i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + { + output[j] = (unsigned char)(input[i] & 0xff); + output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); + output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); + output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); + } +} + +static void decode(unsigned int *output, const unsigned char *input, const unsigned len) +{ + unsigned i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + { + output[i] = ((unsigned int)input[j]) | + (((unsigned int)input[j+1]) << 8) | + (((unsigned int)input[j+2]) << 16) | + (((unsigned int)input[j+3]) << 24); + } +} + +static void transform(unsigned int state[4], const unsigned char block[64]) +{ + unsigned int a = state[0]; + unsigned int b = state[1]; + unsigned int c = state[2]; + unsigned int d = state[3]; + unsigned int x[16]; + + decode(x, block, 64); + + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + GG (d, a, b, c, x[10], S22, 0x02441453); /* 22 */ + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + HH (b, c, d, a, x[ 6], S34, 0x04881d05); /* 44 */ + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information */ + memset(x, 0, sizeof (x)); +} + +/* MD5 initialization. Begins an MD5 operation, writing a new context. */ +void fz_md5_init(fz_md5 *context) +{ + context->count[0] = context->count[1] = 0; + + /* Load magic initialization constants */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} + +/* MD5 block update operation. Continues an MD5 message-digest operation, + * processing another message block, and updating the context. + */ +void fz_md5_update(fz_md5 *context, const unsigned char *input, const unsigned inlen) +{ + unsigned i, index, partlen; + + /* Compute number of bytes mod 64 */ + index = (unsigned)((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + context->count[0] += (unsigned int) inlen << 3; + if (context->count[0] < (unsigned int) inlen << 3) + context->count[1] ++; + context->count[1] += (unsigned int) inlen >> 29; + + partlen = 64 - index; + + /* Transform as many times as possible. */ + if (inlen >= partlen) + { + memcpy(context->buffer + index, input, partlen); + transform(context->state, context->buffer); + + for (i = partlen; i + 63 < inlen; i += 64) + transform(context->state, input + i); + + index = 0; + } + else + { + i = 0; + } + + /* Buffer remaining input */ + memcpy(context->buffer + index, input + i, inlen - i); +} + +/* MD5 finalization. Ends an MD5 message-digest operation, writing the + * the message digest and zeroizing the context. + */ +void fz_md5_final(fz_md5 *context, unsigned char digest[16]) +{ + unsigned char bits[8]; + unsigned index, padlen; + + /* Save number of bits */ + encode(bits, context->count, 8); + + /* Pad out to 56 mod 64 */ + index = (unsigned)((context->count[0] >> 3) & 0x3f); + padlen = index < 56 ? 56 - index : 120 - index; + fz_md5_update(context, padding, padlen); + + /* Append length (before padding) */ + fz_md5_update(context, bits, 8); + + /* Store state in digest */ + encode(digest, context->state, 16); + + /* Zeroize sensitive information */ + memset(context, 0, sizeof(fz_md5)); +} diff --git a/contrib/media/updf/fitz/crypt_sha2.c b/contrib/media/updf/fitz/crypt_sha2.c new file mode 100644 index 0000000000..f17146c6fc --- /dev/null +++ b/contrib/media/updf/fitz/crypt_sha2.c @@ -0,0 +1,182 @@ +/* +This code is based on the code found from 7-Zip, which has a modified +version of the SHA-256 found from Crypto++ . +The code was modified a little to fit into liblzma and fitz. + +This file has been put into the public domain. +You can do whatever you want with this file. +*/ + +#include "fitz.h" + +static inline int isbigendian(void) +{ + static const int one = 1; + return *(char*)&one == 0; +} + +static inline unsigned int bswap32(unsigned int num) +{ + if (!isbigendian()) + { + return ( (((num) << 24)) + | (((num) << 8) & 0x00FF0000) + | (((num) >> 8) & 0x0000FF00) + | (((num) >> 24)) ); + } + return num; +} + +/* At least on x86, GCC is able to optimize this to a rotate instruction. */ +#define rotr_32(num, amount) ((num) >> (amount) | (num) << (32 - (amount))) + +#define blk0(i) (W[i] = data[i]) +#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \ + + s0(W[(i - 15) & 15])) + +#define Ch(x, y, z) (z ^ (x & (y ^ z))) +#define Maj(x, y, z) ((x & y) | (z & (x | y))) + +#define a(i) T[(0 - i) & 7] +#define b(i) T[(1 - i) & 7] +#define c(i) T[(2 - i) & 7] +#define d(i) T[(3 - i) & 7] +#define e(i) T[(4 - i) & 7] +#define f(i) T[(5 - i) & 7] +#define g(i) T[(6 - i) & 7] +#define h(i) T[(7 - i) & 7] + +#define R(i) \ + h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] \ + + (j ? blk2(i) : blk0(i)); \ + d(i) += h(i); \ + h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) + +#define S0(x) (rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22)) +#define S1(x) (rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25)) +#define s0(x) (rotr_32(x, 7) ^ rotr_32(x, 18) ^ (x >> 3)) +#define s1(x) (rotr_32(x, 17) ^ rotr_32(x, 19) ^ (x >> 10)) + +static const unsigned int SHA256_K[64] = { + 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, + 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, + 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, + 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, + 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, + 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, + 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, + 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, + 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, + 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, + 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, + 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, + 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, + 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, + 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, + 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, +}; + +static void +transform(unsigned int state[8], const unsigned int data_xe[16]) +{ + unsigned int data[16]; + unsigned int W[16]; + unsigned int T[8]; + unsigned int j; + + /* ensure big-endian integers */ + for (j = 0; j < 16; j++) + data[j] = bswap32(data_xe[j]); + + /* Copy state[] to working vars. */ + memcpy(T, state, sizeof(T)); + + /* 64 operations, partially loop unrolled */ + for (j = 0; j < 64; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } + + /* Add the working vars back into state[]. */ + state[0] += a(0); + state[1] += b(0); + state[2] += c(0); + state[3] += d(0); + state[4] += e(0); + state[5] += f(0); + state[6] += g(0); + state[7] += h(0); +} + +void fz_sha256_init(fz_sha256 *context) +{ + context->count[0] = context->count[1] = 0; + + context->state[0] = 0x6A09E667; + context->state[1] = 0xBB67AE85; + context->state[2] = 0x3C6EF372; + context->state[3] = 0xA54FF53A; + context->state[4] = 0x510E527F; + context->state[5] = 0x9B05688C; + context->state[6] = 0x1F83D9AB; + context->state[7] = 0x5BE0CD19; +} + +void fz_sha256_update(fz_sha256 *context, const unsigned char *input, unsigned int inlen) +{ + /* Copy the input data into a properly aligned temporary buffer. + * This way we can be called with arbitrarily sized buffers + * (no need to be multiple of 64 bytes), and the code works also + * on architectures that don't allow unaligned memory access. */ + while (inlen > 0) + { + const unsigned int copy_start = context->count[0] & 0x3F; + unsigned int copy_size = 64 - copy_start; + if (copy_size > inlen) + copy_size = inlen; + + memcpy(context->buffer.u8 + copy_start, input, copy_size); + + input += copy_size; + inlen -= copy_size; + context->count[0] += copy_size; + /* carry overflow from low to high */ + if (context->count[0] < copy_size) + context->count[1]++; + + if ((context->count[0] & 0x3F) == 0) + transform(context->state, context->buffer.u32); + } +} + +void fz_sha256_final(fz_sha256 *context, unsigned char digest[32]) +{ + /* Add padding as described in RFC 3174 (it describes SHA-1 but + * the same padding style is used for SHA-256 too). */ + unsigned int j = context->count[0] & 0x3F; + context->buffer.u8[j++] = 0x80; + + while (j != 56) + { + if (j == 64) + { + transform(context->state, context->buffer.u32); + j = 0; + } + context->buffer.u8[j++] = 0x00; + } + + /* Convert the message size from bytes to bits. */ + context->count[1] = (context->count[1] << 3) + (context->count[0] >> 29); + context->count[0] = context->count[0] << 3; + + context->buffer.u32[14] = bswap32(context->count[1]); + context->buffer.u32[15] = bswap32(context->count[0]); + transform(context->state, context->buffer.u32); + + for (j = 0; j < 8; j++) + ((unsigned int *)digest)[j] = bswap32(context->state[j]); + memset(context, 0, sizeof(fz_sha256)); +} diff --git a/contrib/media/updf/fitz/dev_bbox.c b/contrib/media/updf/fitz/dev_bbox.c new file mode 100644 index 0000000000..179ff030c0 --- /dev/null +++ b/contrib/media/updf/fitz/dev_bbox.c @@ -0,0 +1,82 @@ +#include "fitz.h" + +/* TODO: add clip stack and use to intersect bboxes */ + +static void +fz_bbox_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_bound_path(path, NULL, ctm)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_bound_path(path, stroke, ctm)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_fill_text(void *user, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_bound_text(text, ctm)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_bound_text(text, ctm)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_bound_shade(shade, ctm)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) +{ + fz_bbox *result = user; + fz_bbox bbox = fz_round_rect(fz_transform_rect(ctm, fz_unit_rect)); + *result = fz_union_bbox(*result, bbox); +} + +static void +fz_bbox_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_bbox_fill_image(user, image, ctm, alpha); +} + +fz_device * +fz_new_bbox_device(fz_bbox *result) +{ + fz_device *dev; + + dev = fz_new_device(result); + + dev->fill_path = fz_bbox_fill_path; + dev->stroke_path = fz_bbox_stroke_path; + dev->fill_text = fz_bbox_fill_text; + dev->stroke_text = fz_bbox_stroke_text; + dev->fill_shade = fz_bbox_fill_shade; + dev->fill_image = fz_bbox_fill_image; + dev->fill_image_mask = fz_bbox_fill_image_mask; + + *result = fz_empty_bbox; + + return dev; +} diff --git a/contrib/media/updf/fitz/dev_list.c b/contrib/media/updf/fitz/dev_list.c new file mode 100644 index 0000000000..955824f931 --- /dev/null +++ b/contrib/media/updf/fitz/dev_list.c @@ -0,0 +1,660 @@ +#include "fitz.h" + +typedef struct fz_display_node_s fz_display_node; + +#define STACK_SIZE 96 + +typedef enum fz_display_command_e +{ + FZ_CMD_FILL_PATH, + FZ_CMD_STROKE_PATH, + FZ_CMD_CLIP_PATH, + FZ_CMD_CLIP_STROKE_PATH, + FZ_CMD_FILL_TEXT, + FZ_CMD_STROKE_TEXT, + FZ_CMD_CLIP_TEXT, + FZ_CMD_CLIP_STROKE_TEXT, + FZ_CMD_IGNORE_TEXT, + FZ_CMD_FILL_SHADE, + FZ_CMD_FILL_IMAGE, + FZ_CMD_FILL_IMAGE_MASK, + FZ_CMD_CLIP_IMAGE_MASK, + FZ_CMD_POP_CLIP, + FZ_CMD_BEGIN_MASK, + FZ_CMD_END_MASK, + FZ_CMD_BEGIN_GROUP, + FZ_CMD_END_GROUP, + FZ_CMD_BEGIN_TILE, + FZ_CMD_END_TILE +} fz_display_command; + +struct fz_display_node_s +{ + fz_display_command cmd; + fz_display_node *next; + fz_rect rect; + union { + fz_path *path; + fz_text *text; + fz_shade *shade; + fz_pixmap *image; + int blendmode; + } item; + fz_stroke_state *stroke; + int flag; /* even_odd, accumulate, isolated/knockout... */ + fz_matrix ctm; + fz_colorspace *colorspace; + float alpha; + float color[FZ_MAX_COLORS]; +}; + +struct fz_display_list_s +{ + fz_display_node *first; + fz_display_node *last; + + int top; + struct { + fz_rect *update; + fz_rect rect; + } stack[STACK_SIZE]; + int tiled; +}; + +enum { ISOLATED = 1, KNOCKOUT = 2 }; + +static fz_display_node * +fz_new_display_node(fz_display_command cmd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + int i; + + node = fz_malloc(sizeof(fz_display_node)); + node->cmd = cmd; + node->next = NULL; + node->rect = fz_empty_rect; + node->item.path = NULL; + node->stroke = NULL; + node->flag = 0; + node->ctm = ctm; + if (colorspace) + { + node->colorspace = fz_keep_colorspace(colorspace); + if (color) + { + for (i = 0; i < node->colorspace->n; i++) + node->color[i] = color[i]; + } + } + else + { + node->colorspace = NULL; + } + node->alpha = alpha; + + return node; +} + +static fz_stroke_state * +fz_clone_stroke_state(fz_stroke_state *stroke) +{ + fz_stroke_state *newstroke = fz_malloc(sizeof(fz_stroke_state)); + *newstroke = *stroke; + return newstroke; +} + +static void +fz_append_display_node(fz_display_list *list, fz_display_node *node) +{ + switch (node->cmd) + { + case FZ_CMD_CLIP_PATH: + case FZ_CMD_CLIP_STROKE_PATH: + case FZ_CMD_CLIP_IMAGE_MASK: + if (list->top < STACK_SIZE) + { + list->stack[list->top].update = &node->rect; + list->stack[list->top].rect = fz_empty_rect; + } + list->top++; + break; + case FZ_CMD_END_MASK: + case FZ_CMD_CLIP_TEXT: + case FZ_CMD_CLIP_STROKE_TEXT: + if (list->top < STACK_SIZE) + { + list->stack[list->top].update = NULL; + list->stack[list->top].rect = fz_empty_rect; + } + list->top++; + break; + case FZ_CMD_BEGIN_TILE: + list->tiled++; + if (list->top > 0 && list->top < STACK_SIZE) + { + list->stack[list->top-1].rect = fz_infinite_rect; + } + break; + case FZ_CMD_END_TILE: + list->tiled--; + break; + case FZ_CMD_END_GROUP: + break; + case FZ_CMD_POP_CLIP: + if (list->top > STACK_SIZE) + { + list->top--; + node->rect = fz_infinite_rect; + } + else if (list->top > 0) + { + fz_rect *update; + list->top--; + update = list->stack[list->top].update; + if (list->tiled == 0) + { + if (update != NULL) + { + *update = fz_intersect_rect(*update, list->stack[list->top].rect); + node->rect = *update; + } + else + node->rect = list->stack[list->top].rect; + } + else + node->rect = fz_infinite_rect; + } + /* fallthrough */ + default: + if (list->top > 0 && list->tiled == 0 && list->top <= STACK_SIZE) + list->stack[list->top-1].rect = fz_union_rect(list->stack[list->top-1].rect, node->rect); + break; + } + if (!list->first) + { + list->first = node; + list->last = node; + } + else + { + list->last->next = node; + list->last = node; + } +} + +static void +fz_free_display_node(fz_display_node *node) +{ + switch (node->cmd) + { + case FZ_CMD_FILL_PATH: + case FZ_CMD_STROKE_PATH: + case FZ_CMD_CLIP_PATH: + case FZ_CMD_CLIP_STROKE_PATH: + fz_free_path(node->item.path); + break; + case FZ_CMD_FILL_TEXT: + case FZ_CMD_STROKE_TEXT: + case FZ_CMD_CLIP_TEXT: + case FZ_CMD_CLIP_STROKE_TEXT: + case FZ_CMD_IGNORE_TEXT: + fz_free_text(node->item.text); + break; + case FZ_CMD_FILL_SHADE: + fz_drop_shade(node->item.shade); + break; + case FZ_CMD_FILL_IMAGE: + case FZ_CMD_FILL_IMAGE_MASK: + case FZ_CMD_CLIP_IMAGE_MASK: + fz_drop_pixmap(node->item.image); + break; + case FZ_CMD_POP_CLIP: + case FZ_CMD_BEGIN_MASK: + case FZ_CMD_END_MASK: + case FZ_CMD_BEGIN_GROUP: + case FZ_CMD_END_GROUP: + case FZ_CMD_BEGIN_TILE: + case FZ_CMD_END_TILE: + break; + } + if (node->stroke) + fz_free(node->stroke); + if (node->colorspace) + fz_drop_colorspace(node->colorspace); + fz_free(node); +} + +static void +fz_list_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_FILL_PATH, ctm, colorspace, color, alpha); + node->rect = fz_bound_path(path, NULL, ctm); + node->item.path = fz_clone_path(path); + node->flag = even_odd; + fz_append_display_node(user, node); +} + +static void +fz_list_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_STROKE_PATH, ctm, colorspace, color, alpha); + node->rect = fz_bound_path(path, stroke, ctm); + node->item.path = fz_clone_path(path); + node->stroke = fz_clone_stroke_state(stroke); + fz_append_display_node(user, node); +} + +static void +fz_list_clip_path(void *user, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_CLIP_PATH, ctm, NULL, NULL, 0); + node->rect = fz_bound_path(path, NULL, ctm); + if (rect != NULL) + node->rect = fz_intersect_rect(node->rect, *rect); + node->item.path = fz_clone_path(path); + node->flag = even_odd; + fz_append_display_node(user, node); +} + +static void +fz_list_clip_stroke_path(void *user, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_CLIP_STROKE_PATH, ctm, NULL, NULL, 0); + node->rect = fz_bound_path(path, stroke, ctm); + if (rect != NULL) + node->rect = fz_intersect_rect(node->rect, *rect); + node->item.path = fz_clone_path(path); + node->stroke = fz_clone_stroke_state(stroke); + fz_append_display_node(user, node); +} + +static void +fz_list_fill_text(void *user, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_FILL_TEXT, ctm, colorspace, color, alpha); + node->rect = fz_bound_text(text, ctm); + node->item.text = fz_clone_text(text); + fz_append_display_node(user, node); +} + +static void +fz_list_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_STROKE_TEXT, ctm, colorspace, color, alpha); + node->rect = fz_bound_text(text, ctm); + node->item.text = fz_clone_text(text); + node->stroke = fz_clone_stroke_state(stroke); + fz_append_display_node(user, node); +} + +static void +fz_list_clip_text(void *user, fz_text *text, fz_matrix ctm, int accumulate) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_CLIP_TEXT, ctm, NULL, NULL, 0); + node->rect = fz_bound_text(text, ctm); + node->item.text = fz_clone_text(text); + node->flag = accumulate; + /* when accumulating, be conservative about culling */ + if (accumulate) + node->rect = fz_infinite_rect; + fz_append_display_node(user, node); +} + +static void +fz_list_clip_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_CLIP_STROKE_TEXT, ctm, NULL, NULL, 0); + node->rect = fz_bound_text(text, ctm); + node->item.text = fz_clone_text(text); + node->stroke = fz_clone_stroke_state(stroke); + fz_append_display_node(user, node); +} + +static void +fz_list_ignore_text(void *user, fz_text *text, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_IGNORE_TEXT, ctm, NULL, NULL, 0); + node->rect = fz_bound_text(text, ctm); + node->item.text = fz_clone_text(text); + fz_append_display_node(user, node); +} + +static void +fz_list_pop_clip(void *user) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_POP_CLIP, fz_identity, NULL, NULL, 0); + fz_append_display_node(user, node); +} + +static void +fz_list_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_FILL_SHADE, ctm, NULL, NULL, alpha); + node->rect = fz_bound_shade(shade, ctm); + node->item.shade = fz_keep_shade(shade); + fz_append_display_node(user, node); +} + +static void +fz_list_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_FILL_IMAGE, ctm, NULL, NULL, alpha); + node->rect = fz_transform_rect(ctm, fz_unit_rect); + node->item.image = fz_keep_pixmap(image); + fz_append_display_node(user, node); +} + +static void +fz_list_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_FILL_IMAGE_MASK, ctm, colorspace, color, alpha); + node->rect = fz_transform_rect(ctm, fz_unit_rect); + node->item.image = fz_keep_pixmap(image); + fz_append_display_node(user, node); +} + +static void +fz_list_clip_image_mask(void *user, fz_pixmap *image, fz_rect *rect, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_CLIP_IMAGE_MASK, ctm, NULL, NULL, 0); + node->rect = fz_transform_rect(ctm, fz_unit_rect); + if (rect != NULL) + node->rect = fz_intersect_rect(node->rect, *rect); + node->item.image = fz_keep_pixmap(image); + fz_append_display_node(user, node); +} + +static void +fz_list_begin_mask(void *user, fz_rect rect, int luminosity, fz_colorspace *colorspace, float *color) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_BEGIN_MASK, fz_identity, colorspace, color, 0); + node->rect = rect; + node->flag = luminosity; + fz_append_display_node(user, node); +} + +static void +fz_list_end_mask(void *user) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_END_MASK, fz_identity, NULL, NULL, 0); + fz_append_display_node(user, node); +} + +static void +fz_list_begin_group(void *user, fz_rect rect, int isolated, int knockout, int blendmode, float alpha) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_BEGIN_GROUP, fz_identity, NULL, NULL, alpha); + node->rect = rect; + node->item.blendmode = blendmode; + node->flag |= isolated ? ISOLATED : 0; + node->flag |= knockout ? KNOCKOUT : 0; + fz_append_display_node(user, node); +} + +static void +fz_list_end_group(void *user) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_END_GROUP, fz_identity, NULL, NULL, 0); + fz_append_display_node(user, node); +} + +static void +fz_list_begin_tile(void *user, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_BEGIN_TILE, ctm, NULL, NULL, 0); + node->rect = area; + node->color[0] = xstep; + node->color[1] = ystep; + node->color[2] = view.x0; + node->color[3] = view.y0; + node->color[4] = view.x1; + node->color[5] = view.y1; + fz_append_display_node(user, node); +} + +static void +fz_list_end_tile(void *user) +{ + fz_display_node *node; + node = fz_new_display_node(FZ_CMD_END_TILE, fz_identity, NULL, NULL, 0); + fz_append_display_node(user, node); +} + +fz_device * +fz_new_list_device(fz_display_list *list) +{ + fz_device *dev = fz_new_device(list); + + dev->fill_path = fz_list_fill_path; + dev->stroke_path = fz_list_stroke_path; + dev->clip_path = fz_list_clip_path; + dev->clip_stroke_path = fz_list_clip_stroke_path; + + dev->fill_text = fz_list_fill_text; + dev->stroke_text = fz_list_stroke_text; + dev->clip_text = fz_list_clip_text; + dev->clip_stroke_text = fz_list_clip_stroke_text; + dev->ignore_text = fz_list_ignore_text; + + dev->fill_shade = fz_list_fill_shade; + dev->fill_image = fz_list_fill_image; + dev->fill_image_mask = fz_list_fill_image_mask; + dev->clip_image_mask = fz_list_clip_image_mask; + + dev->pop_clip = fz_list_pop_clip; + + dev->begin_mask = fz_list_begin_mask; + dev->end_mask = fz_list_end_mask; + dev->begin_group = fz_list_begin_group; + dev->end_group = fz_list_end_group; + + dev->begin_tile = fz_list_begin_tile; + dev->end_tile = fz_list_end_tile; + + return dev; +} + +fz_display_list * +fz_new_display_list(void) +{ + fz_display_list *list = fz_malloc(sizeof(fz_display_list)); + list->first = NULL; + list->last = NULL; + list->top = 0; + list->tiled = 0; + return list; +} + +void +fz_free_display_list(fz_display_list *list) +{ + fz_display_node *node = list->first; + while (node) + { + fz_display_node *next = node->next; + fz_free_display_node(node); + node = next; + } + fz_free(list); +} + +void +fz_execute_display_list(fz_display_list *list, fz_device *dev, fz_matrix top_ctm, fz_bbox scissor) +{ + fz_display_node *node; + fz_matrix ctm; + fz_rect rect; + fz_bbox bbox; + int clipped = 0; + int tiled = 0; + int empty; + + if (!fz_is_infinite_bbox(scissor)) + { + /* add some fuzz at the edges, as especially glyph rects + * are sometimes not actually completely bounding the glyph */ + scissor.x0 -= 20; scissor.y0 -= 20; + scissor.x1 += 20; scissor.y1 += 20; + } + + for (node = list->first; node; node = node->next) + { + /* cull objects to draw using a quick visibility test */ + + if (tiled || node->cmd == FZ_CMD_BEGIN_TILE || node->cmd == FZ_CMD_END_TILE) + { + empty = 0; + } + else + { + bbox = fz_round_rect(fz_transform_rect(top_ctm, node->rect)); + bbox = fz_intersect_bbox(bbox, scissor); + empty = fz_is_empty_bbox(bbox); + } + + if (clipped || empty) + { + switch (node->cmd) + { + case FZ_CMD_CLIP_PATH: + case FZ_CMD_CLIP_STROKE_PATH: + case FZ_CMD_CLIP_TEXT: + case FZ_CMD_CLIP_STROKE_TEXT: + case FZ_CMD_CLIP_IMAGE_MASK: + case FZ_CMD_BEGIN_MASK: + case FZ_CMD_BEGIN_GROUP: + clipped++; + continue; + case FZ_CMD_POP_CLIP: + case FZ_CMD_END_GROUP: + if (!clipped) + goto visible; + clipped--; + continue; + case FZ_CMD_END_MASK: + if (!clipped) + goto visible; + continue; + default: + continue; + } + } + +visible: + ctm = fz_concat(node->ctm, top_ctm); + + switch (node->cmd) + { + case FZ_CMD_FILL_PATH: + fz_fill_path(dev, node->item.path, node->flag, ctm, + node->colorspace, node->color, node->alpha); + break; + case FZ_CMD_STROKE_PATH: + fz_stroke_path(dev, node->item.path, node->stroke, ctm, + node->colorspace, node->color, node->alpha); + break; + case FZ_CMD_CLIP_PATH: + { + fz_rect trect = fz_transform_rect(top_ctm, node->rect); + fz_clip_path(dev, node->item.path, &trect, node->flag, ctm); + break; + } + case FZ_CMD_CLIP_STROKE_PATH: + { + fz_rect trect = fz_transform_rect(top_ctm, node->rect); + fz_clip_stroke_path(dev, node->item.path, &trect, node->stroke, ctm); + break; + } + case FZ_CMD_FILL_TEXT: + fz_fill_text(dev, node->item.text, ctm, + node->colorspace, node->color, node->alpha); + break; + case FZ_CMD_STROKE_TEXT: + fz_stroke_text(dev, node->item.text, node->stroke, ctm, + node->colorspace, node->color, node->alpha); + break; + case FZ_CMD_CLIP_TEXT: + fz_clip_text(dev, node->item.text, ctm, node->flag); + break; + case FZ_CMD_CLIP_STROKE_TEXT: + fz_clip_stroke_text(dev, node->item.text, node->stroke, ctm); + break; + case FZ_CMD_IGNORE_TEXT: + fz_ignore_text(dev, node->item.text, ctm); + break; + case FZ_CMD_FILL_SHADE: + fz_fill_shade(dev, node->item.shade, ctm, node->alpha); + break; + case FZ_CMD_FILL_IMAGE: + fz_fill_image(dev, node->item.image, ctm, node->alpha); + break; + case FZ_CMD_FILL_IMAGE_MASK: + fz_fill_image_mask(dev, node->item.image, ctm, + node->colorspace, node->color, node->alpha); + break; + case FZ_CMD_CLIP_IMAGE_MASK: + { + fz_rect trect = fz_transform_rect(top_ctm, node->rect); + fz_clip_image_mask(dev, node->item.image, &trect, ctm); + break; + } + case FZ_CMD_POP_CLIP: + fz_pop_clip(dev); + break; + case FZ_CMD_BEGIN_MASK: + rect = fz_transform_rect(top_ctm, node->rect); + fz_begin_mask(dev, rect, node->flag, node->colorspace, node->color); + break; + case FZ_CMD_END_MASK: + fz_end_mask(dev); + break; + case FZ_CMD_BEGIN_GROUP: + rect = fz_transform_rect(top_ctm, node->rect); + fz_begin_group(dev, rect, + (node->flag & ISOLATED) != 0, (node->flag & KNOCKOUT) != 0, + node->item.blendmode, node->alpha); + break; + case FZ_CMD_END_GROUP: + fz_end_group(dev); + break; + case FZ_CMD_BEGIN_TILE: + tiled++; + rect.x0 = node->color[2]; + rect.y0 = node->color[3]; + rect.x1 = node->color[4]; + rect.y1 = node->color[5]; + fz_begin_tile(dev, node->rect, rect, + node->color[0], node->color[1], ctm); + break; + case FZ_CMD_END_TILE: + tiled--; + fz_end_tile(dev); + break; + } + } +} diff --git a/contrib/media/updf/fitz/dev_null.c b/contrib/media/updf/fitz/dev_null.c new file mode 100644 index 0000000000..508be7e0d1 --- /dev/null +++ b/contrib/media/updf/fitz/dev_null.c @@ -0,0 +1,165 @@ +#include "fitz.h" + +fz_device * +fz_new_device(void *user) +{ + fz_device *dev = fz_malloc(sizeof(fz_device)); + memset(dev, 0, sizeof(fz_device)); + dev->hints = 0; + dev->flags = 0; + dev->user = user; + return dev; +} + +void +fz_free_device(fz_device *dev) +{ + if (dev->free_user) + dev->free_user(dev->user); + fz_free(dev); +} + +void +fz_fill_path(fz_device *dev, fz_path *path, int even_odd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + if (dev->fill_path) + dev->fill_path(dev->user, path, even_odd, ctm, colorspace, color, alpha); +} + +void +fz_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + if (dev->stroke_path) + dev->stroke_path(dev->user, path, stroke, ctm, colorspace, color, alpha); +} + +void +fz_clip_path(fz_device *dev, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm) +{ + if (dev->clip_path) + dev->clip_path(dev->user, path, rect, even_odd, ctm); +} + +void +fz_clip_stroke_path(fz_device *dev, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm) +{ + if (dev->clip_stroke_path) + dev->clip_stroke_path(dev->user, path, rect, stroke, ctm); +} + +void +fz_fill_text(fz_device *dev, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + if (dev->fill_text) + dev->fill_text(dev->user, text, ctm, colorspace, color, alpha); +} + +void +fz_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + if (dev->stroke_text) + dev->stroke_text(dev->user, text, stroke, ctm, colorspace, color, alpha); +} + +void +fz_clip_text(fz_device *dev, fz_text *text, fz_matrix ctm, int accumulate) +{ + if (dev->clip_text) + dev->clip_text(dev->user, text, ctm, accumulate); +} + +void +fz_clip_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) +{ + if (dev->clip_stroke_text) + dev->clip_stroke_text(dev->user, text, stroke, ctm); +} + +void +fz_ignore_text(fz_device *dev, fz_text *text, fz_matrix ctm) +{ + if (dev->ignore_text) + dev->ignore_text(dev->user, text, ctm); +} + +void +fz_pop_clip(fz_device *dev) +{ + if (dev->pop_clip) + dev->pop_clip(dev->user); +} + +void +fz_fill_shade(fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha) +{ + if (dev->fill_shade) + dev->fill_shade(dev->user, shade, ctm, alpha); +} + +void +fz_fill_image(fz_device *dev, fz_pixmap *image, fz_matrix ctm, float alpha) +{ + if (dev->fill_image) + dev->fill_image(dev->user, image, ctm, alpha); +} + +void +fz_fill_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + if (dev->fill_image_mask) + dev->fill_image_mask(dev->user, image, ctm, colorspace, color, alpha); +} + +void +fz_clip_image_mask(fz_device *dev, fz_pixmap *image, fz_rect *rect, fz_matrix ctm) +{ + if (dev->clip_image_mask) + dev->clip_image_mask(dev->user, image, rect, ctm); +} + +void +fz_begin_mask(fz_device *dev, fz_rect area, int luminosity, fz_colorspace *colorspace, float *bc) +{ + if (dev->begin_mask) + dev->begin_mask(dev->user, area, luminosity, colorspace, bc); +} + +void +fz_end_mask(fz_device *dev) +{ + if (dev->end_mask) + dev->end_mask(dev->user); +} + +void +fz_begin_group(fz_device *dev, fz_rect area, int isolated, int knockout, int blendmode, float alpha) +{ + if (dev->begin_group) + dev->begin_group(dev->user, area, isolated, knockout, blendmode, alpha); +} + +void +fz_end_group(fz_device *dev) +{ + if (dev->end_group) + dev->end_group(dev->user); +} + +void +fz_begin_tile(fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) +{ + if (dev->begin_tile) + dev->begin_tile(dev->user, area, view, xstep, ystep, ctm); +} + +void +fz_end_tile(fz_device *dev) +{ + if (dev->end_tile) + dev->end_tile(dev->user); +} diff --git a/contrib/media/updf/fitz/dev_text.c b/contrib/media/updf/fitz/dev_text.c new file mode 100644 index 0000000000..139c3eed73 --- /dev/null +++ b/contrib/media/updf/fitz/dev_text.c @@ -0,0 +1,418 @@ +#include "fitz.h" + +#define LINE_DIST 0.9f +#define SPACE_DIST 0.2f + +#include +#include FT_FREETYPE_H +#include FT_ADVANCES_H + +typedef struct fz_text_device_s fz_text_device; + +struct fz_text_device_s +{ + fz_point point; + fz_text_span *head; + fz_text_span *span; +}; + +fz_text_span * +fz_new_text_span(void) +{ + fz_text_span *span; + span = fz_malloc(sizeof(fz_text_span)); + span->font = NULL; + span->wmode = 0; + span->size = 0; + span->len = 0; + span->cap = 0; + span->text = NULL; + span->next = NULL; + span->eol = 0; + return span; +} + +void +fz_free_text_span(fz_text_span *span) +{ + if (span->font) + fz_drop_font(span->font); + if (span->next) + fz_free_text_span(span->next); + fz_free(span->text); + fz_free(span); +} + +static void +fz_add_text_char_imp(fz_text_span *span, int c, fz_bbox bbox) +{ + if (span->len + 1 >= span->cap) + { + span->cap = span->cap > 1 ? (span->cap * 3) / 2 : 80; + span->text = fz_realloc(span->text, span->cap, sizeof(fz_text_char)); + } + span->text[span->len].c = c; + span->text[span->len].bbox = bbox; + span->len ++; +} + +static fz_bbox +fz_split_bbox(fz_bbox bbox, int i, int n) +{ + float w = (float)(bbox.x1 - bbox.x0) / n; + float x0 = bbox.x0; + bbox.x0 = x0 + i * w; + bbox.x1 = x0 + (i + 1) * w; + return bbox; +} + +static void +fz_add_text_char(fz_text_span **last, fz_font *font, float size, int wmode, int c, fz_bbox bbox) +{ + fz_text_span *span = *last; + + if (!span->font) + { + span->font = fz_keep_font(font); + span->size = size; + } + + if ((span->font != font || span->size != size || span->wmode != wmode) && c != 32) + { + span = fz_new_text_span(); + span->font = fz_keep_font(font); + span->size = size; + span->wmode = wmode; + (*last)->next = span; + *last = span; + } + + switch (c) + { + case -1: /* ignore when one unicode character maps to multiple glyphs */ + break; + case 0xFB00: /* ff */ + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 0, 2)); + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 1, 2)); + break; + case 0xFB01: /* fi */ + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 0, 2)); + fz_add_text_char_imp(span, 'i', fz_split_bbox(bbox, 1, 2)); + break; + case 0xFB02: /* fl */ + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 0, 2)); + fz_add_text_char_imp(span, 'l', fz_split_bbox(bbox, 1, 2)); + break; + case 0xFB03: /* ffi */ + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 0, 3)); + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 1, 3)); + fz_add_text_char_imp(span, 'i', fz_split_bbox(bbox, 2, 3)); + break; + case 0xFB04: /* ffl */ + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 0, 3)); + fz_add_text_char_imp(span, 'f', fz_split_bbox(bbox, 1, 3)); + fz_add_text_char_imp(span, 'l', fz_split_bbox(bbox, 2, 3)); + break; + case 0xFB05: /* long st */ + case 0xFB06: /* st */ + fz_add_text_char_imp(span, 's', fz_split_bbox(bbox, 0, 2)); + fz_add_text_char_imp(span, 't', fz_split_bbox(bbox, 1, 2)); + break; + default: + fz_add_text_char_imp(span, c, bbox); + break; + } +} + +static void +fz_divide_text_chars(fz_text_span **last, int n, fz_bbox bbox) +{ + fz_text_span *span = *last; + int i, x; + x = span->len - n; + if (x >= 0) + for (i = 0; i < n; i++) + span->text[x + i].bbox = fz_split_bbox(bbox, i, n); +} + +static void +fz_add_text_newline(fz_text_span **last, fz_font *font, float size, int wmode) +{ + fz_text_span *span; + span = fz_new_text_span(); + span->font = fz_keep_font(font); + span->size = size; + span->wmode = wmode; + (*last)->eol = 1; + (*last)->next = span; + *last = span; +} + +void +fz_debug_text_span_xml(fz_text_span *span) +{ + char buf[10]; + int c, n, k, i; + + printf("\n", + span->font ? span->font->name : "NULL", span->size, span->wmode, span->eol); + + for (i = 0; i < span->len; i++) + { + printf("\ttext[i].c; + if (c < 128) + putchar(c); + else + { + n = runetochar(buf, &c); + for (k = 0; k < n; k++) + putchar(buf[k]); + } + printf("\" bbox=\"%d %d %d %d\" />\n", + span->text[i].bbox.x0, + span->text[i].bbox.y0, + span->text[i].bbox.x1, + span->text[i].bbox.y1); + } + + printf("\n"); + + if (span->next) + fz_debug_text_span_xml(span->next); +} + +void +fz_debug_text_span(fz_text_span *span) +{ + char buf[10]; + int c, n, k, i; + + for (i = 0; i < span->len; i++) + { + c = span->text[i].c; + if (c < 128) + putchar(c); + else + { + n = runetochar(buf, &c); + for (k = 0; k < n; k++) + putchar(buf[k]); + } + } + + if (span->eol) + putchar('\n'); + + if (span->next) + fz_debug_text_span(span->next); +} + +static void +fz_text_extract_span(fz_text_span **last, fz_text *text, fz_matrix ctm, fz_point *pen) +{ + fz_font *font = text->font; + FT_Face face = font->ft_face; + fz_matrix tm = text->trm; + fz_matrix trm; + float size; + float adv; + fz_rect rect; + fz_point dir, ndir; + fz_point delta, ndelta; + float dist, dot; + float ascender = 1; + float descender = 0; + int multi; + int i, err; + + if (text->len == 0) + return; + + if (font->ft_face) + { + err = FT_Set_Char_Size(font->ft_face, 64, 64, 72, 72); + if (err) + fz_warn("freetype set character size: %s", ft_error_string(err)); + ascender = (float)face->ascender / face->units_per_EM; + descender = (float)face->descender / face->units_per_EM; + } + + rect = fz_empty_rect; + + if (text->wmode == 0) + { + dir.x = 1; + dir.y = 0; + } + else + { + dir.x = 0; + dir.y = 1; + } + + tm.e = 0; + tm.f = 0; + trm = fz_concat(tm, ctm); + dir = fz_transform_vector(trm, dir); + dist = sqrtf(dir.x * dir.x + dir.y * dir.y); + ndir.x = dir.x / dist; + ndir.y = dir.y / dist; + + size = fz_matrix_expansion(trm); + + multi = 1; + + for (i = 0; i < text->len; i++) + { + if (text->items[i].gid < 0) + { + fz_add_text_char(last, font, size, text->wmode, text->items[i].ucs, fz_round_rect(rect)); + multi ++; + fz_divide_text_chars(last, multi, fz_round_rect(rect)); + continue; + } + multi = 1; + + /* Calculate new pen location and delta */ + tm.e = text->items[i].x; + tm.f = text->items[i].y; + trm = fz_concat(tm, ctm); + + delta.x = pen->x - trm.e; + delta.y = pen->y - trm.f; + if (pen->x == -1 && pen->y == -1) + delta.x = delta.y = 0; + + dist = sqrtf(delta.x * delta.x + delta.y * delta.y); + + /* Add space and newlines based on pen movement */ + if (dist > 0) + { + ndelta.x = delta.x / dist; + ndelta.y = delta.y / dist; + dot = ndelta.x * ndir.x + ndelta.y * ndir.y; + + if (dist > size * LINE_DIST) + { + fz_add_text_newline(last, font, size, text->wmode); + } + else if (fabsf(dot) > 0.95f && dist > size * SPACE_DIST) + { + if ((*last)->len > 0 && (*last)->text[(*last)->len - 1].c != ' ') + { + fz_rect spacerect; + spacerect.x0 = -0.2f; + spacerect.y0 = 0; + spacerect.x1 = 0; + spacerect.y1 = 1; + spacerect = fz_transform_rect(trm, spacerect); + fz_add_text_char(last, font, size, text->wmode, ' ', fz_round_rect(spacerect)); + } + } + } + + /* Calculate bounding box and new pen position based on font metrics */ + if (font->ft_face) + { + FT_Fixed ftadv = 0; + int mask = FT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING | FT_LOAD_IGNORE_TRANSFORM; + + /* TODO: freetype returns broken vertical metrics */ + /* if (text->wmode) mask |= FT_LOAD_VERTICAL_LAYOUT; */ + + FT_Get_Advance(font->ft_face, text->items[i].gid, mask, &ftadv); + adv = ftadv / 65536.0f; + + rect.x0 = 0; + rect.y0 = descender; + rect.x1 = adv; + rect.y1 = ascender; + } + else + { + adv = font->t3widths[text->items[i].gid]; + rect.x0 = 0; + rect.y0 = descender; + rect.x1 = adv; + rect.y1 = ascender; + } + + rect = fz_transform_rect(trm, rect); + pen->x = trm.e + dir.x * adv; + pen->y = trm.f + dir.y * adv; + + fz_add_text_char(last, font, size, text->wmode, text->items[i].ucs, fz_round_rect(rect)); + } +} + +static void +fz_text_fill_text(void *user, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_text_device *tdev = user; + fz_text_extract_span(&tdev->span, text, ctm, &tdev->point); +} + +static void +fz_text_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + fz_text_device *tdev = user; + fz_text_extract_span(&tdev->span, text, ctm, &tdev->point); +} + +static void +fz_text_clip_text(void *user, fz_text *text, fz_matrix ctm, int accumulate) +{ + fz_text_device *tdev = user; + fz_text_extract_span(&tdev->span, text, ctm, &tdev->point); +} + +static void +fz_text_clip_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_text_device *tdev = user; + fz_text_extract_span(&tdev->span, text, ctm, &tdev->point); +} + +static void +fz_text_ignore_text(void *user, fz_text *text, fz_matrix ctm) +{ + fz_text_device *tdev = user; + fz_text_extract_span(&tdev->span, text, ctm, &tdev->point); +} + +static void +fz_text_free_user(void *user) +{ + fz_text_device *tdev = user; + + tdev->span->eol = 1; + + /* TODO: unicode NFC normalization */ + /* TODO: bidi logical reordering */ + + fz_free(tdev); +} + +fz_device * +fz_new_text_device(fz_text_span *root) +{ + fz_device *dev; + fz_text_device *tdev = fz_malloc(sizeof(fz_text_device)); + tdev->head = root; + tdev->span = root; + tdev->point.x = -1; + tdev->point.y = -1; + + dev = fz_new_device(tdev); + dev->hints = FZ_IGNORE_IMAGE | FZ_IGNORE_SHADE; + dev->free_user = fz_text_free_user; + dev->fill_text = fz_text_fill_text; + dev->stroke_text = fz_text_stroke_text; + dev->clip_text = fz_text_clip_text; + dev->clip_stroke_text = fz_text_clip_stroke_text; + dev->ignore_text = fz_text_ignore_text; + return dev; +} diff --git a/contrib/media/updf/fitz/dev_trace.c b/contrib/media/updf/fitz/dev_trace.c new file mode 100644 index 0000000000..03e05f9187 --- /dev/null +++ b/contrib/media/updf/fitz/dev_trace.c @@ -0,0 +1,305 @@ +#include "fitz.h" + +static void +fz_trace_matrix(fz_matrix ctm) +{ + printf("matrix=\"%g %g %g %g %g %g\" ", + ctm.a, ctm.b, ctm.c, ctm.d, ctm.e, ctm.f); +} + +static void +fz_trace_color(fz_colorspace *colorspace, float *color, float alpha) +{ + int i; + printf("colorspace=\"%s\" color=\"", colorspace->name); + for (i = 0; i < colorspace->n; i++) + printf("%s%g", i == 0 ? "" : " ", color[i]); + printf("\" "); + if (alpha < 1) + printf("alpha=\"%g\" ", alpha); +} + +static void +fz_trace_path(fz_path *path, int indent) +{ + float x, y; + int i = 0; + int n; + while (i < path->len) + { + for (n = 0; n < indent; n++) + putchar(' '); + switch (path->items[i++].k) + { + case FZ_MOVETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("\n", x, y); + break; + case FZ_LINETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("\n", x, y); + break; + case FZ_CURVETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("items[i++].v; + y = path->items[i++].v; + printf("x2=\"%g\" y2=\"%g\" ", x, y); + x = path->items[i++].v; + y = path->items[i++].v; + printf("x3=\"%g\" y3=\"%g\" />\n", x, y); + break; + case FZ_CLOSE_PATH: + printf("\n"); + break; + } + } +} + +static void +fz_trace_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + printf("\n"); + fz_trace_path(path, 0); + printf("\n"); +} + +static void +fz_trace_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + int i; + + printf("linewidth); + printf("miterlimit=\"%g\" ", stroke->miterlimit); + printf("linecap=\"%d,%d,%d\" ", stroke->start_cap, stroke->dash_cap, stroke->end_cap); + printf("linejoin=\"%d\" ", stroke->linejoin); + + if (stroke->dash_len) + { + printf("dash_phase=\"%g\" dash=\"", stroke->dash_phase); + for (i = 0; i < stroke->dash_len; i++) + printf("%g ", stroke->dash_list[i]); + printf("\""); + } + + fz_trace_color(colorspace, color, alpha); + fz_trace_matrix(ctm); + printf(">\n"); + + fz_trace_path(path, 0); + + printf("\n"); +} + +static void +fz_trace_clip_path(void *user, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm) +{ + printf("\n", + rect->x0, rect->y0, rect->x1, rect->y1); + fz_trace_path(path, 0); + printf("\n"); +} + +static void +fz_trace_clip_stroke_path(void *user, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm) +{ + printf("\n"); + fz_trace_path(path, 0); + printf("\n"); +} + +static void +fz_trace_fill_text(void *user, fz_text *text, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + printf("font->name, text->wmode); + fz_trace_color(colorspace, color, alpha); + fz_trace_matrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debug_text(text, 0); + printf("\n"); +} + +static void +fz_trace_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, + fz_colorspace *colorspace, float *color, float alpha) +{ + printf("font->name, text->wmode); + fz_trace_color(colorspace, color, alpha); + fz_trace_matrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debug_text(text, 0); + printf("\n"); +} + +static void +fz_trace_clip_text(void *user, fz_text *text, fz_matrix ctm, int accumulate) +{ + printf("font->name, text->wmode); + printf("accumulate=\"%d\" ", accumulate); + fz_trace_matrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debug_text(text, 0); + printf("\n"); +} + +static void +fz_trace_clip_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) +{ + printf("font->name, text->wmode); + fz_trace_matrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debug_text(text, 0); + printf("\n"); +} + +static void +fz_trace_ignore_text(void *user, fz_text *text, fz_matrix ctm) +{ + printf("font->name, text->wmode); + fz_trace_matrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debug_text(text, 0); + printf("\n"); +} + +static void +fz_trace_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) +{ + printf("\n"); +} + +static void +fz_trace_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) +{ + printf("\n"); +} + +static void +fz_trace_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, +fz_colorspace *colorspace, float *color, float alpha) +{ + printf("\n"); +} + +static void +fz_trace_clip_image_mask(void *user, fz_pixmap *image, fz_rect *rect, fz_matrix ctm) +{ + printf("\n"); +} + +static void +fz_trace_pop_clip(void *user) +{ + printf("\n"); +} + +static void +fz_trace_begin_mask(void *user, fz_rect bbox, int luminosity, fz_colorspace *colorspace, float *color) +{ + printf("\n"); +} + +static void +fz_trace_end_mask(void *user) +{ + printf("\n"); +} + +static void +fz_trace_begin_group(void *user, fz_rect bbox, int isolated, int knockout, int blendmode, float alpha) +{ + printf("\n", + bbox.x0, bbox.y0, bbox.x1, bbox.y1, + isolated, knockout, fz_blendmode_name(blendmode), alpha); +} + +static void +fz_trace_end_group(void *user) +{ + printf("\n"); +} + +static void +fz_trace_begin_tile(void *user, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) +{ + printf("\n"); +} + +static void +fz_trace_end_tile(void *user) +{ + printf("\n"); +} + +fz_device *fz_new_trace_device(void) +{ + fz_device *dev = fz_new_device(NULL); + + dev->fill_path = fz_trace_fill_path; + dev->stroke_path = fz_trace_stroke_path; + dev->clip_path = fz_trace_clip_path; + dev->clip_stroke_path = fz_trace_clip_stroke_path; + + dev->fill_text = fz_trace_fill_text; + dev->stroke_text = fz_trace_stroke_text; + dev->clip_text = fz_trace_clip_text; + dev->clip_stroke_text = fz_trace_clip_stroke_text; + dev->ignore_text = fz_trace_ignore_text; + + dev->fill_shade = fz_trace_fill_shade; + dev->fill_image = fz_trace_fill_image; + dev->fill_image_mask = fz_trace_fill_image_mask; + dev->clip_image_mask = fz_trace_clip_image_mask; + + dev->pop_clip = fz_trace_pop_clip; + + dev->begin_mask = fz_trace_begin_mask; + dev->end_mask = fz_trace_end_mask; + dev->begin_group = fz_trace_begin_group; + dev->end_group = fz_trace_end_group; + + dev->begin_tile = fz_trace_begin_tile; + dev->end_tile = fz_trace_end_tile; + + return dev; +} diff --git a/contrib/media/updf/fitz/filt_basic.c b/contrib/media/updf/fitz/filt_basic.c new file mode 100644 index 0000000000..feb13076ba --- /dev/null +++ b/contrib/media/updf/fitz/filt_basic.c @@ -0,0 +1,504 @@ +#include "fitz.h" + +/* Pretend we have a filter that just copies data forever */ + +fz_stream * +fz_open_copy(fz_stream *chain) +{ + return fz_keep_stream(chain); +} + +/* Null filter copies a specified amount of data */ + +struct null_filter +{ + fz_stream *chain; + int remain; +}; + +static int +read_null(fz_stream *stm, unsigned char *buf, int len) +{ + struct null_filter *state = stm->state; + int amount = MIN(len, state->remain); + int n = fz_read(state->chain, buf, amount); + if (n < 0) + return fz_rethrow(n, "read error in null filter"); + state->remain -= n; + return n; +} + +static void +close_null(fz_stream *stm) +{ + struct null_filter *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_null(fz_stream *chain, int len) +{ + struct null_filter *state; + + state = fz_malloc(sizeof(struct null_filter)); + state->chain = chain; + state->remain = len; + + return fz_new_stream(state, read_null, close_null); +} + +/* ASCII Hex Decode */ + +typedef struct fz_ahxd_s fz_ahxd; + +struct fz_ahxd_s +{ + fz_stream *chain; + int eod; +}; + +static inline int iswhite(int a) +{ + switch (a) { + case '\n': case '\r': case '\t': case ' ': + case '\0': case '\f': case '\b': case 0177: + return 1; + } + return 0; +} + +static inline int ishex(int a) +{ + return (a >= 'A' && a <= 'F') || + (a >= 'a' && a <= 'f') || + (a >= '0' && a <= '9'); +} + +static inline int unhex(int a) +{ + if (a >= 'A' && a <= 'F') return a - 'A' + 0xA; + if (a >= 'a' && a <= 'f') return a - 'a' + 0xA; + if (a >= '0' && a <= '9') return a - '0'; + return 0; +} + +static int +read_ahxd(fz_stream *stm, unsigned char *buf, int len) +{ + fz_ahxd *state = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + int a, b, c, odd; + + odd = 0; + + while (p < ep) + { + if (state->eod) + return p - buf; + + c = fz_read_byte(state->chain); + if (c < 0) + return p - buf; + + if (ishex(c)) + { + if (!odd) + { + a = unhex(c); + odd = 1; + } + else + { + b = unhex(c); + *p++ = (a << 4) | b; + odd = 0; + } + } + else if (c == '>') + { + if (odd) + *p++ = (a << 4); + state->eod = 1; + } + else if (!iswhite(c)) + { + return fz_throw("bad data in ahxd: '%c'", c); + } + } + + return p - buf; +} + +static void +close_ahxd(fz_stream *stm) +{ + fz_ahxd *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_ahxd(fz_stream *chain) +{ + fz_ahxd *state; + + state = fz_malloc(sizeof(fz_ahxd)); + state->chain = chain; + state->eod = 0; + + return fz_new_stream(state, read_ahxd, close_ahxd); +} + +/* ASCII 85 Decode */ + +typedef struct fz_a85d_s fz_a85d; + +struct fz_a85d_s +{ + fz_stream *chain; + unsigned char bp[4]; + unsigned char *rp, *wp; + int eod; +}; + +static int +read_a85d(fz_stream *stm, unsigned char *buf, int len) +{ + fz_a85d *state = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + int count = 0; + int word = 0; + int c; + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + + while (p < ep) + { + if (state->eod) + return p - buf; + + c = fz_read_byte(state->chain); + if (c < 0) + return p - buf; + + if (c >= '!' && c <= 'u') + { + if (count == 4) + { + word = word * 85 + (c - '!'); + + state->bp[0] = (word >> 24) & 0xff; + state->bp[1] = (word >> 16) & 0xff; + state->bp[2] = (word >> 8) & 0xff; + state->bp[3] = (word) & 0xff; + state->rp = state->bp; + state->wp = state->bp + 4; + + word = 0; + count = 0; + } + else + { + word = word * 85 + (c - '!'); + count ++; + } + } + + else if (c == 'z' && count == 0) + { + state->bp[0] = 0; + state->bp[1] = 0; + state->bp[2] = 0; + state->bp[3] = 0; + state->rp = state->bp; + state->wp = state->bp + 4; + } + + else if (c == '~') + { + c = fz_read_byte(state->chain); + if (c != '>') + fz_warn("bad eod marker in a85d"); + + switch (count) { + case 0: + break; + case 1: + return fz_throw("partial final byte in a85d"); + case 2: + word = word * (85 * 85 * 85) + 0xffffff; + state->bp[0] = word >> 24; + state->rp = state->bp; + state->wp = state->bp + 1; + break; + case 3: + word = word * (85 * 85) + 0xffff; + state->bp[0] = word >> 24; + state->bp[1] = word >> 16; + state->rp = state->bp; + state->wp = state->bp + 2; + break; + case 4: + word = word * 85 + 0xff; + state->bp[0] = word >> 24; + state->bp[1] = word >> 16; + state->bp[2] = word >> 8; + state->rp = state->bp; + state->wp = state->bp + 3; + break; + } + state->eod = 1; + } + + else if (!iswhite(c)) + { + return fz_throw("bad data in a85d: '%c'", c); + } + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + } + + return p - buf; +} + +static void +close_a85d(fz_stream *stm) +{ + fz_a85d *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_a85d(fz_stream *chain) +{ + fz_a85d *state; + + state = fz_malloc(sizeof(fz_a85d)); + state->chain = chain; + state->rp = state->bp; + state->wp = state->bp; + state->eod = 0; + + return fz_new_stream(state, read_a85d, close_a85d); +} + +/* Run Length Decode */ + +typedef struct fz_rld_s fz_rld; + +struct fz_rld_s +{ + fz_stream *chain; + int run, n, c; +}; + +static int +read_rld(fz_stream *stm, unsigned char *buf, int len) +{ + fz_rld *state = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + + while (p < ep) + { + if (state->run == 128) + return p - buf; + + if (state->n == 0) + { + state->run = fz_read_byte(state->chain); + if (state->run < 0) + state->run = 128; + if (state->run < 128) + state->n = state->run + 1; + if (state->run > 128) + { + state->n = 257 - state->run; + state->c = fz_read_byte(state->chain); + if (state->c < 0) + return fz_throw("premature end of data in run length decode"); + } + } + + if (state->run < 128) + { + while (p < ep && state->n) + { + int c = fz_read_byte(state->chain); + if (c < 0) + return fz_throw("premature end of data in run length decode"); + *p++ = c; + state->n--; + } + } + + if (state->run > 128) + { + while (p < ep && state->n) + { + *p++ = state->c; + state->n--; + } + } + } + + return p - buf; +} + +static void +close_rld(fz_stream *stm) +{ + fz_rld *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_rld(fz_stream *chain) +{ + fz_rld *state; + + state = fz_malloc(sizeof(fz_rld)); + state->chain = chain; + state->run = 0; + state->n = 0; + state->c = 0; + + return fz_new_stream(state, read_rld, close_rld); +} + +/* RC4 Filter */ + +typedef struct fz_arc4c_s fz_arc4c; + +struct fz_arc4c_s +{ + fz_stream *chain; + fz_arc4 arc4; +}; + +static int +read_arc4(fz_stream *stm, unsigned char *buf, int len) +{ + fz_arc4c *state = stm->state; + int n; + + n = fz_read(state->chain, buf, len); + if (n < 0) + return fz_rethrow(n, "read error in arc4 filter"); + + fz_arc4_encrypt(&state->arc4, buf, buf, n); + + return n; +} + +static void +close_arc4(fz_stream *stm) +{ + fz_arc4c *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_arc4(fz_stream *chain, unsigned char *key, unsigned keylen) +{ + fz_arc4c *state; + + state = fz_malloc(sizeof(fz_arc4c)); + state->chain = chain; + fz_arc4_init(&state->arc4, key, keylen); + + return fz_new_stream(state, read_arc4, close_arc4); +} + +/* AES Filter */ + +typedef struct fz_aesd_s fz_aesd; + +struct fz_aesd_s +{ + fz_stream *chain; + fz_aes aes; + unsigned char iv[16]; + int ivcount; + unsigned char bp[16]; + unsigned char *rp, *wp; +}; + +static int +read_aesd(fz_stream *stm, unsigned char *buf, int len) +{ + fz_aesd *state = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + + while (state->ivcount < 16) + { + int c = fz_read_byte(state->chain); + if (c < 0) + return fz_throw("premature end in aes filter"); + state->iv[state->ivcount++] = c; + } + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + + while (p < ep) + { + int n = fz_read(state->chain, state->bp, 16); + if (n < 0) + return fz_rethrow(n, "read error in aes filter"); + else if (n == 0) + return p - buf; + else if (n < 16) + return fz_throw("partial block in aes filter"); + + aes_crypt_cbc(&state->aes, AES_DECRYPT, 16, state->iv, state->bp, state->bp); + state->rp = state->bp; + state->wp = state->bp + 16; + + /* strip padding at end of file */ + if (fz_is_eof(state->chain)) + { + int pad = state->bp[15]; + if (pad < 1 || pad > 16) + return fz_throw("aes padding out of range: %d", pad); + state->wp -= pad; + } + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + } + + return p - buf; +} + +static void +close_aesd(fz_stream *stm) +{ + fz_aesd *state = stm->state; + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_aesd(fz_stream *chain, unsigned char *key, unsigned keylen) +{ + fz_aesd *state; + + state = fz_malloc(sizeof(fz_aesd)); + state->chain = chain; + aes_setkey_dec(&state->aes, key, keylen * 8); + state->ivcount = 0; + state->rp = state->bp; + state->wp = state->bp; + + return fz_new_stream(state, read_aesd, close_aesd); +} diff --git a/contrib/media/updf/fitz/filt_dctd.c b/contrib/media/updf/fitz/filt_dctd.c new file mode 100644 index 0000000000..0e24b794d1 --- /dev/null +++ b/contrib/media/updf/fitz/filt_dctd.c @@ -0,0 +1,221 @@ +#include "fitz.h" + +#include +#include + +typedef struct fz_dctd_s fz_dctd; + +struct fz_dctd_s +{ + fz_stream *chain; + int color_transform; + int init; + int stride; + unsigned char *scanline; + unsigned char *rp, *wp; + struct jpeg_decompress_struct cinfo; + struct jpeg_source_mgr srcmgr; + struct jpeg_error_mgr errmgr; + jmp_buf jb; + char msg[JMSG_LENGTH_MAX]; +}; + +static void error_exit(j_common_ptr cinfo) +{ + fz_dctd *state = cinfo->client_data; + cinfo->err->format_message(cinfo, state->msg); + longjmp(state->jb, 1); +} + +static void init_source(j_decompress_ptr cinfo) +{ + /* nothing to do */ +} + +static void term_source(j_decompress_ptr cinfo) +{ + /* nothing to do */ +} + +static boolean fill_input_buffer(j_decompress_ptr cinfo) +{ + struct jpeg_source_mgr *src = cinfo->src; + fz_dctd *state = cinfo->client_data; + fz_stream *chain = state->chain; + + chain->rp = chain->wp; + fz_fill_buffer(chain); + src->next_input_byte = chain->rp; + src->bytes_in_buffer = chain->wp - chain->rp; + + if (src->bytes_in_buffer == 0) + { + static unsigned char eoi[2] = { 0xFF, JPEG_EOI }; + fz_warn("premature end of file in jpeg"); + src->next_input_byte = eoi; + src->bytes_in_buffer = 2; + } + + return 1; +} + +static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) +{ + struct jpeg_source_mgr *src = cinfo->src; + if (num_bytes > 0) + { + while ((size_t)num_bytes > src->bytes_in_buffer) + { + num_bytes -= src->bytes_in_buffer; + (void) src->fill_input_buffer(cinfo); + } + src->next_input_byte += num_bytes; + src->bytes_in_buffer -= num_bytes; + } +} + +static int +read_dctd(fz_stream *stm, unsigned char *buf, int len) +{ + fz_dctd *state = stm->state; + j_decompress_ptr cinfo = &state->cinfo; + unsigned char *p = buf; + unsigned char *ep = buf + len; + + if (setjmp(state->jb)) + { + if (cinfo->src) + state->chain->rp = state->chain->wp - cinfo->src->bytes_in_buffer; + return fz_throw("jpeg error: %s", state->msg); + } + + if (!state->init) + { + cinfo->client_data = state; + cinfo->err = &state->errmgr; + jpeg_std_error(cinfo->err); + cinfo->err->error_exit = error_exit; + jpeg_create_decompress(cinfo); + + cinfo->src = &state->srcmgr; + cinfo->src->init_source = init_source; + cinfo->src->fill_input_buffer = fill_input_buffer; + cinfo->src->skip_input_data = skip_input_data; + cinfo->src->resync_to_restart = jpeg_resync_to_restart; + cinfo->src->term_source = term_source; + cinfo->src->next_input_byte = state->chain->rp; + cinfo->src->bytes_in_buffer = state->chain->wp - state->chain->rp; + + jpeg_read_header(cinfo, 1); + + /* speed up jpeg decoding a bit */ + cinfo->dct_method = JDCT_FASTEST; + cinfo->do_fancy_upsampling = FALSE; + + /* default value if ColorTransform is not set */ + if (state->color_transform == -1) + { + if (state->cinfo.num_components == 3) + state->color_transform = 1; + else + state->color_transform = 0; + } + + if (cinfo->saw_Adobe_marker) + state->color_transform = cinfo->Adobe_transform; + + /* Guess the input colorspace, and set output colorspace accordingly */ + switch (cinfo->num_components) + { + case 3: + if (state->color_transform) + cinfo->jpeg_color_space = JCS_YCbCr; + else + cinfo->jpeg_color_space = JCS_RGB; + break; + case 4: + if (state->color_transform) + cinfo->jpeg_color_space = JCS_YCCK; + else + cinfo->jpeg_color_space = JCS_CMYK; + break; + } + + jpeg_start_decompress(cinfo); + + state->stride = cinfo->output_width * cinfo->output_components; + state->scanline = fz_malloc(state->stride); + state->rp = state->scanline; + state->wp = state->scanline; + + state->init = 1; + } + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + + while (p < ep) + { + if (cinfo->output_scanline == cinfo->output_height) + break; + + if (p + state->stride <= ep) + { + jpeg_read_scanlines(cinfo, &p, 1); + p += state->stride; + } + else + { + jpeg_read_scanlines(cinfo, &state->scanline, 1); + state->rp = state->scanline; + state->wp = state->scanline + state->stride; + } + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + } + + return p - buf; +} + +static void +close_dctd(fz_stream *stm) +{ + fz_dctd *state = stm->state; + + if (setjmp(state->jb)) + { + state->chain->rp = state->chain->wp - state->cinfo.src->bytes_in_buffer; + fz_warn("jpeg error: %s", state->msg); + goto skip; + } + + if (state->init) + jpeg_finish_decompress(&state->cinfo); + +skip: + state->chain->rp = state->chain->wp - state->cinfo.src->bytes_in_buffer; + jpeg_destroy_decompress(&state->cinfo); + fz_free(state->scanline); + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_dctd(fz_stream *chain, fz_obj *params) +{ + fz_dctd *state; + fz_obj *obj; + + state = fz_malloc(sizeof(fz_dctd)); + memset(state, 0, sizeof(fz_dctd)); + state->chain = chain; + state->color_transform = -1; /* unset */ + state->init = 0; + + obj = fz_dict_gets(params, "ColorTransform"); + if (obj) + state->color_transform = fz_to_int(obj); + + return fz_new_stream(state, read_dctd, close_dctd); +} diff --git a/contrib/media/updf/fitz/filt_faxd.c b/contrib/media/updf/fitz/filt_faxd.c new file mode 100644 index 0000000000..dcf56cf3e8 --- /dev/null +++ b/contrib/media/updf/fitz/filt_faxd.c @@ -0,0 +1,731 @@ +#include "fitz.h" + +/* Fax G3/G4 decoder */ + +/* TODO: uncompressed */ + +/* + the first 2^(initialbits) entries map bit patterns to decodes + let's say initial_bits is 8 for the sake of example + and that the code is 1001 + that means that entries 0x90 .. 0x9f have the entry { val, 4 } + because those are all the bytes that start with the code + and the 4 is the length of the code +... if (n_bits > initial_bits) ... + anyway, in that case, it basically points to a mini table + the n_bits is the maximum length of all codes beginning with that byte + so 2^(n_bits - initial_bits) is the size of the mini-table + peter came up with this, and it makes sense +*/ + +typedef struct cfd_node_s cfd_node; + +struct cfd_node_s +{ + short val; + short nbits; +}; + +enum +{ + cfd_white_initial_bits = 8, + cfd_black_initial_bits = 7, + cfd_2d_initial_bits = 7, + cfd_uncompressed_initial_bits = 6 /* must be 6 */ +}; + +/* non-run codes in tables */ +enum +{ + ERROR = -1, + ZEROS = -2, /* EOL follows, possibly with more padding first */ + UNCOMPRESSED = -3 +}; + +/* semantic codes for cf_2d_decode */ +enum +{ + P = -4, + H = -5, + VR3 = 0, + VR2 = 1, + VR1 = 2, + V0 = 3, + VL1 = 4, + VL2 = 5, + VL3 = 6 +}; + +/* White decoding table. */ +const cfd_node cf_white_decode[] = { + {256,12},{272,12},{29,8},{30,8},{45,8},{46,8},{22,7},{22,7}, + {23,7},{23,7},{47,8},{48,8},{13,6},{13,6},{13,6},{13,6},{20,7}, + {20,7},{33,8},{34,8},{35,8},{36,8},{37,8},{38,8},{19,7},{19,7}, + {31,8},{32,8},{1,6},{1,6},{1,6},{1,6},{12,6},{12,6},{12,6},{12,6}, + {53,8},{54,8},{26,7},{26,7},{39,8},{40,8},{41,8},{42,8},{43,8}, + {44,8},{21,7},{21,7},{28,7},{28,7},{61,8},{62,8},{63,8},{0,8}, + {320,8},{384,8},{10,5},{10,5},{10,5},{10,5},{10,5},{10,5},{10,5}, + {10,5},{11,5},{11,5},{11,5},{11,5},{11,5},{11,5},{11,5},{11,5}, + {27,7},{27,7},{59,8},{60,8},{288,9},{290,9},{18,7},{18,7},{24,7}, + {24,7},{49,8},{50,8},{51,8},{52,8},{25,7},{25,7},{55,8},{56,8}, + {57,8},{58,8},{192,6},{192,6},{192,6},{192,6},{1664,6},{1664,6}, + {1664,6},{1664,6},{448,8},{512,8},{292,9},{640,8},{576,8},{294,9}, + {296,9},{298,9},{300,9},{302,9},{256,7},{256,7},{2,4},{2,4},{2,4}, + {2,4},{2,4},{2,4},{2,4},{2,4},{2,4},{2,4},{2,4},{2,4},{2,4},{2,4}, + {2,4},{2,4},{3,4},{3,4},{3,4},{3,4},{3,4},{3,4},{3,4},{3,4},{3,4}, + {3,4},{3,4},{3,4},{3,4},{3,4},{3,4},{3,4},{128,5},{128,5},{128,5}, + {128,5},{128,5},{128,5},{128,5},{128,5},{8,5},{8,5},{8,5},{8,5}, + {8,5},{8,5},{8,5},{8,5},{9,5},{9,5},{9,5},{9,5},{9,5},{9,5},{9,5}, + {9,5},{16,6},{16,6},{16,6},{16,6},{17,6},{17,6},{17,6},{17,6}, + {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},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4}, + {5,4},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4}, + {14,6},{14,6},{14,6},{14,6},{15,6},{15,6},{15,6},{15,6},{64,5}, + {64,5},{64,5},{64,5},{64,5},{64,5},{64,5},{64,5},{6,4},{6,4}, + {6,4},{6,4},{6,4},{6,4},{6,4},{6,4},{6,4},{6,4},{6,4},{6,4},{6,4}, + {6,4},{6,4},{6,4},{7,4},{7,4},{7,4},{7,4},{7,4},{7,4},{7,4},{7,4}, + {7,4},{7,4},{7,4},{7,4},{7,4},{7,4},{7,4},{7,4},{-2,3},{-2,3}, + {-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0}, + {-1,0},{-1,0},{-1,0},{-1,0},{-3,4},{1792,3},{1792,3},{1984,4}, + {2048,4},{2112,4},{2176,4},{2240,4},{2304,4},{1856,3},{1856,3}, + {1920,3},{1920,3},{2368,4},{2432,4},{2496,4},{2560,4},{1472,1}, + {1536,1},{1600,1},{1728,1},{704,1},{768,1},{832,1},{896,1}, + {960,1},{1024,1},{1088,1},{1152,1},{1216,1},{1280,1},{1344,1}, + {1408,1} +}; + +/* Black decoding table. */ +const cfd_node cf_black_decode[] = { + {128,12},{160,13},{224,12},{256,12},{10,7},{11,7},{288,12},{12,7}, + {9,6},{9,6},{8,6},{8,6},{7,5},{7,5},{7,5},{7,5},{6,4},{6,4},{6,4}, + {6,4},{6,4},{6,4},{6,4},{6,4},{5,4},{5,4},{5,4},{5,4},{5,4},{5,4}, + {5,4},{5,4},{1,3},{1,3},{1,3},{1,3},{1,3},{1,3},{1,3},{1,3},{1,3}, + {1,3},{1,3},{1,3},{1,3},{1,3},{1,3},{1,3},{4,3},{4,3},{4,3},{4,3}, + {4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3}, + {4,3},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2}, + {3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2}, + {3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2},{3,2}, + {2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2}, + {2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2}, + {2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2},{2,2}, + {-2,4},{-2,4},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0}, + {-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-3,5},{1792,4}, + {1792,4},{1984,5},{2048,5},{2112,5},{2176,5},{2240,5},{2304,5}, + {1856,4},{1856,4},{1920,4},{1920,4},{2368,5},{2432,5},{2496,5}, + {2560,5},{18,3},{18,3},{18,3},{18,3},{18,3},{18,3},{18,3},{18,3}, + {52,5},{52,5},{640,6},{704,6},{768,6},{832,6},{55,5},{55,5}, + {56,5},{56,5},{1280,6},{1344,6},{1408,6},{1472,6},{59,5},{59,5}, + {60,5},{60,5},{1536,6},{1600,6},{24,4},{24,4},{24,4},{24,4}, + {25,4},{25,4},{25,4},{25,4},{1664,6},{1728,6},{320,5},{320,5}, + {384,5},{384,5},{448,5},{448,5},{512,6},{576,6},{53,5},{53,5}, + {54,5},{54,5},{896,6},{960,6},{1024,6},{1088,6},{1152,6},{1216,6}, + {64,3},{64,3},{64,3},{64,3},{64,3},{64,3},{64,3},{64,3},{13,1}, + {13,1},{13,1},{13,1},{13,1},{13,1},{13,1},{13,1},{13,1},{13,1}, + {13,1},{13,1},{13,1},{13,1},{13,1},{13,1},{23,4},{23,4},{50,5}, + {51,5},{44,5},{45,5},{46,5},{47,5},{57,5},{58,5},{61,5},{256,5}, + {16,3},{16,3},{16,3},{16,3},{17,3},{17,3},{17,3},{17,3},{48,5}, + {49,5},{62,5},{63,5},{30,5},{31,5},{32,5},{33,5},{40,5},{41,5}, + {22,4},{22,4},{14,1},{14,1},{14,1},{14,1},{14,1},{14,1},{14,1}, + {14,1},{14,1},{14,1},{14,1},{14,1},{14,1},{14,1},{14,1},{14,1}, + {15,2},{15,2},{15,2},{15,2},{15,2},{15,2},{15,2},{15,2},{128,5}, + {192,5},{26,5},{27,5},{28,5},{29,5},{19,4},{19,4},{20,4},{20,4}, + {34,5},{35,5},{36,5},{37,5},{38,5},{39,5},{21,4},{21,4},{42,5}, + {43,5},{0,3},{0,3},{0,3},{0,3} +}; + +/* 2-D decoding table. */ +const cfd_node cf_2d_decode[] = { + {128,11},{144,10},{6,7},{0,7},{5,6},{5,6},{1,6},{1,6},{-4,4}, + {-4,4},{-4,4},{-4,4},{-4,4},{-4,4},{-4,4},{-4,4},{-5,3},{-5,3}, + {-5,3},{-5,3},{-5,3},{-5,3},{-5,3},{-5,3},{-5,3},{-5,3},{-5,3}, + {-5,3},{-5,3},{-5,3},{-5,3},{-5,3},{4,3},{4,3},{4,3},{4,3},{4,3}, + {4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3},{4,3}, + {2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{2,3}, + {2,3},{2,3},{2,3},{2,3},{2,3},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1},{3,1}, + {3,1},{3,1},{3,1},{-2,4},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0}, + {-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0}, + {-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-1,0},{-3,3} +}; + +/* Uncompresssed decoding table. */ +const cfd_node cf_uncompressed_decode[] = { + {64,12},{5,6},{4,5},{4,5},{3,4},{3,4},{3,4},{3,4},{2,3},{2,3}, + {2,3},{2,3},{2,3},{2,3},{2,3},{2,3},{1,2},{1,2},{1,2},{1,2},{1,2}, + {1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2}, + {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, + {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, + {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, + {-1,0},{-1,0},{8,6},{9,6},{6,5},{6,5},{7,5},{7,5},{4,4},{4,4}, + {4,4},{4,4},{5,4},{5,4},{5,4},{5,4},{2,3},{2,3},{2,3},{2,3},{2,3}, + {2,3},{2,3},{2,3},{3,3},{3,3},{3,3},{3,3},{3,3},{3,3},{3,3},{3,3}, + {0,2},{0,2},{0,2},{0,2},{0,2},{0,2},{0,2},{0,2},{0,2},{0,2},{0,2}, + {0,2},{0,2},{0,2},{0,2},{0,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2}, + {1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2},{1,2} +}; + +/* bit magic */ + +static inline int getbit(const unsigned char *buf, int x) +{ + return ( buf[x >> 3] >> ( 7 - (x & 7) ) ) & 1; +} + +static int +find_changing(const unsigned char *line, int x, int w) +{ + int a, b; + + if (!line) + return w; + + if (x == -1) + { + a = 0; + x = 0; + } + else + { + a = getbit(line, x); + x++; + } + + while (x < w) + { + b = getbit(line, x); + if (a != b) + break; + x++; + } + + return x; +} + +static int +find_changing_color(const unsigned char *line, int x, int w, int color) +{ + if (!line) + return w; + + x = find_changing(line, x, w); + + if (x < w && getbit(line, x) != color) + x = find_changing(line, x, w); + + return x; +} + +static const unsigned char lm[8] = { + 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 +}; + +static const unsigned char rm[8] = { + 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE +}; + +static inline void setbits(unsigned char *line, int x0, int x1) +{ + int a0, a1, b0, b1, a; + + a0 = x0 >> 3; + a1 = x1 >> 3; + + b0 = x0 & 7; + b1 = x1 & 7; + + if (a0 == a1) + { + if (b1) + line[a0] |= lm[b0] & rm[b1]; + } + else + { + line[a0] |= lm[b0]; + for (a = a0 + 1; a < a1; a++) + line[a] = 0xFF; + if (b1) + line[a1] |= rm[b1]; + } +} + +typedef struct fz_faxd_s fz_faxd; + +enum +{ + STATE_NORMAL, /* neutral state, waiting for any code */ + STATE_MAKEUP, /* got a 1d makeup code, waiting for terminating code */ + STATE_EOL, /* at eol, needs output buffer space */ + STATE_H1, STATE_H2, /* in H part 1 and 2 (both makeup and terminating codes) */ + STATE_DONE /* all done */ +}; + +struct fz_faxd_s +{ + fz_stream *chain; + + int k; + int end_of_line; + int encoded_byte_align; + int columns; + int rows; + int end_of_block; + int black_is_1; + + int stride; + int ridx; + + int bidx; + unsigned int word; + + int stage; + + int a, c, dim, eolc; + unsigned char *ref; + unsigned char *dst; + unsigned char *rp, *wp; +}; + +static inline void eat_bits(fz_faxd *fax, int nbits) +{ + fax->word <<= nbits; + fax->bidx += nbits; +} + +static int +fill_bits(fz_faxd *fax) +{ + while (fax->bidx >= 8) + { + int c = fz_read_byte(fax->chain); + if (c == EOF) + return EOF; + fax->bidx -= 8; + fax->word |= c << fax->bidx; + } + return 0; +} + +static int +get_code(fz_faxd *fax, const cfd_node *table, int initialbits) +{ + unsigned int word = fax->word; + int tidx = word >> (32 - initialbits); + int val = table[tidx].val; + int nbits = table[tidx].nbits; + + if (nbits > initialbits) + { + int mask = (1 << (32 - initialbits)) - 1; + tidx = val + ((word & mask) >> (32 - nbits)); + val = table[tidx].val; + nbits = initialbits + table[tidx].nbits; + } + + eat_bits(fax, nbits); + + return val; +} + +/* decode one 1d code */ +static fz_error +dec1d(fz_faxd *fax) +{ + int code; + + if (fax->a == -1) + fax->a = 0; + + if (fax->c) + code = get_code(fax, cf_black_decode, cfd_black_initial_bits); + else + code = get_code(fax, cf_white_decode, cfd_white_initial_bits); + + if (code == UNCOMPRESSED) + return fz_throw("uncompressed data in faxd"); + + if (code < 0) + return fz_throw("negative code in 1d faxd"); + + if (fax->a + code > fax->columns) + return fz_throw("overflow in 1d faxd"); + + if (fax->c) + setbits(fax->dst, fax->a, fax->a + code); + + fax->a += code; + + if (code < 64) + { + fax->c = !fax->c; + fax->stage = STATE_NORMAL; + } + else + fax->stage = STATE_MAKEUP; + + return fz_okay; +} + +/* decode one 2d code */ +static fz_error +dec2d(fz_faxd *fax) +{ + int code, b1, b2; + + if (fax->stage == STATE_H1 || fax->stage == STATE_H2) + { + if (fax->a == -1) + fax->a = 0; + + if (fax->c) + code = get_code(fax, cf_black_decode, cfd_black_initial_bits); + else + code = get_code(fax, cf_white_decode, cfd_white_initial_bits); + + if (code == UNCOMPRESSED) + return fz_throw("uncompressed data in faxd"); + + if (code < 0) + return fz_throw("negative code in 2d faxd"); + + if (fax->a + code > fax->columns) + return fz_throw("overflow in 2d faxd"); + + if (fax->c) + setbits(fax->dst, fax->a, fax->a + code); + + fax->a += code; + + if (code < 64) + { + fax->c = !fax->c; + if (fax->stage == STATE_H1) + fax->stage = STATE_H2; + else if (fax->stage == STATE_H2) + fax->stage = STATE_NORMAL; + } + + return fz_okay; + } + + code = get_code(fax, cf_2d_decode, cfd_2d_initial_bits); + + switch (code) + { + case H: + fax->stage = STATE_H1; + break; + + case P: + b1 = find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 >= fax->columns) + b2 = fax->columns; + else + b2 = find_changing(fax->ref, b1, fax->columns); + if (fax->c) setbits(fax->dst, fax->a, b2); + fax->a = b2; + break; + + case V0: + b1 = find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VR1: + b1 = 1 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 >= fax->columns) b1 = fax->columns; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VR2: + b1 = 2 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 >= fax->columns) b1 = fax->columns; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VR3: + b1 = 3 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 >= fax->columns) b1 = fax->columns; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VL1: + b1 = -1 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 < 0) b1 = 0; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VL2: + b1 = -2 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 < 0) b1 = 0; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case VL3: + b1 = -3 + find_changing_color(fax->ref, fax->a, fax->columns, !fax->c); + if (b1 < 0) b1 = 0; + if (fax->c) setbits(fax->dst, fax->a, b1); + fax->a = b1; + fax->c = !fax->c; + break; + + case UNCOMPRESSED: + return fz_throw("uncompressed data in faxd"); + + case ERROR: + return fz_throw("invalid code in 2d faxd"); + + default: + return fz_throw("invalid code in 2d faxd (%d)", code); + } + + return 0; +} + +static int +read_faxd(fz_stream *stm, unsigned char *buf, int len) +{ + fz_faxd *fax = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + unsigned char *tmp; + fz_error error; + + if (fax->stage == STATE_DONE) + return 0; + + if (fax->stage == STATE_EOL) + goto eol; + +loop: + + if (fill_bits(fax)) + { + if (fax->bidx > 31) + { + if (fax->a > 0) + goto eol; + goto rtc; + } + } + + if ((fax->word >> (32 - 12)) == 0) + { + eat_bits(fax, 1); + goto loop; + } + + if ((fax->word >> (32 - 12)) == 1) + { + eat_bits(fax, 12); + fax->eolc ++; + + if (fax->k > 0) + { + if (fax->a == -1) + fax->a = 0; + if ((fax->word >> (32 - 1)) == 1) + fax->dim = 1; + else + fax->dim = 2; + eat_bits(fax, 1); + } + } + else if (fax->k > 0 && fax->a == -1) + { + fax->a = 0; + if ((fax->word >> (32 - 1)) == 1) + fax->dim = 1; + else + fax->dim = 2; + eat_bits(fax, 1); + } + else if (fax->dim == 1) + { + fax->eolc = 0; + error = dec1d(fax); + if (error) + return fz_rethrow(error, "cannot decode 1d code"); + } + else if (fax->dim == 2) + { + fax->eolc = 0; + error = dec2d(fax); + if (error) + return fz_rethrow(error, "cannot decode 2d code"); + } + + /* no eol check after makeup codes nor in the middle of an H code */ + if (fax->stage == STATE_MAKEUP || fax->stage == STATE_H1 || fax->stage == STATE_H2) + goto loop; + + /* check for eol conditions */ + if (fax->eolc || fax->a >= fax->columns) + { + if (fax->a > 0) + goto eol; + if (fax->eolc == (fax->k < 0 ? 2 : 6)) + goto rtc; + } + + goto loop; + +eol: + fax->stage = STATE_EOL; + + if (fax->black_is_1) + { + while (fax->rp < fax->wp && p < ep) + *p++ = *fax->rp++; + } + else + { + while (fax->rp < fax->wp && p < ep) + *p++ = *fax->rp++ ^ 0xff; + } + + if (fax->rp < fax->wp) + return p - buf; + + tmp = fax->ref; + fax->ref = fax->dst; + fax->dst = tmp; + memset(fax->dst, 0, fax->stride); + + fax->rp = fax->dst; + fax->wp = fax->dst + fax->stride; + + fax->stage = STATE_NORMAL; + fax->c = 0; + fax->a = -1; + fax->ridx ++; + + if (!fax->end_of_block && fax->rows) + { + if (fax->ridx >= fax->rows) + goto rtc; + } + + /* we have not read dim from eol, make a guess */ + if (fax->k > 0 && !fax->eolc && fax->a == -1) + { + if (fax->ridx % fax->k == 0) + fax->dim = 1; + else + fax->dim = 2; + } + + /* if end_of_line & encoded_byte_align, EOLs are *not* optional */ + if (fax->encoded_byte_align) + { + if (fax->end_of_line) + eat_bits(fax, (12 - fax->bidx) & 7); + else + eat_bits(fax, (8 - fax->bidx) & 7); + } + + /* no more space in output, don't decode the next row yet */ + if (p == buf + len) + return p - buf; + + goto loop; + +rtc: + fax->stage = STATE_DONE; + return p - buf; +} + +static void +close_faxd(fz_stream *stm) +{ + fz_faxd *fax = stm->state; + int i; + + /* if we read any extra bytes, try to put them back */ + i = (32 - fax->bidx) / 8; + while (i--) + fz_unread_byte(fax->chain); + + fz_close(fax->chain); + fz_free(fax->ref); + fz_free(fax->dst); + fz_free(fax); +} + +fz_stream * +fz_open_faxd(fz_stream *chain, fz_obj *params) +{ + fz_faxd *fax; + fz_obj *obj; + + fax = fz_malloc(sizeof(fz_faxd)); + fax->chain = chain; + + fax->ref = NULL; + fax->dst = NULL; + + fax->k = 0; + fax->end_of_line = 0; + fax->encoded_byte_align = 0; + fax->columns = 1728; + fax->rows = 0; + fax->end_of_block = 1; + fax->black_is_1 = 0; + + obj = fz_dict_gets(params, "K"); + if (obj) fax->k = fz_to_int(obj); + + obj = fz_dict_gets(params, "EndOfLine"); + if (obj) fax->end_of_line = fz_to_bool(obj); + + obj = fz_dict_gets(params, "EncodedByteAlign"); + if (obj) fax->encoded_byte_align = fz_to_bool(obj); + + obj = fz_dict_gets(params, "Columns"); + if (obj) fax->columns = fz_to_int(obj); + + obj = fz_dict_gets(params, "Rows"); + if (obj) fax->rows = fz_to_int(obj); + + obj = fz_dict_gets(params, "EndOfBlock"); + if (obj) fax->end_of_block = fz_to_bool(obj); + + obj = fz_dict_gets(params, "BlackIs1"); + if (obj) fax->black_is_1 = fz_to_bool(obj); + + fax->stride = ((fax->columns - 1) >> 3) + 1; + fax->ridx = 0; + fax->bidx = 32; + fax->word = 0; + + fax->stage = STATE_NORMAL; + fax->a = -1; + fax->c = 0; + fax->dim = fax->k < 0 ? 2 : 1; + fax->eolc = 0; + + fax->ref = fz_malloc(fax->stride); + fax->dst = fz_malloc(fax->stride); + fax->rp = fax->dst; + fax->wp = fax->dst + fax->stride; + + memset(fax->ref, 0, fax->stride); + memset(fax->dst, 0, fax->stride); + + return fz_new_stream(fax, read_faxd, close_faxd); +} diff --git a/contrib/media/updf/fitz/filt_flate.c b/contrib/media/updf/fitz/filt_flate.c new file mode 100644 index 0000000000..e7d4c9f7ad --- /dev/null +++ b/contrib/media/updf/fitz/filt_flate.c @@ -0,0 +1,103 @@ +#include "fitz.h" + +#include + +typedef struct fz_flate_s fz_flate; + +struct fz_flate_s +{ + fz_stream *chain; + z_stream z; +}; + +static void *zalloc(void *opaque, unsigned int items, unsigned int size) +{ + return fz_calloc(items, size); +} + +static void zfree(void *opaque, void *ptr) +{ + fz_free(ptr); +} + +static int +read_flated(fz_stream *stm, unsigned char *outbuf, int outlen) +{ + fz_flate *state = stm->state; + fz_stream *chain = state->chain; + z_streamp zp = &state->z; + int code; + + zp->next_out = outbuf; + zp->avail_out = outlen; + + while (zp->avail_out > 0) + { + if (chain->rp == chain->wp) + fz_fill_buffer(chain); + + zp->next_in = chain->rp; + zp->avail_in = chain->wp - chain->rp; + + code = inflate(zp, Z_SYNC_FLUSH); + + chain->rp = chain->wp - zp->avail_in; + + if (code == Z_STREAM_END) + { + return outlen - zp->avail_out; + } + else if (code == Z_BUF_ERROR) + { + fz_warn("premature end of data in flate filter"); + return outlen - zp->avail_out; + } + else if (code == Z_DATA_ERROR && zp->avail_in == 0) + { + fz_warn("ignoring zlib error: %s", zp->msg); + return outlen - zp->avail_out; + } + else if (code != Z_OK) + { + return fz_throw("zlib error: %s", zp->msg); + } + } + + return outlen - zp->avail_out; +} + +static void +close_flated(fz_stream *stm) +{ + fz_flate *state = stm->state; + int code; + + code = inflateEnd(&state->z); + if (code != Z_OK) + fz_warn("zlib error: inflateEnd: %s", state->z.msg); + + fz_close(state->chain); + fz_free(state); +} + +fz_stream * +fz_open_flated(fz_stream *chain) +{ + fz_flate *state; + int code; + + state = fz_malloc(sizeof(fz_flate)); + state->chain = chain; + + state->z.zalloc = zalloc; + state->z.zfree = zfree; + state->z.opaque = NULL; + state->z.next_in = NULL; + state->z.avail_in = 0; + + code = inflateInit(&state->z); + if (code != Z_OK) + fz_warn("zlib error: inflateInit: %s", state->z.msg); + + return fz_new_stream(state, read_flated, close_flated); +} diff --git a/contrib/media/updf/fitz/filt_jbig2d.c b/contrib/media/updf/fitz/filt_jbig2d.c new file mode 100644 index 0000000000..4dbe542c58 --- /dev/null +++ b/contrib/media/updf/fitz/filt_jbig2d.c @@ -0,0 +1,103 @@ +#include "fitz.h" + +#ifdef _WIN32 /* Microsoft Visual C++ */ + +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; +typedef __int64 int64_t; + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; + +#else +#include +#endif + +#include + +typedef struct fz_jbig2d_s fz_jbig2d; + +struct fz_jbig2d_s +{ + fz_stream *chain; + Jbig2Ctx *ctx; + Jbig2GlobalCtx *gctx; + Jbig2Image *page; + int idx; +}; + +static void +close_jbig2d(fz_stream *stm) +{ + fz_jbig2d *state = stm->state; + if (state->page) + jbig2_release_page(state->ctx, state->page); + if (state->gctx) + jbig2_global_ctx_free(state->gctx); + jbig2_ctx_free(state->ctx); + fz_close(state->chain); + fz_free(state); +} + +static int +read_jbig2d(fz_stream *stm, unsigned char *buf, int len) +{ + fz_jbig2d *state = stm->state; + unsigned char tmp[4096]; + unsigned char *p = buf; + unsigned char *ep = buf + len; + unsigned char *s; + int x, w, n; + + if (!state->page) + { + while (1) + { + n = fz_read(state->chain, tmp, sizeof tmp); + if (n < 0) + return fz_rethrow(n, "read error in jbig2 filter"); + if (n == 0) + break; + jbig2_data_in(state->ctx, tmp, n); + } + + jbig2_complete_page(state->ctx); + + state->page = jbig2_page_out(state->ctx); + if (!state->page) + return fz_throw("jbig2_page_out failed"); + } + + s = state->page->data; + w = state->page->height * state->page->stride; + x = state->idx; + while (p < ep && x < w) + *p++ = s[x++] ^ 0xff; + state->idx = x; + + return p - buf; +} + +fz_stream * +fz_open_jbig2d(fz_stream *chain, fz_buffer *globals) +{ + fz_jbig2d *state; + + state = fz_malloc(sizeof(fz_jbig2d)); + state->chain = chain; + state->ctx = jbig2_ctx_new(NULL, JBIG2_OPTIONS_EMBEDDED, NULL, NULL, NULL); + state->gctx = NULL; + state->page = NULL; + state->idx = 0; + + if (globals) + { + jbig2_data_in(state->ctx, globals->data, globals->len); + state->gctx = jbig2_make_global_ctx(state->ctx); + state->ctx = jbig2_ctx_new(NULL, JBIG2_OPTIONS_EMBEDDED, state->gctx, NULL, NULL); + } + + return fz_new_stream(state, read_jbig2d, close_jbig2d); +} diff --git a/contrib/media/updf/fitz/filt_jpxd.c b/contrib/media/updf/fitz/filt_jpxd.c new file mode 100644 index 0000000000..765aad2979 --- /dev/null +++ b/contrib/media/updf/fitz/filt_jpxd.c @@ -0,0 +1,153 @@ +#include "fitz.h" + +#define OPJ_STATIC +#include + +static void fz_opj_error_callback(const char *msg, void *client_data) +{ + fprintf(stderr, "openjpeg error: %s", msg); +} + +static void fz_opj_warning_callback(const char *msg, void *client_data) +{ + fprintf(stderr, "openjpeg warning: %s", msg); +} + +static void fz_opj_info_callback(const char *msg, void *client_data) +{ + /* fprintf(stderr, "openjpeg info: %s", msg); */ +} + +fz_error +fz_load_jpx_image(fz_pixmap **imgp, unsigned char *data, int size, fz_colorspace *defcs) +{ + fz_pixmap *img; + opj_event_mgr_t evtmgr; + opj_dparameters_t params; + opj_dinfo_t *info; + opj_cio_t *cio; + opj_image_t *jpx; + fz_colorspace *colorspace; + unsigned char *p; + int format; + int a, n, w, h, depth, sgnd; + int x, y, k, v; + + if (size < 2) + return fz_throw("not enough data to determine image format"); + + /* Check for SOC marker -- if found we have a bare J2K stream */ + if (data[0] == 0xFF && data[1] == 0x4F) + format = CODEC_J2K; + else + format = CODEC_JP2; + + memset(&evtmgr, 0, sizeof(evtmgr)); + evtmgr.error_handler = fz_opj_error_callback; + evtmgr.warning_handler = fz_opj_warning_callback; + evtmgr.info_handler = fz_opj_info_callback; + + opj_set_default_decoder_parameters(¶ms); + + info = opj_create_decompress(format); + opj_set_event_mgr((opj_common_ptr)info, &evtmgr, stderr); + opj_setup_decoder(info, ¶ms); + + cio = opj_cio_open((opj_common_ptr)info, data, size); + + jpx = opj_decode(info, cio); + + opj_cio_close(cio); + opj_destroy_decompress(info); + + if (!jpx) + return fz_throw("opj_decode failed"); + + for (k = 1; k < jpx->numcomps; k++) + { + if (jpx->comps[k].w != jpx->comps[0].w) + return fz_throw("image components have different width"); + if (jpx->comps[k].h != jpx->comps[0].h) + return fz_throw("image components have different height"); + if (jpx->comps[k].prec != jpx->comps[0].prec) + return fz_throw("image components have different precision"); + } + + n = jpx->numcomps; + w = jpx->comps[0].w; + h = jpx->comps[0].h; + depth = jpx->comps[0].prec; + sgnd = jpx->comps[0].sgnd; + + if (jpx->color_space == CLRSPC_SRGB && n == 4) { n = 3; a = 1; } + else if (jpx->color_space == CLRSPC_SYCC && n == 4) { n = 3; a = 1; } + else if (n == 2) { n = 1; a = 1; } + else if (n > 4) { n = 4; a = 1; } + else { a = 0; } + + if (defcs) + { + if (defcs->n == n) + { + colorspace = defcs; + } + else + { + fz_warn("jpx file and dict colorspaces do not match"); + defcs = NULL; + } + } + + if (!defcs) + { + switch (n) + { + case 1: colorspace = fz_device_gray; break; + case 3: colorspace = fz_device_rgb; break; + case 4: colorspace = fz_device_cmyk; break; + } + } + + img = fz_new_pixmap_with_limit(colorspace, w, h); + if (!img) + { + opj_image_destroy(jpx); + return fz_throw("out of memory"); + } + + p = img->samples; + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + for (k = 0; k < n + a; k++) + { + v = jpx->comps[k].data[y * w + x]; + if (sgnd) + v = v + (1 << (depth - 1)); + if (depth > 8) + v = v >> (depth - 8); + *p++ = v; + } + if (!a) + *p++ = 255; + } + } + + if (a) + { + if (n == 4) + { + fz_pixmap *tmp = fz_new_pixmap(fz_device_rgb, w, h); + fz_convert_pixmap(img, tmp); + fz_drop_pixmap(img); + img = tmp; + } + fz_premultiply_pixmap(img); + } + + opj_image_destroy(jpx); + + *imgp = img; + return fz_okay; +} diff --git a/contrib/media/updf/fitz/filt_lzwd.c b/contrib/media/updf/fitz/filt_lzwd.c new file mode 100644 index 0000000000..942e5837df --- /dev/null +++ b/contrib/media/updf/fitz/filt_lzwd.c @@ -0,0 +1,206 @@ +#include "fitz.h" + +/* TODO: error checking */ + +enum +{ + MIN_BITS = 9, + MAX_BITS = 12, + NUM_CODES = (1 << MAX_BITS), + LZW_CLEAR = 256, + LZW_EOD = 257, + LZW_FIRST = 258, + MAX_LENGTH = 4097 +}; + +typedef struct lzw_code_s lzw_code; + +struct lzw_code_s +{ + int prev; /* prev code (in string) */ + unsigned short length; /* string len, including this token */ + unsigned char value; /* data value */ + unsigned char first_char; /* first token of string */ +}; + +typedef struct fz_lzwd_s fz_lzwd; + +struct fz_lzwd_s +{ + fz_stream *chain; + int eod; + + int early_change; + + int code_bits; /* num bits/code */ + int code; /* current code */ + int old_code; /* previously recognized code */ + int next_code; /* next free entry */ + + lzw_code table[NUM_CODES]; + + unsigned char bp[MAX_LENGTH]; + unsigned char *rp, *wp; +}; + +static int +read_lzwd(fz_stream *stm, unsigned char *buf, int len) +{ + fz_lzwd *lzw = stm->state; + lzw_code *table = lzw->table; + unsigned char *p = buf; + unsigned char *ep = buf + len; + unsigned char *s; + int codelen; + + int code_bits = lzw->code_bits; + int code = lzw->code; + int old_code = lzw->old_code; + int next_code = lzw->next_code; + + while (lzw->rp < lzw->wp && p < ep) + *p++ = *lzw->rp++; + + while (p < ep) + { + if (lzw->eod) + return 0; + + code = fz_read_bits(lzw->chain, code_bits); + + if (fz_is_eof_bits(lzw->chain)) + { + lzw->eod = 1; + break; + } + + if (code == LZW_EOD) + { + lzw->eod = 1; + break; + } + + if (code == LZW_CLEAR) + { + code_bits = MIN_BITS; + next_code = LZW_FIRST; + old_code = -1; + continue; + } + + /* if stream starts without a clear code, old_code is undefined... */ + if (old_code == -1) + { + old_code = code; + } + else + { + /* add new entry to the code table */ + table[next_code].prev = old_code; + table[next_code].first_char = table[old_code].first_char; + table[next_code].length = table[old_code].length + 1; + if (code < next_code) + table[next_code].value = table[code].first_char; + else if (code == next_code) + table[next_code].value = table[next_code].first_char; + else + fz_warn("out of range code encountered in lzw decode"); + + next_code ++; + + if (next_code > (1 << code_bits) - lzw->early_change - 1) + { + code_bits ++; + if (code_bits > MAX_BITS) + code_bits = MAX_BITS; /* FIXME */ + } + + old_code = code; + } + + /* code maps to a string, copy to output (in reverse...) */ + if (code > 255) + { + codelen = table[code].length; + lzw->rp = lzw->bp; + lzw->wp = lzw->bp + codelen; + + assert(codelen < MAX_LENGTH); + + s = lzw->wp; + do { + *(--s) = table[code].value; + code = table[code].prev; + } while (code >= 0 && s > lzw->bp); + } + + /* ... or just a single character */ + else + { + lzw->bp[0] = code; + lzw->rp = lzw->bp; + lzw->wp = lzw->bp + 1; + } + + /* copy to output */ + while (lzw->rp < lzw->wp && p < ep) + *p++ = *lzw->rp++; + } + + lzw->code_bits = code_bits; + lzw->code = code; + lzw->old_code = old_code; + lzw->next_code = next_code; + + return p - buf; +} + +static void +close_lzwd(fz_stream *stm) +{ + fz_lzwd *lzw = stm->state; + fz_close(lzw->chain); + fz_free(lzw); +} + +fz_stream * +fz_open_lzwd(fz_stream *chain, fz_obj *params) +{ + fz_lzwd *lzw; + fz_obj *obj; + int i; + + lzw = fz_malloc(sizeof(fz_lzwd)); + lzw->chain = chain; + lzw->eod = 0; + lzw->early_change = 1; + + obj = fz_dict_gets(params, "EarlyChange"); + if (obj) + lzw->early_change = !!fz_to_int(obj); + + for (i = 0; i < 256; i++) + { + lzw->table[i].value = i; + lzw->table[i].first_char = i; + lzw->table[i].length = 1; + lzw->table[i].prev = -1; + } + + for (i = 256; i < NUM_CODES; i++) + { + lzw->table[i].value = 0; + lzw->table[i].first_char = 0; + lzw->table[i].length = 0; + lzw->table[i].prev = -1; + } + + lzw->code_bits = MIN_BITS; + lzw->code = -1; + lzw->next_code = LZW_FIRST; + lzw->old_code = -1; + lzw->rp = lzw->bp; + lzw->wp = lzw->bp; + + return fz_new_stream(lzw, read_lzwd, close_lzwd); +} diff --git a/contrib/media/updf/fitz/filt_predict.c b/contrib/media/updf/fitz/filt_predict.c new file mode 100644 index 0000000000..94f2718a41 --- /dev/null +++ b/contrib/media/updf/fitz/filt_predict.c @@ -0,0 +1,243 @@ +#include "fitz.h" + +/* TODO: check if this works with 16bpp images */ + +enum { MAXC = 32 }; + +typedef struct fz_predict_s fz_predict; + +struct fz_predict_s +{ + fz_stream *chain; + + int predictor; + int columns; + int colors; + int bpc; + + int stride; + int bpp; + unsigned char *in; + unsigned char *out; + unsigned char *ref; + unsigned char *rp, *wp; +}; + +static inline int getcomponent(unsigned char *line, int x, int bpc) +{ + switch (bpc) + { + case 1: return (line[x >> 3] >> ( 7 - (x & 7) ) ) & 1; + case 2: return (line[x >> 2] >> ( ( 3 - (x & 3) ) << 1 ) ) & 3; + case 4: return (line[x >> 1] >> ( ( 1 - (x & 1) ) << 2 ) ) & 15; + case 8: return line[x]; + } + return 0; +} + + +static inline void putcomponent(unsigned char *buf, int x, int bpc, int value) +{ + switch (bpc) + { + case 1: buf[x >> 3] |= value << (7 - (x & 7)); break; + case 2: buf[x >> 2] |= value << ((3 - (x & 3)) << 1); break; + case 4: buf[x >> 1] |= value << ((1 - (x & 1)) << 2); break; + case 8: buf[x] = value; break; + } +} + +static inline int paeth(int a, int b, int c) +{ + /* The definitions of ac and bc are correct, not a typo. */ + int ac = b - c, bc = a - c, abcc = ac + bc; + int pa = ABS(ac); + int pb = ABS(bc); + int pc = ABS(abcc); + return pa <= pb && pa <= pc ? a : pb <= pc ? b : c; +} + +static void +fz_predict_tiff(fz_predict *state, unsigned char *out, unsigned char *in, int len) +{ + int left[MAXC]; + int i, k; + + for (k = 0; k < state->colors; k++) + left[k] = 0; + + for (i = 0; i < state->columns; i++) + { + for (k = 0; k < state->colors; k++) + { + int a = getcomponent(in, i * state->colors + k, state->bpc); + int b = a + left[k]; + int c = b % (1 << state->bpc); + putcomponent(out, i * state->colors + k, state->bpc, c); + left[k] = c; + } + } +} + +static void +fz_predict_png(fz_predict *state, unsigned char *out, unsigned char *in, int len, int predictor) +{ + int bpp = state->bpp; + int i; + unsigned char *ref = state->ref; + + switch (predictor) + { + case 0: + memcpy(out, in, len); + break; + case 1: + for (i = bpp; i > 0; i--) + { + *out++ = *in++; + } + for (i = len - bpp; i > 0; i--) + { + *out = *in++ + out[-bpp]; + out++; + } + break; + case 2: + for (i = bpp; i > 0; i--) + { + *out++ = *in++ + *ref++; + } + for (i = len - bpp; i > 0; i--) + { + *out++ = *in++ + *ref++; + } + break; + case 3: + for (i = bpp; i > 0; i--) + { + *out++ = *in++ + (*ref++) / 2; + } + for (i = len - bpp; i > 0; i--) + { + *out = *in++ + (out[-bpp] + *ref++) / 2; + out++; + } + break; + case 4: + for (i = bpp; i > 0; i--) + { + *out++ = *in++ + paeth(0, *ref++, 0); + } + for (i = len - bpp; i > 0; i --) + { + *out = *in++ + paeth(out[-bpp], *ref, ref[-bpp]); + ref++; + out++; + } + break; + } +} + +static int +read_predict(fz_stream *stm, unsigned char *buf, int len) +{ + fz_predict *state = stm->state; + unsigned char *p = buf; + unsigned char *ep = buf + len; + int ispng = state->predictor >= 10; + int n; + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + + while (p < ep) + { + n = fz_read(state->chain, state->in, state->stride + ispng); + if (n < 0) + return fz_rethrow(n, "read error in prediction filter"); + if (n == 0) + return p - buf; + + if (state->predictor == 1) + memcpy(state->out, state->in, n); + else if (state->predictor == 2) + fz_predict_tiff(state, state->out, state->in, n); + else + { + fz_predict_png(state, state->out, state->in + 1, n - 1, state->in[0]); + memcpy(state->ref, state->out, state->stride); + } + + state->rp = state->out; + state->wp = state->out + n - ispng; + + while (state->rp < state->wp && p < ep) + *p++ = *state->rp++; + } + + return p - buf; +} + +static void +close_predict(fz_stream *stm) +{ + fz_predict *state = stm->state; + fz_close(state->chain); + fz_free(state->in); + fz_free(state->out); + fz_free(state->ref); + fz_free(state); +} + +fz_stream * +fz_open_predict(fz_stream *chain, fz_obj *params) +{ + fz_predict *state; + fz_obj *obj; + + state = fz_malloc(sizeof(fz_predict)); + state->chain = chain; + + state->predictor = 1; + state->columns = 1; + state->colors = 1; + state->bpc = 8; + + obj = fz_dict_gets(params, "Predictor"); + if (obj) + state->predictor = fz_to_int(obj); + + if (state->predictor != 1 && state->predictor != 2 && + state->predictor != 10 && state->predictor != 11 && + state->predictor != 12 && state->predictor != 13 && + state->predictor != 14 && state->predictor != 15) + { + fz_warn("invalid predictor: %d", state->predictor); + state->predictor = 1; + } + + obj = fz_dict_gets(params, "Columns"); + if (obj) + state->columns = fz_to_int(obj); + + obj = fz_dict_gets(params, "Colors"); + if (obj) + state->colors = fz_to_int(obj); + + obj = fz_dict_gets(params, "BitsPerComponent"); + if (obj) + state->bpc = fz_to_int(obj); + + state->stride = (state->bpc * state->colors * state->columns + 7) / 8; + state->bpp = (state->bpc * state->colors + 7) / 8; + + state->in = fz_malloc(state->stride + 1); + state->out = fz_malloc(state->stride); + state->ref = fz_malloc(state->stride); + state->rp = state->out; + state->wp = state->out; + + memset(state->ref, 0, state->stride); + + return fz_new_stream(state, read_predict, close_predict); +} diff --git a/contrib/media/updf/fitz/fitz.h b/contrib/media/updf/fitz/fitz.h new file mode 100644 index 0000000000..dff6b8d4cd --- /dev/null +++ b/contrib/media/updf/fitz/fitz.h @@ -0,0 +1,1120 @@ +#ifndef _FITZ_H_ +#define _FITZ_H_ + +/* + * Include the standard libc headers. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include /* INT_MAX & co */ +#include /* FLT_EPSILON */ +#include /* O_RDONLY & co */ + +#define nelem(x) (sizeof(x)/sizeof((x)[0])) + +#define ABS(x) ( (x) < 0 ? -(x) : (x) ) +#define MIN(a,b) ( (a) < (b) ? (a) : (b) ) +#define MAX(a,b) ( (a) > (b) ? (a) : (b) ) +#define CLAMP(x,a,b) ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) ) + +/* + * Some differences in libc can be smoothed over + */ + +#ifdef _MSC_VER /* Microsoft Visual C */ + +#pragma warning( disable: 4244 ) /* conversion from X to Y, possible loss of data */ +#pragma warning( disable: 4996 ) /* The POSIX name for this item is deprecated */ +#pragma warning( disable: 4996 ) /* This function or variable may be unsafe */ + +#include + +int gettimeofday(struct timeval *tv, struct timezone *tz); + +#define snprintf _snprintf +#define strtoll _strtoi64 + +#else /* Unix or close enough */ + +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#ifndef M_SQRT2 +#define M_SQRT2 1.41421356237309504880 +#endif + +/* + * Variadic macros, inline and restrict keywords + */ + +#if __STDC_VERSION__ == 199901L /* C99 */ + +#define fz_throw(...) fz_throw_imp(__FILE__, __LINE__, __func__, __VA_ARGS__) +#define fz_rethrow(cause, ...) fz_rethrow_imp(__FILE__, __LINE__, __func__, cause, __VA_ARGS__) +#define fz_catch(cause, ...) fz_catch_imp(__FILE__, __LINE__, __func__, cause, __VA_ARGS__) + +#elif _MSC_VER >= 1500 /* MSVC 9 or newer */ + +#define inline __inline +#define restrict __restrict +#define fz_throw(...) fz_throw_imp(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define fz_rethrow(cause, ...) fz_rethrow_imp(__FILE__, __LINE__, __FUNCTION__, cause, __VA_ARGS__) +#define fz_catch(cause, ...) fz_catch_imp(__FILE__, __LINE__, __FUNCTION__, cause, __VA_ARGS__) + +#elif __GNUC__ >= 3 /* GCC 3 or newer */ + +#define inline __inline +#define restrict __restrict +#define fz_throw(fmt...) fz_throw_imp(__FILE__, __LINE__, __FUNCTION__, fmt) +#define fz_rethrow(cause, fmt...) fz_rethrow_imp(__FILE__, __LINE__, __FUNCTION__, cause, fmt) +#define fz_catch(cause, fmt...) fz_catch_imp(__FILE__, __LINE__, __FUNCTION__, cause, fmt) + +#else /* Unknown or ancient */ + +#define inline +#define restrict +#define fz_throw fz_throw_impx +#define fz_rethrow fz_rethrow_impx +#define fz_catch fz_catch_impx + +#endif + +/* + * GCC can do type checking of printf strings + */ + +#ifndef __printflike +#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +#define __printflike(fmtarg, firstvararg) \ + __attribute__((__format__ (__printf__, fmtarg, firstvararg))) +#else +#define __printflike(fmtarg, firstvararg) +#endif +#endif + +/* + * Error handling + */ + +typedef int fz_error; + +#define fz_okay ((fz_error)0) + +void fz_warn(char *fmt, ...) __printflike(1, 2); +void fz_flush_warnings(void); + +fz_error fz_throw_imp(const char *file, int line, const char *func, char *fmt, ...) __printflike(4, 5); +fz_error fz_rethrow_imp(const char *file, int line, const char *func, fz_error cause, char *fmt, ...) __printflike(5, 6); +void fz_catch_imp(const char *file, int line, const char *func, fz_error cause, char *fmt, ...) __printflike(5, 6); + +fz_error fz_throw_impx(char *fmt, ...) __printflike(1, 2); +fz_error fz_rethrow_impx(fz_error cause, char *fmt, ...) __printflike(2, 3); +void fz_catch_impx(fz_error cause, char *fmt, ...) __printflike(2, 3); + +/* extract the last error stack trace */ +int fz_get_error_count(void); +char *fz_get_error_line(int n); + +/* + * Basic runtime and utility functions + */ + +/* memory allocation */ +void *fz_malloc(int size); +void *fz_calloc(int count, int size); +void *fz_realloc(void *p, int count, int size); +void fz_free(void *p); +char *fz_strdup(char *s); + +/* runtime (hah!) test for endian-ness */ +int fz_is_big_endian(void); + +/* safe string functions */ +char *fz_strsep(char **stringp, const char *delim); +int fz_strlcpy(char *dst, const char *src, int n); +int fz_strlcat(char *dst, const char *src, int n); + +/* Range checking atof */ +float fz_atof(const char *s); + +/* utf-8 encoding and decoding */ +int chartorune(int *rune, char *str); +int runetochar(char *str, int *rune); +int runelen(int c); + +/* getopt */ +extern int fz_getopt(int nargc, char * const *nargv, const char *ostr); +extern int fz_optind; +extern char *fz_optarg; + +/* + * Generic hash-table with fixed-length keys. + */ + +typedef struct fz_hash_table_s fz_hash_table; + +fz_hash_table *fz_new_hash_table(int initialsize, int keylen); +void fz_debug_hash(fz_hash_table *table); +void fz_empty_hash(fz_hash_table *table); +void fz_free_hash(fz_hash_table *table); + +void *fz_hash_find(fz_hash_table *table, void *key); +void fz_hash_insert(fz_hash_table *table, void *key, void *val); +void fz_hash_remove(fz_hash_table *table, void *key); + +int fz_hash_len(fz_hash_table *table); +void *fz_hash_get_key(fz_hash_table *table, int idx); +void *fz_hash_get_val(fz_hash_table *table, int idx); + +/* + * Math and geometry + */ + +/* Multiply scaled two integers in the 0..255 range */ +static inline int fz_mul255(int a, int b) +{ + /* see Jim Blinn's book "Dirty Pixels" for how this works */ + int x = a * b + 128; + x += x >> 8; + return x >> 8; +} + +/* Expand a value A from the 0...255 range to the 0..256 range */ +#define FZ_EXPAND(A) ((A)+((A)>>7)) + +/* Combine values A (in any range) and B (in the 0..256 range), + * to give a single value in the same range as A was. */ +#define FZ_COMBINE(A,B) (((A)*(B))>>8) + +/* Combine values A and C (in the same (any) range) and B and D (in the + * 0..256 range), to give a single value in the same range as A and C were. */ +#define FZ_COMBINE2(A,B,C,D) (FZ_COMBINE((A), (B)) + FZ_COMBINE((C), (D))) + +/* Blend SRC and DST (in the same range) together according to + * AMOUNT (in the 0...256 range). */ +#define FZ_BLEND(SRC, DST, AMOUNT) ((((SRC)-(DST))*(AMOUNT) + ((DST)<<8))>>8) + +typedef struct fz_matrix_s fz_matrix; +typedef struct fz_point_s fz_point; +typedef struct fz_rect_s fz_rect; +typedef struct fz_bbox_s fz_bbox; + +extern const fz_rect fz_unit_rect; +extern const fz_rect fz_empty_rect; +extern const fz_rect fz_infinite_rect; + +extern const fz_bbox fz_unit_bbox; +extern const fz_bbox fz_empty_bbox; +extern const fz_bbox fz_infinite_bbox; + +#define fz_is_empty_rect(r) ((r).x0 == (r).x1) +#define fz_is_infinite_rect(r) ((r).x0 > (r).x1) +#define fz_is_empty_bbox(b) ((b).x0 == (b).x1) +#define fz_is_infinite_bbox(b) ((b).x0 > (b).x1) + +struct fz_matrix_s +{ + float a, b, c, d, e, f; +}; + +struct fz_point_s +{ + float x, y; +}; + +struct fz_rect_s +{ + float x0, y0; + float x1, y1; +}; + +struct fz_bbox_s +{ + int x0, y0; + int x1, y1; +}; + +extern const fz_matrix fz_identity; + +fz_matrix fz_concat(fz_matrix one, fz_matrix two); +fz_matrix fz_scale(float sx, float sy); +fz_matrix fz_shear(float sx, float sy); +fz_matrix fz_rotate(float theta); +fz_matrix fz_translate(float tx, float ty); +fz_matrix fz_invert_matrix(fz_matrix m); +int fz_is_rectilinear(fz_matrix m); +float fz_matrix_expansion(fz_matrix m); + +fz_bbox fz_round_rect(fz_rect r); +fz_bbox fz_intersect_bbox(fz_bbox a, fz_bbox b); +fz_rect fz_intersect_rect(fz_rect a, fz_rect b); +fz_bbox fz_union_bbox(fz_bbox a, fz_bbox b); +fz_rect fz_union_rect(fz_rect a, fz_rect b); + +fz_point fz_transform_point(fz_matrix m, fz_point p); +fz_point fz_transform_vector(fz_matrix m, fz_point p); +fz_rect fz_transform_rect(fz_matrix m, fz_rect r); +fz_bbox fz_transform_bbox(fz_matrix m, fz_bbox b); + +/* + * Basic crypto functions. + * Independent of the rest of fitz. + * For further encapsulation in filters, or not. + */ + +/* md5 digests */ + +typedef struct fz_md5_s fz_md5; + +struct fz_md5_s +{ + unsigned int state[4]; + unsigned int count[2]; + unsigned char buffer[64]; +}; + +void fz_md5_init(fz_md5 *state); +void fz_md5_update(fz_md5 *state, const unsigned char *input, unsigned inlen); +void fz_md5_final(fz_md5 *state, unsigned char digest[16]); + +/* sha-256 digests */ + +typedef struct fz_sha256_s fz_sha256; + +struct fz_sha256_s +{ + unsigned int state[8]; + unsigned int count[2]; + union { + unsigned char u8[64]; + unsigned int u32[16]; + } buffer; +}; + +void fz_sha256_init(fz_sha256 *state); +void fz_sha256_update(fz_sha256 *state, const unsigned char *input, unsigned int inlen); +void fz_sha256_final(fz_sha256 *state, unsigned char digest[32]); + +/* arc4 crypto */ + +typedef struct fz_arc4_s fz_arc4; + +struct fz_arc4_s +{ + unsigned x; + unsigned y; + unsigned char state[256]; +}; + +void fz_arc4_init(fz_arc4 *state, const unsigned char *key, unsigned len); +void fz_arc4_encrypt(fz_arc4 *state, unsigned char *dest, const unsigned char *src, unsigned len); + +/* AES block cipher implementation from XYSSL */ + +typedef struct fz_aes_s fz_aes; + +#define AES_DECRYPT 0 +#define AES_ENCRYPT 1 + +struct fz_aes_s +{ + int nr; /* number of rounds */ + unsigned long *rk; /* AES round keys */ + unsigned long buf[68]; /* unaligned data */ +}; + +void aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize ); +void aes_setkey_dec( fz_aes *ctx, const unsigned char *key, int keysize ); +void aes_crypt_cbc( fz_aes *ctx, int mode, int length, + unsigned char iv[16], + const unsigned char *input, + unsigned char *output ); + +/* + * Dynamic objects. + * The same type of objects as found in PDF and PostScript. + * Used by the filters and the mupdf parser. + */ + +typedef struct fz_obj_s fz_obj; + +extern fz_obj* (*fz_resolve_indirect)(fz_obj*); + +fz_obj *fz_new_null(void); +fz_obj *fz_new_bool(int b); +fz_obj *fz_new_int(int i); +fz_obj *fz_new_real(float f); +fz_obj *fz_new_name(char *str); +fz_obj *fz_new_string(char *str, int len); +fz_obj *fz_new_indirect(int num, int gen, void *xref); + +fz_obj *fz_new_array(int initialcap); +fz_obj *fz_new_dict(int initialcap); +fz_obj *fz_copy_array(fz_obj *array); +fz_obj *fz_copy_dict(fz_obj *dict); + +fz_obj *fz_keep_obj(fz_obj *obj); +void fz_drop_obj(fz_obj *obj); + +/* type queries */ +int fz_is_null(fz_obj *obj); +int fz_is_bool(fz_obj *obj); +int fz_is_int(fz_obj *obj); +int fz_is_real(fz_obj *obj); +int fz_is_name(fz_obj *obj); +int fz_is_string(fz_obj *obj); +int fz_is_array(fz_obj *obj); +int fz_is_dict(fz_obj *obj); +int fz_is_indirect(fz_obj *obj); + +int fz_objcmp(fz_obj *a, fz_obj *b); + +/* safe, silent failure, no error reporting */ +int fz_to_bool(fz_obj *obj); +int fz_to_int(fz_obj *obj); +float fz_to_real(fz_obj *obj); +char *fz_to_name(fz_obj *obj); +char *fz_to_str_buf(fz_obj *obj); +int fz_to_str_len(fz_obj *obj); +int fz_to_num(fz_obj *obj); +int fz_to_gen(fz_obj *obj); + +int fz_array_len(fz_obj *array); +fz_obj *fz_array_get(fz_obj *array, int i); +void fz_array_put(fz_obj *array, int i, fz_obj *obj); +void fz_array_push(fz_obj *array, fz_obj *obj); +void fz_array_insert(fz_obj *array, fz_obj *obj); + +int fz_dict_len(fz_obj *dict); +fz_obj *fz_dict_get_key(fz_obj *dict, int idx); +fz_obj *fz_dict_get_val(fz_obj *dict, int idx); +fz_obj *fz_dict_get(fz_obj *dict, fz_obj *key); +fz_obj *fz_dict_gets(fz_obj *dict, char *key); +fz_obj *fz_dict_getsa(fz_obj *dict, char *key, char *abbrev); +void fz_dict_put(fz_obj *dict, fz_obj *key, fz_obj *val); +void fz_dict_puts(fz_obj *dict, char *key, fz_obj *val); +void fz_dict_del(fz_obj *dict, fz_obj *key); +void fz_dict_dels(fz_obj *dict, char *key); +void fz_sort_dict(fz_obj *dict); + +int fz_fprint_obj(FILE *fp, fz_obj *obj, int tight); +void fz_debug_obj(fz_obj *obj); +void fz_debug_ref(fz_obj *obj); + +void fz_set_str_len(fz_obj *obj, int newlen); /* private */ +void *fz_get_indirect_xref(fz_obj *obj); /* private */ + +/* + * Data buffers. + */ + +typedef struct fz_buffer_s fz_buffer; + +struct fz_buffer_s +{ + int refs; + unsigned char *data; + int cap, len; +}; + +fz_buffer *fz_new_buffer(int size); +fz_buffer *fz_keep_buffer(fz_buffer *buf); +void fz_drop_buffer(fz_buffer *buf); + +void fz_resize_buffer(fz_buffer *buf, int size); +void fz_grow_buffer(fz_buffer *buf); + +/* + * Buffered reader. + * Only the data between rp and wp is valid data. + */ + +typedef struct fz_stream_s fz_stream; + +struct fz_stream_s +{ + int refs; + int error; + int eof; + int pos; + int avail; + int bits; + unsigned char *bp, *rp, *wp, *ep; + void *state; + int (*read)(fz_stream *stm, unsigned char *buf, int len); + void (*close)(fz_stream *stm); + void (*seek)(fz_stream *stm, int offset, int whence); + unsigned char buf[4096]; +}; + +fz_stream *fz_open_fd(int file); +fz_stream *fz_open_file(const char *filename); +fz_stream *fz_open_file_w(const wchar_t *filename); /* only on win32 */ +fz_stream *fz_open_buffer(fz_buffer *buf); +fz_stream *fz_open_memory(unsigned char *data, int len); +void fz_close(fz_stream *stm); + +fz_stream *fz_new_stream(void*, int(*)(fz_stream*, unsigned char*, int), void(*)(fz_stream *)); +fz_stream *fz_keep_stream(fz_stream *stm); +void fz_fill_buffer(fz_stream *stm); + +int fz_tell(fz_stream *stm); +void fz_seek(fz_stream *stm, int offset, int whence); + +int fz_read(fz_stream *stm, unsigned char *buf, int len); +void fz_read_line(fz_stream *stm, char *buf, int max); +fz_error fz_read_all(fz_buffer **bufp, fz_stream *stm, int initial); + +static inline int fz_read_byte(fz_stream *stm) +{ + if (stm->rp == stm->wp) + { + fz_fill_buffer(stm); + return stm->rp < stm->wp ? *stm->rp++ : EOF; + } + return *stm->rp++; +} + +static inline int fz_peek_byte(fz_stream *stm) +{ + if (stm->rp == stm->wp) + { + fz_fill_buffer(stm); + return stm->rp < stm->wp ? *stm->rp : EOF; + } + return *stm->rp; +} + +static inline void fz_unread_byte(fz_stream *stm) +{ + if (stm->rp > stm->bp) + stm->rp--; +} + +static inline int fz_is_eof(fz_stream *stm) +{ + if (stm->rp == stm->wp) + { + if (stm->eof) + return 1; + return fz_peek_byte(stm) == EOF; + } + return 0; +} + +static inline unsigned int fz_read_bits(fz_stream *stm, int n) +{ + unsigned int x; + + if (n <= stm->avail) + { + stm->avail -= n; + x = (stm->bits >> stm->avail) & ((1 << n) - 1); + } + else + { + x = stm->bits & ((1 << stm->avail) - 1); + n -= stm->avail; + stm->avail = 0; + + while (n > 8) + { + x = (x << 8) | fz_read_byte(stm); + n -= 8; + } + + if (n > 0) + { + stm->bits = fz_read_byte(stm); + stm->avail = 8 - n; + x = (x << n) | (stm->bits >> stm->avail); + } + } + + return x; +} + +static inline void fz_sync_bits(fz_stream *stm) +{ + stm->avail = 0; +} + +static inline int fz_is_eof_bits(fz_stream *stm) +{ + return fz_is_eof(stm) && (stm->avail == 0 || stm->bits == EOF); +} + +/* + * Data filters. + */ + +fz_stream *fz_open_copy(fz_stream *chain); +fz_stream *fz_open_null(fz_stream *chain, int len); +fz_stream *fz_open_arc4(fz_stream *chain, unsigned char *key, unsigned keylen); +fz_stream *fz_open_aesd(fz_stream *chain, unsigned char *key, unsigned keylen); +fz_stream *fz_open_a85d(fz_stream *chain); +fz_stream *fz_open_ahxd(fz_stream *chain); +fz_stream *fz_open_rld(fz_stream *chain); +fz_stream *fz_open_dctd(fz_stream *chain, fz_obj *param); +fz_stream *fz_open_faxd(fz_stream *chain, fz_obj *param); +fz_stream *fz_open_flated(fz_stream *chain); +fz_stream *fz_open_lzwd(fz_stream *chain, fz_obj *param); +fz_stream *fz_open_predict(fz_stream *chain, fz_obj *param); +fz_stream *fz_open_jbig2d(fz_stream *chain, fz_buffer *global); + +/* + * Resources and other graphics related objects. + */ + +enum { FZ_MAX_COLORS = 32 }; + +int fz_find_blendmode(char *name); +char *fz_blendmode_name(int blendmode); + +/* + * Pixmaps have n components per pixel. the last is always alpha. + * premultiplied alpha when rendering, but non-premultiplied for colorspace + * conversions and rescaling. + */ + +typedef struct fz_pixmap_s fz_pixmap; +typedef struct fz_colorspace_s fz_colorspace; + +struct fz_pixmap_s +{ + int refs; + int x, y, w, h, n; + fz_pixmap *mask; /* explicit soft/image mask */ + int interpolate; + int xres, yres; + fz_colorspace *colorspace; + unsigned char *samples; + int free_samples; +}; + +/* will return NULL if soft limit is exceeded */ +fz_pixmap *fz_new_pixmap_with_limit(fz_colorspace *colorspace, int w, int h); + +fz_pixmap *fz_new_pixmap_with_data(fz_colorspace *colorspace, int w, int h, unsigned char *samples); +fz_pixmap *fz_new_pixmap_with_rect(fz_colorspace *, fz_bbox bbox); +fz_pixmap *fz_new_pixmap_with_rect_and_data(fz_colorspace *, fz_bbox bbox, unsigned char *samples); +fz_pixmap *fz_new_pixmap(fz_colorspace *, int w, int h); +fz_pixmap *fz_keep_pixmap(fz_pixmap *pix); +void fz_drop_pixmap(fz_pixmap *pix); +void fz_clear_pixmap(fz_pixmap *pix); +void fz_clear_pixmap_with_color(fz_pixmap *pix, int value); +void fz_clear_pixmap_rect_with_color(fz_pixmap *pix, int value, fz_bbox r); +void fz_copy_pixmap_rect(fz_pixmap *dest, fz_pixmap *src, fz_bbox r); +void fz_premultiply_pixmap(fz_pixmap *pix); +fz_pixmap *fz_alpha_from_gray(fz_pixmap *gray, int luminosity); +fz_bbox fz_bound_pixmap(fz_pixmap *pix); +void fz_invert_pixmap(fz_pixmap *pix); +void fz_gamma_pixmap(fz_pixmap *pix, float gamma); + +fz_pixmap *fz_scale_pixmap(fz_pixmap *src, float x, float y, float w, float h); +fz_pixmap *fz_scale_pixmap_gridfit(fz_pixmap *src, float x, float y, float w, float h, int gridfit); + +fz_error fz_write_pnm(fz_pixmap *pixmap, char *filename); +fz_error fz_write_pam(fz_pixmap *pixmap, char *filename, int savealpha); +fz_error fz_write_png(fz_pixmap *pixmap, char *filename, int savealpha); + +fz_error fz_load_jpx_image(fz_pixmap **imgp, unsigned char *data, int size, fz_colorspace *dcs); + +/* + * Bitmaps have 1 component per bit. Only used for creating halftoned versions + * of contone buffers, and saving out. Samples are stored msb first, akin to + * pbms. + */ + +typedef struct fz_bitmap_s fz_bitmap; + +struct fz_bitmap_s +{ + int refs; + int w, h, stride, n; + unsigned char *samples; +}; + +fz_bitmap *fz_new_bitmap(int w, int h, int n); +fz_bitmap *fz_keep_bitmap(fz_bitmap *bit); +void fz_clear_bitmap(fz_bitmap *bit); +void fz_drop_bitmap(fz_bitmap *bit); + +fz_error fz_write_pbm(fz_bitmap *bitmap, char *filename); + +/* + * A halftone is a set of threshold tiles, one per component. Each threshold + * tile is a pixmap, possibly of varying sizes and phases. + */ + +typedef struct fz_halftone_s fz_halftone; + +struct fz_halftone_s +{ + int refs; + int n; + fz_pixmap *comp[1]; +}; + +fz_halftone *fz_new_halftone(int num_comps); +fz_halftone *fz_get_default_halftone(int num_comps); +fz_halftone *fz_keep_halftone(fz_halftone *half); +void fz_drop_halftone(fz_halftone *half); + +fz_bitmap *fz_halftone_pixmap(fz_pixmap *pix, fz_halftone *ht); + +/* + * Colorspace resources. + */ + +extern fz_colorspace *fz_device_gray; +extern fz_colorspace *fz_device_rgb; +extern fz_colorspace *fz_device_bgr; +extern fz_colorspace *fz_device_cmyk; + +struct fz_colorspace_s +{ + int refs; + char name[16]; + int n; + void (*to_rgb)(fz_colorspace *, float *src, float *rgb); + void (*from_rgb)(fz_colorspace *, float *rgb, float *dst); + void (*free_data)(fz_colorspace *); + void *data; +}; + +fz_colorspace *fz_new_colorspace(char *name, int n); +fz_colorspace *fz_keep_colorspace(fz_colorspace *colorspace); +void fz_drop_colorspace(fz_colorspace *colorspace); + +void fz_convert_color(fz_colorspace *srcs, float *srcv, fz_colorspace *dsts, float *dstv); +void fz_convert_pixmap(fz_pixmap *src, fz_pixmap *dst); + +fz_colorspace *fz_find_device_colorspace(char *name); + +/* + * Fonts come in two variants: + * Regular fonts are handled by FreeType. + * Type 3 fonts have callbacks to the interpreter. + */ + +struct fz_device_s; + +typedef struct fz_font_s fz_font; +char *ft_error_string(int err); + +struct fz_font_s +{ + int refs; + char name[32]; + + void *ft_face; /* has an FT_Face if used */ + int ft_substitute; /* ... substitute metrics */ + int ft_bold; /* ... synthesize bold */ + int ft_italic; /* ... synthesize italic */ + int ft_hint; /* ... force hinting for DynaLab fonts */ + + /* origin of font data */ + char *ft_file; + unsigned char *ft_data; + int ft_size; + + fz_matrix t3matrix; + fz_obj *t3resources; + fz_buffer **t3procs; /* has 256 entries if used */ + float *t3widths; /* has 256 entries if used */ + void *t3xref; /* a pdf_xref for the callback */ + fz_error (*t3run)(void *xref, fz_obj *resources, fz_buffer *contents, + struct fz_device_s *dev, fz_matrix ctm); + + fz_rect bbox; + + /* substitute metrics */ + int width_count; + int *width_table; +}; + +fz_font *fz_new_type3_font(char *name, fz_matrix matrix); + +fz_error fz_new_font_from_memory(fz_font **fontp, unsigned char *data, int len, int index); +fz_error fz_new_font_from_file(fz_font **fontp, char *path, int index); + +fz_font *fz_keep_font(fz_font *font); +void fz_drop_font(fz_font *font); + +void fz_debug_font(fz_font *font); +void fz_set_font_bbox(fz_font *font, float xmin, float ymin, float xmax, float ymax); + +/* + * Vector path buffer. + * It can be stroked and dashed, or be filled. + * It has a fill rule (nonzero or even_odd). + * + * When rendering, they are flattened, stroked and dashed straight + * into the Global Edge List. + */ + +typedef struct fz_path_s fz_path; +typedef struct fz_stroke_state_s fz_stroke_state; + +typedef union fz_path_item_s fz_path_item; + +typedef enum fz_path_item_kind_e +{ + FZ_MOVETO, + FZ_LINETO, + FZ_CURVETO, + FZ_CLOSE_PATH +} fz_path_item_kind; + +union fz_path_item_s +{ + fz_path_item_kind k; + float v; +}; + +struct fz_path_s +{ + int len, cap; + fz_path_item *items; +}; + +struct fz_stroke_state_s +{ + int start_cap, dash_cap, end_cap; + int linejoin; + float linewidth; + float miterlimit; + float dash_phase; + int dash_len; + float dash_list[32]; +}; + +fz_path *fz_new_path(void); +void fz_moveto(fz_path*, float x, float y); +void fz_lineto(fz_path*, float x, float y); +void fz_curveto(fz_path*, float, float, float, float, float, float); +void fz_curvetov(fz_path*, float, float, float, float); +void fz_curvetoy(fz_path*, float, float, float, float); +void fz_closepath(fz_path*); +void fz_free_path(fz_path *path); + +void fz_transform_path(fz_path *path, fz_matrix transform); + +fz_path *fz_clone_path(fz_path *old); + +fz_rect fz_bound_path(fz_path *path, fz_stroke_state *stroke, fz_matrix ctm); +void fz_debug_path(fz_path *, int indent); + +/* + * Text buffer. + * + * The trm field contains the a, b, c and d coefficients. + * The e and f coefficients come from the individual elements, + * together they form the transform matrix for the glyph. + * + * Glyphs are referenced by glyph ID. + * The Unicode text equivalent is kept in a separate array + * with indexes into the glyph array. + */ + +typedef struct fz_text_s fz_text; +typedef struct fz_text_item_s fz_text_item; + +struct fz_text_item_s +{ + float x, y; + int gid; /* -1 for one gid to many ucs mappings */ + int ucs; /* -1 for one ucs to many gid mappings */ +}; + +struct fz_text_s +{ + fz_font *font; + fz_matrix trm; + int wmode; + int len, cap; + fz_text_item *items; +}; + +fz_text *fz_new_text(fz_font *face, fz_matrix trm, int wmode); +void fz_add_text(fz_text *text, int gid, int ucs, float x, float y); +void fz_free_text(fz_text *text); +void fz_debug_text(fz_text*, int indent); +fz_rect fz_bound_text(fz_text *text, fz_matrix ctm); +fz_text *fz_clone_text(fz_text *old); + +/* + * The shading code uses gouraud shaded triangle meshes. + */ + +enum +{ + FZ_LINEAR, + FZ_RADIAL, + FZ_MESH, +}; + +typedef struct fz_shade_s fz_shade; + +struct fz_shade_s +{ + int refs; + + fz_rect bbox; /* can be fz_infinite_rect */ + fz_colorspace *colorspace; + + fz_matrix matrix; /* matrix from pattern dict */ + int use_background; /* background color for fills but not 'sh' */ + float background[FZ_MAX_COLORS]; + + int use_function; + float function[256][FZ_MAX_COLORS + 1]; + + int type; /* linear, radial, mesh */ + int extend[2]; + + int mesh_len; + int mesh_cap; + float *mesh; /* [x y 0], [x y r], [x y t] or [x y c1 ... cn] */ +}; + +fz_shade *fz_keep_shade(fz_shade *shade); +void fz_drop_shade(fz_shade *shade); +void fz_debug_shade(fz_shade *shade); + +fz_rect fz_bound_shade(fz_shade *shade, fz_matrix ctm); +void fz_paint_shade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox); + +/* + * Glyph cache + */ + +typedef struct fz_glyph_cache_s fz_glyph_cache; + +fz_glyph_cache *fz_new_glyph_cache(void); +fz_pixmap *fz_render_ft_glyph(fz_font *font, int cid, fz_matrix trm); +fz_pixmap *fz_render_t3_glyph(fz_font *font, int cid, fz_matrix trm, fz_colorspace *model); +fz_pixmap *fz_render_ft_stroked_glyph(fz_font *font, int gid, fz_matrix trm, fz_matrix ctm, fz_stroke_state *state); +fz_pixmap *fz_render_glyph(fz_glyph_cache*, fz_font*, int, fz_matrix, fz_colorspace *model); +fz_pixmap *fz_render_stroked_glyph(fz_glyph_cache*, fz_font*, int, fz_matrix, fz_matrix, fz_stroke_state *stroke); +void fz_free_glyph_cache(fz_glyph_cache *); + +/* + * Scan converter + */ + +int fz_get_aa_level(void); +void fz_set_aa_level(int bits); + +typedef struct fz_gel_s fz_gel; + +fz_gel *fz_new_gel(void); +void fz_insert_gel(fz_gel *gel, float x0, float y0, float x1, float y1); +void fz_reset_gel(fz_gel *gel, fz_bbox clip); +void fz_sort_gel(fz_gel *gel); +fz_bbox fz_bound_gel(fz_gel *gel); +void fz_free_gel(fz_gel *gel); +int fz_is_rect_gel(fz_gel *gel); + +void fz_scan_convert(fz_gel *gel, int eofill, fz_bbox clip, fz_pixmap *pix, unsigned char *colorbv); + +void fz_flatten_fill_path(fz_gel *gel, fz_path *path, fz_matrix ctm, float flatness); +void fz_flatten_stroke_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, float flatness, float linewidth); +void fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, float flatness, float linewidth); + +/* + * The device interface. + */ + +enum +{ + /* Hints */ + FZ_IGNORE_IMAGE = 1, + FZ_IGNORE_SHADE = 2, + + /* Flags */ + FZ_CHARPROC_MASK = 1, + FZ_CHARPROC_COLOR = 2, +}; + +typedef struct fz_device_s fz_device; + +struct fz_device_s +{ + int hints; + int flags; + + void *user; + void (*free_user)(void *); + + void (*fill_path)(void *, fz_path *, int even_odd, fz_matrix, fz_colorspace *, float *color, float alpha); + void (*stroke_path)(void *, fz_path *, fz_stroke_state *, fz_matrix, fz_colorspace *, float *color, float alpha); + void (*clip_path)(void *, fz_path *, fz_rect *rect, int even_odd, fz_matrix); + void (*clip_stroke_path)(void *, fz_path *, fz_rect *rect, fz_stroke_state *, fz_matrix); + + void (*fill_text)(void *, fz_text *, fz_matrix, fz_colorspace *, float *color, float alpha); + void (*stroke_text)(void *, fz_text *, fz_stroke_state *, fz_matrix, fz_colorspace *, float *color, float alpha); + void (*clip_text)(void *, fz_text *, fz_matrix, int accumulate); + void (*clip_stroke_text)(void *, fz_text *, fz_stroke_state *, fz_matrix); + void (*ignore_text)(void *, fz_text *, fz_matrix); + + void (*fill_shade)(void *, fz_shade *shd, fz_matrix ctm, float alpha); + void (*fill_image)(void *, fz_pixmap *img, fz_matrix ctm, float alpha); + void (*fill_image_mask)(void *, fz_pixmap *img, fz_matrix ctm, fz_colorspace *, float *color, float alpha); + void (*clip_image_mask)(void *, fz_pixmap *img, fz_rect *rect, fz_matrix ctm); + + void (*pop_clip)(void *); + + void (*begin_mask)(void *, fz_rect, int luminosity, fz_colorspace *, float *bc); + void (*end_mask)(void *); + void (*begin_group)(void *, fz_rect, int isolated, int knockout, int blendmode, float alpha); + void (*end_group)(void *); + + void (*begin_tile)(void *, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm); + void (*end_tile)(void *); +}; + +void fz_fill_path(fz_device *dev, fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha); +void fz_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha); +void fz_clip_path(fz_device *dev, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm); +void fz_clip_stroke_path(fz_device *dev, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm); +void fz_fill_text(fz_device *dev, fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha); +void fz_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha); +void fz_clip_text(fz_device *dev, fz_text *text, fz_matrix ctm, int accumulate); +void fz_clip_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm); +void fz_ignore_text(fz_device *dev, fz_text *text, fz_matrix ctm); +void fz_pop_clip(fz_device *dev); +void fz_fill_shade(fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha); +void fz_fill_image(fz_device *dev, fz_pixmap *image, fz_matrix ctm, float alpha); +void fz_fill_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha); +void fz_clip_image_mask(fz_device *dev, fz_pixmap *image, fz_rect *rect, fz_matrix ctm); +void fz_begin_mask(fz_device *dev, fz_rect area, int luminosity, fz_colorspace *colorspace, float *bc); +void fz_end_mask(fz_device *dev); +void fz_begin_group(fz_device *dev, fz_rect area, int isolated, int knockout, int blendmode, float alpha); +void fz_end_group(fz_device *dev); +void fz_begin_tile(fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm); +void fz_end_tile(fz_device *dev); + +fz_device *fz_new_device(void *user); +void fz_free_device(fz_device *dev); + +fz_device *fz_new_trace_device(void); +fz_device *fz_new_bbox_device(fz_bbox *bboxp); +fz_device *fz_new_draw_device(fz_glyph_cache *cache, fz_pixmap *dest); +fz_device *fz_new_draw_device_type3(fz_glyph_cache *cache, fz_pixmap *dest); + +/* + * Text extraction device + */ + +typedef struct fz_text_span_s fz_text_span; +typedef struct fz_text_char_s fz_text_char; + +struct fz_text_char_s +{ + int c; + fz_bbox bbox; +}; + +struct fz_text_span_s +{ + fz_font *font; + float size; + int wmode; + int len, cap; + fz_text_char *text; + fz_text_span *next; + int eol; +}; + +fz_text_span *fz_new_text_span(void); +void fz_free_text_span(fz_text_span *line); +void fz_debug_text_span(fz_text_span *line); +void fz_debug_text_span_xml(fz_text_span *span); + +fz_device *fz_new_text_device(fz_text_span *text); + +/* + * Display list device -- record and play back device commands. + */ + +typedef struct fz_display_list_s fz_display_list; + +fz_display_list *fz_new_display_list(void); +void fz_free_display_list(fz_display_list *list); +fz_device *fz_new_list_device(fz_display_list *list); +void fz_execute_display_list(fz_display_list *list, fz_device *dev, fz_matrix ctm, fz_bbox area); + +/* + * Plotting functions. + */ + +void fz_accelerate(void); +void fz_accelerate_arch(void); + +void fz_decode_tile(fz_pixmap *pix, float *decode); +void fz_decode_indexed_tile(fz_pixmap *pix, float *decode, int maxval); +void fz_unpack_tile(fz_pixmap *dst, unsigned char * restrict src, int n, int depth, int stride, int scale); + +void fz_paint_solid_alpha(unsigned char * restrict dp, int w, int alpha); +void fz_paint_solid_color(unsigned char * restrict dp, int n, int w, unsigned char *color); + +void fz_paint_span(unsigned char * restrict dp, unsigned char * restrict sp, int n, int w, int alpha); +void fz_paint_span_with_color(unsigned char * restrict dp, unsigned char * restrict mp, int n, int w, unsigned char *color); + +void fz_paint_image(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap *img, fz_matrix ctm, int alpha); +void fz_paint_image_with_color(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap *img, fz_matrix ctm, unsigned char *colorbv); + +void fz_paint_pixmap(fz_pixmap *dst, fz_pixmap *src, int alpha); +void fz_paint_pixmap_with_mask(fz_pixmap *dst, fz_pixmap *src, fz_pixmap *msk); +void fz_paint_pixmap_with_rect(fz_pixmap *dst, fz_pixmap *src, int alpha, fz_bbox bbox); + +void fz_blend_pixmap(fz_pixmap *dst, fz_pixmap *src, int alpha, int blendmode, int isolated, fz_pixmap *shape); + +enum +{ + /* PDF 1.4 -- standard separable */ + FZ_BLEND_NORMAL, + FZ_BLEND_MULTIPLY, + FZ_BLEND_SCREEN, + FZ_BLEND_OVERLAY, + FZ_BLEND_DARKEN, + FZ_BLEND_LIGHTEN, + FZ_BLEND_COLOR_DODGE, + FZ_BLEND_COLOR_BURN, + FZ_BLEND_HARD_LIGHT, + FZ_BLEND_SOFT_LIGHT, + FZ_BLEND_DIFFERENCE, + FZ_BLEND_EXCLUSION, + + /* PDF 1.4 -- standard non-separable */ + FZ_BLEND_HUE, + FZ_BLEND_SATURATION, + FZ_BLEND_COLOR, + FZ_BLEND_LUMINOSITY, + + /* For packing purposes */ + FZ_BLEND_MODEMASK = 15, + FZ_BLEND_ISOLATED = 16, + FZ_BLEND_KNOCKOUT = 32 +}; + +#endif diff --git a/contrib/media/updf/fitz/lrintf.c b/contrib/media/updf/fitz/lrintf.c new file mode 100644 index 0000000000..be089dc8db --- /dev/null +++ b/contrib/media/updf/fitz/lrintf.c @@ -0,0 +1,5 @@ +#include + +long long int lrintf(float x) { + return floor(x); +} diff --git a/contrib/media/updf/fitz/obj_print.c b/contrib/media/updf/fitz/obj_print.c new file mode 100644 index 0000000000..30b34d95e2 --- /dev/null +++ b/contrib/media/updf/fitz/obj_print.c @@ -0,0 +1,335 @@ +#include "fitz.h" + +struct fmt +{ + char *buf; + int cap; + int len; + int indent; + int tight; + int col; + int sep; + int last; +}; + +static void fmt_obj(struct fmt *fmt, fz_obj *obj); + +static inline int iswhite(int ch) +{ + return + ch == '\000' || + ch == '\011' || + ch == '\012' || + ch == '\014' || + ch == '\015' || + ch == '\040'; +} + +static inline int isdelim(int ch) +{ + return ch == '(' || ch == ')' || + ch == '<' || ch == '>' || + ch == '[' || ch == ']' || + ch == '{' || ch == '}' || + ch == '/' || + ch == '%'; +} + +static inline void fmt_putc(struct fmt *fmt, int c) +{ + if (fmt->sep && !isdelim(fmt->last) && !isdelim(c)) { + fmt->sep = 0; + fmt_putc(fmt, ' '); + } + fmt->sep = 0; + + if (fmt->buf && fmt->len < fmt->cap) + fmt->buf[fmt->len] = c; + + if (c == '\n') + fmt->col = 0; + else + fmt->col ++; + + fmt->len ++; + + fmt->last = c; +} + +static inline void fmt_indent(struct fmt *fmt) +{ + int i = fmt->indent; + while (i--) { + fmt_putc(fmt, ' '); + fmt_putc(fmt, ' '); + } +} + +static inline void fmt_puts(struct fmt *fmt, char *s) +{ + while (*s) + fmt_putc(fmt, *s++); +} + +static inline void fmt_sep(struct fmt *fmt) +{ + fmt->sep = 1; +} + +static void fmt_str(struct fmt *fmt, fz_obj *obj) +{ + char *s = fz_to_str_buf(obj); + int n = fz_to_str_len(obj); + int i, c; + + fmt_putc(fmt, '('); + for (i = 0; i < n; i++) + { + c = (unsigned char)s[i]; + if (c == '\n') + fmt_puts(fmt, "\\n"); + else if (c == '\r') + fmt_puts(fmt, "\\r"); + else if (c == '\t') + fmt_puts(fmt, "\\t"); + else if (c == '\b') + fmt_puts(fmt, "\\b"); + else if (c == '\f') + fmt_puts(fmt, "\\f"); + else if (c == '(') + fmt_puts(fmt, "\\("); + else if (c == ')') + fmt_puts(fmt, "\\)"); + else if (c < 32 || c >= 127) { + char buf[16]; + fmt_putc(fmt, '\\'); + sprintf(buf, "%03o", c); + fmt_puts(fmt, buf); + } + else + fmt_putc(fmt, c); + } + fmt_putc(fmt, ')'); +} + +static void fmt_hex(struct fmt *fmt, fz_obj *obj) +{ + char *s = fz_to_str_buf(obj); + int n = fz_to_str_len(obj); + int i, b, c; + + fmt_putc(fmt, '<'); + for (i = 0; i < n; i++) { + b = (unsigned char) s[i]; + c = (b >> 4) & 0x0f; + fmt_putc(fmt, c < 0xA ? c + '0' : c + 'A' - 0xA); + c = (b) & 0x0f; + fmt_putc(fmt, c < 0xA ? c + '0' : c + 'A' - 0xA); + } + fmt_putc(fmt, '>'); +} + +static void fmt_name(struct fmt *fmt, fz_obj *obj) +{ + unsigned char *s = (unsigned char *) fz_to_name(obj); + int i, c; + + fmt_putc(fmt, '/'); + + for (i = 0; s[i]; i++) + { + if (isdelim(s[i]) || iswhite(s[i]) || + s[i] == '#' || s[i] < 32 || s[i] >= 127) + { + fmt_putc(fmt, '#'); + c = (s[i] >> 4) & 0xf; + fmt_putc(fmt, c < 0xA ? c + '0' : c + 'A' - 0xA); + c = s[i] & 0xf; + fmt_putc(fmt, c < 0xA ? c + '0' : c + 'A' - 0xA); + } + else + { + fmt_putc(fmt, s[i]); + } + } +} + +static void fmt_array(struct fmt *fmt, fz_obj *obj) +{ + int i; + + if (fmt->tight) { + fmt_putc(fmt, '['); + for (i = 0; i < fz_array_len(obj); i++) { + fmt_obj(fmt, fz_array_get(obj, i)); + fmt_sep(fmt); + } + fmt_putc(fmt, ']'); + } + else { + fmt_puts(fmt, "[ "); + for (i = 0; i < fz_array_len(obj); i++) { + if (fmt->col > 60) { + fmt_putc(fmt, '\n'); + fmt_indent(fmt); + } + fmt_obj(fmt, fz_array_get(obj, i)); + fmt_putc(fmt, ' '); + } + fmt_putc(fmt, ']'); + fmt_sep(fmt); + } +} + +static void fmt_dict(struct fmt *fmt, fz_obj *obj) +{ + int i; + fz_obj *key, *val; + + if (fmt->tight) { + fmt_puts(fmt, "<<"); + for (i = 0; i < fz_dict_len(obj); i++) { + fmt_obj(fmt, fz_dict_get_key(obj, i)); + fmt_sep(fmt); + fmt_obj(fmt, fz_dict_get_val(obj, i)); + fmt_sep(fmt); + } + fmt_puts(fmt, ">>"); + } + else { + fmt_puts(fmt, "<<\n"); + fmt->indent ++; + for (i = 0; i < fz_dict_len(obj); i++) { + key = fz_dict_get_key(obj, i); + val = fz_dict_get_val(obj, i); + fmt_indent(fmt); + fmt_obj(fmt, key); + fmt_putc(fmt, ' '); + if (!fz_is_indirect(val) && fz_is_array(val)) + fmt->indent ++; + fmt_obj(fmt, val); + fmt_putc(fmt, '\n'); + if (!fz_is_indirect(val) && fz_is_array(val)) + fmt->indent --; + } + fmt->indent --; + fmt_indent(fmt); + fmt_puts(fmt, ">>"); + } +} + +static void fmt_obj(struct fmt *fmt, fz_obj *obj) +{ + char buf[256]; + + if (!obj) + fmt_puts(fmt, ""); + else if (fz_is_indirect(obj)) + { + sprintf(buf, "%d %d R", fz_to_num(obj), fz_to_gen(obj)); + fmt_puts(fmt, buf); + } + else if (fz_is_null(obj)) + fmt_puts(fmt, "null"); + else if (fz_is_bool(obj)) + fmt_puts(fmt, fz_to_bool(obj) ? "true" : "false"); + else if (fz_is_int(obj)) + { + sprintf(buf, "%d", fz_to_int(obj)); + fmt_puts(fmt, buf); + } + else if (fz_is_real(obj)) + { + sprintf(buf, "%g", fz_to_real(obj)); + if (strchr(buf, 'e')) /* bad news! */ + sprintf(buf, fabsf(fz_to_real(obj)) > 1 ? "%1.1f" : "%1.8f", fz_to_real(obj)); + fmt_puts(fmt, buf); + } + else if (fz_is_string(obj)) + { + char *str = fz_to_str_buf(obj); + int len = fz_to_str_len(obj); + int added = 0; + int i, c; + for (i = 0; i < len; i++) { + c = (unsigned char)str[i]; + if (strchr("()\\\n\r\t\b\f", c)) + added ++; + else if (c < 32 || c >= 127) + added += 3; + } + if (added < len) + fmt_str(fmt, obj); + else + fmt_hex(fmt, obj); + } + else if (fz_is_name(obj)) + fmt_name(fmt, obj); + else if (fz_is_array(obj)) + fmt_array(fmt, obj); + else if (fz_is_dict(obj)) + fmt_dict(fmt, obj); + else + fmt_puts(fmt, ""); +} + +static int +fz_sprint_obj(char *s, int n, fz_obj *obj, int tight) +{ + struct fmt fmt; + + fmt.indent = 0; + fmt.col = 0; + fmt.sep = 0; + fmt.last = 0; + + fmt.tight = tight; + fmt.buf = s; + fmt.cap = n; + fmt.len = 0; + fmt_obj(&fmt, obj); + + if (fmt.buf && fmt.len < fmt.cap) + fmt.buf[fmt.len] = '\0'; + + return fmt.len; +} + +int +fz_fprint_obj(FILE *fp, fz_obj *obj, int tight) +{ + char buf[1024]; + char *ptr; + int n; + + n = fz_sprint_obj(NULL, 0, obj, tight); + if ((n + 1) < sizeof buf) + { + fz_sprint_obj(buf, sizeof buf, obj, tight); + fputs(buf, fp); + fputc('\n', fp); + } + else + { + ptr = fz_malloc(n + 1); + fz_sprint_obj(ptr, n + 1, obj, tight); + fputs(ptr, fp); + fputc('\n', fp); + fz_free(ptr); + } + return n; +} + +void +fz_debug_obj(fz_obj *obj) +{ + fz_fprint_obj(stdout, obj, 0); +} + +void +fz_debug_ref(fz_obj *ref) +{ + fz_obj *obj; + obj = fz_resolve_indirect(ref); + fz_debug_obj(obj); +} diff --git a/contrib/media/updf/fitz/res_bitmap.c b/contrib/media/updf/fitz/res_bitmap.c new file mode 100644 index 0000000000..0b852af248 --- /dev/null +++ b/contrib/media/updf/fitz/res_bitmap.c @@ -0,0 +1,76 @@ +#include "fitz.h" + +fz_bitmap * +fz_new_bitmap(int w, int h, int n) +{ + fz_bitmap *bit; + + bit = fz_malloc(sizeof(fz_bitmap)); + bit->refs = 1; + bit->w = w; + bit->h = h; + bit->n = n; + /* Span is 32 bit aligned. We may want to make this 64 bit if we + * use SSE2 etc. */ + bit->stride = ((n * w + 31) & ~31) >> 3; + + bit->samples = fz_calloc(h, bit->stride); + + return bit; +} + +fz_bitmap * +fz_keep_bitmap(fz_bitmap *pix) +{ + pix->refs++; + return pix; +} + +void +fz_drop_bitmap(fz_bitmap *bit) +{ + if (bit && --bit->refs == 0) + { + fz_free(bit->samples); + fz_free(bit); + } +} + +void +fz_clear_bitmap(fz_bitmap *bit) +{ + memset(bit->samples, 0, bit->stride * bit->h); +} + +/* + * Write bitmap to PBM file + */ + +fz_error +fz_write_pbm(fz_bitmap *bitmap, char *filename) +{ + FILE *fp; + unsigned char *p; + int h, bytestride; + + fp = fopen(filename, "wb"); + if (!fp) + return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); + + assert(bitmap->n == 1); + + fprintf(fp, "P4\n%d %d\n", bitmap->w, bitmap->h); + + p = bitmap->samples; + + h = bitmap->h; + bytestride = (bitmap->w + 7) >> 3; + while (h--) + { + fwrite(p, 1, bytestride, fp); + p += bitmap->stride; + } + + fclose(fp); + return fz_okay; +} diff --git a/contrib/media/updf/fitz/res_colorspace.c b/contrib/media/updf/fitz/res_colorspace.c new file mode 100644 index 0000000000..47df2b3444 --- /dev/null +++ b/contrib/media/updf/fitz/res_colorspace.c @@ -0,0 +1,685 @@ +#include "fitz.h" + +#define SLOWCMYK + +fz_colorspace * +fz_new_colorspace(char *name, int n) +{ + fz_colorspace *cs = fz_malloc(sizeof(fz_colorspace)); + cs->refs = 1; + fz_strlcpy(cs->name, name, sizeof cs->name); + cs->n = n; + cs->to_rgb = NULL; + cs->from_rgb = NULL; + cs->free_data = NULL; + cs->data = NULL; + return cs; +} + +fz_colorspace * +fz_keep_colorspace(fz_colorspace *cs) +{ + if (cs->refs < 0) + return cs; + cs->refs ++; + return cs; +} + +void +fz_drop_colorspace(fz_colorspace *cs) +{ + if (cs && cs->refs < 0) + return; + if (cs && --cs->refs == 0) + { + if (cs->free_data && cs->data) + cs->free_data(cs); + fz_free(cs); + } +} + +/* Device colorspace definitions */ + +static void gray_to_rgb(fz_colorspace *cs, float *gray, float *rgb) +{ + rgb[0] = gray[0]; + rgb[1] = gray[0]; + rgb[2] = gray[0]; +} + +static void rgb_to_gray(fz_colorspace *cs, float *rgb, float *gray) +{ + float r = rgb[0]; + float g = rgb[1]; + float b = rgb[2]; + gray[0] = r * 0.3f + g * 0.59f + b * 0.11f; +} + +static void rgb_to_rgb(fz_colorspace *cs, float *rgb, float *xyz) +{ + xyz[0] = rgb[0]; + xyz[1] = rgb[1]; + xyz[2] = rgb[2]; +} + +static void bgr_to_rgb(fz_colorspace *cs, float *bgr, float *rgb) +{ + rgb[0] = bgr[2]; + rgb[1] = bgr[1]; + rgb[2] = bgr[0]; +} + +static void rgb_to_bgr(fz_colorspace *cs, float *rgb, float *bgr) +{ + bgr[0] = rgb[2]; + bgr[1] = rgb[1]; + bgr[2] = rgb[0]; +} + +static void cmyk_to_rgb(fz_colorspace *cs, float *cmyk, float *rgb) +{ +#ifdef SLOWCMYK /* from poppler */ + float c = cmyk[0], m = cmyk[1], y = cmyk[2], k = cmyk[3]; + float c1 = 1 - c, m1 = 1 - m, y1 = 1 - y, k1 = 1 - k; + float r, g, b, x; + + /* this is a matrix multiplication, unrolled for performance */ + x = c1 * m1 * y1 * k1; /* 0 0 0 0 */ + r = g = b = x; + x = c1 * m1 * y1 * k; /* 0 0 0 1 */ + r += 0.1373 * x; + g += 0.1216 * x; + b += 0.1255 * x; + x = c1 * m1 * y * k1; /* 0 0 1 0 */ + r += x; + g += 0.9490 * x; + x = c1 * m1 * y * k; /* 0 0 1 1 */ + r += 0.1098 * x; + g += 0.1020 * x; + x = c1 * m * y1 * k1; /* 0 1 0 0 */ + r += 0.9255 * x; + b += 0.5490 * x; + x = c1 * m * y1 * k; /* 0 1 0 1 */ + r += 0.1412 * x; + x = c1 * m * y * k1; /* 0 1 1 0 */ + r += 0.9294 * x; + g += 0.1098 * x; + b += 0.1412 * x; + x = c1 * m * y * k; /* 0 1 1 1 */ + r += 0.1333 * x; + x = c * m1 * y1 * k1; /* 1 0 0 0 */ + g += 0.6784 * x; + b += 0.9373 * x; + x = c * m1 * y1 * k; /* 1 0 0 1 */ + g += 0.0588 * x; + b += 0.1412 * x; + x = c * m1 * y * k1; /* 1 0 1 0 */ + g += 0.6510 * x; + b += 0.3137 * x; + x = c * m1 * y * k; /* 1 0 1 1 */ + g += 0.0745 * x; + x = c * m * y1 * k1; /* 1 1 0 0 */ + r += 0.1804 * x; + g += 0.1922 * x; + b += 0.5725 * x; + x = c * m * y1 * k; /* 1 1 0 1 */ + b += 0.0078 * x; + x = c * m * y * k1; /* 1 1 1 0 */ + r += 0.2118 * x; + g += 0.2119 * x; + b += 0.2235 * x; + + rgb[0] = CLAMP(r, 0, 1); + rgb[1] = CLAMP(g, 0, 1); + rgb[2] = CLAMP(b, 0, 1); +#else + rgb[0] = 1 - MIN(1, cmyk[0] + cmyk[3]); + rgb[1] = 1 - MIN(1, cmyk[1] + cmyk[3]); + rgb[2] = 1 - MIN(1, cmyk[2] + cmyk[3]); +#endif +} + +static void rgb_to_cmyk(fz_colorspace *cs, float *rgb, float *cmyk) +{ + float c, m, y, k; + c = 1 - rgb[0]; + m = 1 - rgb[1]; + y = 1 - rgb[2]; + k = MIN(c, MIN(m, y)); + cmyk[0] = c - k; + cmyk[1] = m - k; + cmyk[2] = y - k; + cmyk[3] = k; +} + +static fz_colorspace k_device_gray = { -1, "DeviceGray", 1, gray_to_rgb, rgb_to_gray }; +static fz_colorspace k_device_rgb = { -1, "DeviceRGB", 3, rgb_to_rgb, rgb_to_rgb }; +static fz_colorspace k_device_bgr = { -1, "DeviceRGB", 3, bgr_to_rgb, rgb_to_bgr }; +static fz_colorspace k_device_cmyk = { -1, "DeviceCMYK", 4, cmyk_to_rgb, rgb_to_cmyk }; + +fz_colorspace *fz_device_gray = &k_device_gray; +fz_colorspace *fz_device_rgb = &k_device_rgb; +fz_colorspace *fz_device_bgr = &k_device_bgr; +fz_colorspace *fz_device_cmyk = &k_device_cmyk; + +fz_colorspace * +fz_find_device_colorspace(char *name) +{ + if (!strcmp(name, "DeviceGray")) + return fz_device_gray; + if (!strcmp(name, "DeviceRGB")) + return fz_device_rgb; + if (!strcmp(name, "DeviceBGR")) + return fz_device_bgr; + if (!strcmp(name, "DeviceCMYK")) + return fz_device_cmyk; + fz_warn("unknown device colorspace: %s", name); + return NULL; +} + +/* Fast pixmap color conversions */ + +static void fast_gray_to_rgb(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + d[0] = s[0]; + d[1] = s[0]; + d[2] = s[0]; + d[3] = s[1]; + s += 2; + d += 4; + } +} + +static void fast_gray_to_cmyk(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + d[0] = 0; + d[1] = 0; + d[2] = 0; + d[3] = s[0]; + d[4] = s[1]; + s += 2; + d += 5; + } +} + +static void fast_rgb_to_gray(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + d[0] = ((s[0]+1) * 77 + (s[1]+1) * 150 + (s[2]+1) * 28) >> 8; + d[1] = s[3]; + s += 4; + d += 2; + } +} + +static void fast_bgr_to_gray(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + d[0] = ((s[0]+1) * 28 + (s[1]+1) * 150 + (s[2]+1) * 77) >> 8; + d[1] = s[3]; + s += 4; + d += 2; + } +} + +static void fast_rgb_to_cmyk(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + unsigned char c = 255 - s[0]; + unsigned char m = 255 - s[1]; + unsigned char y = 255 - s[2]; + unsigned char k = MIN(c, MIN(m, y)); + d[0] = c - k; + d[1] = m - k; + d[2] = y - k; + d[3] = k; + d[4] = s[3]; + s += 4; + d += 5; + } +} + +static void fast_bgr_to_cmyk(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + unsigned char c = 255 - s[2]; + unsigned char m = 255 - s[1]; + unsigned char y = 255 - s[0]; + unsigned char k = MIN(c, MIN(m, y)); + d[0] = c - k; + d[1] = m - k; + d[2] = y - k; + d[3] = k; + d[4] = s[3]; + s += 4; + d += 5; + } +} + +static void fast_cmyk_to_gray(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + unsigned char c = fz_mul255(s[0], 77); + unsigned char m = fz_mul255(s[1], 150); + unsigned char y = fz_mul255(s[2], 28); + d[0] = 255 - MIN(c + m + y + s[3], 255); + d[1] = s[4]; + s += 5; + d += 2; + } +} + +static void fast_cmyk_to_rgb(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { +#ifdef SLOWCMYK + float cmyk[4], rgb[3]; + cmyk[0] = s[0] / 255.0f; + cmyk[1] = s[1] / 255.0f; + cmyk[2] = s[2] / 255.0f; + cmyk[3] = s[3] / 255.0f; + cmyk_to_rgb(NULL, cmyk, rgb); + d[0] = rgb[0] * 255; + d[1] = rgb[1] * 255; + d[2] = rgb[2] * 255; +#else + d[0] = 255 - MIN(s[0] + s[3], 255); + d[1] = 255 - MIN(s[1] + s[3], 255); + d[2] = 255 - MIN(s[2] + s[3], 255); +#endif + d[3] = s[4]; + s += 5; + d += 4; + } +} + +static void fast_cmyk_to_bgr(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { +#ifdef SLOWCMYK + float cmyk[4], rgb[3]; + cmyk[0] = s[0] / 255.0f; + cmyk[1] = s[1] / 255.0f; + cmyk[2] = s[2] / 255.0f; + cmyk[3] = s[3] / 255.0f; + cmyk_to_rgb(NULL, cmyk, rgb); + d[0] = rgb[2] * 255; + d[1] = rgb[1] * 255; + d[2] = rgb[0] * 255; +#else + d[0] = 255 - MIN(s[2] + s[3], 255); + d[1] = 255 - MIN(s[1] + s[3], 255); + d[2] = 255 - MIN(s[0] + s[3], 255); +#endif + d[3] = s[4]; + s += 5; + d += 4; + } +} + +static void fast_rgb_to_bgr(fz_pixmap *src, fz_pixmap *dst) +{ + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + int n = src->w * src->h; + while (n--) + { + d[0] = s[2]; + d[1] = s[1]; + d[2] = s[0]; + d[3] = s[3]; + s += 4; + d += 4; + } +} + +static void +fz_std_conv_pixmap(fz_pixmap *src, fz_pixmap *dst) +{ + float srcv[FZ_MAX_COLORS]; + float dstv[FZ_MAX_COLORS]; + int srcn, dstn; + int y, x, k, i; + + fz_colorspace *ss = src->colorspace; + fz_colorspace *ds = dst->colorspace; + + unsigned char *s = src->samples; + unsigned char *d = dst->samples; + + assert(src->w == dst->w && src->h == dst->h); + assert(src->n == ss->n + 1); + assert(dst->n == ds->n + 1); + + srcn = ss->n; + dstn = ds->n; + + /* Special case for Lab colorspace (scaling of components to float) */ + if (!strcmp(ss->name, "Lab") && srcn == 3) + { + for (y = 0; y < src->h; y++) + { + for (x = 0; x < src->w; x++) + { + srcv[0] = *s++ / 255.0f * 100; + srcv[1] = *s++ - 128; + srcv[2] = *s++ - 128; + + fz_convert_color(ss, srcv, ds, dstv); + + for (k = 0; k < dstn; k++) + *d++ = dstv[k] * 255; + + *d++ = *s++; + } + } + } + + /* Brute-force for small images */ + else if (src->w * src->h < 256) + { + for (y = 0; y < src->h; y++) + { + for (x = 0; x < src->w; x++) + { + for (k = 0; k < srcn; k++) + srcv[k] = *s++ / 255.0f; + + fz_convert_color(ss, srcv, ds, dstv); + + for (k = 0; k < dstn; k++) + *d++ = dstv[k] * 255; + + *d++ = *s++; + } + } + } + + /* 1-d lookup table for separation and similar colorspaces */ + else if (srcn == 1) + { + unsigned char lookup[FZ_MAX_COLORS * 256]; + + for (i = 0; i < 256; i++) + { + srcv[0] = i / 255.0f; + fz_convert_color(ss, srcv, ds, dstv); + for (k = 0; k < dstn; k++) + lookup[i * dstn + k] = dstv[k] * 255; + } + + for (y = 0; y < src->h; y++) + { + for (x = 0; x < src->w; x++) + { + i = *s++; + for (k = 0; k < dstn; k++) + *d++ = lookup[i * dstn + k]; + *d++ = *s++; + } + } + } + + /* Memoize colors using a hash table for the general case */ + else + { + fz_hash_table *lookup; + unsigned char *color; + + lookup = fz_new_hash_table(509, srcn); + + for (y = 0; y < src->h; y++) + { + for (x = 0; x < src->w; x++) + { + color = fz_hash_find(lookup, s); + if (color) + { + memcpy(d, color, dstn); + s += srcn; + d += dstn; + *d++ = *s++; + } + else + { + for (k = 0; k < srcn; k++) + srcv[k] = *s++ / 255.0f; + fz_convert_color(ss, srcv, ds, dstv); + for (k = 0; k < dstn; k++) + *d++ = dstv[k] * 255; + + fz_hash_insert(lookup, s - srcn, d - dstn); + + *d++ = *s++; + } + } + } + + fz_free_hash(lookup); + } +} + +void +fz_convert_pixmap(fz_pixmap *sp, fz_pixmap *dp) +{ + fz_colorspace *ss = sp->colorspace; + fz_colorspace *ds = dp->colorspace; + + assert(ss && ds); + + if (sp->mask) + dp->mask = fz_keep_pixmap(sp->mask); + dp->interpolate = sp->interpolate; + + if (ss == fz_device_gray) + { + if (ds == fz_device_rgb) fast_gray_to_rgb(sp, dp); + else if (ds == fz_device_bgr) fast_gray_to_rgb(sp, dp); /* bgr == rgb here */ + else if (ds == fz_device_cmyk) fast_gray_to_cmyk(sp, dp); + else fz_std_conv_pixmap(sp, dp); + } + + else if (ss == fz_device_rgb) + { + if (ds == fz_device_gray) fast_rgb_to_gray(sp, dp); + else if (ds == fz_device_bgr) fast_rgb_to_bgr(sp, dp); + else if (ds == fz_device_cmyk) fast_rgb_to_cmyk(sp, dp); + else fz_std_conv_pixmap(sp, dp); + } + + else if (ss == fz_device_bgr) + { + if (ds == fz_device_gray) fast_bgr_to_gray(sp, dp); + else if (ds == fz_device_rgb) fast_rgb_to_bgr(sp, dp); /* bgr = rgb here */ + else if (ds == fz_device_cmyk) fast_bgr_to_cmyk(sp, dp); + else fz_std_conv_pixmap(sp, dp); + } + + else if (ss == fz_device_cmyk) + { + if (ds == fz_device_gray) fast_cmyk_to_gray(sp, dp); + else if (ds == fz_device_bgr) fast_cmyk_to_bgr(sp, dp); + else if (ds == fz_device_rgb) fast_cmyk_to_rgb(sp, dp); + else fz_std_conv_pixmap(sp, dp); + } + + else fz_std_conv_pixmap(sp, dp); +} + +/* Convert a single color */ + +static void +fz_std_conv_color(fz_colorspace *srcs, float *srcv, fz_colorspace *dsts, float *dstv) +{ + float rgb[3]; + int i; + + if (srcs != dsts) + { + assert(srcs->to_rgb && dsts->from_rgb); + srcs->to_rgb(srcs, srcv, rgb); + dsts->from_rgb(dsts, rgb, dstv); + for (i = 0; i < dsts->n; i++) + dstv[i] = CLAMP(dstv[i], 0, 1); + } + else + { + for (i = 0; i < srcs->n; i++) + dstv[i] = srcv[i]; + } +} + +void +fz_convert_color(fz_colorspace *ss, float *sv, fz_colorspace *ds, float *dv) +{ + if (ss == fz_device_gray) + { + if ((ds == fz_device_rgb) || (ds == fz_device_bgr)) + { + dv[0] = sv[0]; + dv[1] = sv[0]; + dv[2] = sv[0]; + } + else if (ds == fz_device_cmyk) + { + dv[0] = 0; + dv[1] = 0; + dv[2] = 0; + dv[3] = sv[0]; + } + else + fz_std_conv_color(ss, sv, ds, dv); + } + + else if (ss == fz_device_rgb) + { + if (ds == fz_device_gray) + { + dv[0] = sv[0] * 0.3f + sv[1] * 0.59f + sv[2] * 0.11f; + } + else if (ds == fz_device_bgr) + { + dv[0] = sv[2]; + dv[1] = sv[1]; + dv[2] = sv[0]; + } + else if (ds == fz_device_cmyk) + { + float c = 1 - sv[0]; + float m = 1 - sv[1]; + float y = 1 - sv[2]; + float k = MIN(c, MIN(m, y)); + dv[0] = c - k; + dv[1] = m - k; + dv[2] = y - k; + dv[3] = k; + } + else + fz_std_conv_color(ss, sv, ds, dv); + } + + else if (ss == fz_device_bgr) + { + if (ds == fz_device_gray) + { + dv[0] = sv[0] * 0.11f + sv[1] * 0.59f + sv[2] * 0.3f; + } + else if (ds == fz_device_bgr) + { + dv[0] = sv[2]; + dv[1] = sv[1]; + dv[2] = sv[0]; + } + else if (ds == fz_device_cmyk) + { + float c = 1 - sv[2]; + float m = 1 - sv[1]; + float y = 1 - sv[0]; + float k = MIN(c, MIN(m, y)); + dv[0] = c - k; + dv[1] = m - k; + dv[2] = y - k; + dv[3] = k; + } + else + fz_std_conv_color(ss, sv, ds, dv); + } + + else if (ss == fz_device_cmyk) + { + if (ds == fz_device_gray) + { + float c = sv[0] * 0.3f; + float m = sv[1] * 0.59f; + float y = sv[2] * 0.11f; + dv[0] = 1 - MIN(c + m + y + sv[3], 1); + } + else if (ds == fz_device_rgb) + { +#ifdef SLOWCMYK + cmyk_to_rgb(NULL, sv, dv); +#else + dv[0] = 1 - MIN(sv[0] + sv[3], 1); + dv[1] = 1 - MIN(sv[1] + sv[3], 1); + dv[2] = 1 - MIN(sv[2] + sv[3], 1); +#endif + } + else if (ds == fz_device_bgr) + { +#ifdef SLOWCMYK + float rgb[3]; + cmyk_to_rgb(NULL, sv, rgb); + dv[0] = rgb[2]; + dv[1] = rgb[1]; + dv[2] = rgb[0]; +#else + dv[0] = 1 - MIN(sv[2] + sv[3], 1); + dv[1] = 1 - MIN(sv[1] + sv[3], 1); + dv[2] = 1 - MIN(sv[0] + sv[3], 1); +#endif + } + else + fz_std_conv_color(ss, sv, ds, dv); + } + + else + fz_std_conv_color(ss, sv, ds, dv); +} diff --git a/contrib/media/updf/fitz/res_font.c b/contrib/media/updf/fitz/res_font.c new file mode 100644 index 0000000000..ffee1d46d3 --- /dev/null +++ b/contrib/media/updf/fitz/res_font.c @@ -0,0 +1,609 @@ +#include "fitz.h" + +#include +#include FT_FREETYPE_H +#include FT_STROKER_H + +static void fz_finalize_freetype(void); + +static fz_font * +fz_new_font(char *name) +{ + fz_font *font; + + font = fz_malloc(sizeof(fz_font)); + font->refs = 1; + + if (name) + fz_strlcpy(font->name, name, sizeof font->name); + else + fz_strlcpy(font->name, "(null)", sizeof font->name); + + font->ft_face = NULL; + font->ft_substitute = 0; + font->ft_bold = 0; + font->ft_italic = 0; + font->ft_hint = 0; + + font->ft_file = NULL; + font->ft_data = NULL; + font->ft_size = 0; + + font->t3matrix = fz_identity; + font->t3resources = NULL; + font->t3procs = NULL; + font->t3widths = NULL; + font->t3xref = NULL; + font->t3run = NULL; + + font->bbox.x0 = 0; + font->bbox.y0 = 0; + font->bbox.x1 = 1000; + font->bbox.y1 = 1000; + + font->width_count = 0; + font->width_table = NULL; + + return font; +} + +fz_font * +fz_keep_font(fz_font *font) +{ + font->refs ++; + return font; +} + +void +fz_drop_font(fz_font *font) +{ + int fterr; + int i; + + if (font && --font->refs == 0) + { + if (font->t3procs) + { + if (font->t3resources) + fz_drop_obj(font->t3resources); + for (i = 0; i < 256; i++) + if (font->t3procs[i]) + fz_drop_buffer(font->t3procs[i]); + fz_free(font->t3procs); + fz_free(font->t3widths); + } + + if (font->ft_face) + { + fterr = FT_Done_Face((FT_Face)font->ft_face); + if (fterr) + fz_warn("freetype finalizing face: %s", ft_error_string(fterr)); + fz_finalize_freetype(); + } + + if (font->ft_file) + fz_free(font->ft_file); + if (font->ft_data) + fz_free(font->ft_data); + + if (font->width_table) + fz_free(font->width_table); + + fz_free(font); + } +} + +void +fz_set_font_bbox(fz_font *font, float xmin, float ymin, float xmax, float ymax) +{ + font->bbox.x0 = xmin; + font->bbox.y0 = ymin; + font->bbox.x1 = xmax; + font->bbox.y1 = ymax; +} + +/* + * Freetype hooks + */ + +static FT_Library fz_ftlib = NULL; +static int fz_ftlib_refs = 0; + +#undef __FTERRORS_H__ +#define FT_ERRORDEF(e, v, s) { (e), (s) }, +#define FT_ERROR_START_LIST +#define FT_ERROR_END_LIST { 0, NULL } + +struct ft_error +{ + int err; + char *str; +}; + +static const struct ft_error ft_errors[] = +{ +#include FT_ERRORS_H +}; + +char *ft_error_string(int err) +{ + const struct ft_error *e; + + for (e = ft_errors; e->str != NULL; e++) + if (e->err == err) + return e->str; + + return "Unknown error"; +} + +static fz_error +fz_init_freetype(void) +{ + int fterr; + int maj, min, pat; + + if (fz_ftlib) + { + fz_ftlib_refs++; + return fz_okay; + } + + fterr = FT_Init_FreeType(&fz_ftlib); + if (fterr) + return fz_throw("cannot init freetype: %s", ft_error_string(fterr)); + + FT_Library_Version(fz_ftlib, &maj, &min, &pat); + if (maj == 2 && min == 1 && pat < 7) + { + fterr = FT_Done_FreeType(fz_ftlib); + if (fterr) + fz_warn("freetype finalizing: %s", ft_error_string(fterr)); + return fz_throw("freetype version too old: %d.%d.%d", maj, min, pat); + } + + fz_ftlib_refs++; + return fz_okay; +} + +static void +fz_finalize_freetype(void) +{ + int fterr; + + if (--fz_ftlib_refs == 0) + { + fterr = FT_Done_FreeType(fz_ftlib); + if (fterr) + fz_warn("freetype finalizing: %s", ft_error_string(fterr)); + fz_ftlib = NULL; + } +} + +fz_error +fz_new_font_from_file(fz_font **fontp, char *path, int index) +{ + FT_Face face; + fz_error error; + fz_font *font; + int fterr; + + error = fz_init_freetype(); + if (error) + return fz_rethrow(error, "cannot init freetype library"); + + fterr = FT_New_Face(fz_ftlib, path, index, &face); + if (fterr) + return fz_throw("freetype: cannot load font: %s", ft_error_string(fterr)); + + font = fz_new_font(face->family_name); + font->ft_face = face; + font->bbox.x0 = face->bbox.xMin * 1000 / face->units_per_EM; + font->bbox.y0 = face->bbox.yMin * 1000 / face->units_per_EM; + font->bbox.x1 = face->bbox.xMax * 1000 / face->units_per_EM; + font->bbox.y1 = face->bbox.yMax * 1000 / face->units_per_EM; + + *fontp = font; + return fz_okay; +} + +fz_error +fz_new_font_from_memory(fz_font **fontp, unsigned char *data, int len, int index) +{ + FT_Face face; + fz_error error; + fz_font *font; + int fterr; + + error = fz_init_freetype(); + if (error) + return fz_rethrow(error, "cannot init freetype library"); + + fterr = FT_New_Memory_Face(fz_ftlib, data, len, index, &face); + if (fterr) + return fz_throw("freetype: cannot load font: %s", ft_error_string(fterr)); + + font = fz_new_font(face->family_name); + font->ft_face = face; + font->bbox.x0 = face->bbox.xMin * 1000 / face->units_per_EM; + font->bbox.y0 = face->bbox.yMin * 1000 / face->units_per_EM; + font->bbox.x1 = face->bbox.xMax * 1000 / face->units_per_EM; + font->bbox.y1 = face->bbox.yMax * 1000 / face->units_per_EM; + + *fontp = font; + return fz_okay; +} + +static fz_matrix +fz_adjust_ft_glyph_width(fz_font *font, int gid, fz_matrix trm) +{ + /* Fudge the font matrix to stretch the glyph if we've substituted the font. */ + if (font->ft_substitute && gid < font->width_count) + { + FT_Error fterr; + int subw; + int realw; + float scale; + + /* TODO: use FT_Get_Advance */ + fterr = FT_Set_Char_Size(font->ft_face, 1000, 1000, 72, 72); + if (fterr) + fz_warn("freetype setting character size: %s", ft_error_string(fterr)); + + fterr = FT_Load_Glyph(font->ft_face, gid, + FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_TRANSFORM); + if (fterr) + fz_warn("freetype failed to load glyph: %s", ft_error_string(fterr)); + + realw = ((FT_Face)font->ft_face)->glyph->metrics.horiAdvance; + subw = font->width_table[gid]; + if (realw) + scale = (float) subw / realw; + else + scale = 1; + + return fz_concat(fz_scale(scale, 1), trm); + } + + return trm; +} + +static fz_pixmap * +fz_copy_ft_bitmap(int left, int top, FT_Bitmap *bitmap) +{ + fz_pixmap *pixmap; + int y; + + pixmap = fz_new_pixmap(NULL, bitmap->width, bitmap->rows); + pixmap->x = left; + pixmap->y = top - bitmap->rows; + + if (bitmap->pixel_mode == FT_PIXEL_MODE_MONO) + { + for (y = 0; y < pixmap->h; y++) + { + unsigned char *out = pixmap->samples + y * pixmap->w; + unsigned char *in = bitmap->buffer + (pixmap->h - y - 1) * bitmap->pitch; + unsigned char bit = 0x80; + int w = pixmap->w; + while (w--) + { + *out++ = (*in & bit) ? 255 : 0; + bit >>= 1; + if (bit == 0) + { + bit = 0x80; + in++; + } + } + } + } + else + { + for (y = 0; y < pixmap->h; y++) + { + memcpy(pixmap->samples + y * pixmap->w, + bitmap->buffer + (pixmap->h - y - 1) * bitmap->pitch, + pixmap->w); + } + } + + return pixmap; +} + +fz_pixmap * +fz_render_ft_glyph(fz_font *font, int gid, fz_matrix trm) +{ + FT_Face face = font->ft_face; + FT_Matrix m; + FT_Vector v; + FT_Error fterr; + + trm = fz_adjust_ft_glyph_width(font, gid, trm); + + if (font->ft_italic) + trm = fz_concat(fz_shear(0.3f, 0), trm); + + /* + Freetype mutilates complex glyphs if they are loaded + with FT_Set_Char_Size 1.0. it rounds the coordinates + before applying transformation. to get more precision in + freetype, we shift part of the scale in the matrix + into FT_Set_Char_Size instead + */ + + m.xx = trm.a * 64; /* should be 65536 */ + m.yx = trm.b * 64; + m.xy = trm.c * 64; + m.yy = trm.d * 64; + v.x = trm.e * 64; + v.y = trm.f * 64; + + fterr = FT_Set_Char_Size(face, 65536, 65536, 72, 72); /* should be 64, 64 */ + if (fterr) + fz_warn("freetype setting character size: %s", ft_error_string(fterr)); + FT_Set_Transform(face, &m, &v); + + if (fz_get_aa_level() == 0) + { + /* If you really want grid fitting, enable this code. */ + float scale = fz_matrix_expansion(trm); + m.xx = trm.a * 65536 / scale; + m.xy = trm.b * 65536 / scale; + m.yx = trm.c * 65536 / scale; + m.yy = trm.d * 65536 / scale; + v.x = 0; + v.y = 0; + + fterr = FT_Set_Char_Size(face, 64 * scale, 64 * scale, 72, 72); + if (fterr) + fz_warn("freetype setting character size: %s", ft_error_string(fterr)); + FT_Set_Transform(face, &m, &v); + fterr = FT_Load_Glyph(face, gid, FT_LOAD_NO_BITMAP | FT_LOAD_TARGET_MONO); + if (fterr) + fz_warn("freetype load glyph (gid %d): %s", gid, ft_error_string(fterr)); + } + else if (font->ft_hint) + { + /* + Enable hinting, but keep the huge char size so that + it is hinted for a character. This will in effect nullify + the effect of grid fitting. This form of hinting should + only be used for DynaLab and similar tricky TrueType fonts, + so that we get the correct outline shape. + */ + fterr = FT_Load_Glyph(face, gid, FT_LOAD_NO_BITMAP); + if (fterr) + fz_warn("freetype load glyph (gid %d): %s", gid, ft_error_string(fterr)); + } + else + { + fterr = FT_Load_Glyph(face, gid, FT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING); + if (fterr) + { + fz_warn("freetype load glyph (gid %d): %s", gid, ft_error_string(fterr)); + return NULL; + } + } + + if (font->ft_bold) + { + float strength = fz_matrix_expansion(trm) * 0.04f; + FT_Outline_Embolden(&face->glyph->outline, strength * 64); + FT_Outline_Translate(&face->glyph->outline, -strength * 32, -strength * 32); + } + + fterr = FT_Render_Glyph(face->glyph, fz_get_aa_level() > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO); + if (fterr) + { + fz_warn("freetype render glyph (gid %d): %s", gid, ft_error_string(fterr)); + return NULL; + } + + return fz_copy_ft_bitmap(face->glyph->bitmap_left, face->glyph->bitmap_top, &face->glyph->bitmap); +} + +fz_pixmap * +fz_render_ft_stroked_glyph(fz_font *font, int gid, fz_matrix trm, fz_matrix ctm, fz_stroke_state *state) +{ + FT_Face face = font->ft_face; + float expansion = fz_matrix_expansion(ctm); + int linewidth = state->linewidth * expansion * 64 / 2; + FT_Matrix m; + FT_Vector v; + FT_Error fterr; + FT_Stroker stroker; + FT_Glyph glyph; + FT_BitmapGlyph bitmap; + fz_pixmap *pixmap; + + trm = fz_adjust_ft_glyph_width(font, gid, trm); + + if (font->ft_italic) + trm = fz_concat(fz_shear(0.3f, 0), trm); + + m.xx = trm.a * 64; /* should be 65536 */ + m.yx = trm.b * 64; + m.xy = trm.c * 64; + m.yy = trm.d * 64; + v.x = trm.e * 64; + v.y = trm.f * 64; + + fterr = FT_Set_Char_Size(face, 65536, 65536, 72, 72); /* should be 64, 64 */ + if (fterr) + { + fz_warn("FT_Set_Char_Size: %s", ft_error_string(fterr)); + return NULL; + } + + FT_Set_Transform(face, &m, &v); + + fterr = FT_Load_Glyph(face, gid, FT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING); + if (fterr) + { + fz_warn("FT_Load_Glyph(gid %d): %s", gid, ft_error_string(fterr)); + return NULL; + } + + fterr = FT_Stroker_New(fz_ftlib, &stroker); + if (fterr) + { + fz_warn("FT_Stroker_New: %s", ft_error_string(fterr)); + return NULL; + } + + FT_Stroker_Set(stroker, linewidth, state->start_cap, state->linejoin, state->miterlimit * 65536); + + fterr = FT_Get_Glyph(face->glyph, &glyph); + if (fterr) + { + fz_warn("FT_Get_Glyph: %s", ft_error_string(fterr)); + FT_Stroker_Done(stroker); + return NULL; + } + + fterr = FT_Glyph_Stroke(&glyph, stroker, 1); + if (fterr) + { + fz_warn("FT_Glyph_Stroke: %s", ft_error_string(fterr)); + FT_Done_Glyph(glyph); + FT_Stroker_Done(stroker); + return NULL; + } + + FT_Stroker_Done(stroker); + + fterr = FT_Glyph_To_Bitmap(&glyph, fz_get_aa_level() > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, 0, 1); + if (fterr) + { + fz_warn("FT_Glyph_To_Bitmap: %s", ft_error_string(fterr)); + FT_Done_Glyph(glyph); + return NULL; + } + + bitmap = (FT_BitmapGlyph)glyph; + pixmap = fz_copy_ft_bitmap(bitmap->left, bitmap->top, &bitmap->bitmap); + FT_Done_Glyph(glyph); + + return pixmap; +} + +/* + * Type 3 fonts... + */ + +fz_font * +fz_new_type3_font(char *name, fz_matrix matrix) +{ + fz_font *font; + int i; + + font = fz_new_font(name); + font->t3procs = fz_calloc(256, sizeof(fz_buffer*)); + font->t3widths = fz_calloc(256, sizeof(float)); + + font->t3matrix = matrix; + for (i = 0; i < 256; i++) + { + font->t3procs[i] = NULL; + font->t3widths[i] = 0; + } + + return font; +} + +fz_pixmap * +fz_render_t3_glyph(fz_font *font, int gid, fz_matrix trm, fz_colorspace *model) +{ + fz_error error; + fz_matrix ctm; + fz_buffer *contents; + fz_bbox bbox; + fz_device *dev; + fz_glyph_cache *cache; + fz_pixmap *glyph; + fz_pixmap *result; + + if (gid < 0 || gid > 255) + return NULL; + + contents = font->t3procs[gid]; + if (!contents) + return NULL; + + ctm = fz_concat(font->t3matrix, trm); + dev = fz_new_bbox_device(&bbox); + error = font->t3run(font->t3xref, font->t3resources, contents, dev, ctm); + if (error) + fz_catch(error, "cannot draw type3 glyph"); + + if (dev->flags & FZ_CHARPROC_MASK) + { + if (dev->flags & FZ_CHARPROC_COLOR) + fz_warn("type3 glyph claims to be both masked and colored"); + model = NULL; + } + else if (dev->flags & FZ_CHARPROC_COLOR) + { + if (model == NULL) + fz_warn("colored type3 glyph wanted in masked context"); + } + else + { + fz_warn("type3 glyph doesn't specify masked or colored"); + model = NULL; /* Treat as masked */ + } + + fz_free_device(dev); + + bbox.x0--; + bbox.y0--; + bbox.x1++; + bbox.y1++; + + glyph = fz_new_pixmap_with_rect(model ? model : fz_device_gray, bbox); + fz_clear_pixmap(glyph); + + cache = fz_new_glyph_cache(); + dev = fz_new_draw_device_type3(cache, glyph); + error = font->t3run(font->t3xref, font->t3resources, contents, dev, ctm); + if (error) + fz_catch(error, "cannot draw type3 glyph"); + fz_free_device(dev); + fz_free_glyph_cache(cache); + + if (model == NULL) + { + result = fz_alpha_from_gray(glyph, 0); + fz_drop_pixmap(glyph); + } + else + result = glyph; + + return result; +} + +void +fz_debug_font(fz_font *font) +{ + printf("font '%s' {\n", font->name); + + if (font->ft_face) + { + printf("\tfreetype face %p\n", font->ft_face); + if (font->ft_substitute) + printf("\tsubstitute font\n"); + } + + if (font->t3procs) + { + printf("\ttype3 matrix [%g %g %g %g]\n", + font->t3matrix.a, font->t3matrix.b, + font->t3matrix.c, font->t3matrix.d); + } + + printf("\tbbox [%g %g %g %g]\n", + font->bbox.x0, font->bbox.y0, + font->bbox.x1, font->bbox.y1); + + printf("}\n"); +} diff --git a/contrib/media/updf/fitz/res_halftone.c b/contrib/media/updf/fitz/res_halftone.c new file mode 100644 index 0000000000..e45454ea77 --- /dev/null +++ b/contrib/media/updf/fitz/res_halftone.c @@ -0,0 +1,190 @@ +#include "fitz.h" + +fz_halftone * +fz_new_halftone(int comps) +{ + fz_halftone *ht; + int i; + + ht = fz_malloc(sizeof(fz_halftone) + (comps-1)*sizeof(fz_pixmap *)); + ht->refs = 1; + ht->n = comps; + for (i = 0; i < comps; i++) + ht->comp[i] = NULL; + + return ht; +} + +fz_halftone * +fz_keep_halftone(fz_halftone *ht) +{ + ht->refs++; + return ht; +} + +void +fz_drop_halftone(fz_halftone *ht) +{ + int i; + + if (!ht || --ht->refs != 0) + return; + for (i = 0; i < ht->n; i++) + fz_drop_pixmap(ht->comp[i]); + fz_free(ht); +} + +/* Default mono halftone, lifted from Ghostscript. */ +static unsigned char mono_ht[] = +{ + 0x0E, 0x8E, 0x2E, 0xAE, 0x06, 0x86, 0x26, 0xA6, 0x0C, 0x8C, 0x2C, 0xAC, 0x04, 0x84, 0x24, 0xA4, + 0xCE, 0x4E, 0xEE, 0x6E, 0xC6, 0x46, 0xE6, 0x66, 0xCC, 0x4C, 0xEC, 0x6C, 0xC4, 0x44, 0xE4, 0x64, + 0x3E, 0xBE, 0x1E, 0x9E, 0x36, 0xB6, 0x16, 0x96, 0x3C, 0xBC, 0x1C, 0x9C, 0x34, 0xB4, 0x14, 0x94, + 0xFE, 0x7E, 0xDE, 0x5E, 0xF6, 0x76, 0xD6, 0x56, 0xFC, 0x7C, 0xDC, 0x5C, 0xF4, 0x74, 0xD4, 0x54, + 0x01, 0x81, 0x21, 0xA1, 0x09, 0x89, 0x29, 0xA9, 0x03, 0x83, 0x23, 0xA3, 0x0B, 0x8B, 0x2B, 0xAB, + 0xC1, 0x41, 0xE1, 0x61, 0xC9, 0x49, 0xE9, 0x69, 0xC3, 0x43, 0xE3, 0x63, 0xCB, 0x4B, 0xEB, 0x6B, + 0x31, 0xB1, 0x11, 0x91, 0x39, 0xB9, 0x19, 0x99, 0x33, 0xB3, 0x13, 0x93, 0x3B, 0xBB, 0x1B, 0x9B, + 0xF1, 0x71, 0xD1, 0x51, 0xF9, 0x79, 0xD9, 0x59, 0xF3, 0x73, 0xD3, 0x53, 0xFB, 0x7B, 0xDB, 0x5B, + 0x0D, 0x8D, 0x2D, 0xAD, 0x05, 0x85, 0x25, 0xA5, 0x0F, 0x8F, 0x2F, 0xAF, 0x07, 0x87, 0x27, 0xA7, + 0xCD, 0x4D, 0xED, 0x6D, 0xC5, 0x45, 0xE5, 0x65, 0xCF, 0x4F, 0xEF, 0x6F, 0xC7, 0x47, 0xE7, 0x67, + 0x3D, 0xBD, 0x1D, 0x9D, 0x35, 0xB5, 0x15, 0x95, 0x3F, 0xBF, 0x1F, 0x9F, 0x37, 0xB7, 0x17, 0x97, + 0xFD, 0x7D, 0xDD, 0x5D, 0xF5, 0x75, 0xD5, 0x55, 0xFF, 0x7F, 0xDF, 0x5F, 0xF7, 0x77, 0xD7, 0x57, + 0x02, 0x82, 0x22, 0xA2, 0x0A, 0x8A, 0x2A, 0xAA, 0x00, 0x80, 0x20, 0xA0, 0x08, 0x88, 0x28, 0xA8, + 0xC2, 0x42, 0xE2, 0x62, 0xCA, 0x4A, 0xEA, 0x6A, 0xC0, 0x40, 0xE0, 0x60, 0xC8, 0x48, 0xE8, 0x68, + 0x32, 0xB2, 0x12, 0x92, 0x3A, 0xBA, 0x1A, 0x9A, 0x30, 0xB0, 0x10, 0x90, 0x38, 0xB8, 0x18, 0x98, + 0xF2, 0x72, 0xD2, 0x52, 0xFA, 0x7A, 0xDA, 0x5A, 0xF0, 0x70, 0xD0, 0x50, 0xF8, 0x78, 0xD8, 0x58 +}; + +fz_halftone *fz_get_default_halftone(int num_comps) +{ + fz_halftone *ht = fz_new_halftone(num_comps); + assert(num_comps == 1); /* Only support 1 component for now */ + ht->comp[0] = fz_new_pixmap_with_data(NULL, 16, 16, mono_ht); + return ht; +} + +/* Finally, code to actually perform halftoning. */ +static void make_ht_line(unsigned char *buf, fz_halftone *ht, int x, int y, int w) +{ + /* FIXME: There is a potential optimisation here; in the case where + * the LCM of the halftone tile widths is smaller than w, we could + * form just one 'LCM' run, then copy it repeatedly. + */ + int k, n; + n = ht->n; + for (k = 0; k < n; k++) + { + fz_pixmap *tile = ht->comp[k]; + unsigned char *b = buf++; + unsigned char *t; + unsigned char *tbase; + int px = x + tile->x; + int py = y + tile->y; + int tw = tile->w; + int th = tile->h; + int w2 = w; + int len; + px = px % tw; + if (px < 0) + px += tw; + py = py % th; + if (py < 0) + py += th; + + assert(tile->n == 1); + + /* Left hand section; from x to tile width */ + tbase = tile->samples + py * tw; + t = tbase + px; + len = tw - px; + if (len > w2) + len = w2; + w2 -= len; + while (len--) + { + *b = *t++; + b += n; + } + + /* Centre section - complete copies */ + w2 -= tw; + while (w2 >= 0) + { + len = tw; + t = tbase; + while (len--) + { + *b = *t++; + b += n; + } + w2 -= tw; + } + w2 += tw; + + /* Right hand section - stragglers */ + t = tbase; + while (w2--) + { + *b = *t++; + b += n; + } + } +} + +/* Inner mono thresholding code */ +static void do_threshold_1(unsigned char *ht_line, unsigned char *pixmap, unsigned char *out, int w) +{ + int bit = 0x80; + int h = 0; + + do + { + if (*pixmap < *ht_line++) + h |= bit; + pixmap += 2; /* Skip the alpha */ + bit >>= 1; + if (bit == 0) + { + *out++ = h; + h = 0; + bit = 0x80; + } + + } + while (--w); + if (bit != 0x80) + *out++ = h; +} + +fz_bitmap *fz_halftone_pixmap(fz_pixmap *pix, fz_halftone *ht) +{ + fz_bitmap *out; + unsigned char *ht_line, *o, *p; + int w, h, x, y, n, pstride, ostride; + + if (pix == NULL || ht == NULL) + return NULL; + + assert(pix->n == 2); /* Mono + Alpha */ + + n = pix->n-1; /* Remove alpha */ + ht_line = fz_malloc(pix->w * n); + out = fz_new_bitmap(pix->w, pix->h, n); + o = out->samples; + p = pix->samples; + + h = pix->h; + x = pix->x; + y = pix->y; + w = pix->w; + ostride = out->stride; + pstride = pix->w * pix->n; + while (h--) + { + make_ht_line(ht_line, ht, x, y++, w); + do_threshold_1(ht_line, p, o, w); + o += ostride; + p += pstride; + } + return out; +} diff --git a/contrib/media/updf/fitz/res_path.c b/contrib/media/updf/fitz/res_path.c new file mode 100644 index 0000000000..328e5ac100 --- /dev/null +++ b/contrib/media/updf/fitz/res_path.c @@ -0,0 +1,262 @@ +#include "fitz.h" + +fz_path * +fz_new_path(void) +{ + fz_path *path; + + path = fz_malloc(sizeof(fz_path)); + path->len = 0; + path->cap = 0; + path->items = NULL; + + return path; +} + +fz_path * +fz_clone_path(fz_path *old) +{ + fz_path *path; + + path = fz_malloc(sizeof(fz_path)); + path->len = old->len; + path->cap = old->len; + path->items = fz_calloc(path->cap, sizeof(fz_path_item)); + memcpy(path->items, old->items, sizeof(fz_path_item) * path->len); + + return path; +} + +void +fz_free_path(fz_path *path) +{ + fz_free(path->items); + fz_free(path); +} + +static void +grow_path(fz_path *path, int n) +{ + if (path->len + n < path->cap) + return; + while (path->len + n > path->cap) + path->cap = path->cap + 36; + path->items = fz_realloc(path->items, path->cap, sizeof(fz_path_item)); +} + +void +fz_moveto(fz_path *path, float x, float y) +{ + grow_path(path, 3); + path->items[path->len++].k = FZ_MOVETO; + path->items[path->len++].v = x; + path->items[path->len++].v = y; +} + +void +fz_lineto(fz_path *path, float x, float y) +{ + if (path->len == 0) + { + fz_warn("lineto with no current point"); + return; + } + grow_path(path, 3); + path->items[path->len++].k = FZ_LINETO; + path->items[path->len++].v = x; + path->items[path->len++].v = y; +} + +void +fz_curveto(fz_path *path, + float x1, float y1, + float x2, float y2, + float x3, float y3) +{ + if (path->len == 0) + { + fz_warn("curveto with no current point"); + return; + } + grow_path(path, 7); + path->items[path->len++].k = FZ_CURVETO; + path->items[path->len++].v = x1; + path->items[path->len++].v = y1; + path->items[path->len++].v = x2; + path->items[path->len++].v = y2; + path->items[path->len++].v = x3; + path->items[path->len++].v = y3; +} + +void +fz_curvetov(fz_path *path, float x2, float y2, float x3, float y3) +{ + float x1, y1; + if (path->len == 0) + { + fz_warn("curvetov with no current point"); + return; + } + x1 = path->items[path->len-2].v; + y1 = path->items[path->len-1].v; + fz_curveto(path, x1, y1, x2, y2, x3, y3); +} + +void +fz_curvetoy(fz_path *path, float x1, float y1, float x3, float y3) +{ + fz_curveto(path, x1, y1, x3, y3, x3, y3); +} + +void +fz_closepath(fz_path *path) +{ + if (path->len == 0) + { + fz_warn("closepath with no current point"); + return; + } + grow_path(path, 1); + path->items[path->len++].k = FZ_CLOSE_PATH; +} + +static inline fz_rect bound_expand(fz_rect r, fz_point p) +{ + if (p.x < r.x0) r.x0 = p.x; + if (p.y < r.y0) r.y0 = p.y; + if (p.x > r.x1) r.x1 = p.x; + if (p.y > r.y1) r.y1 = p.y; + return r; +} + +fz_rect +fz_bound_path(fz_path *path, fz_stroke_state *stroke, fz_matrix ctm) +{ + fz_point p; + fz_rect r = fz_empty_rect; + int i = 0; + + if (path->len) + { + p.x = path->items[1].v; + p.y = path->items[2].v; + p = fz_transform_point(ctm, p); + r.x0 = r.x1 = p.x; + r.y0 = r.y1 = p.y; + } + + while (i < path->len) + { + switch (path->items[i++].k) + { + case FZ_CURVETO: + p.x = path->items[i++].v; + p.y = path->items[i++].v; + r = bound_expand(r, fz_transform_point(ctm, p)); + p.x = path->items[i++].v; + p.y = path->items[i++].v; + r = bound_expand(r, fz_transform_point(ctm, p)); + p.x = path->items[i++].v; + p.y = path->items[i++].v; + r = bound_expand(r, fz_transform_point(ctm, p)); + break; + case FZ_MOVETO: + case FZ_LINETO: + p.x = path->items[i++].v; + p.y = path->items[i++].v; + r = bound_expand(r, fz_transform_point(ctm, p)); + break; + case FZ_CLOSE_PATH: + break; + } + } + + if (stroke) + { + float miterlength = stroke->miterlimit; + float linewidth = stroke->linewidth; + float expand = MAX(miterlength, linewidth) * 0.5f; + r.x0 -= expand; + r.y0 -= expand; + r.x1 += expand; + r.y1 += expand; + } + + return r; +} + +void +fz_transform_path(fz_path *path, fz_matrix ctm) +{ + fz_point p; + int k, i = 0; + + while (i < path->len) + { + switch (path->items[i++].k) + { + case FZ_CURVETO: + for (k = 0; k < 3; k++) + { + p.x = path->items[i].v; + p.y = path->items[i+1].v; + p = fz_transform_point(ctm, p); + path->items[i].v = p.x; + path->items[i+1].v = p.y; + i += 2; + } + break; + case FZ_MOVETO: + case FZ_LINETO: + p.x = path->items[i].v; + p.y = path->items[i+1].v; + p = fz_transform_point(ctm, p); + path->items[i].v = p.x; + path->items[i+1].v = p.y; + i += 2; + break; + case FZ_CLOSE_PATH: + break; + } + } +} + +void +fz_debug_path(fz_path *path, int indent) +{ + float x, y; + int i = 0; + int n; + while (i < path->len) + { + for (n = 0; n < indent; n++) + putchar(' '); + switch (path->items[i++].k) + { + case FZ_MOVETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("%g %g m\n", x, y); + break; + case FZ_LINETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("%g %g l\n", x, y); + break; + case FZ_CURVETO: + x = path->items[i++].v; + y = path->items[i++].v; + printf("%g %g ", x, y); + x = path->items[i++].v; + y = path->items[i++].v; + printf("%g %g ", x, y); + x = path->items[i++].v; + y = path->items[i++].v; + printf("%g %g c\n", x, y); + break; + case FZ_CLOSE_PATH: + printf("h\n"); + break; + } + } +} diff --git a/contrib/media/updf/fitz/res_pixmap.c b/contrib/media/updf/fitz/res_pixmap.c new file mode 100644 index 0000000000..83f46526ef --- /dev/null +++ b/contrib/media/updf/fitz/res_pixmap.c @@ -0,0 +1,519 @@ +#include "fitz.h" + +static int fz_memory_limit = 256 << 20; +static int fz_memory_used = 0; + +fz_pixmap * +fz_new_pixmap_with_data(fz_colorspace *colorspace, int w, int h, unsigned char *samples) +{ + fz_pixmap *pix; + + pix = fz_malloc(sizeof(fz_pixmap)); + pix->refs = 1; + pix->x = 0; + pix->y = 0; + pix->w = w; + pix->h = h; + pix->mask = NULL; + pix->interpolate = 1; + pix->xres = 96; + pix->yres = 96; + pix->colorspace = NULL; + pix->n = 1; + + if (colorspace) + { + pix->colorspace = fz_keep_colorspace(colorspace); + pix->n = 1 + colorspace->n; + } + + if (samples) + { + pix->samples = samples; + pix->free_samples = 0; + } + else + { + fz_memory_used += pix->w * pix->h * pix->n; + pix->samples = fz_calloc(pix->h, pix->w * pix->n); + pix->free_samples = 1; + } + + return pix; +} + +fz_pixmap * +fz_new_pixmap_with_limit(fz_colorspace *colorspace, int w, int h) +{ + int n = colorspace ? colorspace->n + 1 : 1; + int size = w * h * n; + if (fz_memory_used + size > fz_memory_limit) + { + fz_warn("pixmap memory exceeds soft limit %dM + %dM > %dM", + fz_memory_used/(1<<20), size/(1<<20), fz_memory_limit/(1<<20)); + return NULL; + } + return fz_new_pixmap_with_data(colorspace, w, h, NULL); +} + +fz_pixmap * +fz_new_pixmap(fz_colorspace *colorspace, int w, int h) +{ + return fz_new_pixmap_with_data(colorspace, w, h, NULL); +} + +fz_pixmap * +fz_new_pixmap_with_rect(fz_colorspace *colorspace, fz_bbox r) +{ + fz_pixmap *pixmap; + pixmap = fz_new_pixmap(colorspace, r.x1 - r.x0, r.y1 - r.y0); + pixmap->x = r.x0; + pixmap->y = r.y0; + return pixmap; +} + +fz_pixmap * +fz_new_pixmap_with_rect_and_data(fz_colorspace *colorspace, fz_bbox r, unsigned char *samples) +{ + fz_pixmap *pixmap; + pixmap = fz_new_pixmap_with_data(colorspace, r.x1 - r.x0, r.y1 - r.y0, samples); + pixmap->x = r.x0; + pixmap->y = r.y0; + return pixmap; +} + +fz_pixmap * +fz_keep_pixmap(fz_pixmap *pix) +{ + pix->refs++; + return pix; +} + +void +fz_drop_pixmap(fz_pixmap *pix) +{ + if (pix && --pix->refs == 0) + { + fz_memory_used -= pix->w * pix->h * pix->n; + if (pix->mask) + fz_drop_pixmap(pix->mask); + if (pix->colorspace) + fz_drop_colorspace(pix->colorspace); + if (pix->free_samples) + fz_free(pix->samples); + fz_free(pix); + } +} + +fz_bbox +fz_bound_pixmap(fz_pixmap *pix) +{ + fz_bbox bbox; + bbox.x0 = pix->x; + bbox.y0 = pix->y; + bbox.x1 = pix->x + pix->w; + bbox.y1 = pix->y + pix->h; + return bbox; +} + +void +fz_clear_pixmap(fz_pixmap *pix) +{ + memset(pix->samples, 0, pix->w * pix->h * pix->n); +} + +void +fz_clear_pixmap_with_color(fz_pixmap *pix, int value) +{ + if (value == 255) + memset(pix->samples, 255, pix->w * pix->h * pix->n); + else + { + int k, x, y; + unsigned char *s = pix->samples; + for (y = 0; y < pix->h; y++) + { + for (x = 0; x < pix->w; x++) + { + for (k = 0; k < pix->n - 1; k++) + *s++ = value; + *s++ = 255; + } + } + } +} + +void +fz_copy_pixmap_rect(fz_pixmap *dest, fz_pixmap *src, fz_bbox r) +{ + const unsigned char *srcp; + unsigned char *destp; + int y, w, destspan, srcspan; + + r = fz_intersect_bbox(r, fz_bound_pixmap(dest)); + r = fz_intersect_bbox(r, fz_bound_pixmap(src)); + w = r.x1 - r.x0; + y = r.y1 - r.y0; + if (w <= 0 || y <= 0) + return; + + w *= src->n; + srcspan = src->w * src->n; + srcp = src->samples + srcspan * (r.y0 - src->y) + src->n * (r.x0 - src->x); + destspan = dest->w * dest->n; + destp = dest->samples + destspan * (r.y0 - dest->y) + dest->n * (r.x0 - dest->x); + do + { + memcpy(destp, srcp, w); + srcp += srcspan; + destp += destspan; + } + while (--y); +} + +void +fz_clear_pixmap_rect_with_color(fz_pixmap *dest, int value, fz_bbox r) +{ + unsigned char *destp; + int x, y, w, k, destspan; + + r = fz_intersect_bbox(r, fz_bound_pixmap(dest)); + w = r.x1 - r.x0; + y = r.y1 - r.y0; + if (w <= 0 || y <= 0) + return; + + destspan = dest->w * dest->n; + destp = dest->samples + destspan * (r.y0 - dest->y) + dest->n * (r.x0 - dest->x); + if (value == 255) + do + { + memset(destp, 255, w * dest->n); + destp += destspan; + } + while (--y); + else + do + { + unsigned char *s = destp; + for (x = 0; x < w; x++) + { + for (k = 0; k < dest->n - 1; k++) + *s++ = value; + *s++ = 255; + } + destp += destspan; + } + while (--y); +} + +void +fz_premultiply_pixmap(fz_pixmap *pix) +{ + unsigned char *s = pix->samples; + unsigned char a; + int k, x, y; + + for (y = 0; y < pix->h; y++) + { + for (x = 0; x < pix->w; x++) + { + a = s[pix->n - 1]; + for (k = 0; k < pix->n - 1; k++) + s[k] = fz_mul255(s[k], a); + s += pix->n; + } + } +} + +fz_pixmap * +fz_alpha_from_gray(fz_pixmap *gray, int luminosity) +{ + fz_pixmap *alpha; + unsigned char *sp, *dp; + int len; + + assert(gray->n == 2); + + alpha = fz_new_pixmap_with_rect(NULL, fz_bound_pixmap(gray)); + dp = alpha->samples; + sp = gray->samples; + if (!luminosity) + sp ++; + + len = gray->w * gray->h; + while (len--) + { + *dp++ = sp[0]; + sp += 2; + } + + return alpha; +} + +void +fz_invert_pixmap(fz_pixmap *pix) +{ + unsigned char *s = pix->samples; + int k, x, y; + + for (y = 0; y < pix->h; y++) + { + for (x = 0; x < pix->w; x++) + { + for (k = 0; k < pix->n - 1; k++) + s[k] = 255 - s[k]; + s += pix->n; + } + } +} + +void +fz_gamma_pixmap(fz_pixmap *pix, float gamma) +{ + unsigned char gamma_map[256]; + unsigned char *s = pix->samples; + int k, x, y; + + for (k = 0; k < 256; k++) + gamma_map[k] = pow(k / 255.0f, gamma) * 255; + + for (y = 0; y < pix->h; y++) + { + for (x = 0; x < pix->w; x++) + { + for (k = 0; k < pix->n - 1; k++) + s[k] = gamma_map[s[k]]; + s += pix->n; + } + } +} + +/* + * Write pixmap to PNM file (without alpha channel) + */ + +fz_error +fz_write_pnm(fz_pixmap *pixmap, char *filename) +{ + FILE *fp; + unsigned char *p; + int len; + + if (pixmap->n != 1 && pixmap->n != 2 && pixmap->n != 4) + return fz_throw("pixmap must be grayscale or rgb to write as pnm"); + + fp = fopen(filename, "wb"); + if (!fp) + return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); + + if (pixmap->n == 1 || pixmap->n == 2) + fprintf(fp, "P5\n"); + if (pixmap->n == 4) + fprintf(fp, "P6\n"); + fprintf(fp, "%d %d\n", pixmap->w, pixmap->h); + fprintf(fp, "255\n"); + + len = pixmap->w * pixmap->h; + p = pixmap->samples; + + switch (pixmap->n) + { + case 1: + fwrite(p, 1, len, fp); + break; + case 2: + while (len--) + { + putc(p[0], fp); + p += 2; + } + break; + case 4: + while (len--) + { + putc(p[0], fp); + putc(p[1], fp); + putc(p[2], fp); + p += 4; + } + } + + fclose(fp); + return fz_okay; +} + +/* + * Write pixmap to PAM file (with or without alpha channel) + */ + +fz_error +fz_write_pam(fz_pixmap *pixmap, char *filename, int savealpha) +{ + unsigned char *sp; + int y, w, k; + FILE *fp; + + int sn = pixmap->n; + int dn = pixmap->n; + if (!savealpha && dn > 1) + dn--; + + fp = fopen(filename, "wb"); + if (!fp) + return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); + + fprintf(fp, "P7\n"); + fprintf(fp, "WIDTH %d\n", pixmap->w); + fprintf(fp, "HEIGHT %d\n", pixmap->h); + fprintf(fp, "DEPTH %d\n", dn); + fprintf(fp, "MAXVAL 255\n"); + if (pixmap->colorspace) + fprintf(fp, "# COLORSPACE %s\n", pixmap->colorspace->name); + switch (dn) + { + case 1: fprintf(fp, "TUPLTYPE GRAYSCALE\n"); break; + case 2: if (sn == 2) fprintf(fp, "TUPLTYPE GRAYSCALE_ALPHA\n"); break; + case 3: if (sn == 4) fprintf(fp, "TUPLTYPE RGB\n"); break; + case 4: if (sn == 4) fprintf(fp, "TUPLTYPE RGB_ALPHA\n"); break; + } + fprintf(fp, "ENDHDR\n"); + + sp = pixmap->samples; + for (y = 0; y < pixmap->h; y++) + { + w = pixmap->w; + while (w--) + { + for (k = 0; k < dn; k++) + putc(sp[k], fp); + sp += sn; + } + } + + fclose(fp); + + return fz_okay; +} + +/* + * Write pixmap to PNG file (with or without alpha channel) + */ + +#include + +static inline void big32(unsigned char *buf, unsigned int v) +{ + buf[0] = (v >> 24) & 0xff; + buf[1] = (v >> 16) & 0xff; + buf[2] = (v >> 8) & 0xff; + buf[3] = (v) & 0xff; +} + +static inline void put32(unsigned int v, FILE *fp) +{ + putc(v >> 24, fp); + putc(v >> 16, fp); + putc(v >> 8, fp); + putc(v, fp); +} + +static void putchunk(char *tag, unsigned char *data, int size, FILE *fp) +{ + unsigned int sum; + put32(size, fp); + fwrite(tag, 1, 4, fp); + fwrite(data, 1, size, fp); + sum = crc32(0, NULL, 0); + sum = crc32(sum, (unsigned char*)tag, 4); + sum = crc32(sum, data, size); + put32(sum, fp); +} + +fz_error +fz_write_png(fz_pixmap *pixmap, char *filename, int savealpha) +{ + static const unsigned char pngsig[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; + FILE *fp; + unsigned char head[13]; + unsigned char *udata, *cdata, *sp, *dp; + uLong usize, csize; + int y, x, k, sn, dn; + int color; + int err; + + if (pixmap->n != 1 && pixmap->n != 2 && pixmap->n != 4) + return fz_throw("pixmap must be grayscale or rgb to write as png"); + + sn = pixmap->n; + dn = pixmap->n; + if (!savealpha && dn > 1) + dn--; + + switch (dn) + { + default: + case 1: color = 0; break; + case 2: color = 4; break; + case 3: color = 2; break; + case 4: color = 6; break; + } + + usize = (pixmap->w * dn + 1) * pixmap->h; + csize = compressBound(usize); + udata = fz_malloc(usize); + cdata = fz_malloc(csize); + + sp = pixmap->samples; + dp = udata; + for (y = 0; y < pixmap->h; y++) + { + *dp++ = 1; /* sub prediction filter */ + for (x = 0; x < pixmap->w; x++) + { + for (k = 0; k < dn; k++) + { + if (x == 0) + dp[k] = sp[k]; + else + dp[k] = sp[k] - sp[k-sn]; + } + sp += sn; + dp += dn; + } + } + + err = compress(cdata, &csize, udata, usize); + if (err != Z_OK) + { + fz_free(udata); + fz_free(cdata); + return fz_throw("cannot compress image data"); + } + + fp = fopen(filename, "wb"); + if (!fp) + { + fz_free(udata); + fz_free(cdata); + return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); + } + + big32(head+0, pixmap->w); + big32(head+4, pixmap->h); + head[8] = 8; /* depth */ + head[9] = color; + head[10] = 0; /* compression */ + head[11] = 0; /* filter */ + head[12] = 0; /* interlace */ + + fwrite(pngsig, 1, 8, fp); + putchunk("IHDR", head, 13, fp); + putchunk("IDAT", cdata, csize, fp); + putchunk("IEND", head, 0, fp); + fclose(fp); + + fz_free(udata); + fz_free(cdata); + return fz_okay; +} diff --git a/contrib/media/updf/fitz/res_shade.c b/contrib/media/updf/fitz/res_shade.c new file mode 100644 index 0000000000..7faff3bf0a --- /dev/null +++ b/contrib/media/updf/fitz/res_shade.c @@ -0,0 +1,127 @@ +#include "fitz.h" + +fz_shade * +fz_keep_shade(fz_shade *shade) +{ + shade->refs ++; + return shade; +} + +void +fz_drop_shade(fz_shade *shade) +{ + if (shade && --shade->refs == 0) + { + if (shade->colorspace) + fz_drop_colorspace(shade->colorspace); + fz_free(shade->mesh); + fz_free(shade); + } +} + +fz_rect +fz_bound_shade(fz_shade *shade, fz_matrix ctm) +{ + float *v; + fz_rect r; + fz_point p; + int i, ncomp, nvert; + + ctm = fz_concat(shade->matrix, ctm); + ncomp = shade->use_function ? 3 : 2 + shade->colorspace->n; + nvert = shade->mesh_len / ncomp; + v = shade->mesh; + + if (shade->type == FZ_LINEAR) + return fz_infinite_rect; + if (shade->type == FZ_RADIAL) + return fz_infinite_rect; + + if (nvert == 0) + return fz_empty_rect; + + p.x = v[0]; + p.y = v[1]; + v += ncomp; + p = fz_transform_point(ctm, p); + r.x0 = r.x1 = p.x; + r.y0 = r.y1 = p.y; + + for (i = 1; i < nvert; i++) + { + p.x = v[0]; + p.y = v[1]; + p = fz_transform_point(ctm, p); + v += ncomp; + if (p.x < r.x0) r.x0 = p.x; + if (p.y < r.y0) r.y0 = p.y; + if (p.x > r.x1) r.x1 = p.x; + if (p.y > r.y1) r.y1 = p.y; + } + + return r; +} + +void +fz_debug_shade(fz_shade *shade) +{ + int i, j, n; + float *vertex; + int triangle; + + printf("shading {\n"); + + switch (shade->type) + { + case FZ_LINEAR: printf("\ttype linear\n"); break; + case FZ_RADIAL: printf("\ttype radial\n"); break; + case FZ_MESH: printf("\ttype mesh\n"); break; + } + + printf("\tbbox [%g %g %g %g]\n", + shade->bbox.x0, shade->bbox.y0, + shade->bbox.x1, shade->bbox.y1); + + printf("\tcolorspace %s\n", shade->colorspace->name); + + printf("\tmatrix [%g %g %g %g %g %g]\n", + shade->matrix.a, shade->matrix.b, shade->matrix.c, + shade->matrix.d, shade->matrix.e, shade->matrix.f); + + if (shade->use_background) + { + printf("\tbackground ["); + for (i = 0; i < shade->colorspace->n; i++) + printf("%s%g", i == 0 ? "" : " ", shade->background[i]); + printf("]\n"); + } + + if (shade->use_function) + { + printf("\tfunction\n"); + n = 3; + } + else + n = 2 + shade->colorspace->n; + + printf("\tvertices: %d\n", shade->mesh_len); + + vertex = shade->mesh; + triangle = 0; + i = 0; + while (i < shade->mesh_len) + { + printf("\t%d:(%g, %g): ", triangle, vertex[0], vertex[1]); + + for (j = 2; j < n; j++) + printf("%s%g", j == 2 ? "" : " ", vertex[j]); + printf("\n"); + + vertex += n; + i++; + if (i % 3 == 0) + triangle++; + } + + printf("}\n"); +} diff --git a/contrib/media/updf/fitz/res_text.c b/contrib/media/updf/fitz/res_text.c new file mode 100644 index 0000000000..d38637f10f --- /dev/null +++ b/contrib/media/updf/fitz/res_text.c @@ -0,0 +1,133 @@ +#include "fitz.h" + +fz_text * +fz_new_text(fz_font *font, fz_matrix trm, int wmode) +{ + fz_text *text; + + text = fz_malloc(sizeof(fz_text)); + text->font = fz_keep_font(font); + text->trm = trm; + text->wmode = wmode; + text->len = 0; + text->cap = 0; + text->items = NULL; + + return text; +} + +void +fz_free_text(fz_text *text) +{ + fz_drop_font(text->font); + fz_free(text->items); + fz_free(text); +} + +fz_text * +fz_clone_text(fz_text *old) +{ + fz_text *text; + + text = fz_malloc(sizeof(fz_text)); + text->font = fz_keep_font(old->font); + text->trm = old->trm; + text->wmode = old->wmode; + text->len = old->len; + text->cap = text->len; + text->items = fz_calloc(text->len, sizeof(fz_text_item)); + memcpy(text->items, old->items, text->len * sizeof(fz_text_item)); + + return text; +} + +fz_rect +fz_bound_text(fz_text *text, fz_matrix ctm) +{ + fz_matrix trm; + fz_rect bbox; + fz_rect fbox; + int i; + + if (text->len == 0) + return fz_empty_rect; + + /* find bbox of glyph origins in ctm space */ + + bbox.x0 = bbox.x1 = text->items[0].x; + bbox.y0 = bbox.y1 = text->items[0].y; + + for (i = 1; i < text->len; i++) + { + bbox.x0 = MIN(bbox.x0, text->items[i].x); + bbox.y0 = MIN(bbox.y0, text->items[i].y); + bbox.x1 = MAX(bbox.x1, text->items[i].x); + bbox.y1 = MAX(bbox.y1, text->items[i].y); + } + + bbox = fz_transform_rect(ctm, bbox); + + /* find bbox of font in trm * ctm space */ + + trm = fz_concat(text->trm, ctm); + trm.e = 0; + trm.f = 0; + + fbox.x0 = text->font->bbox.x0 * 0.001f; + fbox.y0 = text->font->bbox.y0 * 0.001f; + fbox.x1 = text->font->bbox.x1 * 0.001f; + fbox.y1 = text->font->bbox.y1 * 0.001f; + + fbox = fz_transform_rect(trm, fbox); + + /* expand glyph origin bbox by font bbox */ + + bbox.x0 += fbox.x0; + bbox.y0 += fbox.y0; + bbox.x1 += fbox.x1; + bbox.y1 += fbox.y1; + + return bbox; +} + +static void +fz_grow_text(fz_text *text, int n) +{ + if (text->len + n < text->cap) + return; + while (text->len + n > text->cap) + text->cap = text->cap + 36; + text->items = fz_realloc(text->items, text->cap, sizeof(fz_text_item)); +} + +void +fz_add_text(fz_text *text, int gid, int ucs, float x, float y) +{ + fz_grow_text(text, 1); + text->items[text->len].ucs = ucs; + text->items[text->len].gid = gid; + text->items[text->len].x = x; + text->items[text->len].y = y; + text->len++; +} + +static int isxmlmeta(int c) +{ + return c < 32 || c >= 128 || c == '&' || c == '<' || c == '>' || c == '\'' || c == '"'; +} + +void fz_debug_text(fz_text *text, int indent) +{ + int i, n; + for (i = 0; i < text->len; i++) + { + for (n = 0; n < indent; n++) + putchar(' '); + if (!isxmlmeta(text->items[i].ucs)) + printf("\n", + text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); + else + printf("\n", + text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); + } +} diff --git a/contrib/media/updf/fitz/stm_buffer.c b/contrib/media/updf/fitz/stm_buffer.c new file mode 100644 index 0000000000..4c7410c3bc --- /dev/null +++ b/contrib/media/updf/fitz/stm_buffer.c @@ -0,0 +1,49 @@ +#include "fitz.h" + +fz_buffer * +fz_new_buffer(int size) +{ + fz_buffer *b; + + size = size > 1 ? size : 16; + + b = fz_malloc(sizeof(fz_buffer)); + b->refs = 1; + b->data = fz_malloc(size); + b->cap = size; + b->len = 0; + + return b; +} + +fz_buffer * +fz_keep_buffer(fz_buffer *buf) +{ + buf->refs ++; + return buf; +} + +void +fz_drop_buffer(fz_buffer *buf) +{ + if (--buf->refs == 0) + { + fz_free(buf->data); + fz_free(buf); + } +} + +void +fz_resize_buffer(fz_buffer *buf, int size) +{ + buf->data = fz_realloc(buf->data, size, 1); + buf->cap = size; + if (buf->len > buf->cap) + buf->len = buf->cap; +} + +void +fz_grow_buffer(fz_buffer *buf) +{ + fz_resize_buffer(buf, (buf->cap * 3) / 2); +} diff --git a/contrib/media/updf/fitz/stm_open.c b/contrib/media/updf/fitz/stm_open.c new file mode 100644 index 0000000000..74346f73d0 --- /dev/null +++ b/contrib/media/updf/fitz/stm_open.c @@ -0,0 +1,174 @@ +#include "fitz.h" + +fz_stream * +fz_new_stream(void *state, + int(*read)(fz_stream *stm, unsigned char *buf, int len), + void(*close)(fz_stream *stm)) +{ + fz_stream *stm; + + stm = fz_malloc(sizeof(fz_stream)); + + stm->refs = 1; + stm->error = 0; + stm->eof = 0; + stm->pos = 0; + + stm->bits = 0; + stm->avail = 0; + + stm->bp = stm->buf; + stm->rp = stm->bp; + stm->wp = stm->bp; + stm->ep = stm->buf + sizeof stm->buf; + + stm->state = state; + stm->read = read; + stm->close = close; + stm->seek = NULL; + + return stm; +} + +fz_stream * +fz_keep_stream(fz_stream *stm) +{ + stm->refs ++; + return stm; +} + +void +fz_close(fz_stream *stm) +{ + stm->refs --; + if (stm->refs == 0) + { + if (stm->close) + stm->close(stm); + fz_free(stm); + } +} + +/* File stream */ + +static int read_file(fz_stream *stm, unsigned char *buf, int len) +{ + int n = read(*(int*)stm->state, buf, len); + if (n < 0) + return fz_throw("read error: %s", strerror(errno)); + return n; +} + +static void seek_file(fz_stream *stm, int offset, int whence) +{ + int n = lseek(*(int*)stm->state, offset, whence); + if (n < 0) + fz_warn("cannot lseek: %s", strerror(errno)); + stm->pos = n; + stm->rp = stm->bp; + stm->wp = stm->bp; +} + +static void close_file(fz_stream *stm) +{ + int n = close(*(int*)stm->state); + if (n < 0) + fz_warn("close error: %s", strerror(errno)); + fz_free(stm->state); +} + +fz_stream * +fz_open_fd(int fd) +{ + fz_stream *stm; + int *state; + + state = fz_malloc(sizeof(int)); + *state = fd; + + stm = fz_new_stream(state, read_file, close_file); + stm->seek = seek_file; + + return stm; +} + +fz_stream * +fz_open_file(const char *name) +{ + int fd = open(name, O_BINARY | O_RDONLY, 0); + if (fd == -1) + return NULL; + return fz_open_fd(fd); +} + +#ifdef _WIN32 +fz_stream * +fz_open_file_w(const wchar_t *name) +{ + int fd = _wopen(name, O_BINARY | O_RDONLY, 0); + if (fd == -1) + return NULL; + return fz_open_fd(fd); +} +#endif + +/* Memory stream */ + +static int read_buffer(fz_stream *stm, unsigned char *buf, int len) +{ + return 0; +} + +static void seek_buffer(fz_stream *stm, int offset, int whence) +{ + if (whence == 0) + stm->rp = stm->bp + offset; + if (whence == 1) + stm->rp += offset; + if (whence == 2) + stm->rp = stm->ep - offset; + stm->rp = CLAMP(stm->rp, stm->bp, stm->ep); + stm->wp = stm->ep; +} + +static void close_buffer(fz_stream *stm) +{ + if (stm->state) + fz_drop_buffer(stm->state); +} + +fz_stream * +fz_open_buffer(fz_buffer *buf) +{ + fz_stream *stm; + + stm = fz_new_stream(fz_keep_buffer(buf), read_buffer, close_buffer); + stm->seek = seek_buffer; + + stm->bp = buf->data; + stm->rp = buf->data; + stm->wp = buf->data + buf->len; + stm->ep = buf->data + buf->len; + + stm->pos = buf->len; + + return stm; +} + +fz_stream * +fz_open_memory(unsigned char *data, int len) +{ + fz_stream *stm; + + stm = fz_new_stream(NULL, read_buffer, close_buffer); + stm->seek = seek_buffer; + + stm->bp = data; + stm->rp = data; + stm->wp = data + len; + stm->ep = data + len; + + stm->pos = len; + + return stm; +} diff --git a/contrib/media/updf/fitz/stm_read.c b/contrib/media/updf/fitz/stm_read.c new file mode 100644 index 0000000000..59f0643334 --- /dev/null +++ b/contrib/media/updf/fitz/stm_read.c @@ -0,0 +1,201 @@ +#include "fitz.h" + +int +fz_read(fz_stream *stm, unsigned char *buf, int len) +{ + int count, n; + + count = MIN(len, stm->wp - stm->rp); + if (count) + { + memcpy(buf, stm->rp, count); + stm->rp += count; + } + + if (count == len || stm->error || stm->eof) + return count; + + assert(stm->rp == stm->wp); + + if (len - count < stm->ep - stm->bp) + { + n = stm->read(stm, stm->bp, stm->ep - stm->bp); + if (n < 0) + { + stm->error = 1; + return fz_rethrow(n, "read error"); + } + else if (n == 0) + { + stm->eof = 1; + } + else if (n > 0) + { + stm->rp = stm->bp; + stm->wp = stm->bp + n; + stm->pos += n; + } + + n = MIN(len - count, stm->wp - stm->rp); + if (n) + { + memcpy(buf + count, stm->rp, n); + stm->rp += n; + count += n; + } + } + else + { + n = stm->read(stm, buf + count, len - count); + if (n < 0) + { + stm->error = 1; + return fz_rethrow(n, "read error"); + } + else if (n == 0) + { + stm->eof = 1; + } + else if (n > 0) + { + stm->pos += n; + count += n; + } + } + + return count; +} + +void +fz_fill_buffer(fz_stream *stm) +{ + int n; + + assert(stm->rp == stm->wp); + + if (stm->error || stm->eof) + return; + + n = stm->read(stm, stm->bp, stm->ep - stm->bp); + if (n < 0) + { + stm->error = 1; + fz_catch(n, "read error; treating as end of file"); + } + else if (n == 0) + { + stm->eof = 1; + } + else if (n > 0) + { + stm->rp = stm->bp; + stm->wp = stm->bp + n; + stm->pos += n; + } +} + +fz_error +fz_read_all(fz_buffer **bufp, fz_stream *stm, int initial) +{ + fz_buffer *buf; + int n; + + if (initial < 1024) + initial = 1024; + + buf = fz_new_buffer(initial); + + while (1) + { + if (buf->len == buf->cap) + fz_grow_buffer(buf); + + if (buf->len / 200 > initial) + { + fz_drop_buffer(buf); + return fz_throw("compression bomb detected"); + } + + n = fz_read(stm, buf->data + buf->len, buf->cap - buf->len); + if (n < 0) + { + fz_drop_buffer(buf); + return fz_rethrow(n, "read error"); + } + if (n == 0) + break; + + buf->len += n; + } + + *bufp = buf; + return fz_okay; +} + +void +fz_read_line(fz_stream *stm, char *mem, int n) +{ + char *s = mem; + int c = EOF; + while (n > 1) + { + c = fz_read_byte(stm); + if (c == EOF) + break; + if (c == '\r') { + c = fz_peek_byte(stm); + if (c == '\n') + fz_read_byte(stm); + break; + } + if (c == '\n') + break; + *s++ = c; + n--; + } + if (n) + *s = '\0'; +} + +int +fz_tell(fz_stream *stm) +{ + return stm->pos - (stm->wp - stm->rp); +} + +void +fz_seek(fz_stream *stm, int offset, int whence) +{ + if (stm->seek) + { + if (whence == 1) + { + offset = fz_tell(stm) + offset; + whence = 0; + } + if (whence == 0) + { + unsigned char *p = stm->wp - (stm->pos - offset); + if (p >= stm->bp && p <= stm->wp) + { + stm->rp = p; + stm->eof = 0; + return; + } + } + stm->seek(stm, offset, whence); + stm->eof = 0; + } + else if (whence != 2) + { + if (whence == 0) + offset -= fz_tell(stm); + if (offset < 0) + fz_warn("cannot seek backwards"); + /* dog slow, but rare enough */ + while (offset-- > 0) + fz_read_byte(stm); + } + else + fz_warn("cannot seek"); +} diff --git a/contrib/media/updf/fitz/strtoll.c b/contrib/media/updf/fitz/strtoll.c new file mode 100644 index 0000000000..1c9141d5b4 --- /dev/null +++ b/contrib/media/updf/fitz/strtoll.c @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include + +long long int strtoll(const char *nptr, char **endptr, int base) +{ + int neg=0; + unsigned long long int v; + const char*orig=nptr; + + while(isspace(*nptr)) nptr++; + + if (*nptr == '-' && isalnum(nptr[1])) { neg=-1; nptr++; } + v=strtoull(nptr,endptr,base); + if (endptr && *endptr==nptr) *endptr=(char *)orig; + if (v>LLONG_MAX) { + if (v==0x8000000000000000ull && neg) { + errno=0; + return v; + } + errno=ERANGE; + return (neg?LLONG_MIN:LLONG_MAX); + } + return (neg?-v:v); +} + +intmax_t strtoimax(const char *nptr, char **endptr, int base) + __attribute__((alias("strtoll"))); diff --git a/contrib/media/updf/fitz/strtoull.c b/contrib/media/updf/fitz/strtoull.c new file mode 100644 index 0000000000..4a92d70699 --- /dev/null +++ b/contrib/media/updf/fitz/strtoull.c @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include + +#define __expect(foo,bar) (foo) +#define __likely(foo) __expect((foo),1) +#define __unlikely(foo) __expect((foo),0) + +unsigned long long int strtoull(const char *ptr, char **endptr, int base) +{ + int neg = 0, overflow = 0; + long long int v=0; + const char* orig; + const char* nptr=ptr; + + while(isspace(*nptr)) ++nptr; + + if (*nptr == '-') { neg=1; nptr++; } + else if (*nptr == '+') ++nptr; + orig=nptr; + if (base==16 && nptr[0]=='0') goto skip0x; + if (base) { + register unsigned int b=base-2; + if (__unlikely(b>34)) { errno=EINVAL; return 0; } + } else { + if (*nptr=='0') { + base=8; +skip0x: + if (((*(nptr+1)=='x')||(*(nptr+1)=='X')) && isxdigit(nptr[2])) { + nptr+=2; + base=16; + } + } else + base=10; + } + while(__likely(*nptr)) { + register unsigned char c=*nptr; + c=(c>='a'?c-'a'+10:c>='A'?c-'A'+10:c<='9'?c-'0':0xff); + if (__unlikely(c>=base)) break; /* out of base */ + { + register unsigned long x=(v&0xff)*base+c; + register unsigned long long w=(v>>8)*base+(x>>8); + if (w>(ULLONG_MAX>>8)) overflow=1; + v=(w<<8)+(x&0xff); + } + ++nptr; + } + if (__unlikely(nptr==orig)) { /* no conversion done */ + nptr=ptr; + errno=EINVAL; + v=0; + } + if (endptr) *endptr=(char *)nptr; + if (overflow) { + errno=ERANGE; + return ULLONG_MAX; + } + return (neg?-v:v); +} + +/* die, BSD, die!!! */ +unsigned long long int strtouq(const char *nptr, char **endptr, int base) + __attribute__((alias("strtoull"))); + +uintmax_t strtoumax(const char *nptr, char **endptr, int base) + __attribute__((alias("strtoull"))); diff --git a/contrib/media/updf/fonts/Dingbats.cff b/contrib/media/updf/fonts/Dingbats.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/Dingbats.cff differ diff --git a/contrib/media/updf/fonts/NimbusMonL-Bold.cff b/contrib/media/updf/fonts/NimbusMonL-Bold.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusMonL-Bold.cff differ diff --git a/contrib/media/updf/fonts/NimbusMonL-BoldObli.cff b/contrib/media/updf/fonts/NimbusMonL-BoldObli.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusMonL-BoldObli.cff differ diff --git a/contrib/media/updf/fonts/NimbusMonL-Regu.cff b/contrib/media/updf/fonts/NimbusMonL-Regu.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusMonL-Regu.cff differ diff --git a/contrib/media/updf/fonts/NimbusMonL-ReguObli.cff b/contrib/media/updf/fonts/NimbusMonL-ReguObli.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusMonL-ReguObli.cff differ diff --git a/contrib/media/updf/fonts/NimbusRomNo9L-Medi.cff b/contrib/media/updf/fonts/NimbusRomNo9L-Medi.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusRomNo9L-Medi.cff differ diff --git a/contrib/media/updf/fonts/NimbusRomNo9L-MediItal.cff b/contrib/media/updf/fonts/NimbusRomNo9L-MediItal.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusRomNo9L-MediItal.cff differ diff --git a/contrib/media/updf/fonts/NimbusRomNo9L-Regu.cff b/contrib/media/updf/fonts/NimbusRomNo9L-Regu.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusRomNo9L-Regu.cff differ diff --git a/contrib/media/updf/fonts/NimbusRomNo9L-ReguItal.cff b/contrib/media/updf/fonts/NimbusRomNo9L-ReguItal.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusRomNo9L-ReguItal.cff differ diff --git a/contrib/media/updf/fonts/NimbusSanL-Bold.cff b/contrib/media/updf/fonts/NimbusSanL-Bold.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusSanL-Bold.cff differ diff --git a/contrib/media/updf/fonts/NimbusSanL-BoldItal.cff b/contrib/media/updf/fonts/NimbusSanL-BoldItal.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusSanL-BoldItal.cff differ diff --git a/contrib/media/updf/fonts/NimbusSanL-Regu.cff b/contrib/media/updf/fonts/NimbusSanL-Regu.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusSanL-Regu.cff differ diff --git a/contrib/media/updf/fonts/NimbusSanL-ReguItal.cff b/contrib/media/updf/fonts/NimbusSanL-ReguItal.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/NimbusSanL-ReguItal.cff differ diff --git a/contrib/media/updf/fonts/StandardSymL.cff b/contrib/media/updf/fonts/StandardSymL.cff new file mode 100644 index 0000000000..5f64733482 Binary files /dev/null and b/contrib/media/updf/fonts/StandardSymL.cff differ diff --git a/contrib/media/updf/fonts/droid/DroidSans.ttf b/contrib/media/updf/fonts/droid/DroidSans.ttf new file mode 100644 index 0000000000..a3ff52770f Binary files /dev/null and b/contrib/media/updf/fonts/droid/DroidSans.ttf differ diff --git a/contrib/media/updf/fonts/droid/DroidSansFallback.ttf b/contrib/media/updf/fonts/droid/DroidSansFallback.ttf new file mode 100644 index 0000000000..a3ff52770f Binary files /dev/null and b/contrib/media/updf/fonts/droid/DroidSansFallback.ttf differ diff --git a/contrib/media/updf/fonts/droid/DroidSansMono.ttf b/contrib/media/updf/fonts/droid/DroidSansMono.ttf new file mode 100644 index 0000000000..a3ff52770f Binary files /dev/null and b/contrib/media/updf/fonts/droid/DroidSansMono.ttf differ diff --git a/contrib/media/updf/fonts/droid/NOTICE b/contrib/media/updf/fonts/droid/NOTICE new file mode 100644 index 0000000000..c5b1efa7aa --- /dev/null +++ b/contrib/media/updf/fonts/droid/NOTICE @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2008, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/contrib/media/updf/generated/cmap_cns.h b/contrib/media/updf/generated/cmap_cns.h new file mode 100644 index 0000000000..a1f2e2f62e --- /dev/null +++ b/contrib/media/updf/generated/cmap_cns.h @@ -0,0 +1,681 @@ +/* This is an automatically generated file. Do not edit. */ + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_0_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_0_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_0 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_0_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_0_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_1_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_1_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_1 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_1_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_1_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_3_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_3_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_3 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_3_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_3_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_4_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_4_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_4 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_4_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_4_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_5_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_5_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_5 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_5_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_5_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_6_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_6_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_6 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_6_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_6_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_CNS1_UCS2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_CNS1_UCS2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_CNS1_UCS2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_CNS1_UCS2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_CNS1_UCS2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_B5_H_ranges, + 0, 0, (unsigned short*) cmap_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_B5pc_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_B5pc_H_table[] = { 0 }; + +static pdf_cmap cmap_B5pc_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_B5pc_H_ranges, + 0, 0, (unsigned short*) cmap_B5pc_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_B5pc_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_B5pc_V_table[] = { 0 }; + +static pdf_cmap cmap_B5pc_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_B5pc_V_ranges, + 0, 0, (unsigned short*) cmap_B5pc_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_B5_V_ranges, + 0, 0, (unsigned short*) cmap_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS1_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS1_H_table[] = { 0 }; + +static pdf_cmap cmap_CNS1_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS1_H_ranges, + 0, 0, (unsigned short*) cmap_CNS1_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS1_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS1_V_table[] = { 0 }; + +static pdf_cmap cmap_CNS1_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS1_V_ranges, + 0, 0, (unsigned short*) cmap_CNS1_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS2_H_table[] = { 0 }; + +static pdf_cmap cmap_CNS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS2_H_ranges, + 0, 0, (unsigned short*) cmap_CNS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS2_V_table[] = { 0 }; + +static pdf_cmap cmap_CNS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS2_V_ranges, + 0, 0, (unsigned short*) cmap_CNS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_CNS_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_CNS_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_CNS_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_CNS_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_CNS_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_CNS_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_CNS_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETen_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETen_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_ETen_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETen_B5_H_ranges, + 0, 0, (unsigned short*) cmap_ETen_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETen_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETen_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_ETen_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETen_B5_V_ranges, + 0, 0, (unsigned short*) cmap_ETen_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETenms_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETenms_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_ETenms_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETenms_B5_H_ranges, + 0, 0, (unsigned short*) cmap_ETenms_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETenms_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETenms_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_ETenms_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETenms_B5_V_ranges, + 0, 0, (unsigned short*) cmap_ETenms_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETHK_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETHK_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_ETHK_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETHK_B5_H_ranges, + 0, 0, (unsigned short*) cmap_ETHK_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_ETHK_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_ETHK_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_ETHK_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_ETHK_B5_V_ranges, + 0, 0, (unsigned short*) cmap_ETHK_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKdla_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKdla_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKdla_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKdla_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKdla_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKdla_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKdla_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKdla_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKdla_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKdla_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKdlb_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKdlb_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKdlb_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKdlb_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKdlb_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKdlb_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKdlb_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKdlb_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKdlb_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKdlb_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKgccs_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKgccs_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKgccs_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKgccs_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKgccs_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKgccs_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKgccs_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKgccs_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKgccs_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKgccs_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKm314_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKm314_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKm314_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKm314_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKm314_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKm314_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKm314_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKm314_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKm314_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKm314_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKm471_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKm471_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKm471_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKm471_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKm471_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKm471_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKm471_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKm471_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKm471_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKm471_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKscs_B5_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKscs_B5_H_table[] = { 0 }; + +static pdf_cmap cmap_HKscs_B5_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKscs_B5_H_ranges, + 0, 0, (unsigned short*) cmap_HKscs_B5_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_HKscs_B5_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_HKscs_B5_V_table[] = { 0 }; + +static pdf_cmap cmap_HKscs_B5_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_HKscs_B5_V_ranges, + 0, 0, (unsigned short*) cmap_HKscs_B5_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniCNS_UCS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniCNS_UCS2_H_table[] = { 0 }; + +static pdf_cmap cmap_UniCNS_UCS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniCNS_UCS2_H_ranges, + 0, 0, (unsigned short*) cmap_UniCNS_UCS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniCNS_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniCNS_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniCNS_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniCNS_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniCNS_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniCNS_UTF16_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniCNS_UTF16_H_table[] = { 0 }; + +static pdf_cmap cmap_UniCNS_UTF16_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniCNS_UTF16_H_ranges, + 0, 0, (unsigned short*) cmap_UniCNS_UTF16_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniCNS_UTF16_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniCNS_UTF16_V_table[] = { 0 }; + +static pdf_cmap cmap_UniCNS_UTF16_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniCNS_UTF16_V_ranges, + 0, 0, (unsigned short*) cmap_UniCNS_UTF16_V_table, +}; diff --git a/contrib/media/updf/generated/cmap_gb.h b/contrib/media/updf/generated/cmap_gb.h new file mode 100644 index 0000000000..04d46a7d32 --- /dev/null +++ b/contrib/media/updf/generated/cmap_gb.h @@ -0,0 +1,494 @@ +/* This is an automatically generated file. Do not edit. */ + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_0_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_0_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_0 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_0_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_0_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_1_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_1_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_1 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_1_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_1_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_3_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_3_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_3 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_3_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_3_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_4_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_4_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_4 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_4_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_4_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_5_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_5_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_5 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_5_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_5_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_GB1_UCS2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_GB1_UCS2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_GB1_UCS2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_GB1_UCS2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_GB1_UCS2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GB_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GB_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GB_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GB_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GB_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GB_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GB_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GB_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GB_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GB_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GB_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GB_H_table[] = { 0 }; + +static pdf_cmap cmap_GB_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GB_H_ranges, + 0, 0, (unsigned short*) cmap_GB_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBK2K_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBK2K_H_table[] = { 0 }; + +static pdf_cmap cmap_GBK2K_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBK2K_H_ranges, + 0, 0, (unsigned short*) cmap_GBK2K_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBK2K_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBK2K_V_table[] = { 0 }; + +static pdf_cmap cmap_GBK2K_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBK2K_V_ranges, + 0, 0, (unsigned short*) cmap_GBK2K_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBK_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBK_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GBK_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBK_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GBK_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBK_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBK_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GBK_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBK_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GBK_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBKp_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBKp_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GBKp_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBKp_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GBKp_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBKp_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBKp_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GBKp_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBKp_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GBKp_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBpc_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBpc_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GBpc_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBpc_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GBpc_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBpc_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBpc_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GBpc_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBpc_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GBpc_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBT_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBT_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GBT_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBT_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GBT_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBT_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBT_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GBT_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBT_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GBT_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBT_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBT_H_table[] = { 0 }; + +static pdf_cmap cmap_GBT_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBT_H_ranges, + 0, 0, (unsigned short*) cmap_GBT_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBTpc_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBTpc_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_GBTpc_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBTpc_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_GBTpc_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBTpc_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBTpc_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_GBTpc_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBTpc_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_GBTpc_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GBT_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GBT_V_table[] = { 0 }; + +static pdf_cmap cmap_GBT_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GBT_V_ranges, + 0, 0, (unsigned short*) cmap_GBT_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_GB_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_GB_V_table[] = { 0 }; + +static pdf_cmap cmap_GB_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_GB_V_ranges, + 0, 0, (unsigned short*) cmap_GB_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniGB_UCS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniGB_UCS2_H_table[] = { 0 }; + +static pdf_cmap cmap_UniGB_UCS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniGB_UCS2_H_ranges, + 0, 0, (unsigned short*) cmap_UniGB_UCS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniGB_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniGB_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniGB_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniGB_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniGB_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniGB_UTF16_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniGB_UTF16_H_table[] = { 0 }; + +static pdf_cmap cmap_UniGB_UTF16_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniGB_UTF16_H_ranges, + 0, 0, (unsigned short*) cmap_UniGB_UTF16_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniGB_UTF16_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniGB_UTF16_V_table[] = { 0 }; + +static pdf_cmap cmap_UniGB_UTF16_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniGB_UTF16_V_ranges, + 0, 0, (unsigned short*) cmap_UniGB_UTF16_V_table, +}; diff --git a/contrib/media/updf/generated/cmap_japan.h b/contrib/media/updf/generated/cmap_japan.h new file mode 100644 index 0000000000..125f24f434 --- /dev/null +++ b/contrib/media/updf/generated/cmap_japan.h @@ -0,0 +1,1038 @@ +/* This is an automatically generated file. Do not edit. */ + +/* B5-V */ + +static const pdf_range cmap_78_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_78_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_78_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_78_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_78_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_H_table[] = { 0 }; + +static pdf_cmap cmap_78_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_H_ranges, + 0, 0, (unsigned short*) cmap_78_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78ms_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78ms_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_78ms_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78ms_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_78ms_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78ms_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78ms_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_78ms_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78ms_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_78ms_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_78_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_78_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_78_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_78_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_78_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_78_V_table[] = { 0 }; + +static pdf_cmap cmap_78_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_78_V_ranges, + 0, 0, (unsigned short*) cmap_78_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_83pv_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_83pv_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_83pv_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_83pv_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_83pv_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90msp_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90msp_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_90msp_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90msp_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_90msp_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90msp_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90msp_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_90msp_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90msp_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_90msp_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90ms_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90ms_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_90ms_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90ms_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_90ms_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90ms_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90ms_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_90ms_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90ms_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_90ms_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90pv_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90pv_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_90pv_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90pv_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_90pv_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_90pv_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_90pv_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_90pv_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_90pv_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_90pv_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Add_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Add_H_table[] = { 0 }; + +static pdf_cmap cmap_Add_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Add_H_ranges, + 0, 0, (unsigned short*) cmap_Add_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Add_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Add_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_Add_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Add_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_Add_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Add_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Add_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_Add_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Add_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_Add_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Add_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Add_V_table[] = { 0 }; + +static pdf_cmap cmap_Add_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Add_V_ranges, + 0, 0, (unsigned short*) cmap_Add_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_0_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_0_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_0 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_0_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_0_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_1_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_1_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_1 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_1_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_1_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_3_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_3_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_3 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_3_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_3_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_4_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_4_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_4 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_4_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_4_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_5_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_5_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_5 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_5_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_5_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_6_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_6_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_6 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_6_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_6_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan1_UCS2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan1_UCS2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan1_UCS2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan1_UCS2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan1_UCS2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Japan2_0_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Japan2_0_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Japan2_0 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Japan2_0_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Japan2_0_table, +}; + +/* B5-V */ + +static const pdf_range cmap_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Ext_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Ext_H_table[] = { 0 }; + +static pdf_cmap cmap_Ext_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Ext_H_ranges, + 0, 0, (unsigned short*) cmap_Ext_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Ext_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Ext_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_Ext_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Ext_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_Ext_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Ext_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Ext_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_Ext_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Ext_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_Ext_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Ext_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Ext_V_table[] = { 0 }; + +static pdf_cmap cmap_Ext_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Ext_V_ranges, + 0, 0, (unsigned short*) cmap_Ext_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_H_table[] = { 0 }; + +static pdf_cmap cmap_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_H_ranges, + 0, 0, (unsigned short*) cmap_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hankaku_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hankaku_table[] = { 0 }; + +static pdf_cmap cmap_Hankaku = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hankaku_ranges, + 0, 0, (unsigned short*) cmap_Hankaku_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hiragana_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hiragana_table[] = { 0 }; + +static pdf_cmap cmap_Hiragana = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hiragana_ranges, + 0, 0, (unsigned short*) cmap_Hiragana_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hojo_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hojo_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_Hojo_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hojo_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_Hojo_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hojo_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hojo_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_Hojo_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hojo_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_Hojo_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hojo_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hojo_H_table[] = { 0 }; + +static pdf_cmap cmap_Hojo_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hojo_H_ranges, + 0, 0, (unsigned short*) cmap_Hojo_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Hojo_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Hojo_V_table[] = { 0 }; + +static pdf_cmap cmap_Hojo_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Hojo_V_ranges, + 0, 0, (unsigned short*) cmap_Hojo_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Katakana_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Katakana_table[] = { 0 }; + +static pdf_cmap cmap_Katakana = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Katakana_ranges, + 0, 0, (unsigned short*) cmap_Katakana_table, +}; + +/* B5-V */ + +static const pdf_range cmap_NWP_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_NWP_H_table[] = { 0 }; + +static pdf_cmap cmap_NWP_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_NWP_H_ranges, + 0, 0, (unsigned short*) cmap_NWP_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_NWP_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_NWP_V_table[] = { 0 }; + +static pdf_cmap cmap_NWP_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_NWP_V_ranges, + 0, 0, (unsigned short*) cmap_NWP_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_RKSJ_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_RKSJ_H_table[] = { 0 }; + +static pdf_cmap cmap_RKSJ_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_RKSJ_H_ranges, + 0, 0, (unsigned short*) cmap_RKSJ_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_RKSJ_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_RKSJ_V_table[] = { 0 }; + +static pdf_cmap cmap_RKSJ_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_RKSJ_V_ranges, + 0, 0, (unsigned short*) cmap_RKSJ_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Roman_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Roman_table[] = { 0 }; + +static pdf_cmap cmap_Roman = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Roman_ranges, + 0, 0, (unsigned short*) cmap_Roman_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniHojo_UCS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniHojo_UCS2_H_table[] = { 0 }; + +static pdf_cmap cmap_UniHojo_UCS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniHojo_UCS2_H_ranges, + 0, 0, (unsigned short*) cmap_UniHojo_UCS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniHojo_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniHojo_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniHojo_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniHojo_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniHojo_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniHojo_UTF16_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniHojo_UTF16_H_table[] = { 0 }; + +static pdf_cmap cmap_UniHojo_UTF16_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniHojo_UTF16_H_ranges, + 0, 0, (unsigned short*) cmap_UniHojo_UTF16_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniHojo_UTF16_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniHojo_UTF16_V_table[] = { 0 }; + +static pdf_cmap cmap_UniHojo_UTF16_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniHojo_UTF16_V_ranges, + 0, 0, (unsigned short*) cmap_UniHojo_UTF16_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJISPro_UCS2_HW_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJISPro_UCS2_HW_V_table[] = { 0 }; + +static pdf_cmap cmap_UniJISPro_UCS2_HW_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJISPro_UCS2_HW_V_ranges, + 0, 0, (unsigned short*) cmap_UniJISPro_UCS2_HW_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJISPro_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJISPro_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniJISPro_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJISPro_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniJISPro_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UCS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UCS2_H_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UCS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UCS2_H_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UCS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UCS2_HW_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UCS2_HW_H_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UCS2_HW_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UCS2_HW_H_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UCS2_HW_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UCS2_HW_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UCS2_HW_V_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UCS2_HW_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UCS2_HW_V_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UCS2_HW_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UTF16_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UTF16_H_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UTF16_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UTF16_H_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UTF16_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniJIS_UTF16_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniJIS_UTF16_V_table[] = { 0 }; + +static pdf_cmap cmap_UniJIS_UTF16_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniJIS_UTF16_V_ranges, + 0, 0, (unsigned short*) cmap_UniJIS_UTF16_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_V_table[] = { 0 }; + +static pdf_cmap cmap_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_V_ranges, + 0, 0, (unsigned short*) cmap_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_WP_Symbol_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_WP_Symbol_table[] = { 0 }; + +static pdf_cmap cmap_WP_Symbol = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_WP_Symbol_ranges, + 0, 0, (unsigned short*) cmap_WP_Symbol_table, +}; diff --git a/contrib/media/updf/generated/cmap_korea.h b/contrib/media/updf/generated/cmap_korea.h new file mode 100644 index 0000000000..586dd4893f --- /dev/null +++ b/contrib/media/updf/generated/cmap_korea.h @@ -0,0 +1,341 @@ +/* This is an automatically generated file. Do not edit. */ + +/* B5-V */ + +static const pdf_range cmap_Adobe_Korea1_0_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Korea1_0_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Korea1_0 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Korea1_0_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Korea1_0_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Korea1_1_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Korea1_1_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Korea1_1 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Korea1_1_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Korea1_1_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Korea1_2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Korea1_2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Korea1_2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Korea1_2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Korea1_2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_Adobe_Korea1_UCS2_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_Adobe_Korea1_UCS2_table[] = { 0 }; + +static pdf_cmap cmap_Adobe_Korea1_UCS2 = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_Adobe_Korea1_UCS2_ranges, + 0, 0, (unsigned short*) cmap_Adobe_Korea1_UCS2_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_KSC_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_KSC_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_KSC_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_KSC_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_H_table[] = { 0 }; + +static pdf_cmap cmap_KSC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_H_ranges, + 0, 0, (unsigned short*) cmap_KSC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_Johab_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_Johab_H_table[] = { 0 }; + +static pdf_cmap cmap_KSC_Johab_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_Johab_H_ranges, + 0, 0, (unsigned short*) cmap_KSC_Johab_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_Johab_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_Johab_V_table[] = { 0 }; + +static pdf_cmap cmap_KSC_Johab_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_Johab_V_ranges, + 0, 0, (unsigned short*) cmap_KSC_Johab_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCms_UHC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCms_UHC_H_table[] = { 0 }; + +static pdf_cmap cmap_KSCms_UHC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCms_UHC_H_ranges, + 0, 0, (unsigned short*) cmap_KSCms_UHC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCms_UHC_HW_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCms_UHC_HW_H_table[] = { 0 }; + +static pdf_cmap cmap_KSCms_UHC_HW_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCms_UHC_HW_H_ranges, + 0, 0, (unsigned short*) cmap_KSCms_UHC_HW_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCms_UHC_HW_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCms_UHC_HW_V_table[] = { 0 }; + +static pdf_cmap cmap_KSCms_UHC_HW_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCms_UHC_HW_V_ranges, + 0, 0, (unsigned short*) cmap_KSCms_UHC_HW_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCms_UHC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCms_UHC_V_table[] = { 0 }; + +static pdf_cmap cmap_KSCms_UHC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCms_UHC_V_ranges, + 0, 0, (unsigned short*) cmap_KSCms_UHC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCpc_EUC_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCpc_EUC_H_table[] = { 0 }; + +static pdf_cmap cmap_KSCpc_EUC_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCpc_EUC_H_ranges, + 0, 0, (unsigned short*) cmap_KSCpc_EUC_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSCpc_EUC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSCpc_EUC_V_table[] = { 0 }; + +static pdf_cmap cmap_KSCpc_EUC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSCpc_EUC_V_ranges, + 0, 0, (unsigned short*) cmap_KSCpc_EUC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_KSC_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_KSC_V_table[] = { 0 }; + +static pdf_cmap cmap_KSC_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_KSC_V_ranges, + 0, 0, (unsigned short*) cmap_KSC_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniKS_UCS2_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniKS_UCS2_H_table[] = { 0 }; + +static pdf_cmap cmap_UniKS_UCS2_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniKS_UCS2_H_ranges, + 0, 0, (unsigned short*) cmap_UniKS_UCS2_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniKS_UCS2_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniKS_UCS2_V_table[] = { 0 }; + +static pdf_cmap cmap_UniKS_UCS2_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniKS_UCS2_V_ranges, + 0, 0, (unsigned short*) cmap_UniKS_UCS2_V_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniKS_UTF16_H_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniKS_UTF16_H_table[] = { 0 }; + +static pdf_cmap cmap_UniKS_UTF16_H = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniKS_UTF16_H_ranges, + 0, 0, (unsigned short*) cmap_UniKS_UTF16_H_table, +}; + +/* B5-V */ + +static const pdf_range cmap_UniKS_UTF16_V_ranges[] = { +{41291,0,13646},{41306,0,13743},{41308,0,13745},{41309,5,130}, +{41313,5,134},{41317,5,138},{41321,5,142},{41325,5,146}, +{41329,5,150},{41333,5,154},{41337,5,158},{41443,0,13647}, +}; + +static const unsigned short cmap_UniKS_UTF16_V_table[] = { 0 }; + +static pdf_cmap cmap_UniKS_UTF16_V = { + -1, "B5-V", "B5-H", 0, 1, 0, + { {0,0,0}, }, + 12, 12, (pdf_range*) cmap_UniKS_UTF16_V_ranges, + 0, 0, (unsigned short*) cmap_UniKS_UTF16_V_table, +}; diff --git a/contrib/media/updf/generated/font_base14.h b/contrib/media/updf/generated/font_base14.h new file mode 100644 index 0000000000..be74f5f48c --- /dev/null +++ b/contrib/media/updf/generated/font_base14.h @@ -0,0 +1,10561 @@ +#ifndef __STRICT_ANSI__ +#if defined(__linux__) || defined(__FreeBSD__) +#define HAVE_INCBIN +#endif +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_Dingbats[15788]; +asm(".globl pdf_font_Dingbats"); +asm(".balign 8"); +asm("pdf_font_Dingbats:"); +asm(".incbin \"fonts/Dingbats.cff\""); +#else +static const unsigned char pdf_font_Dingbats[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusMonL_Bold[15788]; +asm(".globl pdf_font_NimbusMonL_Bold"); +asm(".balign 8"); +asm("pdf_font_NimbusMonL_Bold:"); +asm(".incbin \"fonts/NimbusMonL-Bold.cff\""); +#else +static const unsigned char pdf_font_NimbusMonL_Bold[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusMonL_BoldObli[15788]; +asm(".globl pdf_font_NimbusMonL_BoldObli"); +asm(".balign 8"); +asm("pdf_font_NimbusMonL_BoldObli:"); +asm(".incbin \"fonts/NimbusMonL-BoldObli.cff\""); +#else +static const unsigned char pdf_font_NimbusMonL_BoldObli[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusMonL_Regu[15788]; +asm(".globl pdf_font_NimbusMonL_Regu"); +asm(".balign 8"); +asm("pdf_font_NimbusMonL_Regu:"); +asm(".incbin \"fonts/NimbusMonL-Regu.cff\""); +#else +static const unsigned char pdf_font_NimbusMonL_Regu[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusMonL_ReguObli[15788]; +asm(".globl pdf_font_NimbusMonL_ReguObli"); +asm(".balign 8"); +asm("pdf_font_NimbusMonL_ReguObli:"); +asm(".incbin \"fonts/NimbusMonL-ReguObli.cff\""); +#else +static const unsigned char pdf_font_NimbusMonL_ReguObli[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusRomNo9L_Medi[15788]; +asm(".globl pdf_font_NimbusRomNo9L_Medi"); +asm(".balign 8"); +asm("pdf_font_NimbusRomNo9L_Medi:"); +asm(".incbin \"fonts/NimbusRomNo9L-Medi.cff\""); +#else +static const unsigned char pdf_font_NimbusRomNo9L_Medi[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusRomNo9L_MediItal[15788]; +asm(".globl pdf_font_NimbusRomNo9L_MediItal"); +asm(".balign 8"); +asm("pdf_font_NimbusRomNo9L_MediItal:"); +asm(".incbin \"fonts/NimbusRomNo9L-MediItal.cff\""); +#else +static const unsigned char pdf_font_NimbusRomNo9L_MediItal[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusRomNo9L_Regu[15788]; +asm(".globl pdf_font_NimbusRomNo9L_Regu"); +asm(".balign 8"); +asm("pdf_font_NimbusRomNo9L_Regu:"); +asm(".incbin \"fonts/NimbusRomNo9L-Regu.cff\""); +#else +static const unsigned char pdf_font_NimbusRomNo9L_Regu[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusRomNo9L_ReguItal[15788]; +asm(".globl pdf_font_NimbusRomNo9L_ReguItal"); +asm(".balign 8"); +asm("pdf_font_NimbusRomNo9L_ReguItal:"); +asm(".incbin \"fonts/NimbusRomNo9L-ReguItal.cff\""); +#else +static const unsigned char pdf_font_NimbusRomNo9L_ReguItal[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusSanL_Bold[15788]; +asm(".globl pdf_font_NimbusSanL_Bold"); +asm(".balign 8"); +asm("pdf_font_NimbusSanL_Bold:"); +asm(".incbin \"fonts/NimbusSanL-Bold.cff\""); +#else +static const unsigned char pdf_font_NimbusSanL_Bold[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusSanL_BoldItal[15788]; +asm(".globl pdf_font_NimbusSanL_BoldItal"); +asm(".balign 8"); +asm("pdf_font_NimbusSanL_BoldItal:"); +asm(".incbin \"fonts/NimbusSanL-BoldItal.cff\""); +#else +static const unsigned char pdf_font_NimbusSanL_BoldItal[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusSanL_Regu[15788]; +asm(".globl pdf_font_NimbusSanL_Regu"); +asm(".balign 8"); +asm("pdf_font_NimbusSanL_Regu:"); +asm(".incbin \"fonts/NimbusSanL-Regu.cff\""); +#else +static const unsigned char pdf_font_NimbusSanL_Regu[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_NimbusSanL_ReguItal[15788]; +asm(".globl pdf_font_NimbusSanL_ReguItal"); +asm(".balign 8"); +asm("pdf_font_NimbusSanL_ReguItal:"); +asm(".incbin \"fonts/NimbusSanL-ReguItal.cff\""); +#else +static const unsigned char pdf_font_NimbusSanL_ReguItal[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_StandardSymL[15788]; +asm(".globl pdf_font_StandardSymL"); +asm(".balign 8"); +asm("pdf_font_StandardSymL:"); +asm(".incbin \"fonts/StandardSymL.cff\""); +#else +static const unsigned char pdf_font_StandardSymL[15788] = { +1,0,4,4,0,1,1,1,16,78,105,109,98,117,115,83,97,110,76,45,82,101,103,117,0, +1,2,0,1,0,48,248,31,0,248,32,1,248,33,2,248,34,3,248,24,4,251,43,12,3,251, +66,251,112,250,125,250,77,5,28,0,229,15,28,0,0,16,28,2,182,17,28,0,50,28, +55,74,18,0,8,2,0,1,0,5,0,11,0,20,0,27,0,31,0,95,0,116,0,129,69,117,114,111, +109,105,100,100,111,116,115,102,116,104,121,112,104,101,110,110,98,115,112, +97,99,101,49,46,48,53,67,111,112,121,114,105,103,104,116,32,40,85,82,87,41, +43,43,44,67,111,112,121,114,105,103,104,116,32,49,57,57,57,32,98,121,32,40, +85,82,87,41,43,43,32,68,101,115,105,103,110,32,38,32,68,101,118,101,108,111, +112,109,101,110,116,78,105,109,98,117,115,32,83,97,110,115,32,76,32,82,101, +103,117,108,97,114,78,105,109,98,117,115,32,83,97,110,115,32,76,0,0,0,0,1, +0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0, +18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32, +0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47, +0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62, +0,63,0,64,0,65,0,66,0,67,0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77, +0,78,0,79,0,80,0,81,0,82,0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92, +0,93,0,94,0,95,0,96,0,97,0,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0, +106,0,107,0,108,0,109,0,110,0,111,0,112,0,113,0,114,0,115,0,116,0,117,0,118, +0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0, +131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143, +0,144,0,145,0,146,0,147,0,148,0,149,0,173,0,171,0,174,0,172,0,176,0,175,0, +177,0,154,0,180,0,178,0,181,0,179,0,184,0,182,0,185,0,183,0,186,0,189,0,187, +0,190,0,188,0,191,0,192,0,195,0,193,0,196,0,194,0,197,0,199,0,157,0,198,0, +202,0,200,0,203,0,201,0,205,0,204,0,206,0,209,0,207,0,210,0,208,0,213,0,211, +0,214,0,212,0,215,0,218,0,216,0,219,0,217,0,220,0,221,0,224,0,222,0,225,0, +223,0,226,0,228,0,167,0,162,0,227,1,135,0,150,0,164,0,169,1,136,1,137,0,161, +0,166,0,168,0,159,0,153,0,156,0,155,0,158,0,163,0,170,0,165,1,138,0,151,0, +160,0,152,0,233,2,0,1,0,3,0,5,0,47,0,64,0,163,1,64,1,195,2,101,2,116,2,170, +2,224,3,12,3,32,3,42,3,59,3,75,3,99,3,183,3,215,4,60,4,187,4,246,5,83,5,195, +5,241,6,115,6,225,6,252,7,23,7,54,7,74,7,106,7,200,8,162,8,187,9,72,9,175, +9,237,10,3,10,39,10,152,10,200,10,221,11,26,11,80,11,104,11,161,11,206,11, +232,12,45,12,156,13,4,13,26,13,56,13,121,13,154,13,207,14,6,14,26,14,42,14, +71,14,92,14,121,14,150,14,166,14,182,14,208,15,39,15,119,15,210,15,232,15, +253,16,143,16,208,16,243,17,44,17,94,17,115,17,209,17,252,18,21,18,116,18, +205,19,9,19,31,19,89,19,120,19,153,19,200,19,251,20,12,20,28,20,115,20,134, +20,220,21,46,21,87,21,179,22,98,22,111,22,198,23,55,24,2,24,122,24,146,24, +169,24,182,24,190,24,199,24,244,25,28,25,44,25,78,25,129,25,152,25,206,25, +230,26,6,26,25,26,46,26,60,26,100,26,215,27,55,27,68,27,81,27,94,27,156,27, +173,27,219,27,238,28,10,28,34,28,108,28,124,28,185,28,198,28,216,29,29,29, +183,29,231,30,101,30,235,31,51,31,247,32,12,32,53,32,173,33,51,33,173,33, +222,33,253,34,28,34,59,34,141,34,186,35,99,35,179,35,224,35,253,36,26,36, +68,36,114,36,141,36,168,36,195,37,52,37,101,37,133,37,165,37,197,38,34,38, +63,38,107,38,172,38,201,38,230,39,26,39,49,39,116,39,161,40,53,40,88,40,124, +40,160,40,231,41,19,41,170,41,217,41,249,42,33,42,65,42,115,42,145,42,175, +42,205,43,48,43,94,43,128,43,162,43,196,44,34,44,65,44,127,44,168,44,209, +44,250,45,21,45,47,45,174,46,2,46,44,46,186,46,199,47,33,47,60,47,83,47,100, +47,156,47,174,47,221,48,1,48,75,48,100,48,217,49,22,49,97,49,200,50,53,50, +55,50,79,50,108,50,190,124,14,124,14,124,139,243,248,241,159,18,247,16,223, +56,222,19,208,247,100,249,109,21,56,251,230,6,161,251,115,178,139,161,247, +115,5,19,224,251,179,4,55,35,223,6,14,201,191,232,206,232,3,191,249,89,21, +32,10,206,22,32,10,14,119,159,247,83,207,247,66,207,1,248,121,249,77,21,62, +139,104,251,88,251,17,139,175,247,88,63,139,103,251,88,251,13,139,139,71, +247,0,139,108,251,66,251,6,139,139,71,240,139,101,251,103,215,139,5,178,247, +103,247,16,139,101,251,103,215,139,178,247,103,247,9,139,139,207,34,139,170, +247,66,245,139,139,207,46,139,5,50,71,21,108,251,66,251,17,139,171,247,66, +5,14,185,220,247,8,198,247,26,221,3,247,135,249,150,21,85,7,251,20,123,70, +69,139,251,6,139,76,163,90,186,105,165,120,166,128,212,117,8,251,164,7,94, +145,101,159,116,170,124,162,135,156,133,204,8,60,6,132,251,31,215,56,247, +33,130,8,36,198,242,7,193,143,176,150,172,159,197,175,173,208,139,217,139, +210,112,189,81,172,113,154,126,144,47,167,8,247,141,7,206,136,186,88,140, +66,8,218,6,139,247,6,66,213,251,13,148,8,193,7,80,252,1,21,60,160,102,178, +139,200,139,205,181,182,213,149,8,198,251,228,21,241,109,171,109,139,73,139, +100,124,104,112,113,115,116,114,130,96,134,8,14,248,232,119,159,120,209,247, +93,209,160,209,247,94,209,18,168,208,247,95,208,247,40,208,247,95,208,19, +191,128,247,91,249,65,21,46,62,62,45,45,216,62,233,232,216,216,231,31,236, +64,215,43,30,69,4,196,184,94,82,84,93,94,84,83,93,185,194,195,185,184,194, +31,248,46,233,21,252,31,253,109,205,139,248,31,249,109,5,152,252,23,21,46, +62,62,46,31,19,103,128,45,216,62,233,231,217,216,231,235,64,215,43,30,69, +4,196,184,94,82,85,93,94,84,83,93,184,195,194,185,184,194,31,14,248,10,116, +217,84,159,248,255,209,18,191,223,136,221,247,65,218,19,172,248,129,247,226, +21,140,103,127,91,119,104,8,251,25,247,55,5,243,198,173,182,139,211,8,231, +71,204,44,44,63,70,51,30,139,92,158,101,201,61,8,19,176,251,16,67,101,89, +139,48,139,251,12,221,60,247,15,139,188,139,186,152,175,162,160,152,157,154, +177,176,8,19,108,201,61,247,1,139,251,14,247,43,5,176,196,160,205,139,199, +8,251,180,236,21,78,209,130,156,139,174,8,191,173,173,191,189,176,103,90, +30,139,94,114,110,61,90,8,19,144,247,25,251,186,21,83,80,96,116,87,139,67, +139,80,197,139,209,139,195,170,179,230,197,8,14,68,249,5,243,1,204,232,3, +204,249,109,21,33,10,14,179,249,89,159,1,212,220,3,247,128,249,109,21,39, +251,23,76,251,74,139,251,49,139,251,50,202,251,74,239,251,23,8,194,6,51,247, +35,90,247,60,139,247,52,139,247,51,188,247,61,227,247,34,8,14,179,249,89, +159,1,247,67,220,3,232,251,104,21,239,247,23,202,247,74,139,247,49,139,247, +50,76,247,74,39,247,23,8,84,6,227,251,35,188,251,60,139,251,52,139,251,51, +90,251,61,51,251,34,8,14,235,249,89,159,1,247,52,249,109,21,144,251,4,33, +177,120,80,247,0,109,70,50,189,103,202,232,201,46,190,175,69,228,247,0,169, +120,198,33,101,144,247,4,5,14,247,183,129,159,247,79,209,1,247,149,209,3, +248,170,247,159,21,34,10,14,124,139,243,1,226,243,21,35,10,14,179,247,132, +211,1,247,176,247,204,21,251,130,67,247,130,6,14,124,139,243,1,226,243,3, +247,83,243,21,35,35,243,6,14,124,119,159,249,89,159,1,247,121,249,109,21, +251,129,253,129,194,139,247,129,249,129,5,14,116,212,248,217,217,1,182,229, +247,176,229,3,247,167,249,89,21,73,139,79,110,102,90,93,77,116,44,139,251, +23,8,251,131,219,251,19,247,44,247,42,221,247,19,247,125,30,139,247,30,117, +231,92,203,102,189,80,167,72,139,8,61,4,234,186,43,251,82,251,93,93,45,41, +46,92,237,247,86,247,86,186,234,234,31,14,139,249,89,1,247,151,227,3,247, +151,248,141,21,252,141,227,249,89,81,7,108,251,1,119,124,251,28,122,8,76, +7,14,139,226,248,181,216,1,248,57,229,3,248,142,226,21,252,9,6,148,197,171, +176,226,190,8,239,193,5,238,193,190,212,139,226,139,198,115,194,97,177,97, +177,87,157,72,139,49,139,72,107,100,79,114,101,128,95,137,67,8,227,6,142, +187,145,168,151,162,162,182,185,165,192,139,219,139,199,82,139,63,139,83, +106,91,76,103,8,47,87,5,251,40,55,96,72,131,251,48,8,248,108,6,14,116,217, +248,213,216,18,248,31,229,70,229,19,208,247,113,247,217,21,150,139,176,140, +5,236,189,95,54,50,84,86,47,31,43,139,92,187,133,242,8,51,6,143,82,149,102, +156,107,175,71,209,104,236,139,247,38,139,233,226,139,247,26,139,229,104, +189,54,168,8,19,224,205,165,172,189,139,210,139,247,14,58,212,251,27,139, +251,35,139,63,61,136,251,43,8,227,6,140,182,143,163,150,161,159,178,183,163, +194,139,217,139,186,93,139,64,139,89,121,109,100,123,115,129,108,135,77,138, +8,14,139,249,89,252,175,218,18,247,219,227,19,96,247,219,247,62,21,19,160, +251,62,227,7,19,96,247,62,244,218,34,7,19,160,248,96,74,7,251,214,252,82, +5,19,96,46,7,247,191,218,21,251,114,139,247,114,247,202,5,14,116,217,247, +226,217,247,47,226,1,248,59,229,3,248,112,249,89,21,252,2,139,86,252,22,220, +139,5,180,188,173,156,194,139,8,234,199,74,34,37,80,77,43,31,62,139,92,178, +118,219,8,51,6,151,81,149,111,160,113,179,85,211,108,219,139,8,247,35,239, +243,247,42,247,32,46,235,251,28,31,89,139,99,126,98,109,8,167,247,90,247, +187,139,5,14,116,217,247,200,217,202,159,246,217,1,182,234,247,177,229,3, +248,134,248,160,21,122,247,8,63,208,251,0,139,61,139,69,101,97,76,95,70,119, +52,139,251,21,139,251,11,157,63,181,76,177,82,201,108,217,139,8,247,27,236, +239,247,31,247,24,49,232,251,19,31,69,139,84,112,101,87,140,247,65,195,235, +240,139,201,139,182,100,153,71,8,251,17,251,53,21,224,192,80,44,50,79,74, +58,57,77,207,230,227,199,200,226,31,14,139,249,89,52,226,18,19,64,248,156, +249,89,21,252,110,52,248,19,6,19,128,251,61,251,133,70,251,40,86,251,125, +8,233,6,178,247,119,228,247,87,247,52,247,105,8,14,116,217,247,171,213,247, +115,217,18,176,229,74,229,247,138,229,74,229,19,236,248,27,248,9,21,212,183, +163,175,139,206,8,247,3,52,217,251,18,251,17,51,61,251,3,30,139,73,163,103, +211,94,8,19,242,58,100,99,80,139,61,8,251,22,237,49,247,32,247,32,237,229, +247,21,30,139,218,99,198,57,178,8,19,236,251,8,247,150,21,214,187,95,70,73, +90,95,65,65,90,183,206,31,207,188,183,213,30,19,242,251,189,4,227,199,83, +56,55,79,83,49,53,79,196,222,31,222,199,195,227,30,14,116,217,247,82,217, +247,201,216,1,177,229,247,177,235,3,192,247,54,21,156,251,8,215,70,247,0, +139,217,139,210,177,180,202,184,208,159,226,139,247,21,139,247,11,121,215, +97,202,100,196,77,170,61,139,8,251,27,42,39,251,31,251,24,229,46,247,20,31, +206,139,188,163,185,194,138,251,65,83,43,38,139,77,139,96,178,125,207,8,247, +20,248,106,21,221,201,71,47,52,78,77,53,54,86,198,234,229,199,204,220,31, +14,124,139,243,247,208,243,1,247,2,243,3,247,106,243,21,35,35,243,6,248,160, +4,35,35,243,6,14,124,139,243,247,208,243,1,247,3,243,3,247,107,248,160,21, +35,35,243,6,34,251,208,21,35,10,14,247,183,130,159,1,184,247,90,21,248,125, +251,99,139,218,252,30,247,56,248,30,247,53,139,218,252,125,251,99,5,14,247, +183,247,3,209,241,209,1,248,170,247,245,21,36,10,37,4,36,10,14,247,183,130, +159,1,248,175,247,159,21,252,125,247,99,139,60,248,30,251,56,252,30,251,53, +139,60,248,125,247,99,5,14,139,243,248,195,217,1,247,132,229,228,229,3,247, +222,247,91,21,186,7,139,183,150,156,207,202,214,207,164,184,139,205,8,247, +9,56,214,251,22,251,36,64,59,251,46,30,224,6,139,185,144,167,151,163,158, +176,179,160,192,139,216,139,190,93,139,71,139,93,117,100,86,92,80,86,139, +139,122,116,118,111,132,116,139,103,8,84,7,229,44,21,49,35,229,6,14,249,102, +251,34,216,247,14,209,74,203,247,224,203,247,34,216,18,173,224,247,37,229, +248,146,226,19,55,249,45,248,137,21,117,73,5,114,196,97,169,84,139,8,251, +26,251,15,251,24,251,37,35,209,60,232,31,192,139,182,161,185,189,8,19,223, +148,88,177,113,202,139,213,139,200,168,190,199,194,203,170,220,139,217,139, +247,95,251,85,247,61,251,125,139,251,11,139,251,18,90,51,59,41,50,79,251, +26,139,251,23,8,251,114,247,94,251,70,247,145,30,213,139,219,154,211,166, +8,111,206,5,57,116,82,130,85,139,8,251,104,251,55,247,39,247,83,247,102,247, +74,247,73,247,103,247,83,247,53,251,32,251,59,251,9,56,251,5,54,112,116,159, +163,31,139,148,143,157,147,162,8,229,247,172,5,251,125,96,21,195,139,180, +97,136,85,137,89,112,55,114,102,8,19,55,111,98,102,115,102,139,8,84,95,191, +205,247,4,216,241,223,31,14,248,10,139,159,247,91,217,248,48,159,1,248,110, +247,111,21,37,10,247,147,217,21,38,10,14,248,10,139,221,247,143,221,247,124, +221,18,218,232,247,218,232,78,232,19,244,218,22,247,221,6,208,139,190,158, +178,181,175,177,159,191,139,196,139,227,99,192,46,175,8,19,248,205,170,174, +193,139,213,139,192,119,186,101,173,101,174,89,155,69,139,8,251,188,6,232, +251,206,21,247,124,247,72,7,191,139,168,132,164,120,165,119,153,109,139,99, +139,100,125,108,113,119,114,120,110,132,87,139,8,251,72,251,225,21,247,143, +247,119,7,184,139,169,128,161,115,8,19,244,161,116,151,107,139,103,139,104, +127,107,117,116,117,115,109,128,94,139,8,14,248,65,116,221,248,236,221,1, +187,232,3,249,42,248,139,21,110,247,52,47,217,251,52,139,41,139,60,108,85, +79,73,67,103,35,139,251,10,139,251,12,176,36,208,68,195,81,211,112,234,139, +247,70,139,239,235,161,247,85,8,43,6,131,89,129,105,124,110,109,79,77,105, +61,139,8,251,37,47,247,8,247,74,247,79,227,247,7,247,33,31,198,139,194,121, +169,111,166,114,154,108,150,85,8,14,248,65,139,221,248,201,221,1,228,232, +248,28,232,3,228,22,247,173,6,247,76,247,5,247,30,247,119,247,118,251,4,247, +30,251,77,31,251,173,6,232,253,27,21,248,201,247,64,7,247,36,215,42,251,78, +251,76,63,41,251,36,31,14,248,10,139,221,247,142,221,247,125,221,1,229,232, +3,247,75,247,224,21,39,10,14,247,210,139,159,247,204,221,247,125,221,1,229, +232,3,247,75,247,224,21,247,240,221,251,240,247,125,248,32,221,252,125,253, +109,232,6,14,248,121,116,221,247,136,221,247,166,221,1,183,232,248,126,221, +3,249,89,248,21,21,251,196,57,247,114,119,6,251,22,43,45,251,25,30,65,139, +72,166,96,186,91,191,110,226,139,229,139,247,71,241,247,10,247,46,139,247, +3,139,219,82,159,45,8,234,6,113,247,40,251,4,224,251,59,139,50,139,67,116, +82,92,55,69,91,251,5,139,251,23,139,251,116,247,29,251,48,247,89,139,238, +139,218,176,210,218,8,162,42,198,139,5,14,248,65,139,159,247,204,221,247, +187,159,18,222,232,46,233,248,10,232,19,244,248,187,247,224,21,251,224,232, +249,109,46,251,207,252,11,247,207,7,19,236,46,253,109,233,247,224,6,14,124, +139,159,249,69,159,1,239,233,3,247,86,249,109,21,45,253,109,233,6,14,247, +99,116,217,249,34,159,1,156,234,247,113,232,3,247,225,249,109,21,252,149, +7,139,81,133,106,122,114,121,111,105,122,102,139,8,69,100,186,224,31,186, +44,75,7,251,10,217,64,247,17,247,19,218,218,247,18,30,248,183,7,14,248,10, +139,159,249,69,159,1,218,232,3,247,64,247,147,21,247,11,247,11,247,149,252, +10,247,2,139,251,192,248,68,247,189,247,189,251,12,139,251,255,252,5,139, +248,5,46,139,139,253,109,232,139,5,14,139,221,249,7,159,1,219,232,3,247,65, +249,109,21,46,253,109,248,89,221,251,252,6,14,248,176,139,159,249,69,159, +1,214,227,248,146,227,3,248,104,22,247,97,248,247,139,252,247,227,139,139, +249,109,251,21,139,251,104,253,15,251,108,249,15,251,21,139,139,253,109,227, +139,139,248,247,247,99,252,247,5,14,248,65,139,159,249,69,159,1,215,227,248, +30,227,3,249,26,249,109,21,51,252,232,6,252,17,248,232,38,139,139,253,109, +227,139,139,248,227,248,13,252,227,244,139,5,14,248,121,116,221,248,236,221, +1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10,14,248,10,139, +159,247,181,221,247,148,221,1,230,232,247,228,236,3,247,76,247,201,21,247, +121,6,196,139,184,156,178,174,183,179,158,186,139,206,8,247,29,58,216,251, +36,30,251,193,253,109,232,6,248,27,4,247,148,247,86,7,228,192,91,59,59,86, +91,50,31,14,248,121,116,221,248,236,221,1,177,232,248,154,232,3,249,113,138, +21,45,216,5,208,215,173,233,139,247,7,8,247,118,251,34,247,46,251,102,251, +102,251,34,251,46,251,120,251,120,247,34,251,46,247,102,30,211,139,199,155, +198,174,8,244,52,5,251,97,247,156,21,93,83,213,77,5,96,119,106,131,95,139, +8,251,47,36,247,12,247,72,247,72,243,247,12,247,47,247,47,243,251,12,251, +71,31,139,45,114,66,85,78,8,14,248,65,139,159,247,186,221,247,143,221,1,232, +232,248,4,236,3,247,78,247,206,21,247,132,6,222,176,99,49,31,138,74,5,139, +94,147,95,152,109,8,247,5,162,6,104,163,132,165,137,236,138,247,12,120,175, +60,173,221,179,172,190,139,222,8,247,18,60,208,251,35,30,251,228,253,109, +232,6,248,32,4,247,143,247,117,7,191,139,169,131,162,119,164,118,152,106, +139,95,8,53,95,100,40,30,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,14,247,210,139,159,249,7,221,1,247,153,232,3,247, +246,249,27,21,247,131,221,252,208,57,247,132,253,27,232,6,14,248,65,116,221, +249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68,79,251, +9,30,85,139,95,152,104,164,103,167,122,176,139,194,8,248,148,46,252,148,7, +251,40,245,47,247,65,247,63,247,2,233,247,38,30,248,148,7,14,248,10,139,159, +249,69,159,1,248,28,22,247,145,249,109,40,139,251,94,252,253,251,106,248, +253,39,139,247,154,253,109,5,14,249,31,139,159,249,69,159,1,249,124,22,247, +77,249,109,35,139,251,26,252,228,251,58,248,228,39,139,251,54,252,228,251, +29,248,228,35,139,247,79,253,109,241,139,247,55,248,235,247,60,252,235,5, +14,248,10,139,159,249,69,159,1,248,27,248,10,21,247,138,247,247,251,3,139, +251,80,251,178,251,79,247,178,251,5,139,247,134,251,247,251,150,252,10,247, +5,139,247,92,247,196,247,91,251,196,247,7,139,5,14,248,10,139,159,249,69, +159,1,247,186,232,3,248,23,247,178,21,43,10,14,247,210,139,221,248,201,221, +1,248,217,249,109,21,44,10,14,124,251,104,211,249,177,211,1,203,222,3,247, +142,249,109,21,251,78,254,65,247,78,211,36,249,177,242,6,14,124,119,159,249, +89,159,1,186,249,109,21,84,139,247,129,253,129,194,139,5,14,124,251,104,211, +249,177,211,1,247,18,222,3,162,251,104,21,247,78,250,65,251,78,67,242,253, +177,36,6,14,247,68,247,89,249,89,21,251,45,252,16,208,139,247,13,247,192, +247,14,251,192,208,139,251,47,248,16,5,14,251,68,189,1,248,214,251,18,21, +252,236,89,248,236,6,14,68,248,113,243,1,204,232,3,247,50,248,113,21,45,10, +14,116,212,248,48,216,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38, +247,71,21,47,10,14,116,217,84,159,248,77,217,247,62,159,18,193,222,247,191, +226,19,92,193,249,109,21,253,109,214,206,7,19,188,179,78,192,110,212,139, +8,247,30,229,247,5,247,66,247,62,53,244,251,30,31,67,139,88,112,100,80,8, +247,168,7,247,38,251,160,21,232,199,58,251,17,251,11,77,58,48,51,81,219,247, +15,247,15,197,219,227,31,14,247,99,116,216,248,44,216,1,170,226,3,248,107, +247,240,21,135,190,128,172,119,168,103,188,76,168,66,139,8,251,33,47,251, +4,251,66,251,61,229,32,247,34,31,247,17,139,218,214,149,247,20,8,55,6,125, +55,96,97,68,139,8,47,84,214,247,16,247,23,193,217,230,31,209,139,183,98,149, +66,8,14,116,217,84,159,248,77,217,247,62,159,18,165,226,247,191,222,19,188, +248,131,249,109,21,56,251,163,6,104,192,83,167,69,139,8,251,28,50,251,1,251, +59,251,69,226,251,1,247,33,31,211,139,189,166,184,204,8,19,124,70,213,7,251, +122,248,97,21,229,196,59,251,17,31,19,172,251,13,81,59,51,47,78,220,247,14, +247,14,200,220,230,30,14,116,216,247,72,207,247,52,216,1,248,149,247,126, +21,48,10,141,207,21,49,10,14,124,139,159,248,72,207,247,27,212,1,227,222, +3,247,150,248,160,21,50,10,14,251,110,209,247,17,216,248,44,216,104,159,18, +168,226,247,188,216,19,28,248,48,248,160,21,63,7,19,236,97,201,88,168,72, +139,251,25,139,49,251,8,139,251,62,139,53,162,69,182,89,178,95,195,113,194, +139,205,139,185,167,186,205,8,112,7,139,68,130,96,118,110,117,108,96,121, +88,139,101,139,105,149,116,157,120,154,131,153,134,170,8,54,6,148,40,216, +80,247,15,139,217,139,206,164,173,181,179,187,154,205,139,247,15,8,19,28, +248,74,7,19,108,251,120,77,21,229,192,63,251,23,251,17,85,63,51,48,84,216, +247,19,31,247,18,195,217,228,30,14,139,159,248,82,212,247,62,159,1,209,222, +247,142,222,3,209,249,109,21,253,109,222,247,181,7,246,195,209,225,30,166, +139,166,130,159,124,163,122,149,114,139,102,8,251,255,222,248,32,7,227,76, +194,37,30,65,139,94,116,90,75,8,247,169,7,14,68,139,159,248,120,159,239,244, +18,205,223,56,222,19,232,247,42,248,160,21,56,252,160,222,6,19,240,249,109, +4,55,34,223,6,14,68,251,110,212,249,29,159,239,244,1,209,222,3,209,248,160, +21,252,236,7,87,122,122,88,30,136,139,139,139,122,140,8,68,7,149,137,144, +138,152,139,8,233,188,177,210,31,249,13,7,247,97,4,56,34,222,6,14,247,99, +139,159,248,120,159,247,77,159,1,197,222,3,247,33,249,109,21,56,253,109,222, +247,96,6,220,219,247,69,251,176,242,139,251,106,247,235,247,74,247,73,32, +139,251,114,251,114,5,14,68,139,159,249,69,159,1,207,223,3,247,44,249,109, +21,55,253,109,223,6,14,248,176,139,159,248,82,212,104,159,18,209,216,62,223, +247,112,223,247,112,223,19,174,209,248,160,21,252,160,223,247,221,7,19,206, +215,194,200,207,201,174,101,72,30,251,253,223,247,221,7,215,194,200,207,200, +175,100,73,30,251,253,223,248,29,7,233,85,191,41,30,69,139,97,118,90,80,108, +195,97,163,71,139,8,19,48,69,139,93,113,94,76,8,213,7,14,139,159,248,82,212, +104,159,18,209,216,62,223,247,142,222,19,172,209,248,160,21,252,160,223,247, +181,7,19,204,51,10,19,48,61,139,89,109,93,66,8,227,7,14,116,216,248,44,216, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,14,251,110, +159,247,67,217,248,42,217,104,159,18,193,216,62,223,247,190,226,19,230,193, +251,110,21,223,247,165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59, +247,68,53,247,2,251,31,31,19,152,68,139,82,107,100,77,8,218,7,19,150,62,6, +19,102,247,122,76,21,231,199,58,251,17,251,11,78,58,48,51,81,219,247,15,31, +247,15,197,219,227,30,14,251,110,159,247,67,217,248,42,217,104,159,18,165, +226,247,191,222,19,156,248,131,251,110,21,249,122,65,69,7,19,236,100,194, +80,169,70,139,8,251,30,49,251,5,251,66,251,62,225,34,247,30,31,212,139,189, +165,178,196,8,251,170,7,251,38,249,59,21,228,196,59,251,18,251,12,81,59,51, +47,78,220,247,14,247,13,200,221,231,31,14,179,139,159,248,120,159,134,159, +18,208,216,62,223,19,200,208,248,160,21,252,160,223,247,164,7,139,214,158, +188,179,168,165,158,164,145,197,140,8,224,7,19,48,125,141,132,140,128,139, +85,139,98,107,91,61,8,19,80,234,7,14,247,99,116,216,248,44,216,1,186,226, +247,130,226,3,248,74,248,14,21,54,10,14,124,116,212,248,42,207,1,224,222, +3,247,146,248,160,21,53,247,36,56,251,36,68,71,210,252,32,6,86,175,109,204, +30,159,139,159,141,167,144,8,209,7,128,136,126,138,123,139,8,103,129,149, +176,31,247,251,225,7,14,116,212,89,159,248,120,159,18,204,222,247,143,222, +64,214,19,120,248,118,22,55,10,19,184,56,10,19,68,57,10,14,247,99,139,159, +248,120,159,1,247,177,22,247,93,248,160,45,139,251,40,252,61,251,32,248,61, +45,139,247,76,252,160,5,14,248,65,139,159,248,120,159,1,248,190,22,247,46, +248,160,45,139,35,252,44,36,248,44,37,139,39,252,44,32,248,44,47,139,247, +44,252,160,233,139,240,248,47,245,252,47,5,14,247,99,139,159,248,120,159, +1,247,184,247,163,21,247,68,247,145,45,139,251,18,251,82,251,18,247,82,44, +139,247,67,251,149,251,77,251,159,234,139,247,25,247,93,247,23,251,93,236, +139,5,14,247,99,251,110,221,249,20,159,1,248,24,248,160,21,58,10,14,247,99, +139,212,248,14,212,1,248,79,248,160,21,59,10,14,180,251,104,204,249,191,204, +1,247,13,216,3,247,168,249,109,21,93,6,70,99,91,56,31,251,59,7,139,46,120, +106,80,127,8,70,7,198,127,158,105,139,47,8,251,59,7,56,179,91,208,30,185, +204,124,6,90,125,154,191,31,247,73,7,139,222,113,188,83,165,200,163,160,180, +139,231,8,247,73,7,191,153,154,188,30,154,6,14,106,249,89,159,1,239,199,3, +239,249,109,21,254,65,199,250,65,7,14,180,251,104,204,249,191,204,1,247,1, +216,3,168,251,104,21,186,6,209,179,187,222,31,247,59,7,139,231,158,173,196, +151,8,208,7,82,151,120,173,139,231,8,247,59,7,222,99,187,69,30,92,74,155, +6,189,153,124,87,31,251,73,7,139,57,165,89,195,113,83,114,113,90,139,56,8, +251,73,7,87,125,124,89,30,123,6,14,247,183,247,160,207,174,206,1,248,91,248, +47,21,140,86,124,117,102,139,125,139,123,144,119,151,8,251,9,208,5,122,149, +120,145,121,139,74,139,101,88,134,45,8,192,6,141,162,141,149,143,149,149, +161,156,152,157,139,149,139,162,131,149,133,8,237,76,5,165,123,169,129,164, +139,8,203,180,189,216,31,155,7,14,179,248,56,243,18,247,13,223,56,222,19, +160,247,14,251,97,21,222,247,230,6,117,247,115,100,139,117,251,115,5,19,192, +138,247,179,21,223,243,55,6,14,191,226,247,23,181,3,247,204,248,98,21,200, +134,179,97,146,72,8,223,6,133,247,6,70,208,251,9,147,8,228,97,49,7,251,27, +125,56,251,0,139,251,55,139,251,51,222,35,247,27,127,8,41,181,236,7,247,8, +145,214,216,146,247,12,8,55,6,127,60,101,98,75,132,8,97,141,21,56,152,91, +211,139,247,5,139,247,13,184,210,225,155,8,14,116,231,93,216,247,113,194, +247,167,217,18,193,232,152,224,19,124,248,2,248,12,21,251,52,6,133,151,132, +152,136,142,102,204,133,156,139,176,139,216,195,190,224,139,226,139,185,88, +142,36,8,227,6,138,200,131,178,120,172,103,201,68,176,54,139,251,26,139,35, +46,139,251,13,139,95,146,120,185,63,8,58,84,247,2,6,154,114,148,111,139,114, +139,78,106,88,47,60,8,187,73,5,177,164,175,151,174,139,160,139,163,135,160, +132,8,19,140,222,110,165,133,176,139,191,139,178,156,179,178,8,97,205,5,110, +119,111,129,113,139,121,139,119,143,98,151,8,19,108,101,151,121,142,113,139, +96,139,99,126,100,113,229,230,167,185,139,191,139,158,134,162,129,168,8,247, +28,6,14,251,18,119,159,1,247,170,249,89,21,60,10,14,139,249,89,252,170,190, +216,190,18,247,129,227,19,48,248,131,247,246,21,251,43,139,5,19,144,247,93, +247,247,54,139,251,71,251,214,251,77,247,214,54,139,5,19,112,247,97,251,247, +251,43,139,139,88,247,64,139,139,62,251,64,139,139,88,247,64,139,5,19,144, +251,67,227,7,19,112,247,67,247,62,190,251,62,216,247,62,7,14,251,104,217, +248,162,209,247,88,219,1,248,103,248,98,21,251,5,139,151,209,5,154,221,171, +183,186,139,154,139,151,135,164,125,8,169,218,5,109,152,116,145,113,139,99, +139,96,121,107,109,109,110,119,100,128,83,8,117,35,251,17,139,139,69,247, +5,139,61,252,49,5,124,62,109,103,88,139,119,139,125,144,122,150,8,122,55, +5,152,132,157,136,163,139,189,139,190,161,173,174,171,172,159,186,152,209, +8,214,248,33,247,18,139,5,14,251,105,216,249,20,159,247,20,216,18,182,218, +121,229,247,58,229,69,223,102,218,19,234,248,100,248,160,21,139,147,139,159, +5,245,68,210,35,35,58,66,47,30,139,101,152,111,170,103,8,19,244,65,100,108, +94,139,73,139,74,166,92,204,94,8,247,62,251,9,5,178,112,155,113,139,104,139, +88,100,104,82,139,103,139,110,154,120,168,125,158,135,159,139,178,8,54,6, +139,92,141,127,148,112,163,69,206,96,223,139,246,139,219,211,139,235,139, +182,126,169,99,184,8,19,233,211,166,176,192,139,215,139,211,111,182,58,191, +8,251,38,233,5,97,167,124,159,139,168,8,188,177,175,190,30,19,242,198,177, +99,77,31,139,122,139,130,5,251,84,251,187,21,86,178,126,159,139,179,139,179, +158,166,191,173,8,247,53,251,1,5,19,225,188,105,163,102,139,98,139,99,113, +102,92,114,8,14,247,51,216,247,101,216,1,228,218,247,105,218,3,248,121,247, +82,21,85,193,5,158,170,149,171,139,173,139,171,129,175,123,164,8,194,194, +82,197,80,86,5,113,157,104,149,102,139,103,139,107,130,110,122,8,84,194,83, +86,193,84,5,119,111,127,101,139,103,139,103,151,100,159,112,8,91,90,195,82, +190,190,5,165,123,174,130,172,139,178,139,173,149,166,159,8,192,86,5,251, +45,247,201,21,199,186,92,80,83,90,92,82,80,91,186,196,197,187,186,197,31, +14,37,187,233,3,187,249,89,21,139,251,3,166,251,26,179,139,166,247,26,139, +247,3,5,14,179,248,113,243,1,187,232,204,232,3,247,33,248,113,21,45,10,247, +143,22,45,10,14,237,247,119,21,61,10,247,97,50,21,61,10,14,179,230,247,119, +21,61,10,14,179,247,131,247,209,21,62,10,14,247,99,139,159,248,72,207,239, +244,69,212,18,221,222,247,80,222,19,220,247,144,248,160,21,50,10,247,76,207, +21,56,252,160,222,6,19,44,249,109,4,56,34,222,6,14,247,99,139,159,248,72, +207,247,27,212,116,159,18,226,222,247,69,222,19,236,247,149,248,160,21,50, +10,19,156,247,65,247,165,21,56,253,109,222,6,14,247,132,211,1,248,197,247, +204,21,252,202,67,248,202,6,14,248,56,221,1,247,123,227,3,248,149,248,138, +21,251,86,247,99,51,251,99,251,85,57,247,85,252,233,227,248,233,247,86,6, +14,170,221,247,199,221,1,247,123,227,3,248,149,248,138,21,251,86,247,99,51, +251,99,251,85,57,247,85,251,199,251,85,57,247,85,251,100,227,247,100,247, +86,6,221,251,86,247,199,247,86,7,14,124,247,194,247,17,1,226,247,16,3,247, +103,248,63,21,251,16,251,17,247,16,6,14,247,136,249,45,203,1,247,147,203, +221,203,3,248,158,249,109,21,251,142,6,251,18,41,34,251,27,31,139,65,169, +70,191,96,174,110,174,127,194,136,8,252,72,203,249,222,221,253,222,203,249, +222,196,7,14,196,247,67,248,106,21,70,83,83,70,70,195,83,208,207,196,195, +206,210,84,195,69,31,14,68,139,243,1,204,232,3,204,243,21,35,187,7,141,81, +124,112,103,134,8,101,7,200,144,172,185,139,219,8,240,7,14,179,139,243,1, +186,232,206,232,3,186,243,21,33,10,206,22,33,10,14,179,248,241,243,1,188, +232,206,232,3,188,249,89,21,33,10,206,22,33,10,14,247,144,247,209,21,62,10, +247,91,228,21,62,10,14,249,87,139,243,1,247,7,243,247,121,243,247,121,243, +3,247,111,243,21,35,35,243,6,247,225,243,21,35,35,243,6,247,225,243,21,35, +35,243,6,14,249,87,117,199,247,73,199,247,40,199,247,73,199,129,159,18,148, +198,247,73,198,165,198,247,73,198,200,198,247,73,198,19,55,224,247,50,249, +108,21,57,72,71,57,56,206,71,222,220,207,207,220,31,224,73,206,55,30,79,4, +190,179,99,88,90,98,98,90,89,98,180,189,188,180,180,188,31,19,207,224,247, +226,209,21,252,31,253,138,205,139,248,31,249,138,5,64,252,95,21,63,10,79, +4,64,10,247,252,199,21,63,10,79,4,64,10,14,247,210,251,109,217,248,195,243, +1,234,229,229,229,3,247,167,247,217,21,92,7,139,94,129,123,69,76,64,71,114, +95,139,72,8,251,9,222,64,247,23,247,36,214,219,247,46,30,54,6,139,93,134, +111,127,115,120,102,99,118,86,139,62,139,87,185,139,207,139,185,161,178,192, +186,198,192,139,139,157,162,160,167,146,162,139,175,8,194,7,49,234,21,229, +243,49,6,14,179,249,100,159,1,247,27,249,120,21,65,10,14,179,249,100,159, +1,247,80,249,120,21,66,10,14,179,249,101,159,1,247,8,249,121,21,67,10,14, +179,248,249,207,109,205,18,19,128,247,153,249,97,21,131,114,127,128,122,139, +127,139,113,146,114,149,8,19,64,98,156,131,141,118,139,94,139,109,103,128, +72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,128,68,10, +14,179,249,11,209,1,247,194,249,81,21,251,166,69,247,166,6,14,179,248,233, +208,185,159,1,154,249,112,21,140,100,145,120,153,119,166,102,184,119,195, +139,232,139,191,185,146,228,8,80,6,135,97,106,115,85,139,82,139,109,161,134, +183,8,14,179,248,248,243,1,247,7,243,3,247,111,249,96,21,35,35,243,6,14,179, +248,248,242,1,169,243,197,243,3,247,26,249,95,21,35,36,243,6,247,54,242,21, +35,36,243,6,14,179,248,215,183,226,183,1,218,183,227,183,3,247,59,249,134, +21,69,10,95,4,70,10,14,179,251,106,180,221,230,1,247,104,214,3,247,57,22, +97,47,151,132,5,151,145,146,141,151,139,8,168,156,125,116,113,116,120,108, +31,113,139,122,145,93,162,8,130,143,118,99,5,201,112,163,132,178,139,8,215, +186,175,196,182,110,163,89,31,131,139,132,139,126,137,8,162,195,5,14,179, +249,100,159,1,200,249,120,21,71,10,200,22,71,10,14,179,251,97,184,247,52, +159,1,196,212,3,247,46,22,78,117,103,98,139,91,139,100,160,113,181,123,161, +131,164,134,161,139,158,139,172,144,163,144,8,184,7,121,132,118,136,115,139, +92,139,114,158,139,174,139,181,160,162,212,180,8,14,179,249,101,159,1,247, +102,248,227,21,72,10,14,249,87,247,132,211,1,250,125,247,204,21,254,134,67, +250,134,6,14,249,87,139,221,247,24,221,175,221,247,125,221,1,248,104,232, +3,248,104,247,106,21,251,106,248,118,221,252,25,247,142,247,244,221,251,244, +247,125,248,7,221,253,2,7,251,191,253,109,242,139,224,247,106,5,247,161,221, +21,251,130,139,247,30,247,243,239,139,5,14,216,247,195,190,184,186,92,191, +247,131,191,18,176,197,247,40,196,19,220,247,212,247,246,21,251,169,88,247, +169,6,152,247,38,21,135,137,136,138,136,139,8,124,131,147,154,31,247,71,7, +202,98,170,58,30,57,139,94,102,137,68,8,198,6,146,182,155,152,184,139,8,182, +163,123,111,31,126,7,139,117,128,131,101,136,97,136,98,131,122,132,102,123, +119,110,139,97,8,19,44,80,179,102,203,30,178,139,172,153,172,168,8,19,76, +145,108,155,127,172,139,151,139,146,140,152,144,8,19,44,49,247,4,21,104,97, +108,90,103,118,156,169,30,139,171,159,154,191,146,188,147,152,141,153,145, +8,14,139,221,249,7,159,1,219,232,3,247,65,248,42,21,247,215,46,252,9,7,59, +83,139,62,219,196,139,251,172,248,108,139,139,221,252,15,139,139,247,139, +247,63,247,14,139,215,5,14,248,121,116,221,248,236,221,1,174,232,248,154, +232,3,169,158,21,178,103,216,223,5,205,78,217,110,236,139,247,102,139,247, +34,247,46,139,247,119,139,241,109,233,85,207,8,228,236,99,175,52,44,5,77, +193,62,166,48,139,251,102,139,251,34,251,46,139,251,119,139,42,165,54,189, +69,8,202,207,21,109,191,123,202,139,208,139,247,71,243,247,12,247,47,139, +204,139,197,117,187,97,8,174,98,21,174,85,157,72,139,64,139,251,71,35,251, +12,251,47,139,68,139,78,164,90,188,8,14,249,87,119,221,77,221,247,137,221, +247,130,221,69,221,18,182,232,248,25,232,19,54,248,254,247,219,21,247,220, +221,251,220,247,130,247,228,221,252,65,63,6,19,142,97,199,80,167,57,139,66, +139,65,110,90,90,71,72,104,35,139,251,28,139,251,16,167,47,198,71,191,79, +213,107,224,139,220,139,196,168,185,204,8,19,102,65,248,70,221,251,233,7, +19,142,46,239,21,99,58,79,100,55,139,73,139,86,166,104,190,103,193,124,204, +139,240,139,241,154,204,175,193,174,190,192,166,206,139,223,139,198,100,179, +58,8,14,211,247,195,190,184,191,247,131,191,1,179,197,247,60,197,3,247,206, +247,246,21,251,155,88,247,155,6,251,24,248,75,21,49,87,76,251,0,251,1,191, +76,229,228,192,202,245,247,4,88,201,48,31,87,4,192,170,94,63,66,107,94,87, +87,107,184,214,213,171,184,191,31,14,248,232,116,212,66,216,247,72,207,247, +52,216,18,173,226,19,120,249,131,247,51,21,115,70,92,103,72,139,86,139,94, +163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133,187,124,178,105, +224,59,192,42,139,67,139,74,108,103,88,108,193,80,167,54,139,65,139,76,117, +104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,216,139,8,216,180, +112,88,31,117,7,139,100,120,125,71,133,55,132,88,129,107,125,77,113,108,93, +139,71,8,19,136,45,205,78,241,30,217,139,202,171,214,217,146,127,143,132, +144,131,8,19,72,174,87,205,108,216,139,247,10,139,223,207,160,247,6,8,19, +184,252,90,137,21,139,120,120,112,109,116,106,114,101,126,99,139,77,139,101, +171,139,191,139,194,175,166,229,152,228,152,156,143,167,151,8,219,183,21, +73,10,14,124,139,159,248,120,159,1,233,223,3,247,70,248,160,21,55,252,160, +223,6,14,68,139,159,249,69,159,1,202,222,3,247,38,248,57,21,247,200,56,251, +244,7,76,89,139,75,202,189,139,251,205,222,139,139,247,249,205,190,139,203, +5,14,247,210,116,216,248,44,216,1,175,226,247,192,226,3,248,165,248,147,21, +107,167,81,74,5,94,184,87,159,70,139,251,40,139,50,34,139,251,68,139,61,154, +80,172,90,8,73,65,171,111,200,208,5,179,98,195,118,206,139,247,40,139,227, +244,139,247,68,139,215,125,195,109,189,8,78,70,21,151,108,145,101,139,95, +139,251,18,82,61,46,139,97,139,104,155,110,171,8,116,178,21,125,172,132,176, +139,186,139,247,18,196,217,232,139,183,139,179,120,165,106,8,14,249,31,116, +216,247,72,207,247,52,216,1,179,226,3,249,184,247,51,21,116,70,92,103,72, +139,86,139,94,163,111,183,119,169,132,169,138,191,8,248,22,6,139,219,133, +187,124,178,105,225,59,191,41,139,58,139,68,100,98,72,99,209,72,175,50,139, +8,251,43,53,38,251,71,251,72,225,37,247,43,31,227,139,203,173,181,208,179, +73,208,102,224,139,247,11,139,222,207,160,247,6,8,252,247,247,195,21,233, +195,62,251,21,251,17,81,62,47,46,82,216,247,20,247,18,196,216,232,31,247, +130,251,52,21,73,10,14,247,210,119,159,139,159,249,11,217,18,247,18,222,247, +131,226,83,226,19,228,247,194,247,241,21,197,139,141,138,165,134,196,126, +173,90,139,71,8,50,80,77,53,30,111,139,131,139,139,61,5,156,136,149,138,156, +139,247,29,139,226,231,139,247,39,139,232,96,195,42,172,8,19,248,213,166, +174,185,139,210,139,247,2,59,213,251,10,139,78,139,82,119,98,104,103,107, +123,98,139,76,8,252,174,222,248,174,7,208,187,183,212,208,188,94,75,74,82, +93,59,30,130,6,14,248,10,139,159,247,91,217,248,48,159,221,242,1,247,94,243, +197,243,3,248,110,247,111,21,37,10,247,147,217,21,38,10,109,247,177,21,35, +36,243,6,247,54,242,21,35,36,243,6,14,248,10,139,159,247,91,217,248,48,159, +1,248,110,247,111,21,37,10,247,147,217,21,38,10,173,247,202,21,66,10,14,248, +10,139,159,247,91,217,248,48,159,1,248,110,247,111,21,37,10,247,147,217,21, +38,10,106,247,202,21,74,10,14,248,10,139,159,247,91,217,248,48,159,1,248, +110,247,111,21,37,10,247,147,217,21,38,10,91,247,203,21,75,10,14,248,10,139, +159,247,91,217,248,48,159,222,206,110,205,18,19,240,248,110,247,111,21,37, +10,247,147,217,21,38,10,237,247,179,21,131,114,128,127,121,139,127,139,112, +146,115,150,8,19,8,97,156,132,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,151,153,154,139,150,139,153,135,163,130,8,19,16,68,10,14,248,10,139,159, +247,91,217,248,48,159,188,183,226,183,1,247,139,183,227,183,3,248,110,247, +111,21,37,10,247,147,217,21,38,10,138,247,216,21,69,10,95,4,70,10,14,248, +65,251,106,180,221,247,41,248,237,221,1,187,232,247,149,214,3,248,15,116, +21,247,68,139,239,237,161,247,83,8,43,6,131,89,129,105,124,109,109,79,77, +105,61,139,8,251,37,47,247,8,247,75,247,79,227,247,7,247,34,31,197,139,194, +121,169,111,166,114,154,108,150,85,8,234,6,110,247,52,47,217,251,52,139,41, +139,60,108,85,79,73,67,103,34,139,251,9,139,251,34,192,251,12,230,74,182, +109,169,128,215,128,8,108,70,150,132,5,151,145,146,141,151,139,8,168,156, +125,116,113,116,120,108,31,114,139,120,145,94,162,8,130,143,118,99,5,200, +112,165,132,177,139,8,215,186,175,196,182,110,163,89,31,131,139,132,139,126, +137,8,14,248,65,139,221,247,149,206,247,133,221,1,228,232,248,28,232,3,228, +247,231,21,251,231,247,174,7,247,76,247,4,247,30,247,119,247,118,251,4,247, +30,251,76,31,251,174,251,215,70,72,6,247,54,22,247,63,206,251,63,247,133, +247,65,6,247,35,215,42,251,77,251,78,63,42,251,35,31,251,65,6,14,248,10,139, +221,247,142,221,247,125,221,221,242,1,229,232,167,243,197,243,3,247,75,247, +224,21,39,10,247,24,249,212,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248, +10,139,221,247,142,221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247, +76,249,237,21,76,10,14,248,10,139,221,247,142,221,247,125,221,1,229,232,3, +247,75,247,224,21,39,10,247,29,249,237,21,65,10,14,248,10,139,221,247,142, +221,247,125,221,1,229,232,3,247,75,247,224,21,39,10,247,6,249,238,21,43,251, +42,204,139,218,235,219,43,202,139,43,247,42,5,14,124,139,159,249,69,159,214, +242,18,148,243,126,232,117,243,19,232,247,85,249,109,21,46,253,109,232,6, +19,244,59,250,31,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159, +249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232,6,113,250,63,21,66, +10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109,21,46,253,109,232, +6,60,250,63,21,65,10,14,124,139,159,249,69,159,1,239,232,3,247,85,249,109, +21,46,253,109,232,6,41,250,64,21,67,10,14,248,65,139,159,249,69,159,222,206, +110,205,18,215,227,248,30,227,19,236,249,26,249,109,21,51,252,232,6,252,17, +248,232,38,139,139,253,109,227,139,139,248,227,248,12,252,227,245,139,5,251, +71,250,40,21,131,114,127,127,122,139,126,139,113,146,115,150,8,19,28,97,156, +131,141,119,139,95,139,108,102,128,73,8,196,6,146,162,151,153,153,139,150, +139,154,135,162,130,8,19,44,194,118,151,135,157,139,189,139,169,174,149,208, +8,14,248,121,116,221,248,236,221,209,242,1,177,232,247,18,243,197,243,247, +18,232,3,248,25,249,121,21,40,10,57,4,41,10,111,247,147,21,35,36,243,6,247, +54,242,21,35,36,243,6,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,169,247,172,21,76,10,14,248,121,116, +221,248,236,221,1,177,232,248,154,232,3,248,25,249,121,21,40,10,57,4,41,10, +108,247,172,21,74,10,14,248,121,116,221,248,236,221,1,177,232,248,154,232, +3,248,25,249,121,21,40,10,57,4,41,10,93,247,173,21,75,10,14,248,121,116,221, +248,236,221,210,206,110,205,18,177,232,248,154,232,19,236,248,25,249,121, +21,40,10,57,4,41,10,243,247,149,21,131,114,127,127,121,139,127,139,112,146, +115,150,8,19,28,98,156,131,141,118,139,95,139,108,102,128,73,8,197,6,145, +162,152,153,153,139,150,139,153,135,163,130,8,19,44,193,118,152,135,157,139, +188,139,170,174,148,208,8,14,248,10,116,221,248,240,217,1,209,232,248,1,232, +3,248,232,248,151,21,42,10,251,20,247,167,21,77,10,14,248,65,116,221,249, +30,159,221,242,1,224,232,193,243,197,243,193,232,3,248,188,249,109,21,78, +10,251,201,247,77,21,35,36,243,6,247,54,242,21,35,36,243,6,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,252,148,7,41,68, +79,251,8,251,8,68,199,237,30,248,148,46,252,148,7,251,38,247,2,45,247,62, +247,63,247,1,233,247,38,30,248,148,7,251,150,247,102,21,66,10,14,248,65,116, +221,249,30,159,1,224,232,248,10,232,3,248,188,249,109,21,78,10,251,204,247, +102,21,74,10,14,248,65,116,221,249,30,159,1,224,232,248,10,232,3,248,188, +249,109,21,78,10,251,219,247,103,21,75,10,14,248,10,139,159,249,69,159,1, +247,186,232,3,248,23,247,178,21,247,166,248,79,251,3,139,251,100,251,247, +251,105,247,247,251,7,139,247,172,252,79,139,251,178,232,139,5,118,250,63, +21,66,10,14,247,210,139,221,248,201,221,1,248,217,249,109,21,44,10,251,107, +247,37,21,77,10,14,248,10,139,159,247,61,221,247,148,221,239,159,1,231,232, +247,224,239,3,247,77,247,81,21,247,121,6,247,11,223,225,247,14,247,24,54, +219,251,31,31,251,100,247,12,46,253,109,232,6,247,163,4,247,148,247,86,7, +226,190,91,59,59,88,91,52,31,14,248,10,139,159,249,69,159,221,242,18,247, +100,243,121,232,122,243,19,232,248,23,247,178,21,43,10,19,244,64,250,38,21, +35,36,243,6,247,54,242,21,35,36,243,6,14,116,212,248,48,216,212,242,18,181, +226,150,243,197,243,122,222,19,226,248,171,188,21,130,137,135,139,134,139, +8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139,76,117,104,100, +115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214,181,111,89,31, +117,7,19,244,139,104,118,124,73,131,251,10,124,121,135,107,126,78,114,108, +92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165,115,193, +139,8,156,139,152,141,166,146,8,19,250,251,38,247,71,21,47,10,251,37,248, +92,21,35,36,243,6,19,228,247,54,242,21,35,36,243,6,14,116,212,248,48,216, +247,73,159,1,181,226,247,152,222,3,248,171,188,21,46,10,251,38,247,71,21, +47,10,54,248,117,21,76,10,14,116,212,248,48,216,247,73,159,1,181,226,247, +152,222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,31,248,117,21,65, +10,14,116,212,248,48,216,247,74,159,1,181,226,247,152,222,3,248,171,188,21, +46,10,251,38,247,71,21,47,10,251,53,248,118,21,75,10,14,116,212,248,48,216, +213,207,109,205,18,181,226,247,152,222,19,236,248,171,188,21,46,10,251,38, +247,71,21,47,10,125,248,94,21,79,10,19,28,99,156,130,141,118,139,95,139,108, +103,128,72,8,197,6,145,162,151,153,154,139,150,139,153,135,163,130,8,19,44, +80,10,14,116,212,248,48,216,179,183,226,183,1,181,226,197,183,227,183,165, +222,3,248,171,188,21,46,10,251,38,247,71,21,47,10,251,6,248,131,21,69,10, +95,4,70,10,14,247,99,251,106,180,221,247,36,248,45,216,1,170,226,247,57,214, +3,247,156,116,21,247,15,139,222,217,146,247,17,8,55,6,125,55,96,96,68,139, +8,47,84,214,247,16,247,24,193,217,230,31,209,139,183,98,149,66,8,223,6,135, +190,128,172,119,168,103,188,76,168,66,139,251,33,139,47,251,4,139,251,66, +139,34,175,53,204,93,166,119,162,130,182,131,8,108,68,151,132,5,151,145,146, +141,151,139,8,168,156,125,116,113,116,120,108,31,114,139,119,145,95,162,8, +130,143,118,98,5,203,112,161,133,178,139,8,215,186,175,196,181,110,164,89, +31,131,139,133,139,125,137,8,14,116,216,247,72,207,247,52,216,212,242,1,247, +45,243,197,243,3,248,149,247,126,21,48,10,141,207,21,49,10,251,58,248,49, +21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,216,247,72,207,247,52,216, +247,73,159,1,248,149,247,126,21,48,10,141,207,21,49,10,251,7,248,74,21,66, +10,14,116,216,247,72,207,247,52,216,247,73,159,1,248,149,247,126,21,48,10, +141,207,21,49,10,251,64,248,74,21,251,4,139,247,41,251,40,199,139,5,14,116, +216,247,72,207,247,52,216,247,74,159,1,248,149,247,126,21,48,10,141,207,21, +49,10,251,76,248,75,21,67,10,14,124,139,249,89,251,97,159,221,242,18,142, +243,126,222,127,243,19,72,247,69,248,160,21,56,6,19,136,252,160,222,7,19, +116,69,249,89,21,35,36,243,6,247,54,242,21,35,36,243,6,14,124,139,159,248, +120,159,247,88,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,123,249, +120,21,66,10,14,124,139,159,248,120,159,247,88,159,1,233,222,3,247,69,248, +160,21,56,252,160,222,6,70,249,120,21,65,10,14,124,139,159,248,120,159,247, +89,159,1,233,222,3,247,69,248,160,21,56,252,160,222,6,51,249,121,21,67,10, +14,139,159,248,82,212,104,159,228,207,109,205,18,209,216,62,223,247,142,222, +19,163,209,248,160,21,252,160,223,247,181,7,19,195,51,10,19,52,61,139,89, +109,93,66,8,227,7,247,123,247,85,21,79,10,19,12,99,156,131,141,117,139,95, +139,109,103,128,72,8,196,6,146,162,151,153,153,139,150,139,153,135,163,130, +8,19,20,193,118,152,135,157,139,189,139,168,174,150,208,8,14,116,216,248, +44,216,212,242,1,175,226,156,243,197,243,156,226,3,247,164,248,175,21,52, +10,140,62,21,53,10,110,247,145,21,35,36,243,6,247,54,242,21,35,36,243,6,14, +116,216,248,44,216,247,73,159,1,175,226,247,192,226,3,247,164,248,175,21, +52,10,140,62,21,53,10,164,247,170,21,66,10,14,116,216,248,44,216,247,73,159, +1,175,226,247,192,226,3,247,164,248,175,21,52,10,140,62,21,53,10,111,247, +170,21,65,10,14,116,216,248,44,216,247,74,159,1,175,226,247,192,226,3,247, +164,248,175,21,52,10,140,62,21,53,10,92,247,171,21,75,10,14,116,216,248,44, +216,213,207,109,205,18,175,226,247,192,226,19,236,247,164,248,175,21,251, +39,50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,31,247,73,52,243, +251,43,30,140,62,21,53,10,242,247,147,21,79,10,19,28,99,156,131,141,117,139, +95,139,108,103,128,72,8,197,6,145,162,152,153,153,139,150,139,153,135,163, +130,8,19,44,80,10,14,247,99,116,216,248,44,216,247,74,159,1,186,226,247,130, +226,3,248,74,248,14,21,54,10,83,247,105,21,72,10,14,116,212,89,159,248,120, +159,227,242,18,204,222,132,243,197,243,131,222,64,214,19,105,0,248,118,22, +55,10,19,169,0,56,10,19,80,128,57,10,19,85,0,251,54,249,95,21,35,36,243,6, +19,82,0,247,54,242,21,35,36,243,6,14,116,212,89,159,248,120,159,247,88,159, +18,204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82, +57,10,251,3,249,120,21,66,10,14,116,212,89,159,248,120,159,247,88,159,18, +204,222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57, +10,251,56,249,120,21,65,10,14,116,212,89,159,248,120,159,247,89,159,18,204, +222,247,143,222,64,214,19,108,248,118,22,55,10,19,172,56,10,19,82,57,10,251, +72,249,121,21,67,10,14,247,99,251,110,221,249,20,159,247,88,159,1,248,24, +248,160,21,58,10,251,99,247,108,21,66,10,14,247,99,139,212,248,14,212,247, +89,159,1,248,79,248,160,21,59,10,251,37,247,33,21,77,10,14,116,216,248,44, +214,247,78,159,1,175,226,247,192,226,3,247,111,248,249,21,191,95,150,129, +174,104,109,149,125,142,120,139,99,139,99,127,105,116,70,95,104,56,139,251, +9,8,251,71,225,37,247,43,247,43,225,241,247,72,30,139,231,118,207,88,217, +101,196,102,177,67,194,8,229,180,99,176,42,94,5,72,182,126,146,108,152,8, +95,95,5,182,115,152,131,165,119,8,54,99,175,100,5,247,43,33,21,233,195,62, +251,22,251,15,81,61,47,46,82,217,247,18,247,18,196,217,232,31,14,251,110, +159,247,67,217,248,42,217,1,194,222,247,190,226,3,194,251,110,21,222,247, +165,6,183,85,188,115,207,139,8,247,27,228,247,1,247,59,247,66,51,247,4,251, +28,31,72,139,81,110,103,88,8,247,147,56,7,247,121,251,145,21,231,199,58,251, +17,251,11,78,58,48,51,81,219,247,15,247,15,197,219,227,31,14,247,99,251,110, +221,249,20,159,227,242,1,247,5,243,197,243,3,248,24,248,160,21,58,10,251, +153,247,83,21,35,36,243,6,247,54,242,21,35,36,243,6,14,116,217,247,91,198, +205,198,247,87,215,1,218,227,3,218,247,205,21,84,139,117,80,222,139,5,151, +71,159,82,169,90,178,75,214,100,223,139,199,139,194,155,190,170,8,232,7,58, +91,103,125,90,139,52,139,82,206,114,247,24,8,247,106,139,163,198,251,138, +139,5,138,154,139,147,139,146,139,150,139,148,141,155,8,247,162,139,162,198, +251,176,139,5,167,247,25,191,201,225,139,192,139,180,122,212,85,8,171,219, +5,73,186,82,159,70,139,53,139,74,106,92,71,105,89,117,83,129,75,8,76,139, +117,80,218,139,5,137,120,139,129,139,127,8,14,179,247,46,201,3,247,46,248, +216,21,81,10,14,179,247,176,197,247,206,192,1,247,147,202,3,247,207,247,234, +21,251,121,6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192, +139,213,79,191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152, +153,163,167,154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8, +81,108,5,43,88,113,100,134,42,8,247,196,6,14,179,247,162,192,247,225,192, +18,247,130,202,90,202,19,208,247,20,248,112,21,82,10,19,224,83,10,14,124, +247,194,247,17,1,226,247,16,3,247,103,248,63,21,251,16,251,17,247,16,6,14, +179,247,132,211,1,247,176,247,204,21,251,130,67,247,130,6,14,246,248,19,196, +247,81,196,1,187,196,247,81,196,3,247,92,249,66,21,55,71,71,56,56,207,70, +221,224,207,206,224,222,71,207,56,31,82,4,191,181,97,87,86,97,97,85,89,96, +182,191,190,182,182,191,31,14,247,183,247,89,209,1,248,180,247,159,21,252, +140,69,248,140,6,14,247,183,248,74,248,63,21,251,39,251,38,251,38,247,37, +90,90,247,38,251,38,251,39,251,39,189,90,247,38,247,38,247,39,251,39,189, +189,251,39,247,39,247,38,247,38,5,14,247,183,139,243,236,209,236,243,1,247, +132,243,3,248,170,247,163,21,36,10,251,82,42,21,35,35,243,6,248,108,4,35, +35,243,6,14,249,87,249,54,194,1,247,109,207,247,97,206,247,206,206,3,247, +177,249,54,21,247,45,194,252,11,84,247,46,252,18,207,6,248,99,22,247,15,247, +233,139,251,233,206,139,139,248,73,48,139,251,23,251,254,251,24,247,254,45, +139,139,252,73,206,139,139,247,233,247,13,251,233,5,14,247,183,128,209,247, +179,209,1,247,149,209,3,248,170,248,52,21,34,10,251,179,4,36,10,14,248,177, +119,159,139,197,81,249,89,251,229,192,18,247,27,201,248,195,202,19,172,247, +27,248,216,21,81,10,248,194,247,21,21,60,10,19,92,247,56,253,31,21,251,121, +6,151,177,157,158,182,162,8,202,171,5,202,170,172,184,139,192,139,213,79, +191,53,139,40,139,90,90,136,36,8,201,6,141,170,142,155,147,152,153,163,167, +154,171,139,187,139,176,107,139,96,139,108,119,112,100,118,8,81,108,5,19, +44,43,88,113,100,134,42,8,247,196,6,14,248,177,119,159,139,249,89,252,245, +192,18,247,26,201,248,134,201,19,216,247,26,248,216,21,81,10,248,218,247, +21,21,60,10,19,56,158,252,245,21,19,88,39,201,7,19,56,84,10,247,80,192,21, +251,21,139,247,21,247,62,5,14,248,177,119,159,139,249,89,252,245,192,247, +9,192,247,225,192,18,247,121,202,90,202,248,34,201,19,26,247,11,248,112,21, +82,10,19,29,83,10,19,197,248,154,247,74,21,60,10,19,37,148,252,245,21,19, +69,39,201,7,19,37,84,10,247,80,192,21,251,21,139,247,21,247,62,5,14,248,80, +117,201,225,201,247,234,201,227,201,1,126,207,247,18,208,248,69,207,3,248, +180,248,73,21,115,245,86,188,50,139,8,251,10,60,44,251,32,251,28,218,44,247, +7,31,196,139,185,162,172,186,158,167,149,167,151,199,8,68,6,126,58,102,96, +83,139,107,139,103,157,118,167,116,168,126,183,139,190,139,244,188,206,215, +139,192,139,167,112,156,73,8,35,247,197,21,85,10,77,4,86,10,14,248,80,117, +201,247,177,202,247,26,202,234,201,1,126,207,247,39,209,247,96,212,247,26, +207,3,247,164,247,217,21,247,26,6,184,158,119,91,31,138,99,5,139,111,145, +111,148,118,8,218,164,6,121,152,135,151,138,197,138,210,132,156,102,163,180, +169,152,162,139,185,8,224,93,180,44,30,251,98,252,81,209,6,247,140,4,247, +26,247,21,7,192,161,119,92,93,116,118,87,31,107,247,246,21,85,10,77,4,86, +10,14,124,14,247,183,247,197,209,1,248,110,209,3,179,248,11,21,69,248,70, +251,111,209,247,181,7,14,106,249,89,159,1,239,199,3,239,249,109,21,252,37, +199,248,37,7,79,252,176,21,252,37,199,248,37,7,14,251,112,159,247,69,212, +248,90,159,1,204,222,247,142,222,3,248,180,188,21,129,137,135,139,135,139, +8,110,123,153,166,31,248,72,56,251,189,7,32,83,69,52,74,97,179,202,30,248, +7,56,253,124,222,247,115,7,164,121,168,131,175,139,207,139,195,167,178,194, +141,82,166,113,196,139,157,139,152,141,165,146,8,14,248,192,20,247,185,21, +116,162,248,160,154,247,82,151,84,162,6,30,10,3,150,37,255,12,9,139,12,10, +217,10,208,144,143,144,12,12,224,11,217,146,148,12,13,139,12,14,28,0,50,19, +0,55,2,0,1,0,17,0,39,0,60,0,82,0,89,0,112,0,121,0,142,0,184,0,214,1,75,1, +104,1,130,1,152,1,248,2,24,2,82,2,102,2,143,2,164,2,190,2,212,3,53,3,60,3, +81,3,91,3,148,3,174,3,186,3,204,3,224,3,242,4,4,4,15,4,26,4,42,4,56,4,74, +4,92,4,103,4,119,4,132,4,143,4,159,4,170,4,186,4,225,4,239,4,253,5,17,5,61, +5,105,5,121,5,155,5,189,139,251,3,166,251,26,178,139,166,247,26,139,247,3, +5,11,35,187,7,140,81,125,112,104,134,8,101,7,199,144,172,185,139,219,8,240, +7,11,251,99,247,99,69,251,99,251,99,69,247,99,251,99,209,247,99,247,99,6, +11,35,199,121,7,139,70,126,119,92,137,8,101,7,209,174,184,225,31,247,12,7, +11,252,120,69,248,120,6,11,214,251,111,243,139,251,148,249,109,251,12,139, +251,152,253,109,238,139,216,247,111,5,11,251,124,139,247,12,247,224,5,11, +248,33,221,252,33,247,125,248,48,221,252,141,253,109,248,159,221,252,66,6, +11,251,101,251,34,251,46,251,120,251,120,247,34,251,46,247,102,31,227,139, +218,166,198,189,218,206,186,247,5,139,247,11,8,247,127,251,31,247,45,251, +106,30,11,247,50,241,251,12,251,76,251,68,34,251,12,251,46,251,47,35,247, +12,247,72,247,72,243,247,12,247,46,31,11,138,247,35,41,222,251,60,139,251, +52,139,40,57,139,251,24,139,50,186,83,235,114,8,247,73,91,5,231,115,181,102, +139,82,139,100,118,99,108,117,110,119,93,128,80,139,60,139,85,158,104,181, +112,171,127,174,140,184,8,51,6,140,72,152,95,168,99,189,71,223,103,247,3, +139,226,139,210,159,186,175,188,178,170,204,139,202,139,229,83,205,40,166, +8,251,75,188,5,51,163,107,167,139,195,139,213,204,188,237,139,247,8,139,204, +86,140,44,8,11,247,166,248,79,251,3,139,251,100,251,247,251,106,247,247,251, +7,139,247,173,252,79,139,251,178,232,139,5,11,252,161,57,248,46,6,252,74, +252,201,139,57,248,191,139,139,221,252,74,139,248,72,248,199,5,11,243,91, +7,138,196,154,167,173,144,8,177,7,79,134,106,92,139,60,8,38,7,11,130,137, +135,139,134,139,8,110,123,154,165,31,247,200,7,232,71,189,251,21,30,63,139, +76,117,104,100,115,112,129,109,137,87,8,223,6,146,203,177,168,217,139,8,214, +181,111,89,31,117,7,139,104,118,124,73,131,251,10,124,121,135,107,126,78, +114,108,92,139,71,139,44,205,79,245,139,205,139,192,162,198,193,145,86,165, +115,193,139,8,156,139,152,141,166,146,8,11,139,111,131,122,114,116,105,108, +98,123,90,139,74,139,101,170,139,192,139,194,176,167,228,152,227,151,157, +143,167,152,8,11,139,219,133,187,124,178,105,225,59,191,41,139,8,251,38,45, +251,4,251,64,251,64,230,33,247,39,31,247,12,139,222,207,160,247,6,8,55,6, +116,70,92,103,72,139,86,139,94,163,111,183,119,169,132,169,138,191,8,11,146, +236,198,202,223,139,221,139,202,71,139,53,139,137,139,137,138,137,8,11,52, +221,6,174,159,157,177,30,146,139,142,139,158,138,8,208,7,120,143,128,140, +122,139,8,62,93,95,64,31,50,69,71,209,252,92,222,248,92,226,7,11,246,195, +209,225,205,181,99,76,30,251,255,222,248,32,7,226,74,195,38,30,11,251,39, +50,34,251,68,251,68,227,34,247,41,247,39,229,244,247,64,247,73,52,243,251, +43,31,11,233,195,62,251,22,251,15,81,61,47,46,82,216,247,19,247,18,196,217, +232,31,11,138,242,71,197,251,13,139,251,14,139,60,76,139,42,139,57,181,100, +247,16,109,8,217,120,5,197,125,162,118,139,101,139,90,90,106,66,139,94,139, +101,152,118,161,126,154,133,154,134,176,8,51,6,143,251,13,207,81,247,29,139, +247,24,139,223,204,139,240,139,217,95,182,35,164,8,59,158,5,71,155,110,161, +139,176,139,187,182,170,207,139,206,139,175,110,141,84,8,11,248,160,56,251, +189,7,11,32,83,69,52,73,97,179,202,30,248,7,56,252,40,7,52,204,83,241,30, +11,216,139,188,166,188,208,8,66,7,11,251,37,252,44,251,26,248,44,50,139,247, +69,252,162,107,56,5,126,102,120,125,104,139,127,139,125,141,121,143,8,64, +7,156,130,156,135,161,139,166,139,168,148,161,155,165,158,154,161,155,181, +8,247,125,249,14,5,11,252,27,66,247,184,6,251,205,252,12,139,64,248,62,139, +139,212,251,217,139,247,203,248,13,5,11,252,88,253,109,197,139,248,88,249, +109,5,11,247,44,251,13,139,222,33,222,245,222,139,222,251,44,251,14,5,11, +251,46,247,13,139,56,247,0,56,251,0,56,139,56,247,46,247,14,5,11,57,72,71, +57,56,206,71,222,220,207,207,220,224,73,206,55,31,11,190,179,99,88,90,98, +98,89,90,98,180,189,188,180,180,188,31,11,251,5,139,247,41,251,40,199,139, +5,11,43,251,40,199,139,247,41,247,40,5,11,43,251,42,203,139,218,235,220,43, +202,139,43,247,42,5,11,193,118,151,135,158,139,188,139,169,174,149,208,8, +11,91,99,99,92,91,179,99,187,187,179,178,187,188,100,178,90,31,11,164,158, +120,114,116,119,119,115,115,119,159,163,162,159,159,163,31,11,43,251,42,199, +139,247,41,247,42,5,11,235,247,42,75,139,60,43,58,235,76,139,235,251,42,5, +11,146,236,198,202,223,139,8,224,198,74,44,31,11,251,4,139,247,40,251,40, +200,139,5,11,43,251,42,203,139,218,235,219,43,203,139,42,247,42,5,11,42,251, +40,199,139,247,41,247,40,5,11,235,247,42,75,139,60,43,59,235,75,139,236,251, +42,5,11,252,148,7,41,68,79,251,8,251,8,68,199,237,30,248,148,46,252,148,7, +251,38,247,2,45,247,62,247,62,247,2,233,247,38,30,248,148,7,11,130,114,128, +128,121,139,127,139,113,146,114,149,8,11,193,118,152,135,157,139,188,139, +169,174,149,208,8,11,251,188,201,248,61,96,7,122,75,125,128,67,132,8,124, +138,139,93,5,11,174,139,155,139,154,137,174,133,162,111,139,103,139,88,105, +109,83,139,79,139,111,166,136,201,8,77,6,49,194,87,235,233,200,192,220,30, +139,190,116,172,91,155,8,11,176,156,159,168,139,178,139,213,86,185,53,139, +46,139,90,91,137,45,8,202,6,139,167,141,152,146,152,151,161,166,152,172,139, +8,186,168,113,97,92,115,125,53,31,11,239,206,192,72,247,164,93,7,251,96,251, +158,139,80,5,11,251,103,251,63,251,63,251,103,251,100,247,64,251,66,247,97, +247,108,247,63,247,61,247,106,247,102,251,63,247,63,251,103,31,11,247,65, +247,33,251,36,251,67,251,71,251,32,251,34,251,70,251,61,251,33,247,38,247, +66,247,68,247,33,247,36,247,65,31,11,0,}; +#endif diff --git a/contrib/media/updf/generated/font_cjk.h b/contrib/media/updf/generated/font_cjk.h new file mode 100644 index 0000000000..08875be1fa --- /dev/null +++ b/contrib/media/updf/generated/font_cjk.h @@ -0,0 +1,5631 @@ +#ifndef __STRICT_ANSI__ +#if defined(__linux__) || defined(__FreeBSD__) +#define HAVE_INCBIN +#endif +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_DroidSansFallback[139280]; +asm(".globl pdf_font_DroidSansFallback"); +asm(".balign 8"); +asm("pdf_font_DroidSansFallback:"); +asm(".incbin \"fonts/droid/DroidSansFallback.ttf\""); +#else +static const unsigned char pdf_font_DroidSansFallback[139280] = { +0,1,0,0,0,19,1,0,0,4,0,48,70,70,84,77,75,29,224,116,0,2,31,244,0,0,0,28,71, +68,69,70,2,201,0,4,0,2,14,208,0,0,0,32,71,80,79,83,236,144,228,222,0,2,15, +64,0,0,16,180,71,83,85,66,147,60,130,75,0,2,14,240,0,0,0,80,79,83,47,50,247, +26,134,136,0,0,1,184,0,0,0,96,99,109,97,112,29,150,101,90,0,0,12,136,0,0, +6,242,99,118,116,32,65,244,67,234,0,0,29,92,0,0,2,20,102,112,103,109,115, +211,35,176,0,0,19,124,0,0,7,5,103,97,115,112,0,24,0,9,0,2,14,192,0,0,0,16, +103,108,121,102,155,28,79,66,0,0,36,172,0,1,184,160,104,101,97,100,248,253, +254,54,0,0,1,60,0,0,0,54,104,104,101,97,14,75,8,159,0,0,1,116,0,0,0,36,104, +109,116,120,38,164,8,117,0,0,2,24,0,0,10,112,107,101,114,110,174,170,185, +111,0,1,221,76,0,0,21,90,108,111,99,97,120,114,13,144,0,0,31,112,0,0,5,58, +109,97,120,112,7,1,7,208,0,0,1,152,0,0,0,32,110,97,109,101,35,87,171,194, +0,1,242,168,0,0,7,251,112,111,115,116,26,213,54,16,0,1,250,164,0,0,20,25, +112,114,101,112,122,200,94,246,0,0,26,132,0,0,2,213,0,1,0,0,0,1,5,30,235, +107,75,224,95,15,60,245,0,31,8,0,0,0,0,0,201,129,215,160,0,0,0,0,201,129, +215,160,254,96,253,147,8,103,7,72,0,0,0,8,0,2,0,0,0,0,0,0,0,1,0,0,7,62,254, +78,0,67,8,192,254,96,254,244,8,103,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,156, +0,1,0,0,2,156,1,82,0,84,0,140,0,5,0,2,0,16,0,47,0,90,0,0,3,158,5,192,0,3, +0,1,0,3,4,185,1,144,0,5,0,8,5,154,5,51,0,0,1,27,5,154,5,51,0,0,3,209,0,102, +2,18,8,5,2,11,6,4,2,2,2,2,2,4,160,0,2,175,80,0,120,251,0,0,0,0,0,0,0,0,49, +65,83,67,0,64,0,33,251,2,5,211,254,81,1,51,7,62,1,178,96,0,0,159,223,215, +0,0,4,58,5,129,0,0,0,32,0,2,2,236,0,68,0,0,0,0,2,170,0,0,2,57,0,0,2,57,0, +185,2,215,0,87,4,115,0,9,4,115,0,22,7,29,0,73,5,86,0,72,1,135,0,104,2,170, +0,127,2,170,0,12,3,29,0,33,4,172,0,100,2,57,0,184,2,170,0,91,2,57,0,187,2, +57,0,0,4,115,0,80,4,115,0,156,4,115,0,103,4,115,0,78,4,115,0,47,4,115,0,82, +4,115,0,104,4,115,0,105,4,115,0,89,4,115,0,96,2,57,0,187,2,57,0,184,4,172, +0,101,4,172,0,100,4,172,0,101,4,115,0,84,8,31,0,161,5,86,0,4,5,86,0,168,5, +199,0,104,5,199,0,168,5,86,0,168,4,227,0,168,6,57,0,103,5,199,0,168,2,57, +0,189,4,0,0,32,5,86,0,168,4,115,0,168,6,170,0,168,5,199,0,168,6,57,0,97,5, +86,0,168,6,57,0,97,5,199,0,168,5,86,0,93,4,227,0,46,5,199,0,158,5,86,0,9, +7,141,0,9,5,86,0,46,5,86,0,45,4,227,0,65,2,57,0,146,2,57,0,0,2,57,0,16,3, +193,0,10,4,115,255,225,2,170,0,106,4,115,0,87,4,115,0,132,4,0,0,87,4,115, +0,86,4,115,0,87,2,57,0,29,4,115,0,86,4,115,0,142,1,199,0,137,1,199,255,206, +4,0,0,138,1,199,0,138,6,170,0,136,4,115,0,136,4,115,0,86,4,115,0,132,4,115, +0,86,2,170,0,136,4,0,0,57,2,57,0,31,4,115,0,133,4,0,0,7,5,199,255,253,4,0, +0,23,4,0,0,5,4,0,0,49,2,172,0,34,2,20,0,183,2,172,0,34,4,172,0,92,2,170,0, +242,4,115,0,135,4,115,0,58,4,115,0,113,4,115,255,254,2,20,0,183,4,115,0,115, +2,170,0,45,5,229,0,31,2,246,0,26,4,115,0,83,4,172,0,100,5,229,0,31,4,107, +255,239,3,51,0,122,4,100,0,65,2,170,0,41,2,170,0,27,2,170,0,72,4,156,0,140, +4,76,0,80,2,57,0,187,2,170,0,119,2,170,0,80,2,236,0,27,4,115,0,83,6,172,0, +56,6,172,0,56,6,172,0,73,4,227,0,131,5,86,0,4,5,86,0,4,5,86,0,4,5,86,0,4, +5,86,0,4,5,86,0,4,8,0,0,24,5,199,0,104,5,86,0,168,5,86,0,168,5,86,0,168,5, +86,0,168,2,57,0,9,2,57,0,142,2,57,255,210,2,57,0,7,5,199,0,14,5,199,0,168, +6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,4,172,0,142,6,57,0,71,5, +199,0,158,5,199,0,158,5,199,0,158,5,199,0,158,5,86,0,45,5,86,0,168,4,227, +0,142,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,7, +29,0,66,4,0,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,2,57,0,10,2, +57,0,135,2,57,255,211,2,57,0,8,4,115,0,86,4,115,0,140,4,115,0,86,4,115,0, +86,4,115,0,86,4,115,0,86,4,115,0,86,4,100,0,65,4,227,0,44,4,115,0,139,4,115, +0,139,4,115,0,139,4,115,0,139,4,0,0,5,4,115,0,138,4,0,0,5,5,86,0,4,4,115, +0,87,5,86,0,4,4,115,0,87,5,86,0,4,4,115,0,87,5,199,0,104,4,0,0,87,5,199,0, +104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,168,4,235, +0,86,5,199,0,14,4,115,0,86,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5, +86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,6,57,0,103, +4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0, +86,5,199,0,168,4,115,0,142,5,199,0,14,4,115,0,10,2,57,255,184,2,57,255,184, +2,57,0,12,2,57,0,12,2,57,255,210,2,57,255,210,2,57,0,92,1,199,0,31,2,57,0, +189,2,57,0,194,5,225,0,170,3,141,0,137,4,0,0,32,1,199,255,153,5,86,0,168, +4,0,0,138,4,0,0,138,4,115,0,168,1,199,0,91,4,115,0,168,1,199,0,126,4,115, +0,168,2,85,0,138,4,115,0,168,2,172,0,138,4,115,0,20,1,199,0,16,5,199,0,168, +4,115,0,140,5,199,0,168,4,115,0,140,5,199,0,168,4,115,0,140,4,213,255,254, +5,201,0,165,4,115,0,140,6,57,0,97,4,115,0,86,6,57,0,97,4,115,0,86,6,57,0, +97,4,115,0,86,8,0,0,97,7,141,0,86,5,199,0,168,2,170,0,136,5,199,0,168,2,170, +0,129,5,199,0,168,2,170,0,56,5,86,0,93,4,0,0,57,5,86,0,93,4,0,0,57,5,86,0, +93,4,0,0,57,5,86,0,93,4,0,0,57,4,227,0,46,2,57,0,31,4,227,0,46,3,0,0,31,4, +227,0,46,2,57,0,31,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199, +0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0, +158,4,115,0,133,7,141,0,9,5,199,255,253,5,86,0,45,4,0,0,5,5,86,0,45,4,227, +0,65,4,0,0,49,4,227,0,65,4,0,0,49,4,227,0,65,4,0,0,49,1,199,0,138,4,115,0, +192,5,86,0,4,4,115,0,87,8,0,0,24,7,29,0,66,6,57,0,71,4,227,0,44,2,170,0,0, +2,170,0,0,2,170,0,51,2,170,255,221,2,170,0,156,2,170,0,51,2,170,0,80,2,170, +255,233,2,170,0,22,2,170,0,205,2,170,0,29,5,87,0,4,2,57,0,187,6,70,255,245, +6,180,255,242,3,18,255,232,6,50,255,187,6,216,0,65,6,5,255,187,1,199,255, +176,5,86,0,4,5,86,0,168,4,104,0,168,5,88,0,61,5,86,0,168,4,227,0,65,5,199, +0,168,6,57,0,97,2,57,0,189,5,86,0,168,5,88,0,10,6,170,0,168,5,199,0,168,5, +51,0,90,6,57,0,97,5,199,0,168,5,86,0,168,4,242,0,108,4,227,0,46,5,86,0,45, +6,98,0,117,5,86,0,46,6,175,0,145,5,251,0,87,2,57,0,7,5,86,0,45,4,160,0,86, +3,145,0,70,4,115,0,106,1,199,0,137,4,96,0,133,4,160,0,86,4,154,0,142,4,0, +0,7,4,116,0,86,3,145,0,70,3,135,0,86,4,115,0,106,4,115,0,106,1,199,0,137, +4,0,0,138,4,0,0,14,4,156,0,138,4,0,0,0,3,149,0,86,4,115,0,86,5,133,0,79,4, +141,0,132,3,219,0,86,4,240,0,86,3,41,0,29,4,96,0,133,5,48,0,85,4,51,0,21, +5,180,0,135,6,63,0,83,1,199,255,205,4,96,0,133,4,115,0,86,4,96,0,133,6,63, +0,83,5,87,0,168,6,235,0,46,4,85,0,168,5,192,0,104,5,86,0,93,2,57,0,189,2, +57,0,7,4,0,0,32,8,117,0,18,8,21,0,168,6,213,0,46,4,169,0,168,5,21,0,55,5, +192,0,168,5,86,0,4,5,64,0,168,5,86,0,168,4,85,0,168,5,107,0,15,5,86,0,168, +7,99,0,28,4,213,0,67,5,192,0,168,5,192,0,168,4,169,0,168,5,64,0,18,6,170, +0,168,5,199,0,168,6,57,0,97,5,192,0,166,5,86,0,168,5,199,0,104,4,227,0,46, +5,21,0,55,6,21,0,118,5,86,0,46,5,235,0,168,5,85,0,160,7,85,0,168,7,128,0, +168,6,85,0,46,7,21,0,168,5,64,0,168,5,192,0,105,8,21,0,168,5,199,0,96,4,115, +0,87,4,149,0,120,4,64,0,142,2,235,0,142,4,171,0,20,4,115,0,87,5,90,0,7,3, +171,0,49,4,120,0,142,4,120,0,142,3,128,0,138,4,171,0,11,5,128,0,142,4,107, +0,142,4,115,0,86,4,85,0,142,4,115,0,132,4,0,0,87,3,170,0,35,4,0,0,5,6,149, +0,86,4,0,0,23,4,149,0,142,4,43,0,122,6,107,0,142,6,149,0,142,5,0,0,45,5,192, +0,142,4,43,0,142,4,21,0,55,6,0,0,142,4,85,0,17,4,115,0,87,4,115,0,10,2,235, +0,142,4,21,0,87,4,0,0,57,1,199,0,137,2,57,255,248,1,199,255,206,7,64,0,11, +6,128,0,142,4,115,0,10,3,128,0,138,4,0,0,5,4,107,0,142,3,233,0,168,3,74,0, +142,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253, +5,86,0,45,4,0,0,5,4,115,0,0,8,0,0,0,8,0,0,0,4,107,255,225,1,199,0,127,1,199, +0,127,1,199,0,127,1,199,0,126,2,170,0,75,2,170,0,75,2,170,0,75,4,115,0,138, +4,115,0,136,2,205,0,81,8,0,1,22,8,0,0,55,1,128,0,85,2,213,0,85,2,170,0,88, +2,170,0,89,4,0,0,185,2,170,255,192,1,86,254,96,2,235,0,101,4,115,0,4,4,115, +0,58,8,192,0,158,4,115,0,16,7,21,0,69,2,150,0,19,8,149,0,188,8,0,0,188,6, +37,0,108,4,205,0,88,6,172,0,80,6,172,0,61,6,172,0,93,6,172,0,145,8,0,1,162, +4,0,1,16,8,0,1,162,4,0,1,16,8,0,1,162,4,0,1,16,4,0,1,16,3,244,0,56,4,229, +0,4,6,150,0,235,5,180,0,154,4,172,0,101,4,100,0,51,5,180,0,87,7,213,1,152, +5,192,1,22,2,49,255,158,4,100,0,56,4,100,0,65,4,171,0,100,4,100,0,63,4,100, +0,65,4,213,0,157,4,172,0,100,4,213,2,34,4,213,1,5,5,171,255,246,5,0,1,216, +5,171,2,141,5,171,255,246,5,171,2,141,5,171,255,246,5,171,2,141,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,1,217,5, +171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255,246, +5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171, +255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,0,0,5,171, +0,0,5,171,0,0,5,171,0,0,5,171,2,213,5,171,0,103,5,171,0,0,5,213,0,0,4,213, +0,123,4,213,0,6,2,214,0,109,2,214,0,109,8,0,0,0,7,235,1,158,7,235,1,145,7, +235,1,158,7,235,1,145,3,244,0,8,4,213,0,167,4,213,0,178,4,213,0,41,4,213, +0,41,2,214,0,115,8,43,1,177,8,107,1,209,7,85,1,70,6,0,1,218,6,0,1,81,4,64, +0,59,5,64,0,60,4,192,0,102,4,21,0,66,4,0,0,196,6,0,1,16,4,0,0,29,4,0,0,29, +2,170,0,119,2,170,0,243,2,170,0,127,2,170,0,14,2,170,0,53,2,170,0,43,2,170, +0,45,2,170,255,229,1,199,0,124,1,199,0,130,2,90,0,106,2,90,0,72,2,152,0,0, +2,152,0,0,2,135,0,45,2,160,255,233,3,47,0,32,2,72,255,232,0,0,0,3,0,0,0,3, +0,0,0,28,0,1,0,0,0,0,4,232,0,3,0,1,0,0,0,28,0,4,4,204,0,0,0,190,0,128,0,6, +0,62,0,126,1,127,1,146,1,255,2,199,2,201,2,221,3,126,3,138,3,140,3,161,3, +206,4,12,4,79,4,92,4,95,4,145,30,133,30,243,32,21,32,30,32,34,32,38,32,48, +32,51,32,58,32,60,32,62,32,68,32,127,32,164,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,94,33,149,33,168,34,2,34,6,34,15,34,18,34,21,34,26,34, +31,34,41,34,43,34,72,34,97,34,101,35,2,35,16,35,33,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,108,37,128,37,132,37,136,37, +140,37,147,37,161,37,172,37,178,37,186,37,188,37,196,37,203,37,207,37,217, +37,230,38,60,38,64,38,66,38,96,38,99,38,102,38,107,240,2,240,5,251,2,255, +255,0,0,0,32,0,160,1,146,1,250,2,198,2,201,2,216,3,126,3,132,3,140,3,142, +3,163,4,1,4,14,4,81,4,94,4,144,30,128,30,242,32,19,32,23,32,32,32,38,32,48, +32,50,32,57,32,60,32,62,32,68,32,127,32,163,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,91,33,144,33,168,34,2,34,6,34,15,34,17,34,21,34,25,34, +30,34,41,34,43,34,72,34,96,34,100,35,2,35,16,35,32,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,80,37,128,37,132,37,136,37,140, +37,144,37,160,37,170,37,178,37,186,37,188,37,196,37,202,37,207,37,216,37, +230,38,58,38,64,38,66,38,96,38,99,38,101,38,106,240,1,240,5,251,1,255,255, +255,227,0,0,255,174,255,71,254,129,254,128,254,114,252,160,253,204,253,203, +253,202,253,201,253,151,253,150,253,149,253,148,253,100,227,118,227,10,225, +235,225,234,225,233,225,230,225,221,225,220,225,215,225,214,225,213,225,208, +225,150,225,115,225,113,225,109,225,21,225,8,225,6,224,251,224,248,224,241, +224,197,224,148,224,130,224,41,224,38,224,30,224,29,223,255,0,0,224,19,224, +10,224,9,223,237,223,214,223,212,223,56,223,43,223,28,221,62,221,61,221,52, +221,49,221,46,221,43,221,40,221,33,221,26,221,19,221,12,220,249,220,230,220, +227,220,224,220,221,220,218,220,206,220,198,220,193,220,186,220,185,220,178, +220,173,220,170,220,162,220,150,220,67,220,64,220,63,220,34,220,32,220,31, +220,28,18,135,18,133,7,135,0,1,0,0,0,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,98,0,99,0,100,0,101,0, +102,0,103,0,104,0,105,0,106,0,107,0,108,0,109,0,16,0,110,0,111,0,112,0,113, +0,114,0,115,0,116,0,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0, +126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138, +0,139,0,140,0,141,0,142,0,143,0,144,0,145,0,146,0,147,0,148,0,149,0,150,0, +151,0,152,0,153,0,154,0,155,0,156,0,157,0,158,0,159,0,160,0,161,0,162,0,163, +0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,173,0,174,0,175,0, +176,0,177,0,178,0,179,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188, +0,189,0,190,0,191,0,192,0,193,0,194,0,195,0,196,0,197,0,198,0,199,0,200,0, +201,0,202,0,203,0,204,0,205,0,206,0,207,0,208,0,209,0,210,0,211,0,212,0,213, +0,214,0,215,0,216,0,217,0,218,0,219,0,220,0,221,0,222,0,223,0,224,0,225,0, +226,0,227,0,228,0,229,0,230,0,231,0,232,0,233,0,234,0,235,0,236,0,237,0,238, +0,239,0,240,0,241,0,242,0,243,0,244,0,245,0,246,0,247,0,248,0,249,0,250,0, +251,0,252,0,253,0,254,0,255,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10, +1,11,1,12,1,13,1,14,1,15,1,16,1,17,1,18,1,19,1,20,1,21,1,22,1,23,1,24,1,25, +1,26,1,27,1,28,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40, +1,41,1,42,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,0,119,2,48,0,6,2,10,0,0,0,0,1,0,0, +1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,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,0,0,0,0,0,1,0,0,0,0,0,3,0,4,0,5,0,6,0,7,0, +8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0, +23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37, +0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52, +0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67, +0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82, +0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97, +0,0,0,132,0,133,0,135,0,137,0,145,0,150,0,156,0,161,0,160,0,162,0,164,0,163, +0,165,0,167,0,169,0,168,0,170,0,171,0,173,0,172,0,174,0,175,0,177,0,179,0, +178,0,180,0,182,0,181,0,186,0,185,0,187,0,188,2,9,0,112,0,99,0,100,0,104, +2,11,0,118,0,159,0,110,0,106,2,29,0,116,0,105,2,54,0,134,0,152,2,49,0,113, +2,56,2,57,0,102,0,117,2,43,2,46,2,45,1,137,2,52,0,107,0,122,1,114,0,166,0, +184,0,127,0,98,0,109,2,48,1,64,2,53,2,44,0,108,0,123,2,12,0,3,0,128,0,131, +0,149,1,18,1,19,1,254,1,255,2,6,2,7,2,2,2,3,0,183,2,119,0,191,1,56,2,20,2, +25,2,16,2,17,2,136,2,137,2,10,0,119,2,4,2,8,2,13,0,130,0,138,0,129,0,139, +0,136,0,141,0,142,0,143,0,140,0,147,0,148,0,0,0,146,0,154,0,155,0,153,0,241, +1,71,1,78,0,111,1,74,1,75,1,76,0,120,1,79,1,77,1,72,0,0,64,69,89,88,85,84, +83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59, +58,57,56,55,54,53,49,48,47,46,45,44,40,39,38,37,36,35,34,33,31,24,20,17,16, +15,14,13,11,10,9,8,7,6,5,4,3,2,1,0,44,69,35,70,96,32,176,38,96,176,4,38,35, +72,72,45,44,69,35,70,35,97,32,176,38,97,176,4,38,35,72,72,45,44,69,35,70, +96,176,32,97,32,176,70,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,32,96, +32,176,38,97,176,32,97,176,4,38,35,72,72,45,44,69,35,70,96,176,64,97,32,176, +102,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,64,96,32,176,38,97,176, +64,97,176,4,38,35,72,72,45,44,1,16,32,60,0,60,45,44,32,69,35,32,176,205,68, +35,32,184,1,90,81,88,35,32,176,141,68,35,89,32,176,237,81,88,35,32,176,77, +68,35,89,32,176,4,38,81,88,35,32,176,13,68,35,89,33,33,45,44,32,32,69,24, +104,68,32,176,1,96,32,69,176,70,118,104,138,69,96,68,45,44,1,177,11,10,67, +35,67,101,10,45,44,0,177,10,11,67,35,67,11,45,44,0,176,40,35,112,177,1,40, +62,1,176,40,35,112,177,2,40,69,58,177,2,0,8,13,45,44,32,69,176,3,37,69,97, +100,176,80,81,88,69,68,27,33,33,89,45,44,73,176,14,35,68,45,44,32,69,176, +0,67,96,68,45,44,1,176,6,67,176,7,67,101,10,45,44,32,105,176,64,97,176,0, +139,32,177,44,192,138,140,184,16,0,98,96,43,12,100,35,100,97,92,88,176,3, +97,89,45,44,138,3,69,138,138,135,176,17,43,176,41,35,68,176,41,122,228,24, +45,44,69,101,176,44,35,68,69,176,43,35,68,45,44,75,82,88,69,68,27,33,33,89, +45,44,75,81,88,69,68,27,33,33,89,45,44,1,176,5,37,16,35,32,138,245,0,176, +1,96,35,237,236,45,44,1,176,5,37,16,35,32,138,245,0,176,1,97,35,237,236,45, +44,1,176,6,37,16,245,0,237,236,45,44,70,35,70,96,138,138,70,35,32,70,138, +96,138,97,184,255,128,98,35,32,16,35,138,177,12,12,138,112,69,96,32,176,0, +80,88,176,1,97,184,255,186,139,27,176,70,140,89,176,16,96,104,1,58,45,44, +32,69,176,3,37,70,82,75,176,19,81,91,88,176,2,37,70,32,104,97,176,3,37,176, +3,37,63,35,33,56,27,33,17,89,45,44,32,69,176,3,37,70,80,88,176,2,37,70,32, +104,97,176,3,37,176,3,37,63,35,33,56,27,33,17,89,45,44,0,176,7,67,176,6,67, +11,45,44,33,33,12,100,35,100,139,184,64,0,98,45,44,33,176,128,81,88,12,100, +35,100,139,184,32,0,98,27,178,0,64,47,43,89,176,2,96,45,44,33,176,192,81, +88,12,100,35,100,139,184,21,85,98,27,178,0,128,47,43,89,176,2,96,45,44,12, +100,35,100,139,184,64,0,98,96,35,33,45,44,75,83,88,138,176,4,37,73,100,35, +69,105,176,64,139,97,176,128,98,176,32,97,106,176,14,35,68,35,16,176,14,246, +27,33,35,138,18,17,32,57,47,89,45,44,75,83,88,32,176,3,37,73,100,105,32,176, +5,38,176,6,37,73,100,35,97,176,128,98,176,32,97,106,176,14,35,68,176,4,38, +16,176,14,246,138,16,176,14,35,68,176,14,246,176,14,35,68,176,14,237,27,138, +176,4,38,17,18,32,57,35,32,57,47,47,89,45,44,69,35,69,96,35,69,96,35,69,96, +35,118,104,24,176,128,98,32,45,44,176,72,43,45,44,32,69,176,0,84,88,176,64, +68,32,69,176,64,97,68,27,33,33,89,45,44,69,177,48,47,69,35,69,97,96,176,1, +96,105,68,45,44,75,81,88,176,47,35,112,176,20,35,66,27,33,33,89,45,44,75, +81,88,32,176,3,37,69,105,83,88,68,27,33,33,89,27,33,33,89,45,44,69,176,20, +67,176,0,96,99,176,1,96,105,68,45,44,176,47,69,68,45,44,69,35,32,69,138,96, +68,45,44,69,35,69,96,68,45,44,75,35,81,88,185,0,51,255,224,177,52,32,27,179, +51,0,52,0,89,68,68,45,44,176,22,67,88,176,3,38,69,138,88,100,102,176,31,96, +27,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,89,35,88,101,89,176,41, +35,68,35,16,176,41,224,27,33,33,33,33,33,89,45,44,176,2,67,84,88,75,83,35, +75,81,90,88,56,27,33,33,89,27,33,33,33,33,89,45,44,176,22,67,88,176,4,37, +69,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,35,88,27,101,89,176,41, +35,68,176,5,37,176,8,37,8,32,88,2,27,3,89,176,4,37,16,176,5,37,32,70,176, +4,37,35,66,60,176,4,37,176,7,37,8,176,7,37,16,176,6,37,32,70,176,4,37,176, +1,96,35,66,60,32,88,1,27,0,89,176,4,37,16,176,5,37,176,41,224,176,41,32,69, +101,68,176,7,37,16,176,6,37,176,41,224,176,5,37,176,8,37,8,32,88,2,27,3,89, +176,5,37,176,3,37,67,72,176,4,37,176,7,37,8,176,6,37,176,3,37,176,1,96,67, +72,27,33,89,33,33,33,33,33,33,33,45,44,2,176,4,37,32,32,70,176,4,37,35,66, +176,5,37,8,176,3,37,69,72,33,33,33,33,45,44,2,176,3,37,32,176,4,37,8,176, +2,37,67,72,33,33,33,45,44,69,35,32,69,24,32,176,0,80,32,88,35,101,35,89,35, +104,32,176,64,80,88,33,176,64,89,35,88,101,89,138,96,68,45,44,75,83,35,75, +81,90,88,32,69,138,96,68,27,33,33,89,45,44,75,84,88,32,69,138,96,68,27,33, +33,89,45,44,75,83,35,75,81,90,88,56,27,33,33,89,45,44,176,0,33,75,84,88,56, +27,33,33,89,45,44,176,2,67,84,88,176,70,43,27,33,33,33,33,89,45,44,176,2, +67,84,88,176,71,43,27,33,33,33,89,45,44,176,2,67,84,88,176,72,43,27,33,33, +33,33,89,45,44,176,2,67,84,88,176,73,43,27,33,33,33,89,45,44,32,138,8,35, +75,83,138,75,81,90,88,35,56,27,33,33,89,45,44,0,176,2,37,73,176,0,83,88,32, +176,64,56,17,27,33,89,45,44,1,70,35,70,96,35,70,97,35,32,16,32,70,138,97, +184,255,128,98,138,177,64,64,138,112,69,96,104,58,45,44,32,138,35,73,100, +138,35,83,88,60,27,33,89,45,44,75,82,88,125,27,122,89,45,44,176,18,0,75,1, +75,84,66,45,44,177,2,0,66,177,35,1,136,81,177,64,1,136,83,90,88,185,16,0, +0,32,136,84,88,178,2,1,2,67,96,66,89,177,36,1,136,81,88,185,32,0,0,64,136, +84,88,178,2,2,2,67,96,66,177,36,1,136,84,88,178,2,32,2,67,96,66,0,75,1,75, +82,88,178,2,8,2,67,96,66,89,27,185,64,0,0,128,136,84,88,178,2,4,2,67,96,66, +89,185,64,0,0,128,99,184,1,0,136,84,88,178,2,8,2,67,96,66,89,185,64,0,1,0, +99,184,2,0,136,84,88,178,2,16,2,67,96,66,89,185,64,0,2,0,99,184,4,0,136,84, +88,178,2,64,2,67,96,66,89,89,89,89,89,45,44,69,24,104,35,75,81,88,35,32,69, +32,100,176,64,80,88,124,89,104,138,96,89,68,45,44,176,0,22,176,2,37,176,2, +37,1,176,1,35,62,0,176,2,35,62,177,1,2,6,12,176,10,35,101,66,176,11,35,66, +1,176,1,35,63,0,176,2,35,63,177,1,2,6,12,176,6,35,101,66,176,7,35,66,176, +1,22,1,45,44,122,138,16,69,35,245,24,45,0,0,0,177,9,64,190,1,7,0,1,0,31,1, +7,0,1,0,159,1,4,64,142,1,192,253,1,175,253,1,0,253,1,10,79,251,1,32,251,1, +245,80,40,31,242,70,40,31,241,70,42,31,240,70,43,31,95,239,127,239,2,15,239, +79,239,95,239,143,239,175,239,5,11,229,228,30,31,227,226,70,31,15,226,1,64, +226,70,22,31,225,224,70,31,207,224,223,224,239,224,3,64,224,51,54,70,224, +70,24,31,221,61,223,85,222,61,3,85,223,1,3,85,220,3,255,31,15,213,31,213, +2,15,213,31,213,2,64,202,24,27,70,207,194,1,189,192,60,31,193,80,38,31,188, +190,40,31,255,185,1,80,184,112,184,128,184,3,184,255,192,64,255,184,18,50, +70,31,183,63,183,79,183,111,183,127,183,159,183,175,183,7,112,178,160,178, +176,178,3,15,178,1,144,181,1,176,181,1,15,181,1,8,15,179,63,179,239,179,3, +128,176,144,176,2,176,176,192,176,208,176,3,47,175,63,175,2,160,173,176,173, +2,192,173,208,173,2,47,172,63,172,2,159,171,1,192,170,208,170,2,79,169,143, +169,2,47,169,111,169,191,169,255,169,4,156,155,36,31,80,155,1,111,150,1,191, +150,1,150,70,29,31,149,148,23,31,127,148,143,148,255,148,3,48,145,64,145, +2,128,145,1,112,143,128,143,2,144,143,1,192,143,208,143,2,79,140,95,140,111, +140,3,134,70,255,31,159,133,1,132,131,49,31,116,115,63,31,115,80,38,31,111, +110,60,31,110,70,53,31,26,1,24,85,25,51,24,85,7,51,3,85,6,3,255,31,96,80, +38,31,95,80,38,31,92,70,49,31,91,90,72,31,90,70,49,31,19,50,18,85,5,1,3,85, +4,50,3,85,111,3,1,15,3,63,3,2,239,81,255,81,2,64,81,53,56,70,64,81,37,40, +70,207,64,84,80,1,73,70,32,31,72,70,53,31,71,70,53,31,175,70,1,223,70,239, +70,2,128,70,1,22,50,21,85,17,1,15,85,16,50,15,85,2,1,0,85,1,0,1,31,31,15, +63,15,95,15,127,15,4,15,15,47,15,79,15,111,15,143,15,223,15,255,15,7,63,15, +127,15,239,15,3,111,0,1,128,22,1,5,1,184,1,144,177,84,83,43,43,75,184,7,255, +82,75,176,7,80,91,176,1,136,176,37,83,176,1,136,176,64,81,90,176,6,136,176, +0,85,90,91,88,177,1,1,142,89,133,141,141,0,66,29,75,176,50,83,88,176,96,29, +89,75,176,100,83,88,176,64,29,89,75,176,128,83,88,176,16,29,177,22,0,66,89, +116,115,116,117,43,43,43,43,43,1,115,116,117,43,43,43,0,116,43,43,115,115, +117,43,43,43,1,43,43,43,0,43,43,43,43,43,43,1,43,43,0,43,43,1,43,115,43,0, +116,115,116,117,115,116,115,43,1,43,116,117,0,115,43,115,116,1,115,115,116, +0,115,116,116,115,116,115,1,94,115,115,116,115,115,0,115,43,115,115,1,43, +0,43,1,43,0,115,43,116,117,43,43,43,43,1,43,43,116,43,43,94,115,43,0,43,94, +115,116,1,43,43,43,0,43,115,115,94,115,115,115,1,115,115,115,24,94,0,0,0, +5,204,5,204,0,125,5,129,0,21,0,121,5,129,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +4,58,0,20,0,119,0,0,255,236,0,0,0,0,255,236,0,0,0,0,255,236,0,0,254,87,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,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,8,0,0,0,0,0,0,180,0,189,0,175,0,160,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0, +126,0,0,0,172,0,0,0,0,0,0,0,0,0,0,0,0,0,191,0,195,0,171,0,0,0,0,0,155,0,141, +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,185,0,170,0,0,0,0,0, +0,0,148,0,153,0,135,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,106, +0,131,0,141,0,164,0,180,0,0,0,0,0,0,0,0,0,0,0,96,0,106,0,121,0,152,0,172, +0,184,0,167,0,0,1,34,1,51,0,195,0,107,0,0,0,0,0,0,0,219,0,201,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,225,1,201,0,146,0,168,0,107,0,146,0,183, +0,107,0,155,0,0,2,123,2,242,0,146,2,82,0,110,2,215,3,129,0,130,0,137,0,160, +0,159,1,105,0,143,0,0,1,96,0,164,1,91,0,94,0,130,0,0,0,0,0,0,0,94,0,101,0, +111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,144,0,165,0,122,0,128,0,0,0,0,0,0, +0,0,0,0,5,129,255,243,0,13,252,167,0,131,0,137,0,143,0,150,0,105,0,113,0, +0,0,0,0,0,0,0,0,0,0,168,1,249,0,0,0,0,3,31,0,167,0,174,0,181,0,0,0,0,0,129, +0,0,0,0,0,0,0,0,7,72,3,106,2,182,2,2,253,147,0,0,0,145,0,103,0,145,0,97,1, +217,0,0,2,141,3,65,0,68,5,17,0,0,0,44,0,44,0,44,0,44,1,22,1,96,2,4,3,4,3, +230,4,240,5,14,5,84,5,158,5,246,6,50,6,114,6,144,6,178,6,218,7,80,7,150,8, +32,8,222,9,68,9,226,10,140,10,206,11,158,12,80,12,126,12,200,13,18,13,74, +13,146,14,20,15,100,16,22,16,172,17,64,17,160,17,222,18,40,18,202,19,22,19, +96,19,194,20,44,20,88,21,184,22,64,22,182,23,26,23,192,24,94,25,40,26,38, +26,146,27,42,29,162,30,254,32,64,32,148,32,190,32,242,33,28,34,172,34,202, +34,244,35,160,36,54,36,172,37,54,37,166,38,32,38,238,39,88,39,166,40,102, +41,0,41,68,42,246,43,100,43,212,44,112,45,20,45,98,46,16,46,114,46,230,48, +52,50,86,51,226,53,124,54,24,54,136,55,126,55,240,56,112,57,142,58,18,58, +196,59,100,59,234,60,238,62,28,62,144,63,134,64,72,64,168,64,210,65,178,65, +200,66,36,66,110,66,232,67,126,67,170,68,42,68,106,68,138,68,244,69,48,69, +166,70,14,70,48,70,90,70,124,71,8,71,32,71,56,71,80,71,104,71,130,71,154, +72,14,72,34,72,58,72,82,72,106,72,132,72,156,72,178,72,200,72,224,73,80,73, +104,73,128,73,152,73,176,73,200,73,226,74,68,74,252,75,20,75,44,75,68,75, +94,75,118,75,212,76,154,76,178,76,202,76,226,76,250,77,20,77,46,78,38,78, +58,78,82,78,106,78,130,78,156,78,180,78,202,78,224,78,248,79,172,79,196,79, +220,79,244,80,12,80,36,80,62,80,126,81,26,81,50,81,74,81,98,81,124,81,148, +82,24,82,50,82,74,82,98,82,122,82,146,82,166,82,186,82,210,82,234,83,2,83, +26,83,50,83,70,83,94,83,118,83,142,83,164,83,172,84,74,84,98,84,122,84,146, +84,170,84,194,84,214,84,234,84,254,85,22,85,46,85,70,85,94,85,118,85,142, +85,166,85,186,85,206,85,230,85,254,86,22,86,142,87,20,87,42,87,64,87,88,87, +110,87,132,87,154,87,172,87,192,87,216,88,170,88,182,88,210,88,234,89,228, +89,248,90,12,90,124,90,148,90,170,90,190,90,210,90,232,91,22,91,42,91,62, +91,150,91,224,91,248,92,16,92,36,92,56,92,80,92,104,92,116,93,20,93,164,93, +188,93,212,93,236,94,4,94,30,94,56,94,216,95,154,95,178,95,202,95,222,95, +242,96,10,96,34,96,58,96,82,96,106,96,130,96,150,96,170,96,194,96,218,96, +238,98,112,98,136,98,158,98,238,99,96,99,120,99,144,99,168,99,192,99,216, +99,240,100,10,100,36,100,62,100,88,100,122,100,142,100,166,100,190,100,214, +100,238,101,8,101,32,101,56,101,80,101,100,101,124,101,148,101,244,102,108, +103,104,103,140,103,164,103,188,103,212,103,236,104,34,104,88,104,142,104, +214,104,238,105,86,105,162,106,244,107,70,107,118,107,188,107,248,109,10, +109,50,109,112,109,172,109,206,112,188,112,236,114,22,114,30,114,38,114,82, +114,208,114,216,114,224,114,232,115,138,115,146,115,154,116,34,116,42,116, +50,116,116,116,124,116,182,116,190,117,56,117,64,117,72,117,234,117,242,118, +140,119,78,119,102,120,194,120,218,120,242,121,10,121,36,121,64,122,30,122, +212,123,118,124,16,124,186,125,114,125,218,126,124,127,28,127,136,128,94, +128,208,130,6,130,234,130,242,131,112,131,246,132,174,133,52,133,156,134, +4,134,138,135,74,135,188,136,108,136,134,136,160,136,184,136,208,136,232, +137,66,137,198,137,222,138,142,138,150,138,158,138,182,138,190,139,116,139, +224,140,78,140,102,140,126,140,198,140,206,141,66,141,74,141,82,141,224,141, +232,142,210,143,168,144,10,144,34,144,152,145,30,145,38,145,46,145,54,145, +108,145,116,145,124,145,132,146,12,146,156,146,164,146,226,147,78,147,158, +147,250,148,88,148,206,149,44,149,214,150,112,151,26,151,34,151,198,152,86, +152,130,152,254,153,6,153,250,154,160,155,34,155,58,155,200,156,80,157,2, +157,96,157,104,157,178,157,186,157,194,157,250,158,2,158,250,159,2,159,72, +159,160,159,242,160,86,160,184,161,28,161,134,162,24,162,150,163,6,163,32, +163,192,163,216,164,106,164,114,164,232,165,2,165,10,165,228,166,90,166,222, +166,246,167,14,167,100,167,148,167,194,167,218,167,242,168,10,168,34,168, +60,168,86,168,110,168,134,168,168,168,202,168,236,168,248,169,40,169,90,169, +140,169,188,170,18,170,114,170,208,171,12,171,102,171,172,171,238,174,134, +174,168,174,186,174,246,175,46,175,70,175,90,175,126,175,232,176,60,176,252, +178,100,179,50,180,4,180,178,181,136,182,32,182,224,183,78,183,128,183,178, +183,228,184,14,184,60,184,106,184,152,184,198,185,14,185,86,185,166,186,118, +187,22,187,70,187,184,187,214,188,72,188,226,188,250,189,52,190,108,191,92, +191,212,192,8,192,96,192,184,192,230,193,0,193,54,193,116,193,140,193,166, +193,200,193,234,194,12,194,46,194,84,194,122,194,160,194,198,194,248,195, +30,195,72,195,118,195,166,195,224,196,14,196,62,196,120,196,166,196,214,197, +16,197,62,197,110,197,168,197,220,198,18,198,86,198,138,198,194,199,8,199, +62,199,114,199,184,199,238,200,34,200,106,200,178,200,252,201,88,201,112, +201,136,201,160,201,184,201,208,203,232,205,196,207,132,207,146,207,178,207, +206,207,246,208,4,208,18,208,32,208,46,208,60,208,106,208,188,208,238,209, +32,209,114,209,180,210,100,210,228,211,148,212,14,212,166,213,6,213,140,213, +224,214,26,214,102,214,220,215,70,215,164,215,246,216,8,216,68,216,164,217, +34,217,88,218,12,218,74,218,114,218,160,218,200,218,242,219,40,219,94,219, +130,219,208,220,20,220,80,0,0,0,2,0,68,0,0,2,100,5,85,0,3,0,7,0,46,177,1, +0,47,60,178,7,4,8,237,50,177,6,5,220,60,178,3,2,8,237,50,0,177,3,0,47,60, +178,5,4,8,237,50,178,7,6,9,252,60,178,1,2,8,237,50,51,17,33,17,37,33,17,33, +68,2,32,254,36,1,152,254,104,5,85,250,171,68,4,205,0,0,0,2,0,185,0,0,1,127, +5,129,0,3,0,7,1,172,64,158,3,91,2,2,150,7,166,7,2,7,150,57,4,73,4,89,4,3, +4,64,23,27,72,6,4,1,11,4,38,9,1,201,9,217,9,2,118,9,166,9,2,25,9,41,9,2,6, +9,1,215,73,9,1,38,9,1,217,9,1,118,9,1,41,9,1,6,9,1,121,9,1,86,9,1,9,9,1,163, +169,9,1,130,9,1,84,9,100,9,116,9,3,137,9,1,98,9,114,9,2,68,9,84,9,2,34,9, +50,9,2,20,9,1,2,9,1,242,9,1,212,9,228,9,2,178,9,194,9,2,148,9,164,9,2,114, +9,130,9,2,84,9,100,9,2,66,9,1,20,9,36,9,52,9,3,2,9,1,110,9,184,255,128,64, +17,102,109,72,73,9,1,9,64,94,98,72,45,9,61,9,2,9,184,1,0,64,153,85,88,72, +9,128,81,84,72,125,9,141,9,157,9,3,95,9,111,9,2,9,128,71,75,72,9,192,67,70, +72,9,128,63,66,72,125,9,1,91,9,107,9,2,61,9,77,9,2,25,9,41,9,2,11,9,1,55, +235,9,251,9,2,205,9,221,9,2,171,9,187,9,2,9,64,45,48,72,59,9,75,9,91,9,3, +29,9,45,9,2,1,203,9,219,9,235,9,3,159,9,175,9,191,9,3,27,9,43,9,59,9,107, +9,123,9,5,15,9,1,2,127,9,143,9,159,9,191,9,207,9,5,64,9,96,9,2,15,9,31,9, +2,7,112,1,1,95,1,1,1,5,156,4,2,3,0,63,47,253,206,93,93,1,94,93,93,93,95,113, +113,113,113,95,114,114,43,114,114,114,94,93,93,93,93,93,43,43,43,113,113, +43,43,114,43,114,43,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +114,114,114,94,93,93,93,113,113,113,113,114,114,94,93,93,93,93,113,47,94, +93,43,93,237,113,51,47,237,49,48,1,35,3,51,3,53,51,21,1,103,148,24,196,198, +194,1,141,3,244,250,127,201,201,0,0,2,0,87,3,198,2,128,5,129,0,3,0,7,0,104, +64,33,48,3,1,128,3,1,3,16,2,32,2,96,2,112,2,128,2,5,96,2,112,2,2,80,2,96, +2,176,2,192,2,4,2,184,255,192,179,37,40,72,2,184,255,192,64,32,25,28,72,2, +48,7,1,128,7,1,7,111,6,127,6,143,6,3,47,6,63,6,2,6,5,32,0,1,0,6,2,3,0,63, +51,205,93,50,1,47,113,114,205,93,113,220,43,43,93,113,114,205,93,113,49,48, +1,35,3,51,1,35,3,51,2,106,142,20,184,254,121,141,21,184,3,198,1,187,254,69, +1,187,0,0,0,2,0,9,0,0,4,105,5,121,0,27,0,31,0,214,64,134,90,25,1,90,21,1, +68,14,1,68,19,1,54,19,1,68,30,1,38,30,54,30,2,68,23,1,38,23,54,23,2,3,16, +1,8,29,28,21,20,9,20,20,11,14,15,18,19,10,9,19,12,16,4,10,4,1,0,25,24,5,24, +24,27,3,3,7,30,31,22,23,6,23,5,6,4,7,8,11,4,12,13,1,14,29,30,4,13,0,15,28, +31,4,16,17,18,21,22,25,4,17,16,13,1,208,13,1,79,17,143,17,159,17,3,63,17, +79,17,2,13,17,13,17,5,20,23,24,3,19,3,6,9,10,3,5,0,47,23,51,63,23,51,18,57, +57,47,47,93,113,93,113,17,23,51,16,205,23,50,17,23,51,16,205,23,50,1,47,51, +51,135,192,192,192,192,1,23,51,16,135,192,192,192,192,1,47,23,51,135,192, +192,192,192,1,51,16,135,192,192,192,192,49,48,1,93,93,93,93,93,93,93,93,93, +93,1,3,33,21,33,3,35,19,33,3,35,19,35,53,51,19,35,53,33,19,51,3,33,19,51, +3,51,21,33,3,33,19,3,128,78,1,4,254,229,88,110,86,254,149,84,110,84,201,225, +78,252,1,18,89,110,88,1,107,88,110,88,211,253,64,80,1,106,78,3,117,254,143, +108,254,104,1,152,254,104,1,152,108,1,113,108,1,152,254,104,1,152,254,104, +108,254,143,1,113,0,3,0,22,255,114,4,82,5,236,0,48,0,59,0,70,1,46,64,92,154, +14,1,154,13,1,150,68,1,133,39,1,138,57,154,57,2,137,53,153,53,2,132,37,1, +118,6,134,6,150,6,3,70,63,86,63,134,63,3,52,38,100,38,116,38,3,37,2,1,25, +27,1,24,34,55,3,47,9,21,65,3,32,48,1,48,48,16,49,30,111,29,41,111,0,49,32, +49,2,0,49,32,49,48,49,80,49,112,49,5,8,3,49,184,255,192,179,29,35,72,49,184, +255,192,64,117,17,22,72,49,4,111,3,64,16,24,72,3,60,111,16,33,66,115,207, +54,1,157,54,1,5,136,54,1,120,10,216,10,2,199,34,215,34,2,182,34,1,135,34, +167,34,2,215,65,1,166,65,1,119,65,1,60,16,65,34,10,54,41,49,8,0,125,30,141, +30,2,26,30,1,30,24,22,64,19,23,72,22,15,21,47,21,63,21,95,21,4,21,55,9,115, +47,148,4,164,4,2,112,4,128,4,2,5,4,21,4,85,4,101,4,4,46,4,0,0,47,50,50,93, +93,93,205,237,50,47,93,205,43,51,51,93,93,18,23,57,93,93,93,93,93,93,93,93, +95,93,93,237,50,1,47,237,214,43,237,47,43,43,95,94,93,113,253,212,237,17, +18,57,47,114,23,51,205,23,50,49,48,93,0,93,93,93,93,93,93,1,93,93,93,0,93, +1,93,37,46,1,39,55,30,3,23,17,39,46,3,53,52,62,2,55,53,51,21,30,3,23,7,46, +1,39,17,30,5,21,20,14,2,7,21,35,1,52,46,2,39,17,62,3,1,20,30,2,23,17,14,3, +2,6,217,245,34,170,11,46,78,113,78,20,77,148,116,71,64,115,158,95,124,100, +145,102,66,20,174,20,122,117,59,114,103,88,64,36,56,114,175,119,124,1,160, +47,81,106,58,65,108,77,42,253,92,40,70,95,55,72,100,61,27,20,9,185,165,37, +53,87,64,39,5,1,240,5,18,50,83,128,98,84,124,83,44,4,131,131,5,45,80,115, +75,33,94,105,11,254,67,14,30,41,56,79,109,72,77,131,100,62,6,162,2,24,63, +80,51,32,15,254,44,4,31,56,81,2,197,54,74,50,33,14,1,165,4,33,52,68,0,0,0, +0,5,0,73,255,244,6,212,5,141,0,19,0,23,0,43,0,63,0,83,0,212,64,11,118,20, +134,20,2,121,22,137,22,2,42,184,255,232,64,14,8,12,72,37,24,8,12,72,32,24, +8,12,72,26,184,255,232,179,8,12,72,17,184,255,232,179,8,12,72,13,184,255, +232,64,18,8,12,72,7,24,8,12,72,3,24,8,12,72,22,23,20,21,21,184,255,240,64, +84,23,16,23,21,23,21,0,39,54,180,10,178,0,180,0,44,16,44,32,44,3,0,44,64, +44,2,0,44,16,44,32,44,80,44,96,44,112,44,224,44,240,44,8,44,64,180,29,178, +74,180,15,39,1,239,39,255,39,2,39,64,10,13,72,39,79,182,34,184,69,182,24, +4,22,3,21,18,49,182,15,184,59,182,5,19,0,63,237,244,237,63,63,63,237,244, +237,1,47,43,113,114,237,244,237,47,93,113,114,253,244,237,17,18,57,57,47, +47,56,56,17,51,17,51,49,48,0,43,43,43,43,43,43,43,43,1,93,93,1,20,14,2,35, +34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2, +53,52,62,2,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,6,212,51,87,116,66,66,115,85,49,48,86,117,68,66,115, +85,50,251,59,155,3,154,157,251,223,64,114,86,49,50,85,116,66,67,116,85,49, +49,86,118,4,250,22,43,63,40,42,64,44,22,23,43,63,41,39,63,44,24,251,240,22, +42,62,40,43,65,44,22,23,43,64,42,38,62,44,24,1,178,125,171,105,45,45,104, +171,126,133,174,103,41,41,103,174,253,201,5,129,12,41,102,172,131,126,172, +107,46,46,106,172,127,131,172,102,41,252,37,99,131,78,32,33,78,131,98,95, +128,79,34,34,79,128,2,124,98,130,78,32,33,78,130,97,95,130,79,34,34,79,130, +0,0,3,0,72,255,236,5,54,5,137,0,57,0,73,0,89,1,20,64,73,137,1,1,140,36,1, +123,42,139,42,2,98,82,114,82,130,82,3,102,71,1,127,78,1,91,78,1,73,43,89, +43,105,43,3,54,48,134,48,2,37,40,1,44,35,124,35,140,35,3,28,5,44,5,60,5,92, +5,4,10,10,26,10,42,10,3,10,2,26,2,42,2,3,31,184,255,232,64,56,9,13,72,10, +25,26,25,42,25,3,48,41,38,69,4,54,66,73,23,33,73,58,45,44,140,74,1,74,77, +18,3,23,3,58,44,80,23,1,3,44,1,23,58,44,44,58,23,3,13,15,54,1,175,54,1,54, +184,255,192,64,61,9,12,72,54,80,72,63,13,79,13,2,13,143,3,1,141,77,1,98,69, +114,69,2,54,69,70,69,2,3,74,48,41,77,44,38,18,69,9,8,63,81,144,28,1,192,28, +1,15,28,63,28,2,28,85,81,8,22,51,80,0,22,0,63,237,63,237,47,93,93,113,237, +18,23,57,93,93,93,93,1,47,93,237,47,43,93,113,18,23,57,47,47,47,0,93,1,93, +17,18,57,17,23,57,93,16,205,16,237,16,237,17,23,57,49,48,93,43,0,93,93,93, +93,1,93,93,93,0,93,93,93,93,1,93,0,93,93,5,34,38,39,14,3,35,34,46,2,53,52, +62,2,55,46,3,53,52,62,2,51,50,30,2,21,20,14,2,7,30,1,23,62,1,55,23,14,1,7, +30,1,51,50,54,55,21,14,1,1,52,46,2,35,34,6,21,20,22,23,62,3,3,46,1,39,14, +1,21,20,30,2,51,50,62,2,4,169,96,144,58,30,76,93,109,64,117,171,110,53,51, +91,126,75,18,29,22,12,40,85,133,93,73,123,90,50,66,112,148,83,62,146,85,61, +81,29,145,35,107,70,53,106,49,32,59,26,28,75,254,150,27,48,69,42,96,100,37, +28,65,116,86,50,74,89,164,66,113,123,35,72,109,73,44,79,68,55,12,66,61,26, +48,38,23,60,105,143,83,79,129,105,83,33,34,77,78,78,35,66,115,85,49,38,72, +106,68,75,117,92,75,33,114,201,97,90,199,121,43,139,227,103,54,44,7,9,135, +11,11,4,121,37,60,43,23,103,91,59,129,56,26,55,65,79,252,158,105,230,122, +48,148,105,55,95,71,41,19,30,38,0,0,1,0,104,3,198,1,32,5,129,0,3,0,33,64, +19,48,3,1,128,3,1,3,16,2,32,2,2,2,32,0,1,0,2,3,0,63,205,93,1,47,93,205,93, +113,49,48,1,35,3,51,1,10,141,21,184,3,198,1,187,0,1,0,127,254,88,2,158,5, +204,0,22,0,66,64,45,135,13,1,135,9,1,88,20,1,88,2,1,17,24,14,17,72,5,24,14, +17,72,16,6,16,16,6,128,6,2,6,11,242,0,0,16,0,32,0,3,0,16,27,5,0,0,63,63,1, +47,93,237,204,93,56,50,49,48,43,43,93,93,93,93,19,52,62,2,55,51,14,3,21,20, +30,2,23,35,46,3,53,127,42,90,140,97,174,94,137,88,43,43,88,137,94,174,97, +140,90,42,2,20,139,254,234,220,105,105,221,235,254,139,139,254,236,220,105, +105,220,234,253,140,0,0,0,1,0,12,254,88,2,43,5,204,0,22,0,72,64,13,136,13, +1,136,9,1,87,20,1,87,2,1,17,184,255,232,179,14,17,72,5,184,255,232,180,14, +17,72,16,6,184,255,240,64,16,31,6,143,6,2,6,0,242,143,11,1,11,16,0,5,27,0, +63,63,1,47,93,253,204,93,56,50,49,48,43,43,93,93,93,93,1,20,14,2,7,35,62, +3,53,52,46,2,39,51,30,3,21,2,43,42,90,140,97,174,94,137,88,43,43,88,137,94, +174,97,140,90,42,2,16,140,253,234,220,105,105,220,236,254,139,139,254,235, +221,105,105,220,234,254,139,0,0,0,0,1,0,33,2,178,2,253,5,129,0,14,0,107,64, +75,77,5,93,5,109,5,3,75,4,91,4,107,4,3,66,8,82,8,2,67,7,83,7,2,0,6,12,3,13, +95,4,1,15,4,1,4,3,32,2,48,2,2,2,14,47,10,63,10,2,10,9,8,191,13,207,13,2,16, +13,32,13,2,13,240,5,1,223,5,1,0,5,1,5,14,3,0,63,204,93,93,93,1,47,93,93,204, +51,204,93,221,204,93,51,204,113,114,18,23,57,49,48,93,93,93,93,1,37,23,5, +23,7,11,1,39,55,37,55,5,3,51,1,200,1,8,45,254,230,185,119,150,156,119,189, +254,232,45,1,11,12,136,4,90,103,132,73,250,72,1,2,255,0,72,248,73,134,107, +1,41,0,0,0,1,0,100,0,180,4,71,4,158,0,11,0,71,64,46,211,11,1,133,11,1,220, +4,1,138,4,1,9,1,170,6,16,2,32,2,2,2,217,2,1,56,2,136,2,2,2,0,4,173,9,214, +7,1,55,7,135,7,2,7,5,179,0,63,51,93,93,51,237,50,50,93,93,1,47,93,51,237, +50,49,48,93,93,93,93,1,17,35,17,33,53,33,17,51,17,33,21,2,159,147,254,88, +1,168,147,1,168,2,96,254,84,1,172,146,1,172,254,84,146,0,0,1,0,184,254,250, +1,129,0,219,0,12,0,78,185,0,4,255,224,183,11,17,72,10,151,0,150,7,184,255, +192,64,22,9,17,72,7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2, +12,184,255,192,64,14,38,41,72,12,64,13,16,72,12,7,168,0,155,11,0,47,253,228, +1,47,43,43,93,113,114,51,43,253,237,49,48,43,37,21,20,14,2,7,35,62,1,53,35, +53,1,129,9,20,29,20,123,45,49,88,219,168,53,87,75,66,32,65,132,65,219,0,0, +0,0,1,0,91,1,208,2,79,2,112,0,3,0,33,64,20,0,2,64,2,112,2,3,2,0,0,187,159, +1,207,1,2,47,1,1,1,0,47,93,113,237,1,47,47,93,49,48,19,53,33,21,91,1,244, +1,208,160,160,0,0,0,1,0,187,0,0,1,126,0,219,0,3,0,46,64,32,3,150,0,0,144, +0,2,64,0,80,0,176,0,224,0,240,0,5,144,0,160,0,2,0,64,13,16,72,0,1,155,0,0, +47,237,1,47,43,93,113,114,237,49,48,51,53,51,21,187,195,219,219,0,1,0,0,255, +236,2,57,5,204,0,3,0,51,64,26,121,0,137,0,2,1,24,13,17,72,41,2,1,2,16,0,2, +16,2,32,2,128,2,4,2,0,184,255,240,180,0,1,0,0,19,0,63,63,1,47,56,205,93,56, +49,48,93,43,93,21,1,51,1,1,155,158,254,105,20,5,224,250,32,0,0,2,0,80,255, +236,4,35,5,150,0,19,0,39,0,112,64,80,89,37,105,37,2,70,33,86,33,102,33,3, +86,27,102,27,2,89,23,105,23,2,4,18,1,118,17,134,17,2,121,13,137,13,2,11,12, +1,11,8,1,121,7,137,7,2,118,3,134,3,2,4,2,1,7,0,110,64,144,20,160,20,2,20, +41,128,30,110,63,10,1,10,25,115,15,7,35,115,5,25,0,63,237,63,237,1,47,93, +237,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93,93,93,93,93,1,20, +2,14,1,35,34,46,1,2,53,52,18,62,1,51,50,30,1,18,7,52,46,2,35,34,14,2,21,20, +30,2,51,50,62,2,4,35,77,133,180,102,103,178,131,75,75,132,180,106,101,177, +132,76,183,40,78,113,72,76,116,79,40,41,79,114,73,71,114,79,43,2,193,203, +254,235,171,74,74,170,1,21,204,213,1,23,166,67,67,166,254,233,213,168,223, +133,55,56,133,223,167,162,222,135,59,59,135,222,0,1,0,156,0,0,4,15,5,129, +0,10,0,94,64,32,32,9,128,9,2,9,9,8,110,2,144,4,1,4,47,1,143,1,2,1,1,4,6,3, +0,2,16,2,2,7,2,5,184,255,240,64,26,16,22,72,68,5,84,5,100,5,3,5,4,3,16,16, +22,72,4,3,6,6,8,1,116,0,24,0,63,237,50,63,51,51,43,47,51,93,43,1,47,94,93, +23,51,47,93,47,93,16,237,50,47,93,49,48,51,53,33,17,5,53,37,51,17,33,21,156, +1,103,254,194,1,77,166,1,87,153,4,60,227,170,229,251,24,153,0,0,0,1,0,103, +0,0,4,12,5,150,0,40,0,161,64,77,117,4,1,117,26,133,26,2,122,16,138,16,2,101, +37,1,86,37,1,41,33,89,33,105,33,3,105,35,1,28,35,1,25,21,1,117,27,133,27, +2,6,27,1,39,29,110,64,8,64,38,42,72,64,8,1,143,8,1,8,42,128,18,110,19,116, +38,132,38,2,19,38,16,0,32,0,2,0,184,255,192,64,31,30,38,72,0,8,38,142,18, +1,92,18,108,18,124,18,3,10,18,26,18,2,18,13,115,24,7,1,38,116,0,24,0,63,237, +57,63,237,51,93,93,93,18,57,1,47,43,93,51,51,93,47,237,26,16,220,93,113,43, +26,237,50,49,48,93,93,0,93,93,93,93,1,93,93,0,93,93,93,51,53,62,5,53,52,46, +2,35,34,14,2,7,39,62,3,51,50,30,2,21,20,14,6,7,33,21,103,51,147,162,159,128, +79,36,68,95,58,54,95,74,47,7,184,9,66,116,163,107,105,164,113,60,51,85,112, +122,124,109,86,24,2,223,127,117,179,145,124,124,136,86,60,91,62,31,30,60, +89,59,17,76,134,101,58,50,98,144,94,71,128,116,108,103,101,102,105,57,153, +0,0,0,0,1,0,78,255,236,4,25,5,150,0,59,0,216,64,149,122,3,138,3,2,117,2,133, +2,2,117,58,133,58,2,117,51,133,51,2,117,47,133,47,2,117,13,133,13,2,122,37, +138,37,2,91,17,107,17,2,26,41,1,21,8,1,118,46,134,46,2,7,46,1,73,39,1,38, +110,54,25,49,95,25,111,25,2,39,25,39,25,10,19,32,110,49,49,0,110,64,31,19, +47,19,159,19,3,144,19,1,19,61,128,11,110,239,10,1,63,10,1,10,54,25,116,26, +26,16,141,38,1,92,38,108,38,124,38,3,10,38,26,38,2,38,35,115,44,7,16,115, +129,11,1,83,11,99,11,115,11,3,20,11,1,5,11,1,11,5,25,0,63,51,93,93,93,93, +237,63,237,51,93,93,93,18,57,47,237,57,1,47,93,113,237,26,16,220,93,113,26, +237,50,47,237,17,18,57,57,47,47,93,17,18,57,237,113,49,48,0,93,93,93,93,1, +93,0,93,93,1,93,93,93,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,14, +2,7,21,30,3,4,25,63,121,179,115,131,179,116,58,9,186,8,43,74,108,74,136,155, +69,103,121,51,102,98,51,110,91,59,133,131,119,147,12,181,11,80,123,158,89, +118,170,108,51,34,72,111,78,85,126,82,41,1,133,97,152,105,55,65,107,137,73, +17,56,92,66,36,134,132,78,95,53,18,156,21,55,94,73,113,131,122,111,14,93, +138,91,45,59,101,136,77,62,108,86,62,16,4,9,59,88,112,0,0,2,0,47,0,0,4,55, +5,129,0,10,0,23,0,117,64,80,154,15,1,153,6,1,136,6,1,133,16,149,16,2,118, +16,1,24,22,1,118,22,134,22,150,22,3,22,5,64,12,21,72,5,91,10,107,10,123,10, +3,10,8,1,111,23,6,31,2,1,112,2,224,2,2,0,2,16,2,48,2,80,2,224,2,5,8,2,0,4, +115,8,22,22,1,11,6,6,1,24,0,63,63,51,18,57,47,51,237,50,1,47,94,93,113,114, +51,51,237,50,50,93,47,43,51,93,113,49,48,93,93,93,93,0,93,1,17,35,17,33,53, +1,51,17,51,21,1,14,3,7,1,14,3,7,33,3,113,170,253,104,2,133,189,198,254,144, +2,16,20,21,8,254,151,5,19,20,20,6,1,242,1,63,254,193,1,63,140,3,182,252,76, +142,3,119,5,29,36,37,12,253,236,8,26,27,26,7,0,1,0,82,255,236,4,29,5,129, +0,44,0,181,64,28,86,13,102,13,134,13,3,85,2,101,2,2,90,3,106,3,2,85,43,101, +43,2,85,42,101,42,2,38,184,255,216,64,89,14,17,72,21,8,1,6,10,1,25,36,153, +36,2,137,36,217,36,2,3,68,33,1,6,35,32,14,17,72,35,11,0,110,64,31,21,1,47, +21,159,21,2,144,21,1,21,46,128,36,31,37,110,33,32,32,11,110,208,10,1,63,10, +1,10,26,115,40,40,16,36,116,33,6,16,115,115,11,131,11,2,103,11,1,22,11,1, +11,5,25,0,63,51,93,93,93,237,63,237,18,57,47,237,1,47,93,113,237,51,47,51, +237,50,50,26,16,220,93,113,114,26,237,17,57,43,49,48,95,113,95,113,114,0, +93,1,93,0,43,93,1,93,0,93,1,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50, +62,2,53,52,46,2,35,34,14,2,7,35,19,33,21,33,3,62,1,51,50,30,2,4,29,64,126, +187,123,111,165,114,67,14,182,11,40,69,101,72,70,114,81,44,42,78,113,72,45, +76,65,53,23,176,47,3,33,253,131,27,48,144,99,105,168,118,64,1,203,106,176, +127,70,52,91,122,70,21,40,75,59,35,43,84,122,79,65,109,79,44,16,28,37,20, +2,246,153,254,65,37,53,64,117,162,0,0,0,0,2,0,104,255,236,4,25,5,150,0,36, +0,56,0,175,64,48,140,21,1,122,22,138,22,2,89,7,105,7,2,90,3,106,3,122,3,3, +84,2,100,2,2,84,35,100,35,116,35,3,84,34,100,34,116,34,3,53,30,69,30,2,133, +50,1,50,184,255,240,64,45,10,13,72,132,26,1,37,26,53,26,69,26,117,26,4,22, +26,1,21,111,20,20,0,110,64,47,37,159,37,2,144,37,1,37,58,128,47,29,110,16, +10,32,10,2,10,184,255,192,64,24,30,38,72,10,29,42,117,32,32,52,24,115,25, +21,153,21,2,21,15,7,52,115,5,25,0,63,237,63,51,93,237,18,57,47,237,50,1,47, +43,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,93,93,43,93,0,93, +93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,46,1,2,53,52,18,62,1,51,50,30,2, +23,7,46,1,35,34,14,2,21,62,1,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,25,59,115,170,111,123,184,122,61,69,130,187,118,72,126,103,78,23, +172,28,123,81,74,120,84,45,49,178,115,96,156,111,61,183,36,72,106,70,49,100, +81,51,40,75,106,66,65,103,72,38,1,205,106,177,127,71,94,177,1,1,164,188,1, +28,190,96,30,67,110,80,31,91,81,70,139,210,140,91,95,62,117,167,112,73,118, +83,45,29,65,106,76,78,135,100,58,45,85,122,0,0,1,0,105,0,0,4,12,5,129,0,14, +0,68,64,45,122,11,138,11,2,105,11,1,5,110,6,6,0,80,12,1,16,12,32,12,2,12, +11,95,0,1,0,0,32,0,64,0,96,0,128,0,5,0,0,12,116,13,6,5,24,0,63,63,237,50, +1,47,93,113,51,47,93,113,18,57,47,237,49,48,93,93,1,6,10,2,21,35,52,26,2, +55,33,53,33,4,12,106,178,128,71,188,80,136,180,101,253,11,3,163,4,239,162, +254,213,254,209,254,193,180,169,1,69,1,57,1,46,147,153,0,0,0,0,3,0,89,255, +236,4,26,5,150,0,41,0,61,0,81,0,191,64,132,117,40,133,40,2,117,33,133,33, +2,117,29,133,29,2,117,28,133,28,2,117,24,133,24,2,122,23,138,23,2,122,19, +138,19,2,122,12,1,122,8,138,8,2,122,7,138,7,2,122,3,138,3,2,117,2,133,2,2, +85,69,101,69,2,85,75,101,75,2,90,65,106,65,2,52,110,21,42,110,31,15,36,31, +79,21,1,21,31,21,31,10,0,110,64,15,62,31,62,2,31,62,47,62,159,62,3,144,62, +1,62,83,128,72,110,208,10,1,10,36,15,67,117,57,57,77,47,117,26,7,77,117,5, +25,0,63,237,63,237,18,57,47,237,57,57,1,47,113,237,26,16,220,93,113,114,26, +237,17,57,57,47,47,113,18,57,57,16,237,16,237,49,48,93,93,93,93,0,93,93,1, +93,93,93,93,0,93,93,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3, +53,52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,3,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,26,57,117,182, +124,124,181,119,57,47,79,101,54,59,93,63,33,57,112,166,109,115,169,111,54, +33,63,93,61,61,104,76,44,222,27,62,100,73,71,98,63,28,22,58,102,80,85,103, +55,17,35,28,68,115,86,79,111,69,32,32,70,114,81,82,112,68,29,1,137,90,151, +110,62,62,109,151,89,77,120,87,53,9,4,14,62,87,106,59,74,131,99,57,58,99, +132,74,58,106,87,61,12,4,10,53,87,120,2,76,53,88,63,35,35,63,88,53,42,88, +72,46,46,72,88,253,163,51,95,73,45,45,74,97,52,65,107,77,42,42,77,109,0,0, +0,2,0,96,255,236,4,18,5,150,0,36,0,56,0,190,64,105,169,39,1,163,11,1,149, +12,165,12,2,170,17,1,153,17,1,116,35,132,35,2,116,32,132,32,148,32,3,122, +31,138,31,154,31,3,122,27,138,27,154,27,3,123,26,139,26,155,26,3,90,40,106, +40,2,89,2,105,2,2,16,24,10,13,72,54,8,1,37,0,110,47,19,63,19,2,79,19,191, +19,2,0,19,32,19,48,19,64,19,176,19,5,7,19,58,11,111,10,10,47,110,32,29,1, +29,184,255,192,64,27,32,38,72,29,19,52,115,95,24,111,24,2,24,24,5,42,115, +34,7,14,115,23,11,1,11,5,25,0,63,51,93,237,63,237,17,57,47,93,237,50,1,47, +43,93,237,51,47,237,16,220,94,93,113,114,237,51,49,48,93,43,93,93,0,93,1, +93,93,0,93,93,1,93,93,0,93,93,1,93,1,20,2,14,1,35,34,46,2,39,55,30,1,51,50, +62,2,55,14,3,35,34,46,2,53,52,62,2,51,50,18,7,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,4,18,71,132,189,118,81,130,102,72,22,172,28,119,91,73,121,85, +48,2,21,73,93,108,55,96,155,108,59,63,120,175,111,235,242,196,37,73,107,70, +65,104,72,39,35,70,104,69,50,103,83,53,2,221,188,254,229,188,94,33,70,112, +79,27,91,85,69,138,208,140,47,74,51,27,69,124,175,107,109,176,123,66,254, +164,175,78,138,102,59,46,85,122,75,71,122,89,51,34,70,107,0,0,0,0,2,0,187, +0,0,1,126,4,58,0,3,0,7,0,54,64,36,3,7,150,0,0,4,144,4,2,64,4,80,4,224,4,240, +4,4,144,4,160,4,2,4,64,13,16,72,4,5,156,4,0,156,1,15,0,63,237,47,237,1,47, +43,93,113,114,51,237,50,49,48,19,53,51,21,3,53,51,21,187,195,195,195,3,107, +207,207,252,149,207,207,0,0,0,2,0,184,254,250,1,129,4,58,0,12,0,16,0,89,185, +0,4,255,224,64,10,11,17,72,16,10,151,0,150,13,7,184,255,192,64,22,9,17,72, +7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2,12,184,255,192,64, +18,38,41,72,12,64,13,16,72,12,13,156,14,15,7,168,0,156,11,0,47,253,228,63, +237,1,47,43,43,93,113,114,51,43,51,253,237,51,49,48,43,37,21,20,14,2,7,35, +62,1,53,35,53,17,53,51,21,1,129,9,20,29,20,123,45,49,88,195,207,156,53,87, +75,66,32,65,132,65,207,2,156,207,207,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106, +185,0,5,255,216,64,17,18,22,72,3,40,18,22,72,0,40,18,22,72,137,0,1,1,184, +255,216,64,51,18,22,72,134,1,1,6,0,2,32,2,80,2,112,2,4,2,32,0,1,0,63,6,127, +6,143,6,3,6,48,2,112,2,128,2,3,2,1,0,15,4,63,4,111,4,159,4,207,4,5,4,0,25, +47,93,51,51,205,93,205,93,1,24,47,93,47,93,51,49,48,0,93,43,93,43,43,43,19, +53,1,21,9,1,21,101,3,227,252,166,3,90,2,59,205,1,162,154,254,146,254,145, +153,0,0,0,0,2,0,100,1,88,4,71,3,236,0,3,0,7,0,70,64,49,7,64,2,96,2,2,0,2, +32,2,112,2,208,2,4,2,4,223,0,1,32,0,1,0,4,173,31,5,47,5,95,5,111,5,223,5, +5,5,0,173,80,1,208,1,2,15,1,1,1,0,47,93,93,237,222,93,237,1,47,93,93,51,47, +93,113,51,49,48,19,53,33,21,1,53,33,21,100,3,227,252,29,3,227,3,88,148,148, +254,0,148,148,0,0,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106,185,0,1,255,216, +64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137,6,1,5,184,255,216,64,51,18, +22,72,134,5,1,0,6,32,6,80,6,112,6,4,6,3,32,0,1,0,6,5,48,4,112,4,128,4,3,4, +63,0,127,0,143,0,3,0,15,2,63,2,111,2,159,2,207,2,5,2,0,25,47,93,205,93,205, +93,51,51,1,24,47,93,51,47,93,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21, +101,3,90,252,166,3,227,154,153,1,111,1,110,154,254,94,205,0,2,0,84,0,0,4, +39,5,150,0,37,0,41,0,137,64,68,117,36,133,36,2,117,35,133,35,2,90,26,106, +26,2,90,21,1,90,14,122,14,138,14,3,90,13,122,13,138,13,3,58,6,74,6,2,9,72, +10,10,176,41,192,41,2,41,150,38,38,19,27,70,28,0,70,0,19,32,19,64,19,144, +19,176,19,5,19,184,255,192,64,23,38,44,72,19,19,33,95,10,143,10,2,10,39,156, +38,76,27,1,27,24,95,33,4,0,63,237,51,93,47,253,198,93,17,57,1,47,43,93,237, +47,237,18,57,47,237,113,51,47,237,49,48,0,93,1,93,93,0,93,93,93,1,93,1,20, +14,6,7,35,62,7,53,52,46,2,35,34,6,7,39,62,3,51,50,30,2,1,53,51,21,4,39,37, +62,79,82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184, +11,67,121,179,122,114,178,123,64,253,143,195,4,8,71,108,85,67,60,58,68,83, +55,69,104,80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103, +148,251,157,201,201,0,0,0,0,2,0,161,254,229,7,110,5,204,0,93,0,114,1,101, +64,255,122,17,138,17,2,117,15,133,15,2,117,27,133,27,2,121,47,137,47,2,116, +38,132,38,2,102,38,1,99,70,1,86,69,102,69,2,123,26,139,26,2,73,26,1,74,56, +90,56,106,56,3,59,102,1,82,63,1,54,63,70,63,2,82,64,1,38,64,54,64,70,64,3, +131,3,1,37,3,53,3,69,3,3,37,2,53,2,69,2,133,2,4,25,8,57,8,2,11,8,1,11,8,27, +8,2,8,32,12,17,72,22,92,102,92,134,92,3,80,58,96,58,2,5,58,21,58,53,58,69, +58,4,137,57,1,93,57,1,10,57,26,57,2,9,7,1,125,52,141,52,2,11,52,75,52,2,10, +22,26,22,42,22,3,104,212,24,37,41,211,10,112,34,132,72,1,72,10,49,80,24,1, +80,24,1,24,10,24,10,82,0,210,64,95,49,111,49,2,143,49,159,49,2,49,116,128, +61,210,0,82,16,82,32,82,3,82,44,213,5,5,107,214,19,99,214,29,36,29,47,19, +63,19,79,19,3,32,29,48,29,64,29,3,19,29,19,29,77,54,214,89,0,149,71,1,71, +66,214,77,0,47,237,51,93,63,237,18,57,57,47,47,93,93,17,51,16,237,16,237, +51,47,237,1,47,93,237,26,16,220,93,113,26,237,18,57,57,47,47,93,114,17,18, +57,93,50,50,16,237,50,16,237,49,48,93,93,93,93,0,93,93,93,1,93,93,93,43,93, +0,93,93,1,93,93,93,0,93,93,1,93,93,0,93,93,1,93,93,0,93,93,1,93,93,93,0,93, +1,93,0,93,1,20,14,2,35,34,46,2,53,52,54,55,35,14,3,35,34,46,2,53,52,62,2, +51,50,30,2,23,51,55,51,3,14,1,21,20,22,51,50,62,2,53,52,46,2,35,34,14,4,21, +20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,62,2,36,51,50,4,22,18, +5,52,46,2,35,34,14,2,21,20,22,51,50,62,2,55,62,1,7,110,67,118,165,97,56,79, +50,22,2,1,6,24,69,93,117,71,84,125,81,40,71,132,185,114,60,96,73,54,18,6, +39,156,116,19,18,43,38,62,107,79,45,83,161,238,156,134,227,184,139,94,48, +86,165,243,158,105,182,152,120,44,55,50,135,166,196,111,190,254,217,203,105, +63,118,170,215,0,255,144,201,1,36,191,92,253,162,34,63,89,56,86,130,87,45, +95,99,69,120,96,70,18,9,14,2,243,144,239,172,96,27,47,64,38,15,43,12,45,89, +69,43,58,103,141,83,120,221,169,102,27,48,67,40,160,254,6,84,120,49,48,46, +81,142,192,112,129,222,162,92,64,116,161,192,219,115,141,238,171,96,33,48, +57,24,112,30,63,52,33,115,206,1,28,169,139,1,0,220,180,128,70,118,200,254, +248,155,50,84,60,33,85,138,173,87,120,136,62,102,132,71,36,80,0,0,0,0,2,0, +4,0,0,5,82,5,129,0,7,0,20,1,18,64,206,102,2,118,2,134,2,3,102,19,118,19,134, +19,3,105,1,121,1,137,1,3,105,20,121,20,137,20,3,115,6,131,6,2,101,6,1,124, +5,140,5,2,106,5,1,122,0,138,0,2,57,0,89,0,105,0,3,117,3,133,3,2,54,3,86,3, +102,3,3,90,4,1,72,4,1,85,7,1,71,7,1,19,2,3,1,20,0,21,6,37,6,53,6,3,6,6,1, +230,6,246,6,2,26,5,42,5,58,5,3,9,5,1,233,5,249,5,2,6,5,13,13,4,26,0,42,0, +58,0,3,9,0,1,233,0,249,0,2,0,16,7,32,7,48,7,3,32,7,1,7,7,22,21,3,37,3,53, +3,3,6,3,1,230,3,246,3,2,3,175,4,191,4,2,4,80,22,176,22,2,48,22,96,22,144, +22,192,22,240,22,5,47,22,1,1,2,95,20,19,19,118,13,1,13,5,3,4,0,18,0,63,50, +63,51,93,57,47,51,237,50,1,93,93,113,47,93,51,93,113,113,17,51,47,93,113, +51,93,113,113,18,57,61,47,51,51,93,113,113,93,113,113,18,57,57,18,57,57,49, +48,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,3,33,3,35,1,51,9,1, +46,3,39,14,3,7,3,33,4,143,161,253,126,162,198,2,63,217,2,54,253,174,16,29, +22,15,1,2,14,23,29,15,180,2,15,1,156,254,100,5,129,250,127,4,2,40,82,67,45, +5,5,46,68,82,40,254,49,0,3,0,168,0,0,4,234,5,129,0,22,0,33,0,46,0,155,64, +108,155,24,171,24,2,147,32,1,133,32,1,147,45,1,117,45,133,45,2,122,36,138, +36,154,36,3,5,11,21,11,37,11,3,6,2,22,2,38,2,3,171,18,1,159,18,1,107,18,123, +18,139,18,3,18,28,13,90,23,64,13,17,72,23,23,41,0,90,64,31,34,47,34,2,175, +34,1,34,48,128,28,41,90,0,6,16,6,64,6,3,7,6,18,40,95,127,28,1,28,28,41,27, +95,7,3,41,95,6,18,0,63,237,63,237,18,57,47,113,237,57,1,47,94,93,237,50,26, +16,220,93,113,26,237,18,57,47,43,237,17,57,93,93,93,49,48,93,93,0,93,93,93, +93,93,93,1,20,14,2,35,33,17,33,50,30,2,21,20,14,2,7,30,3,1,52,38,35,33,17, +33,50,62,2,19,52,46,2,35,33,17,33,50,62,2,4,234,84,142,188,104,253,196,2, +0,117,184,128,67,33,67,101,67,85,131,88,46,254,238,156,148,254,191,1,65,84, +116,72,32,81,49,92,129,80,254,156,1,115,73,123,89,50,1,141,107,151,95,44, +5,129,39,84,129,90,59,104,85,61,15,10,58,90,119,2,66,114,98,254,66,33,61, +86,253,190,67,94,60,28,254,4,24,60,100,0,1,0,104,255,236,5,121,5,150,0,39, +0,173,64,79,121,14,137,14,2,117,13,133,13,2,123,37,139,37,2,106,38,1,124, +36,140,36,2,106,36,1,106,28,1,85,7,1,90,3,1,42,29,106,29,2,134,23,1,42,23, +106,23,2,5,8,21,8,2,5,2,21,2,2,5,91,80,26,96,26,2,175,26,191,26,2,32,26,1, +15,26,1,26,34,16,184,255,192,64,42,7,13,72,16,16,41,32,41,1,79,35,1,35,35, +0,95,31,4,0,15,16,15,2,48,15,64,15,112,15,128,15,192,15,208,15,6,15,15,10, +95,21,19,0,63,237,51,47,93,113,63,237,51,47,93,1,93,17,51,47,43,51,47,93, +93,93,113,237,49,48,93,93,93,93,93,0,93,93,1,93,93,93,93,0,93,93,1,93,1,34, +14,2,21,20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,120,185,125,64,69,129,187,117,82,135,109,86,33,156,38,112, +151,191,118,171,254,255,173,86,91,175,1,0,164,225,1,46,71,181,20,68,102,137, +4,250,80,148,208,127,127,211,152,84,43,78,107,65,78,79,136,100,57,109,195, +1,12,159,165,1,10,187,101,176,173,60,50,91,70,42,0,2,0,168,0,0,5,101,5,129, +0,12,0,25,0,100,64,70,169,24,1,123,24,1,172,23,1,27,23,43,23,59,23,123,23, +4,169,16,1,27,16,43,16,59,16,123,16,4,123,15,1,153,3,1,121,2,1,0,90,64,47, +13,1,13,27,128,64,27,1,20,90,0,6,16,6,64,6,3,7,6,19,95,7,3,20,95,6,18,0,63, +237,63,237,1,47,94,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93, +93,93,93,1,20,2,14,1,35,33,17,33,50,4,22,18,7,52,46,2,35,33,17,33,50,62,2, +5,101,106,184,251,145,253,241,1,210,163,1,19,198,111,192,82,148,206,123,254, +241,1,58,111,189,138,78,2,207,176,254,243,181,93,5,129,81,169,254,252,180, +143,203,130,61,251,177,72,142,212,0,0,1,0,168,0,0,4,254,5,129,0,11,0,77,181, +7,3,7,3,0,10,184,255,192,64,37,7,11,72,10,10,13,5,9,90,0,0,16,0,64,0,3,7, +0,32,13,1,8,95,127,5,1,5,5,9,4,95,1,3,9,95,0,18,0,63,237,63,237,18,57,47, +113,237,1,93,47,94,93,237,50,17,51,47,43,18,57,57,47,47,49,48,51,17,33,21, +33,17,33,21,33,17,33,21,168,4,45,252,146,3,50,252,206,3,151,5,129,156,254, +60,154,254,21,156,0,0,1,0,168,0,0,4,145,5,129,0,9,0,105,185,0,2,255,192,182, +13,24,72,2,2,6,8,184,255,192,64,58,7,12,72,8,8,11,1,5,90,0,6,16,6,64,6,3, +7,6,48,11,1,4,95,239,1,1,15,1,63,1,111,1,127,1,159,1,175,1,207,1,223,1,8, +8,1,64,23,30,72,1,1,5,0,95,7,3,5,18,0,63,63,237,18,57,47,43,94,93,113,237, +1,93,47,94,93,237,50,17,51,47,43,18,57,47,43,49,48,1,17,33,21,33,17,35,17, +33,21,1,103,3,18,252,238,191,3,233,4,229,253,244,158,253,197,5,129,156,0, +1,0,103,255,236,5,160,5,150,0,45,0,185,64,130,134,43,1,106,43,1,66,37,82, +37,2,5,24,21,24,85,24,3,86,23,1,86,19,1,5,18,21,18,85,18,3,122,12,138,12, +2,89,12,105,12,2,106,3,1,106,2,1,73,37,89,37,2,53,29,1,123,13,139,13,2,64, +10,1,10,10,36,92,31,64,33,33,0,127,31,143,31,2,31,47,128,32,47,96,47,128, +47,3,21,91,175,0,191,0,2,32,0,1,15,0,1,0,33,95,240,34,1,34,34,5,26,95,41, +19,16,95,5,48,11,64,11,2,144,11,224,11,2,11,11,5,4,0,63,51,47,93,113,16,237, +63,237,17,57,47,93,237,1,47,93,93,93,237,93,26,16,204,93,17,57,47,26,16,237, +50,47,93,49,48,0,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,19,52,18,54, +36,51,50,30,2,23,7,46,3,35,34,14,2,21,20,30,2,51,50,62,2,55,53,33,53,33,17, +14,3,35,34,36,38,2,103,89,177,1,6,173,130,196,144,100,35,182,26,73,104,137, +88,128,189,124,61,66,130,193,127,83,140,113,86,29,254,91,2,85,47,127,158, +188,107,178,254,246,177,89,2,199,165,1,10,187,101,46,86,123,77,54,52,85,60, +33,80,148,208,127,127,211,153,85,28,45,55,28,254,160,254,26,48,87,66,38,109, +195,1,12,0,0,0,0,1,0,168,0,0,5,32,5,129,0,11,0,103,64,29,11,90,64,8,143,0, +159,0,175,0,223,0,4,0,13,128,64,13,1,64,13,192,13,208,13,224,13,4,13,184, +255,192,64,37,14,17,72,7,3,90,0,4,16,4,64,4,3,7,4,2,95,80,7,1,176,7,224,7, +2,15,7,1,8,7,7,9,5,3,4,0,18,0,63,50,63,51,57,47,94,93,93,113,237,1,47,94, +93,237,50,43,93,113,26,16,220,93,50,26,237,49,48,33,17,33,17,35,17,51,17, +33,17,51,17,4,97,253,6,191,191,2,250,191,2,141,253,115,5,129,253,172,2,84, +250,127,0,0,0,1,0,189,0,0,1,124,5,129,0,3,0,122,64,70,3,90,15,0,1,12,0,0, +1,61,16,0,32,0,208,0,3,96,0,112,0,2,0,0,16,0,64,0,80,0,176,0,5,7,0,175,5, +1,0,5,160,5,176,5,3,0,5,16,5,64,5,80,5,160,5,176,5,192,5,240,5,8,32,5,144, +5,240,5,3,5,184,255,192,179,56,61,72,5,184,255,192,179,45,48,72,5,184,255, +192,182,13,16,72,1,3,0,18,0,63,63,1,43,43,43,93,113,114,93,47,94,93,113,114, +94,93,94,93,237,49,48,51,17,51,17,189,191,5,129,250,127,0,0,0,1,0,32,255, +236,3,104,5,129,0,21,0,124,64,15,137,2,1,130,5,1,123,10,1,100,6,116,6,2,6, +184,255,224,64,66,14,17,72,0,14,32,14,2,128,14,144,14,224,14,240,14,4,14, +14,3,17,90,64,64,12,80,12,96,12,3,111,12,1,12,23,128,15,3,1,3,32,23,1,32, +23,64,23,80,23,96,23,4,14,95,15,3,9,95,0,64,4,1,4,4,0,19,0,63,50,47,93,16, +237,63,237,1,93,113,47,113,26,16,220,93,113,26,237,18,57,47,93,113,49,48, +0,43,1,93,93,93,0,93,5,34,38,39,55,30,3,51,50,54,53,17,33,53,33,17,20,14, +2,1,201,171,219,35,187,10,46,64,78,41,104,120,254,241,1,205,56,107,154,20, +178,192,31,65,93,60,28,143,138,3,69,156,252,35,101,162,115,62,0,1,0,168,0, +0,5,63,5,129,0,11,0,154,64,103,171,1,1,157,1,1,138,8,154,8,2,138,1,154,1, +170,1,3,102,2,1,131,7,147,7,2,100,7,1,157,0,173,0,2,107,0,123,0,139,0,3,89, +0,1,86,10,1,155,10,1,36,10,1,1,10,106,8,250,8,2,8,10,144,9,160,9,2,9,9,0, +11,16,0,11,1,11,11,13,7,2,3,90,0,4,16,4,64,4,3,7,4,7,10,1,2,4,4,8,5,3,0,4, +18,0,63,51,63,51,18,23,57,1,47,94,93,237,50,50,17,51,47,93,56,51,57,47,93, +57,51,113,17,51,49,48,0,93,93,1,93,93,93,93,0,93,93,93,1,93,93,0,93,93,33, +1,7,17,35,17,51,17,1,51,9,1,4,82,253,205,184,191,191,2,167,225,253,168,2, +168,2,168,140,253,228,5,129,253,62,2,194,253,156,252,227,0,0,0,0,1,0,168, +0,0,4,47,5,129,0,5,0,56,64,40,16,4,48,4,2,0,4,16,4,32,4,64,4,96,4,128,4,160, +4,240,4,8,4,3,90,0,0,16,0,64,0,3,7,0,1,3,3,95,0,18,0,63,237,63,1,47,94,93, +237,47,93,113,49,48,51,17,51,17,33,21,168,191,2,200,5,129,251,27,156,0,0, +0,0,1,0,168,0,0,6,2,5,129,0,44,2,44,64,12,152,41,1,151,31,1,12,16,18,24,72, +12,184,255,240,179,13,17,72,13,184,255,240,64,27,18,24,72,40,13,1,13,16,13, +17,72,42,32,33,37,72,42,32,18,28,72,42,32,9,17,72,30,184,255,224,179,33,37, +72,30,184,255,224,179,18,28,72,30,184,255,224,64,255,9,17,72,13,12,36,36, +27,44,92,42,36,0,52,0,2,212,0,1,139,0,155,0,2,4,0,1,8,0,46,139,46,1,116,46, +1,59,46,1,203,46,1,180,46,1,11,46,1,207,171,46,1,52,46,1,32,46,1,20,46,1, +0,46,1,244,46,1,208,46,1,196,46,1,176,46,1,116,46,132,46,164,46,3,96,46,1, +84,46,1,64,46,1,52,46,1,16,46,1,4,46,1,151,240,46,1,180,46,196,46,228,46, +3,160,46,1,116,46,148,46,2,80,46,1,68,46,1,48,46,1,4,46,36,46,2,244,46,1, +224,46,1,180,46,212,46,2,144,46,1,132,46,1,112,46,1,52,46,68,46,100,46,3, +32,46,1,20,46,1,244,46,1,208,46,1,116,46,132,46,164,46,196,46,4,96,46,1,52, +46,84,46,2,16,46,1,4,46,1,103,116,46,148,46,180,46,196,46,228,46,5,80,46, +1,4,46,36,46,68,46,3,20,46,52,46,68,46,100,46,132,46,180,46,212,46,244,46, +8,164,46,196,46,244,46,3,139,46,1,4,46,52,46,84,46,116,46,4,55,64,83,228, +46,1,203,46,1,36,46,68,46,116,46,148,46,180,46,5,11,46,1,212,46,244,46,2, +187,46,1,100,46,132,46,2,75,46,1,20,46,52,46,2,251,46,1,164,46,196,46,228, +46,3,128,46,1,2,64,46,80,46,112,46,3,63,46,1,0,46,32,46,2,30,27,92,0,28,64, +28,2,7,28,6,21,21,184,255,192,64,16,18,37,72,42,21,29,3,75,36,1,0,13,36,3, +28,18,0,63,23,51,93,63,51,51,43,17,51,1,47,94,93,237,50,93,93,93,95,93,93, +93,113,113,113,113,113,114,114,114,114,94,93,93,93,113,114,114,114,94,93, +93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,94,93, +93,93,113,113,113,16,220,94,93,93,93,113,50,237,18,57,61,47,51,51,49,48,43, +43,43,43,43,43,43,93,43,43,43,93,93,33,17,52,54,55,54,55,6,7,14,1,7,1,35, +1,46,3,39,38,39,22,23,30,1,21,17,35,17,51,1,30,3,23,62,3,55,1,51,17,5,86, +2,2,2,3,14,15,13,31,15,254,148,134,254,143,6,13,15,15,7,17,16,1,2,2,2,170, +251,1,119,7,20,18,15,3,3,16,21,20,8,1,112,245,3,172,51,106,44,51,48,51,50, +43,97,39,252,64,3,192,15,40,45,47,23,53,57,56,55,47,103,39,252,84,5,129,252, +47,20,63,66,59,16,16,60,66,62,20,3,209,250,127,0,0,0,0,1,0,168,0,0,5,32,5, +129,0,19,0,196,185,0,10,255,224,64,39,12,43,72,54,10,70,10,2,0,32,12,43,72, +41,0,57,0,73,0,3,11,16,29,33,72,11,32,18,28,72,150,11,166,11,2,41,11,1,1, +184,255,240,179,29,33,72,1,184,255,224,64,53,18,28,72,154,1,170,1,2,3,38, +1,1,19,92,0,68,16,84,16,148,16,3,224,16,1,2,0,16,48,16,64,16,112,16,192,16, +208,16,6,16,64,21,1,64,21,192,21,208,21,224,21,4,21,184,255,192,64,16,14, +17,72,10,7,92,0,8,16,8,64,8,3,7,8,1,184,255,192,64,16,29,43,72,17,1,9,3,11, +64,29,43,72,11,0,8,18,0,63,51,51,43,63,51,51,43,1,47,94,93,237,50,43,93,113, +47,93,95,93,113,51,237,49,48,0,93,95,93,43,43,93,93,43,43,1,93,43,93,43,33, +1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,4,58,253,14,2,3,2,3, +170,222,2,250,3,3,2,4,172,4,176,49,48,41,91,35,252,88,5,129,251,72,49,49, +42,99,45,3,156,250,127,0,0,0,0,2,0,97,255,236,5,215,5,150,0,19,0,39,0,108, +64,74,91,37,1,26,37,1,9,37,1,82,33,1,21,33,1,7,33,1,84,27,1,21,27,1,91,23, +1,25,23,1,102,17,1,104,12,1,0,91,64,15,20,1,20,41,128,32,41,128,41,2,30,91, +175,10,191,10,2,32,10,1,15,10,31,10,2,10,25,95,15,4,35,95,5,19,0,63,237,63, +237,1,47,93,93,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,215,95,180,254,252,165,174,254,250, +174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63,65, +127,189,123,132,191,123,59,2,199,165,254,242,192,104,109,195,1,12,159,165, +1,10,187,101,102,188,254,246,163,127,208,148,80,80,148,208,127,127,211,153, +85,86,153,212,0,2,0,168,0,0,4,234,5,129,0,14,0,23,0,117,64,83,169,2,1,147, +23,1,155,16,171,16,2,10,3,26,3,42,3,3,5,12,21,12,37,12,3,0,90,64,15,25,128, +64,25,1,64,25,1,20,7,90,0,8,16,8,64,8,3,8,6,95,31,20,47,20,79,20,95,20,127, +20,5,15,20,207,20,255,20,3,7,20,64,9,17,72,20,20,7,19,95,9,3,7,18,0,63,63, +237,18,57,47,43,94,93,113,237,1,47,93,237,50,93,113,26,16,220,26,237,49,48, +0,93,93,93,93,93,1,20,14,2,35,33,17,35,17,33,50,30,2,7,52,38,35,33,17,33, +50,54,4,234,61,121,182,121,254,98,191,2,81,125,186,124,62,192,164,164,254, +133,1,131,165,155,3,217,92,159,117,68,253,219,5,129,61,111,157,97,134,139, +253,212,146,0,0,0,2,0,97,254,125,5,215,5,150,0,36,0,56,0,162,64,113,108,20, +124,20,140,20,3,104,24,1,104,29,1,101,34,1,87,6,1,85,49,1,90,39,1,90,45,1, +108,19,124,19,140,19,3,26,19,90,19,2,26,40,90,40,2,21,44,85,44,2,26,54,90, +54,2,8,54,1,21,50,85,50,2,7,50,1,13,13,22,5,27,0,91,64,15,37,1,37,58,128, +47,91,175,27,191,27,2,32,27,1,15,27,31,27,2,27,32,58,128,58,2,42,95,32,4, +52,95,5,22,19,10,95,17,0,47,237,63,51,237,63,237,1,93,47,93,93,93,237,26, +16,220,113,26,237,17,57,57,50,47,49,48,93,93,93,93,93,93,0,93,93,93,93,93, +1,93,93,93,0,93,93,1,20,14,2,7,30,3,51,50,54,55,21,14,1,35,34,46,2,39,46, +2,2,53,52,18,54,36,51,50,4,22,18,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62, +2,5,215,77,145,211,134,21,53,68,83,51,28,64,23,38,91,49,86,128,97,70,27,158, +239,159,80,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63, +65,127,189,123,132,191,123,59,2,199,149,247,186,117,18,64,90,57,27,8,5,134, +9,13,51,95,138,87,8,115,193,1,3,152,165,1,10,187,101,102,188,254,246,163, +127,208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,0,0,2,0,168,0,0, +5,104,5,129,0,17,0,30,0,210,64,62,169,13,1,138,20,154,20,170,20,3,148,29, +1,117,29,133,29,2,174,0,1,157,0,1,124,0,140,0,2,74,0,90,0,106,0,3,3,160,1, +1,114,1,130,1,146,1,3,2,99,1,1,64,1,1,51,1,1,37,1,1,3,16,184,255,112,64,87, +17,73,112,16,128,16,144,16,3,84,16,100,16,2,66,16,1,2,35,16,51,16,2,1,16, +16,25,18,90,11,11,0,0,17,48,17,64,17,96,17,144,17,160,17,6,17,64,32,144,32, +160,32,3,25,3,90,0,4,16,4,64,4,3,7,4,16,2,95,47,25,95,25,111,25,143,25,4, +25,25,0,24,95,5,3,4,0,18,0,63,50,63,237,18,57,47,93,237,50,1,47,94,93,237, +50,93,47,93,51,57,47,237,18,57,17,51,49,48,93,95,93,93,93,43,95,93,93,93, +93,95,93,93,95,93,93,93,93,0,93,93,93,93,33,1,33,17,35,17,33,50,30,2,21,20, +14,2,7,1,3,52,46,2,35,33,17,33,50,62,2,4,140,254,146,254,73,191,2,151,120, +185,126,66,39,84,130,91,1,144,248,44,84,120,76,254,59,1,205,82,120,77,37, +2,73,253,183,5,129,55,104,150,94,67,130,108,78,16,253,161,3,236,64,94,63, +31,253,248,41,72,98,0,0,0,0,1,0,93,255,236,4,248,5,150,0,63,0,226,64,110, +150,62,1,68,62,1,166,59,1,134,54,1,132,49,1,151,40,1,169,33,1,11,33,27,33, +43,33,155,33,4,89,29,169,29,2,139,17,1,139,7,1,150,2,1,4,2,20,2,2,132,58, +1,96,54,1,105,21,1,118,17,1,42,90,41,41,0,90,64,176,19,1,19,65,128,9,90,8, +64,16,19,72,8,8,52,90,0,31,16,31,64,31,3,7,31,19,16,19,22,72,120,19,136,19, +152,19,3,59,19,1,52,184,255,240,64,47,19,22,72,119,52,135,52,151,52,3,58, +52,1,19,52,5,47,95,111,42,1,89,42,1,75,42,1,6,42,1,42,36,4,14,95,96,9,1,82, +9,1,68,9,1,9,5,19,0,63,51,93,93,93,237,63,51,93,93,93,93,237,18,57,57,93, +93,43,93,93,43,1,47,94,93,237,51,47,43,237,26,16,220,93,26,237,50,47,237, +49,48,0,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,20,14,2,35, +32,36,39,55,30,3,51,50,62,2,53,52,46,2,39,46,5,53,52,62,2,51,50,30,2,23,7, +46,3,35,34,14,2,21,20,30,2,23,30,5,4,248,69,144,219,150,254,249,254,218,40, +185,14,58,99,146,102,85,142,102,57,63,114,158,96,59,119,109,96,70,40,81,144, +196,114,131,186,128,77,23,188,14,53,86,123,83,98,133,81,35,63,108,142,80, +65,129,118,103,76,43,1,133,89,150,109,61,184,174,37,55,90,65,36,29,60,95, +66,69,86,56,38,22,13,31,43,58,81,107,70,100,143,92,42,41,82,121,80,33,51, +80,54,28,35,60,81,47,63,81,54,36,18,15,31,43,58,84,114,0,0,0,1,0,46,0,0,4, +180,5,129,0,7,1,212,64,255,9,9,1,201,9,217,9,249,9,3,187,9,1,73,9,89,9,121, +9,137,9,4,59,9,1,9,9,25,9,2,246,9,1,153,9,201,9,2,139,9,1,9,9,25,9,73,9,105, +9,4,199,217,9,233,9,2,203,9,1,182,9,1,41,9,89,9,105,9,137,9,153,9,5,27,9, +1,6,9,1,25,9,41,9,89,9,121,9,153,9,169,9,217,9,7,233,9,249,9,2,219,9,1,169, +9,1,150,9,1,57,9,105,9,2,45,9,1,1,11,9,1,151,107,9,123,9,139,9,171,9,187, +9,235,9,251,9,7,84,9,1,11,9,43,9,59,9,3,187,9,251,9,2,164,9,1,59,9,75,9,123, +9,3,36,9,1,139,9,155,9,187,9,203,9,251,9,5,127,9,1,2,79,9,95,9,2,48,9,1,15, +9,1,103,207,9,223,9,2,176,9,1,15,9,79,9,95,9,143,9,4,240,9,1,159,9,175,9, +207,9,223,9,4,112,9,1,95,9,1,64,9,1,31,9,1,31,9,63,9,95,9,111,9,159,9,223, +9,239,9,7,0,9,1,55,239,9,1,128,64,93,9,144,9,208,9,3,111,9,1,80,9,1,47,9, +1,0,9,1,208,9,1,175,9,1,144,9,1,111,9,127,9,2,16,9,32,9,64,9,80,9,4,255,9, +1,224,9,1,191,9,1,64,9,96,9,144,9,160,9,4,63,9,1,32,9,1,15,9,1,7,3,5,4,14, +1,90,2,64,2,7,14,112,7,160,7,176,7,3,32,7,128,7,2,7,184,255,192,64,15,23, +28,72,7,32,2,1,2,0,4,95,5,3,1,18,0,63,63,237,50,1,47,93,204,43,93,113,43, +1,26,24,16,77,253,228,50,95,94,93,93,93,93,93,93,93,113,113,113,113,113,114, +114,114,114,114,114,94,93,93,113,113,113,113,113,113,114,114,114,94,93,93, +93,95,93,93,113,113,113,113,114,114,114,94,93,95,93,93,93,93,93,93,113,114, +114,114,114,114,114,94,93,93,93,93,113,113,113,113,113,114,49,48,1,17,35, +17,33,53,33,21,2,208,190,254,28,4,134,4,229,251,27,4,229,156,156,0,0,0,0, +1,0,158,255,236,5,41,5,129,0,25,0,136,64,61,89,23,105,23,2,89,3,105,3,2,89, +2,105,2,2,69,16,1,69,10,1,21,90,64,64,18,80,18,160,18,3,48,18,144,18,240, +18,3,143,18,159,18,175,18,3,18,27,128,64,27,1,64,27,192,27,208,27,224,27, +4,27,184,255,192,64,36,14,17,72,8,90,79,5,95,5,111,5,3,143,5,159,5,2,207, +5,1,0,5,16,5,64,5,3,7,5,19,6,3,13,95,0,19,0,63,237,63,51,1,47,94,93,93,113, +114,237,43,93,113,26,16,220,93,113,114,26,237,49,48,0,93,93,93,93,93,5,34, +46,2,53,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,14,2,2,219,116,208,157, +92,191,57,102,139,83,82,146,110,63,190,93,160,215,20,62,131,201,138,3,129, +252,143,107,149,94,43,44,96,155,111,3,100,252,145,141,207,136,66,0,1,0,9, +0,0,5,77,5,129,0,16,0,235,64,181,74,14,90,14,106,14,3,69,4,85,4,101,4,3,140, +15,1,58,15,90,15,106,15,122,15,4,131,3,1,53,3,85,3,101,3,117,3,4,116,0,132, +0,2,9,0,1,140,1,1,123,1,1,6,1,1,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0, +37,0,53,0,3,6,0,1,230,0,246,0,2,1,0,9,9,2,26,15,42,15,58,15,3,3,8,15,1,232, +15,248,15,2,15,52,16,84,16,2,32,16,1,2,16,16,1,48,16,96,16,144,16,192,16, +240,16,5,16,21,3,37,3,53,3,3,6,3,1,230,3,246,3,2,3,175,2,191,2,2,2,32,18, +80,18,2,48,18,96,18,144,18,192,18,240,18,5,47,18,1,15,2,3,121,9,1,9,1,18, +0,63,51,93,63,51,1,93,93,113,47,93,51,93,113,113,47,93,113,95,113,113,51, +93,113,95,113,18,57,61,47,51,51,93,113,113,93,113,113,49,48,93,93,93,93,93, +93,93,93,93,93,93,33,35,1,51,1,30,1,23,22,23,54,55,62,1,55,1,51,3,14,198, +253,193,201,1,134,15,30,12,14,13,12,14,12,29,17,1,132,201,5,129,252,32,45, +89,35,41,39,37,41,35,88,48,3,224,0,0,1,0,9,0,0,7,134,5,129,0,46,4,87,64,73, +121,44,1,117,17,1,123,2,139,2,2,73,2,1,116,12,132,12,2,70,12,1,122,30,138, +30,2,73,30,89,30,105,30,3,117,31,133,31,2,71,31,87,31,103,31,3,142,45,1,91, +45,107,45,123,45,3,129,16,1,100,16,116,16,2,85,16,1,1,32,13,17,72,13,184, +255,224,64,255,13,17,72,131,0,1,117,0,1,68,0,84,0,100,0,3,54,0,1,140,14,1, +122,14,1,75,14,91,14,107,14,3,14,16,9,12,72,26,14,42,14,58,14,3,9,14,1,233, +14,249,14,2,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,14,13,22,26,30,42, +30,58,30,3,9,30,1,233,30,249,30,2,21,31,37,31,53,31,3,6,31,1,230,31,246,31, +2,31,30,7,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0,37,0,53,0,3,6,0,1,230, +0,246,0,2,1,0,39,123,39,1,116,22,132,22,2,22,7,39,39,7,22,3,15,26,45,42,45, +58,45,3,3,8,45,1,232,45,248,45,2,45,219,46,1,207,46,1,187,46,1,175,46,1,155, +46,1,143,46,1,123,46,1,111,46,1,91,46,1,79,46,1,2,79,46,143,46,175,46,3,46, +64,25,28,72,32,46,48,46,2,15,46,1,9,46,5,16,1,229,16,245,16,2,182,16,198, +16,214,16,3,3,16,8,15,56,15,120,15,136,15,152,15,184,15,6,12,15,64,64,255, +25,38,72,15,119,48,151,48,215,48,3,54,48,70,48,86,48,3,23,48,39,48,2,6,48, +1,55,48,103,48,119,48,167,48,183,48,199,48,231,48,247,48,8,38,48,1,7,48,23, +48,2,201,199,48,215,48,231,48,3,120,48,152,48,168,48,184,48,4,105,48,1,40, +48,56,48,88,48,3,25,48,1,7,48,1,232,48,1,217,48,1,168,48,200,48,2,153,48, +1,138,48,1,88,48,104,48,2,73,48,1,55,48,1,8,48,24,48,2,231,48,1,200,48,1, +167,48,1,8,48,24,48,40,48,72,48,136,48,5,153,199,48,1,88,48,104,48,136,48, +152,48,168,48,5,73,48,1,40,48,1,9,48,25,48,2,216,48,232,48,2,203,48,1,154, +48,170,48,186,48,3,139,48,1,48,192,124,127,72,57,48,1,42,48,1,25,48,1,10, +48,1,249,48,1,234,48,1,217,48,1,202,48,1,184,48,1,137,48,153,48,169,48,3, +120,48,1,105,48,1,58,48,74,48,90,48,3,41,48,1,26,48,1,12,48,1,104,253,48, +1,236,48,1,221,48,1,204,48,1,64,255,189,48,1,171,48,1,156,48,1,139,48,1,124, +48,1,107,48,1,92,48,1,75,48,1,60,48,1,43,48,1,28,48,1,11,48,1,252,48,1,235, +48,1,220,48,1,203,48,1,188,48,1,171,48,1,156,48,1,0,141,48,1,127,48,1,109, +48,1,95,48,1,77,48,1,47,48,63,48,2,29,48,1,15,48,1,253,48,1,239,48,1,221, +48,1,207,48,1,189,48,1,175,48,1,157,48,1,143,48,1,109,48,125,48,2,91,48,1, +77,48,1,59,48,1,45,48,1,27,48,1,13,48,1,56,251,48,1,237,48,1,219,48,1,205, +48,1,187,48,1,173,48,1,155,48,1,141,48,1,123,48,1,109,48,1,75,48,91,48,2, +57,48,1,43,48,1,25,48,1,11,48,1,249,48,1,235,48,1,221,48,1,203,48,1,189,48, +1,171,48,1,157,48,1,139,48,1,125,48,1,107,48,1,93,48,1,75,48,1,61,48,1,1, +43,48,1,31,48,1,2,95,48,127,48,159,48,191,48,223,48,255,48,6,0,48,1,8,68, +7,84,7,2,7,30,45,3,15,3,39,64,15,22,123,22,139,22,2,22,32,9,14,72,22,1,14, +18,0,63,51,51,43,93,17,51,63,23,51,93,1,94,93,93,95,113,113,95,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,113, +113,113,113,113,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,93,93,93,113,113,113,113,43,113,113,113,113,114,114,114,114,114,94,93, +93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93, +93,93,113,113,113,113,47,43,94,93,51,95,93,93,113,47,94,93,93,43,93,95,113, +113,113,113,113,113,113,113,113,113,51,93,113,95,113,18,23,57,61,47,47,47, +93,93,17,51,51,93,113,113,93,113,113,17,51,51,93,113,113,93,113,113,17,51, +51,93,113,113,93,113,113,49,48,43,93,93,93,93,93,93,93,43,43,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,33,35,3,46,1,39,38,39,6,7,14,1,7,3,35,1, +51,19,30,1,23,22,23,54,55,62,3,55,19,51,19,30,3,23,22,23,50,62,2,55,19,51, +5,231,228,244,11,25,10,12,12,13,12,11,24,11,246,228,254,97,199,253,17,31, +11,13,11,15,16,7,14,15,15,6,245,183,245,6,15,15,14,7,16,15,1,16,24,29,15, +249,199,3,127,38,104,47,55,57,58,55,48,102,38,252,129,5,129,252,129,63,124, +49,58,52,69,67,28,62,60,55,23,3,109,252,147,23,55,59,62,28,67,70,69,104,121, +52,3,127,0,0,1,0,46,0,0,5,43,5,129,0,11,2,119,64,255,92,4,1,73,4,1,59,4,1, +38,11,1,75,0,91,0,2,41,0,57,0,2,68,2,84,2,2,38,2,54,2,2,9,3,25,3,41,3,3,81, +10,1,69,10,1,51,10,1,6,10,22,10,2,93,8,1,76,8,1,43,8,59,8,2,9,8,25,8,2,82, +6,1,67,6,1,3,38,6,54,6,2,7,6,23,6,2,12,219,13,1,196,13,1,171,13,1,144,13, +1,132,13,1,96,13,1,84,13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13, +1,160,13,1,148,13,1,112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,204, +224,13,1,212,13,1,176,13,1,164,13,1,128,13,1,116,13,1,80,13,1,68,13,1,32, +13,1,20,13,1,36,13,84,13,132,13,180,13,228,13,5,4,13,52,13,100,13,148,13, +196,13,244,13,6,156,52,13,100,13,148,13,196,13,244,13,5,11,13,1,27,13,75, +13,123,13,171,13,219,13,5,139,13,187,13,235,13,3,4,13,20,13,52,13,68,13,4, +106,84,13,100,13,132,13,148,64,156,13,180,13,196,13,228,13,244,13,8,59,13, +1,36,13,1,11,13,1,244,13,1,219,13,1,196,13,1,171,13,1,148,13,1,123,13,1,100, +13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13,1,160,13,1,148,13,1, +112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,57,224,13,1,212,13,1,176, +13,1,164,13,1,128,13,1,20,13,68,13,116,13,3,36,13,84,13,132,13,180,13,228, +13,5,84,13,100,13,148,13,244,13,4,64,13,1,2,0,13,48,13,2,6,8,10,7,1,4,4,9, +5,9,5,9,3,0,11,16,192,11,240,11,2,11,184,255,192,64,16,26,30,72,175,11,1, +144,11,1,127,11,1,0,11,1,11,184,255,192,181,11,15,72,11,2,3,184,255,240,64, +41,16,3,32,3,2,224,3,240,3,2,31,3,175,3,191,3,207,3,4,3,114,7,1,52,7,68,7, +84,7,3,4,7,10,1,4,8,5,3,3,0,18,0,63,50,63,51,23,57,93,93,1,47,93,93,113,56, +51,47,43,93,93,93,93,43,93,56,51,18,57,57,47,47,18,23,57,50,51,93,95,93,93, +113,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113, +113,113,113,113,113,113,113,114,114,114,114,94,93,93,113,114,114,94,93,113, +114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,49,48,94,93,93,95,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,9,1,35,9,1,51,9,1,51,9,1, +4,88,254,89,254,80,211,2,24,254,17,211,1,136,1,125,211,254,30,2,11,2,104, +253,152,2,220,2,165,253,215,2,41,253,98,253,29,0,0,0,1,0,45,0,0,5,41,5,129, +0,8,2,83,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5,1,3,5,1,16,3,5,184,255,232, +64,255,12,15,72,5,4,14,2,1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8, +6,1,90,38,2,86,2,150,2,3,118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,10,169, +10,201,10,3,86,10,1,9,10,57,10,2,25,10,89,10,137,10,249,10,4,6,10,1,202,249, +10,1,230,10,1,9,10,25,10,185,10,201,10,4,198,10,1,89,10,121,10,169,10,3,54, +10,1,41,10,57,10,185,10,233,10,4,11,10,1,153,249,10,1,198,10,214,10,2,178, +10,1,164,10,1,150,10,1,130,10,1,116,10,1,86,10,102,10,2,66,10,1,36,10,52, +10,2,18,10,1,4,10,1,244,10,1,230,10,1,196,10,212,10,2,166,10,182,10,2,146, +10,1,132,10,1,118,10,1,98,10,1,84,10,1,54,10,70,10,2,36,10,1,22,10,1,4,10, +1,242,10,1,1,208,10,224,10,2,196,10,1,160,10,176,10,2,148,10,1,112,10,1,100, +10,1,64,10,1,20,10,36,10,52,10,3,0,10,1,105,228,10,244,10,2,208,10,64,182, +1,164,10,180,10,196,10,3,128,10,144,10,2,116,10,1,80,10,96,10,2,68,10,1,32, +10,1,4,10,20,10,2,244,10,1,224,10,1,196,10,212,10,2,176,10,1,84,10,100,10, +116,10,148,10,164,10,5,48,10,64,10,2,36,10,1,0,10,1,196,10,244,10,2,144,10, +1,4,10,20,10,36,10,68,10,84,10,116,10,132,10,7,57,224,10,1,132,10,164,10, +212,10,3,112,10,1,4,10,36,10,52,10,84,10,100,10,5,228,10,244,10,2,192,10, +1,180,10,1,144,10,1,4,10,20,10,52,10,84,10,132,10,5,212,10,228,10,2,187,10, +1,164,10,1,112,10,1,2,48,10,96,10,2,15,10,47,10,2,0,3,59,3,75,3,123,3,3,3, +1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,1,93,93,95,93,93,93,93,113,113,113, +113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113,113,114,114, +114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,95,93,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,113,113,113,114,114,114,94,93,93,113,113,113,47,94,93, +93,93,113,253,57,206,94,93,93,50,43,1,24,16,77,230,50,49,48,43,95,94,93,93, +43,93,93,1,17,35,17,1,51,9,1,51,3,9,190,253,226,210,1,173,1,171,210,2,72, +253,184,2,72,3,57,253,97,2,159,0,0,0,0,1,0,65,0,0,4,163,5,129,0,9,0,122,64, +35,100,4,116,4,132,4,3,109,3,125,3,141,3,3,91,3,1,41,3,57,3,73,3,3,114,8, +130,8,2,84,8,100,8,2,8,184,255,240,64,9,10,13,72,9,3,16,7,1,7,184,255,192, +64,18,12,17,72,7,8,4,15,2,31,2,2,2,64,12,15,72,2,11,184,255,192,64,14,13, +17,72,7,3,4,95,5,3,2,8,95,1,18,0,63,237,50,63,237,50,50,1,43,47,43,93,51, +51,47,43,93,51,51,49,48,43,93,93,93,93,93,93,41,1,53,1,33,53,33,21,1,33,4, +163,251,158,3,90,252,239,3,234,252,166,3,137,143,4,86,156,139,251,166,0,0, +1,0,146,254,87,2,41,5,204,0,7,0,49,64,30,7,48,2,1,224,2,1,2,4,241,63,1,1, +143,1,191,1,2,32,1,1,1,4,245,1,0,5,245,0,27,0,63,237,63,237,1,47,93,93,113, +237,205,93,113,50,49,48,19,17,33,21,35,17,51,21,146,1,151,233,233,254,87, +7,117,129,249,141,129,0,1,0,0,255,236,2,57,5,204,0,3,0,71,64,40,120,1,136, +1,2,0,24,13,17,72,9,3,25,3,73,3,3,70,2,1,10,2,26,2,42,2,3,3,16,0,3,16,3,32, +3,128,3,4,3,1,184,255,240,183,143,1,1,1,1,0,0,19,0,63,63,1,47,93,56,205,93, +56,49,48,93,93,93,43,93,5,1,51,1,1,151,254,105,158,1,155,20,5,224,250,32, +0,0,0,0,1,0,16,254,87,1,167,5,204,0,7,0,49,64,31,4,63,0,1,239,0,1,0,7,241, +64,2,80,2,2,192,2,208,2,224,2,3,2,4,245,5,0,1,245,0,27,0,63,237,63,237,1, +47,93,113,253,205,93,113,50,49,48,19,53,51,17,35,53,33,17,16,233,233,1,151, +254,87,129,6,115,129,248,139,0,1,0,10,2,161,3,183,5,129,0,6,2,243,181,0,24, +18,22,72,2,184,255,232,179,18,22,72,5,184,255,232,64,47,18,22,72,118,5,134, +5,2,4,24,18,22,72,121,4,137,4,2,3,54,6,70,6,2,102,6,118,6,134,6,230,6,4,6, +6,22,6,38,6,70,6,86,6,102,6,6,6,184,255,192,179,48,65,72,6,184,255,192,64, +57,18,22,72,6,5,4,57,3,73,3,2,105,3,121,3,137,3,3,9,3,25,3,41,3,89,3,105, +3,5,9,3,64,18,22,72,3,6,1,22,1,134,1,3,57,38,1,54,1,70,1,246,1,4,230,1,1, +1,184,255,192,182,60,63,72,153,1,1,1,184,255,224,64,255,30,33,72,56,1,72, +1,2,39,1,1,22,1,1,183,1,199,1,2,6,1,70,1,86,1,102,1,150,1,166,1,6,9,1,6,8, +1,246,8,1,164,8,1,121,8,1,6,8,1,246,8,1,201,8,217,8,2,187,8,1,9,8,25,8,41, +8,169,8,4,201,201,8,217,8,2,54,8,118,8,134,8,150,8,4,153,8,233,8,2,102,8, +118,8,2,9,8,25,8,57,8,3,198,8,1,139,8,1,57,8,73,8,121,8,3,43,8,1,4,8,1,152, +228,8,244,8,2,208,8,1,162,8,178,8,194,8,3,132,8,148,8,2,82,8,98,8,114,8,3, +64,8,1,50,8,1,36,8,1,2,8,18,8,2,228,8,244,8,2,214,8,1,196,8,1,146,8,162,8, +178,8,3,116,8,132,8,2,102,8,1,50,8,66,8,82,8,3,20,8,36,8,2,6,8,1,242,8,1, +212,8,228,8,2,166,8,182,8,2,130,8,146,8,2,100,8,116,8,2,86,8,1,52,8,68,8, +2,32,8,1,4,8,20,8,2,104,230,8,246,8,2,192,8,1,146,8,162,8,64,24,178,8,3,116, +8,132,8,2,82,8,98,8,2,52,8,68,8,2,22,8,38,8,2,8,184,255,128,64,24,85,88,72, +182,8,198,8,2,132,8,148,8,164,8,3,102,8,118,8,2,68,8,1,8,184,255,192,182, +72,75,72,228,8,1,8,184,255,192,64,12,66,69,72,148,8,1,114,8,130,8,2,8,184, +255,128,64,120,59,62,72,18,8,34,8,2,1,0,8,1,56,240,8,1,212,8,228,8,2,176, +8,1,100,8,132,8,148,8,164,8,4,64,8,80,8,2,36,8,52,8,2,228,8,244,8,2,171,8, +187,8,2,116,8,132,8,148,8,3,75,8,1,52,8,1,11,8,1,235,8,251,8,2,208,8,1,196, +8,1,176,8,1,132,8,148,8,164,8,3,96,8,112,8,2,2,0,8,16,8,64,8,80,8,4,8,34, +1,1,3,1,19,1,2,1,4,3,3,3,0,0,47,50,47,63,51,93,93,1,94,93,95,93,93,93,93, +93,93,113,113,113,113,113,113,114,114,114,114,114,114,94,93,95,93,43,93,93, +43,93,43,113,113,113,113,43,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,94,93,93,93,93,93,113,113,113,114,114,94,93,93,93,93,113,113,113, +113,114,25,47,94,93,93,113,113,113,43,113,43,113,114,94,93,205,43,94,93,113, +114,51,51,205,43,43,93,113,114,49,48,95,93,43,93,43,43,43,9,2,35,1,51,1,3, +19,254,203,254,206,162,1,112,203,1,114,2,161,2,121,253,135,2,224,253,32,0, +0,0,0,1,255,225,254,105,4,138,254,235,0,3,0,35,64,23,16,2,96,2,128,2,160, +2,208,2,5,96,2,128,2,240,2,3,2,0,0,186,1,0,47,237,1,47,47,93,113,49,48,3, +53,33,21,31,4,169,254,105,130,130,0,1,0,106,4,177,2,18,5,228,0,5,0,47,64, +31,117,3,133,3,2,64,4,128,4,2,4,64,16,1,1,1,2,149,128,15,0,47,0,63,0,127, +0,239,0,5,0,0,47,93,26,237,1,47,93,26,205,93,49,48,93,9,1,53,51,19,21,1,180, +254,182,207,217,4,177,1,22,29,254,225,20,0,0,0,0,2,0,87,255,236,4,115,4,78, +0,50,0,65,0,161,64,50,121,61,137,61,2,121,12,137,12,2,2,40,9,13,72,10,5,26, +5,2,43,24,9,17,72,5,28,21,28,2,37,37,30,70,64,46,9,111,56,127,56,143,56,3, +56,67,128,20,71,21,184,255,192,64,20,21,28,72,21,21,63,71,31,3,1,3,48,67, +192,67,2,160,67,1,67,184,255,192,64,32,30,35,72,33,81,40,22,57,81,9,9,26, +51,95,20,1,47,20,143,20,2,20,20,15,80,26,16,46,51,80,0,22,0,63,237,50,63, +237,51,47,93,113,17,18,57,47,237,63,237,1,43,93,113,47,93,237,51,47,43,237, +26,16,220,93,50,50,26,237,50,47,49,48,93,43,93,43,0,93,93,5,34,38,53,52,62, +2,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,21,17,20,22,51,50,54,55,21, +14,1,35,34,46,2,39,35,14,3,39,50,62,2,61,1,7,14,3,21,20,22,1,158,163,164, +81,131,168,87,243,28,58,87,59,52,84,62,38,6,188,10,56,103,155,110,204,206, +42,59,15,30,14,34,67,38,51,73,46,24,3,6,29,69,92,117,35,86,129,85,42,197, +66,119,90,53,95,20,172,150,107,137,78,30,2,4,59,67,94,58,27,15,39,67,51,17, +64,107,78,43,187,177,254,46,80,81,4,3,112,8,8,27,55,81,54,52,84,59,32,135, +63,98,116,53,89,4,1,17,50,90,73,88,96,0,0,2,0,132,255,236,4,29,5,204,0,31, +0,51,0,146,64,9,105,49,121,49,2,121,35,1,31,184,255,224,64,24,7,10,72,134, +30,150,30,2,73,27,89,27,2,73,4,89,4,2,134,1,150,1,2,1,184,255,224,64,63,7, +10,72,0,71,64,160,32,1,32,53,128,42,5,19,70,0,18,16,18,48,18,240,18,4,8,18, +176,53,1,63,53,1,112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,37,80, +29,16,18,0,12,21,5,47,80,2,22,0,63,237,50,63,63,63,237,50,1,93,93,113,113, +114,114,47,94,93,237,50,50,26,16,220,93,26,237,49,48,43,93,93,93,93,43,93, +93,1,16,33,34,38,39,35,20,14,2,7,35,62,3,53,17,51,17,20,6,7,6,7,51,62,1,51, +50,18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,29,254,114,123,163,51, +2,3,3,3,1,174,1,2,2,1,180,1,1,1,1,4,50,165,122,205,193,189,28,62,96,69,71, +109,73,38,38,73,108,70,66,96,64,31,2,34,253,202,89,99,26,56,48,34,4,9,43, +60,72,39,4,237,254,89,30,55,21,25,22,104,90,254,236,254,226,112,160,103,48, +46,102,166,120,116,158,99,43,46,102,163,0,0,0,1,0,87,255,236,3,202,4,78,0, +39,0,117,64,81,121,16,1,121,23,1,99,37,1,99,3,1,32,70,31,31,8,70,160,9,1, +9,9,41,0,71,31,19,1,19,35,80,26,31,32,127,32,143,32,223,32,4,32,32,26,16, +32,8,112,8,128,8,208,8,224,8,5,0,8,16,8,96,8,112,8,128,8,192,8,208,8,7,8, +8,5,80,14,22,31,41,1,93,0,63,237,51,47,93,113,63,51,47,93,16,237,1,47,93, +237,17,51,125,47,113,24,237,51,47,237,49,48,93,93,93,93,1,20,30,2,51,50,54, +55,23,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,7,46,1,35,34,14,2,1,19,27, +64,105,77,96,129,15,182,9,60,103,148,97,127,178,111,50,36,65,88,103,114,58, +91,142,103,64,13,185,14,114,105,77,103,64,27,2,34,93,156,113,62,104,108,12, +67,124,94,57,86,151,205,120,109,167,125,85,51,23,50,87,118,68,14,90,106,51, +103,156,0,0,0,0,2,0,86,255,236,3,239,5,204,0,31,0,51,0,123,64,87,85,34,101, +34,2,90,50,106,50,2,57,1,73,1,2,54,10,70,10,2,9,4,25,4,121,4,137,4,4,6,7, +22,7,118,7,134,7,4,19,70,64,42,0,143,18,239,18,2,18,53,128,32,71,31,6,1,6, +112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,21,18,0,11,47,80,8,16, +0,37,80,3,22,0,63,237,50,63,237,50,63,63,1,93,93,113,113,47,93,237,26,16, +220,93,50,50,26,237,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17,16,33,50, +22,23,51,52,46,1,52,53,17,51,17,20,30,2,23,35,46,3,53,1,20,30,2,51,50,62, +2,53,52,46,2,35,34,14,2,3,53,50,165,122,205,193,1,142,123,164,50,2,1,1,180, +1,2,2,1,172,2,3,3,2,253,218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64, +31,174,104,90,1,20,1,24,2,54,90,98,10,43,47,42,9,1,163,251,19,39,72,60,43, +9,10,37,48,53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102, +163,0,0,0,2,0,87,255,236,4,24,4,78,0,28,0,37,0,107,64,46,90,35,106,35,2,90, +30,106,30,2,85,3,101,3,2,8,73,9,9,27,71,64,31,29,1,144,29,1,29,39,128,37, +0,71,31,17,1,17,48,39,192,39,208,39,3,39,184,255,192,64,19,30,35,72,8,8,5, +0,80,37,37,5,32,80,22,16,5,80,14,22,0,63,237,63,237,18,57,47,237,17,57,47, +1,43,113,47,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,0,93,93, +1,20,30,2,51,50,54,55,23,14,3,35,34,2,17,52,62,2,51,50,30,2,29,1,39,46,1, +35,34,14,2,7,1,20,35,73,114,80,117,141,25,158,17,61,102,153,108,240,251,76, +132,176,100,136,183,111,47,186,15,144,135,45,99,84,58,4,1,247,85,143,103, +57,94,72,45,45,91,73,47,1,30,1,26,152,211,132,59,88,155,210,122,24,138,171, +157,29,74,127,98,0,0,0,1,0,29,0,0,2,60,5,202,0,27,0,161,64,11,3,10,19,10, +51,10,67,10,4,13,10,184,255,224,64,106,8,12,72,26,15,16,1,14,16,25,16,1,70, +5,0,2,1,18,2,31,29,47,29,79,29,95,29,127,29,143,29,159,29,7,15,29,63,29,127, +29,175,29,191,29,223,29,239,29,7,59,95,29,191,29,2,127,29,143,29,159,29,3, +29,64,86,100,72,29,64,39,44,72,32,29,48,29,96,29,3,175,29,223,29,239,29,3, +64,29,1,15,29,47,29,2,19,80,12,0,0,3,80,25,6,15,1,21,0,63,63,51,237,50,63, +237,1,93,93,93,113,43,43,113,114,94,93,113,47,94,93,51,237,50,50,47,94,93, +51,49,48,0,43,94,93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35, +34,14,2,29,1,51,21,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51, +29,11,211,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41,60,39, +97,131,0,2,0,86,254,87,3,239,4,75,0,49,0,69,0,217,64,72,122,49,138,49,2,118, +7,134,7,2,101,62,1,85,12,101,12,2,90,58,106,58,2,38,3,54,3,2,38,18,1,41,33, +1,9,23,25,23,121,23,137,23,4,6,29,22,29,118,29,134,29,4,9,47,70,64,50,34, +48,14,1,127,14,223,14,2,14,71,128,6,70,5,184,255,192,64,81,23,28,72,5,5,60, +71,15,26,1,10,26,32,71,64,71,2,207,71,1,0,71,32,71,144,71,176,71,4,80,223, +71,1,192,71,1,79,71,1,128,71,160,71,2,15,71,47,71,2,208,71,240,71,2,15,71, +1,8,41,15,34,55,80,31,16,15,65,80,21,22,9,80,53,6,1,38,6,1,6,0,27,0,63,50, +93,93,237,63,237,50,63,237,50,63,1,94,93,93,113,113,114,114,114,94,93,93, +113,47,94,93,237,51,47,43,237,26,16,220,93,113,50,50,26,237,49,48,0,94,93, +93,93,93,93,93,93,93,93,93,1,34,46,2,39,55,30,1,51,50,62,2,61,1,35,14,3,35, +34,46,2,53,52,62,2,51,50,22,23,51,52,62,2,55,51,14,3,21,17,20,6,19,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,2,36,93,144,102,64,14,181,18,123,100,61, +100,70,38,2,20,59,85,112,72,103,147,93,43,43,97,155,111,115,169,46,2,3,3, +4,2,171,1,2,2,1,223,44,49,80,103,54,69,99,65,31,31,64,98,68,54,103,82,50, +254,87,38,71,98,60,26,75,81,34,75,120,86,174,41,75,58,35,69,138,205,135,130, +208,145,77,105,97,25,62,55,40,3,9,43,60,73,39,252,197,227,229,3,198,113,161, +102,48,48,103,161,112,117,159,98,42,46,100,158,0,0,0,0,1,0,142,0,0,3,238, +5,204,0,33,0,109,185,0,8,255,192,64,36,7,11,72,11,70,64,80,12,1,159,12,255, +12,2,12,35,128,0,35,192,35,208,35,224,35,4,192,35,1,15,35,1,128,35,1,35,184, +255,192,64,32,19,23,72,28,24,70,192,25,1,0,25,16,25,48,25,224,25,240,25,5, +8,25,26,0,25,11,21,0,18,80,5,16,0,63,237,50,63,51,63,1,47,94,93,113,237,50, +43,93,113,113,114,26,16,220,93,113,26,237,49,48,43,1,62,3,51,50,30,2,21,17, +35,17,52,46,2,35,34,14,2,21,17,35,17,51,17,20,14,2,7,1,61,30,70,84,100,62, +104,133,77,29,181,17,48,88,70,64,103,73,40,180,180,2,3,2,1,3,129,55,77,50, +23,56,101,140,84,253,47,2,174,69,104,69,35,46,84,120,75,253,130,5,204,254, +126,33,66,56,39,7,0,0,0,2,0,137,0,0,1,61,5,204,0,3,0,7,0,115,64,13,3,7,70, +0,0,4,16,4,48,4,3,8,4,184,255,192,64,42,21,24,72,4,4,8,9,255,9,1,224,9,1, +223,9,1,176,9,192,9,2,159,9,1,112,9,128,9,2,31,9,1,0,9,1,240,9,1,223,9,1, +9,184,255,192,64,17,34,37,72,79,9,1,31,9,1,5,15,4,21,0,83,1,0,0,63,237,63, +63,1,93,113,43,113,113,114,114,114,114,114,114,114,114,17,18,57,47,43,94, +93,51,237,50,49,48,19,53,51,21,3,17,51,17,137,180,180,180,5,32,172,172,250, +224,4,58,251,198,0,0,0,0,2,255,206,254,87,1,61,5,204,0,3,0,23,1,51,64,151, +7,24,12,16,72,7,40,8,11,72,3,4,70,21,12,12,0,0,21,16,21,32,21,64,21,4,7,21, +21,24,25,144,25,1,63,25,1,0,25,16,25,2,219,25,64,210,213,72,208,25,224,25, +2,143,25,1,64,25,80,25,2,15,25,31,25,95,25,111,25,255,25,5,144,25,160,25, +224,25,240,25,4,79,25,1,0,25,1,160,63,25,175,25,191,25,207,25,4,239,25,1, +176,25,192,25,208,25,3,63,25,79,25,95,25,3,32,25,1,143,25,191,25,207,25,3, +0,25,1,111,239,25,1,208,25,1,63,25,143,25,2,111,25,143,25,159,25,175,25,255, +25,5,25,184,255,192,64,84,79,82,72,223,25,1,144,25,160,25,176,25,3,47,25, +63,25,79,25,3,0,25,1,61,25,64,53,56,72,112,25,128,25,144,25,176,25,4,15,25, +31,25,2,255,25,1,25,64,35,38,72,144,25,1,79,25,1,255,25,1,112,25,128,25,192, +25,208,25,224,25,5,31,25,1,22,15,16,80,9,27,0,83,1,0,0,63,237,63,237,63,1, +93,93,93,113,113,43,113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93, +93,113,113,113,113,114,94,93,93,93,113,114,114,114,43,94,93,93,93,17,18,57, +47,94,93,51,51,47,16,237,50,49,48,0,43,43,19,53,51,21,17,20,14,2,35,34,38, +39,53,30,1,51,50,62,2,53,17,51,137,180,21,54,93,72,34,65,28,13,36,13,38,49, +28,10,180,5,32,172,172,250,90,62,106,78,45,4,5,139,2,4,20,43,67,46,4,165, +0,0,1,0,138,0,0,4,3,5,204,0,11,0,251,64,84,124,2,1,122,8,1,118,7,1,86,9,102, +9,134,9,150,9,4,139,0,155,0,2,89,0,105,0,121,0,3,116,10,132,10,148,10,3,68, +10,1,1,10,10,11,42,8,1,3,8,9,16,116,9,1,9,9,0,11,16,84,11,116,11,148,11,3, +116,11,148,11,180,11,212,11,228,11,244,11,6,48,11,1,2,11,184,255,192,64,105, +7,10,72,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,31,13,63,13,2,31,13,63,13,95, +13,255,13,4,15,13,31,13,63,13,95,13,127,13,5,57,13,64,83,86,72,96,13,128, +13,160,13,192,13,208,13,5,223,13,1,0,13,96,13,128,13,160,13,4,0,13,16,13, +48,13,64,13,128,13,160,13,192,13,224,13,240,13,9,7,2,1,7,10,4,8,15,5,0,4, +21,0,21,0,63,63,63,63,23,57,1,94,93,113,113,114,43,94,93,113,114,47,94,93, +237,50,47,43,95,93,93,113,56,51,51,47,93,56,51,95,114,17,57,17,51,49,48,93, +93,93,93,93,0,93,1,93,0,93,33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132, +180,180,1,219,211,254,73,1,206,1,238,109,254,127,5,204,252,97,2,13,254,47, +253,151,0,0,0,1,0,138,0,0,1,62,5,204,0,3,0,111,64,52,3,70,192,0,1,208,0,1, +0,0,16,0,48,0,240,0,4,8,0,224,5,240,5,2,223,5,1,176,5,192,5,2,159,5,1,112, +5,128,5,2,15,5,31,5,2,240,5,1,223,5,1,5,184,255,192,64,27,34,37,72,79,5,1, +255,5,1,112,5,128,5,192,5,208,5,224,5,5,31,5,1,1,0,0,21,0,63,63,1,93,93,93, +113,43,113,113,114,114,114,114,114,114,47,94,93,113,114,237,49,48,51,17,51, +17,138,180,5,204,250,52,0,0,1,0,136,0,0,6,35,4,78,0,59,2,194,185,0,42,255, +224,179,8,11,72,32,184,255,224,64,255,8,11,72,34,59,70,0,0,13,46,70,217,47, +249,47,2,182,47,1,41,47,89,47,137,47,3,6,47,1,166,47,182,47,214,47,230,47, +4,137,47,1,118,47,1,89,47,1,6,47,22,47,70,47,3,7,47,25,12,70,198,13,1,6,13, +22,13,54,13,230,13,246,13,5,8,13,251,61,1,201,61,217,61,233,61,3,187,61,1, +153,61,1,139,61,1,105,61,121,61,2,91,61,1,73,61,1,43,61,59,61,2,249,61,1, +235,61,1,217,61,1,203,61,1,189,61,1,153,61,1,139,61,1,105,61,1,91,61,1,41, +61,57,61,2,27,61,1,9,61,1,202,235,61,251,61,2,105,61,137,61,153,61,185,61, +201,61,5,91,61,1,77,61,1,41,61,57,61,2,27,61,1,249,61,1,235,61,1,201,61,217, +61,2,187,61,1,153,61,1,139,61,1,125,61,1,1,43,61,75,61,91,61,107,61,4,31, +61,1,4,61,1,203,61,235,61,2,175,61,191,61,2,139,61,1,127,61,1,43,61,75,61, +91,61,107,61,4,31,61,1,11,61,1,154,255,61,1,235,61,64,255,1,223,61,1,187, +61,1,175,61,1,139,61,155,61,2,127,61,1,91,61,107,61,2,79,61,1,59,61,1,36, +61,1,11,61,1,235,61,1,223,61,1,187,61,1,175,61,1,155,61,1,127,61,143,61,2, +100,61,1,75,61,1,63,61,1,43,61,1,15,61,31,61,2,235,61,1,223,61,1,123,61,139, +61,171,61,187,61,4,111,61,1,59,61,1,31,61,1,11,61,1,106,187,61,203,61,235, +61,3,175,61,1,139,61,1,127,61,1,91,61,1,79,61,1,27,61,1,251,61,1,223,61,239, +61,2,187,61,203,61,2,175,61,1,100,61,148,61,2,27,61,43,61,75,61,3,4,61,1, +244,61,1,139,61,171,61,219,61,3,127,61,1,107,61,1,52,61,1,27,61,1,15,61,1, +57,187,61,219,61,251,61,3,160,61,1,116,61,148,61,2,43,61,75,61,91,61,3,31, +61,1,11,61,1,203,61,235,61,251,61,3,164,61,1,27,61,75,61,91,61,123,61,4,244, +61,1,208,61,1,2,96,61,144,61,160,61,192,61,4,79,61,1,48,61,1,47,61,1,0,64, +19,61,1,8,34,53,80,40,16,25,6,80,31,16,19,15,47,13,0,21,0,63,50,50,63,63, +237,50,63,237,50,1,94,93,93,93,93,93,95,93,93,113,113,113,114,114,114,114, +114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,47, +94,93,113,237,50,47,94,93,93,93,93,93,113,113,113,113,237,18,57,47,237,57, +49,48,0,43,43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21, +51,62,3,51,50,22,23,51,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,3,0,20,47,76,55,57,92,65,35,179,1,2,2,1,170,1,2,3,2,3,24,56,75,97,64,123, +143,28,3,24,60,80,100,64,82,119,76,36,178,20,47,76,55,57,92,65,35,2,174,79, +106,65,27,45,85,125,81,253,141,3,83,34,75,67,48,7,5,44,57,59,20,47,76,53, +29,98,107,47,76,53,29,44,92,145,100,253,47,2,174,79,106,65,27,43,84,126,83, +253,141,0,1,0,136,0,0,3,238,4,78,0,37,0,109,185,0,34,255,224,64,36,7,11,72, +37,70,64,80,0,1,159,0,255,0,2,0,39,128,0,39,192,39,208,39,224,39,4,192,39, +1,15,39,1,128,39,1,39,184,255,192,64,32,19,23,72,25,12,70,192,13,1,0,13,16, +13,48,13,224,13,240,13,5,8,13,25,6,80,31,16,19,15,13,0,21,0,63,50,63,63,237, +50,1,47,94,93,113,237,50,43,93,113,113,114,26,16,220,93,113,26,237,49,48, +43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51, +50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26, +62,82,106,70,90,130,84,39,2,174,79,106,65,27,45,85,125,81,253,141,3,83,34, +75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,253,47,0,0,0,0,2,0,86, +255,236,4,29,4,78,0,14,0,34,0,116,64,59,121,32,137,32,2,116,28,132,28,2,118, +22,134,22,2,121,18,137,18,2,150,12,166,12,2,4,12,20,12,2,11,9,27,9,2,11,5, +27,5,2,4,2,20,2,2,7,0,71,64,144,15,1,15,36,128,48,36,1,36,184,255,192,64, +20,30,35,72,223,36,1,25,71,31,8,1,8,20,80,10,16,30,80,3,22,0,63,237,63,237, +1,47,93,237,93,43,113,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93, +93,1,16,2,35,34,46,2,53,16,33,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,29,250,238,113,178,123,65,1,229,126,183,117,56,189,39,75,108,68, +69,111,78,41,44,77,105,62,69,112,78,42,2,30,254,228,254,234,68,140,211,143, +2,48,70,140,210,140,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0, +0,2,0,132,254,87,4,29,4,77,0,38,0,58,0,148,64,16,105,56,121,56,2,105,42,121, +42,2,134,36,150,36,2,36,184,255,224,64,19,7,10,72,73,31,89,31,2,73,7,89,7, +2,134,3,150,3,2,3,184,255,224,64,63,7,10,72,0,71,64,160,39,1,39,60,128,49, +28,15,70,0,16,16,16,48,16,240,16,4,8,16,176,60,1,63,60,1,112,60,144,60,2, +31,60,1,255,60,1,192,60,224,60,2,28,44,80,34,16,22,15,15,27,8,54,80,5,22, +0,63,237,50,63,63,63,237,50,1,93,93,113,113,114,114,47,94,93,237,50,50,26, +16,220,93,26,237,49,48,43,93,93,93,43,93,93,93,1,20,14,2,35,34,38,39,35,30, +3,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51,50,30,2,7,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,4,29,40,93,153,112,116,174,46,5,1,1,1,1,180,1,2,2, +1,174,1,3,3,3,4,25,64,82,101,63,112,153,93,40,189,24,59,98,74,60,106,79,46, +38,73,108,70,75,99,59,24,2,34,123,208,150,85,88,100,2,32,48,59,29,254,89, +5,6,39,72,59,42,9,3,36,51,58,26,52,73,47,21,80,145,205,129,100,156,108,56, +34,96,169,135,115,159,98,43,58,110,159,0,0,2,0,86,254,87,3,240,4,78,0,34, +0,54,0,165,64,119,85,47,101,47,2,90,43,106,43,2,57,32,73,32,2,54,9,70,9,2, +9,1,25,1,121,1,137,1,4,6,5,22,5,118,5,134,5,4,9,22,70,64,35,11,127,23,223, +23,2,23,56,128,45,71,15,3,1,10,3,32,56,64,56,2,207,56,1,0,56,32,56,144,56, +176,56,4,80,223,56,1,192,56,1,79,56,1,128,56,160,56,2,15,56,47,56,2,208,56, +240,56,2,15,56,1,8,22,27,17,16,11,40,80,6,16,29,50,80,0,22,0,63,237,50,63, +237,50,63,63,1,94,93,93,113,113,114,114,114,94,93,93,113,47,94,93,237,26, +16,220,93,50,50,26,237,49,48,0,94,93,93,93,93,93,93,5,34,2,17,16,18,51,50, +30,2,23,51,52,62,2,55,51,14,1,21,17,35,17,52,54,55,54,55,35,14,3,1,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,1,228,206,192,197,201,67,103,81,61,25, +2,3,3,4,2,173,2,5,180,1,1,1,1,2,26,63,82,103,1,16,41,75,107,66,69,98,61,29, +27,61,97,70,60,106,79,46,20,1,22,1,22,1,26,1,28,24,47,70,47,25,61,54,39,3, +17,144,134,251,54,1,183,26,56,25,28,29,51,75,49,23,2,62,118,160,96,41,51, +105,161,110,108,160,104,51,37,97,169,0,0,0,1,0,136,0,0,2,136,4,78,0,31,0, +62,64,40,16,21,48,21,2,21,21,33,12,31,70,192,0,1,0,0,16,0,48,0,224,0,240, +0,5,8,0,25,40,19,22,72,25,12,18,16,7,15,0,21,0,63,63,63,51,205,43,1,47,94, +93,113,237,50,17,51,47,93,49,48,51,17,52,46,2,39,51,30,3,21,51,62,3,51,50, +22,23,21,46,1,35,34,14,2,21,17,142,1,2,2,1,170,1,3,3,1,4,19,43,58,80,57,22, +40,11,18,48,30,62,87,55,26,3,62,34,71,66,58,23,23,59,62,57,20,62,91,59,29, +7,3,165,5,5,56,99,137,81,253,204,0,0,1,0,57,255,236,3,182,4,75,0,55,0,189, +64,85,116,46,132,46,2,111,21,127,21,143,21,3,107,22,1,37,54,1,42,27,1,21, +52,1,5,2,21,2,2,11,30,27,30,2,36,73,35,35,0,72,64,32,19,48,19,2,144,19,160, +19,176,19,3,19,57,128,11,73,10,64,25,30,72,10,10,44,72,79,29,95,29,2,32,29, +1,29,96,57,192,57,2,128,57,1,57,184,255,192,64,42,39,42,72,63,57,1,16,57, +1,19,44,5,41,80,32,0,36,1,144,36,240,36,2,36,36,32,16,14,80,5,96,11,112,11, +2,128,11,1,11,11,5,22,0,63,51,47,93,113,16,237,63,51,47,93,113,16,237,18, +57,57,1,93,93,43,93,113,47,93,113,237,51,47,43,237,26,16,220,93,113,26,237, +50,47,237,49,48,93,93,0,93,1,93,93,0,93,93,93,1,20,14,2,35,34,46,2,39,55, +30,1,51,50,62,2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,6,21, +20,30,2,23,30,5,3,182,59,112,163,105,94,151,114,77,18,159,23,144,128,58,97, +70,39,46,82,117,70,65,128,103,64,211,202,179,211,28,162,9,48,68,85,46,122, +116,43,77,108,65,43,90,85,75,56,33,1,43,76,119,81,43,29,64,105,76,31,87,81, +16,39,65,48,49,63,42,31,19,17,42,69,102,77,148,155,126,139,20,42,57,35,15, +74,75,44,57,39,29,16,11,25,35,47,66,88,0,0,0,0,1,0,31,255,240,2,42,5,44,0, +22,0,123,64,87,40,14,1,105,14,121,14,137,14,3,40,13,1,105,13,121,13,137,13, +3,139,4,1,4,32,9,13,72,108,4,124,4,156,4,172,4,4,4,32,9,12,72,111,22,127, +22,2,22,12,13,22,3,16,70,9,8,143,5,1,0,5,16,5,32,5,64,5,4,7,5,128,24,1,15, +6,80,12,63,10,1,10,9,15,19,80,3,22,0,63,237,63,205,93,51,237,50,1,93,47,94, +93,113,51,51,237,23,50,47,93,49,48,0,43,93,1,43,93,93,113,93,113,37,14,1, +35,34,53,17,35,53,51,55,51,21,51,21,35,17,20,22,51,50,54,55,2,42,41,85,56, +216,125,132,53,120,200,200,51,63,26,49,29,8,11,13,245,2,210,131,242,242,131, +253,85,78,63,8,6,0,0,0,0,1,0,133,255,236,3,235,4,58,0,37,0,121,64,69,150, +3,1,26,33,42,33,58,33,3,25,14,70,64,47,11,143,11,2,191,11,1,143,11,159,11, +255,11,3,11,39,128,1,70,223,36,239,36,2,0,36,16,36,48,36,240,36,4,8,36,176, +39,192,39,208,39,3,176,39,240,39,2,255,39,1,112,39,1,39,184,255,192,64,13, +19,23,72,25,6,80,31,22,19,21,12,0,15,0,63,50,63,63,237,50,1,43,93,93,113, +114,47,94,93,113,237,26,16,220,93,113,114,26,237,51,49,48,0,93,93,1,17,20, +30,2,51,50,62,2,53,17,51,17,20,30,2,23,35,46,3,53,35,14,3,35,34,46,2,53,17, +1,58,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90, +130,84,39,4,58,253,82,79,106,65,27,45,85,125,81,2,115,252,173,34,75,67,48, +7,5,44,57,59,20,47,76,53,29,44,92,144,101,2,209,0,0,1,0,7,0,0,3,249,4,58, +0,16,2,91,64,55,57,1,73,1,2,153,1,1,54,0,70,0,2,134,0,150,0,2,58,15,74,15, +2,154,15,1,105,15,121,15,137,15,3,53,3,69,3,2,149,3,1,3,103,3,119,3,135,3, +3,14,16,13,17,72,4,184,255,240,64,62,13,17,72,1,0,9,9,2,15,16,16,43,16,123, +16,2,4,16,20,16,2,4,16,20,16,68,16,84,16,132,16,148,16,196,16,212,16,8,219, +16,1,68,16,84,16,132,16,148,16,196,16,5,27,16,1,4,16,1,8,16,3,2,184,255,240, +64,255,11,2,91,2,2,42,2,11,18,27,18,2,11,18,27,18,75,18,91,18,139,18,155, +18,203,18,219,18,8,255,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18, +1,68,18,84,18,2,32,18,1,4,18,20,18,2,199,224,18,1,196,18,212,18,2,160,18, +1,4,18,20,18,68,18,84,18,132,18,148,18,6,68,18,84,18,132,18,148,18,196,18, +212,18,6,27,18,1,4,18,1,219,18,1,196,18,1,155,18,1,132,18,1,91,18,1,68,18, +1,27,18,1,4,18,1,151,11,18,27,18,75,18,91,18,139,18,155,18,203,18,219,18, +8,155,18,203,18,219,18,3,132,18,1,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18, +2,224,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,4,18,20,18,68, +18,84,18,4,103,4,18,20,18,68,18,84,18,132,18,148,18,196,18,212,18,8,219,18, +1,196,18,1,155,18,1,132,18,1,91,18,1,68,18,1,27,18,1,4,18,1,219,18,1,196, +18,1,11,18,27,18,75,18,64,99,91,18,139,18,155,18,6,55,75,18,91,18,139,18, +155,18,203,18,219,18,6,63,18,1,32,18,1,4,18,20,18,2,224,18,1,196,18,212,18, +2,160,18,1,132,18,148,18,2,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18,2,196, +18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,2,80,18,1,47,18,1,0,18,16,18, +2,7,15,2,15,9,1,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93,93,113,113,113, +113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113, +113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114,94,93,93,93,93,93, +93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93,93,93,93,113,114,47, +94,93,56,51,47,94,93,93,93,93,113,114,114,56,51,18,57,61,47,51,51,49,48,43, +43,93,95,93,113,93,93,113,93,113,93,113,33,35,1,51,19,30,3,23,62,3,55,19, +51,2,101,213,254,119,192,238,7,19,20,17,6,6,19,20,21,8,246,191,4,58,253,64, +22,63,68,63,21,21,63,66,63,22,2,194,0,0,0,0,1,255,253,0,0,5,204,4,58,0,42, +3,177,64,36,229,23,1,58,41,74,41,2,122,41,138,41,154,41,3,53,16,69,16,2,117, +16,133,16,149,16,3,54,29,70,29,2,54,29,1,29,184,255,240,64,22,13,17,72,57, +28,73,28,2,57,28,1,28,16,13,17,72,54,0,70,0,2,0,184,255,240,64,9,11,17,72, +54,13,70,13,2,13,184,255,240,64,51,11,17,72,57,1,73,1,2,1,16,11,17,72,57, +14,73,14,2,3,14,16,9,17,72,14,13,22,29,28,7,1,0,35,40,35,1,88,35,1,22,7,35, +35,7,22,3,15,41,42,16,42,184,255,192,64,73,47,50,72,73,42,1,52,42,1,38,42, +1,249,42,1,198,42,230,42,2,164,42,1,150,42,1,121,42,1,54,42,70,42,102,42, +3,25,42,1,244,42,1,182,42,230,42,2,132,42,148,42,2,102,42,118,42,2,57,42, +1,38,42,1,20,42,1,6,42,1,8,42,16,15,184,255,240,64,255,9,15,89,15,105,15, +121,15,4,10,15,198,44,230,44,246,44,3,164,44,1,150,44,1,121,44,1,102,44,1, +84,44,1,54,44,70,44,2,25,44,1,244,44,1,230,44,1,196,44,1,182,44,1,153,44, +1,134,44,1,116,44,1,102,44,1,57,44,1,20,44,36,44,2,6,44,1,202,249,44,1,150, +44,182,44,198,44,230,44,4,105,44,1,54,44,70,44,2,9,44,25,44,2,230,44,1,185, +44,1,86,44,102,44,134,44,3,57,44,1,43,44,1,20,44,1,6,44,1,228,44,1,214,44, +1,196,44,1,182,44,1,162,44,1,148,44,1,134,44,1,114,44,1,100,44,1,86,44,1, +52,44,68,44,2,34,44,1,20,44,1,6,44,1,153,246,44,1,194,44,210,44,2,180,44, +1,166,44,1,132,44,1,118,44,1,84,44,100,44,2,66,44,1,52,44,1,22,44,38,44,2, +4,44,1,226,44,242,44,2,212,44,1,198,44,1,164,44,1,146,44,1,132,44,1,102,44, +118,44,2,84,44,1,54,44,70,44,2,36,44,1,22,44,1,4,44,1,244,44,64,213,1,230, +44,1,196,44,1,178,44,1,164,44,1,102,44,134,44,150,44,3,68,44,84,44,2,54,44, +1,20,44,1,6,44,1,105,246,44,1,226,44,1,212,44,1,150,44,182,44,198,44,3,116, +44,132,44,2,54,44,70,44,102,44,3,36,44,1,6,44,22,44,2,244,44,1,182,44,230, +44,2,148,44,164,44,2,134,44,1,105,44,1,86,44,1,68,44,1,6,44,54,44,2,228,44, +1,214,44,1,196,44,1,166,44,182,44,2,137,44,1,114,44,1,1,96,44,1,4,44,36,44, +84,44,3,56,164,44,196,44,212,44,244,44,4,128,44,1,116,44,1,75,44,1,48,44, +1,20,44,36,44,2,251,44,1,196,44,1,160,44,1,148,44,1,123,44,1,52,44,68,44, +100,44,3,27,44,1,240,44,1,228,44,1,203,44,1,100,44,132,44,148,44,180,44,4, +63,44,1,2,0,44,16,44,2,8,7,184,255,224,64,40,14,17,72,66,7,1,52,7,1,34,7, +1,7,28,41,3,15,15,35,40,12,17,72,45,35,1,22,40,12,17,72,45,22,1,1,22,35,3, +14,21,0,63,23,51,93,43,93,43,63,23,51,93,93,93,43,1,94,93,95,93,93,93,93, +93,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93,93,95,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,47,94,93, +56,51,47,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114, +43,56,51,18,23,57,61,47,47,47,113,114,17,51,51,17,51,51,17,51,51,49,48,43, +95,113,43,113,43,113,43,113,43,93,113,43,93,113,93,113,93,113,113,33,35,3, +46,1,39,38,39,6,7,14,1,7,3,35,1,51,19,30,1,23,22,23,54,55,62,1,55,19,51,19, +30,1,23,22,23,54,55,62,1,55,19,51,4,150,209,173,8,17,8,10,9,9,10,8,19,8,178, +208,254,209,178,183,7,14,7,7,8,8,9,8,16,6,196,193,189,7,16,7,8,8,8,8,7,15, +7,191,176,2,186,27,80,38,44,47,45,44,38,82,31,253,74,4,58,253,33,23,67,32, +37,39,38,36,31,64,21,2,231,253,25,26,66,29,34,35,38,36,31,67,26,2,223,0,0, +1,0,23,0,0,3,234,4,58,0,11,2,214,64,72,148,2,1,134,2,1,141,8,157,8,2,121, +8,1,130,6,146,6,2,118,6,1,141,0,157,0,2,121,0,1,55,10,119,10,2,28,10,1,122, +4,1,19,4,1,3,24,1,120,1,136,1,152,1,4,23,7,135,7,151,7,3,6,8,10,1,7,4,4,9, +9,16,5,184,255,240,64,59,5,9,5,9,3,0,11,16,41,11,57,11,2,4,11,20,11,2,214, +11,230,11,246,11,3,196,11,1,150,11,166,11,182,11,3,132,11,1,6,11,38,11,70, +11,102,11,134,11,150,11,166,11,198,11,230,11,9,8,11,184,255,192,181,24,31, +72,11,2,3,184,255,240,64,11,9,3,1,9,3,57,3,2,10,3,13,184,255,128,64,116,223, +233,72,118,13,1,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,230, +13,246,13,2,210,13,1,192,13,1,178,13,1,132,13,148,13,164,13,3,118,13,1,100, +13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,199,246,13,1,228,13,1, +214,13,1,196,13,1,182,13,1,164,13,1,6,13,70,13,86,13,134,13,150,13,166,13, +198,13,214,13,230,13,9,150,13,198,13,2,13,184,255,192,64,187,183,192,72,132, +13,1,86,13,102,13,118,13,3,68,13,1,38,13,54,13,2,4,13,1,151,38,13,54,13,102, +13,118,13,166,13,182,13,198,13,230,13,246,13,9,230,13,1,132,13,1,118,13,1, +68,13,84,13,100,13,3,54,13,1,36,13,1,22,13,1,4,13,1,246,13,1,228,13,1,214, +13,1,196,13,1,182,13,1,164,13,1,118,13,134,13,150,13,3,100,13,1,6,13,22,13, +38,13,70,13,86,13,5,103,6,13,70,13,86,13,134,13,150,13,198,13,214,13,230, +13,8,153,13,217,13,2,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13, +1,214,13,230,13,246,13,3,196,13,1,6,13,38,13,54,13,70,13,4,55,102,13,166, +13,182,13,230,13,246,13,5,13,184,255,192,64,54,61,66,72,57,13,1,34,13,1,1, +0,13,16,13,2,244,13,1,192,13,208,13,224,13,3,180,13,1,128,13,144,13,160,13, +3,116,13,1,96,13,1,84,13,1,64,13,1,52,13,1,32,13,1,13,184,255,192,64,34,18, +24,72,160,13,1,2,0,13,16,13,80,13,112,13,128,13,144,13,6,7,10,4,4,7,1,3,2, +8,6,15,0,2,21,0,63,51,63,51,18,23,57,17,1,51,94,93,95,93,43,113,113,113,113, +113,113,113,113,113,113,114,95,114,114,43,114,94,93,93,93,113,113,113,113, +113,113,113,113,114,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +113,113,114,94,93,93,93,93,93,43,93,113,114,114,114,114,114,114,94,93,93, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,43,47,94, +93,114,56,51,47,43,94,93,113,113,113,113,114,114,56,51,18,57,57,47,47,56, +56,18,23,57,50,51,49,48,0,93,93,1,95,93,93,93,93,93,93,93,93,93,93,93,93, +33,9,1,35,9,1,51,9,1,51,9,1,3,33,254,221,254,219,194,1,129,254,145,199,1, +14,1,12,201,254,145,1,134,1,188,254,68,2,44,2,14,254,91,1,165,253,244,253, +210,0,0,0,0,1,0,5,254,87,3,252,4,58,0,31,2,207,64,59,147,3,1,147,2,1,153, +16,1,150,0,1,141,16,157,16,2,141,0,157,0,2,122,29,138,29,154,29,3,105,29, +1,157,30,1,30,16,13,16,72,146,19,1,134,19,1,114,19,1,86,19,102,19,2,146,18, +1,3,18,184,255,240,64,36,13,16,72,16,0,24,8,24,8,24,17,30,31,16,153,31,1, +134,31,1,89,31,1,70,31,1,25,31,1,6,31,1,8,31,18,17,184,255,240,64,36,17,6, +33,1,6,33,38,33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230, +33,246,33,12,199,230,33,246,33,2,33,184,255,192,64,255,217,233,72,196,33, +1,166,33,182,33,2,132,33,1,6,33,38,33,54,33,70,33,102,33,118,33,6,6,33,38, +33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230,33,246,33,12, +6,33,22,33,38,33,70,33,86,33,102,33,134,33,166,33,198,33,230,33,246,33,11, +151,244,33,1,224,33,1,194,33,210,33,2,180,33,1,160,33,1,130,33,146,33,2,116, +33,1,96,33,1,66,33,82,33,2,52,33,1,32,33,1,2,33,18,33,2,228,33,244,33,2,194, +33,210,33,2,164,33,180,33,2,130,33,146,33,2,100,33,116,33,2,66,33,82,33,2, +36,33,52,33,2,2,33,18,33,2,228,33,244,33,2,194,33,210,33,2,164,33,180,33, +2,130,33,146,33,2,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2, +33,1,103,228,33,244,33,2,214,33,1,194,33,1,164,33,180,33,2,150,33,1,130,33, +1,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2,33,1,228,33,244, +33,2,214,33,1,64,166,194,33,1,1,160,33,176,33,2,132,33,148,33,2,96,33,112, +33,2,68,33,84,33,2,32,33,48,33,2,4,33,20,33,2,224,33,240,33,2,196,33,212, +33,2,160,33,176,33,2,132,33,148,33,2,96,33,112,33,2,68,33,84,33,2,32,33,48, +33,2,4,33,20,33,2,55,224,33,1,196,33,212,33,2,160,33,1,132,33,148,33,2,96, +33,1,68,33,84,33,2,32,33,1,4,33,20,33,2,224,33,1,196,33,212,33,2,160,33,1, +132,33,148,33,2,96,33,1,2,0,33,32,33,48,33,80,33,4,80,33,128,33,144,33,192, +33,4,47,33,1,0,33,16,33,2,7,16,0,24,0,32,30,17,15,12,80,5,27,0,63,237,63, +51,17,51,51,17,51,1,94,93,93,93,113,95,113,113,113,113,113,114,114,114,114, +114,114,114,114,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,95,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,114,114,114,94,93,113,114,114,114,114,43,114,94,93,113,47,56,51,47, +94,93,93,93,93,93,93,56,51,18,57,57,61,47,24,47,17,51,51,49,48,43,95,93,93, +93,93,93,43,93,93,93,0,93,93,1,93,93,93,93,33,14,3,35,34,38,39,53,30,1,51, +50,54,63,1,1,51,19,30,3,23,62,3,55,19,51,2,92,38,79,98,120,78,34,58,32,19, +48,17,79,136,51,17,254,83,192,228,10,31,31,24,2,3,23,29,30,10,212,190,98, +157,111,59,4,7,135,3,3,118,129,43,4,53,253,170,27,90,90,72,9,11,65,80,82, +30,2,106,0,1,0,49,0,0,3,182,4,58,0,9,1,11,64,78,157,2,173,2,2,139,2,1,89, +2,105,2,2,146,7,162,7,2,116,7,132,7,2,70,7,86,7,102,7,3,40,8,1,3,8,2,123, +6,1,4,6,20,6,36,6,164,6,180,6,212,6,228,6,7,7,6,7,3,11,1,59,1,91,1,3,10,1, +64,39,55,72,1,64,17,20,72,1,11,184,255,192,64,40,92,100,72,192,11,1,180,11, +1,160,11,1,148,11,1,128,11,1,116,11,1,96,11,1,84,11,1,64,11,1,52,11,68,11, +100,11,132,11,4,11,184,255,192,64,32,73,82,72,32,11,1,20,11,1,0,11,1,63,68, +11,100,11,132,11,164,11,4,4,11,36,11,68,11,100,11,4,11,184,255,192,179,51, +62,72,11,184,255,192,64,18,31,39,72,224,11,1,2,0,11,32,11,80,11,112,11,4, +7,11,184,255,192,64,13,16,20,72,6,3,80,4,15,1,7,80,0,21,0,63,237,50,63,237, +50,1,43,94,93,95,93,43,43,113,114,94,93,93,93,43,93,113,113,113,113,113,113, +113,113,113,43,47,43,43,94,93,51,51,47,94,93,113,51,51,95,113,49,48,93,93, +93,93,93,93,51,53,1,33,53,33,21,1,33,21,49,2,149,253,147,3,56,253,106,2,187, +137,3,38,139,137,252,218,139,0,0,0,1,0,34,254,87,2,136,5,204,0,45,0,96,64, +65,3,32,9,12,72,19,32,9,13,72,23,45,33,28,40,240,17,11,31,5,63,5,2,143,5, +1,64,5,1,5,33,11,245,47,12,111,12,2,15,12,79,12,223,12,239,12,4,47,12,79, +12,111,12,3,12,12,0,24,245,21,0,43,245,0,27,0,63,237,63,237,18,57,47,93,113, +114,237,57,1,47,93,93,113,51,51,237,50,50,205,50,49,48,43,43,1,34,46,2,53, +17,52,46,2,39,53,62,3,53,17,52,54,59,1,21,35,34,6,21,17,20,14,2,7,21,30,3, +21,17,20,22,59,1,21,2,1,65,99,66,34,29,55,80,51,51,80,55,29,133,131,135,63, +91,77,30,52,71,41,43,71,51,29,77,91,63,254,87,41,76,108,68,1,105,63,88,56, +28,2,127,2,28,56,88,62,1,106,141,152,129,107,108,254,156,50,84,64,44,10,2, +10,44,65,84,51,254,155,106,109,129,0,1,0,183,254,78,1,93,5,204,0,3,1,207, +64,21,3,171,6,0,1,11,0,0,4,5,214,5,230,5,246,5,3,194,5,1,5,184,255,128,179, +226,229,72,5,184,255,192,64,10,222,225,72,2,5,18,5,2,218,5,184,255,128,179, +214,217,72,5,184,255,192,64,20,210,213,72,180,5,196,5,2,162,5,1,1,112,5,128, +5,144,5,3,5,184,255,192,64,20,199,202,72,0,5,1,240,5,1,212,5,228,5,2,176, +5,192,5,2,5,184,255,192,64,43,187,190,72,48,5,64,5,80,5,3,4,5,20,5,36,5,3, +240,5,1,196,5,212,5,228,5,3,128,5,144,5,160,5,3,4,5,20,5,36,5,3,164,5,184, +255,192,179,168,171,72,5,184,255,128,179,160,163,72,5,184,255,192,64,14,156, +159,72,112,5,128,5,144,5,3,228,5,1,5,184,255,192,64,11,145,148,72,176,5,192, +5,208,5,3,5,184,255,192,64,15,133,136,72,48,5,1,20,5,36,5,2,0,5,1,5,184,255, +192,64,15,122,125,72,128,5,1,4,5,20,5,36,5,3,110,5,184,255,192,64,10,114, +117,72,192,5,1,84,5,1,5,184,255,192,182,102,105,72,16,5,1,5,184,255,192,64, +9,91,94,72,80,5,96,5,2,5,184,255,192,64,15,79,82,72,203,5,219,5,2,160,5,176, +5,2,2,5,184,255,192,64,10,68,71,72,15,5,31,5,2,62,5,184,255,192,64,29,56, +61,72,207,5,1,96,5,112,5,160,5,176,5,4,31,5,1,0,5,1,160,5,224,5,240,5,3,5, +184,255,192,64,28,25,28,72,5,64,17,21,72,64,5,112,5,128,5,144,5,4,15,5,31, +5,47,5,3,7,1,0,0,0,47,63,1,94,93,93,43,43,113,114,114,114,114,43,94,93,43, +95,93,93,43,113,43,114,43,114,114,43,94,93,93,43,113,113,113,43,113,43,113, +114,43,43,43,94,93,93,93,93,113,113,43,113,113,113,114,43,114,95,114,114, +43,43,94,93,43,43,93,93,17,18,57,47,94,93,237,49,48,19,17,51,17,183,166,254, +78,7,126,248,130,0,0,0,0,1,0,34,254,87,2,135,5,204,0,45,0,98,185,0,40,255, +224,179,9,12,72,24,184,255,224,64,55,9,13,72,20,44,32,26,38,240,15,9,48,3, +1,192,3,208,3,2,3,9,32,245,47,31,111,31,2,15,31,79,31,223,31,239,31,4,47, +31,79,31,111,31,3,31,31,21,45,245,44,27,20,245,21,0,0,63,237,63,237,18,57, +47,93,113,114,237,57,1,47,93,113,51,51,253,50,50,205,50,49,48,43,43,19,50, +54,53,17,52,62,2,55,53,46,3,53,17,52,38,43,1,53,51,50,22,21,17,20,30,2,23, +21,14,3,21,17,20,14,2,43,1,53,94,91,79,28,51,71,43,42,70,52,29,79,91,60,132, +131,133,29,55,81,52,52,81,55,29,34,66,99,65,132,254,216,109,106,1,101,51, +84,65,44,10,2,10,44,64,84,50,1,100,108,107,129,152,141,254,150,62,88,56,28, +2,127,2,28,56,88,63,254,151,68,108,76,41,129,0,0,0,0,1,0,92,2,41,4,80,3,39, +0,32,0,154,64,26,90,3,138,3,2,25,2,41,2,57,2,3,30,48,10,16,72,13,31,1,25, +48,9,12,72,13,184,255,208,179,9,13,72,7,184,255,208,64,19,9,13,72,0,27,32, +27,112,27,3,27,32,10,1,10,24,173,64,10,184,255,192,180,38,60,72,10,0,184, +255,192,179,23,28,72,0,184,255,192,64,41,14,20,72,0,128,27,64,41,60,72,27, +5,173,31,14,79,14,159,14,3,111,14,127,14,159,14,175,14,207,14,239,14,255, +14,7,14,64,9,13,72,14,0,47,43,93,113,237,196,43,26,221,43,43,196,43,26,237, +1,47,93,47,93,49,48,0,43,43,43,93,43,93,93,1,34,38,39,38,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,76,69,145,73,129,88,38,65,60, +56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68,2,41, +44,26,45,12,23,32,21,143,38,46,13,20,26,13,8,15,14,8,50,42,149,23,30,19,8, +0,0,0,2,0,242,254,185,1,184,4,58,0,3,0,7,2,19,64,133,2,91,3,3,166,5,182,5, +2,5,150,105,6,185,6,2,70,6,86,6,2,57,6,1,6,64,23,27,72,182,6,198,6,2,73,6, +89,6,105,6,3,22,6,54,6,2,9,6,1,10,6,121,9,137,9,153,9,201,9,4,70,9,1,9,9, +57,9,2,249,9,1,182,9,1,105,9,121,9,169,9,3,38,9,1,9,9,1,204,217,9,233,9,2, +150,9,1,73,9,89,9,121,9,3,6,9,1,185,9,201,9,2,134,9,1,116,9,1,86,9,102,9, +2,68,9,1,22,9,38,9,54,9,3,9,184,255,192,64,14,168,171,72,180,9,1,134,9,150, +9,166,9,3,9,184,255,192,64,22,159,162,72,36,9,1,6,9,22,9,2,156,182,9,198, +9,214,9,246,9,4,9,184,255,64,64,14,147,150,72,102,9,1,150,9,166,9,182,9,3, +9,184,255,192,64,24,137,144,72,98,9,114,9,130,9,3,64,9,80,9,2,34,9,50,9,2, +16,9,1,9,184,255,64,182,117,124,72,128,9,1,9,184,255,64,64,10,110,115,72, +4,9,20,9,2,108,9,184,255,64,64,62,101,107,72,180,9,196,9,212,9,3,150,9,166, +9,2,132,9,1,118,9,1,82,9,98,9,2,36,9,52,9,68,9,3,6,9,22,9,2,246,9,1,194,9, +210,9,2,1,144,9,160,9,176,9,3,100,9,116,9,132,9,3,9,184,255,128,64,16,71, +75,72,212,9,228,9,244,9,3,160,9,176,9,2,9,184,255,192,64,61,59,64,72,16,9, +32,9,2,4,9,1,55,180,9,228,9,244,9,3,128,9,144,9,2,84,9,100,9,116,9,3,27,9, +1,0,9,1,240,9,1,196,9,212,9,228,9,3,84,9,100,9,164,9,212,9,228,9,244,9,6, +9,184,255,192,64,20,26,31,72,64,9,1,2,15,9,1,7,0,6,156,7,15,0,3,1,3,0,47, +93,63,253,206,1,94,93,95,93,43,93,113,113,114,114,114,114,114,94,93,93,43, +93,93,43,113,113,95,113,113,114,114,114,114,114,114,114,43,94,93,43,93,43, +113,113,113,113,43,113,114,43,114,94,93,93,43,93,93,43,113,113,113,113,113, +113,114,114,114,114,94,93,93,93,93,93,113,113,113,47,94,93,93,93,93,43,113, +113,113,237,113,51,47,237,49,48,1,51,19,35,19,21,35,53,1,10,148,24,196,198, +194,2,173,252,12,5,129,201,201,0,0,0,1,0,135,255,225,3,250,5,129,0,43,0,137, +64,31,88,14,104,14,2,87,20,103,20,2,26,28,1,21,6,1,6,3,1,25,10,22,0,11,1, +11,11,3,39,71,17,184,255,192,64,56,8,11,72,17,31,70,30,30,3,70,4,34,80,217, +31,1,124,31,140,31,2,25,31,1,31,22,96,25,112,25,2,160,25,1,25,23,3,12,213, +3,1,112,3,128,3,2,21,3,101,3,2,3,0,80,9,10,0,47,221,237,51,93,93,93,51,63, +221,93,113,50,50,93,93,93,237,1,47,237,51,47,237,47,43,237,18,57,47,113,51, +205,50,49,48,0,93,93,93,93,93,1,50,54,55,23,14,3,7,21,35,53,46,3,53,52,62, +2,55,53,51,21,30,3,23,7,46,1,35,34,14,2,21,20,30,2,2,84,96,129,15,182,8,51, +88,126,83,124,111,154,95,43,66,111,146,80,124,78,120,86,54,12,185,14,114, +105,77,103,64,27,27,64,105,1,21,104,108,12,62,116,92,62,8,168,168,10,93,149, +195,113,150,206,131,63,7,155,155,8,55,85,109,63,14,90,106,51,103,156,105, +93,156,113,62,0,0,1,0,58,0,0,4,80,5,150,0,50,0,210,64,83,70,23,1,54,2,70, +2,2,21,18,37,18,53,18,3,36,0,39,13,6,26,111,25,25,39,0,44,110,6,35,39,110, +14,95,10,1,10,10,0,79,6,95,6,111,6,3,6,50,111,0,0,32,0,2,0,0,32,0,48,0,80, +0,112,0,144,0,176,0,208,0,8,0,0,16,0,48,0,192,0,224,0,5,0,184,255,192,64, +64,14,18,72,0,38,11,81,35,15,14,31,14,175,14,3,15,14,63,14,111,14,127,14, +159,14,175,14,207,14,223,14,8,8,14,64,37,42,72,14,64,27,32,72,14,14,44,31, +115,26,20,7,7,44,116,22,50,118,50,134,50,3,50,6,24,0,63,51,93,237,50,63,51, +237,18,57,47,43,43,94,93,113,51,237,50,1,47,43,93,113,114,237,47,93,18,57, +47,113,51,237,50,16,237,17,18,57,47,237,17,51,17,18,57,49,48,0,93,1,93,0, +93,1,14,3,35,33,53,62,1,61,1,35,53,51,17,52,62,2,51,50,30,2,23,7,46,3,35, +34,6,21,17,33,21,33,21,20,14,2,7,33,50,62,2,55,4,80,9,57,89,115,67,253,70, +89,86,186,186,48,99,152,103,70,123,99,71,18,174,10,39,53,65,36,114,112,1, +152,254,104,22,44,63,40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160, +121,144,129,1,24,92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,254,224, +129,126,56,106,92,71,21,19,42,67,48,0,0,0,2,0,113,0,225,4,2,4,115,0,35,0, +55,0,153,64,119,74,29,90,29,106,29,3,44,29,60,29,2,74,25,90,25,106,25,3,44, +25,60,25,2,69,11,85,11,101,11,3,35,11,51,11,2,69,7,85,7,101,7,3,35,7,51,7, +2,74,34,90,34,106,34,3,45,34,61,34,2,69,20,85,20,101,20,3,35,20,51,20,2,69, +16,85,16,101,16,3,35,16,51,16,2,74,2,90,2,106,2,3,45,2,61,2,2,46,176,18,36, +176,207,0,223,0,2,0,0,1,0,47,57,1,41,176,27,51,176,9,0,47,237,220,237,1,93, +47,93,93,237,220,237,49,48,93,93,93,93,93,93,93,93,0,93,93,93,93,93,93,93, +93,19,52,54,55,39,55,23,62,1,51,50,22,23,55,23,7,30,1,21,20,6,7,23,7,39,14, +1,35,34,38,39,7,39,55,46,1,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,137, +41,37,100,104,99,54,127,73,71,126,54,97,104,96,37,43,44,38,100,102,101,54, +126,71,72,128,52,105,102,102,37,41,154,44,77,102,58,57,102,77,44,44,77,102, +57,58,102,77,44,2,172,71,127,54,100,103,101,39,43,42,38,97,105,96,54,127, +71,71,128,53,100,105,101,37,41,42,38,105,105,102,54,127,73,58,102,76,44,44, +76,102,58,58,102,76,45,45,76,102,0,1,255,254,0,0,4,118,5,129,0,22,0,185,64, +134,151,0,167,0,2,152,17,168,17,2,73,22,1,70,18,1,155,21,171,21,2,74,21,106, +21,122,21,138,21,4,148,19,164,19,2,69,19,101,19,117,19,133,19,4,19,15,18, +31,18,79,18,143,18,4,18,9,21,0,22,16,22,64,22,128,22,4,22,20,4,0,8,92,17, +13,0,9,16,9,64,9,128,9,4,7,9,3,15,81,16,7,11,81,4,47,12,159,12,175,12,3,12, +64,41,45,72,0,12,16,12,32,12,160,12,4,12,20,0,0,16,1,15,16,175,16,2,8,16, +16,8,21,18,3,8,18,0,63,63,51,18,57,47,94,93,113,51,51,222,93,43,113,50,237, +50,16,237,50,1,47,94,93,51,51,253,50,50,57,204,93,50,16,204,93,50,49,48,93, +93,93,93,93,93,93,93,1,33,21,33,21,33,21,33,17,35,17,33,53,33,55,33,53,33, +1,51,9,1,51,2,208,1,65,254,129,1,127,254,129,178,254,131,1,125,2,254,129, +1,64,254,91,199,1,115,1,119,199,2,197,125,154,127,254,209,1,47,127,154,125, +2,188,253,121,2,135,0,2,0,183,254,78,1,93,5,204,0,3,0,7,1,221,64,23,3,7,171, +0,6,4,1,11,4,4,8,9,214,9,230,9,246,9,3,194,9,1,9,184,255,128,179,226,229, +72,9,184,255,192,64,10,222,225,72,2,9,18,9,2,218,9,184,255,128,179,214,217, +72,9,184,255,192,64,20,210,213,72,180,9,196,9,2,162,9,1,1,112,9,128,9,144, +9,3,9,184,255,192,64,20,199,202,72,0,9,1,240,9,1,212,9,228,9,2,176,9,192, +9,2,9,184,255,192,64,43,187,190,72,48,9,64,9,80,9,3,4,9,20,9,36,9,3,240,9, +1,196,9,212,9,228,9,3,128,9,144,9,160,9,3,4,9,20,9,36,9,3,164,9,184,255,192, +179,168,171,72,9,184,255,128,179,160,163,72,9,184,255,192,64,14,156,159,72, +112,9,128,9,144,9,3,228,9,1,9,184,255,192,64,11,145,148,72,176,9,192,9,208, +9,3,9,184,255,192,64,15,133,136,72,48,9,1,20,9,36,9,2,0,9,1,9,184,255,192, +64,15,122,125,72,128,9,1,4,9,20,9,36,9,3,110,9,184,255,192,64,10,114,117, +72,192,9,1,84,9,1,9,184,255,192,182,102,105,72,16,9,1,9,184,255,192,64,9, +91,94,72,80,9,96,9,2,9,184,255,192,64,15,79,82,72,203,9,219,9,2,160,9,176, +9,2,2,9,184,255,192,64,10,68,71,72,15,9,31,9,2,62,9,184,255,192,64,29,56, +61,72,207,9,1,96,9,112,9,160,9,176,9,4,31,9,1,0,9,1,160,9,224,9,240,9,3,9, +184,255,192,64,33,25,28,72,9,64,17,21,72,64,9,112,9,128,9,144,9,4,15,9,31, +9,47,9,3,7,5,0,5,0,1,4,1,0,0,63,47,18,57,57,47,47,1,94,93,93,43,43,113,114, +114,114,114,43,94,93,43,95,93,93,43,113,43,114,43,114,114,43,94,93,93,43, +113,113,113,43,113,43,113,114,43,43,43,94,93,93,93,93,113,113,43,113,113, +113,114,43,114,95,114,114,43,43,94,93,43,43,93,93,17,18,57,47,94,93,51,237, +50,49,48,19,17,51,17,3,17,51,17,183,166,166,166,2,194,3,10,252,246,251,140, +3,11,252,245,0,0,0,0,2,0,115,255,84,4,0,5,204,0,77,0,97,1,79,64,144,117,47, +133,47,2,122,8,138,8,2,100,85,1,43,85,107,85,2,45,81,109,81,2,45,57,109,57, +125,57,141,57,4,85,96,117,96,133,96,3,83,62,115,62,131,62,3,83,90,115,90, +131,90,3,121,80,137,80,2,111,80,1,90,80,1,45,80,1,116,16,132,16,2,54,16,70, +16,2,42,73,1,37,42,1,37,45,1,43,3,1,25,3,1,5,31,21,31,2,5,36,21,36,2,11,76, +27,76,2,14,73,75,34,73,55,144,75,1,75,55,75,55,78,70,29,65,24,6,73,5,5,24, +73,160,78,1,0,78,32,78,64,78,144,78,4,78,184,255,192,179,29,33,72,78,184, +255,192,64,18,21,26,72,78,45,73,44,44,88,73,0,65,32,65,176,65,3,65,184,255, +192,64,68,34,38,72,65,217,55,1,203,55,1,188,55,1,152,55,1,245,3,1,230,3,1, +149,3,1,121,83,1,106,83,1,218,83,1,155,83,1,228,14,244,14,2,166,14,1,119, +14,135,14,2,104,14,1,14,83,93,55,4,0,50,81,45,39,11,81,6,0,0,0,63,50,237, +47,51,237,18,23,57,93,93,93,93,93,93,113,113,93,93,93,93,93,93,93,1,47,43, +93,237,51,47,237,47,43,43,93,113,237,50,16,237,17,18,57,57,17,57,57,47,47, +114,16,237,16,237,49,48,93,93,93,93,93,0,93,93,1,93,0,93,93,93,93,93,93,93, +93,93,93,93,93,1,93,93,93,1,50,30,2,23,7,46,3,35,34,6,21,20,30,2,23,30,3, +21,20,14,2,7,30,3,21,20,14,2,35,34,46,2,39,55,30,3,51,50,62,2,53,52,46,2, +39,46,3,53,52,62,2,55,46,3,53,52,54,1,52,46,2,39,14,3,21,20,30,2,23,62,3, +2,76,79,138,108,73,15,161,8,46,68,84,46,125,129,50,83,109,59,68,139,112,70, +28,55,82,54,49,79,55,30,58,112,164,107,93,154,117,79,19,161,12,54,78,100, +57,58,102,76,45,57,95,123,65,65,131,104,65,32,59,84,53,42,75,57,33,211,1, +225,53,88,113,61,58,89,60,31,49,82,108,60,54,93,68,39,5,204,30,63,98,69,20, +45,58,34,13,79,71,45,64,46,32,14,16,46,73,106,76,45,87,73,55,13,21,51,64, +81,51,73,117,83,44,27,64,104,77,31,55,67,37,13,18,40,65,47,54,72,51,36,16, +15,46,73,105,74,45,83,71,53,15,14,46,64,80,48,139,155,252,203,48,69,51,35, +14,3,33,52,69,39,46,66,48,34,15,1,24,47,70,0,0,0,0,2,0,45,4,195,2,90,5,123, +0,3,0,7,0,193,178,3,133,0,184,255,192,179,19,22,72,0,184,255,192,64,131,13, +16,72,0,7,133,4,64,19,22,72,4,64,14,17,72,4,1,5,145,0,59,4,1,45,4,1,11,4, +27,4,2,57,253,4,1,235,4,1,219,4,1,201,4,1,171,4,187,4,2,153,4,1,141,4,1,1, +4,128,44,48,72,27,4,43,4,2,15,4,1,235,4,251,4,2,191,4,207,4,223,4,3,171,4, +1,159,4,1,123,4,139,4,2,111,4,1,91,4,1,79,4,1,59,4,1,31,4,47,4,2,2,15,4,63, +4,175,4,191,4,4,4,64,22,25,72,4,64,14,17,72,4,0,47,43,43,93,95,113,113,113, +113,113,113,113,113,113,113,114,114,43,95,114,114,114,114,114,114,114,94, +93,93,93,51,237,50,1,47,43,43,237,220,43,43,237,49,48,1,53,51,21,33,53,51, +21,1,183,163,253,211,165,4,195,184,184,184,184,0,0,0,0,3,0,31,255,240,5,197, +5,150,0,25,0,49,0,91,0,245,64,111,138,81,1,10,73,26,73,42,73,3,10,69,26,69, +42,69,3,76,60,1,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,138, +90,154,90,2,53,81,69,81,2,58,61,1,133,52,149,52,2,54,46,70,46,2,54,41,70, +41,2,57,35,73,35,2,57,30,73,30,2,50,196,81,61,95,71,111,71,2,71,61,71,61, +14,0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,68, +15,23,72,26,38,195,111,14,127,14,2,14,60,55,201,66,87,201,76,82,76,15,66, +127,66,2,15,66,31,66,127,66,143,66,159,66,255,66,6,0,76,1,0,76,16,76,112, +76,128,76,144,76,240,76,6,66,76,66,76,7,33,200,21,4,43,200,7,19,0,63,237, +63,237,18,57,57,47,47,93,113,93,113,17,51,16,237,16,237,51,1,47,113,237,47, +43,93,113,237,17,57,57,47,47,93,17,51,237,49,48,0,93,93,93,93,93,93,93,93, +1,93,93,93,93,113,93,93,113,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18, +7,52,46,4,35,34,14,2,21,20,30,2,51,50,62,4,37,20,30,2,51,50,62,2,55,23,14, +3,35,34,46,2,53,52,62,2,51,50,30,2,23,7,46,3,35,34,14,2,5,197,52,94,131,161, +185,100,99,185,160,133,94,52,52,94,132,161,184,100,150,1,7,197,113,92,45, +82,116,140,161,87,130,228,171,99,99,171,228,130,87,161,140,116,82,45,252, +137,33,67,100,67,49,75,56,39,14,115,22,58,82,111,75,101,149,98,48,48,97,146, +98,75,112,80,55,18,114,12,38,55,72,47,69,99,64,30,2,195,100,185,161,131,94, +52,52,94,131,161,185,100,100,184,161,132,94,52,114,196,254,249,150,86,161, +139,115,82,45,99,171,228,130,131,229,171,98,45,81,115,140,161,89,72,120,86, +48,27,45,55,29,35,43,81,63,38,64,114,158,94,97,157,111,59,36,59,75,39,33, +26,50,38,23,46,83,118,0,2,0,26,2,139,2,253,5,152,0,50,0,65,0,203,64,21,45, +40,10,17,72,46,40,10,17,72,3,40,11,17,72,7,24,11,14,72,29,184,255,216,64, +16,9,17,72,23,51,1,39,39,32,226,47,11,212,56,1,56,184,255,192,64,18,19,22, +72,144,56,1,100,56,116,56,132,56,3,80,56,1,2,56,184,255,192,64,20,10,13,72, +56,20,227,21,21,63,227,5,64,22,38,72,5,192,67,1,67,184,255,192,64,51,13,18, +72,26,57,1,11,57,1,57,228,152,20,1,20,8,10,13,72,20,16,11,1,2,11,1,11,11, +26,35,7,51,1,51,228,0,42,42,0,0,32,0,80,0,3,0,0,17,228,26,222,0,63,237,51, +47,93,51,47,16,237,93,50,17,57,47,93,93,51,43,93,237,93,93,1,43,93,47,43, +237,51,47,237,47,43,95,93,93,93,43,113,51,51,237,50,47,0,93,49,48,1,43,43, +43,43,43,1,34,46,2,53,52,62,2,63,1,53,52,46,2,35,34,6,7,39,62,3,51,50,30, +2,21,17,20,22,51,50,54,55,21,14,1,35,34,46,2,39,35,14,1,39,50,62,2,61,1,7, +14,3,21,20,22,1,4,53,86,62,33,51,86,113,62,178,21,39,56,35,67,81,9,149,7, +43,75,108,71,68,109,77,42,28,35,12,22,9,19,42,22,41,57,38,20,2,4,38,132,51, +48,80,57,32,138,41,74,55,32,58,2,139,29,56,82,52,69,92,56,24,1,4,60,46,60, +35,14,59,76,10,47,82,62,35,29,60,95,66,254,204,58,50,5,3,104,5,8,22,39,51, +29,77,70,111,34,55,71,37,65,4,2,11,29,52,43,56,65,0,0,2,0,83,0,141,4,32,3, +172,0,8,0,17,0,113,64,84,106,12,122,12,138,12,3,106,9,122,9,138,9,3,106,3, +122,3,138,3,3,106,0,122,0,138,0,3,17,236,15,235,14,236,95,10,127,10,143,10, +3,64,10,96,10,2,31,10,1,10,7,236,6,235,5,236,176,1,1,95,1,1,32,1,96,1,128, +1,3,1,9,0,239,12,15,3,47,3,111,3,127,3,4,3,0,47,93,51,228,50,1,47,93,113, +113,237,237,237,47,93,93,113,237,237,237,49,48,93,93,93,93,37,1,53,1,51,21, +9,1,21,33,1,53,1,51,21,9,1,21,3,118,254,174,1,82,168,254,174,1,84,253,131, +254,176,1,80,167,254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,1, +109,63,1,115,31,254,140,254,145,29,0,1,0,100,0,180,4,71,2,242,0,5,0,51,64, +19,223,2,1,32,2,1,2,5,170,224,0,1,159,0,1,80,0,1,0,184,255,192,64,9,9,12, +72,0,2,173,0,3,179,0,63,204,237,1,47,43,93,93,93,237,47,93,93,49,48,37,17, +33,53,33,17,3,182,252,174,3,227,180,1,172,146,253,194,0,0,4,0,31,255,240, +5,197,5,150,0,25,0,49,0,63,0,72,0,240,183,4,61,20,61,36,61,3,58,184,255,224, +64,94,11,16,72,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,61, +32,9,13,72,54,46,70,46,2,54,41,70,41,2,57,35,73,35,2,57,30,73,30,2,6,69,22, +69,2,51,62,62,69,63,69,53,196,54,64,196,59,59,50,63,63,16,54,63,54,63,14, +0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,60,15, +23,72,26,38,195,111,14,127,14,2,14,50,50,54,62,52,201,69,9,68,25,68,2,68, +201,55,15,54,31,54,127,54,3,223,55,1,0,55,16,55,112,55,3,54,69,55,55,69,54, +3,7,33,200,21,4,43,200,7,19,0,63,237,63,237,18,23,57,47,47,47,93,113,93,16, +237,93,16,237,50,17,51,47,1,47,113,237,47,43,93,113,237,17,57,57,47,47,56, +17,51,51,47,237,16,237,50,17,18,57,17,51,0,93,49,48,93,93,93,93,43,1,93,93, +93,93,43,93,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18,7,52,46,4,35,34, +14,2,21,20,30,2,51,50,62,4,1,3,35,17,35,17,33,50,22,21,20,6,7,19,3,52,38, +43,1,17,51,50,54,5,197,52,94,131,161,185,100,99,185,160,133,94,52,52,94,132, +161,184,100,150,1,7,197,113,92,45,82,116,140,161,87,130,228,171,99,99,171, +228,130,87,161,140,116,82,45,254,82,199,161,127,1,51,142,151,104,85,221,159, +95,81,170,182,80,84,2,195,100,185,161,131,94,52,52,94,131,161,185,100,100, +184,161,132,94,52,114,196,254,249,150,86,161,139,115,82,45,99,171,228,130, +131,229,171,98,45,81,115,140,161,254,181,1,80,254,176,3,63,126,111,102,123, +19,254,162,2,80,69,72,254,211,85,0,0,1,255,239,5,172,4,124,6,10,0,3,0,14, +180,1,0,2,140,1,0,47,237,1,47,47,49,48,1,33,53,33,4,124,251,115,4,141,5,172, +94,0,0,0,0,2,0,122,3,92,2,184,5,150,0,19,0,39,0,66,185,0,17,255,232,179,9, +12,72,13,184,255,232,64,33,9,12,72,7,24,9,12,72,3,24,9,12,72,20,172,0,30, +172,0,10,16,10,32,10,3,10,35,175,5,25,175,15,4,0,63,237,220,237,1,47,93,237, +220,237,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7, +52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,184,45,78,105,59,59,104,78,46, +46,78,104,59,59,105,78,45,109,27,48,65,38,37,65,48,28,28,48,65,37,38,65,48, +27,4,121,59,104,77,45,45,77,104,59,60,104,77,44,44,77,104,60,37,66,49,28, +28,49,66,37,37,65,49,29,29,49,65,0,0,0,2,0,65,0,0,4,36,4,195,0,11,0,15,0, +85,64,53,13,222,4,1,140,4,1,4,2,14,209,11,1,131,11,1,11,9,1,170,6,32,2,1, +2,13,173,12,151,2,1,2,0,4,173,9,152,7,1,7,239,5,1,80,5,128,5,160,5,208,5, +4,5,0,47,93,93,51,93,51,237,50,50,93,47,237,1,47,93,51,253,50,222,93,93,196, +16,222,93,93,196,49,48,1,17,35,17,33,53,33,17,51,17,33,21,1,53,33,21,2,124, +147,254,88,1,168,147,1,168,252,29,3,227,2,168,254,117,1,139,145,1,138,254, +118,145,253,88,145,145,0,0,1,0,41,2,51,2,131,5,141,0,34,0,142,64,56,6,18, +1,6,17,1,6,12,1,106,31,122,31,138,31,3,89,15,105,15,2,106,14,1,73,14,89,14, +2,10,3,26,3,2,10,2,26,2,58,2,74,2,4,58,17,90,17,106,17,3,6,23,22,23,2,23, +184,255,224,64,40,9,15,72,33,25,225,32,8,1,32,8,96,8,160,8,224,8,4,8,14,224, +15,15,32,191,0,1,0,8,32,14,11,228,20,222,1,32,229,0,223,0,63,237,50,63,237, +51,18,57,1,47,93,51,51,47,237,47,93,113,237,50,49,48,43,0,93,93,1,93,93,0, +93,93,93,93,1,113,113,113,19,39,62,5,53,52,38,35,34,6,7,39,62,3,51,50,30, +2,21,20,14,4,7,33,21,43,2,27,88,100,103,82,52,71,74,68,88,8,133,6,46,76,107, +68,65,103,71,37,54,83,102,95,78,18,1,187,2,51,103,61,96,81,72,73,80,49,62, +75,73,68,8,51,87,64,37,33,60,86,54,62,100,86,75,73,74,42,113,0,0,1,0,27,2, +39,2,130,5,141,0,53,0,150,64,17,102,6,1,102,8,1,86,9,102,9,2,89,34,105,34, +2,42,184,255,232,64,80,11,15,72,2,32,9,13,72,48,45,21,21,15,8,28,225,45,45, +0,225,32,15,96,15,2,32,15,96,15,160,15,224,15,4,15,34,225,8,35,1,35,35,9, +225,191,8,1,8,64,24,37,72,8,49,21,228,22,22,12,105,34,1,72,34,88,34,2,34, +31,228,40,222,12,228,71,9,1,9,3,221,0,63,51,93,237,63,237,51,93,93,18,57, +47,237,57,1,47,43,93,237,51,47,113,237,47,93,113,237,50,47,237,17,18,57,47, +18,57,49,48,0,43,43,93,93,93,93,1,20,6,35,34,46,2,39,55,30,1,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,6, +7,21,30,3,2,130,155,142,87,116,73,36,6,136,9,88,85,77,83,37,56,67,29,61,57, +29,61,50,32,74,71,68,84,6,135,7,50,79,102,59,69,104,70,35,86,90,52,75,48, +22,3,27,116,128,39,64,81,43,13,67,69,72,76,45,54,29,9,109,13,31,53,40,60, +69,70,65,12,58,86,57,28,33,59,79,46,75,110,20,2,5,37,54,69,0,0,1,0,72,4,177, +1,240,5,228,0,5,0,55,64,37,70,4,1,122,2,138,2,2,128,3,1,3,64,143,0,1,0,64, +9,13,72,0,2,149,128,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,26,237,1,47,43, +93,26,205,93,49,48,93,93,19,53,19,51,21,1,72,217,207,254,182,4,177,20,1,31, +29,254,234,0,1,0,140,254,87,4,109,4,58,0,39,0,136,64,74,29,32,9,17,72,138, +37,154,37,2,108,37,124,37,2,37,24,14,17,72,22,22,13,70,64,31,79,12,1,127, +12,143,12,159,12,3,12,64,32,35,72,12,64,20,23,72,0,12,1,12,41,128,39,2,70, +0,1,16,1,48,1,224,1,240,1,5,8,1,96,41,128,41,2,41,184,255,192,64,17,20,23, +72,31,8,80,35,22,19,80,26,22,12,1,15,0,27,0,63,63,51,63,237,63,237,50,1,43, +93,47,94,93,237,50,26,16,220,93,43,43,93,113,50,26,237,50,47,49,48,43,0,93, +93,1,43,19,17,51,17,20,30,2,51,50,54,53,17,51,17,20,30,2,51,50,54,55,21,14, +1,35,34,46,2,39,35,14,1,35,34,38,39,17,140,181,32,58,84,52,128,146,180,11, +20,29,18,11,32,11,26,51,36,54,71,44,20,2,3,52,147,100,67,109,31,254,87,5, +227,253,82,78,106,65,28,174,162,2,115,252,208,44,56,32,13,5,3,129,8,12,30, +52,71,41,95,99,41,38,254,28,0,0,0,0,1,0,80,254,248,3,245,5,129,0,19,0,61, +64,39,12,1,15,2,191,2,207,2,3,2,5,95,6,111,6,127,6,175,6,191,6,5,0,6,16,6, +48,6,3,6,7,7,1,0,4,17,3,6,1,0,47,51,63,205,50,18,57,47,1,47,93,93,205,220, +93,205,47,49,48,1,17,35,17,35,17,35,17,34,46,2,53,52,62,2,51,33,21,3,116, +112,217,113,80,133,96,53,50,95,138,87,2,51,5,27,249,221,6,35,249,221,3,190, +45,88,133,89,84,133,93,50,102,0,0,1,0,187,1,190,1,126,2,154,0,3,0,38,64,24, +3,150,0,0,16,0,176,0,3,7,0,0,155,15,1,31,1,2,1,64,15,38,72,1,0,47,43,93,237, +1,47,94,93,237,49,48,19,53,51,21,187,195,1,190,220,220,0,0,0,1,0,119,254, +78,1,227,0,0,0,27,0,126,64,16,24,32,20,23,72,25,32,20,23,72,70,26,86,26,2, +2,184,255,232,179,9,17,72,27,184,255,224,64,62,9,17,72,24,16,25,32,25,48, +25,3,25,131,23,22,22,8,16,131,47,0,1,31,0,1,15,0,111,0,2,8,0,239,8,1,8,19, +25,64,9,13,72,25,25,5,23,11,140,32,5,80,5,96,5,112,5,176,5,192,5,6,5,0,47, +93,237,47,18,57,47,43,205,1,47,93,221,94,93,113,114,237,18,57,47,51,237,93, +50,49,48,43,43,93,43,43,5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35, +42,1,7,55,51,7,30,1,1,227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14, +29,14,65,107,39,94,94,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,182,100, +3,81,0,0,1,0,80,2,51,2,125,5,129,0,10,0,75,64,44,32,5,48,5,2,96,9,1,9,9,8, +224,2,32,4,48,4,2,4,111,0,1,0,0,4,6,3,32,2,144,2,2,2,5,4,4,3,6,220,8,1,228, +0,223,0,63,237,50,63,51,51,47,51,1,47,93,23,51,47,93,47,0,93,1,16,237,50, +47,93,49,48,0,93,19,53,51,17,7,53,55,51,17,51,21,80,211,202,210,123,215,2, +51,107,2,108,138,120,137,253,29,107,0,0,0,0,2,0,27,2,139,2,211,5,152,0,15, +0,35,0,130,185,0,13,255,232,179,7,12,72,9,184,255,224,64,43,7,12,72,4,32, +7,12,72,2,32,7,12,72,0,227,4,16,36,16,52,16,100,16,4,148,16,180,16,196,16, +212,16,244,16,5,128,16,1,2,0,16,1,16,184,255,192,64,38,12,16,72,16,26,227, +6,64,22,33,72,6,239,37,1,112,37,128,37,2,47,37,1,31,228,0,3,32,3,80,3,3,3, +3,21,228,11,222,0,63,237,51,47,93,237,1,93,93,93,47,43,237,47,43,93,95,93, +93,113,237,49,48,0,43,43,43,43,1,20,6,35,34,38,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,211,176,175,168,177,43,87,131,88, +93,131,84,39,149,25,50,72,48,48,75,51,26,28,51,70,43,49,75,52,27,4,18,188, +203,201,190,91,145,101,53,53,100,145,92,83,110,65,27,27,66,110,82,84,110, +66,26,26,66,110,0,2,0,83,0,141,4,32,3,172,0,8,0,17,0,133,64,100,101,15,117, +15,133,15,3,101,9,117,9,133,9,3,101,6,117,6,133,6,3,101,0,117,0,133,0,3,13, +236,10,236,17,235,15,12,1,239,12,1,112,12,128,12,2,208,12,1,63,12,111,12, +127,12,3,0,12,1,12,4,236,1,236,8,235,112,3,128,3,176,3,3,176,3,208,3,2,63, +3,1,0,3,32,3,2,3,10,0,239,14,15,5,47,5,111,5,127,5,4,5,0,47,93,51,228,50, +1,47,93,93,93,113,253,237,237,47,93,93,93,113,113,114,253,237,237,49,48,93, +93,93,93,37,35,53,9,1,53,51,1,21,1,35,53,9,1,53,51,1,21,2,206,168,1,82,254, +176,166,1,82,252,221,170,1,82,254,176,168,1,79,141,29,1,111,1,116,31,254, +141,63,254,147,29,1,111,1,116,31,254,141,63,255,255,0,56,0,0,6,78,5,129,16, +38,0,121,232,0,16,39,2,20,2,249,0,0,17,7,2,141,3,184,253,207,0,31,64,18,1, +191,12,1,112,12,1,96,12,1,16,12,1,12,3,2,17,24,0,63,53,53,1,17,93,93,93,93, +53,0,0,0,255,255,0,56,0,0,6,117,5,129,16,38,0,121,232,0,16,39,2,20,2,249, +0,0,17,7,0,114,3,242,253,207,0,47,64,30,2,111,15,1,47,15,1,15,1,191,12,1, +112,12,1,96,12,1,16,12,1,12,51,64,11,11,72,2,15,24,0,63,53,1,43,17,93,93, +93,93,53,17,93,93,53,0,0,0,255,255,0,73,0,0,6,78,5,141,16,39,2,20,3,13,0, +0,16,39,2,141,3,184,253,207,17,6,0,115,46,0,0,33,64,20,0,112,0,1,96,0,1,16, +0,1,0,83,64,11,11,72,1,2,6,24,0,63,53,53,1,43,17,93,93,93,53,0,0,2,0,131, +254,164,4,86,4,58,0,37,0,41,0,159,64,112,121,4,137,4,2,122,35,138,35,2,122, +36,138,36,2,84,26,100,26,2,58,6,74,6,122,6,138,6,4,10,72,9,9,176,39,192,39, +2,39,150,40,40,0,28,70,95,27,127,27,2,27,64,29,60,72,27,64,23,27,72,32,27, +1,27,19,70,0,64,29,60,72,0,64,23,27,72,0,64,13,17,72,32,0,1,0,32,43,1,19, +33,9,40,156,41,15,67,27,1,27,24,95,47,33,63,33,2,111,33,207,33,2,33,0,47, +93,113,237,51,93,63,253,206,17,57,1,93,47,93,43,43,43,237,47,93,43,43,93, +237,18,57,47,237,113,51,47,237,49,48,93,0,93,1,93,0,93,1,93,55,52,62,6,55, +51,14,7,21,20,30,2,51,50,54,55,23,14,3,35,34,46,2,1,21,35,53,131,37,62,79, +82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184,11,67, +121,179,122,114,178,123,64,2,113,195,50,71,108,85,67,60,58,68,83,55,69,104, +80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103,147,4,100, +201,201,0,0,0,255,255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,148,1,78,0, +0,0,21,180,2,21,5,38,2,184,255,225,180,22,25,4,7,37,1,43,53,0,43,53,0,255, +255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,149,1,219,0,0,0,19,64,11,2,21, +5,38,2,76,21,24,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,6,254,18, +38,0,36,0,0,17,7,2,150,1,96,0,0,0,19,64,11,2,22,5,38,2,0,27,21,4,7,37,1,43, +53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,7,6,18,38,0,36,0,0,17,7,2,153,1,94, +0,0,0,19,64,11,2,21,5,38,2,2,30,44,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0, +4,0,0,5,82,6,178,18,38,0,36,0,0,17,7,2,152,1,108,0,0,0,23,64,13,3,2,21,5, +38,3,2,4,25,23,4,7,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,4,0,0,5,82,6, +251,18,38,0,36,0,0,17,7,1,76,1,137,0,136,0,22,64,12,3,2,56,3,3,2,3,31,21, +4,7,37,1,43,53,53,0,63,53,53,0,2,0,24,0,0,7,168,5,129,0,15,0,26,0,136,64, +86,116,25,1,114,2,1,86,2,102,2,2,115,3,131,3,2,85,3,101,3,2,127,5,143,5,2, +109,5,1,92,5,1,25,5,41,5,2,0,7,1,11,7,11,7,0,16,14,32,14,2,14,2,25,3,17,3, +4,17,9,13,90,26,5,0,2,95,25,25,5,4,12,95,9,9,13,16,8,95,5,3,4,18,13,95,0, +18,0,63,237,63,63,237,50,18,57,47,237,17,18,57,47,237,1,47,51,51,237,50,51, +47,51,17,18,57,57,47,93,18,57,57,47,47,113,49,48,93,93,93,93,93,93,93,93, +93,33,17,33,3,35,1,33,21,33,17,33,21,33,17,33,21,1,35,14,5,7,3,33,3,201,253, +220,198,199,2,174,4,185,253,9,2,187,253,69,3,32,252,33,151,1,16,22,27,24, +18,2,217,1,222,1,156,254,100,5,129,156,254,60,154,254,21,156,4,238,3,35,50, +58,51,38,5,254,51,0,0,255,255,0,104,254,78,5,121,5,150,18,38,0,38,0,0,17, +7,0,120,1,254,0,0,0,11,182,1,58,48,40,26,16,37,1,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,240,18,38,0,40,0,0,17,7,2,148,1,63,0,0,0,21,180,1,12,5,38,1,184, +255,170,180,13,16,0,10,37,1,43,53,0,43,53,0,255,255,0,168,0,0,4,254,6,240, +18,38,0,40,0,0,17,7,2,149,1,223,0,0,0,19,64,11,1,12,5,38,1,40,12,15,0,10, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40,0,0,17, +7,2,150,1,119,0,0,0,21,180,1,13,5,38,1,184,255,239,180,18,12,0,10,37,1,43, +53,0,43,53,0,255,255,0,168,0,0,4,254,6,178,18,38,0,40,0,0,17,7,2,152,1,121, +0,0,0,25,182,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10,37,1,43,53,53,0,43, +53,53,0,255,255,0,9,0,0,1,177,6,240,18,38,0,44,0,0,17,6,2,148,159,0,0,21, +180,1,4,5,38,1,184,255,193,180,5,8,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0, +142,0,0,2,54,6,240,18,38,0,44,0,0,17,6,2,149,70,0,0,19,64,11,1,4,5,38,1,69, +4,7,0,2,37,1,43,53,0,43,53,0,255,255,255,210,0,0,2,104,6,254,18,38,0,44,0, +0,17,6,2,150,210,0,0,19,64,11,1,5,5,38,1,0,10,4,0,2,37,1,43,53,0,43,53,0, +255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218,0,0,23,64,13,2,1, +4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,2,0,14,0,0,5,101,5,129, +0,16,0,33,0,112,64,69,117,10,1,91,32,139,32,2,91,31,139,31,2,90,20,138,20, +2,91,19,1,10,31,26,31,2,10,20,26,20,2,26,26,28,8,90,64,15,17,1,17,35,128, +24,28,90,14,16,16,1,14,27,16,95,24,127,0,1,0,0,2,28,95,14,18,23,95,2,3,0, +63,237,63,237,17,57,47,113,51,237,50,1,47,51,51,47,16,237,50,26,16,220,113, +26,237,18,57,47,49,48,93,93,93,0,93,1,93,93,0,93,19,51,17,33,50,4,22,18,21, +20,2,14,1,35,33,17,35,37,52,46,2,35,33,17,33,21,33,17,33,50,62,2,14,154,1, +210,163,1,19,198,111,106,184,251,145,253,241,154,4,151,82,148,206,123,254, +241,1,150,254,106,1,58,111,189,138,78,3,33,2,96,81,169,254,252,180,176,254, +243,181,93,2,135,72,143,203,130,61,254,57,154,254,18,72,142,212,0,255,255, +0,168,0,0,5,32,7,6,18,38,0,49,0,0,17,7,2,153,1,161,0,0,0,19,64,11,1,20,5, +38,1,12,29,43,8,18,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +240,18,38,0,50,0,0,17,7,2,148,1,182,0,0,0,21,180,2,40,5,38,2,184,255,216, +180,41,44,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255,236,5,215,6,240,18,38, +0,50,0,0,17,7,2,149,2,37,0,0,0,19,64,11,2,40,5,38,2,37,40,43,10,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6,254,18,38,0,50,0,0,17,7,2,150, +1,213,0,0,0,19,64,11,2,41,5,38,2,4,46,40,10,0,37,1,43,53,0,43,53,0,0,0,255, +255,0,97,255,236,5,215,7,6,18,38,0,50,0,0,17,7,2,153,1,193,0,0,0,21,180,2, +40,5,38,2,184,255,245,180,49,63,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255, +236,5,215,6,178,18,38,0,50,0,0,17,7,2,152,1,215,0,0,0,25,182,3,2,40,5,38, +3,2,184,255,255,180,44,42,10,0,37,1,43,53,53,0,43,53,53,0,0,1,0,142,0,225, +4,31,4,115,0,11,0,129,185,0,5,255,232,179,18,22,72,3,184,255,232,64,14,18, +22,72,11,24,18,22,72,9,24,18,22,72,8,184,255,232,179,18,22,72,6,184,255,232, +64,14,18,22,72,2,24,18,22,72,0,24,18,22,72,7,184,255,232,64,14,18,22,72,1, +24,18,22,72,10,24,18,22,72,4,184,255,232,64,23,18,22,72,212,4,228,4,2,180, +4,196,4,212,4,3,32,4,1,4,0,7,1,7,0,25,47,113,1,47,93,93,113,49,48,0,43,43, +1,43,43,43,43,43,43,0,43,43,43,43,19,9,1,55,9,1,23,9,1,7,9,1,142,1,98,254, +160,104,1,94,1,94,105,254,162,1,96,102,254,159,254,156,1,74,1,98,1,96,103, +254,159,1,95,105,254,164,254,160,105,1,97,254,157,0,3,0,71,255,203,5,244, +5,186,0,27,0,39,0,51,0,196,64,141,89,44,1,8,37,1,84,33,1,5,26,21,26,101,26, +3,139,23,1,123,22,139,22,2,108,22,1,90,22,1,105,16,1,10,12,26,12,2,132,9, +1,116,8,132,8,2,99,8,1,85,8,1,27,50,91,50,2,114,43,130,43,2,84,43,1,20,38, +84,38,2,85,37,1,140,31,1,74,31,90,31,122,31,3,4,21,20,21,100,21,3,11,7,27, +7,107,7,3,32,44,40,0,91,64,15,28,1,28,53,128,32,53,1,40,91,175,14,191,14, +2,32,14,1,15,14,31,14,2,14,43,31,35,47,95,23,19,4,35,95,9,5,19,0,63,51,237, +63,51,237,17,57,57,1,47,93,93,93,237,93,26,16,220,113,26,237,18,57,57,49, +48,0,93,93,93,93,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,1,20,2,6,4,35,34,38,39,7,35,55,38,2,53,52,18,54,36,51,50,22,23,55,51,7, +22,18,7,52,38,39,1,30,1,51,50,62,2,37,20,22,23,1,46,1,35,34,14,2,5,215,95, +180,254,252,165,127,206,81,120,190,200,88,86,92,178,1,5,169,125,207,82,121, +192,201,85,87,195,49,49,253,59,59,150,93,132,191,123,59,252,15,50,51,2,195, +59,151,92,126,190,127,63,2,199,165,254,242,192,104,58,54,145,241,97,1,10, +160,165,1,10,187,101,56,54,146,242,94,254,253,160,112,184,72,252,171,44,47, +86,153,212,125,113,190,75,3,85,42,46,80,148,208,0,0,255,255,0,158,255,236, +5,41,6,240,18,38,0,56,0,0,17,7,2,148,1,141,0,0,0,21,180,1,26,5,38,1,184,255, +232,180,27,30,5,20,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,6,240, +18,38,0,56,0,0,17,7,2,149,1,237,0,0,0,19,64,11,1,26,5,38,1,37,26,29,5,20, +37,1,43,53,0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,254,18,38,0,56,0,0, +17,7,2,150,1,152,0,0,0,19,64,11,1,27,5,38,1,0,32,26,5,20,37,1,43,53,0,43, +53,0,0,0,255,255,0,158,255,236,5,41,6,178,18,38,0,56,0,0,17,7,2,152,1,158, +0,0,0,25,182,2,1,26,5,38,2,1,184,255,254,180,30,28,5,20,37,1,43,53,53,0,43, +53,53,0,255,255,0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,149,1,208,0,0,0, +19,64,11,1,9,5,38,1,65,9,12,4,8,37,1,43,53,0,43,53,0,0,0,0,2,0,168,0,0,4, +234,5,129,0,16,0,27,0,95,64,63,150,15,1,116,26,132,26,2,123,18,139,18,2,0, +90,16,17,48,17,144,17,3,255,17,1,0,17,16,17,32,17,64,17,4,17,22,11,7,90,0, +8,16,8,64,8,3,7,8,22,95,6,21,95,11,6,11,6,11,7,9,3,7,18,0,63,63,18,57,57, +47,47,16,237,16,237,1,47,94,93,237,50,50,47,93,93,113,237,49,48,0,93,93,93, +1,20,14,2,35,33,17,35,17,51,21,33,50,30,2,7,52,38,35,33,17,33,50,62,2,4,234, +59,121,182,123,254,98,191,191,1,146,125,186,124,62,192,164,164,254,133,1, +131,82,121,79,38,2,223,88,159,120,71,254,215,5,129,252,60,111,156,99,134, +149,253,192,44,79,107,0,0,0,0,1,0,142,255,236,4,143,5,204,0,67,0,214,64,150, +149,51,1,133,63,149,63,2,133,47,149,47,2,133,46,149,46,2,118,65,1,118,56, +1,83,26,131,26,147,26,3,92,39,108,39,124,39,3,107,22,1,58,22,1,145,52,1,21, +52,37,52,2,22,66,38,66,118,66,3,26,3,42,3,2,61,72,24,54,72,31,32,24,1,31, +31,1,9,24,31,31,24,9,3,43,0,72,64,48,17,160,17,2,160,17,176,17,2,17,69,128, +42,70,0,43,16,43,48,43,3,8,43,112,69,1,63,69,79,69,2,212,31,1,197,31,1,182, +31,1,219,17,1,202,17,1,185,17,1,31,17,5,36,80,49,0,43,21,14,80,5,22,0,63, +237,63,63,237,18,57,57,93,93,93,93,93,93,1,93,93,47,94,93,237,26,16,220,93, +113,26,237,18,23,57,47,47,47,93,93,16,237,16,237,49,48,0,93,1,93,93,93,93, +93,0,93,93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,38,47,1,30,3,51,50,54,53, +52,46,4,53,52,62,4,53,52,46,2,35,34,14,2,21,17,35,17,52,62,2,51,50,30,2,21, +20,14,4,21,20,30,4,4,143,41,87,136,94,80,148,55,2,25,67,74,78,37,92,98,54, +81,95,81,54,33,49,58,49,33,33,63,90,57,68,107,73,39,180,63,120,174,110,102, +155,105,53,33,51,58,51,33,55,82,95,82,55,1,39,66,115,85,49,25,24,164,14,25, +19,11,86,79,56,77,62,57,73,98,73,51,73,58,48,52,63,43,37,62,45,26,35,77,122, +88,252,3,4,3,118,173,112,54,46,80,109,62,61,90,69,53,47,48,28,38,59,57,64, +85,114,0,0,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,67,0, +188,0,0,0,21,180,2,66,17,38,2,184,255,149,180,67,70,3,36,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,116,1,84,0,0, +0,19,64,11,2,66,17,38,2,11,66,69,3,36,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,115,5,211,18,38,0,68,0,0,17,7,1,71,0,218,0,0,0,21,180,2,67,17, +38,2,184,255,192,180,72,66,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236, +4,115,5,189,18,38,0,68,0,0,17,7,1,78,0,245,0,0,0,21,180,2,66,17,38,2,184, +255,224,180,75,89,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,115,5, +123,18,38,0,68,0,0,17,7,0,105,0,235,0,0,0,25,182,3,2,66,17,38,3,2,184,255, +202,180,70,68,3,36,37,1,43,53,53,0,43,53,53,0,255,255,0,87,255,236,4,115, +6,115,18,38,0,68,0,0,17,7,1,76,1,8,0,0,0,25,182,3,2,71,17,38,3,2,184,255, +200,180,76,66,3,36,37,1,43,53,53,0,43,53,53,0,0,3,0,66,255,236,6,194,4,78, +0,62,0,79,0,88,0,251,64,96,134,54,1,122,36,1,123,58,1,117,8,133,8,2,101,68, +117,68,133,68,3,124,86,1,106,86,1,126,81,1,106,81,1,101,4,117,4,2,41,47,1, +41,44,1,24,40,9,13,72,10,28,26,28,2,17,53,88,1,70,33,31,79,79,79,95,79,127, +79,4,79,79,80,25,9,73,10,10,61,71,64,31,80,47,80,63,80,3,144,80,1,80,90,128, +44,71,45,184,255,192,64,19,21,28,72,45,45,71,71,25,64,12,15,72,25,62,80,80, +80,6,53,184,255,184,64,43,17,73,53,83,80,56,16,63,81,33,33,74,50,143,44,1, +43,44,1,44,44,39,80,50,16,17,74,80,22,22,6,80,15,239,9,1,128,9,1,9,9,15,22, +0,63,51,47,93,93,16,237,63,237,50,63,237,51,47,93,93,17,18,57,47,237,63,237, +50,43,18,57,47,237,1,47,43,237,51,47,43,237,26,16,220,93,113,26,237,50,47, +237,17,18,57,47,93,51,237,50,57,57,49,48,93,43,0,93,93,1,93,0,93,93,93,93, +1,93,0,93,1,93,0,93,93,1,21,30,3,51,50,54,55,23,14,3,35,32,3,14,3,35,34,38, +53,52,62,4,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,23,62,1,51,50,30, +2,29,1,37,7,14,5,21,20,22,51,50,62,2,53,37,46,1,35,34,14,2,7,3,200,1,34,70, +109,78,117,141,25,158,17,61,102,153,108,254,191,102,29,74,102,137,93,167, +169,38,67,91,107,117,60,240,26,57,88,61,54,88,64,39,7,188,10,58,105,159,112, +128,172,49,63,177,106,136,183,111,47,252,80,195,40,81,76,66,49,28,100,93, +90,129,83,40,2,246,15,144,135,45,96,81,54,4,1,247,17,82,136,98,55,94,72,45, +45,91,73,47,1,1,51,93,71,42,172,150,71,108,78,51,32,13,1,4,59,67,94,58,27, +15,39,67,51,17,64,107,78,43,70,69,74,65,88,155,210,122,24,31,4,1,6,18,31, +51,73,51,87,97,63,98,116,53,196,171,157,29,74,127,98,255,255,0,87,254,78, +3,202,4,78,18,38,0,70,0,0,17,7,0,120,1,12,0,0,0,11,182,1,40,48,40,19,9,37, +1,43,53,0,0,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,67,0, +221,0,0,0,21,180,2,38,17,38,2,184,255,228,180,39,42,17,27,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,116,1,112,0,0, +0,19,64,11,2,38,17,38,2,84,38,41,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,24,5,211,18,38,0,72,0,0,17,7,1,71,0,245,0,0,0,19,64,11,2,39, +17,38,2,8,44,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,24, +5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3,2,4,42, +40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,10,0,0,1,178,5,228,18,38, +0,241,0,0,17,6,0,67,160,0,0,21,180,1,4,17,38,1,184,255,194,180,5,8,0,2,37, +1,43,53,0,43,53,0,0,0,255,255,0,135,0,0,2,47,5,228,18,38,0,241,0,0,17,6,0, +116,63,0,0,19,64,11,1,4,17,38,1,63,4,7,0,2,37,1,43,53,0,43,53,0,255,255,255, +211,0,0,2,105,5,211,18,38,0,241,0,0,17,6,1,71,211,0,0,19,64,11,1,5,17,38, +1,2,10,4,0,2,37,1,43,53,0,43,53,0,255,255,0,8,0,0,2,53,5,123,18,38,0,241, +0,0,17,6,0,105,219,0,0,23,64,13,2,1,4,17,38,2,1,2,8,6,0,2,37,1,43,53,53,0, +43,53,53,0,0,2,0,86,255,236,4,39,5,234,0,39,0,57,0,190,64,94,100,51,1,100, +56,1,107,42,1,107,48,1,10,14,26,14,2,37,17,53,17,69,17,3,6,8,22,8,2,23,26, +29,3,50,15,28,31,28,2,28,28,50,35,71,40,64,19,16,13,3,40,17,64,14,19,72,22, +5,17,17,5,144,40,1,144,40,160,40,2,40,59,128,50,71,31,5,1,5,26,19,29,16,4, +17,27,27,22,45,80,13,80,10,1,10,184,255,192,64,28,7,10,72,82,17,1,36,17,52, +17,68,17,3,2,17,18,17,2,10,17,10,17,22,0,53,80,0,22,0,63,237,63,57,57,47, +47,93,93,93,43,93,51,237,17,51,47,18,23,57,1,47,93,237,26,16,204,93,113,17, +57,47,18,57,43,18,23,57,26,16,237,17,57,47,93,18,23,57,49,48,0,93,93,1,93, +0,93,93,93,93,5,34,46,2,53,52,62,2,51,50,22,23,46,1,39,5,53,55,46,1,39,51, +30,1,23,37,15,1,30,3,29,1,20,14,2,19,52,46,2,35,34,14,2,21,20,22,51,50,62, +2,2,54,125,181,118,56,52,116,186,133,71,117,43,43,115,76,254,211,218,56,120, +66,209,45,83,42,1,50,1,211,81,129,88,47,57,120,188,176,33,71,113,80,81,115, +73,33,144,145,81,118,75,36,20,73,132,185,111,107,182,134,75,32,27,86,176, +69,133,114,94,45,78,35,20,51,31,132,112,92,74,176,200,223,121,6,122,196,138, +74,1,245,94,137,90,44,45,92,137,91,190,178,44,90,139,0,255,255,0,140,0,0, +3,242,5,189,18,38,0,81,4,0,17,7,1,78,0,245,0,0,0,19,64,11,1,38,17,38,1,5, +47,61,19,36,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,228,18,38, +0,82,0,0,17,7,0,67,0,223,0,0,0,21,180,2,35,17,38,2,184,255,228,180,36,39, +8,0,37,1,43,53,0,43,53,0,255,255,0,86,255,236,4,29,5,228,18,38,0,82,0,0,17, +7,0,116,1,103,0,0,0,19,64,11,2,35,17,38,2,73,35,38,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,86,255,236,4,29,5,211,18,38,0,82,0,0,17,7,1,71,0,240,0,0, +0,19,64,11,2,36,17,38,2,1,41,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86, +255,236,4,29,5,189,18,38,0,82,0,0,17,7,1,78,0,247,0,0,0,19,64,11,2,35,17, +38,2,13,44,58,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,123, +18,38,0,82,0,0,17,7,0,105,0,250,0,0,0,23,64,13,3,2,35,17,38,3,2,4,39,37,8, +0,37,1,43,53,53,0,43,53,53,0,0,0,0,3,0,65,0,223,4,36,4,117,0,3,0,7,0,11,0, +75,64,48,3,11,171,0,8,8,4,128,6,160,6,2,95,6,1,32,6,1,6,63,4,95,4,111,4,3, +4,9,174,64,8,144,8,2,8,4,173,5,0,174,79,1,159,1,2,1,5,179,0,63,222,93,237, +16,253,222,93,237,1,47,93,47,93,93,93,18,57,47,51,237,50,49,48,1,53,51,21, +1,53,33,21,1,53,51,21,1,222,168,253,187,3,227,253,186,168,3,190,183,183,254, +162,146,146,254,127,183,183,0,0,3,0,44,255,218,4,180,4,92,0,22,0,34,0,45, +0,161,64,93,117,33,133,33,2,117,27,133,27,2,122,38,138,38,2,122,44,138,44, +2,150,16,1,66,16,1,77,5,1,68,21,1,75,10,1,27,38,35,0,71,64,15,23,207,23,2, +159,23,175,23,255,23,3,23,47,128,35,71,0,12,1,0,12,16,12,32,12,64,12,240, +12,5,7,12,144,47,160,47,240,47,3,224,47,1,223,47,1,0,47,32,47,2,47,184,255, +192,64,16,13,21,72,37,26,30,41,80,18,14,16,30,80,7,3,22,0,63,51,237,63,51, +237,17,57,57,1,43,93,93,93,113,47,94,93,113,237,26,16,220,93,113,26,237,18, +57,57,49,48,93,93,0,93,93,93,93,1,93,93,0,93,1,16,2,35,34,38,39,7,35,55,46, +1,53,16,33,50,22,23,55,51,7,30,1,7,52,38,39,1,30,1,51,50,62,2,37,20,23,1, +46,1,35,34,14,2,4,88,250,238,97,156,60,100,167,184,41,42,1,229,103,156,57, +91,167,173,42,39,189,12,11,254,29,38,105,62,69,112,78,42,253,179,24,1,226, +37,104,66,69,111,78,41,2,30,254,228,254,234,48,50,116,214,68,182,116,2,48, +46,45,105,201,69,185,119,68,109,44,253,206,49,39,39,98,166,126,130,85,2,49, +45,36,41,99,164,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0, +67,0,236,0,0,0,21,180,1,38,17,38,1,184,255,236,180,39,42,36,19,37,1,43,53, +0,43,53,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0,116,1,87, +0,0,0,19,64,11,1,38,17,38,1,53,38,41,36,19,37,1,43,53,0,43,53,0,0,0,255,255, +0,139,255,236,3,241,5,211,18,38,0,88,6,0,17,7,1,71,0,239,0,0,0,21,180,1,39, +17,38,1,184,255,252,180,44,38,36,19,37,1,43,53,0,43,53,0,255,255,0,139,255, +236,3,241,5,123,18,38,0,88,6,0,17,7,0,105,0,237,0,0,0,25,182,2,1,38,17,38, +2,1,184,255,243,180,42,40,36,19,37,1,43,53,53,0,43,53,53,0,255,255,0,5,254, +87,3,252,5,228,18,38,0,92,0,0,17,7,0,116,1,27,0,0,0,19,64,11,1,32,17,38,1, +54,32,35,17,31,37,1,43,53,0,43,53,0,0,0,0,2,0,138,254,87,4,29,5,204,0,34, +0,54,0,109,64,76,102,52,118,52,2,105,38,121,38,2,73,25,89,25,2,70,10,86,10, +2,25,21,41,21,137,21,153,21,4,22,15,38,15,134,15,150,15,4,18,71,64,160,35, +1,35,56,128,45,7,33,70,0,34,16,34,48,34,240,34,4,8,34,33,27,26,50,80,23,22, +7,40,80,13,16,0,0,0,63,63,237,50,63,237,50,63,1,47,94,93,237,50,50,26,16, +220,93,26,237,49,48,0,93,93,93,93,93,93,19,51,17,20,6,7,6,7,51,62,3,51,50, +30,2,21,20,14,2,35,34,38,39,35,30,3,21,17,35,1,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,138,180,1,1,1,1,6,25,64,82,101,63,112,153,93,40,40,93,153,112, +116,174,46,5,1,1,1,1,180,2,214,24,59,98,74,60,106,79,46,38,73,108,70,75,99, +59,24,5,204,254,89,30,55,21,25,22,52,73,47,21,80,145,205,125,123,208,150, +85,88,100,2,32,48,59,29,254,89,3,199,100,156,108,56,34,96,169,135,115,159, +98,43,58,110,159,255,255,0,5,254,87,3,252,5,123,18,38,0,92,0,0,17,7,0,105, +0,187,0,0,0,25,182,2,1,32,17,38,2,1,184,255,254,180,36,34,17,31,37,1,43,53, +53,0,43,53,53,0,255,255,0,4,0,0,5,82,6,161,18,38,0,36,0,0,17,7,1,73,1,104, +1,78,0,19,64,11,2,21,5,38,2,2,22,21,4,7,37,1,43,53,0,43,53,0,0,0,255,255, +0,87,255,236,4,115,5,83,18,38,0,68,0,0,17,7,1,73,0,233,0,0,0,21,180,2,66, +17,38,2,184,255,202,180,67,66,3,36,37,1,43,53,0,43,53,0,255,255,0,4,0,0,5, +82,6,243,18,38,0,36,0,0,17,7,2,155,1,121,0,0,0,19,64,11,2,21,5,38,2,3,26, +34,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,115,5,230,18,38,0, +68,0,0,17,7,1,74,1,7,0,0,0,21,180,2,66,17,38,2,184,255,204,180,71,83,3,36, +37,1,43,53,0,43,53,0,255,255,0,4,254,96,5,99,5,129,18,38,0,36,0,0,17,7,1, +77,3,181,0,11,0,13,185,0,2,255,207,180,33,33,7,7,37,43,53,0,255,255,0,87, +254,85,4,115,4,78,18,38,0,68,0,0,17,7,1,77,2,197,0,0,0,13,185,0,2,255,194, +180,78,78,36,36,37,43,53,0,255,255,0,104,255,236,5,121,6,240,18,38,0,38,0, +0,17,7,2,149,2,83,0,0,0,19,64,11,1,40,5,38,1,126,40,43,26,16,37,1,43,53,0, +43,53,0,0,0,255,255,0,87,255,236,3,202,5,228,18,38,0,70,0,0,17,7,0,116,1, +103,0,0,0,19,64,11,1,40,17,38,1,114,40,43,19,9,37,1,43,53,0,43,53,0,0,0,255, +255,0,104,255,236,5,121,6,254,18,38,0,38,0,0,17,7,2,150,1,204,0,0,0,19,64, +11,1,41,5,38,1,38,46,40,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236, +3,202,5,211,18,38,0,70,0,0,17,7,1,71,0,208,0,0,0,19,64,11,1,41,17,38,1,10, +46,40,19,9,37,1,43,53,0,43,53,0,0,0,255,255,0,104,255,236,5,121,6,241,18, +38,0,38,0,0,17,7,1,75,2,34,1,37,0,19,64,11,1,40,5,38,1,39,40,42,26,16,37, +1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,204,18,38,0,70,0,0,17, +7,1,75,1,44,0,0,0,11,182,1,17,40,42,19,9,37,1,43,53,0,0,0,255,255,0,104,255, +236,5,121,6,254,18,38,0,38,0,0,17,7,2,151,1,204,0,0,0,19,64,11,1,40,5,38, +1,38,42,48,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,211, +18,38,0,70,0,0,17,7,1,72,0,214,0,0,0,19,64,11,1,40,17,38,1,16,42,48,19,9, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,5,101,6,254,18,38,0,39,0,0,17, +7,2,151,1,102,0,0,0,21,180,2,26,5,38,2,184,255,171,180,28,34,6,0,37,1,43, +53,0,43,53,0,255,255,0,86,255,236,4,255,5,204,16,38,0,71,0,0,17,7,2,146,3, +186,0,75,0,18,64,10,2,61,0,2,83,61,61,19,19,37,1,43,53,0,63,53,255,255,0, +14,0,0,5,101,5,129,18,6,0,144,0,0,0,2,0,86,255,236,4,109,5,204,0,39,0,59, +0,146,64,86,85,42,101,42,2,90,58,106,58,2,57,1,73,1,2,54,10,70,10,2,9,4,25, +4,121,4,137,4,4,6,7,22,7,118,7,134,7,4,25,27,70,64,20,6,0,21,50,3,18,61,128, +40,71,31,6,1,6,63,61,1,143,61,1,33,21,27,19,81,24,15,20,1,239,20,255,20,2, +20,20,8,22,0,11,55,80,8,184,255,192,64,10,9,13,72,8,16,0,45,80,3,22,0,63, +237,50,63,43,237,50,63,18,57,47,93,113,51,237,50,63,1,93,114,47,93,237,26, +16,220,23,50,17,57,26,237,50,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17, +16,33,50,22,23,51,52,46,1,52,61,1,33,53,33,53,51,21,51,21,35,17,20,30,2,23, +35,46,3,53,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,3,53,50,165,122,205, +193,1,142,123,164,50,2,1,1,254,212,1,44,180,132,132,1,2,2,1,172,2,3,3,2,253, +218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64,31,174,104,90,1,20,1,24, +2,54,90,98,10,43,47,42,9,141,131,147,147,131,252,41,39,72,60,43,9,10,37,48, +53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102,163,0,0,255, +255,0,168,0,0,4,254,6,161,18,38,0,40,0,0,17,7,1,73,1,122,1,78,0,21,180,1, +12,5,38,1,184,255,237,180,13,12,0,10,37,1,43,53,0,43,53,0,255,255,0,87,255, +236,4,24,5,83,18,38,0,72,0,0,17,7,1,73,0,245,0,0,0,19,64,11,2,38,17,38,2, +3,39,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,243,18,38, +0,40,0,0,17,7,2,155,1,137,0,0,0,21,180,1,12,5,38,1,184,255,235,180,17,25, +0,10,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,230,18,38,0,72,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,38,17,38,2,2,43,55,17,27,37,1,43,53,0,43, +53,0,0,0,255,255,0,168,0,0,4,254,6,241,18,38,0,40,0,0,17,7,1,75,1,201,1,37, +0,21,180,1,12,5,38,1,184,255,236,180,12,14,0,10,37,1,43,53,0,43,53,0,255, +255,0,87,255,236,4,24,5,204,18,38,0,72,0,0,17,7,1,75,1,68,0,0,0,12,182,2, +2,38,40,17,27,37,1,43,53,0,0,0,255,255,0,168,254,85,4,254,5,129,18,38,0,40, +0,0,17,7,1,77,3,80,0,0,0,13,185,0,1,255,194,180,24,24,11,11,37,43,53,0,255, +255,0,87,254,85,4,24,4,78,18,38,0,72,0,0,17,7,1,77,1,125,0,0,0,13,185,0,2, +254,242,180,50,50,9,9,37,43,53,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40, +0,0,17,7,2,151,1,111,0,0,0,21,180,1,12,5,38,1,184,255,231,180,14,20,0,10, +37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,211,18,38,0,72,0,0,17,7, +1,72,0,234,0,0,0,21,180,2,38,17,38,2,184,255,254,180,40,46,17,27,37,1,43, +53,0,43,53,0,255,255,0,103,255,236,5,160,6,254,18,38,0,42,0,0,17,7,2,150, +1,219,0,0,0,19,64,11,1,47,5,38,1,34,52,46,0,35,37,1,43,53,0,43,53,0,0,0,255, +255,0,86,254,87,3,239,5,211,18,38,0,74,0,0,17,7,1,71,0,216,0,0,0,19,64,11, +2,71,17,38,2,0,76,70,26,41,37,1,43,53,0,43,53,0,0,0,255,255,0,103,255,236, +5,160,6,243,18,38,0,42,0,0,17,7,2,155,1,246,0,0,0,19,64,11,1,46,5,38,1,39, +51,59,0,35,37,1,43,53,0,43,53,0,0,0,255,255,0,86,254,87,3,239,5,230,18,38, +0,74,0,0,17,7,1,74,0,249,0,0,0,19,64,11,2,70,17,38,2,0,75,87,26,41,37,1,43, +53,0,43,53,0,0,0,255,255,0,103,255,236,5,160,6,241,18,38,0,42,0,0,17,7,1, +75,2,53,1,37,0,19,64,11,1,46,5,38,1,39,46,48,0,35,37,1,43,53,0,43,53,0,0, +0,255,255,0,86,254,87,3,239,5,204,18,38,0,74,0,0,17,7,1,75,1,45,0,0,0,11, +182,2,0,70,72,26,41,37,1,43,53,0,0,0,255,255,0,103,254,78,5,160,5,150,18, +38,0,42,0,0,17,7,2,140,2,78,0,0,0,11,182,1,46,50,46,0,35,37,1,43,53,0,0,0, +255,255,0,86,254,87,3,239,6,32,16,38,0,74,0,0,17,7,2,147,1,56,0,0,0,21,180, +2,79,17,38,2,184,255,252,180,70,74,26,41,37,1,43,53,0,43,53,0,255,255,0,168, +0,0,5,32,6,254,18,38,0,43,0,0,17,7,2,150,1,153,0,0,0,19,64,11,1,13,5,38,1, +0,18,12,4,10,37,1,43,53,0,43,53,0,0,0,255,255,0,142,0,0,3,238,7,62,18,38, +0,75,0,0,17,7,2,150,0,242,0,64,0,21,180,1,35,2,38,1,184,255,255,180,40,34, +25,10,37,1,43,53,0,43,53,0,0,2,0,14,0,0,5,185,5,129,0,19,0,23,0,166,64,72, +23,11,3,90,8,7,4,4,20,4,2,7,4,16,15,19,90,20,12,59,0,1,4,0,1,56,164,0,1,155, +0,1,68,0,1,244,0,1,235,0,1,68,0,148,0,2,224,0,1,2,0,0,48,0,112,0,208,0,4, +7,0,32,25,1,160,25,176,25,192,25,3,25,184,255,192,64,36,14,17,72,47,25,1, +22,18,6,95,15,11,80,7,96,7,2,7,2,95,64,23,1,160,23,208,23,2,23,23,13,9,3, +4,0,18,0,63,50,63,51,57,47,93,113,237,220,93,50,50,237,50,50,1,93,43,93,113, +47,94,93,95,93,113,113,113,114,114,114,94,93,93,51,51,237,50,50,47,94,93, +51,51,237,50,50,49,48,33,17,33,17,35,17,35,53,51,53,51,21,33,53,51,21,51, +21,35,17,3,53,33,21,4,102,253,1,191,154,154,191,2,255,186,153,153,186,253, +1,2,141,253,115,4,1,154,230,230,230,230,154,251,255,3,45,212,212,0,1,0,10, +0,0,3,238,5,204,0,41,0,150,185,0,7,255,232,64,66,9,13,72,0,7,16,7,2,7,33, +24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,32,36,24,70,29,28,192,25,1, +0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240,43, +2,255,43,1,112,43,1,43,184,255,192,64,19,19,23,72,35,27,81,32,28,28,5,30, +0,25,11,21,0,18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63, +18,57,47,51,237,50,1,43,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16, +220,93,113,26,237,18,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52, +46,2,35,34,14,2,21,17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61, +30,70,84,100,62,104,133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180, +1,44,254,212,2,3,2,1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69, +35,46,84,120,75,253,170,4,182,131,147,147,131,148,33,66,56,39,7,255,255,255, +184,0,0,2,133,7,6,18,38,0,44,0,0,17,6,2,153,207,0,0,19,64,11,1,4,5,38,1,2, +13,27,0,2,37,1,43,53,0,43,53,0,255,255,255,184,0,0,2,133,5,189,18,38,0,241, +0,0,17,6,1,78,207,0,0,19,64,11,1,4,17,38,1,2,13,27,0,2,37,1,43,53,0,43,53, +0,255,255,0,12,0,0,2,49,6,161,18,38,0,44,0,0,17,7,1,73,255,217,1,78,0,19, +64,11,1,4,5,38,1,2,5,4,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0,12,0,0,2,49, +5,83,18,38,0,241,0,0,17,6,1,73,217,0,0,19,64,11,1,4,17,38,1,2,5,4,0,2,37, +1,43,53,0,43,53,0,255,255,255,210,0,0,2,108,6,243,18,38,0,44,0,0,17,6,2,155, +234,0,0,19,64,11,1,4,5,38,1,2,9,17,0,2,37,1,43,53,0,43,53,0,255,255,255,210, +0,0,2,108,5,230,18,38,0,241,0,0,17,6,1,74,245,0,0,19,64,11,1,4,17,38,1,3, +9,21,0,2,37,1,43,53,0,43,53,0,255,255,0,92,254,85,1,186,5,129,18,38,0,44, +0,0,17,6,1,77,12,0,0,10,182,1,0,16,16,3,3,37,43,53,0,0,255,255,0,31,254,85, +1,125,5,204,18,38,0,76,0,0,17,6,1,77,207,0,0,15,64,10,23,22,1,2,0,20,20,7, +7,37,43,53,93,0,255,255,0,189,0,0,1,124,6,241,18,38,0,44,0,0,17,7,1,75,0, +39,1,37,0,19,64,11,1,4,5,38,1,0,4,6,0,2,37,1,43,53,0,43,53,0,0,0,0,1,0,194, +0,0,1,118,4,58,0,3,1,137,64,24,3,70,4,0,36,0,2,9,0,0,4,5,52,5,1,0,5,16,5, +32,5,3,229,5,184,255,192,64,55,225,228,72,240,5,1,228,5,1,176,5,192,5,208, +5,3,132,5,148,5,164,5,3,64,5,1,52,5,1,0,5,16,5,32,5,3,212,5,228,5,244,5,3, +144,5,1,116,5,132,5,2,96,5,1,5,184,255,192,64,22,193,196,72,224,5,1,196,5, +212,5,2,176,5,1,20,5,36,5,52,5,3,5,184,255,192,183,182,185,72,0,5,1,175,5, +184,255,192,179,171,174,72,5,184,255,192,182,161,167,72,128,5,1,5,184,255, +192,64,38,150,156,72,208,5,1,100,5,116,5,164,5,180,5,196,5,5,32,5,1,4,5,20, +5,2,4,5,20,5,180,5,196,5,244,5,5,117,5,184,255,192,179,121,124,72,5,184,255, +192,179,110,113,72,5,184,255,192,64,24,99,102,72,224,5,1,180,5,196,5,212, +5,3,48,5,1,4,5,20,5,36,5,3,5,184,255,192,183,67,70,72,11,5,1,62,5,184,255, +192,64,9,56,59,72,203,5,219,5,2,5,184,255,192,64,42,45,48,72,27,5,43,5,2, +196,5,212,5,228,5,3,107,5,123,5,2,64,5,1,2,16,5,32,5,48,5,3,191,5,207,5,2, +32,5,64,5,2,5,184,255,192,64,13,13,16,72,15,5,31,5,2,7,1,15,0,21,0,63,63, +1,94,93,43,93,93,113,95,113,113,113,114,43,114,43,94,93,43,113,113,113,113, +43,43,43,94,93,113,113,113,113,43,114,43,43,94,93,43,93,93,93,93,43,113,113, +113,113,114,114,114,114,114,114,114,43,94,93,93,17,18,57,47,94,93,237,49, +48,51,17,51,17,194,180,4,58,251,198,0,0,0,255,255,0,170,255,236,5,73,5,129, +16,38,0,44,237,0,16,7,0,45,1,225,0,0,255,255,0,137,254,87,3,3,5,204,16,38, +0,76,0,0,17,7,0,77,1,198,0,0,0,30,64,18,3,2,111,8,1,48,8,1,16,8,1,8,1,0,16, +0,1,0,17,93,53,53,17,93,93,93,53,53,255,255,0,32,255,236,3,205,6,254,18,38, +0,45,0,0,17,7,2,150,1,55,0,0,0,19,64,11,1,23,5,38,1,190,28,22,3,16,37,1,43, +53,0,43,53,0,0,0,0,2,255,153,254,87,2,47,5,211,0,19,0,29,1,148,64,25,150, +29,166,29,2,152,28,168,28,2,3,18,24,12,16,72,18,40,8,11,72,164,21,1,21,184, +255,192,64,49,11,15,72,21,251,26,1,59,26,1,26,64,12,15,72,36,26,1,26,15,70, +12,3,3,4,12,20,12,36,12,68,12,4,7,12,12,31,30,144,31,1,2,0,31,16,31,2,219, +31,184,255,192,64,9,223,227,72,31,64,210,213,72,31,184,255,192,64,51,205, +209,72,143,31,1,64,31,80,31,2,95,31,111,31,239,31,255,31,4,32,31,48,31,64, +31,3,144,31,160,31,224,31,240,31,4,79,31,1,0,31,1,160,175,31,191,31,207,31, +3,31,184,255,192,64,57,147,150,72,239,31,1,176,31,192,31,208,31,3,95,31,1, +32,31,1,31,31,47,31,63,31,143,31,191,31,207,31,6,0,31,1,111,239,31,1,208, +31,1,63,31,1,111,31,143,31,159,31,175,31,255,31,5,31,184,255,192,64,101,79, +82,72,223,31,1,144,31,160,31,176,31,3,47,31,63,31,79,31,3,0,31,1,61,31,64, +53,56,72,112,31,128,31,144,31,176,31,4,15,31,31,31,2,255,31,1,31,64,35,38, +72,144,31,1,79,31,1,255,31,1,112,31,128,31,192,31,208,31,224,31,5,31,31,1, +24,142,64,28,148,26,128,22,22,15,26,47,26,63,26,127,26,239,26,5,26,13,15, +7,80,0,27,0,63,237,63,47,93,51,47,26,16,253,26,237,1,93,93,93,113,113,43, +113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93,93,113,113,113,113, +43,114,94,93,93,93,113,113,114,114,43,43,43,94,93,95,93,17,18,57,47,94,93, +51,47,16,237,47,93,43,93,113,204,43,93,49,48,0,43,43,1,95,93,93,19,34,38, +39,53,30,1,51,50,62,2,53,17,51,17,20,14,2,1,21,35,39,35,7,35,53,19,51,77, +34,65,28,13,36,13,38,49,28,10,180,21,54,93,1,154,105,219,2,232,104,234,204, +254,87,4,5,139,2,4,20,43,67,46,4,165,251,64,62,106,78,45,6,110,20,169,169, +20,1,14,0,255,255,0,168,254,78,5,63,5,129,18,38,0,46,0,0,17,7,2,140,1,221, +0,0,0,14,185,0,1,255,205,180,16,12,4,11,37,1,43,53,255,255,0,138,254,78,4, +3,5,204,18,38,0,78,0,0,17,7,2,140,1,78,0,0,0,14,185,0,1,255,235,180,16,12, +4,11,37,1,43,53,0,1,0,138,0,0,4,3,4,58,0,11,0,166,64,72,123,1,1,116,7,1,86, +9,102,9,2,123,0,139,0,155,0,3,89,0,105,0,2,67,10,1,58,2,1,42,9,1,155,8,1, +122,8,138,8,2,44,8,1,1,10,8,10,9,16,112,9,128,9,144,9,3,9,9,0,11,16,80,11, +1,144,11,208,11,240,11,3,11,184,255,192,64,40,7,11,72,11,7,3,70,0,4,16,4, +48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2,1,7,10,4,8,8,5,15,4,0,21, +0,63,50,63,51,17,23,57,1,93,93,47,94,93,237,50,47,43,93,113,56,51,57,47,93, +56,57,51,17,51,49,48,93,93,93,93,0,93,1,93,93,93,93,0,93,1,93,33,1,7,17,35, +17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73,1,206,1,238,108, +254,126,4,58,253,243,2,13,254,47,253,151,0,0,0,255,255,0,168,0,0,4,47,6,240, +18,38,0,47,0,0,17,7,2,149,0,173,0,0,0,21,180,1,6,5,38,1,184,255,94,180,6, +9,0,4,37,1,43,53,0,43,53,0,255,255,0,91,0,0,2,3,7,62,18,38,0,79,0,0,17,6, +2,149,19,78,0,19,64,11,1,4,2,38,1,75,4,7,0,2,37,1,43,53,0,43,53,0,255,255, +0,168,254,78,4,47,5,129,18,38,0,47,0,0,17,7,2,140,1,133,0,0,0,14,185,0,1, +255,253,180,10,6,0,4,37,1,43,53,255,255,0,126,254,78,1,71,5,204,18,38,0,79, +0,0,17,6,2,140,255,0,0,14,185,0,1,255,255,180,8,4,0,2,37,1,43,53,0,0,255, +255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,2,146,2,21,0,0,0,18,64,10,1, +15,3,1,138,10,6,0,4,37,1,43,53,0,63,53,255,255,0,138,0,0,2,105,5,204,16,38, +0,79,0,0,17,7,2,146,1,36,0,75,0,65,64,16,16,64,29,29,72,16,64,22,22,72,16, +64,18,18,72,16,184,255,192,179,17,17,72,16,184,255,192,64,12,16,16,72,16, +64,11,11,72,1,13,0,1,184,1,32,180,8,4,0,2,37,1,43,53,0,63,53,1,43,43,43,43, +43,43,0,255,255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,1,75,1,213,253,143, +0,11,182,1,95,6,8,0,4,37,1,43,53,0,0,0,255,255,0,138,0,0,2,146,5,204,16,38, +0,79,0,0,17,7,1,75,1,66,253,143,0,14,185,0,1,1,84,180,4,6,0,2,37,1,43,53, +0,1,0,20,0,0,4,47,5,129,0,13,0,119,64,49,121,0,137,0,2,100,8,116,8,132,8, +3,86,8,1,134,8,1,86,7,1,134,7,1,12,2,90,9,5,16,3,1,0,3,32,3,64,3,96,3,128, +3,208,3,240,3,7,3,12,184,255,224,179,19,22,72,9,184,255,224,64,24,19,22,72, +6,1,9,12,4,16,7,1,7,0,13,1,13,13,5,10,3,2,95,5,18,0,63,237,63,18,57,47,93, +205,93,23,57,43,43,1,47,93,113,47,51,237,50,49,48,113,114,113,114,0,93,93, +1,5,17,33,21,33,17,7,53,55,17,51,17,37,2,104,254,255,2,200,252,121,148,148, +191,1,1,3,29,149,254,20,156,2,26,85,158,85,2,201,253,165,148,0,1,0,16,0,0, +1,186,5,204,0,11,0,102,64,42,39,3,1,39,2,1,8,7,11,70,4,2,0,0,16,0,32,0,64, +0,4,7,0,0,12,13,255,13,1,112,13,128,13,192,13,208,13,4,31,13,1,4,184,255, +224,64,23,18,22,72,10,32,18,22,72,1,10,4,7,4,2,79,8,1,8,8,5,0,0,21,0,63,63, +57,47,93,205,23,57,43,43,1,93,93,93,17,18,57,47,94,93,51,51,237,50,50,49, +48,113,113,51,17,7,53,55,17,51,17,55,21,7,17,138,122,122,180,124,124,2,30, +68,158,68,3,16,253,88,72,159,71,253,122,255,255,0,168,0,0,5,32,6,240,18,38, +0,49,0,0,17,7,2,149,2,17,0,0,0,19,64,11,1,20,5,38,1,73,20,23,8,18,37,1,43, +53,0,43,53,0,0,0,255,255,0,140,0,0,3,242,5,228,18,38,0,81,4,0,17,7,0,116, +1,132,0,0,0,19,64,11,1,38,17,38,1,97,38,41,19,36,37,1,43,53,0,43,53,0,0,0, +255,255,0,168,254,78,5,32,5,129,18,38,0,49,0,0,17,7,2,140,1,252,0,0,0,14, +185,0,1,255,252,180,24,20,8,18,37,1,43,53,255,255,0,140,254,78,3,242,4,78, +18,38,0,81,4,0,17,7,2,140,1,91,0,0,0,11,182,1,0,42,38,19,36,37,1,43,53,0, +0,0,255,255,0,168,0,0,5,32,6,254,18,38,0,49,0,0,17,7,2,151,1,147,0,0,0,21, +180,1,20,5,38,1,184,255,250,180,22,28,8,18,37,1,43,53,0,43,53,0,255,255,0, +140,0,0,3,242,5,211,18,38,0,81,4,0,17,7,1,72,0,242,0,0,0,21,180,1,38,17,38, +1,184,255,254,180,40,46,19,36,37,1,43,53,0,43,53,0,255,255,255,254,0,0,4, +80,5,129,16,38,0,81,98,0,16,7,2,3,255,127,0,0,0,1,0,165,255,236,5,52,5,149, +0,55,0,162,64,16,154,53,1,149,7,165,7,2,131,41,147,41,163,41,3,48,184,255, +232,179,12,15,72,47,184,255,216,64,91,12,15,72,42,54,58,54,154,54,170,54, +4,6,143,5,159,5,175,5,3,5,5,51,39,26,90,0,27,16,27,64,27,3,27,51,90,0,14, +64,14,80,14,112,14,160,14,176,14,6,48,14,80,14,144,14,240,14,4,224,14,1,143, +14,159,14,175,14,3,0,14,48,14,2,7,14,39,20,95,45,4,33,3,26,18,9,95,0,6,6, +0,19,0,63,50,47,16,237,63,63,63,237,50,1,47,94,93,93,93,113,114,237,47,93, +237,50,17,57,47,93,51,49,48,0,93,43,1,43,0,93,93,93,5,34,46,2,39,55,30,1, +51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,173,56,96,79,63,24,127,37,100,59,64,78,41, +13,39,81,127,87,94,163,121,70,191,1,1,1,1,184,1,3,2,1,4,34,103,130,153,86, +124,177,112,53,30,86,152,20,24,40,54,30,115,45,65,58,107,153,95,1,66,108, +154,98,46,62,105,139,77,252,133,4,68,37,92,90,76,22,22,63,69,69,28,61,101, +70,39,64,133,204,139,254,165,130,208,146,78,0,0,0,0,1,0,140,254,87,3,242, +4,78,0,53,0,135,64,18,121,52,137,52,2,90,52,106,52,2,43,52,59,52,75,52,3, +46,184,255,232,64,74,9,12,72,3,46,19,46,2,3,3,24,49,70,64,160,12,1,96,12, +208,12,2,31,12,1,175,12,1,12,55,128,37,24,70,160,25,176,25,2,0,25,192,25, +208,25,3,0,25,16,25,32,25,64,25,224,25,240,25,6,7,25,37,18,80,43,16,31,15, +24,21,7,80,0,27,0,63,237,63,63,63,237,50,1,47,94,93,113,114,237,50,26,16, +220,93,113,113,114,26,237,17,57,47,49,48,93,43,0,93,93,93,1,34,38,39,53,30, +1,51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,1,34,65,28,13,36,13,38,49,28,10,23,52,85, +63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90,130,84,39,22, +54,93,254,87,4,5,139,2,4,20,43,67,46,3,25,79,106,65,27,45,85,125,81,253,141, +3,83,34,75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,252,169,62,106, +78,45,0,0,0,255,255,0,97,255,236,5,215,6,161,18,38,0,50,0,0,17,7,1,73,1,214, +1,78,0,19,64,11,2,40,5,38,2,0,41,40,10,0,37,1,43,53,0,43,53,0,0,0,255,255, +0,86,255,236,4,29,5,83,18,38,0,82,0,0,17,7,1,73,0,244,0,0,0,19,64,11,2,35, +17,38,2,0,36,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +243,18,38,0,50,0,0,17,7,2,155,1,231,0,0,0,19,64,11,2,40,5,38,2,0,45,53,10, +0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,230,18,38,0,82,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,35,17,38,2,0,40,52,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,97,255,236,5,215,6,241,18,38,0,50,0,0,17,7,2,154,1,226,0, +0,0,23,64,13,3,2,40,5,38,3,2,93,40,49,10,0,37,1,43,53,53,0,43,53,53,0,0,0, +255,255,0,86,255,236,4,34,5,228,18,38,0,82,0,0,17,7,1,79,1,9,0,0,0,23,64, +13,3,2,35,17,38,3,2,103,35,44,8,0,37,1,43,53,53,0,43,53,53,0,0,0,0,2,0,97, +255,246,7,166,5,140,0,30,0,49,0,170,64,119,137,13,1,102,13,1,105,12,1,86, +48,1,89,42,1,84,8,132,8,2,4,47,20,47,84,47,3,11,43,27,43,91,43,3,0,20,24, +28,90,34,0,26,32,26,48,26,3,26,22,26,22,29,15,34,47,34,79,34,3,63,34,95,34, +127,34,159,34,207,34,239,34,6,34,64,31,38,72,34,16,29,32,29,2,29,45,91,32, +10,1,15,10,31,10,2,10,127,51,1,27,95,24,24,21,29,95,30,18,22,95,21,3,40,95, +15,4,31,95,5,19,0,63,237,63,237,63,237,63,237,17,57,47,237,1,93,47,93,93, +237,47,93,47,43,93,113,18,57,57,47,47,93,16,237,50,57,57,49,48,0,93,93,93, +93,93,1,93,0,93,93,33,14,3,35,34,36,38,2,53,52,18,54,36,51,50,30,2,23,33, +21,33,17,33,21,33,17,33,21,37,50,54,55,17,46,2,34,35,34,14,2,21,20,30,2,3, +231,20,51,57,57,25,169,254,253,175,89,94,178,1,2,164,26,58,57,52,19,3,146, +252,221,2,231,253,25,3,76,251,111,32,76,26,11,32,37,37,15,125,187,125,63, +64,126,186,3,3,3,1,106,191,1,9,159,165,1,7,183,98,2,3,4,2,156,254,60,154, +254,21,156,145,2,2,4,87,1,2,1,74,142,206,131,129,209,148,80,0,3,0,86,255, +236,7,50,4,78,0,39,0,59,0,68,0,190,64,131,132,7,1,102,7,118,7,2,97,2,1,85, +2,1,90,66,106,66,2,108,61,1,90,61,1,69,58,85,58,101,58,3,69,52,85,52,101, +52,3,74,48,90,48,106,48,3,74,42,90,42,106,42,3,8,73,9,9,38,71,64,31,60,47, +60,63,60,3,144,60,1,60,70,128,17,30,68,0,71,144,40,1,32,40,1,40,50,71,25, +0,80,68,68,5,63,80,33,16,116,30,132,30,2,123,17,139,17,2,30,17,20,45,80,28, +16,55,80,20,22,5,80,14,239,8,1,128,8,1,8,8,14,22,0,63,51,47,93,93,16,237, +63,237,63,237,18,57,57,93,93,63,237,18,57,47,237,1,47,237,47,93,114,237,50, +57,57,26,16,220,93,113,26,237,50,47,237,49,48,0,93,93,93,93,93,93,93,93,93, +93,93,1,20,30,2,51,50,54,55,23,14,3,35,34,38,39,14,1,35,34,46,2,53,16,18, +51,32,23,62,1,51,50,30,2,29,1,37,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2, +37,46,1,35,34,14,2,7,4,46,35,73,114,80,117,141,25,158,17,61,102,153,108,137, +198,61,63,201,137,113,181,127,68,253,242,1,25,117,67,200,119,136,183,111, +47,252,63,42,77,110,68,69,114,81,45,47,81,108,62,69,114,81,44,3,7,15,144, +135,45,99,84,58,4,1,247,85,143,103,57,94,72,45,45,91,73,47,91,92,93,90,68, +140,211,143,1,23,1,25,177,94,83,88,155,210,122,24,39,126,164,98,39,41,99, +164,123,126,165,98,40,39,98,166,225,171,157,29,74,127,98,255,255,0,168,0, +0,5,104,6,240,18,38,0,53,0,0,17,7,2,149,1,225,0,0,0,21,180,2,31,5,38,2,184, +255,245,180,31,34,4,17,37,1,43,53,0,43,53,0,255,255,0,136,0,0,2,166,5,228, +18,38,0,85,0,0,17,7,0,116,0,182,0,0,0,19,64,11,1,32,17,38,1,74,32,35,6,21, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,254,78,5,104,5,129,18,38,0,53,0,0, +17,7,2,140,2,5,0,0,0,14,185,0,2,255,225,180,35,31,4,17,37,1,43,53,255,255, +0,129,254,78,2,136,4,78,18,38,0,85,0,0,17,6,2,140,2,0,0,14,185,0,1,255,94, +180,36,32,6,21,37,1,43,53,0,0,255,255,0,168,0,0,5,104,6,254,18,38,0,53,0, +0,17,7,2,151,1,102,0,0,0,21,180,2,31,5,38,2,184,255,169,180,33,39,4,17,37, +1,43,53,0,43,53,0,255,255,0,56,0,0,2,206,5,211,18,38,0,85,0,0,17,6,1,72,56, +0,0,21,180,1,32,17,38,1,184,255,251,180,34,40,6,21,37,1,43,53,0,43,53,0,0, +0,255,255,0,93,255,236,4,248,7,45,18,38,0,54,0,0,17,7,0,116,1,234,1,73,0, +19,64,11,1,64,5,38,1,91,64,67,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,228,18,38,0,86,0,0,17,7,0,116,1,57,0,0,0,19,64,11,1,56,17,38, +1,93,56,59,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,93,255,236,4,248,7,26, +18,38,0,54,0,0,17,7,1,71,1,114,1,71,0,19,64,11,1,65,5,38,1,18,70,64,8,0,37, +1,43,53,0,43,53,0,0,0,255,255,0,57,255,236,3,182,5,211,18,38,0,86,0,0,17, +7,1,71,0,172,0,0,0,19,64,11,1,57,17,38,1,0,62,56,10,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,93,254,78,4,248,5,150,18,38,0,54,0,0,17,7,0,120,1,166,0,0, +0,11,182,1,40,72,64,8,0,37,1,43,53,0,0,0,255,255,0,57,254,78,3,182,4,75,18, +38,0,86,0,0,17,7,0,120,0,218,0,0,0,11,182,1,15,64,56,10,0,37,1,43,53,0,0, +0,255,255,0,93,255,236,4,248,6,254,18,38,0,54,0,0,17,7,2,151,1,115,0,0,0, +19,64,11,1,64,5,38,1,19,66,72,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,211,18,38,0,86,0,0,17,7,1,72,0,173,0,0,0,19,64,11,1,56,17,38, +1,0,58,64,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,46,254,78,4,180,5,129,18, +38,0,55,0,0,17,7,2,140,1,139,0,0,0,14,185,0,1,255,254,180,12,8,4,6,37,1,43, +53,255,255,0,31,254,78,2,42,5,44,16,38,0,87,0,0,17,6,2,140,115,0,2,233,64, +255,35,64,232,232,72,35,64,231,231,72,35,64,228,228,72,35,64,227,227,72,35, +64,226,226,72,35,64,221,221,72,35,64,217,217,72,35,64,216,216,72,35,64,215, +215,72,35,64,214,214,72,35,64,213,213,72,35,64,210,210,72,35,64,206,206,72, +35,64,205,205,72,35,64,203,203,72,35,64,202,202,72,35,64,199,199,72,35,64, +196,196,72,35,64,195,195,72,35,64,194,194,72,35,64,192,192,72,35,64,191,191, +72,35,64,190,190,72,35,64,185,185,72,35,64,184,184,72,35,64,181,181,72,35, +64,180,180,72,35,64,179,179,72,35,64,178,178,72,35,64,174,174,72,35,64,173, +173,72,35,64,170,170,72,35,64,169,169,72,35,64,168,168,72,35,64,167,167,72, +35,64,163,163,72,35,64,162,162,72,35,64,160,160,72,35,64,159,159,72,35,64, +158,158,72,35,64,157,157,72,35,64,156,156,72,35,64,152,152,72,35,64,149,149, +72,35,64,148,148,72,35,64,147,147,72,35,64,146,146,72,35,64,145,145,72,35, +64,144,144,72,35,64,142,142,72,35,64,141,141,72,64,221,35,64,138,138,72,35, +64,137,137,72,35,64,136,136,72,35,64,134,134,72,35,64,133,133,72,35,64,131, +131,72,35,64,130,130,72,35,64,127,127,72,35,64,126,126,72,35,64,125,125,72, +35,64,124,124,72,35,64,123,123,72,35,64,122,122,72,35,64,121,121,72,35,64, +120,120,72,35,64,116,116,72,35,64,115,115,72,35,64,113,113,72,35,64,112,112, +72,35,64,111,111,72,35,64,110,110,72,35,64,109,109,72,35,64,106,106,72,35, +64,105,105,72,35,64,104,104,72,35,64,102,102,72,35,64,101,101,72,35,64,100, +100,72,35,64,99,99,72,35,64,98,98,72,35,64,95,95,72,35,64,94,94,72,35,64, +93,93,72,35,64,91,91,72,35,64,90,90,72,35,64,89,89,72,35,128,88,88,72,35, +64,87,87,72,35,64,84,84,72,35,64,83,83,72,35,64,80,80,72,35,64,79,79,72,35, +64,78,78,72,35,64,77,77,72,35,184,255,192,179,74,74,72,35,184,255,192,179, +71,71,72,35,184,255,192,179,63,63,72,35,184,255,192,64,9,60,60,72,35,64,52, +52,72,35,184,255,192,179,50,50,72,35,184,255,192,179,49,49,72,35,184,255, +192,64,9,45,45,72,35,64,41,41,72,35,184,255,192,179,39,39,72,35,184,255,192, +64,9,38,38,72,35,64,30,30,72,35,184,255,192,179,28,28,72,35,184,255,192,64, +9,27,27,72,35,64,19,19,72,35,184,255,192,179,17,17,72,35,184,255,192,179, +13,13,72,35,184,255,192,64,15,9,9,72,35,64,8,8,72,1,50,27,23,7,0,37,1,43, +53,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0,0,255,255,0,46,0,0,4,180, +6,254,18,38,0,55,0,0,17,7,2,151,1,33,0,0,0,21,180,1,8,5,38,1,184,255,251, +180,10,16,4,6,37,1,43,53,0,43,53,0,255,255,0,31,255,240,3,17,5,204,16,38, +0,87,0,0,17,7,2,146,1,204,0,75,0,17,177,1,1,184,1,136,180,27,23,7,0,37,1, +43,53,0,53,0,0,1,0,46,0,0,4,180,5,129,0,15,0,101,64,62,0,17,16,17,32,17,3, +9,3,2,5,15,14,6,12,5,14,9,6,127,12,175,12,191,12,3,47,12,143,12,2,12,64,23, +28,72,12,1,5,90,10,16,6,32,6,2,6,0,12,95,13,4,8,95,1,9,9,5,13,3,5,18,0,63, +63,18,57,47,51,237,50,16,237,50,1,47,93,51,253,50,204,43,93,113,17,57,43, +1,24,16,77,228,17,57,95,94,93,49,48,1,17,33,21,33,17,35,17,33,53,33,17,33, +53,33,21,2,208,1,25,254,231,190,254,233,1,23,254,28,4,134,4,229,254,60,154, +253,121,2,135,154,1,196,156,156,0,1,0,31,255,240,2,42,5,44,0,30,0,140,64, +91,40,30,1,40,29,1,40,26,1,40,25,1,12,32,9,15,72,156,12,172,12,2,12,40,9, +14,72,20,15,15,13,29,25,111,7,127,7,2,7,24,28,7,3,1,70,21,17,143,13,1,0,13, +16,13,32,13,3,7,13,128,32,1,47,32,1,27,19,80,20,0,15,80,28,127,16,191,16, +207,16,3,16,16,4,24,22,20,15,4,80,11,22,0,63,237,63,206,51,18,57,47,93,51, +237,50,16,237,50,1,93,93,47,94,93,113,51,51,237,23,50,47,93,51,51,17,51,17, +51,49,48,0,43,93,1,43,113,113,113,113,1,21,20,22,51,50,54,55,21,14,1,35,34, +53,17,35,53,51,17,35,53,51,55,51,21,51,21,35,17,51,21,1,80,51,63,26,49,29, +41,85,56,216,125,125,125,132,53,120,200,200,200,2,4,248,78,63,8,6,133,11, +13,245,1,31,131,1,48,131,242,242,131,254,208,131,255,255,0,158,255,236,5, +41,7,6,18,38,0,56,0,0,17,7,2,153,1,148,0,0,0,19,64,11,1,26,5,38,1,0,35,49, +5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5,189,18,38,0,88, +0,0,17,7,1,78,0,246,0,0,0,19,64,11,1,38,17,38,1,13,47,61,36,19,37,1,43,53, +0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,156,18,38,0,56,0,0,17,7,1,73,1, +159,1,73,0,19,64,11,1,26,5,38,1,1,27,26,5,20,37,1,43,53,0,43,53,0,0,0,255, +255,0,133,255,236,3,235,5,83,18,38,0,88,0,0,17,7,1,73,0,240,0,0,0,21,180, +1,38,17,38,1,184,255,254,180,39,38,36,19,37,1,43,53,0,43,53,0,255,255,0,158, +255,236,5,41,6,243,18,38,0,56,0,0,17,7,2,155,1,174,0,0,0,19,64,11,1,26,5, +38,1,0,31,39,5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5, +230,18,38,0,88,0,0,17,7,1,74,1,11,0,0,0,21,180,1,38,17,38,1,184,255,253,180, +43,55,36,19,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,7,62,18,38,0, +56,0,0,17,7,1,76,1,191,0,203,0,23,64,13,2,1,31,5,38,2,1,0,36,26,5,20,37,1, +43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,235,6,115,18,38,0,88,0, +0,17,7,1,76,1,20,0,0,0,23,64,13,2,1,43,17,38,2,1,1,48,38,36,19,37,1,43,53, +53,0,43,53,53,0,0,0,255,255,0,158,255,236,5,41,6,241,18,38,0,56,0,0,17,7, +2,154,1,157,0,0,0,23,64,13,2,1,26,5,38,2,1,81,26,35,5,20,37,1,43,53,53,0, +43,53,53,0,0,0,255,255,0,133,255,236,4,30,5,228,18,38,0,88,0,0,17,7,1,79, +1,5,0,0,0,23,64,13,2,1,38,17,38,2,1,100,38,47,36,19,37,1,43,53,53,0,43,53, +53,0,0,0,255,255,0,158,254,85,5,41,5,129,16,38,0,56,0,0,17,7,1,77,2,32,0, +0,0,40,185,0,1,254,103,181,39,39,21,21,37,51,184,255,192,179,21,21,72,51, +184,255,192,179,20,20,72,51,184,255,192,178,19,19,72,43,43,43,43,53,0,0,255, +255,0,133,254,85,4,5,4,58,18,38,0,88,0,0,17,7,1,77,2,87,0,0,0,13,185,0,1, +255,226,180,50,50,14,14,37,43,53,0,255,255,0,9,0,0,7,134,6,254,18,38,0,58, +0,0,17,7,2,150,2,121,0,0,0,21,180,1,48,5,38,1,184,255,253,180,53,47,15,46, +37,1,43,53,0,43,53,0,255,255,255,253,0,0,5,204,5,211,18,38,0,90,0,0,17,7, +1,71,1,148,0,0,0,21,180,1,44,17,38,1,184,255,251,180,49,43,15,42,37,1,43, +53,0,43,53,0,255,255,0,45,0,0,5,41,6,254,18,38,0,60,0,0,17,7,2,150,1,91,0, +0,0,21,180,1,10,5,38,1,184,255,251,180,15,9,4,8,37,1,43,53,0,43,53,0,255, +255,0,5,254,87,3,252,5,211,18,38,0,92,0,0,17,7,1,71,0,182,0,0,0,19,64,11, +1,33,17,38,1,0,38,32,17,31,37,1,43,53,0,43,53,0,0,0,255,255,0,45,0,0,5,41, +6,178,18,38,0,60,0,0,17,7,2,152,1,104,0,0,0,23,64,13,2,1,9,5,38,2,1,0,13, +11,4,8,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,65,0,0,4,163,6,240,18,38, +0,61,0,0,17,7,2,149,1,160,0,0,0,19,64,11,1,10,5,38,1,74,10,13,1,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,228,18,38,0,93,0,0,17,7,0,116,1, +53,0,0,0,19,64,11,1,10,17,38,1,93,10,13,0,8,37,1,43,53,0,43,53,0,0,0,255, +255,0,65,0,0,4,163,6,241,18,38,0,61,0,0,17,7,1,75,1,124,1,37,0,19,64,11,1, +10,5,38,1,0,10,12,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,204, +18,38,0,93,0,0,17,7,1,75,0,253,0,0,0,12,182,1,0,10,12,0,8,37,1,43,53,0,0, +0,255,255,0,65,0,0,4,163,6,254,18,38,0,61,0,0,17,7,2,151,1,56,0,0,0,19,64, +11,1,10,5,38,1,17,12,18,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182, +5,211,18,38,0,93,0,0,17,7,1,72,0,156,0,0,0,21,180,1,10,17,38,1,184,255,244, +180,12,18,0,8,37,1,43,53,0,43,53,0,0,1,0,138,0,0,2,17,5,202,0,19,0,125,185, +0,5,255,216,179,13,17,72,5,184,255,224,64,56,8,12,72,111,10,1,10,10,0,70, +0,1,16,1,48,1,240,1,4,8,1,255,21,1,224,21,1,223,21,1,176,21,192,21,2,159, +21,1,112,21,128,21,2,31,21,1,0,21,1,240,21,1,223,21,1,21,184,255,192,64,18, +34,37,72,79,21,1,112,21,1,31,21,1,14,80,7,0,0,21,0,63,63,237,1,93,93,113, +43,113,113,114,114,114,114,114,114,114,114,47,94,93,237,50,47,93,49,48,0, +43,43,33,35,17,52,62,2,51,50,22,23,21,46,1,35,34,14,2,21,1,62,180,22,59,102, +81,32,69,26,17,45,18,40,51,29,11,4,180,59,101,75,43,6,6,137,3,5,22,41,60, +39,0,0,0,0,1,0,192,254,78,3,195,5,174,0,27,0,148,64,107,133,6,1,122,18,138, +18,2,139,15,1,89,15,105,15,121,15,3,131,13,1,85,13,101,13,117,13,3,54,13, +1,38,7,1,38,8,1,34,22,50,22,114,22,130,22,4,21,17,37,17,53,17,3,27,212,8, +228,8,244,8,3,80,8,144,8,2,38,8,54,8,70,8,3,8,10,27,3,13,13,17,19,3,8,95, +14,159,14,2,14,12,16,80,9,17,17,13,3,81,15,24,127,24,175,24,3,24,13,0,47, +47,93,237,18,57,47,51,237,50,1,47,113,51,23,51,17,23,51,113,113,113,47,49, +48,93,0,93,1,93,93,93,93,93,93,93,93,93,1,46,1,35,34,14,2,15,1,51,7,35,3, +35,19,35,55,51,55,62,3,51,50,22,23,3,164,17,62,31,31,46,33,24,9,26,211,25, +213,254,180,254,152,27,151,29,12,40,71,109,81,32,82,35,5,32,5,10,19,40,64, +45,137,131,250,211,5,45,131,152,59,102,76,43,10,10,0,0,0,4,0,4,0,0,5,82,7, +62,0,26,0,39,0,61,0,67,1,36,64,18,122,64,138,64,2,102,5,118,5,134,5,3,86, +6,102,6,2,25,184,255,232,64,183,9,17,72,19,24,9,17,72,12,16,14,17,72,10,12, +1,12,38,9,10,32,8,39,32,7,32,40,130,0,68,66,132,66,2,66,62,50,130,17,175, +62,191,62,207,62,3,15,17,47,17,2,144,17,1,0,0,32,0,2,15,0,159,0,2,0,62,17, +17,62,0,3,6,11,5,32,32,10,7,139,7,1,90,7,106,7,122,7,3,7,16,6,32,6,48,6,3, +32,6,1,6,6,69,80,69,176,69,2,48,69,96,69,144,69,192,69,240,69,5,47,69,1,132, +10,1,85,10,101,10,117,10,3,10,11,62,62,45,141,112,22,128,22,2,22,22,57,127, +64,159,64,175,64,191,64,4,64,64,9,13,72,64,8,9,39,38,38,10,5,12,32,3,128, +57,1,63,57,1,0,57,1,57,7,7,10,0,47,51,47,47,93,93,93,23,51,18,57,47,51,205, +50,47,43,93,18,57,47,93,237,51,47,1,47,51,93,93,93,93,113,17,51,47,93,113, +51,93,93,17,18,57,17,51,17,18,23,57,47,47,47,93,113,93,113,93,16,237,16,205, +93,16,237,16,135,192,192,135,192,192,1,51,49,48,93,43,43,43,93,93,93,1,20, +6,7,6,7,1,35,3,33,3,35,1,38,39,46,1,53,52,62,2,51,50,30,2,3,46,3,39,14,3, +7,3,33,3,52,46,2,35,34,14,2,21,20,30,1,23,22,23,51,50,62,2,3,53,55,51,21, +5,3,158,38,33,16,18,2,29,195,161,253,126,162,198,2,36,21,18,33,38,38,66,88, +50,50,88,66,38,158,16,29,22,15,1,2,14,23,29,15,180,2,15,131,21,36,49,28,29, +49,36,21,21,36,24,21,24,9,28,49,36,21,247,217,207,254,202,5,112,45,79,30, +15,11,251,68,1,115,254,141,4,185,12,17,30,79,45,45,79,59,34,34,59,79,253, +254,36,74,60,41,4,4,41,62,73,36,254,95,3,119,25,44,33,19,19,33,44,25,26,44, +35,10,8,1,19,35,44,1,35,16,181,23,174,0,255,255,0,87,255,236,4,115,7,62,18, +38,0,68,0,0,16,39,1,76,1,20,255,85,17,7,0,116,1,99,1,90,0,35,64,14,3,2,101, +16,38,4,26,106,109,3,36,37,3,2,184,255,212,180,76,66,3,36,37,1,43,53,53,43, +53,0,43,53,53,0,0,0,255,255,0,24,0,0,7,168,6,240,18,38,0,134,0,0,17,7,2,149, +3,228,0,0,0,21,180,2,27,5,38,2,184,1,32,180,27,30,4,14,37,1,43,53,0,43,53, +0,255,255,0,66,255,236,6,194,5,228,18,38,0,166,0,0,17,7,0,116,2,175,0,0,0, +19,64,11,3,89,17,38,3,73,89,92,25,61,37,1,43,53,0,43,53,0,0,0,255,255,0,71, +255,203,5,244,6,240,18,38,0,152,0,0,17,7,2,149,2,75,0,0,0,19,64,11,3,52,5, +38,3,73,52,55,10,24,37,1,43,53,0,43,53,0,0,0,255,255,0,44,255,218,4,180,5, +228,18,38,0,184,0,0,17,7,0,116,1,178,0,0,0,19,64,11,3,46,17,38,3,94,46,49, +8,19,37,1,43,53,0,43,53,0,0,0,0,1,0,0,4,177,2,150,5,211,0,9,0,66,64,14,118, +9,134,9,2,120,8,136,8,2,128,0,1,0,184,255,192,64,27,11,15,72,0,191,6,1,6, +4,142,64,8,148,128,6,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93,51,26,253,26, +237,1,47,93,204,43,93,49,48,93,93,1,21,35,39,35,7,35,53,19,51,2,150,105,219, +2,232,104,234,204,4,197,20,169,169,20,1,14,0,0,1,0,0,4,177,2,150,5,211,0, +9,0,66,64,14,118,0,134,0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,27,11,15, +72,8,64,191,2,1,2,7,3,148,128,6,142,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93, +237,26,237,50,1,47,93,26,204,43,93,49,48,93,93,1,35,3,53,51,23,51,55,51,21, +1,182,204,234,104,232,2,219,105,4,177,1,14,20,169,169,20,0,0,1,0,51,4,212, +2,88,5,83,0,3,0,81,64,59,4,1,1,228,1,244,1,2,1,164,0,1,91,0,107,0,2,52,0, +68,0,2,0,2,32,18,25,72,2,142,1,64,28,33,72,47,1,1,2,15,1,63,1,175,1,191,1, +4,1,64,22,26,72,1,64,14,17,72,1,0,47,43,43,93,95,113,43,237,43,1,47,93,93, +93,47,93,113,49,48,1,33,53,33,2,88,253,219,2,37,4,212,127,0,1,255,221,4,177, +2,119,5,230,0,21,0,73,64,51,133,14,1,133,8,1,31,17,79,17,127,17,175,17,223, +17,5,239,17,1,17,64,5,64,29,60,72,5,16,80,5,96,5,2,5,149,128,11,143,15,0, +47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,237,113,50,1,47,43,26,204,93,113, +49,48,0,93,93,1,34,46,2,39,51,30,3,51,50,62,2,55,51,14,3,1,41,74,116,84,50, +8,117,8,39,56,72,42,42,71,56,38,8,117,9,50,83,116,4,177,51,85,112,61,43,59, +36,15,16,36,59,42,61,112,85,51,0,1,0,156,5,32,1,80,5,204,0,3,0,23,64,12,3, +134,0,64,14,17,72,0,0,83,1,0,0,63,237,1,47,43,237,49,48,19,53,51,21,156,180, +5,32,172,172,0,0,2,0,51,4,144,2,23,6,115,0,19,0,39,0,89,185,0,18,255,232, +64,14,9,14,72,12,24,9,14,72,8,24,9,14,72,2,184,255,232,64,42,9,14,72,20,130, +64,0,192,30,130,95,10,1,10,25,141,15,15,31,15,2,15,35,141,15,5,47,5,63,5, +79,5,127,5,159,5,191,5,239,5,8,5,0,47,93,237,220,93,237,1,47,93,237,26,220, +26,237,49,48,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,23,38,66,88,50,50,88,66,38,38,66, +88,50,50,88,66,38,108,21,36,49,28,29,49,36,21,21,36,49,29,28,49,36,21,5,130, +50,88,66,38,38,66,88,50,50,88,65,38,38,65,88,50,28,49,36,21,21,36,49,28,29, +49,38,21,21,38,49,0,0,0,0,1,0,80,254,85,1,174,0,0,0,23,0,76,64,55,14,24,9, +13,72,9,24,9,13,72,5,32,9,17,72,12,17,132,15,0,31,0,2,95,0,191,0,2,0,6,11, +64,7,10,72,11,20,141,16,3,1,32,3,80,3,96,3,112,3,176,3,192,3,6,3,0,47,93, +113,237,47,43,1,47,205,93,113,237,50,49,48,43,43,43,1,14,1,35,34,38,53,52, +62,2,55,51,14,3,21,20,22,51,50,54,55,1,174,28,71,40,105,106,34,48,53,20,133, +25,52,43,27,49,45,29,58,28,254,112,12,15,102,85,47,79,61,42,11,14,45,59,70, +39,42,48,13,11,0,1,255,233,4,177,2,182,5,189,0,27,2,77,185,0,26,255,232,64, +182,9,17,72,12,24,9,17,72,41,29,1,25,29,41,29,57,29,89,29,105,29,5,29,64, +229,232,72,29,64,217,220,72,11,29,1,208,169,29,185,29,201,29,3,155,29,1,9, +29,57,29,2,185,29,201,29,217,29,3,29,64,195,198,72,155,29,171,29,2,137,29, +1,123,29,1,73,29,1,137,29,185,29,2,29,64,171,175,72,6,29,54,29,2,158,153, +29,1,125,29,141,29,2,111,29,1,45,29,61,29,77,29,3,27,29,1,13,29,1,237,29, +253,29,2,29,128,136,139,72,137,29,153,29,2,91,29,107,29,123,29,3,29,192,127, +130,72,9,29,1,249,29,1,235,29,1,201,29,217,29,2,171,29,187,29,2,153,29,1, +22,29,38,29,102,29,118,29,134,29,5,4,29,1,110,29,184,255,64,64,96,101,109, +72,148,29,1,112,29,128,29,2,82,29,98,29,2,64,29,1,18,29,34,29,50,29,3,4,29, +1,228,29,244,29,2,214,29,1,196,29,1,176,29,1,162,29,1,128,29,144,29,2,82, +29,98,29,114,29,3,36,29,52,29,68,29,3,6,29,22,29,2,246,29,1,210,29,226,29, +2,192,29,1,146,29,162,29,178,29,3,100,29,116,29,132,29,3,29,184,255,192,64, +9,60,64,72,2,29,1,59,1,29,184,255,128,64,57,53,58,72,164,29,180,29,2,144, +29,1,100,29,116,29,132,29,3,48,29,64,29,80,29,3,4,29,20,29,36,29,3,208,29, +224,29,2,164,29,180,29,196,29,3,112,29,128,29,2,148,29,164,29,228,29,3,29, +184,255,192,64,19,26,31,72,128,29,1,84,29,100,29,116,29,3,29,64,7,10,72,23, +184,255,128,64,9,36,39,72,148,23,164,23,2,23,184,255,128,64,23,30,33,72,68, +23,1,48,23,1,2,0,23,16,23,32,23,3,208,23,224,23,2,23,184,255,192,64,43,13, +19,72,15,23,1,23,9,22,22,5,143,64,15,14,31,14,2,255,14,1,14,64,16,19,72,14, +128,19,143,8,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,50,237,26,221,43,93,113, +26,237,51,47,1,47,204,93,43,93,113,95,113,113,43,113,43,43,93,93,43,93,113, +113,113,114,114,114,114,114,43,95,94,93,43,93,93,93,93,93,113,113,113,113, +113,113,113,113,113,114,114,114,114,114,114,43,94,93,93,93,93,93,93,93,113, +43,113,113,43,113,114,114,114,114,114,114,94,93,43,93,113,113,113,113,43, +113,114,114,114,94,93,43,43,93,113,49,48,43,43,1,34,46,2,35,34,6,7,35,62, +3,51,50,30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45, +74,59,44,84,78,69,30,54,55,8,92,5,20,43,74,4,177,37,45,37,62,57,45,95,78, +50,37,45,37,63,56,44,95,78,51,0,0,0,2,0,22,4,177,3,25,5,228,0,5,0,11,0,111, +64,82,164,10,1,102,10,1,154,8,170,8,2,98,4,162,4,2,98,3,1,154,2,170,2,2,10, +159,6,1,15,6,31,6,127,6,223,6,4,7,6,4,64,63,0,79,0,143,0,175,0,191,0,207, +0,6,0,64,30,41,72,0,64,23,26,72,0,8,2,149,128,6,15,0,47,0,63,0,127,0,239, +0,5,0,0,47,93,50,26,237,50,1,47,43,43,93,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,93,19,53,19,51,21,1,51,53,19,51,21,1,22,217,207,254,182,253,217, +207,254,182,4,177,20,1,31,29,254,234,20,1,31,29,254,234,0,0,1,0,205,4,194, +1,225,6,7,0,5,0,64,64,43,2,16,12,17,72,41,2,1,10,5,26,5,42,5,3,3,43,3,1,3, +64,0,2,128,132,0,148,0,2,112,0,1,2,16,0,32,0,64,0,96,0,4,0,0,47,93,95,93, +93,26,205,1,47,26,205,93,49,48,95,93,93,43,19,53,19,51,21,3,205,69,207,201, +4,194,33,1,36,37,254,224,0,3,0,29,4,176,2,139,6,65,0,5,0,9,0,13,0,83,64,53, +2,16,11,17,72,10,5,26,5,42,5,3,47,4,1,4,47,1,1,1,1,6,192,13,208,13,2,13,10, +192,9,208,9,2,9,6,11,7,144,6,2,0,0,10,192,6,1,15,6,63,6,2,6,0,47,93,93,51, +51,47,205,16,237,50,1,47,205,93,47,205,93,18,57,47,113,205,93,49,48,93,43, +19,53,19,51,21,3,37,53,51,21,33,53,51,21,250,69,187,181,254,216,150,1,66, +150,4,176,33,1,112,37,254,148,31,172,172,172,172,0,0,255,255,0,4,0,0,5,82, +5,131,16,38,0,36,0,0,17,7,1,80,255,108,255,124,0,94,179,2,0,24,1,184,255, +10,181,24,24,5,5,37,28,184,255,192,179,36,36,72,28,184,255,192,179,30,30, +72,28,184,255,192,179,24,24,72,28,184,255,192,179,21,21,72,28,184,255,192, +179,18,18,72,28,184,255,192,179,15,15,72,28,184,255,192,64,11,12,12,72,28, +64,11,11,72,2,23,3,0,63,53,1,43,43,43,43,43,43,43,43,43,93,53,0,1,0,187,1, +190,1,126,2,154,0,3,2,10,179,3,134,0,5,184,255,128,64,12,229,233,72,6,5,22, +5,2,246,5,1,5,184,255,128,64,33,222,225,72,150,5,166,5,2,116,5,132,5,2,86, +5,102,5,2,68,5,1,38,5,54,5,2,2,5,18,5,2,211,5,184,255,128,64,22,207,210,72, +198,5,214,5,2,180,5,1,150,5,166,5,2,116,5,132,5,2,5,184,255,192,64,36,195, +199,72,4,5,20,5,2,214,5,230,5,246,5,3,194,5,1,148,5,164,5,180,5,3,118,5,134, +5,2,84,5,100,5,2,5,184,255,192,64,34,174,181,72,164,5,180,5,196,5,3,70,5, +86,5,118,5,134,5,150,5,5,52,5,1,38,5,1,4,5,20,5,2,161,5,184,255,192,179,157, +160,72,5,184,255,192,64,37,152,155,72,100,5,116,5,2,54,5,70,5,86,5,3,36,5, +1,6,5,22,5,2,244,5,1,214,5,230,5,2,178,5,194,5,2,5,184,255,128,64,28,135, +138,72,86,5,102,5,2,36,5,52,5,68,5,3,2,5,18,5,2,212,5,228,5,244,5,3,5,184, +255,192,64,23,119,124,72,82,5,98,5,2,1,32,5,48,5,64,5,3,4,5,20,5,2,112,5, +184,255,128,64,9,103,111,72,68,5,84,5,2,5,184,255,192,179,99,102,72,5,184, +255,128,179,92,95,72,5,184,255,192,179,87,91,72,5,184,255,128,64,21,81,86, +72,36,5,52,5,68,5,3,228,5,1,176,5,192,5,208,5,3,5,184,255,192,64,16,67,70, +72,48,5,1,36,5,1,0,5,16,5,2,60,5,184,255,192,64,12,56,59,72,187,5,1,128,5, +144,5,2,5,184,255,192,64,41,45,48,72,11,5,1,208,5,224,5,2,164,5,180,5,196, +5,3,32,5,48,5,2,2,0,5,16,5,2,240,5,1,159,5,175,5,2,0,5,1,5,184,255,192,181, +13,17,72,0,155,1,0,47,237,1,43,93,93,93,113,95,113,113,113,114,43,114,114, +43,94,93,93,93,43,93,93,113,43,43,43,43,114,43,94,93,93,95,93,43,93,113,113, +113,43,113,113,113,114,114,114,114,43,43,94,93,93,93,93,93,43,113,113,113, +113,113,114,43,114,114,114,114,43,94,93,93,93,93,93,93,43,93,113,43,47,237, +49,48,19,53,51,21,187,195,1,190,220,220,0,0,255,255,255,245,0,0,5,238,5,131, +16,39,0,40,0,240,0,0,17,7,1,80,255,40,255,124,0,49,64,10,1,14,3,1,16,15,1, +0,15,1,184,255,113,64,19,15,15,1,1,37,0,208,0,1,191,0,1,47,0,1,47,0,1,0,16, +93,93,93,93,53,43,93,93,53,0,63,53,0,0,0,255,255,255,242,0,0,6,13,5,131,16, +39,0,43,0,237,0,0,17,7,1,80,255,37,255,124,0,95,185,0,19,255,192,179,21,21, +72,19,184,255,192,179,20,20,72,19,184,255,192,179,19,19,72,19,184,255,192, +179,17,17,72,19,184,255,192,64,13,14,14,72,1,14,3,1,16,15,1,0,15,1,184,255, +113,64,19,15,15,5,5,37,0,207,0,1,191,0,1,111,0,1,47,0,1,0,16,93,93,93,93, +53,43,93,93,53,0,63,53,1,43,43,43,43,43,0,255,255,255,232,0,0,2,85,5,131, +16,39,0,44,0,217,0,0,17,7,1,80,255,27,255,124,0,92,185,0,11,255,192,179,17, +17,72,11,184,255,192,64,23,12,12,72,11,64,11,11,72,11,64,9,9,72,1,6,3,1,16, +7,1,0,7,1,184,255,102,64,28,7,7,1,1,37,0,128,0,1,127,0,1,111,0,1,95,0,1,79, +0,1,47,0,1,47,0,1,0,16,93,93,93,93,93,93,93,53,43,93,93,53,0,63,53,1,43,43, +43,43,255,255,255,187,255,236,5,211,5,150,16,38,0,50,252,0,17,7,1,80,254, +238,255,124,0,39,64,10,2,42,3,2,192,40,1,0,40,1,184,255,94,64,11,40,40,10, +10,37,1,0,47,0,1,0,16,93,53,53,43,93,93,53,0,63,53,0,0,0,255,255,0,65,0,0, +6,171,5,131,16,39,0,60,1,130,0,0,17,7,1,80,255,116,255,124,5,192,64,21,16, +64,233,233,72,16,64,229,229,72,16,64,227,227,72,16,64,226,226,72,16,184,255, +192,179,224,224,72,16,184,255,192,64,19,222,222,72,16,64,220,220,72,16,64, +219,219,72,16,64,216,216,72,16,184,255,192,179,215,215,72,16,184,255,192, +64,19,211,211,72,16,64,207,207,72,16,64,206,206,72,16,64,205,205,72,16,184, +255,192,179,204,204,72,16,184,255,192,64,19,202,202,72,16,64,199,199,72,16, +64,186,186,72,16,64,184,184,72,16,184,255,192,179,183,183,72,16,184,255,192, +64,14,182,182,72,16,64,179,179,72,16,64,177,177,72,16,184,255,192,64,19,172, +172,72,16,64,166,166,72,16,64,164,164,72,16,64,163,163,72,16,184,255,192, +64,24,161,161,72,16,64,156,156,72,16,128,153,153,72,16,64,152,152,72,16,64, +151,151,72,16,184,255,192,179,149,149,72,16,184,255,128,179,148,148,72,16, +184,255,128,179,147,147,72,16,184,255,192,179,146,146,72,16,184,255,128,179, +145,145,72,16,184,255,192,179,144,144,72,16,184,255,128,179,141,141,72,16, +184,255,128,179,140,140,72,16,184,255,192,179,139,139,72,16,184,255,128,179, +138,138,72,16,184,255,192,179,137,137,72,16,184,255,192,179,136,136,72,16, +184,255,192,179,135,135,72,16,184,255,128,179,134,134,72,16,184,255,192,179, +133,133,72,16,184,255,128,179,131,131,72,16,184,255,192,179,130,130,72,16, +184,255,0,179,129,129,72,16,184,255,0,179,128,128,72,16,184,254,192,179,127, +127,72,16,184,255,0,179,126,126,72,16,184,255,0,179,125,125,72,16,184,255, +64,179,124,124,72,16,184,255,64,179,123,123,72,16,184,255,64,179,122,122, +72,16,184,255,0,179,121,121,72,16,184,254,192,179,120,120,72,16,184,255,0, +179,119,119,72,16,184,255,0,179,118,118,72,16,184,255,64,179,117,117,72,16, +184,255,0,179,116,116,72,16,184,255,64,179,115,115,72,16,184,255,0,179,114, +114,72,16,184,255,64,179,113,113,72,16,184,255,64,179,112,112,72,16,184,255, +64,179,111,111,72,16,184,255,128,179,110,110,72,16,184,255,64,179,109,109, +72,16,184,255,128,179,108,108,72,16,184,255,0,179,107,107,72,16,184,255,64, +179,106,106,72,16,184,255,0,179,105,105,72,16,184,255,64,179,104,104,72,16, +184,255,64,179,103,103,72,16,184,255,64,179,102,102,72,16,184,255,128,179, +101,101,72,16,184,255,64,179,100,100,72,16,184,255,64,179,99,99,72,16,184, +255,0,179,98,98,72,16,184,255,64,179,97,97,72,16,184,255,64,179,96,96,72, +16,184,255,64,179,95,95,72,16,184,255,64,179,94,94,72,16,184,255,64,179,93, +93,72,16,184,255,128,179,92,92,72,16,184,255,64,179,91,91,72,16,184,255,128, +179,90,90,72,16,184,255,64,179,89,89,72,16,184,255,128,179,88,88,72,16,184, +255,64,179,87,87,72,16,184,255,64,179,86,86,72,16,184,255,64,179,85,85,72, +16,184,255,64,179,84,84,72,16,184,255,64,179,83,83,72,16,184,255,128,179, +82,82,72,16,184,255,192,179,81,81,72,16,184,255,128,179,80,80,72,16,184,255, +128,179,79,79,72,16,184,255,64,179,78,78,72,16,184,255,64,179,77,77,72,16, +184,255,64,179,76,76,72,16,184,255,128,179,75,75,72,16,184,255,128,179,74, +74,72,16,184,255,128,179,73,73,72,16,184,255,64,179,72,72,72,16,184,255,128, +179,71,71,72,16,184,255,192,179,70,70,72,16,184,255,128,179,69,69,72,16,184, +255,192,179,68,68,72,16,184,255,192,179,67,67,72,16,184,255,128,179,66,66, +72,16,184,255,64,179,65,65,72,16,184,255,128,179,64,64,72,16,184,255,128, +179,63,63,72,16,184,255,128,179,62,62,72,16,184,255,192,179,61,61,72,16,184, +255,192,179,60,60,72,16,184,255,192,179,59,59,72,16,184,255,128,179,58,58, +72,16,184,255,128,179,57,57,72,16,184,255,128,179,56,56,72,16,184,255,128, +179,55,55,72,16,184,255,128,179,54,54,72,16,184,255,192,179,53,53,72,16,184, +255,192,179,52,52,72,16,184,255,128,179,51,51,72,16,184,255,192,179,50,50, +72,16,184,255,128,179,49,49,72,16,184,255,128,179,48,48,72,16,184,255,128, +179,47,47,72,16,184,255,192,179,46,46,72,16,184,255,128,179,45,45,72,16,184, +255,128,179,44,44,72,16,184,255,128,179,43,43,72,16,184,255,192,179,42,42, +72,16,184,255,192,179,41,41,72,16,184,255,192,179,40,40,72,16,184,255,192, +179,39,39,72,16,184,255,128,179,38,38,72,16,184,255,128,179,37,37,72,16,184, +255,128,179,36,36,72,16,184,255,192,179,35,35,72,16,184,255,128,179,34,34, +72,16,184,255,192,179,33,33,72,16,184,255,192,179,32,32,72,16,184,255,192, +179,31,31,72,16,184,255,192,179,30,30,72,16,184,255,192,179,29,29,72,16,184, +255,192,179,28,28,72,16,184,255,192,179,27,27,72,16,184,255,192,179,26,26, +72,16,184,255,192,179,25,25,72,16,184,255,192,179,24,24,72,16,184,255,128, +179,23,23,72,16,184,255,192,179,22,22,72,16,184,255,192,179,21,21,72,16,184, +255,192,179,17,17,72,16,184,255,128,179,16,16,72,16,184,255,192,179,15,15, +72,16,184,255,192,179,14,14,72,16,184,255,192,64,30,12,12,72,16,64,11,11, +72,1,11,3,1,128,12,1,112,12,1,96,12,1,64,12,1,16,12,1,0,12,1,184,255,166, +64,13,12,12,4,4,37,0,176,0,1,0,0,1,0,16,93,93,53,43,93,93,93,93,93,93,53, +0,63,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,187,0,0, +5,173,5,150,16,38,1,114,10,0,17,7,1,80,254,238,255,124,0,68,64,15,65,64,19, +19,72,1,60,3,1,144,58,1,16,58,1,184,255,62,64,28,58,58,53,53,37,0,159,0,1, +95,0,1,31,0,1,223,0,1,175,0,1,159,0,1,31,0,1,0,16,93,93,93,93,113,113,113, +53,43,93,93,53,0,63,53,1,43,0,0,255,255,255,176,0,0,2,30,6,65,16,38,1,130, +0,0,17,6,1,81,147,0,2,60,64,11,29,64,227,227,72,29,64,226,226,72,29,184,255, +192,179,223,223,72,29,184,255,192,179,220,220,72,29,184,255,192,64,19,219, +219,72,29,64,213,213,72,29,64,212,212,72,29,64,211,211,72,29,184,255,192, +179,207,207,72,29,184,255,192,179,206,206,72,29,184,255,192,64,19,205,205, +72,29,64,200,200,72,29,64,199,199,72,29,64,198,198,72,29,184,255,192,64,14, +192,192,72,29,64,182,182,72,29,64,177,177,72,29,184,255,192,179,175,175,72, +29,184,255,192,64,19,174,174,72,29,64,168,168,72,29,64,167,167,72,29,64,164, +164,72,29,184,255,192,179,161,161,72,29,184,255,192,64,19,160,160,72,29,64, +155,155,72,29,64,154,154,72,29,64,153,153,72,29,184,255,192,179,152,152,72, +29,184,255,192,64,19,151,151,72,29,64,141,141,72,29,64,132,132,72,29,64,131, +131,72,29,184,255,192,64,9,129,129,72,29,64,119,119,72,29,184,255,192,64, +14,115,115,72,29,64,110,110,72,29,64,109,109,72,29,184,255,192,64,19,106, +106,72,29,64,101,101,72,29,64,100,100,72,29,64,96,96,72,29,184,255,192,179, +94,94,72,29,184,255,192,64,19,93,93,72,29,64,87,87,72,29,64,86,86,72,29,64, +85,85,72,29,184,255,192,179,84,84,72,29,184,255,192,64,9,79,79,72,29,64,74, +74,72,29,184,255,192,64,24,61,61,72,29,64,56,56,72,29,64,55,55,72,29,64,54, +54,72,29,64,51,51,72,29,184,255,192,179,50,50,72,29,184,255,192,179,49,49, +72,29,184,255,192,64,19,48,48,72,29,64,42,42,72,29,64,41,41,72,29,64,40,40, +72,29,184,255,192,179,36,36,72,29,184,255,192,179,35,35,72,29,184,255,192, +64,19,34,34,72,29,64,29,29,72,29,64,24,24,72,29,64,23,23,72,29,184,255,192, +179,21,21,72,29,184,255,192,179,17,17,72,29,184,255,192,64,14,16,16,72,29, +64,9,9,72,29,64,8,8,72,29,184,255,192,64,12,7,7,72,3,2,1,14,17,38,3,2,1,184, +255,220,180,20,26,5,13,37,1,43,53,53,53,0,43,53,53,53,1,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,0,4,0,0,5,82,5,129, +18,6,0,36,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,0,1,0,168,0,1,4, +47,5,130,0,5,0,56,64,40,3,90,0,4,16,4,64,4,3,4,16,0,48,0,80,0,3,0,0,16,0, +32,0,64,0,96,0,128,0,160,0,7,7,0,2,95,5,3,3,18,0,63,63,237,1,47,94,93,113, +47,93,237,49,48,1,21,33,17,35,17,4,47,253,56,191,5,130,156,251,27,5,129,0, +2,0,61,0,0,5,26,5,129,0,5,0,18,0,176,64,26,106,7,122,7,138,7,3,101,17,117, +17,133,17,3,89,8,1,86,16,1,6,24,13,17,72,18,184,255,232,64,64,13,17,72,132, +2,1,70,2,102,2,118,2,3,139,1,1,73,1,105,1,121,1,3,2,1,12,12,0,6,95,3,1,16, +3,1,15,3,1,175,3,207,3,223,3,255,3,4,79,3,127,3,2,48,3,1,31,3,1,3,18,128, +0,1,0,184,255,192,64,29,21,30,72,0,48,20,1,47,20,1,0,3,6,3,18,95,5,18,12, +32,19,22,72,153,12,1,12,1,3,0,63,51,93,43,63,237,23,50,1,93,93,47,43,93,51, +47,93,93,93,93,113,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93,43,43,93, +93,93,93,49,48,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,62,2,5,217,1,254,251, +35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12,141, +156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,255,255,0,168,0,0,4,254,5,129, +18,6,0,40,0,0,255,255,0,65,0,0,4,163,5,129,18,6,0,61,0,0,255,255,0,168,0, +0,5,32,5,129,18,6,0,43,0,0,0,3,0,97,255,236,5,215,5,150,0,19,0,39,0,43,0, +179,64,130,105,12,1,102,17,1,89,22,1,86,32,1,86,28,1,26,23,90,23,2,21,27, +85,27,2,9,42,1,6,43,1,10,37,26,37,90,37,3,5,33,21,33,85,33,3,9,43,42,30,0, +91,15,20,1,59,207,20,239,20,2,0,20,1,239,20,255,20,2,176,20,1,111,20,1,48, +20,1,31,20,1,0,20,16,20,32,20,64,20,80,20,160,20,6,7,20,30,91,175,10,191, +10,2,32,10,1,15,10,31,10,2,10,43,95,40,40,35,25,95,15,4,35,95,5,19,128,45, +1,32,45,1,93,93,0,63,237,63,237,18,57,47,237,1,47,93,93,93,237,47,94,93,113, +113,113,113,113,114,114,94,93,237,18,57,57,49,48,94,93,93,93,93,93,93,93, +93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,37,33,21,33,5,215,95,180,254,252,165,174, +254,250,174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127, +63,65,127,189,123,132,191,123,59,252,226,2,75,253,181,2,199,165,254,242,192, +104,109,195,1,12,159,165,1,10,187,101,102,188,254,246,163,127,208,148,80, +80,148,208,127,127,211,153,85,86,153,212,208,160,0,0,0,255,255,0,189,0,0, +1,124,5,129,18,6,0,44,0,0,255,255,0,168,0,0,5,63,5,129,18,6,0,46,0,0,0,1, +0,10,0,1,5,78,5,130,0,16,0,202,64,11,116,16,132,16,2,123,15,139,15,2,13,184, +255,232,182,14,17,72,54,13,1,12,184,255,240,64,127,13,17,72,2,16,13,17,72, +1,24,14,17,72,57,1,1,111,18,1,48,18,1,47,18,1,0,18,1,21,16,37,16,53,16,3, +6,16,1,230,16,246,16,2,16,26,15,42,15,58,15,3,9,15,1,233,15,249,15,2,15,7, +7,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,13,175,14,191,14,2,14,26,1,42, +1,58,1,3,9,1,1,233,1,249,1,2,1,16,0,32,0,48,0,3,111,0,1,0,0,48,0,2,0,118, +7,134,7,2,7,15,3,14,0,18,0,63,50,63,51,93,1,47,93,93,113,50,93,113,113,47, +93,51,93,113,113,57,61,47,51,93,113,113,51,93,113,113,93,93,93,93,49,48,93, +43,43,43,93,43,93,93,37,35,1,46,1,39,38,39,6,7,14,1,7,1,35,1,51,5,78,201, +254,124,17,29,12,14,12,13,14,12,30,15,254,122,201,2,63,198,1,3,224,47,89, +35,41,37,39,41,35,89,45,252,32,5,129,0,255,255,0,168,0,0,6,2,5,129,18,6,0, +48,0,0,255,255,0,168,0,0,5,32,5,129,18,6,0,49,0,0,0,3,0,90,0,0,4,217,5,129, +0,3,0,7,0,11,0,75,64,49,82,3,1,10,9,5,3,95,6,1,15,6,31,6,175,6,191,6,4,6, +2,16,5,48,5,2,32,5,64,5,112,5,160,5,4,5,10,95,11,11,0,7,95,6,18,3,95,0,3, +0,63,237,63,237,17,57,47,237,1,47,93,113,51,47,93,113,51,18,57,57,49,48,113, +19,33,21,33,1,21,33,53,1,21,33,53,125,4,57,251,199,4,92,251,129,3,228,252, +183,5,129,156,251,183,156,156,2,133,154,154,0,0,0,255,255,0,97,255,236,5, +215,5,150,18,6,0,50,0,0,0,1,0,168,0,0,5,32,5,129,0,7,0,79,64,40,3,90,0,4, +16,4,64,4,3,7,4,7,90,64,111,0,127,0,143,0,191,0,4,0,0,9,128,32,9,1,32,9,160, +9,176,9,192,9,4,9,184,255,192,64,10,14,17,72,2,95,5,3,4,0,18,0,63,50,63,237, +1,43,93,113,26,16,204,47,93,26,237,47,94,93,237,49,48,33,17,33,17,35,17,33, +17,4,97,253,6,191,4,120,4,224,251,32,5,129,250,127,255,255,0,168,0,0,4,234, +5,129,18,6,0,51,0,0,0,1,0,108,0,0,4,161,5,129,0,12,0,188,64,135,169,3,1,105, +9,1,116,9,132,9,164,9,3,148,8,164,8,2,87,8,103,8,2,145,7,1,84,7,100,7,2,146, +10,162,10,2,116,10,132,10,2,70,10,86,10,102,10,3,57,3,185,3,2,249,3,1,103, +3,1,168,8,1,103,8,1,8,100,2,1,39,2,1,175,6,1,2,6,2,6,1,208,11,1,0,11,16,11, +48,11,80,11,96,11,128,11,6,7,11,70,7,1,11,7,1,7,3,3,10,175,1,191,1,2,32,1, +1,15,1,1,1,3,7,95,9,2,8,3,0,4,3,1,10,95,0,18,0,63,237,50,63,18,23,57,237, +50,1,47,93,93,93,51,51,47,51,113,113,47,94,93,93,18,57,57,47,47,93,113,113, +51,113,113,113,113,114,49,48,93,93,93,93,93,93,93,93,113,93,51,53,9,1,53, +33,21,33,1,21,1,33,21,108,2,26,253,247,3,231,252,240,1,202,254,22,3,109,162, +2,67,1,251,161,156,254,67,124,253,240,156,0,255,255,0,46,0,0,4,180,5,129, +18,6,0,55,0,0,255,255,0,45,0,0,5,41,5,129,18,6,0,60,0,0,0,3,0,117,255,245, +5,238,5,139,0,29,0,40,0,51,0,180,185,0,28,255,240,179,12,15,72,17,184,255, +240,179,12,15,72,27,184,255,240,179,12,15,72,18,184,255,240,64,72,12,15,72, +41,90,11,15,123,15,171,15,3,15,8,30,90,4,0,116,0,164,0,3,0,35,24,7,90,47, +21,4,8,1,20,8,36,8,68,8,116,8,164,8,244,8,6,8,20,53,68,53,2,0,53,1,132,53, +164,53,196,53,244,53,4,112,53,1,2,96,53,1,53,184,255,192,64,24,10,13,72,35, +46,96,10,6,10,34,49,96,20,24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57, +47,47,17,51,16,237,50,17,51,16,237,50,1,43,93,95,93,93,113,113,47,93,113, +51,51,253,50,50,220,93,237,16,220,93,237,49,48,0,43,43,43,43,1,20,14,2,43, +1,21,35,53,35,34,46,2,53,52,62,2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17, +51,50,62,2,37,20,30,2,59,1,17,35,34,6,5,238,64,131,197,133,83,185,83,133, +197,131,64,67,133,201,135,72,185,71,135,202,133,67,192,185,183,48,56,92,136, +89,43,252,7,43,89,136,92,56,52,182,182,2,224,105,188,143,84,227,227,84,143, +188,105,113,185,131,72,182,182,72,131,185,117,187,180,253,22,53,98,140,88, +88,140,98,53,2,234,180,255,255,0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,145, +0,0,6,30,5,129,0,35,0,203,64,127,90,31,106,31,2,85,30,101,30,2,90,4,106,4, +2,90,5,106,5,2,74,22,1,69,13,1,3,25,90,100,28,1,132,28,148,28,2,28,19,35, +90,0,10,90,107,7,1,139,7,155,7,2,7,16,219,0,1,4,0,100,0,132,0,3,219,0,1,4, +0,52,0,68,0,100,0,132,0,148,0,180,0,196,0,8,7,0,4,37,36,37,52,37,68,37,132, +37,196,37,212,37,7,228,37,244,37,2,160,37,1,132,37,148,37,2,96,37,112,37, +2,84,37,1,64,37,1,2,37,184,255,192,64,18,9,12,72,34,2,96,19,239,15,1,15,15, +26,17,8,3,0,18,0,63,63,51,51,57,47,93,51,237,50,1,43,95,93,93,93,93,93,93, +113,47,94,93,93,113,113,51,220,93,113,237,16,253,50,220,93,113,237,49,48, +95,93,93,93,0,93,1,93,0,93,33,17,35,34,46,2,53,17,51,17,20,30,2,59,1,17,51, +17,51,50,62,2,53,17,51,17,20,14,2,43,1,17,2,251,83,133,201,134,67,191,47, +93,139,92,56,185,56,95,140,91,45,191,68,134,201,132,83,1,171,84,142,189,104, +1,207,254,45,80,137,100,57,3,73,252,183,57,100,137,80,1,211,254,49,104,189, +142,84,254,85,0,0,0,1,0,87,0,0,5,163,5,150,0,57,0,225,64,91,101,36,1,101, +22,1,157,49,1,143,49,1,49,16,11,15,72,157,9,1,143,9,1,9,16,11,15,72,116,3, +132,3,2,54,3,1,54,2,118,2,2,54,56,118,56,2,116,55,132,55,2,54,55,1,42,26, +1,42,32,1,41,53,48,40,10,18,96,40,112,40,144,40,3,111,18,127,18,159,18,3, +40,18,40,18,24,34,91,80,53,1,53,184,255,192,64,69,27,30,72,191,53,207,53, +2,48,53,1,53,17,5,91,31,24,79,24,2,224,24,1,15,24,31,24,95,24,207,24,223, +24,5,160,24,1,111,24,159,24,2,0,24,32,24,48,24,3,8,24,95,59,1,10,15,19,39, +48,5,42,95,18,41,18,29,95,0,4,0,63,237,63,51,237,23,50,1,93,47,94,93,93,93, +113,113,114,253,196,47,93,93,43,114,237,17,57,57,47,47,93,93,17,51,17,51, +16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,1,50,30,2, +21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46,2,35,34,14,2,21,20,30, +2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,2,253,151,241,168,90,59,109, +157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116,169,108,109,170,116, +61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109,59,90,168,241,5,150, +86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51,126,143,159,85,116,181, +124,65,65,124,181,116,85,159,143,126,51,224,156,4,2,3,2,54,138,167,191,106, +147,234,162,86,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218, +0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,3,0,45, +0,0,5,41,6,178,0,8,0,12,0,16,2,114,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5, +1,3,5,1,16,3,5,184,255,232,64,255,12,15,72,12,133,9,16,133,64,13,5,4,14,2, +1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8,6,1,90,38,2,86,2,150,2,3, +118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,18,169,18,201,18,3,86,18,1,9,18, +57,18,2,25,18,89,18,137,18,249,18,4,6,18,1,202,249,18,1,230,18,1,9,18,25, +18,185,18,201,18,4,198,18,1,89,18,121,18,169,18,3,54,18,1,41,18,57,18,185, +18,233,18,4,11,18,1,153,249,18,1,198,18,214,18,2,178,18,1,164,18,1,150,18, +1,130,18,1,116,18,1,86,18,102,18,2,66,18,1,36,18,52,18,2,18,18,1,4,18,1,244, +18,1,230,18,1,196,18,212,18,2,166,18,182,18,2,146,18,1,132,18,1,118,18,1, +98,18,1,84,18,1,54,18,70,18,2,36,18,1,22,18,1,4,18,1,242,18,1,1,208,18,224, +18,2,196,18,1,160,18,176,18,2,148,18,1,112,18,1,100,18,1,64,18,1,20,18,36, +18,52,18,3,0,18,1,105,64,202,228,18,244,18,2,208,18,1,164,18,180,18,196,18, +3,128,18,144,18,2,116,18,1,80,18,96,18,2,68,18,1,32,18,1,4,18,20,18,2,244, +18,1,224,18,1,196,18,212,18,2,176,18,1,84,18,100,18,116,18,148,18,164,18, +5,48,18,64,18,2,36,18,1,0,18,1,196,18,244,18,2,144,18,1,4,18,20,18,36,18, +68,18,84,18,116,18,132,18,7,57,224,18,1,132,18,164,18,212,18,3,112,18,1,4, +18,36,18,52,18,84,18,100,18,5,228,18,244,18,2,192,18,1,180,18,1,144,18,1, +4,18,20,18,52,18,84,18,132,18,5,212,18,228,18,2,187,18,1,164,18,1,112,18, +1,2,48,18,96,18,2,15,18,47,18,2,10,14,145,9,95,13,1,13,64,9,12,72,13,0,3, +59,3,75,3,123,3,3,3,1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,47,43,93,51,237, +50,1,93,93,95,93,93,93,93,113,113,113,113,113,114,114,114,114,94,93,93,93, +113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,95,93,113,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,113,113, +113,114,114,114,94,93,93,113,113,113,47,94,93,93,93,113,253,57,206,94,93, +93,50,43,1,24,16,77,230,50,47,26,237,220,237,49,48,43,95,94,93,93,43,93,93, +1,17,35,19,1,51,9,1,51,37,53,51,21,33,53,51,21,3,9,190,2,253,224,205,1,178, +1,176,205,253,249,163,253,211,165,2,72,253,184,2,72,3,57,253,97,2,159,121, +184,184,184,184,255,255,0,86,255,236,4,101,6,7,18,38,1,122,0,0,17,7,1,80, +1,33,0,0,0,19,64,11,2,60,17,38,2,26,60,63,8,23,37,1,43,53,0,43,53,0,0,0,255, +255,0,70,255,236,3,106,6,7,18,38,1,126,0,0,17,7,1,80,0,202,0,0,0,19,64,11, +1,58,17,38,1,73,58,61,16,6,37,1,43,53,0,43,53,0,0,0,255,255,0,106,254,88, +3,238,6,7,18,38,1,128,0,0,17,7,1,80,1,57,0,0,0,19,64,11,1,36,17,38,1,100, +36,39,17,34,37,1,43,53,0,43,53,0,0,0,255,255,0,137,0,0,1,178,6,7,18,38,1, +130,0,0,17,6,1,80,209,0,0,27,64,17,1,14,17,38,1,16,14,1,0,14,1,29,14,17,5, +13,37,1,43,93,93,53,0,43,53,0,255,255,0,133,255,236,3,254,6,65,18,38,1,142, +0,0,17,7,1,81,0,222,0,0,0,30,64,9,3,2,1,32,17,38,3,2,1,184,255,241,180,38, +44,10,0,37,1,43,53,53,53,0,43,53,53,53,0,2,0,86,255,236,4,101,4,78,0,39,0, +59,1,15,64,196,122,48,138,48,2,121,52,137,52,2,101,43,1,90,58,106,58,2,54, +14,70,14,2,29,31,45,31,2,29,38,45,38,2,47,37,1,29,37,1,75,36,107,36,2,47, +36,63,36,2,29,36,1,139,35,1,47,35,1,29,35,1,47,34,1,29,34,1,47,22,1,27,22, +1,47,21,1,27,21,1,75,20,107,20,2,47,20,1,27,20,1,45,19,1,27,19,1,121,6,137, +6,2,11,6,27,6,2,34,48,18,22,72,34,33,22,48,18,22,72,22,23,26,33,42,33,2,73, +23,1,26,23,42,23,2,33,23,159,28,175,28,191,28,3,28,64,29,33,72,28,64,0,16, +22,34,4,144,50,160,50,176,50,3,127,50,1,32,50,64,50,2,50,61,128,40,71,8,16, +61,1,0,50,28,16,4,23,33,21,23,15,55,80,11,16,45,80,5,22,0,63,237,63,237,63, +63,18,23,57,1,93,47,237,26,16,220,93,93,93,23,50,26,205,43,93,50,50,93,93, +93,17,51,43,17,51,43,49,48,0,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,0,93,1,93,0,93,1,93,37,14,3,35,34,2,17,16,18, +51,50,30,2,23,51,62,3,55,51,14,3,7,30,3,23,35,46,3,39,1,20,30,2,51,50,62, +2,55,46,3,35,34,14,2,3,75,26,65,87,111,70,205,193,217,209,69,112,86,63,20, +2,4,14,19,23,13,188,22,46,39,30,5,3,23,31,36,18,183,11,21,16,13,3,253,196, +28,59,93,66,54,100,82,61,14,12,45,71,102,70,66,96,64,31,237,56,94,69,38,1, +20,1,24,1,28,1,26,39,69,93,54,21,56,63,65,30,47,128,139,139,58,103,175,144, +110,39,28,66,65,58,20,1,49,112,160,103,48,52,107,160,108,86,154,115,68,46, +102,163,0,2,0,142,254,87,4,73,5,204,0,32,0,62,0,185,64,68,149,20,1,154,16, +1,123,7,139,7,2,122,60,138,60,2,106,3,122,3,138,3,3,102,31,118,31,2,74,50, +90,50,106,50,3,21,2,37,2,101,2,117,2,133,2,5,147,21,1,21,21,37,21,2,28,48, +23,72,52,48,48,64,48,2,96,48,1,48,184,255,192,64,58,20,23,72,48,52,48,52, +14,0,72,64,48,43,64,43,160,43,3,160,43,176,43,192,43,3,43,64,128,33,13,70, +0,14,16,14,48,14,3,8,14,28,48,80,49,49,38,57,80,18,0,13,27,33,38,80,9,5,22, +0,63,51,237,50,63,63,237,18,57,47,237,57,1,47,94,93,237,50,26,16,220,93,113, +26,237,18,57,57,47,47,43,93,113,16,237,17,57,49,48,93,93,93,93,93,0,93,93, +93,1,93,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35,17,52,54,51,50,30,2,21, +20,14,2,7,30,3,1,30,3,51,50,62,2,53,52,46,2,35,53,62,1,53,52,46,2,35,34,14, +2,21,4,73,53,111,173,120,102,160,56,6,3,3,180,228,226,99,152,102,53,35,61, +81,46,57,114,91,56,252,249,28,71,81,87,43,72,110,73,38,38,81,128,89,127,113, +27,57,87,60,70,104,68,34,1,149,89,154,116,66,55,39,57,92,53,254,215,5,172, +237,220,47,90,130,82,73,111,82,56,18,11,55,93,137,254,218,19,34,25,14,41, +76,106,66,65,110,81,45,142,27,139,122,44,77,57,32,35,77,122,88,0,0,0,0,1, +0,7,254,88,3,249,4,58,0,24,0,237,64,59,59,22,75,22,2,41,22,1,59,21,75,21, +2,26,21,42,21,2,9,21,1,42,12,58,12,74,12,3,25,12,1,77,13,1,13,16,13,16,72, +66,2,1,54,2,1,34,2,1,6,2,22,2,2,13,2,1,1,17,1,184,255,240,64,76,13,16,72, +24,15,7,7,13,14,16,15,14,47,14,2,57,31,14,63,14,95,14,127,14,159,14,191,14, +223,14,255,14,8,63,14,127,14,159,14,191,14,223,14,255,14,6,0,14,32,14,2,224, +14,1,191,14,1,160,14,1,95,14,159,14,2,0,14,16,14,64,14,3,8,14,1,0,184,255, +240,64,17,127,0,1,0,64,26,1,0,26,48,26,96,26,144,26,4,26,184,255,192,64,14, +21,26,72,7,15,24,3,25,20,27,13,13,0,15,0,63,50,47,63,17,23,51,1,43,93,113, +47,93,56,50,47,94,93,93,93,93,93,113,113,114,94,93,56,51,57,61,47,51,51,49, +48,43,94,93,94,93,93,93,93,43,93,93,93,93,93,93,93,93,19,51,19,30,3,23,62, +3,55,19,51,1,14,3,7,35,62,1,55,7,192,245,7,21,20,17,4,5,18,21,22,8,239,191, +254,122,17,31,27,23,7,191,17,48,24,4,58,253,93,22,63,67,63,22,21,62,67,63, +22,2,165,251,251,45,111,124,132,65,131,213,91,0,0,0,2,0,86,255,236,4,29,5, +204,0,19,0,50,0,156,64,81,115,28,131,28,2,106,28,1,118,46,134,46,2,106,46, +1,90,2,106,2,2,90,17,106,17,2,85,13,101,13,2,114,26,130,26,2,38,26,1,128, +25,1,114,25,1,51,25,67,25,2,50,50,31,71,0,64,25,46,5,47,47,41,31,0,1,144, +0,1,0,52,128,10,71,31,41,1,41,47,20,80,5,184,255,224,64,22,23,28,72,5,24, +18,22,72,111,5,1,90,5,1,5,46,48,0,15,80,36,22,0,63,237,63,57,57,93,93,43, +43,237,50,1,47,93,237,26,16,204,93,113,17,57,47,57,57,51,26,16,237,50,47, +49,48,93,93,93,93,93,93,93,93,93,93,93,93,1,52,46,2,39,14,3,21,20,30,2,51, +50,62,2,1,34,46,2,39,1,30,3,21,20,14,2,35,34,46,2,53,52,62,2,55,1,53,33,21, +3,96,49,69,76,26,73,134,102,60,35,73,111,77,81,112,69,31,254,255,13,42,45, +41,13,1,60,54,102,79,49,64,123,180,115,114,180,125,66,73,127,169,96,254,193, +2,221,1,215,85,145,115,86,27,26,81,114,146,91,76,131,96,55,54,95,131,3,191, +2,3,2,1,254,188,55,116,134,159,97,110,182,131,72,68,127,183,115,112,176,135, +97,33,1,83,119,132,0,1,0,70,255,236,3,106,4,78,0,57,0,179,64,49,140,37,1, +133,3,1,53,36,69,36,2,55,34,1,42,8,1,37,5,1,14,24,9,12,72,10,29,26,29,42, +29,3,42,70,21,48,27,48,27,48,16,35,35,6,64,37,48,72,6,184,255,192,179,14, +17,72,6,184,255,192,64,66,8,11,72,6,59,53,71,31,16,63,16,79,16,95,16,4,16, +64,37,43,72,16,128,59,1,31,59,95,59,2,21,48,80,15,47,31,47,79,47,95,47,175, +47,223,47,239,47,7,191,47,207,47,2,47,47,0,39,80,36,32,16,0,80,5,11,22,0, +63,51,237,63,51,237,18,57,47,93,113,237,57,1,93,113,47,43,93,237,16,198,43, +43,43,50,47,17,57,57,47,47,18,57,237,49,48,93,43,0,93,1,93,0,93,93,93,93, +37,50,62,2,55,23,14,3,35,34,46,2,53,52,62,2,55,53,46,3,53,52,62,2,51,50,22, +23,7,46,1,35,34,6,21,20,30,2,51,21,34,14,2,21,20,30,2,1,200,54,96,79,63,21, +105,32,84,106,130,78,96,141,92,45,42,72,96,54,51,85,61,34,50,95,136,87,118, +191,67,128,47,125,75,91,96,55,97,131,75,72,139,109,66,29,52,74,114,31,48, +56,26,100,39,71,53,32,46,84,116,69,58,95,69,42,5,2,6,40,64,86,51,62,106,77, +44,86,99,88,71,68,85,74,57,70,37,12,135,11,40,80,69,45,69,46,24,0,0,0,1,0, +86,254,159,3,96,5,204,0,56,0,209,64,117,169,38,1,156,29,172,29,2,149,55,165, +55,2,173,39,1,124,39,140,39,156,39,3,117,8,1,115,2,1,100,36,132,36,148,36, +164,36,4,139,24,155,24,171,24,3,57,24,1,44,31,156,31,172,31,3,44,30,60,30, +76,30,3,100,54,132,54,164,54,3,38,54,86,54,2,240,47,1,47,47,21,0,71,33,40, +50,50,10,31,21,79,21,2,191,21,1,21,64,29,33,72,0,21,16,21,32,21,64,21,4,7, +21,50,47,80,5,26,0,184,255,240,64,31,19,22,72,135,0,151,0,2,218,33,1,169, +33,185,33,201,33,3,136,33,152,33,2,26,33,0,3,15,48,0,15,0,47,63,18,23,57, +93,93,93,93,43,17,51,237,50,1,47,94,93,43,93,113,205,50,47,51,47,237,18,57, +47,113,49,48,93,93,93,93,0,93,93,1,93,0,93,93,1,93,93,93,0,93,1,93,1,20,30, +2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,55,53,14,3,35, +33,53,33,21,14,5,1,21,43,74,100,57,54,111,90,58,18,26,29,10,126,9,19,16,11, +36,66,94,57,42,89,82,73,54,31,49,85,113,127,135,64,12,34,36,34,11,254,167, +2,130,62,131,123,108,81,47,1,123,64,79,49,31,15,15,34,57,88,68,34,68,62,51, +17,56,12,33,38,39,19,34,45,33,25,13,10,23,36,50,74,100,67,83,176,176,175, +166,155,68,4,1,1,1,1,131,127,70,157,166,172,171,166,0,0,0,0,1,0,106,254,88, +3,238,4,78,0,35,0,100,185,0,32,255,232,64,46,9,12,72,35,70,64,80,0,1,159, +0,255,0,2,0,37,128,23,12,70,192,13,1,0,13,16,13,48,13,224,13,240,13,5,8,13, +240,37,1,255,37,1,112,37,1,37,184,255,192,64,14,19,23,72,35,27,23,6,80,29, +16,17,15,12,21,0,63,63,63,237,50,63,1,43,93,93,113,47,94,93,113,237,50,26, +16,220,93,113,26,237,49,48,43,1,17,52,46,2,35,34,14,2,21,17,35,17,52,38,39, +51,30,3,21,51,62,3,51,50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,22, +14,170,9,14,10,5,3,26,62,82,106,70,90,130,84,39,254,88,4,86,79,106,65,27, +45,85,125,81,253,141,3,83,68,121,42,21,48,49,47,20,47,76,53,29,44,92,145, +100,251,135,0,0,0,0,3,0,106,255,236,4,9,5,203,0,15,0,26,0,37,0,194,64,108, +153,19,169,19,2,150,24,166,24,2,138,2,1,133,5,1,138,14,1,133,10,1,124,36, +140,36,2,115,29,131,29,2,85,29,101,29,2,124,18,140,18,2,74,18,90,18,106,18, +3,115,25,131,25,2,69,25,85,25,101,25,3,6,13,22,13,2,6,10,1,9,5,1,9,2,1,7, +33,0,71,64,15,21,31,21,127,21,143,21,239,21,255,21,6,21,64,45,48,72,21,39, +128,32,22,71,32,8,1,8,184,255,192,183,29,35,72,8,48,39,1,39,184,255,192,64, +19,30,35,72,223,39,1,22,80,32,32,16,27,80,11,0,16,80,3,22,0,63,237,63,237, +18,57,47,237,1,93,43,113,47,43,93,237,50,26,16,220,43,113,26,237,51,49,48, +0,94,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,16,2,35,34,46, +1,2,53,16,18,51,50,30,1,18,1,50,62,2,55,33,30,3,19,34,14,2,7,33,46,3,4,9, +240,228,108,171,118,62,233,232,121,175,112,54,254,42,62,100,73,42,3,253,221, +3,44,71,94,66,62,99,72,42,3,2,35,3,40,69,97,2,221,254,131,254,140,92,186, +1,27,192,1,117,1,121,93,188,254,231,252,216,52,128,216,164,164,215,129,52, +4,217,51,126,212,161,161,212,126,51,0,0,0,1,0,137,0,0,1,141,4,58,0,13,1,13, +64,210,13,8,70,207,5,223,5,2,0,5,32,5,208,5,3,9,5,5,14,15,95,15,111,15,2, +32,15,1,224,15,240,15,2,111,15,127,15,143,15,3,0,15,16,15,32,15,3,205,207, +15,223,15,239,15,3,96,15,1,127,15,207,15,2,64,15,80,15,2,175,15,223,15,239, +15,3,96,15,112,15,2,15,15,31,15,2,154,255,15,1,208,15,224,15,2,63,15,1,159, +15,175,15,2,112,15,1,223,15,1,144,15,1,63,15,79,15,2,0,15,1,106,159,15,223, +15,239,15,3,96,15,112,15,2,15,15,1,239,15,255,15,2,128,15,208,15,2,63,15, +1,96,15,1,15,15,31,15,2,55,207,15,255,15,2,144,15,160,15,176,15,3,31,15,47, +15,63,15,3,176,15,192,15,208,15,3,15,15,31,15,111,15,3,144,15,160,15,224, +15,3,31,15,63,15,2,0,15,1,7,6,15,0,21,0,63,63,1,94,93,93,93,113,113,114,114, +114,94,93,93,113,113,113,114,114,114,94,93,93,93,93,113,113,114,114,114,94, +93,93,93,113,113,114,114,94,93,93,93,113,113,17,18,57,47,94,93,113,237,50, +49,48,51,46,3,53,17,51,17,20,30,2,23,199,15,24,15,8,180,11,21,30,18,16,53, +64,70,33,3,78,252,169,32,64,60,52,19,0,0,0,1,0,138,0,0,4,3,4,58,0,11,0,158, +64,114,148,9,164,9,2,102,9,118,9,134,9,3,172,0,1,139,0,155,0,2,105,0,121, +0,2,86,10,150,10,166,10,3,151,10,167,10,2,84,10,1,70,7,134,7,2,1,10,247,8, +1,8,10,9,16,9,9,0,11,16,0,11,160,11,2,0,11,16,11,32,11,64,11,160,11,224,11, +6,7,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2, +1,7,10,4,8,5,15,4,0,21,0,63,50,63,51,23,57,1,93,93,47,94,93,237,50,47,94, +93,113,56,51,57,47,56,57,51,113,17,51,49,48,0,93,93,93,1,93,93,93,93,93,93, +33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73, +1,206,1,238,109,254,127,4,58,253,243,2,13,254,47,253,151,0,0,0,0,1,0,14,0, +0,3,238,5,204,0,33,1,60,64,101,149,15,1,157,23,1,138,2,1,137,1,1,137,25,153, +25,2,140,21,156,21,2,115,0,131,0,147,0,3,140,20,156,20,2,106,20,122,20,2, +146,32,1,132,32,1,101,32,117,32,2,3,102,26,118,26,150,26,3,141,26,157,26, +2,2,126,26,1,108,26,1,3,84,18,1,148,31,1,101,31,117,31,133,31,3,86,31,1,146, +29,1,2,128,29,1,84,29,1,144,28,1,28,184,255,224,64,59,13,16,72,146,27,1,84, +27,100,27,116,27,3,93,0,109,0,2,149,17,1,73,17,1,150,18,1,138,18,1,101,18, +117,18,2,38,18,86,18,2,42,3,58,3,74,3,122,3,138,3,5,26,0,20,10,10,19,32,33, +184,255,240,64,69,33,20,19,16,31,19,63,19,2,31,19,63,19,95,19,127,19,159, +19,191,19,223,19,255,19,8,223,19,255,19,2,192,19,1,95,19,159,19,2,0,19,16, +19,64,19,3,8,19,0,35,48,35,96,35,160,35,176,35,5,26,0,13,33,19,21,6,80,13, +0,0,63,237,63,51,18,57,57,1,93,47,94,93,93,93,93,113,114,56,51,47,56,51,18, +57,47,18,57,57,49,48,93,93,93,93,93,93,93,0,93,1,93,93,43,93,93,93,95,93, +93,93,93,0,93,95,93,93,95,93,1,93,95,93,93,93,93,93,93,93,93,93,93,93,0,93, +1,39,46,3,35,34,6,7,39,62,1,51,50,30,2,23,1,35,3,46,3,39,14,3,7,1,35,1,207, +36,27,42,45,57,40,11,32,6,35,25,72,32,55,87,73,67,36,1,171,190,207,8,18,18, +16,5,7,22,25,24,8,254,255,187,3,197,99,73,105,67,31,7,3,130,9,15,36,81,131, +95,251,139,2,65,22,56,59,56,21,21,60,62,55,18,253,193,0,0,0,1,0,138,254,119, +4,6,4,58,0,41,0,108,64,55,13,40,14,17,72,90,8,106,8,2,35,70,5,15,34,95,34, +2,159,34,175,34,255,34,3,0,34,16,34,32,34,3,7,34,43,23,19,70,0,20,16,20,48, +20,240,20,4,8,20,96,43,128,43,2,43,184,255,192,64,15,20,23,72,41,21,34,21, +15,19,5,28,80,14,11,22,0,63,51,237,50,47,63,51,63,1,43,93,47,94,93,237,50, +16,220,94,93,93,113,50,237,49,48,0,93,1,43,33,46,3,53,35,14,3,35,34,38,39, +35,30,1,21,17,35,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,30,2,23,3,94, +1,3,3,3,4,26,56,69,86,57,82,120,32,4,3,1,182,182,25,59,98,74,67,100,67,33, +181,1,2,2,1,6,46,59,59,20,51,79,53,27,64,58,32,63,27,254,139,5,195,253,124, +69,116,85,47,52,91,126,75,2,105,252,175,34,76,67,49,7,0,0,1,0,0,0,0,3,178, +4,58,0,18,2,35,64,79,130,17,146,17,162,17,3,153,6,169,6,2,131,8,147,8,163, +8,3,3,87,8,103,8,119,8,3,6,5,9,32,14,17,72,9,9,7,15,16,16,0,70,64,91,12,107, +12,123,12,3,91,12,219,12,235,12,3,180,12,196,12,2,11,12,27,12,59,12,91,12, +107,12,5,7,12,20,128,8,7,184,255,240,64,255,7,11,20,27,20,2,11,20,27,20,75, +20,91,20,139,20,155,20,203,20,219,20,8,255,20,1,196,20,212,20,2,160,20,1, +132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4,20,20,20,2,199,224,20,1,196, +20,212,20,2,160,20,1,4,20,20,20,68,20,84,20,132,20,148,20,6,68,20,84,20,132, +20,148,20,196,20,212,20,6,27,20,1,4,20,1,219,20,1,196,20,1,155,20,1,132,20, +1,91,20,1,68,20,1,27,20,1,4,20,1,151,11,20,27,20,75,20,91,20,139,20,155,20, +203,20,219,20,8,155,20,203,20,219,20,3,132,20,1,96,20,1,68,20,84,20,2,32, +20,1,4,20,20,20,2,224,20,1,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20, +1,4,20,20,20,68,20,84,20,4,103,4,20,20,20,68,20,84,20,132,20,148,20,196,20, +212,20,8,219,20,1,196,20,1,155,20,1,132,20,1,91,20,1,68,20,1,27,20,1,4,20, +1,219,20,1,196,20,1,11,20,27,20,75,20,91,20,139,20,155,20,64,93,6,55,75,20, +91,20,139,20,155,20,203,20,219,20,6,63,20,1,32,20,1,4,20,20,20,2,224,20,1, +196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4, +20,20,20,2,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,2,80,20,1,47, +20,1,0,20,16,20,2,7,15,7,15,9,6,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93, +93,113,113,113,113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113, +113,113,113,113,113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114, +94,93,93,93,93,93,93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93, +93,93,93,113,114,47,56,51,26,16,220,94,93,93,113,114,26,237,50,17,51,17,57, +61,47,43,51,51,49,48,93,95,93,93,93,1,20,14,2,7,35,1,51,1,54,18,53,52,38, +39,51,30,1,3,178,63,106,140,77,170,254,122,189,1,55,142,124,29,20,177,24, +28,3,78,99,218,221,214,94,4,58,252,96,185,1,86,156,81,119,45,45,113,0,0,0, +1,0,86,254,159,3,106,5,204,0,74,1,0,64,125,122,71,138,71,2,101,33,117,33, +133,33,3,105,39,1,85,50,1,83,44,1,57,2,1,110,66,126,66,142,66,3,26,66,42, +66,2,12,29,28,29,44,29,3,13,40,9,12,72,12,73,28,73,44,73,108,73,124,73,140, +73,6,5,11,95,37,1,79,37,1,112,37,128,37,2,37,17,95,26,1,111,26,1,26,37,26, +52,63,31,70,11,32,11,1,23,11,23,11,0,31,63,63,63,79,63,111,63,127,63,143, +63,175,63,191,63,207,63,9,159,63,175,63,255,63,3,63,184,255,192,64,17,7,11, +72,63,42,71,31,0,1,0,5,37,80,31,11,24,42,184,255,240,64,32,19,22,72,151,42, +1,0,16,19,22,72,152,0,1,52,0,42,3,57,32,36,1,36,36,24,57,26,17,23,80,24,0, +0,63,237,50,50,47,18,57,47,93,18,23,57,93,43,93,43,18,57,57,237,57,1,47,93, +237,47,43,93,113,18,57,57,47,47,93,16,237,16,205,50,50,47,93,114,51,47,93, +113,114,18,57,49,48,93,43,93,0,93,93,1,93,0,93,93,93,1,93,0,93,19,52,62,2, +55,53,46,3,53,52,62,2,55,53,14,3,43,1,53,33,21,14,3,21,20,30,2,23,21,14,3, +21,20,30,2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,86,51,110,175, +125,68,118,87,51,50,79,97,47,12,68,80,76,18,74,2,122,77,144,112,68,60,99, +130,69,100,175,131,76,43,74,100,57,54,114,94,61,18,26,29,10,126,9,19,16,11, +39,70,97,57,42,89,82,73,54,31,1,98,76,147,124,90,19,2,5,39,68,96,62,64,93, +64,40,10,8,1,2,3,2,131,125,9,34,59,90,67,63,81,49,24,6,131,13,54,89,127,84, +64,79,49,31,15,15,34,57,88,68,34,68,62,51,17,56,12,33,38,39,19,34,45,33,25, +13,10,23,36,50,74,100,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +79,255,236,5,43,4,58,0,48,0,115,64,35,53,12,117,12,133,12,3,3,40,7,17,72, +3,40,7,17,72,46,80,32,96,32,2,46,32,35,70,64,111,5,1,80,5,1,5,184,255,192, +64,38,8,11,72,5,50,128,15,50,47,50,2,13,7,72,79,25,95,25,111,25,207,25,4, +25,14,20,34,7,20,80,31,15,14,21,40,80,0,22,0,63,237,63,63,237,50,50,1,47, +50,50,93,237,50,93,26,16,220,43,93,113,26,237,50,50,93,47,49,48,43,0,43,1, +93,5,34,46,2,53,17,33,21,20,14,2,7,35,62,3,61,1,34,14,2,7,53,62,3,51,33,21, +35,17,20,30,2,51,50,62,2,55,21,14,1,4,102,59,82,52,24,254,110,16,27,36,19, +188,19,39,32,20,39,79,69,53,12,12,43,51,54,23,4,37,234,13,24,35,22,7,23,25, +23,8,31,69,20,28,59,94,66,2,212,72,131,251,228,195,74,76,197,226,247,125, +80,7,10,13,7,139,6,11,8,4,131,253,83,44,56,32,13,2,2,3,1,129,8,12,0,2,0,132, +254,87,4,59,4,79,0,26,0,47,0,129,64,64,122,25,1,101,20,117,20,2,106,19,122, +19,2,106,45,122,45,2,75,8,91,8,107,8,3,125,30,1,107,30,1,74,30,90,30,2,0, +71,64,160,27,1,27,49,128,38,15,70,223,16,1,0,16,16,16,48,16,3,8,16,48,49, +1,49,184,255,192,64,21,30,35,72,223,49,1,96,49,128,49,2,32,80,22,16,15,27, +43,80,5,22,0,63,237,63,63,237,1,93,93,43,113,47,94,93,113,237,50,26,16,220, +93,26,237,49,48,93,93,93,0,93,1,93,93,0,93,1,93,1,20,14,2,35,34,46,2,39,35, +30,1,21,17,35,17,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,17,30,3,51,50, +62,2,4,59,63,115,161,98,62,98,80,66,28,4,2,2,180,60,116,169,110,103,181,134, +78,193,44,83,116,72,69,100,64,30,28,72,80,87,44,67,100,67,33,2,4,118,197, +142,79,20,37,53,33,30,61,32,254,87,3,238,119,193,136,74,79,150,219,131,104, +166,115,61,53,101,146,93,254,195,35,55,37,20,58,107,152,0,0,1,0,86,254,159, +3,156,4,78,0,57,0,209,64,38,137,55,1,139,54,1,143,53,1,123,53,1,106,50,1, +96,2,1,52,15,68,15,84,15,3,82,10,98,10,130,10,3,51,10,67,10,2,3,184,255,224, +64,52,12,17,72,3,24,11,14,72,26,31,106,31,122,31,138,31,4,139,30,1,10,37, +26,37,2,7,71,31,40,1,40,52,17,79,28,1,143,28,159,28,223,28,3,28,64,24,27, +72,96,28,1,28,184,255,192,183,7,12,72,28,48,59,1,59,184,255,192,64,19,30, +35,72,223,59,1,12,33,40,16,19,22,72,136,40,152,40,2,7,184,255,240,64,19,19, +22,72,135,7,151,7,2,33,7,40,3,22,53,0,80,47,16,22,0,47,63,237,51,18,23,57, +93,43,93,43,17,51,1,93,43,113,47,43,93,43,93,113,205,50,47,93,237,49,48,93, +93,0,93,43,1,43,0,93,93,93,1,93,0,93,1,93,93,0,93,93,1,34,14,4,21,20,30,2, +23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,51,50,30,2,23, +7,46,3,2,70,54,88,67,49,32,15,32,76,124,92,53,114,95,61,18,26,29,10,126,9, +19,16,11,35,68,97,63,66,113,94,72,50,26,20,46,75,110,148,97,68,99,73,54,22, +116,18,42,49,57,3,193,49,80,104,108,106,42,68,96,72,57,30,17,37,59,89,68, +34,68,62,51,17,56,12,33,38,39,19,30,44,36,31,17,18,40,51,68,93,122,81,47, +130,140,136,108,66,21,34,44,23,119,19,36,28,17,0,2,0,86,255,236,4,209,4,58, +0,28,0,47,0,132,64,94,133,12,1,122,13,138,13,2,131,46,1,101,46,117,46,2,100, +42,116,42,132,42,3,124,33,140,33,2,90,33,106,33,2,143,38,1,108,38,124,38, +2,74,38,90,38,2,15,17,31,17,111,17,127,17,4,7,17,0,71,64,15,29,143,29,191, +29,3,0,29,32,29,64,29,3,29,49,128,40,71,31,10,143,10,2,10,23,35,80,15,15, +43,80,5,22,0,63,237,63,237,50,1,47,93,237,26,16,220,93,113,26,237,196,94, +93,49,48,0,93,93,93,1,93,93,93,0,93,93,93,1,93,1,20,14,2,35,34,46,2,53,52, +62,2,51,33,21,35,34,46,2,39,21,30,3,7,52,46,2,39,35,34,14,2,21,20,22,51,50, +62,2,4,48,61,123,183,123,123,186,124,63,86,153,213,126,2,57,165,9,35,43,44, +17,28,55,43,26,189,20,34,45,25,89,83,143,107,61,151,147,78,117,76,38,1,235, +112,188,135,76,74,139,202,129,144,210,138,66,131,1,2,2,1,4,42,99,115,131, +78,74,132,116,99,42,50,105,160,110,207,206,52,97,139,0,1,0,29,255,236,3,24, +4,58,0,35,0,99,64,50,35,13,131,13,2,31,32,12,17,72,13,31,29,31,45,31,3,26, +13,26,127,5,143,5,2,5,15,70,0,34,32,34,2,34,34,36,37,79,37,1,208,37,1,159, +37,1,16,37,1,37,184,255,192,64,12,14,17,72,20,80,29,22,14,35,80,11,15,0,63, +237,50,63,237,1,43,93,93,93,113,17,18,57,47,93,253,204,93,51,51,47,49,48, +0,93,43,1,93,1,34,14,2,7,53,62,3,51,33,21,33,17,20,30,2,51,50,62,2,55,21, +14,1,35,34,46,2,53,17,1,25,39,79,69,53,12,12,43,51,54,23,2,68,254,208,13, +24,35,22,7,23,25,23,8,31,69,43,59,82,52,24,3,183,7,10,13,7,139,6,11,8,4,131, +253,83,44,56,32,13,2,2,3,1,129,8,12,28,59,94,66,2,212,0,0,0,1,0,133,255,236, +3,254,4,58,0,31,0,113,64,62,134,3,1,133,15,149,15,2,106,18,122,18,2,86,28, +1,25,8,41,8,2,27,0,71,64,15,21,1,47,21,159,21,2,160,21,1,21,33,128,13,70, +0,10,16,10,48,10,240,10,4,8,10,240,33,1,255,33,1,112,33,1,33,184,255,192, +64,13,20,23,72,31,33,1,26,11,15,16,80,5,22,0,63,237,63,51,1,93,43,93,93,113, +47,94,93,237,26,16,220,93,113,114,26,237,50,49,48,93,93,93,93,93,1,20,14, +2,35,34,46,2,53,17,51,17,20,22,51,50,62,2,53,52,46,2,39,51,30,3,3,254,53, +113,176,123,109,160,104,51,181,117,134,73,104,65,30,20,33,40,21,188,18,40, +32,21,2,59,137,218,154,82,50,107,166,116,2,151,253,99,146,148,50,108,170, +120,68,147,139,120,41,40,113,134,149,0,2,0,85,254,87,4,218,4,82,0,35,0,45, +0,130,64,21,101,34,1,101,33,117,33,133,33,3,74,21,90,21,2,69,21,85,21,2,45, +184,255,192,179,11,14,72,25,184,255,224,64,54,11,14,72,11,29,27,29,2,64,19, +80,19,2,19,19,24,71,13,7,36,71,224,0,1,0,43,6,72,27,0,7,64,7,2,7,64,47,1, +19,80,18,18,39,80,31,16,43,27,80,5,8,22,6,27,0,63,63,51,237,50,63,237,51, +47,237,1,113,47,93,51,253,50,220,113,237,16,220,237,50,47,93,49,48,93,0,43, +43,1,93,0,93,1,93,93,1,20,14,2,7,17,35,17,46,3,53,52,62,2,55,23,14,3,21,20, +22,23,17,52,54,51,50,30,2,7,52,38,35,34,6,21,17,62,1,4,218,74,132,184,110, +170,114,181,125,67,49,103,159,109,21,69,96,60,27,147,151,154,158,84,133,92, +49,189,87,80,68,76,162,149,2,53,151,215,140,71,6,254,105,1,151,5,72,138,207, +141,102,188,150,103,18,136,15,77,114,143,80,213,201,8,2,68,193,212,76,141, +199,121,193,211,129,140,253,185,7,218,0,0,0,1,0,21,254,88,4,27,4,80,0,27, +1,26,64,51,169,25,1,153,3,1,138,6,154,6,2,174,23,1,123,23,139,23,155,23,3, +84,21,1,173,27,1,140,27,156,27,2,123,27,1,90,27,106,27,2,41,27,57,27,2,26, +16,9,17,72,2,184,255,240,64,99,9,17,72,162,1,1,131,1,147,1,2,116,1,1,69,1, +85,1,101,1,3,38,1,54,1,2,166,25,1,153,25,1,39,25,55,25,71,25,3,3,101,19,117, +19,2,86,19,1,39,19,55,19,2,25,22,0,3,4,2,26,23,24,24,27,26,16,27,26,59,26, +91,26,123,26,155,26,187,26,219,26,7,219,26,251,26,2,4,26,20,26,68,26,3,7, +26,13,13,1,2,184,255,240,183,2,36,29,1,11,29,1,22,184,255,208,64,41,14,17, +72,70,22,1,53,22,1,139,0,1,125,0,1,2,75,0,91,0,107,0,3,63,0,1,0,25,3,22,4, +1,23,15,9,80,16,16,27,1,27,0,63,51,63,237,63,18,23,57,93,93,95,93,93,93,93, +43,1,93,93,47,56,51,51,47,47,94,93,93,113,56,51,51,47,51,17,18,23,57,49,48, +93,93,93,95,93,93,93,93,93,93,93,93,43,43,93,93,93,93,93,93,93,93,93,93,0, +93,37,1,35,1,3,46,3,35,34,6,7,39,62,1,51,50,30,2,23,19,1,51,9,1,35,2,30,254, +179,188,1,184,170,27,44,40,42,25,11,32,7,34,24,62,32,48,70,60,59,36,142,1, +8,187,254,144,1,150,190,239,253,105,3,57,1,87,54,82,55,28,7,3,131,9,11,27, +62,102,75,254,217,2,27,253,71,252,215,0,0,1,0,135,254,87,5,44,5,60,0,31,0, +128,64,90,121,18,1,18,16,7,10,72,121,19,137,19,153,19,3,121,11,1,11,16,7, +10,72,121,10,137,10,153,10,3,24,70,21,15,5,70,8,0,14,72,29,0,15,16,15,160, +15,208,15,4,8,15,128,33,176,33,224,33,3,111,33,1,32,33,1,255,33,1,80,33,128, +33,144,33,192,33,4,30,30,6,22,15,0,29,80,13,16,22,14,27,0,63,63,51,237,50, +63,51,51,47,1,93,93,113,113,113,47,94,93,51,253,50,220,237,16,220,237,49, +48,0,93,43,93,93,43,93,37,62,3,53,17,51,17,20,14,2,7,17,35,17,46,3,53,17, +51,17,20,30,2,23,17,51,3,46,87,124,80,37,182,59,124,193,134,170,134,192,124, +59,181,38,79,124,87,170,119,1,31,73,121,91,2,134,253,124,122,172,110,53,1, +254,107,1,149,1,53,110,172,122,2,132,253,122,90,121,73,32,1,4,197,0,0,0,0, +1,0,83,255,236,5,235,4,79,0,63,0,176,64,83,153,33,169,33,2,153,26,169,26, +2,119,16,1,122,58,138,58,2,10,37,26,37,42,37,154,37,170,37,5,10,22,26,22, +42,22,154,22,170,22,5,29,0,73,61,61,40,8,46,13,46,13,51,19,71,64,128,8,176, +8,2,15,8,1,7,8,65,128,51,71,63,40,1,40,0,65,1,48,65,1,240,65,1,65,184,255, +192,64,32,30,35,72,175,65,223,65,2,0,65,32,65,64,65,3,30,35,62,62,14,3,56, +80,24,35,22,46,13,80,45,14,16,0,63,51,237,50,63,51,237,50,17,57,47,18,57, +1,93,93,43,93,113,114,47,93,237,26,16,220,94,93,93,26,237,18,57,57,47,47, +17,18,57,47,237,57,49,48,0,93,93,1,93,93,0,93,93,1,20,22,51,50,62,2,53,52, +46,2,39,55,30,3,21,20,14,2,35,34,46,2,39,35,14,3,35,34,46,2,53,52,62,2,55, +23,14,3,21,20,30,2,51,50,62,2,61,1,51,3,115,114,102,65,87,53,22,29,61,97, +67,23,109,159,103,49,53,101,148,95,68,104,77,52,16,4,16,52,77,105,67,95,148, +101,53,49,103,159,109,23,68,96,62,28,22,52,86,65,51,82,57,30,166,1,193,157, +173,56,102,145,90,82,150,121,84,15,139,18,112,161,194,101,128,200,137,72, +36,68,99,64,64,99,68,36,72,137,200,128,101,194,161,112,18,139,15,84,121,150, +82,90,145,102,56,45,84,123,78,252,0,0,0,255,255,255,205,0,0,1,250,5,123,18, +38,1,130,0,0,17,6,0,105,160,0,0,25,182,2,1,14,17,38,2,1,184,255,217,180,18, +16,5,13,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,254,5,123, +18,38,1,142,0,0,17,7,0,105,0,242,0,0,0,25,182,2,1,32,17,38,2,1,184,255,244, +180,36,34,10,0,37,1,43,53,53,0,43,53,53,0,255,255,0,86,255,236,4,29,6,7,18, +38,0,82,0,0,17,7,1,80,1,41,0,0,0,19,64,11,2,35,17,38,2,70,35,38,8,0,37,1, +43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,254,6,7,18,38,1,142,0,0,17,7, +1,80,0,252,0,0,0,19,64,11,1,32,17,38,1,17,32,35,10,0,37,1,43,53,0,43,53,0, +0,0,255,255,0,83,255,236,5,235,6,7,18,38,1,146,0,0,17,7,1,80,1,255,0,0,0, +19,64,11,1,64,17,38,1,55,64,67,40,19,37,1,43,53,0,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,178,16,38,0,40,0,0,17,7,2,152,1,121,0,0,0,153,185,0,21,255,192, +179,233,233,72,21,184,255,192,179,230,230,72,21,184,255,192,179,227,227,72, +21,184,255,192,179,224,224,72,21,184,255,192,179,221,221,72,21,184,255,192, +179,218,218,72,21,184,255,192,179,215,215,72,21,184,255,192,179,212,212,72, +21,184,255,192,179,209,209,72,21,184,255,192,179,206,206,72,21,184,255,192, +179,203,203,72,21,184,255,192,179,200,200,72,21,184,255,192,179,197,197,72, +21,184,255,192,64,10,11,11,72,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10, +37,1,43,53,53,0,43,53,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0, +1,0,46,255,236,6,79,5,129,0,45,0,133,64,13,155,31,171,31,2,101,37,117,37, +133,37,3,2,184,255,224,64,71,13,17,72,18,16,12,15,72,42,13,58,13,2,36,7,52, +7,2,20,20,10,42,1,39,90,45,175,40,1,0,40,1,40,10,90,0,29,16,29,176,29,224, +29,4,7,29,0,42,95,43,38,33,95,1,6,6,40,43,3,40,18,26,95,15,63,21,1,21,21, +15,19,0,63,51,47,93,16,237,63,63,18,57,47,51,237,50,16,237,50,1,47,94,93, +237,47,93,93,204,253,50,204,18,57,47,49,48,0,93,93,43,43,93,93,1,17,62,3, +51,50,22,29,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,61,1,52,38,35,34,14, +2,7,17,35,17,33,53,33,21,2,208,33,109,127,130,53,226,217,41,86,133,92,53, +88,75,64,29,111,18,41,48,56,33,84,80,129,144,51,123,120,105,33,190,254,28, +4,134,4,229,254,160,7,20,19,13,187,188,214,93,145,100,53,17,32,46,28,123, +16,33,26,17,101,111,219,119,122,10,15,17,8,253,12,4,229,156,156,0,255,255, +0,168,0,1,4,47,6,240,16,38,1,93,0,0,17,7,2,149,1,113,0,0,0,19,64,11,1,6,5, +38,1,33,6,9,4,0,37,1,43,53,0,43,53,0,0,0,0,1,0,104,255,236,5,121,5,150,0, +42,0,218,64,156,156,17,172,17,2,156,15,172,15,2,156,39,172,39,2,138,39,1, +156,41,172,41,2,138,41,1,137,31,1,117,11,1,117,10,165,10,2,166,26,1,73,26, +137,26,2,70,32,134,32,2,37,10,53,10,2,42,3,58,3,2,3,68,44,1,7,7,19,5,8,91, +116,29,132,29,2,203,29,219,29,2,68,29,1,43,29,1,29,37,235,19,1,100,19,116, +19,164,19,212,19,4,64,19,1,2,0,19,48,19,2,7,19,8,95,127,5,175,5,2,5,5,13, +34,79,38,1,38,38,0,95,34,4,13,95,24,16,18,32,18,2,48,18,64,18,112,18,128, +18,192,18,208,18,6,18,18,24,19,0,63,51,47,93,113,16,237,63,237,51,47,93,17, +18,57,47,113,237,1,47,94,93,95,93,93,113,51,47,93,93,93,113,237,50,17,57, +47,93,49,48,0,95,93,93,93,93,93,1,93,0,93,1,93,93,93,93,93,93,93,1,34,14, +2,7,33,21,33,30,3,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,111,173,124,73,10,2,142,253,114,9,77,128,176,109,90,141, +108,79,27,156,40,108,148,191,123,171,254,255,173,86,91,175,1,0,164,225,1, +46,71,181,20,68,102,137,4,250,68,126,178,110,154,112,185,132,72,50,82,105, +55,77,79,136,100,57,109,195,1,12,159,165,1,10,187,101,176,173,60,50,91,70, +42,0,0,255,255,0,93,255,236,4,248,5,150,18,6,0,54,0,0,255,255,0,189,0,0,1, +124,5,129,18,6,0,44,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2, +152,218,0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0, +255,255,0,32,255,236,3,104,5,129,18,6,0,45,0,0,0,2,0,18,255,240,8,11,5,129, +0,38,0,47,0,215,64,98,57,29,1,166,8,1,167,11,1,162,10,1,133,10,149,10,2,58, +10,1,154,15,170,15,2,141,13,157,13,173,13,3,121,13,1,116,47,132,47,148,47, +3,123,40,139,40,155,40,3,101,11,1,141,14,157,14,173,14,3,14,32,10,14,72,43, +30,123,30,139,30,155,30,4,42,31,122,31,2,0,90,48,39,1,0,39,16,39,2,7,39,20, +13,36,13,52,13,3,13,184,255,248,64,14,22,25,72,73,8,1,20,8,36,8,52,8,3,8, +184,255,248,64,39,22,25,72,9,31,73,31,2,8,13,31,3,175,20,191,20,2,20,33,44, +90,6,43,95,33,33,6,8,95,31,3,23,95,16,19,44,95,6,18,0,63,237,63,237,63,237, +18,57,47,237,1,47,237,50,47,93,23,51,113,43,113,113,43,113,47,94,93,113,237, +49,48,93,93,0,43,93,1,93,0,93,93,93,93,93,1,93,93,93,93,93,93,1,20,14,2,35, +33,17,33,3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,33,50,30,2, +7,52,38,35,33,17,33,50,54,8,11,61,121,182,121,253,183,254,96,49,22,43,49, +60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,3,2,1,126,125,186, +124,62,192,164,164,254,153,1,111,164,156,1,157,87,150,112,64,4,225,254,144, +172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161,1,254,253,172, +58,105,147,92,121,129,254,2,136,0,0,0,2,0,168,0,0,7,171,5,129,0,22,0,31,0, +110,64,25,116,31,132,31,148,31,3,123,24,139,24,155,24,3,38,20,54,20,2,0,90, +176,23,1,23,184,255,192,64,43,7,11,72,23,13,9,90,0,10,16,10,64,10,3,7,10, +17,28,90,14,0,6,1,8,6,27,95,17,17,8,95,13,13,10,15,11,3,10,18,28,95,6,18, +0,63,237,63,63,51,18,57,47,237,51,47,237,1,47,94,93,51,237,50,47,94,93,237, +50,47,43,93,237,49,48,0,93,93,93,1,20,14,2,35,33,17,33,17,35,17,51,17,33, +17,51,17,33,50,30,2,7,52,38,35,33,17,33,50,54,7,171,61,121,182,121,253,223, +253,194,191,191,2,62,191,1,86,125,186,124,62,192,164,164,254,193,1,71,164, +156,1,157,87,150,112,64,2,141,253,115,5,129,253,172,2,84,253,172,58,105,147, +92,121,129,254,2,136,0,0,0,0,1,0,46,0,0,6,47,5,129,0,27,0,131,64,13,155,2, +171,2,2,101,8,117,8,133,8,3,19,184,255,224,64,76,13,17,72,37,24,53,24,69, +24,3,18,13,10,90,16,175,11,1,0,11,48,11,2,11,27,90,0,0,48,0,192,0,208,0,4, +7,0,176,29,192,29,208,29,3,176,29,240,29,2,255,29,1,16,29,112,29,160,29,176, +29,4,9,4,95,18,23,23,0,17,13,95,14,3,11,0,18,0,63,50,63,237,50,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,237,47,93,93,204,253,204,51,49,48,0,93,43, +93,93,33,17,52,38,35,34,14,2,7,17,35,17,33,53,33,21,33,17,62,3,51,50,22,21, +17,5,113,128,133,53,116,110,98,35,190,254,28,4,179,253,239,36,98,112,118, +56,229,214,2,63,122,109,10,15,18,7,253,12,4,229,156,156,254,160,8,20,18,13, +187,178,253,173,0,0,0,255,255,0,168,0,0,4,157,6,240,18,38,1,176,0,0,17,7, +2,149,1,172,0,0,0,19,64,11,1,23,5,38,1,37,23,26,0,13,37,1,43,53,0,43,53,0, +0,0,255,255,0,55,255,236,5,31,7,58,18,38,1,185,0,0,17,7,2,145,1,94,1,74,0, +19,64,11,1,26,5,38,1,7,31,39,21,25,37,1,43,53,0,43,53,0,0,0,0,1,0,168,254, +104,5,24,5,129,0,11,0,94,64,64,11,92,0,0,2,9,90,127,6,1,0,6,48,6,64,6,3,143, +6,159,6,207,6,3,0,6,64,6,2,6,5,90,0,2,16,2,64,2,3,7,2,16,13,1,32,13,128,13, +224,13,3,15,13,1,7,7,3,3,10,5,95,2,18,0,0,47,63,237,51,63,51,47,1,93,93,113, +47,94,93,237,47,93,93,113,113,237,18,57,47,237,49,48,1,17,33,17,51,17,33, +17,51,17,33,17,2,134,254,34,191,2,247,186,254,34,254,104,1,152,5,129,251, +31,4,225,250,127,254,104,255,255,0,4,0,0,5,82,5,129,18,6,0,36,0,0,0,2,0,168, +0,0,4,214,5,129,0,16,0,25,0,142,64,70,116,25,132,25,148,25,3,123,18,139,18, +155,18,3,153,14,1,38,14,1,9,9,0,90,223,17,1,80,17,128,17,2,31,17,1,255,17, +1,192,17,1,159,17,1,0,17,16,17,32,17,64,17,4,17,11,22,90,0,6,16,6,64,6,3, +7,6,48,27,1,27,184,255,192,64,27,30,35,72,223,27,1,21,95,64,11,1,160,11,208, +11,2,11,11,6,10,95,7,3,22,95,6,18,0,63,237,63,237,18,57,47,93,113,237,1,93, +43,113,47,94,93,237,50,47,93,93,93,93,113,113,113,237,50,47,49,48,0,93,93, +93,93,1,20,14,2,35,33,17,33,21,33,17,33,50,30,2,7,52,38,35,33,17,33,50,54, +4,214,61,121,182,121,253,183,3,158,253,33,1,126,125,186,124,62,192,164,164, +254,153,1,111,164,156,1,157,87,150,112,64,5,129,156,254,72,58,105,147,92, +121,129,254,2,136,0,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,255,255, +0,168,0,1,4,47,5,130,16,6,1,93,0,0,0,2,0,15,254,104,5,69,5,129,0,16,0,25, +0,194,64,95,150,10,1,150,20,1,150,15,1,144,19,1,134,19,1,115,22,131,22,2, +3,147,24,1,2,128,24,1,114,24,1,102,24,1,85,11,101,11,2,90,14,106,14,2,97, +23,145,23,2,83,23,1,53,23,69,23,2,2,92,3,3,0,90,191,17,207,17,2,160,17,1, +31,17,95,17,127,17,143,17,159,17,5,0,17,1,8,17,20,25,36,25,52,25,3,25,184, +255,248,64,11,22,25,72,20,19,36,19,52,19,3,19,184,255,248,64,28,22,25,72, +9,15,19,25,4,6,92,7,15,27,47,27,2,19,95,15,3,8,0,25,95,5,18,7,2,0,47,51,63, +237,50,50,63,237,1,93,47,237,23,51,43,113,43,113,47,94,93,93,93,93,237,50, +47,237,49,48,93,93,93,93,93,93,93,93,95,93,95,93,93,93,93,93,93,37,51,17, +35,17,33,17,35,17,51,62,3,55,19,33,3,17,33,3,14,3,7,4,150,175,180,252,50, +180,144,41,66,55,44,18,67,2,212,186,254,137,49,18,40,46,54,32,160,253,200, +1,152,254,104,2,56,51,138,181,228,141,1,254,251,31,4,65,254,144,134,221,178, +137,51,255,255,0,168,0,0,4,254,5,129,18,6,0,40,0,0,0,1,0,28,0,0,7,71,5,129, +0,41,1,72,64,41,133,8,1,117,31,133,31,2,117,14,1,99,24,1,108,25,124,25,140, +25,3,108,26,124,26,140,26,3,101,13,117,13,133,13,3,33,40,14,17,72,6,184,255, +216,64,35,14,17,72,58,24,74,24,2,41,24,1,53,15,69,15,117,15,3,3,39,15,1,27, +48,14,17,72,40,27,56,27,72,27,3,12,184,255,208,64,11,14,17,72,39,12,55,12, +71,12,3,31,184,255,224,179,14,17,72,31,184,255,240,64,73,10,13,72,8,32,14, +17,72,8,16,10,13,72,34,31,27,31,28,28,32,21,40,90,41,5,8,12,8,41,11,11,7, +18,52,41,1,116,41,196,41,228,41,3,41,33,32,16,32,64,29,32,72,228,32,1,155, +32,171,32,2,68,32,116,32,2,11,32,43,32,2,32,6,7,184,255,240,64,51,171,7,187, +7,2,7,68,43,116,43,132,43,228,43,4,47,43,1,2,15,43,1,31,8,34,5,8,5,39,0,96, +21,127,18,175,18,2,47,18,1,18,18,6,27,19,11,3,41,33,6,18,0,63,51,51,63,51, +51,18,57,47,93,113,51,237,50,57,57,17,51,17,51,1,93,95,93,93,47,93,56,51, +47,93,93,93,93,43,56,51,47,93,113,51,18,57,47,18,57,51,17,51,16,237,50,17, +57,47,57,51,17,51,49,48,43,43,43,43,93,43,93,43,93,95,93,93,93,43,43,93,93, +93,0,93,1,93,0,93,93,1,34,46,2,39,1,35,1,38,39,1,51,19,30,3,51,17,51,17,50, +62,2,55,19,51,1,6,7,1,35,1,14,3,35,17,35,3,82,17,45,48,46,17,254,85,222,1, +253,48,131,254,229,200,205,66,90,76,81,57,191,57,81,76,90,66,205,200,254, +229,131,48,1,253,222,254,85,17,46,48,45,17,191,2,133,6,11,13,8,253,85,3,7, +35,189,1,154,254,207,99,123,68,24,2,107,253,149,24,68,123,99,1,49,254,102, +189,35,252,249,2,171,8,13,11,6,253,123,0,1,0,67,255,236,4,112,5,149,0,60, +1,7,64,51,138,33,1,134,7,1,124,28,140,28,2,3,112,21,1,112,20,1,2,96,20,1, +101,8,117,8,133,8,3,132,34,1,101,34,117,34,2,124,13,1,90,13,106,13,2,59,23, +75,23,2,33,184,255,232,64,122,11,16,72,5,43,1,3,51,20,25,90,46,64,25,37,72, +46,46,56,90,16,139,36,155,36,171,36,3,127,20,1,2,95,20,111,20,2,36,20,36, +20,5,112,16,1,79,16,111,16,2,255,16,1,160,16,1,127,16,1,0,16,16,16,48,16, +3,16,175,5,191,5,2,5,64,32,45,72,5,64,13,16,72,5,51,20,95,127,21,175,21,2, +21,21,11,41,35,64,13,16,72,35,35,30,95,41,4,11,95,0,32,6,48,6,112,6,128,6, +4,208,6,1,6,184,255,192,182,13,17,72,6,6,0,19,0,63,50,47,43,93,113,16,237, +63,237,51,47,43,17,18,57,47,113,237,57,1,47,43,43,93,47,93,93,93,93,113,113, +18,57,57,47,47,93,95,93,113,16,237,50,47,43,237,18,57,49,48,0,95,93,1,43, +93,93,93,93,93,93,93,95,93,93,95,93,93,0,93,5,34,46,2,39,55,30,3,51,50,62, +2,53,52,38,43,1,53,51,50,54,53,52,46,2,35,34,14,2,7,39,62,3,51,50,30,2,21, +20,14,2,7,30,3,21,20,14,2,2,109,118,176,130,94,36,165,24,66,91,121,80,77, +122,85,45,192,202,71,71,181,173,39,72,104,65,77,114,83,56,19,178,33,96,132, +168,105,108,172,120,64,40,73,104,63,67,117,87,51,69,132,192,20,50,91,128, +79,77,55,98,75,44,37,69,100,64,133,118,148,119,123,55,86,59,30,40,68,90,49, +61,82,127,87,45,53,96,136,83,68,107,80,55,15,10,50,82,115,73,95,156,113,62, +0,1,0,168,0,0,5,24,5,129,0,19,0,123,64,17,172,18,1,138,18,154,18,2,147,8, +163,8,2,133,8,1,19,184,255,232,64,65,9,17,72,9,24,9,17,72,11,92,41,9,1,9, +64,12,80,12,144,12,3,224,12,1,143,12,159,12,175,12,3,0,12,48,12,2,12,166, +19,1,19,2,92,0,1,16,1,2,7,1,15,21,47,21,2,9,18,9,1,3,12,12,8,0,18,0,63,50, +50,47,63,51,51,47,1,93,47,94,93,237,50,113,47,93,93,93,113,51,113,237,49, +48,43,43,0,93,93,93,93,51,17,51,17,20,6,7,6,7,1,51,17,35,17,52,54,55,54,55, +1,168,172,2,2,2,2,2,238,222,170,1,2,1,2,253,26,5,129,252,100,51,98,39,46, +40,4,174,250,127,3,168,39,89,38,44,44,251,90,0,255,255,0,168,0,0,5,24,7,58, +18,38,1,174,0,0,17,7,2,145,1,146,1,74,0,19,64,11,1,20,5,38,1,6,25,33,0,10, +37,1,43,53,0,43,53,0,0,0,0,1,0,168,0,0,4,157,5,129,0,22,0,151,64,104,84,12, +116,12,132,12,3,84,15,1,139,8,1,122,8,1,89,8,105,8,2,140,14,1,14,24,13,16, +72,58,5,1,100,12,116,12,132,12,3,80,12,1,53,12,69,12,2,15,12,8,12,9,16,32, +9,96,9,128,9,3,9,9,13,2,21,90,32,22,1,22,14,13,16,15,13,127,13,207,13,239, +13,4,47,13,1,13,47,24,1,15,12,20,96,47,2,1,2,2,22,13,18,8,0,3,0,63,50,63, +51,57,47,93,237,50,57,1,93,47,93,113,56,51,47,93,237,50,17,57,47,93,56,57, +51,17,51,49,48,93,93,93,93,43,93,93,93,93,93,0,93,19,51,17,50,62,2,55,19, +51,1,6,7,1,35,1,14,3,35,17,35,168,191,57,81,76,90,66,205,200,254,229,131, +48,1,253,222,254,85,17,46,48,45,17,191,5,129,253,149,24,68,123,99,1,49,254, +102,189,35,252,249,2,171,8,13,11,6,253,123,0,0,0,0,1,0,18,255,240,4,153,5, +129,0,27,0,176,64,35,150,1,1,147,3,1,117,3,133,3,2,85,4,149,4,2,145,7,1,115, +7,131,7,2,85,7,101,7,2,129,6,145,6,2,6,184,255,216,64,46,12,15,72,37,6,53, +6,2,26,2,1,26,23,106,23,122,23,138,23,4,26,90,32,27,64,27,2,224,27,1,95,27, +1,0,27,1,8,27,20,6,36,6,52,6,3,6,184,255,248,64,14,22,25,72,73,1,1,20,1,36, +1,52,1,3,1,184,255,248,64,26,22,25,72,9,24,73,24,2,1,6,24,3,12,128,29,1,27, +18,1,95,24,3,16,95,9,19,0,63,237,63,237,63,1,93,47,23,51,113,43,113,113,43, +113,47,94,93,93,93,113,237,49,48,93,93,93,43,93,93,93,93,93,93,93,93,1,33, +3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,35,3,223,254,94,49, +22,43,49,60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,2,255,186, +4,225,254,144,172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161, +1,254,250,127,255,255,0,168,0,0,6,2,5,129,18,6,0,48,0,0,255,255,0,168,0,0, +5,32,5,129,18,6,0,43,0,0,255,255,0,97,255,236,5,215,5,150,18,6,0,50,0,0,255, +255,0,166,0,0,5,30,5,129,17,6,1,106,254,0,0,88,185,0,9,255,192,179,27,27, +72,9,184,255,192,179,21,21,72,9,184,255,192,179,20,20,72,9,184,255,192,179, +19,19,72,9,184,255,192,179,17,17,72,9,184,255,192,179,16,16,72,9,184,255, +192,179,15,15,72,9,184,255,192,179,14,14,72,9,184,255,192,183,11,11,72,9, +64,9,9,72,43,43,43,43,43,43,43,43,43,43,0,0,255,255,0,168,0,0,4,234,5,129, +18,6,0,51,0,0,255,255,0,104,255,236,5,121,5,150,18,6,0,38,0,0,255,255,0,46, +0,0,4,180,5,129,18,6,0,55,0,0,0,1,0,55,255,236,5,31,5,129,0,25,0,181,64,111, +217,24,1,139,24,1,90,24,106,24,122,24,3,41,24,1,85,23,101,23,133,23,3,70, +23,1,214,22,1,131,22,1,100,22,116,22,2,86,22,1,121,18,1,128,2,1,5,2,21,2, +2,132,1,1,131,0,1,84,0,100,0,2,70,0,1,198,23,214,23,2,113,23,129,23,2,86, +23,102,23,2,143,3,1,58,3,74,3,2,20,23,24,32,25,144,25,2,25,16,25,22,10,63, +21,79,21,111,21,127,21,4,21,184,255,240,64,14,21,23,20,21,5,24,24,21,3,11, +14,95,5,19,0,63,237,50,63,51,47,17,18,57,57,1,47,56,93,50,50,47,56,93,51, +57,57,49,48,0,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,1,14,3,35,34,46,2,39,55,30,1,51,50,62,2,63,1,1,51,9,1,51,2,222,47, +81,90,109,75,32,66,64,58,23,81,35,83,48,37,58,53,57,38,49,253,195,218,1,193, +1,128,205,1,62,88,128,82,40,10,18,26,16,144,22,37,21,52,90,68,89,3,186,252, +240,3,16,0,0,3,0,118,255,245,5,159,5,139,0,29,0,40,0,51,0,143,64,92,70,28, +86,28,102,28,3,73,17,89,17,105,17,3,59,51,1,59,31,1,53,43,1,38,43,1,53,39, +1,38,39,1,41,90,15,8,30,90,0,35,24,7,90,46,21,224,8,1,79,8,1,32,8,1,8,32, +53,1,112,53,208,53,224,53,3,79,53,1,16,53,1,36,47,96,10,6,10,34,49,96,20, +24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57,47,47,17,51,16,237,50,17,51, +16,237,50,1,93,93,93,113,47,93,93,93,51,51,253,50,50,220,237,16,220,237,49, +48,0,93,93,93,93,93,93,1,93,93,1,20,14,2,43,1,21,35,53,35,34,46,2,53,52,62, +2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17,51,50,62,2,37,20,30,2,59,1,17, +35,34,6,5,159,64,131,197,133,40,191,40,133,197,131,64,67,133,201,135,29,191, +28,135,202,133,67,192,185,183,5,13,92,136,89,43,252,87,43,89,136,92,13,9, +182,182,2,224,105,188,143,84,227,227,84,143,188,105,113,185,131,72,182,182, +72,131,185,117,187,180,253,22,53,98,140,88,88,140,98,53,2,234,180,0,255,255, +0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,168,254,104,5,197,5,129,0,11,0,74, +64,47,1,92,2,2,11,90,0,8,1,175,8,1,0,8,64,8,112,8,3,8,7,90,0,4,16,4,64,4, +3,7,4,32,13,224,13,2,9,9,5,3,11,11,7,95,4,18,2,0,47,63,237,50,47,63,51,47, +1,93,47,94,93,237,47,93,93,113,237,50,47,237,49,48,37,17,35,17,33,17,51,17, +33,17,51,17,5,197,180,251,151,191,2,245,186,160,253,200,1,152,5,129,251,31, +4,225,251,31,0,0,0,1,0,160,0,0,4,174,5,129,0,25,0,134,64,70,164,14,1,20,40, +13,17,72,1,32,13,17,72,42,7,58,7,74,7,3,23,90,25,144,22,1,143,22,1,48,22, +64,22,2,207,22,1,112,22,1,111,22,1,16,22,64,22,2,22,12,90,207,11,1,0,11,16, +11,64,11,3,7,11,32,27,1,32,27,1,27,184,255,192,64,19,14,17,72,0,5,95,21,47, +16,1,16,16,11,24,18,22,22,11,3,0,63,51,47,63,18,57,47,93,51,237,50,1,43,93, +113,47,94,93,93,237,47,93,93,93,93,113,113,113,51,237,49,48,0,93,43,43,93, +1,14,3,35,34,46,2,53,17,51,17,20,22,51,50,62,2,55,17,51,17,35,3,240,36,94, +107,115,56,114,166,108,52,190,130,134,53,110,104,92,35,190,190,1,252,8,20, +18,12,47,92,137,89,2,82,253,194,123,108,10,15,17,7,2,244,250,127,0,0,1,0, +168,0,0,6,173,5,129,0,11,0,114,64,76,7,90,4,4,0,11,90,36,8,1,11,8,1,228,8, +1,219,8,1,148,8,1,123,8,1,4,8,20,8,100,8,3,8,3,90,4,0,68,0,228,0,3,7,0,235, +13,1,196,13,1,187,13,1,132,13,1,112,13,1,2,64,13,1,15,13,1,9,5,1,3,7,7,3, +95,0,18,0,63,237,50,47,63,51,51,1,93,93,95,93,93,93,93,93,47,94,93,237,47, +93,93,93,93,93,113,113,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,168,191,1,233,186,1,233,186,5,129,251,31,4,225,251,31,4,225,250, +127,0,1,0,168,254,104,7,47,5,129,0,15,0,125,64,84,132,17,148,17,180,17,3, +123,17,1,84,17,1,1,92,2,2,15,90,12,11,90,8,8,4,11,12,59,12,75,12,91,12,123, +12,139,12,155,12,203,12,8,219,12,251,12,2,207,12,1,2,159,12,1,128,12,1,111, +12,1,0,12,1,8,12,7,90,32,4,1,4,13,9,5,3,15,15,11,11,7,95,4,18,2,0,47,63,237, +50,47,50,47,63,51,51,1,47,93,237,47,94,93,93,93,93,95,93,93,113,18,57,47, +237,16,237,50,47,237,93,93,93,49,48,37,17,35,17,33,17,51,17,33,17,51,17,33, +17,51,17,7,47,180,250,45,191,1,211,186,1,210,186,160,253,200,1,152,5,129, +251,31,4,225,251,31,4,225,251,31,0,2,0,46,0,0,5,235,5,129,0,16,0,25,0,100, +64,68,116,25,132,25,148,25,3,123,18,139,18,155,18,3,153,3,1,38,3,1,64,27, +1,6,90,47,17,127,17,2,176,17,1,159,17,1,0,17,16,17,32,17,64,17,4,7,17,14, +0,22,90,32,12,1,12,21,95,0,0,12,14,95,15,3,22,95,12,18,0,63,237,63,237,18, +57,47,237,1,47,93,253,50,204,47,94,93,93,93,113,237,93,49,48,0,93,93,93,93, +1,33,50,30,2,21,20,14,2,35,33,17,33,53,33,1,52,38,35,33,17,33,50,54,2,184, +1,66,125,186,124,62,61,121,182,121,253,243,254,53,2,138,2,115,164,164,254, +213,1,51,164,156,3,45,58,105,147,90,87,150,112,64,4,229,156,252,26,121,129, +254,2,136,0,3,0,168,0,0,6,109,5,129,0,14,0,23,0,27,0,140,64,76,116,23,132, +23,148,23,3,123,16,139,16,155,16,3,153,12,1,38,12,1,27,90,159,24,207,24,223, +24,3,16,24,64,24,80,24,112,24,4,24,0,90,0,15,1,224,15,1,159,15,1,0,15,16, +15,32,15,64,15,4,15,9,20,90,0,6,16,6,64,6,3,7,6,128,29,1,29,184,255,192,64, +19,11,14,72,19,95,9,9,6,7,25,25,7,3,24,24,20,95,6,18,0,63,237,51,47,63,51, +47,17,18,57,47,237,1,43,93,47,94,93,237,50,47,93,93,93,113,237,47,93,93,237, +49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50,30,2,7,52,38,35,33,17, +33,50,54,1,17,51,17,4,214,61,121,182,121,253,183,191,1,126,125,186,124,62, +192,164,164,254,153,1,111,164,156,1,152,191,1,157,87,150,112,64,5,129,253, +172,58,105,147,92,121,129,254,2,136,254,225,5,129,250,127,0,2,0,168,0,0,4, +214,5,129,0,14,0,23,0,107,64,76,116,23,132,23,148,23,3,123,16,139,16,155, +16,3,153,12,1,38,12,1,0,90,31,15,1,160,15,176,15,2,159,15,1,0,15,16,15,32, +15,64,15,96,15,5,15,9,20,90,0,6,16,6,2,7,6,175,25,1,64,25,128,25,144,25,3, +19,95,9,9,6,7,3,20,95,6,18,0,63,237,63,18,57,47,237,1,93,93,47,94,93,237, +50,47,93,93,93,113,237,49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50, +30,2,7,52,38,35,33,17,33,50,54,4,214,61,121,182,121,253,183,191,1,126,125, +186,124,62,192,164,164,254,153,1,111,165,155,1,157,87,150,112,64,5,129,253, +172,58,105,147,96,121,131,254,4,131,0,1,0,105,255,236,5,121,5,150,0,42,0, +206,64,81,115,26,131,26,2,115,28,131,28,2,101,28,1,115,4,131,4,2,101,4,1, +115,2,131,2,2,101,2,1,101,12,1,101,11,1,135,17,1,106,17,1,90,33,138,33,2, +10,32,26,32,90,32,3,10,40,26,40,2,36,36,24,38,14,91,32,35,112,35,2,144,35, +176,35,2,127,35,1,64,35,1,35,184,255,192,64,63,7,10,72,35,6,80,24,96,24,2, +175,24,191,24,2,32,24,1,24,35,95,127,38,175,38,2,38,38,9,30,95,19,16,25,32, +25,2,48,25,64,25,112,25,128,25,192,25,208,25,6,25,25,19,19,79,5,1,5,5,0,95, +9,4,0,63,237,51,47,93,63,51,47,93,113,16,237,17,57,47,113,237,1,47,93,93, +113,51,47,43,93,93,93,113,237,51,18,57,47,49,48,0,93,1,93,93,0,93,93,93,1, +93,93,93,93,93,93,93,93,1,34,14,2,7,39,54,36,51,50,4,22,18,21,20,2,6,4,35, +34,46,2,39,55,30,3,51,50,62,2,55,33,53,33,46,3,2,201,88,137,102,69,19,181, +71,1,46,225,164,1,0,175,91,86,172,254,255,171,118,189,149,113,41,156,27,81, +109,140,87,109,176,128,77,9,253,114,2,142,10,73,124,173,4,250,42,70,91,50, +60,173,176,101,187,254,246,165,159,254,244,195,109,54,99,136,83,78,55,105, +83,50,72,132,185,112,154,110,178,126,68,0,0,2,0,168,255,236,7,179,5,150,0, +26,0,46,0,168,64,63,165,7,1,133,24,1,138,20,1,121,29,1,118,35,1,118,39,1, +74,19,138,19,2,58,30,122,30,2,53,34,117,34,2,42,44,58,44,122,44,3,37,40,53, +40,117,40,3,160,48,1,0,91,144,27,160,27,2,160,27,176,27,2,27,184,255,192, +64,54,7,11,72,27,16,12,90,0,13,16,13,64,13,3,7,13,37,91,17,48,10,112,10,2, +10,32,95,22,4,11,95,80,16,1,176,16,224,16,2,15,16,1,8,16,16,13,14,3,13,18, +42,95,5,19,0,63,237,63,63,18,57,47,94,93,93,113,237,63,237,1,47,93,51,237, +47,94,93,237,50,47,43,93,113,237,93,49,48,93,93,93,93,93,93,93,93,93,93,93, +1,20,2,14,1,35,34,46,2,39,33,17,35,17,51,17,33,62,3,51,50,30,1,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,7,179,90,170,245,155,156,239,165,90,7, +254,217,191,191,1,42,13,99,166,232,146,159,245,167,87,195,60,117,173,113, +116,175,117,58,60,117,173,114,121,176,114,54,2,199,165,254,242,192,104,99, +179,247,148,253,115,5,129,253,172,142,229,160,86,102,188,254,246,163,127, +208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,2,0,96,0,0,5,32,5,129, +0,17,0,30,0,239,64,22,156,29,172,29,2,138,29,1,147,20,1,117,20,133,20,2,67, +17,83,17,2,17,184,255,216,64,25,33,36,72,130,17,146,17,162,17,3,100,17,116, +17,2,86,17,1,67,16,83,16,2,3,16,184,255,216,64,117,33,36,72,172,16,1,155, +16,1,125,16,141,16,2,2,94,16,110,16,2,73,16,1,44,16,60,16,2,3,175,1,1,2,1, +104,14,16,72,94,1,110,1,2,73,1,1,44,1,60,1,2,16,1,1,6,24,24,14,18,90,6,6, +0,13,90,224,14,1,143,14,159,14,175,14,207,14,4,0,14,64,14,2,7,14,17,32,0, +1,15,0,31,0,2,0,1,15,95,47,24,95,24,111,24,143,24,4,24,24,0,26,95,11,3,14, +14,0,18,0,63,50,47,63,237,18,57,47,93,237,50,1,47,93,93,51,47,94,93,93,93, +237,18,57,47,237,17,51,17,18,57,17,51,49,48,93,93,93,43,95,93,95,93,93,93, +95,93,93,93,43,95,113,93,93,93,43,113,0,93,93,93,93,51,1,46,3,53,52,62,2, +51,33,17,35,17,33,1,19,20,30,2,51,33,17,33,34,14,2,96,1,144,91,130,84,39, +66,126,185,120,2,151,191,254,73,254,146,28,37,77,119,83,1,205,254,59,76,120, +84,44,2,95,16,78,108,130,67,94,150,104,55,250,127,2,73,253,183,3,236,57,98, +72,41,2,8,31,63,94,255,255,0,87,255,236,4,115,4,78,18,6,0,68,0,0,0,2,0,120, +255,236,4,63,5,222,0,19,0,56,0,158,64,69,137,44,1,122,45,138,45,2,102,21, +118,21,134,21,3,84,18,1,84,12,1,91,2,1,90,35,122,35,138,35,3,90,47,106,47, +138,47,3,123,46,139,46,2,73,46,105,46,2,42,42,23,71,64,208,0,1,144,0,1,0, +58,128,48,58,1,128,58,1,58,184,255,192,64,12,30,35,72,52,10,71,0,31,32,31, +2,31,184,255,192,64,23,26,35,72,31,52,5,80,20,20,42,48,41,1,64,41,240,41, +2,41,15,80,26,22,0,63,237,47,93,113,51,57,47,237,50,1,47,43,93,237,57,43, +93,113,26,16,220,93,113,26,237,50,47,49,48,0,93,93,93,93,93,93,93,93,93,93, +1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,3,50,18,17,16,2,35,34,46,2,53, +52,18,62,1,55,62,3,55,21,14,1,7,14,5,7,62,3,3,130,39,73,104,65,69,114,81, +44,44,77,105,62,69,112,78,42,243,222,210,250,238,113,178,123,65,58,128,206, +147,57,100,91,86,43,86,161,91,78,124,94,67,44,23,2,19,67,97,126,1,246,114, +151,91,37,39,92,150,112,114,150,89,36,36,88,151,2,127,254,251,254,250,254, +247,254,253,70,156,250,180,192,1,22,193,115,28,11,17,14,12,6,161,11,23,17, +14,33,50,73,108,149,101,55,97,72,41,0,0,0,0,3,0,142,0,0,3,231,4,58,0,23,0, +36,0,47,0,149,64,12,42,19,1,37,2,1,26,18,42,18,2,3,184,255,232,64,33,9,12, +72,139,10,155,10,2,10,38,44,71,5,5,24,16,71,64,47,30,159,30,2,160,30,1,30, +49,128,64,49,1,49,184,255,192,64,50,30,35,72,31,49,63,49,239,49,3,38,24,70, +192,22,1,0,22,16,22,48,22,224,22,240,22,5,8,22,10,36,81,143,38,159,38,175, +38,3,38,38,24,37,80,23,15,24,80,22,21,0,63,237,63,237,18,57,47,113,237,57, +1,47,94,93,113,237,50,93,43,113,26,16,220,93,113,26,237,17,57,47,237,18,57, +93,49,48,0,43,93,93,93,1,50,30,2,21,20,14,2,7,21,30,3,21,20,14,2,35,33,17, +19,51,50,62,2,53,52,46,2,43,1,25,1,51,50,62,2,53,52,38,35,2,52,76,144,112, +68,35,60,82,46,54,95,69,40,61,109,151,91,254,67,180,236,69,95,59,27,28,63, +100,71,224,216,68,91,55,23,102,121,4,58,24,62,104,81,53,81,58,37,9,7,7,35, +61,90,61,78,117,78,39,4,58,252,75,20,44,67,47,50,70,44,20,1,194,254,192,19, +39,61,43,82,76,0,1,0,142,0,0,2,175,4,58,0,5,0,54,64,35,0,64,18,39,72,48,0, +1,0,0,7,3,70,192,4,1,0,4,16,4,48,4,224,4,240,4,5,8,4,2,80,5,15,3,21,0,63, +63,237,1,47,94,93,113,237,17,51,47,93,43,49,48,1,21,33,17,35,17,2,175,254, +147,180,4,58,131,252,73,4,58,0,0,0,2,0,20,254,104,4,136,4,58,0,7,0,23,0,159, +64,65,134,3,1,32,3,1,102,1,1,34,5,114,5,130,5,3,34,20,1,34,17,1,137,18,1, +34,18,1,25,19,121,19,2,102,2,118,2,2,34,2,1,25,2,1,34,16,1,4,16,1,98,4,1, +4,4,36,4,68,4,84,4,4,8,73,9,184,255,192,64,42,18,25,72,9,9,22,70,64,111,7, +127,7,143,7,3,32,7,64,7,2,7,25,128,20,15,12,73,6,1,13,1,80,20,15,22,6,14, +80,11,21,13,8,0,47,51,63,237,50,50,63,237,1,47,51,51,237,51,51,26,16,220, +93,93,26,237,50,47,43,237,49,48,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,1,33,6,2,14,1,7,33,1,35,17,33,17,35,17,51,62,2,18,55,33,17,51,3,66, +254,206,24,49,48,48,22,1,241,1,70,163,252,210,163,119,30,58,58,57,28,2,132, +146,3,183,177,254,249,194,136,50,253,229,1,152,254,104,2,27,50,143,220,1, +59,223,252,73,255,255,0,87,255,236,4,24,4,78,18,6,0,72,0,0,0,1,0,7,0,0,5, +83,4,58,0,39,1,97,64,88,165,23,1,165,14,1,171,34,1,164,3,1,172,24,1,154,24, +1,163,13,1,149,13,1,90,6,106,6,122,6,3,85,31,101,31,117,31,3,74,33,154,33, +170,33,3,69,4,149,4,165,4,3,42,28,58,28,2,37,9,53,9,2,34,31,170,26,1,26,31, +27,16,27,27,32,20,38,70,39,165,11,1,11,10,3,6,6,39,10,184,255,240,64,49,10, +10,17,39,39,5,33,32,16,15,32,1,255,32,1,160,32,1,159,32,1,80,32,1,63,32,1, +32,32,1,207,32,1,128,32,144,32,2,95,32,1,32,32,48,32,2,32,4,5,184,255,240, +64,64,31,5,47,5,2,127,5,159,5,2,63,5,159,5,223,5,255,5,4,5,15,41,1,255,41, +1,160,41,1,111,41,159,41,2,80,41,1,63,41,1,32,41,1,207,41,1,128,41,144,41, +2,79,41,95,41,2,48,41,1,31,6,34,3,6,184,255,240,64,37,11,17,72,6,3,37,0,80, +20,15,17,31,17,79,17,95,17,4,15,17,31,17,79,17,3,7,17,17,4,26,18,10,15,39, +33,4,21,0,63,51,51,63,51,51,18,57,47,94,93,113,51,237,50,57,57,43,17,51,17, +51,1,93,93,93,93,113,113,113,113,113,113,114,47,93,113,114,56,51,47,93,93, +93,93,113,113,113,113,113,113,114,56,51,18,57,47,51,57,47,56,18,57,17,51, +17,51,93,16,237,50,17,57,47,56,57,51,93,17,51,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,0,93,93,1,34,38,39,1,35,1,46,1,39,3,51,23,30,3,51,17,51,17, +50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,2,83,26,65,19,254,234,200,1, +97,17,66,45,216,188,148,48,65,52,48,30,180,30,48,52,65,48,148,188,216,45, +66,17,1,97,200,254,234,19,65,26,180,1,221,12,8,254,15,2,80,14,85,66,1,69, +239,77,92,50,16,1,218,254,38,16,50,92,77,239,254,187,66,85,14,253,176,1,241, +8,12,254,35,0,0,0,1,0,49,255,236,3,94,4,78,0,55,0,175,64,28,5,53,21,53,2, +5,38,21,38,37,38,3,131,45,1,45,15,21,70,40,40,51,71,10,29,73,64,30,184,255, +192,64,86,30,36,72,143,15,1,30,15,30,15,3,144,10,1,144,10,160,10,2,31,10, +1,10,57,128,16,57,1,4,73,3,64,12,20,72,3,45,15,80,143,16,159,16,175,16,3, +16,16,35,7,0,29,1,144,29,224,29,240,29,3,29,29,24,80,35,16,7,80,0,96,4,112, +4,128,4,3,239,4,1,32,4,1,4,4,0,22,0,63,50,47,93,93,113,16,237,63,237,51,47, +93,113,17,18,57,47,113,237,57,1,47,43,237,93,26,16,204,93,93,113,17,57,57, +47,47,93,43,26,237,16,237,50,47,237,18,57,113,49,48,93,93,5,34,38,39,55,30, +1,51,50,54,53,52,46,2,35,53,50,62,2,53,52,38,35,34,14,2,7,39,62,3,51,50,30, +2,21,20,14,2,7,21,30,3,21,20,14,2,1,202,167,197,45,159,25,126,103,96,113, +55,92,120,64,64,114,86,49,99,93,35,70,60,42,7,162,12,62,97,128,78,85,138, +98,53,44,71,88,45,56,100,75,43,49,101,152,20,125,129,44,78,86,94,91,59,78, +45,18,137,15,38,67,52,74,86,14,33,55,42,20,68,98,63,29,42,76,104,63,57,88, +61,36,4,2,6,41,67,93,58,69,119,87,49,0,0,0,0,1,0,142,0,0,3,234,4,58,0,19, +0,186,64,25,9,17,1,233,17,249,17,2,4,15,1,228,15,244,15,2,11,5,1,235,5,251, +5,2,16,184,255,192,64,107,29,60,72,153,16,1,6,64,29,60,72,119,6,151,6,2,6, +7,1,230,7,246,7,2,156,7,1,105,7,137,7,2,31,17,47,17,79,17,3,9,72,64,7,64, +10,1,80,10,1,159,10,255,10,2,10,21,128,0,21,192,21,208,21,224,21,4,192,21, +1,128,21,144,21,176,21,192,21,208,21,5,17,1,72,192,18,1,0,18,16,18,48,18, +224,18,240,18,5,8,18,16,7,19,15,10,6,18,21,0,63,51,51,63,51,51,1,47,94,93, +113,237,50,93,113,114,26,16,220,93,113,114,50,26,237,49,48,0,93,1,93,93,113, +114,0,93,43,93,43,113,114,113,114,1,113,114,1,17,20,14,2,7,1,51,17,35,17, +52,62,2,55,1,35,17,1,60,3,3,3,1,1,243,197,172,2,3,3,2,254,6,192,4,58,253, +176,23,77,82,74,21,3,101,251,198,2,148,19,57,60,57,20,252,151,4,58,0,255, +255,0,142,0,0,3,234,5,240,18,38,1,206,0,0,17,7,2,145,0,234,0,0,0,19,64,11, +1,20,17,38,1,2,25,33,18,8,37,1,43,53,0,43,53,0,0,0,0,1,0,138,0,0,3,138,4, +58,0,21,0,202,64,17,117,16,133,16,149,16,3,57,15,121,15,137,15,153,15,4,13, +184,255,208,64,123,12,17,72,133,11,149,11,2,120,5,1,133,13,149,13,2,47,23, +79,23,2,73,16,1,56,16,1,16,13,121,8,137,8,153,8,3,8,71,13,1,54,13,1,13,9, +16,9,9,14,2,20,70,0,21,16,21,48,21,240,21,4,21,57,15,73,15,2,15,32,14,1,32, +14,144,14,2,144,14,1,79,14,1,48,14,1,47,14,1,16,14,1,14,16,14,13,19,80,15, +2,63,2,79,2,3,15,2,63,2,255,2,3,8,2,2,14,21,21,14,21,8,8,0,15,0,63,50,47, +63,51,47,17,57,47,94,93,113,237,50,1,47,56,93,93,93,93,93,113,114,51,113, +47,93,237,50,17,57,47,56,57,113,113,51,93,17,51,113,113,93,49,48,0,93,1,93, +93,43,93,93,19,51,17,50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,138,180, +30,48,52,65,48,148,188,216,45,66,17,1,97,200,254,234,19,65,26,180,4,58,254, +38,16,50,92,77,239,254,187,66,85,14,253,176,1,241,8,12,254,35,0,0,0,0,1,0, +11,255,236,4,29,4,58,0,25,0,186,64,42,26,21,1,130,7,1,116,7,1,85,7,101,7, +2,130,6,1,117,6,1,22,6,38,6,102,6,3,114,5,130,5,2,100,5,1,86,5,1,134,4,1, +4,184,255,240,64,61,12,15,72,26,3,1,116,2,1,7,24,12,17,72,25,70,64,127,0, +143,0,239,0,3,0,27,128,176,27,192,27,208,27,3,176,27,240,27,2,64,27,96,27, +112,27,160,27,176,27,192,27,6,131,23,1,23,54,6,1,6,2,184,255,240,64,26,24, +28,72,215,2,231,2,2,128,2,1,2,143,12,1,12,2,80,23,15,16,80,9,22,0,21,0,63, +63,237,63,237,1,47,93,51,93,93,43,51,113,51,93,93,113,114,26,16,220,93,26, +237,49,48,0,43,1,93,93,43,93,93,93,93,93,93,93,93,93,93,93,33,17,33,6,2,14, +3,35,34,38,39,53,30,1,51,50,62,3,18,55,33,17,3,104,254,137,25,42,44,51,71, +94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2,206,3,183,184,254,225,216, +149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,251,198,0,0,1,0,142,0,0,4,243, +4,58,0,28,1,3,64,21,137,18,153,18,2,134,12,150,12,2,107,17,123,17,2,100,13, +116,13,2,1,184,255,224,64,122,29,60,72,138,1,154,1,2,57,1,1,0,32,29,60,72, +133,0,149,0,2,54,0,86,0,2,143,19,159,19,2,93,19,109,19,125,19,3,59,19,75, +19,2,25,19,41,19,2,128,11,144,11,2,82,11,98,11,114,11,3,52,11,68,11,2,22, +11,38,11,2,1,0,15,15,8,21,72,64,19,80,22,1,159,22,255,22,2,22,30,128,144, +30,192,30,208,30,3,79,30,1,11,8,72,192,9,1,0,9,16,9,48,9,224,9,240,9,5,8, +9,28,2,2,184,255,192,64,22,29,60,72,2,32,19,22,72,84,2,1,19,2,10,15,22,15, +64,29,60,72,15,184,255,224,64,18,19,22,72,47,15,63,15,79,15,127,15,143,15, +5,15,1,9,21,0,63,51,51,93,43,43,51,63,51,51,93,43,43,17,51,1,47,94,93,113, +237,50,93,93,26,16,220,93,113,50,26,237,18,57,61,47,51,51,49,48,93,93,93, +93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,33,35,1,30,3,21,17,35,17,33, +19,30,1,23,62,1,55,19,33,17,35,17,52,62,2,55,3,19,153,254,188,1,3,1,1,174, +1,24,220,23,37,8,10,35,23,220,1,13,173,1,3,2,2,3,183,26,60,61,57,23,253,44, +4,58,253,107,63,151,72,72,151,63,2,149,251,198,2,212,22,60,64,60,23,0,1,0, +142,0,0,3,221,4,58,0,11,0,139,64,48,5,70,64,2,15,6,79,6,2,57,47,6,111,6,143, +6,255,6,4,191,6,1,143,6,159,6,255,6,3,6,13,128,0,13,192,13,208,13,224,13, +4,192,13,1,128,13,1,13,184,255,192,64,49,19,23,72,1,9,70,192,10,1,0,10,16, +10,48,10,224,10,240,10,5,10,8,80,176,1,192,1,2,159,1,175,1,191,1,3,15,1,63, +1,2,8,1,1,10,5,21,3,0,15,0,63,50,63,51,57,47,94,93,113,114,237,1,47,93,113, +237,50,43,93,113,114,26,16,220,93,113,114,94,93,50,26,237,49,48,1,17,33,17, +51,17,35,17,33,17,35,17,1,66,1,231,180,180,254,25,180,4,58,254,54,1,202,251, +198,1,237,254,19,4,58,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +142,0,0,3,199,4,58,0,7,0,109,64,80,1,70,64,15,2,79,2,2,57,47,2,111,2,143, +2,255,2,4,191,2,1,143,2,159,2,255,2,3,2,9,128,0,9,192,9,208,9,224,9,4,192, +9,1,128,9,176,9,192,9,208,9,4,47,9,1,5,70,192,6,1,0,6,16,6,48,6,224,6,240, +6,5,8,6,4,80,7,15,6,1,21,0,63,51,63,237,1,47,94,93,113,237,93,93,113,114, +26,16,220,93,113,114,94,93,26,237,49,48,1,17,35,17,33,17,35,17,3,199,180, +254,47,180,4,58,251,198,3,183,252,73,4,58,0,255,255,0,132,254,87,4,29,4,77, +18,6,0,83,0,0,255,255,0,87,255,236,3,202,4,78,18,6,0,70,0,0,0,1,0,35,0,0, +3,135,4,58,0,7,0,72,64,43,7,14,4,2,5,14,223,2,1,2,4,70,0,5,16,5,2,8,5,5,8, +9,160,9,1,95,9,1,48,9,64,9,2,47,9,1,4,21,3,7,80,0,15,0,63,237,50,63,1,93, +93,93,93,17,18,57,47,94,93,237,204,93,43,1,24,16,77,228,49,48,19,33,21,33, +17,35,17,33,35,3,100,254,168,180,254,168,4,58,131,252,73,3,183,0,0,0,255, +255,0,5,254,87,3,252,4,58,18,6,0,92,0,0,0,3,0,86,254,87,6,62,5,204,0,53,0, +74,0,95,0,229,64,13,141,93,157,93,173,93,3,78,24,14,17,72,72,184,255,232, +179,14,17,72,57,184,255,232,182,14,17,72,109,82,1,51,184,255,224,64,75,7, +10,72,15,26,31,26,47,26,3,24,32,7,10,72,0,3,16,3,32,3,3,7,4,54,71,64,25,14, +13,0,14,14,75,71,36,0,68,0,148,0,164,0,4,0,85,39,13,72,65,38,4,14,1,4,14, +36,14,68,14,100,14,132,14,180,14,228,14,7,7,14,52,97,1,97,184,255,192,64, +52,30,35,72,219,97,1,84,97,100,97,132,97,148,97,4,64,97,1,2,32,97,48,97,2, +31,97,1,0,97,1,38,0,31,45,80,3,70,80,49,28,16,8,18,91,3,59,80,5,22,22,13, +27,0,63,63,51,237,23,50,63,51,237,23,50,63,1,93,93,93,95,93,93,93,43,113, +47,94,93,113,51,51,237,50,50,220,93,237,43,1,24,16,77,244,26,237,49,48,95, +94,93,43,93,0,43,93,1,43,43,43,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35, +17,52,54,55,35,14,1,35,34,2,17,16,18,51,50,22,23,51,52,46,2,53,17,51,17,20, +14,2,21,51,62,1,51,50,30,2,5,20,30,2,51,50,62,2,55,53,52,46,2,35,34,14,2, +5,52,46,2,35,34,14,2,29,1,30,3,51,50,62,2,6,62,38,86,140,101,105,158,42,6, +2,3,170,2,3,5,46,149,111,186,179,185,180,112,149,45,5,2,2,1,170,1,1,1,5,46, +144,114,101,140,86,38,250,213,26,56,85,60,60,94,65,34,2,34,64,94,61,57,86, +57,29,4,110,23,52,88,64,53,92,70,40,1,35,65,92,60,65,88,53,23,2,34,123,208, +150,85,88,100,35,77,58,254,89,1,167,54,82,40,104,90,1,19,1,25,1,28,1,26,90, +98,10,41,46,42,12,1,163,254,92,11,43,47,43,12,104,89,80,145,205,129,112,160, +103,48,43,98,157,113,24,115,159,98,43,46,102,163,116,100,156,108,56,34,96, +169,135,23,108,150,93,41,58,110,159,0,0,0,255,255,0,23,0,0,3,234,4,58,18, +6,0,91,0,0,0,1,0,142,254,104,4,102,4,58,0,11,0,91,178,7,73,8,184,255,192, +64,54,18,21,72,8,8,5,70,64,223,2,1,207,2,223,2,2,2,64,25,28,72,0,2,48,2,2, +2,13,128,111,13,1,1,70,0,10,16,10,48,10,240,10,4,8,10,5,1,80,10,21,8,3,0, +15,0,63,50,47,63,237,50,1,47,94,93,237,93,26,16,220,93,43,93,113,26,237,50, +47,43,237,49,48,1,17,33,17,51,17,51,17,35,17,33,17,1,66,1,221,180,147,163, +252,203,4,58,252,73,3,183,252,73,253,229,1,152,4,58,0,1,0,122,0,0,3,156,4, +58,0,25,0,92,64,37,108,15,124,15,140,15,3,22,32,7,10,72,21,24,7,12,72,12, +70,64,9,175,13,1,127,13,143,13,239,13,3,13,27,128,1,70,24,184,255,192,64, +20,9,12,72,24,14,19,80,9,15,6,31,6,2,6,6,12,21,10,0,15,0,63,50,63,57,47,93, +51,237,50,1,47,43,237,26,16,220,93,113,50,26,237,49,48,43,43,0,93,1,17,20, +30,2,51,50,54,55,17,51,17,35,17,14,3,35,34,46,2,53,17,1,46,16,39,64,47,70, +132,74,180,180,38,81,87,93,51,66,101,69,36,4,58,254,110,34,59,44,25,26,21, +2,5,251,198,1,205,15,31,24,16,41,76,110,69,1,155,0,0,0,1,0,142,0,0,5,221, +4,58,0,11,0,116,64,52,7,70,4,4,0,11,70,64,4,8,52,8,2,36,8,132,8,212,8,228, +8,4,11,8,1,139,8,251,8,2,8,13,128,251,13,1,180,13,212,13,2,128,13,1,2,112, +13,1,95,13,1,13,184,255,192,64,23,9,12,72,3,70,0,0,16,0,48,0,3,8,0,9,5,1, +15,7,3,80,0,21,0,63,237,50,63,51,51,1,47,94,93,237,43,93,93,95,93,93,93,26, +16,220,93,113,113,114,26,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,142,180,1,154,180,1,153,180,4,58,252,73,3,183,252,73,3,183,251,198, +0,0,0,1,0,142,254,104,6,102,4,58,0,15,0,141,64,96,13,73,244,14,1,14,14,11, +70,8,7,70,64,4,4,0,107,8,1,4,8,1,84,8,228,8,2,59,8,1,107,8,123,8,139,8,251, +8,4,84,8,1,8,17,128,251,17,1,212,17,1,128,17,176,17,2,2,96,17,112,17,2,95, +17,1,32,17,48,17,64,17,3,3,70,0,0,16,0,48,0,240,0,4,8,0,14,9,5,1,15,11,7, +3,80,0,21,0,63,237,50,50,63,51,51,47,1,47,94,93,237,93,93,93,95,93,93,93, +26,16,204,93,93,113,113,114,114,17,57,47,26,237,16,237,50,47,93,237,49,48, +51,17,51,17,33,17,51,17,33,17,51,17,51,17,35,17,142,180,1,149,180,1,148,180, +147,163,4,58,252,73,3,183,252,73,3,183,252,73,253,229,1,152,0,0,0,0,2,0,45, +0,0,4,172,4,58,0,14,0,25,0,113,185,0,5,255,224,179,7,10,72,2,184,255,224, +64,16,7,11,72,3,71,64,176,21,1,21,27,128,80,27,1,27,184,255,192,64,45,30, +35,72,255,27,1,14,11,15,70,32,9,1,32,9,1,9,25,81,175,14,191,14,207,14,3,15, +14,31,14,79,14,3,7,14,14,9,11,80,12,15,15,81,9,21,0,63,237,63,237,18,57,47, +94,93,113,237,1,47,93,113,253,204,51,93,43,113,26,16,220,93,26,237,49,48, +43,43,1,50,22,21,20,14,2,35,33,17,33,53,33,25,1,51,50,62,2,53,52,38,43,1, +3,13,205,210,52,104,155,103,254,103,254,184,1,252,202,69,96,59,26,116,133, +203,2,112,147,159,74,118,82,44,3,183,131,254,54,254,15,25,49,71,46,94,87, +0,3,0,142,0,0,5,50,4,58,0,12,0,23,0,27,0,105,185,0,5,255,224,179,7,10,72, +2,184,255,224,64,58,7,10,72,3,71,19,19,9,27,70,64,159,24,175,24,2,24,29,128, +12,13,70,16,9,32,9,64,9,3,9,23,81,175,12,191,12,207,12,3,15,12,31,12,79,12, +3,7,12,12,9,25,10,15,24,13,81,9,21,0,63,237,51,63,51,18,57,47,94,93,113,237, +1,47,93,237,50,26,16,220,93,26,237,18,57,47,237,49,48,43,43,1,50,22,21,20, +14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,1,17,51,17,2,38,205,210,52, +104,155,103,254,103,180,202,69,96,59,26,116,133,203,3,60,180,2,112,147,159, +74,118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,254,13,4,58,251,198,0,0, +0,0,2,0,142,0,0,3,215,4,58,0,12,0,23,0,132,185,0,5,255,224,179,7,10,72,2, +184,255,224,64,86,7,10,72,3,71,64,176,19,1,19,25,128,47,25,1,47,25,175,25, +2,63,25,95,25,127,25,159,25,191,25,207,25,223,25,255,25,8,25,64,35,39,72, +12,13,70,0,9,208,9,2,16,9,32,9,64,9,240,9,4,9,23,81,175,12,191,12,207,12, +3,15,12,31,12,79,12,3,7,12,12,9,10,15,13,81,9,21,0,63,237,63,18,57,47,94, +93,113,237,1,47,93,113,237,50,43,93,113,114,26,16,220,93,26,237,49,48,43, +43,1,50,22,21,20,14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,2,56,205, +210,52,104,155,103,254,85,180,220,69,96,59,26,116,133,221,2,112,147,159,74, +118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,0,0,0,0,1,0,55,255,236,3,190, +4,78,0,40,0,170,64,87,118,34,1,22,29,1,118,28,1,107,15,1,107,6,1,16,10,32, +10,2,10,10,0,31,71,64,12,31,9,1,144,9,1,9,42,128,20,70,21,21,1,70,31,0,1, +223,0,1,0,64,12,18,72,0,10,80,143,11,159,11,175,11,3,11,11,26,4,80,36,0,1, +16,1,32,1,96,1,112,1,128,1,192,1,208,1,8,1,184,255,192,64,29,27,34,72,1,1, +36,22,31,20,47,20,127,20,143,20,223,20,5,20,64,29,32,72,20,20,17,80,26,16, +0,63,237,51,47,43,93,63,51,47,43,93,16,237,17,57,47,113,237,1,47,43,113,114, +237,51,47,237,26,16,220,93,113,50,26,237,18,57,47,93,49,48,93,93,93,93,93, +19,55,30,1,51,50,62,2,55,33,53,33,46,3,35,34,6,7,39,62,3,51,50,30,2,21,20, +14,2,35,34,46,2,55,182,16,133,100,73,103,68,34,5,254,99,1,157,4,34,67,103, +73,109,118,15,185,13,66,105,145,93,90,170,134,81,51,114,182,130,99,151,106, +61,1,59,12,108,104,53,97,135,82,131,90,133,88,44,105,91,14,68,116,84,48,53, +128,216,163,120,205,151,86,54,92,122,0,0,0,0,2,0,142,255,236,5,170,4,78,0, +19,0,39,0,128,64,85,121,37,137,37,2,116,33,132,33,2,118,27,134,27,2,121,23, +137,23,2,150,18,166,18,2,30,71,15,15,8,31,8,2,7,8,8,11,0,71,64,160,20,1,20, +41,128,14,10,70,192,11,1,0,11,16,11,48,11,224,11,240,11,5,8,11,25,80,17,16, +9,80,47,14,1,14,14,11,12,15,11,21,35,80,3,22,0,63,237,63,63,18,57,47,93,237, +63,237,1,47,94,93,113,237,50,26,16,220,93,26,237,18,57,47,94,93,51,237,49, +48,0,93,1,93,93,93,93,1,16,2,35,34,46,2,39,35,17,35,17,51,17,51,18,33,50, +18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,170,235,223,102,161,115,65, +5,222,180,180,223,33,1,164,237,215,189,35,67,97,61,63,99,70,37,39,70,94,56, +62,100,70,38,2,30,254,228,254,234,62,128,192,131,254,19,4,58,254,54,1,222, +254,232,254,232,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0,0,2, +0,17,0,0,3,199,4,58,0,13,0,22,0,143,64,68,117,1,133,1,2,3,32,11,17,72,0,32, +40,43,72,223,0,239,0,2,0,32,29,37,72,52,0,1,43,0,1,41,4,1,4,48,7,10,72,7, +32,7,11,72,18,71,0,3,3,12,6,6,2,22,11,70,64,175,12,1,239,12,1,12,24,128,1, +2,184,255,240,64,22,91,2,107,2,2,2,3,0,81,47,21,1,21,21,1,15,81,9,15,12,1, +21,0,63,51,63,237,18,57,47,93,237,50,1,47,93,56,51,26,16,220,93,113,26,237, +51,18,57,47,18,57,17,51,237,49,48,43,0,43,93,1,93,113,43,113,43,43,93,9,1, +35,1,46,1,53,52,54,51,33,17,35,25,1,35,34,6,21,20,22,59,1,2,23,254,197,203, +1,88,131,118,216,207,1,176,180,234,130,120,107,124,253,1,202,254,54,1,215, +27,163,122,149,150,251,198,1,202,1,241,92,93,94,93,0,255,255,0,87,255,236, +4,24,5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3, +2,4,42,40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,0,1,0,10,254,87,3,238,5,204, +0,57,0,162,64,9,170,49,1,31,32,9,15,72,24,184,255,232,64,86,9,13,72,0,24, +16,24,2,7,36,36,57,28,70,64,80,45,1,159,45,1,45,59,128,10,7,57,70,4,3,192, +0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176,59,192,59,208,59,3,176,59,240,59, +2,255,59,1,112,59,160,59,176,59,3,57,21,40,80,33,27,15,51,80,22,10,2,81,7, +3,3,5,22,184,255,192,182,7,13,72,22,15,5,0,0,63,63,43,18,57,47,51,237,50, +16,237,50,63,237,63,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220, +93,113,26,237,17,57,47,49,48,0,94,93,43,43,1,93,51,17,35,53,51,53,51,21,33, +21,33,21,20,14,2,7,51,62,3,51,50,30,2,21,17,20,14,2,35,34,38,39,53,30,1,51, +50,62,2,53,17,52,46,2,35,34,14,2,21,17,142,132,132,180,1,44,254,212,2,3,2, +1,3,30,70,84,100,62,104,133,77,29,21,54,93,72,34,65,28,13,36,13,38,49,27, +10,17,48,88,70,64,103,73,40,4,182,131,147,147,131,148,33,66,56,39,7,55,77, +50,23,56,101,140,84,252,209,62,106,78,45,4,5,139,2,4,20,43,67,46,2,241,69, +104,69,35,46,84,120,75,253,170,0,0,0,255,255,0,142,0,0,2,200,5,228,18,38, +1,201,0,0,17,7,0,116,0,216,0,0,0,19,64,11,1,6,17,38,1,85,6,9,4,0,37,1,43, +53,0,43,53,0,0,0,0,1,0,87,255,236,3,222,4,78,0,40,0,171,64,113,116,30,1,116, +21,1,137,8,1,137,2,1,47,42,1,63,26,1,26,26,27,36,16,70,15,15,35,70,0,36,32, +36,2,0,36,64,36,96,36,128,36,160,36,192,36,224,36,7,8,36,24,27,71,31,5,1, +5,27,80,143,24,159,24,175,24,3,24,24,32,19,80,10,31,16,47,16,127,16,143,16, +223,16,5,16,64,29,32,72,16,16,10,16,32,80,0,0,35,16,35,32,35,96,35,112,35, +128,35,192,35,208,35,8,35,184,255,192,182,27,34,72,35,35,0,22,0,63,50,47, +43,93,16,237,63,51,47,43,93,16,237,18,57,47,113,237,1,47,93,237,50,47,94, +93,113,237,51,47,237,17,18,57,47,93,93,49,48,93,93,93,93,5,34,46,2,53,52, +62,2,51,50,30,2,23,7,46,1,35,34,14,2,7,33,21,33,30,3,51,50,54,55,23,14,3, +2,52,130,182,114,51,81,134,170,90,93,145,105,66,13,185,15,118,109,73,103, +67,34,4,1,156,254,99,4,35,68,103,74,100,133,16,182,9,61,106,151,20,86,151, +205,120,163,216,128,53,48,84,116,68,14,91,105,44,88,133,90,131,82,135,97, +53,103,109,12,67,122,92,54,0,255,255,0,57,255,236,3,182,4,75,18,6,0,86,0, +0,255,255,0,137,0,0,1,61,5,204,16,38,0,241,199,0,17,6,1,75,237,0,0,212,181, +9,64,56,56,72,9,184,255,192,64,9,55,55,72,9,64,54,54,72,9,184,255,192,179, +53,53,72,9,184,255,192,64,9,52,52,72,9,64,50,50,72,9,184,255,192,179,49,49, +72,9,184,255,192,64,9,48,48,72,9,64,42,42,72,9,184,255,192,179,41,41,72,9, +184,255,192,64,9,40,40,72,9,64,38,38,72,9,184,255,192,179,37,37,72,9,184, +255,192,179,36,36,72,9,184,255,192,179,35,35,72,9,184,255,192,64,16,34,34, +72,9,64,29,29,72,9,64,10,10,72,1,0,0,184,255,192,179,49,49,72,0,184,255,192, +64,9,40,41,72,0,64,25,27,72,0,184,255,192,182,18,18,72,128,0,1,0,184,255, +192,64,11,8,8,72,0,1,0,4,7,1,2,37,1,43,53,17,43,93,43,43,43,43,53,53,1,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,248,0,0,2, +37,5,123,18,38,0,241,0,0,17,6,0,105,203,0,0,25,182,2,1,4,17,38,2,1,184,255, +243,180,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,0,255,255,255,206,254,87,1,61, +5,204,18,6,0,77,0,0,0,2,0,11,255,236,6,236,4,58,0,34,0,45,1,42,64,82,163, +16,1,148,16,1,117,16,133,16,2,106,14,1,57,14,1,14,16,18,22,72,131,14,147, +14,163,14,3,117,14,1,106,13,1,57,13,1,13,16,18,22,72,163,13,1,87,13,103,13, +119,13,3,16,24,12,17,72,109,15,1,15,32,18,22,72,162,15,1,117,15,133,15,149, +15,3,54,15,70,15,2,5,184,255,224,179,7,10,72,2,184,255,224,64,18,7,11,72, +34,35,70,64,9,1,9,9,22,3,71,176,41,1,41,184,255,192,64,9,8,11,72,41,47,80, +47,1,47,184,255,192,64,93,30,35,72,255,47,1,48,47,1,109,11,1,31,11,63,11, +2,255,11,1,233,11,1,187,11,203,11,219,11,3,163,11,1,149,11,1,31,32,63,32, +2,255,32,1,106,32,1,41,32,1,163,32,1,53,32,1,11,15,32,3,22,45,81,175,34,191, +34,207,34,3,15,34,31,34,79,34,3,7,34,34,9,11,80,32,15,25,80,18,22,35,81,9, +21,0,63,237,63,237,63,237,18,57,47,94,93,113,237,1,47,23,51,93,93,113,113, +93,113,93,93,93,93,93,113,113,93,93,43,113,16,220,43,93,237,18,57,47,93,237, +50,49,48,43,43,93,93,93,43,113,0,43,1,93,93,43,113,113,93,93,43,113,113,93, +93,93,1,50,22,21,20,14,2,35,33,17,33,6,2,14,3,35,34,38,39,53,30,1,51,50,62, +3,18,55,33,25,1,51,50,62,2,53,52,38,43,1,5,77,205,210,52,104,155,103,254, +62,254,101,25,42,44,51,71,94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2, +242,242,69,96,59,26,116,133,243,2,112,147,159,74,118,82,44,3,183,184,254, +225,216,149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,254,54,254,15,25,49, +71,46,94,87,0,0,2,0,142,0,0,6,44,4,58,0,20,0,31,0,133,185,0,7,255,224,179, +7,10,72,4,184,255,224,64,23,7,11,72,1,21,70,19,11,11,15,5,71,64,176,27,1, +27,33,128,80,33,1,33,184,255,192,64,50,30,35,72,255,33,1,18,14,70,16,15,32, +15,64,15,3,15,31,81,1,1,13,80,175,18,191,18,207,18,3,15,18,31,18,79,18,3, +7,18,18,0,15,21,21,81,11,21,16,0,15,0,63,50,63,237,63,18,57,47,94,93,113, +237,51,47,237,1,47,93,237,50,93,43,113,26,16,220,93,26,237,18,57,47,51,237, +50,49,48,43,43,1,17,51,50,22,21,20,14,2,35,33,17,33,17,35,17,51,17,33,17, +19,51,50,62,2,53,52,38,43,1,3,169,228,205,210,52,104,155,103,254,102,254, +78,180,180,1,178,181,202,69,96,59,26,116,133,203,4,58,254,54,147,159,74,118, +82,44,1,237,254,19,4,58,254,54,1,202,252,69,25,49,71,46,94,87,0,0,0,0,1,0, +10,0,0,3,238,5,204,0,41,0,144,185,0,7,255,232,64,85,9,13,72,0,7,16,7,2,7, +33,24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,35,32,24,70,29,28,192,25, +1,0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240, +43,2,255,43,1,112,43,160,43,176,43,3,35,27,81,32,28,28,5,30,0,25,11,21,0, +18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220,93,113,26,237, +17,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61,30,70,84,100,62,104, +133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180,1,44,254,212,2,3,2, +1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69,35,46,84,120,75,253, +170,4,182,131,147,147,131,148,33,66,56,39,7,0,0,255,255,0,138,0,0,3,138,5, +228,18,38,1,208,0,0,17,7,0,116,1,63,0,0,0,19,64,11,1,22,17,38,1,81,22,25, +0,14,37,1,43,53,0,43,53,0,0,0,255,255,0,5,254,87,3,252,5,240,18,38,0,92,0, +0,17,7,2,145,0,183,0,0,0,19,64,11,1,32,17,38,1,10,37,45,17,31,37,1,43,53, +0,43,53,0,0,0,0,1,0,142,254,104,3,221,4,58,0,11,0,125,64,89,9,73,15,10,79, +10,2,38,10,10,0,7,70,64,15,4,79,4,2,57,47,4,111,4,143,4,255,4,4,191,4,1,143, +4,159,4,255,4,3,4,13,128,3,70,192,0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176, +13,192,13,208,13,3,176,13,240,13,2,112,13,160,13,176,13,192,13,4,9,5,1,15, +8,3,80,0,0,47,237,51,63,51,47,1,93,113,114,47,94,93,113,237,26,16,220,93, +113,114,94,93,26,237,18,57,47,94,93,237,49,48,51,17,51,17,33,17,51,17,33, +17,35,17,142,180,1,231,180,254,170,163,4,58,252,73,3,183,251,198,254,104, +1,152,0,0,1,0,168,0,1,3,186,7,28,0,7,0,55,64,37,5,90,0,6,16,6,64,6,3,6,3, +70,255,0,1,0,0,16,0,64,0,128,0,176,0,208,0,6,7,0,4,95,1,7,3,5,18,0,63,63, +51,237,1,47,94,93,93,237,47,93,237,49,48,1,17,51,17,33,17,35,17,3,6,180,253, +173,191,5,129,1,155,253,201,251,28,5,128,0,0,0,0,1,0,142,0,0,3,10,5,204,0, +7,0,56,64,36,6,73,16,3,48,3,2,3,3,9,0,70,192,1,1,0,1,16,1,48,1,224,1,240, +1,5,8,1,4,0,7,80,2,15,0,21,0,63,63,237,63,1,47,94,93,113,237,17,51,47,93, +237,49,48,33,35,17,33,17,51,17,33,1,66,180,1,217,163,254,56,4,58,1,146,253, +235,255,255,0,9,0,0,7,134,6,240,18,38,0,58,0,0,17,7,2,148,2,65,0,0,0,21,180, +1,47,5,38,1,184,255,184,180,48,51,15,46,37,1,43,53,0,43,53,0,255,255,255, +253,0,0,5,204,5,228,18,38,0,90,0,0,17,7,0,67,1,72,0,0,0,21,180,1,43,17,38, +1,184,255,162,180,44,47,15,42,37,1,43,53,0,43,53,0,255,255,0,9,0,0,7,134, +6,240,18,38,0,58,0,0,17,7,2,149,2,247,0,0,0,19,64,11,1,47,5,38,1,75,47,50, +15,46,37,1,43,53,0,43,53,0,0,0,255,255,255,253,0,0,5,204,5,228,18,38,0,90, +0,0,17,7,0,116,2,38,0,0,0,19,64,11,1,43,17,38,1,93,43,46,15,42,37,1,43,53, +0,43,53,0,0,0,255,255,0,9,0,0,7,134,6,178,18,38,0,58,0,0,17,7,2,152,2,134, +0,0,0,23,64,13,2,1,47,5,38,2,1,2,51,49,15,46,37,1,43,53,53,0,43,53,53,0,0, +0,255,255,255,253,0,0,5,204,5,123,18,38,0,90,0,0,17,7,0,105,1,161,0,0,0,23, +64,13,2,1,43,17,38,2,1,0,47,45,15,42,37,1,43,53,53,0,43,53,53,0,0,0,255,255, +0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,148,1,34,0,0,0,21,180,1,9,5,38, +1,184,255,181,180,10,13,4,8,37,1,43,53,0,43,53,0,255,255,0,5,254,87,3,252, +5,228,18,38,0,92,0,0,17,6,0,67,105,0,0,21,180,1,32,17,38,1,184,255,167,180, +33,36,17,31,37,1,43,53,0,43,53,0,0,0,0,1,0,0,1,195,4,114,2,76,0,3,0,43,64, +30,2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38, +43,72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,4,114,1,195,137,137, +0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30,2,0,0,186,15,1,31,1,63,1,79,1,4,47, +1,63,1,111,1,175,1,223,1,5,1,64,38,43,72,1,0,47,43,93,113,237,1,47,47,49, +48,17,53,33,21,8,0,1,195,137,137,0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30, +2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38,43, +72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,8,0,1,195,137,137,0,255, +255,255,225,254,78,4,138,255,169,16,38,0,66,0,229,16,7,0,66,0,0,0,190,0,1, +0,127,3,184,1,72,5,129,0,12,0,47,64,16,4,32,11,17,72,7,64,11,17,72,7,12,150, +10,151,0,184,255,192,64,10,8,11,72,0,10,156,0,169,7,3,0,63,244,237,1,47,43, +237,237,50,43,49,48,43,19,53,52,62,2,55,51,14,1,21,51,21,127,10,20,30,20, +121,45,50,89,3,184,146,52,86,75,66,32,65,132,65,195,0,0,0,1,0,127,3,184,1, +72,5,129,0,12,0,52,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255,192, +180,11,17,72,6,11,184,255,192,64,10,8,11,72,11,10,156,5,169,11,3,0,63,228, +237,1,47,43,51,43,253,237,49,48,43,1,20,14,2,7,35,62,1,53,35,53,51,1,72,9, +20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,63,197,0,1,0,127,254, +250,1,72,0,195,0,12,0,51,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255, +192,180,11,17,72,6,11,184,255,192,64,9,8,11,72,11,5,169,11,156,10,0,47,253, +228,1,47,43,51,43,253,237,49,48,43,37,20,14,2,7,35,62,1,53,35,53,51,1,72, +9,20,29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,0,0,0,1,0,126, +3,184,1,71,5,129,0,12,0,47,64,16,8,32,11,17,72,5,64,11,17,72,5,1,150,2,151, +11,184,255,192,64,10,8,11,72,11,5,169,2,156,12,3,0,63,237,228,1,47,43,237, +237,50,43,49,48,43,1,21,35,20,22,23,35,46,3,61,1,1,65,88,49,45,123,20,29, +20,9,5,129,197,63,132,65,32,66,75,86,53,145,0,0,0,2,0,75,3,184,2,95,5,129, +0,12,0,25,0,89,64,58,17,32,11,17,72,4,32,11,17,72,20,64,11,17,72,20,25,150, +13,7,64,11,17,72,7,12,150,10,151,128,0,1,15,0,31,0,2,8,0,23,151,13,159,27, +175,27,2,10,23,156,13,0,0,13,169,6,20,3,0,63,51,228,50,47,16,237,50,1,93, +47,237,220,94,93,93,237,237,50,43,16,237,50,43,49,48,43,43,1,53,52,62,2,55, +51,14,1,21,51,21,33,53,52,62,2,55,51,14,1,21,51,21,1,151,10,19,29,20,122, +45,49,88,253,242,10,20,30,20,121,45,50,89,3,184,146,52,86,75,66,32,65,132, +65,195,146,52,86,75,66,32,65,132,65,195,0,0,2,0,75,3,184,2,95,5,129,0,12, +0,25,0,107,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22, +151,13,150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31, +11,2,8,11,19,184,255,192,64,24,11,17,72,19,63,24,1,24,159,27,175,27,2,10, +23,156,24,5,5,18,169,11,24,3,0,63,51,228,50,47,16,237,50,1,93,47,93,51,43, +220,94,93,93,50,43,253,237,16,253,237,49,48,43,43,1,20,14,2,7,35,62,1,53, +35,53,51,5,20,14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194, +254,181,9,20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,65,195,145, +53,86,75,66,32,65,132,65,195,0,0,0,2,0,75,254,250,2,95,0,195,0,12,0,25,0, +104,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22,151,13, +150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31,11,2, +8,11,19,184,255,192,64,21,11,17,72,19,24,159,27,175,27,2,5,5,18,169,24,11, +11,24,156,10,23,0,47,51,237,50,47,16,228,50,47,1,93,47,51,43,220,94,93,93, +50,43,253,237,16,253,237,49,48,43,43,37,20,14,2,7,35,62,1,53,35,53,51,5,20, +14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194,254,181,9,20, +29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,144,53,87,75,66,32, +65,132,65,195,0,0,0,1,0,138,255,118,3,234,5,204,0,11,0,64,64,37,11,192,0, +8,9,8,0,188,3,7,7,6,4,192,47,3,111,3,175,3,3,32,3,1,3,11,193,10,194,7,4,193, +5,194,7,0,1,0,47,63,246,237,16,244,237,1,47,93,113,237,51,51,47,16,237,50, +50,47,16,237,49,48,1,3,35,3,5,53,5,3,51,3,37,21,2,137,22,115,22,254,160,1, +96,28,215,28,1,97,3,232,251,142,4,114,27,164,29,1,120,254,136,29,164,0,0, +1,0,136,255,115,3,233,5,204,0,21,0,86,64,50,12,8,189,9,15,5,6,11,14,15,5, +9,190,19,1,189,0,20,17,0,16,3,4,16,3,32,0,1,0,19,193,18,194,15,12,193,13, +194,15,8,193,7,194,4,1,193,2,194,4,0,0,63,246,237,16,244,237,47,246,237,16, +244,237,1,47,93,23,51,47,17,51,51,16,237,50,237,23,50,47,16,237,50,49,48, +1,5,53,5,3,51,3,37,21,37,3,19,37,21,37,19,35,19,5,53,5,19,1,241,254,152,1, +104,16,175,16,1,105,254,151,26,26,1,104,254,152,16,175,16,254,151,1,105,26, +3,232,27,164,29,1,120,254,136,29,164,27,254,182,254,185,27,164,29,254,136, +1,120,29,164,27,1,71,0,0,0,0,1,0,81,1,145,2,124,3,188,0,19,0,73,185,0,17, +255,232,179,9,12,72,13,184,255,232,64,39,9,12,72,7,24,9,12,72,3,24,9,12,72, +128,0,1,15,0,63,0,2,0,191,10,1,10,143,5,1,0,5,48,5,2,5,15,15,1,15,0,47,93, +205,93,93,1,47,93,205,93,93,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52, +62,2,51,50,30,2,2,124,45,76,102,58,57,99,75,43,43,75,99,57,58,102,76,45,2, +170,58,102,77,44,44,77,102,58,57,100,74,43,43,74,100,0,0,0,3,1,22,0,0,6,234, +0,219,0,3,0,7,0,11,0,86,64,61,7,150,4,4,0,11,150,0,8,48,8,96,8,128,8,144, +8,160,8,208,8,240,8,8,0,8,48,8,64,8,96,8,144,8,192,8,208,8,240,8,8,8,8,3, +150,47,0,191,0,2,16,0,1,0,5,1,9,155,4,0,8,0,47,51,51,237,50,50,1,47,93,93, +237,47,94,93,113,237,18,57,47,237,49,48,33,53,51,21,33,53,51,21,33,53,51, +21,6,40,194,252,183,192,252,181,195,219,219,219,219,219,219,0,0,7,0,55,255, +245,7,200,5,141,0,3,0,23,0,43,0,63,0,83,0,103,0,123,3,217,64,12,118,0,134, +0,2,121,2,137,2,2,3,102,184,255,224,64,14,8,12,72,96,24,8,12,72,92,24,8,12, +72,86,184,255,224,179,8,12,72,62,184,255,232,64,14,8,12,72,56,24,8,12,72, +52,24,8,12,72,46,184,255,224,179,8,12,72,22,184,255,224,64,14,8,12,72,16, +24,8,12,72,12,24,8,12,72,6,184,255,224,64,13,8,12,72,74,180,59,181,49,0,1, +2,3,1,184,255,240,64,131,3,16,118,3,1,9,1,25,1,121,1,3,9,1,3,1,3,19,49,180, +102,64,1,38,64,182,64,198,64,214,64,4,64,64,19,114,180,99,181,89,180,105, +104,1,22,104,38,104,2,201,104,249,104,2,139,104,1,118,104,1,89,104,1,70,104, +1,41,104,1,27,104,1,233,104,1,150,104,198,104,2,121,104,1,107,104,1,86,104, +1,57,104,1,6,104,22,104,38,104,3,10,104,24,180,9,181,34,180,9,19,25,19,41, +19,73,19,89,19,121,19,137,19,153,19,8,34,19,64,45,49,72,19,184,255,192,64, +255,19,23,72,19,217,125,1,198,125,1,169,125,1,155,125,1,121,125,1,107,125, +1,93,125,1,73,125,1,59,125,1,45,125,1,9,125,25,125,2,251,125,1,237,125,1, +217,125,1,203,125,1,189,125,1,155,125,1,125,125,141,125,2,105,125,1,91,125, +1,77,125,1,54,125,1,41,125,1,11,125,27,125,2,204,233,125,249,125,2,214,125, +1,187,125,1,173,125,1,137,125,153,125,2,123,125,1,102,125,1,75,125,1,61,125, +1,9,125,1,219,125,251,125,2,205,125,1,153,125,169,125,2,107,125,139,125,2, +93,125,1,57,125,1,43,125,1,29,125,1,9,125,1,237,125,253,125,2,185,125,201, +125,217,125,3,123,125,171,125,2,89,125,1,11,125,59,125,75,125,3,155,249,125, +1,235,125,1,214,125,1,187,125,1,153,125,1,123,125,139,125,2,102,125,1,59, +125,75,125,2,9,125,25,125,2,246,125,1,217,125,1,205,125,1,169,125,185,125, +2,155,125,1,105,125,121,125,2,93,125,1,57,125,73,125,2,43,125,1,22,125,1, +249,125,1,237,125,1,201,125,64,249,1,187,125,1,153,125,1,123,125,1,102,125, +1,73,125,1,54,125,1,9,125,25,125,2,105,249,125,1,235,125,1,221,125,1,169, +125,1,150,125,1,121,125,1,107,125,1,73,125,1,59,125,1,25,125,1,11,125,1,253, +125,1,217,125,1,203,125,1,169,125,1,155,125,1,141,125,1,121,125,1,91,125, +107,125,2,57,125,1,27,125,43,125,2,249,125,1,235,125,1,169,125,201,125,2, +150,125,1,121,125,1,107,125,1,57,125,1,38,125,1,9,125,1,56,249,125,1,230, +125,1,201,125,1,182,125,1,153,125,1,139,125,1,89,125,1,70,125,1,41,125,1, +27,125,1,249,125,1,235,125,1,201,125,1,187,125,1,173,125,1,1,148,125,1,123, +125,1,100,125,1,75,125,1,63,125,1,27,125,1,15,125,1,228,125,1,203,125,1,176, +125,1,2,160,125,1,143,125,1,112,125,1,95,125,1,64,125,1,31,125,1,0,125,1, +8,109,182,84,183,119,182,94,19,69,182,44,183,79,182,54,19,39,182,14,183,29, +182,4,4,2,3,0,18,0,63,63,63,237,244,237,63,237,244,237,63,237,244,237,1,94, +93,93,93,93,93,93,93,95,93,93,93,113,113,113,113,113,113,113,95,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113, +113,113,113,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,113,113, +113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,47,43,43,94,93,237,244,237,47,94,93,93,93,93,93,93,93,113,113,113,113, +113,113,113,114,114,253,244,237,18,57,47,93,113,237,17,57,57,47,47,94,93, +93,56,56,17,51,17,51,16,244,237,49,48,0,43,43,43,43,43,43,43,43,43,43,43, +43,1,95,93,93,33,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2,53,52,62,2,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2,35,34,46,2,53, +52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2, +35,34,46,2,53,52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,48,155, +3,154,157,252,152,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19, +37,55,35,38,58,39,19,20,39,56,37,34,54,39,21,2,30,60,107,80,46,46,81,108, +62,63,108,80,46,46,81,110,210,19,37,55,35,38,58,39,19,20,39,56,37,34,54,39, +21,1,253,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19,37,55,35, +38,58,39,19,20,39,56,37,34,54,39,21,5,129,12,33,83,139,106,102,140,86,38, +37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71,97,59,26,26, +59,97,254,239,33,83,139,106,102,140,86,38,37,86,140,103,106,139,83,33,254, +151,73,98,58,24,24,59,97,73,71,97,59,26,26,59,97,1,176,33,83,139,106,102, +140,86,38,37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71, +97,59,26,26,59,97,0,0,0,0,1,0,85,3,122,1,89,5,129,0,3,0,40,64,25,3,16,10, +13,72,1,16,10,13,72,1,150,31,2,47,2,2,2,48,0,1,0,0,1,3,0,63,205,1,47,93,221, +93,237,49,48,43,43,27,1,51,3,85,64,196,158,3,122,2,7,253,249,255,255,0,85, +3,122,2,175,5,129,16,38,2,14,0,0,17,7,2,14,1,86,0,0,0,9,180,1,96,4,1,4,17, +93,53,0,0,1,0,88,0,141,2,81,3,172,0,8,0,72,64,55,106,3,122,3,138,3,3,106, +0,122,0,138,0,3,7,236,6,235,5,236,31,1,79,1,95,1,127,1,143,1,5,48,1,64,1, +96,1,112,1,160,1,5,1,0,239,15,3,47,3,111,3,127,3,4,3,0,47,93,228,1,47,93, +113,237,237,237,49,48,93,93,37,1,53,1,51,21,9,1,21,1,168,254,176,1,80,167, +254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,0,0,0,1,0,89,0,141, +2,82,3,172,0,8,0,66,64,48,101,6,117,6,133,6,3,101,0,117,0,133,0,3,4,236,1, +236,8,235,112,3,128,3,176,3,3,208,3,1,111,3,127,3,2,3,0,239,15,6,47,6,111, +6,127,6,4,6,0,47,93,228,1,47,93,93,113,253,237,237,49,48,93,93,37,35,53,9, +1,53,51,1,21,1,1,168,1,82,254,176,166,1,81,141,29,1,111,1,116,31,254,141, +63,0,0,0,255,255,0,185,0,0,3,71,5,129,16,38,0,4,0,0,17,7,0,4,1,200,0,0,0, +22,64,12,3,2,47,8,1,8,1,0,47,0,1,0,17,93,53,53,17,93,53,53,0,1,255,192,5, +223,2,235,6,84,0,3,0,13,179,1,0,2,1,0,47,205,1,47,47,49,48,1,33,53,33,2,235, +252,213,3,43,5,223,117,0,1,254,96,0,0,2,98,5,129,0,3,0,45,182,3,16,111,3, +1,3,1,184,255,240,64,18,239,1,1,1,64,13,18,72,1,64,8,11,72,1,2,3,0,18,0,63, +63,1,47,43,43,93,56,47,93,56,49,48,33,35,1,51,254,244,148,3,113,145,5,129, +0,0,1,0,101,2,7,2,131,4,157,0,33,0,111,185,0,30,255,216,64,30,9,17,72,23, +10,224,36,11,1,11,33,224,36,0,212,0,228,0,3,0,23,6,228,11,139,0,251,0,2,0, +184,255,192,64,38,10,13,72,4,0,1,0,29,17,17,75,29,91,29,2,29,64,21,25,72, +29,64,16,19,72,47,29,63,29,2,27,29,1,15,29,1,2,29,0,47,95,93,93,93,43,43, +93,51,47,16,204,93,43,93,50,237,50,1,47,93,237,47,93,237,50,49,48,0,43,1, +17,52,46,2,35,34,6,21,17,35,17,52,46,2,53,51,20,30,2,21,51,62,3,51,50,22, +21,17,2,2,13,29,47,35,72,85,128,1,1,2,119,2,2,2,2,15,38,49,64,42,110,97,2, +7,1,142,46,61,37,16,100,94,254,148,1,255,20,46,40,29,4,3,27,34,35,12,28,46, +32,17,108,121,254,79,0,0,0,1,0,4,0,0,4,46,5,129,0,17,0,106,64,69,7,3,7,3, +10,0,16,32,16,2,16,16,48,16,80,16,112,16,144,16,224,16,6,16,5,1,9,92,14,12, +10,8,12,81,5,31,13,1,0,13,1,13,4,95,15,1,31,1,63,1,79,1,4,63,1,1,15,1,1,8, +1,1,9,0,95,15,3,9,18,0,63,63,237,18,57,47,94,93,93,113,237,220,93,113,50, +237,50,1,47,51,51,237,50,50,47,93,113,18,57,57,47,47,49,48,1,17,33,21,33, +21,33,21,33,17,35,17,35,53,51,17,33,21,1,103,2,175,253,81,1,146,254,110,180, +175,175,3,123,4,230,254,36,157,213,129,254,233,1,23,129,3,233,155,0,1,0,58, +0,0,4,80,5,150,0,58,0,221,64,81,133,58,149,58,2,21,22,37,22,53,22,3,40,44, +0,48,17,13,6,30,111,29,29,0,52,110,6,43,39,48,110,18,14,10,10,0,79,6,95,6, +111,6,3,6,58,111,0,0,32,0,2,0,0,32,0,48,0,80,0,112,0,144,0,176,0,208,0,8, +0,0,16,0,48,0,192,0,224,0,5,8,0,184,255,192,64,70,14,18,72,0,42,16,81,17, +46,12,81,43,175,13,1,13,64,42,45,72,0,13,16,13,32,13,3,13,39,111,17,1,47, +17,95,17,111,17,143,17,159,17,223,17,239,17,7,17,17,52,35,115,41,30,1,30, +24,7,7,52,116,37,58,1,23,58,1,58,6,24,0,63,51,93,93,237,50,63,51,93,237,18, +57,47,93,113,51,222,93,43,93,50,237,50,16,237,50,1,47,43,94,93,113,114,237, +47,93,18,57,47,51,51,237,50,50,16,237,17,57,47,237,17,51,51,17,18,57,57,49, +48,0,93,93,1,14,3,35,33,53,62,1,61,1,35,53,51,53,35,53,51,53,52,62,2,51,50, +30,2,23,7,46,3,35,34,6,29,1,33,21,33,21,33,21,33,21,20,14,2,7,33,50,62,2, +55,4,80,9,57,89,115,67,253,70,89,86,186,186,186,186,48,99,152,103,70,123, +99,71,18,174,10,39,53,65,36,114,112,1,152,254,104,1,152,254,104,22,44,63, +40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160,121,25,129,140,129,130, +92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,138,129,140,129,7,56,106, +92,71,21,19,42,67,48,0,0,0,0,4,0,158,255,236,8,103,5,129,0,14,0,23,0,47,0, +98,1,193,64,71,134,2,1,117,91,133,91,2,91,73,107,73,139,73,3,143,68,1,109, +68,1,91,68,1,105,82,1,105,80,1,125,22,1,91,22,107,22,2,125,17,141,17,2,91, +17,107,17,2,84,57,100,57,2,54,57,70,57,2,37,97,53,97,69,97,3,76,32,9,14,72, +49,184,255,224,64,94,9,14,72,29,32,12,17,72,13,29,29,29,45,29,3,82,73,81, +81,48,72,65,0,70,15,24,39,75,37,41,72,30,34,32,30,57,73,15,56,1,102,56,1, +56,56,89,72,75,95,15,1,63,75,95,75,239,75,3,75,64,27,39,72,239,30,1,31,30, +95,30,127,30,3,15,30,75,75,30,15,3,8,64,65,80,65,96,65,3,127,65,143,65,2, +65,184,255,192,64,16,7,12,72,65,20,7,70,0,8,16,8,32,8,3,8,100,184,255,192, +179,91,95,72,100,184,255,192,179,80,88,72,100,184,255,192,179,70,74,72,100, +184,255,192,179,59,62,72,100,184,255,192,179,48,53,72,100,184,255,192,64, +11,27,31,72,79,100,95,100,111,100,3,100,184,255,192,179,7,10,72,89,184,255, +248,64,71,19,22,72,65,8,19,22,72,89,65,78,60,80,57,51,22,44,80,27,22,6,95, +20,87,80,121,82,1,72,82,88,82,104,82,3,82,78,40,32,80,33,78,37,33,35,35,33, +127,33,143,33,2,175,20,1,20,64,9,17,72,20,33,20,33,8,19,95,9,3,8,18,0,63, +63,237,18,57,57,47,47,43,93,93,17,51,47,17,51,51,16,237,50,47,51,93,93,237, +16,237,63,237,63,51,237,18,57,57,43,43,1,43,93,43,43,43,43,43,43,47,93,237, +50,47,43,93,113,18,23,57,47,47,47,93,113,43,93,93,16,237,51,47,93,113,237, +17,51,51,16,237,50,17,57,57,16,237,16,237,50,47,237,49,48,93,43,43,43,93, +0,93,93,1,93,93,93,93,0,93,93,93,93,93,1,93,0,93,1,93,1,20,14,2,43,1,17,35, +17,33,50,30,2,7,52,38,43,1,17,51,50,54,1,14,1,35,34,38,53,17,35,53,51,55, +51,21,51,21,35,17,20,22,51,50,54,55,37,20,6,35,34,46,2,39,55,30,1,51,50,62, +2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,21,20,30,2,23,30,3, +3,186,61,121,182,121,130,181,1,43,125,186,124,62,182,164,164,105,113,165, +155,2,123,35,74,48,105,93,104,111,53,110,157,157,41,55,23,40,26,2,232,183, +170,75,121,92,61,15,159,17,99,88,40,68,49,27,34,62,87,52,49,96,77,47,168, +161,141,165,22,161,6,31,45,54,30,155,32,57,80,48,48,100,82,52,3,217,92,159, +117,68,253,219,5,129,61,111,157,97,134,139,253,212,146,252,186,11,13,123, +122,1,197,131,242,242,131,254,98,78,73,8,6,98,120,129,24,54,88,64,26,61,58, +10,25,40,30,30,41,29,23,13,12,32,53,79,59,112,119,105,116,17,28,38,24,10, +85,25,36,28,22,11,11,31,54,87,0,1,0,16,255,236,4,86,5,150,0,61,0,232,185, +0,2,255,235,64,68,15,73,106,38,1,58,43,74,43,122,43,138,43,4,36,59,52,59, +68,59,116,59,132,59,5,46,55,55,4,57,45,51,110,20,24,15,14,26,15,3,20,37,110, +36,36,3,110,64,4,96,4,128,4,160,4,176,4,5,0,4,144,4,176,4,208,4,4,4,184,255, +192,64,94,24,27,72,4,48,24,81,25,57,15,81,54,15,16,31,16,127,16,143,16,159, +16,5,16,64,39,47,72,0,16,16,16,128,16,3,16,45,47,25,63,25,127,25,3,47,25, +63,25,175,25,207,25,4,47,25,175,25,2,25,25,0,40,115,216,37,1,124,37,140,37, +2,26,37,42,37,2,37,31,7,0,115,115,3,131,3,2,21,3,37,3,2,3,9,25,0,63,51,93, +93,237,63,51,93,93,93,237,18,57,47,93,113,114,51,220,93,43,113,50,237,50, +16,237,50,1,47,43,93,113,237,51,47,237,47,23,51,47,196,16,237,50,50,17,57, +47,196,49,48,0,93,93,93,43,37,50,54,55,23,14,3,35,34,46,2,39,35,55,51,46, +1,53,52,54,55,35,55,51,62,3,51,50,30,2,23,7,46,1,35,34,14,2,7,33,7,33,14, +1,21,20,22,23,33,7,33,30,3,2,179,100,120,14,185,13,63,103,147,97,120,177, +121,69,13,171,40,120,1,2,2,1,160,40,129,15,73,123,173,115,97,147,103,63,13, +185,14,121,106,68,106,79,50,11,1,190,40,254,99,2,1,2,2,1,196,40,254,108,9, +42,77,114,126,100,91,14,68,118,87,50,77,139,192,114,129,8,46,24,27,53,6,127, +122,189,130,67,50,87,118,68,14,91,100,39,87,137,99,127,16,47,23,22,37,19, +129,81,138,100,57,0,0,0,0,4,0,69,255,244,6,208,5,140,0,19,0,23,0,43,0,79, +0,192,64,14,118,20,134,20,2,121,22,137,22,2,133,47,1,66,184,255,232,64,9, +8,11,72,60,24,8,11,72,17,184,255,232,179,8,11,72,13,184,255,232,64,29,8,11, +72,7,24,8,11,72,3,24,8,11,72,22,23,20,21,74,180,73,73,52,180,53,178,63,23, +16,21,184,255,240,64,62,21,23,21,23,0,44,180,63,64,10,14,72,63,34,180,10, +178,0,180,0,24,16,24,32,24,80,24,96,24,208,24,224,24,240,24,8,24,38,52,1, +52,49,182,58,184,77,182,74,68,4,23,3,20,18,29,182,15,184,39,182,5,19,0,63, +237,244,237,63,63,63,51,237,244,237,51,93,1,47,93,253,244,237,47,43,237,18, +57,57,47,47,56,56,16,244,237,51,47,237,17,51,17,51,49,48,0,43,43,43,43,43, +43,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,20,30,2,51,50,54,55,23,14,3,35,34, +46,2,53,52,62,2,51,50,30,2,23,7,46,1,35,34,6,6,208,51,87,116,66,66,115,85, +49,48,86,117,68,66,115,85,50,251,59,155,3,154,157,149,22,43,63,40,42,64,44, +22,23,43,63,41,39,63,44,24,250,155,20,47,75,54,69,94,11,141,6,45,77,111,72, +94,132,82,38,59,97,124,65,68,106,76,48,9,143,10,83,75,108,87,1,178,125,171, +105,45,45,104,171,126,133,174,103,41,41,103,174,253,201,5,129,252,49,99,131, +78,32,33,78,131,98,95,128,79,34,34,79,128,2,124,75,124,90,50,82,87,9,54,99, +76,45,69,121,164,96,130,173,103,42,40,70,94,55,11,72,85,164,0,2,0,19,255, +236,2,126,5,149,0,39,0,55,0,185,64,9,138,32,1,53,40,14,17,72,26,184,255,232, +179,8,16,72,22,184,255,232,64,67,8,16,72,8,32,8,16,72,6,32,11,16,72,5,27, +21,27,2,5,21,21,21,2,3,4,4,29,16,40,32,40,2,96,40,112,40,128,40,192,40,4, +15,40,1,40,40,4,51,20,51,2,8,51,159,35,1,35,18,14,192,10,208,10,224,10,3, +10,184,255,192,179,34,38,72,10,184,255,192,64,26,7,11,72,10,79,57,1,18,51, +45,15,11,34,24,14,14,7,45,24,3,3,7,24,7,0,7,0,47,205,63,18,57,47,16,205,17, +57,47,18,57,57,205,17,57,57,1,93,47,43,43,93,198,51,205,93,50,0,94,93,1,51, +47,93,93,113,205,50,47,51,49,48,0,93,93,43,43,43,43,1,43,93,37,50,54,55,51, +14,1,35,34,38,61,1,14,1,7,53,62,1,55,17,52,62,2,51,50,30,2,21,20,14,2,7,21, +20,30,2,19,52,46,2,35,34,14,2,21,17,62,3,1,177,51,68,17,69,20,120,109,111, +127,32,66,34,35,66,31,25,59,98,72,52,79,53,27,44,79,110,66,19,32,42,115,14, +27,40,26,32,39,22,8,49,77,54,28,78,104,109,154,157,159,155,175,17,28,13,73, +14,29,16,2,75,59,108,83,49,42,78,111,69,99,180,152,118,38,244,57,83,54,26, +4,20,52,85,61,33,36,61,81,46,254,5,33,104,131,151,0,0,0,0,4,0,188,0,0,8,46, +5,129,0,19,0,35,0,55,0,59,0,244,64,124,141,0,1,0,24,13,16,72,61,0,1,25,0, +1,132,10,1,114,10,1,69,10,85,10,101,10,3,22,10,38,10,2,5,33,21,33,37,33,3, +4,29,20,29,2,11,24,27,24,2,11,22,27,22,2,47,61,1,58,20,73,36,19,73,16,0,16, +57,46,73,26,144,16,160,16,192,16,3,31,26,1,16,26,16,26,8,144,36,160,36,176, +36,3,47,36,1,0,36,1,36,10,1,7,73,48,8,64,8,80,8,3,0,8,16,8,32,8,144,8,4,8, +41,31,15,1,184,255,192,179,29,36,72,1,184,255,192,64,15,18,21,72,1,17,9,3, +51,23,192,57,208,57,2,57,184,255,192,64,21,35,44,72,57,56,11,64,29,36,72, +11,64,18,21,72,0,11,56,3,8,18,0,63,23,51,43,43,47,221,43,93,222,205,63,51, +51,43,43,63,205,1,47,93,113,237,50,50,47,93,93,93,18,57,57,47,47,93,93,16, +237,51,17,51,16,237,16,237,50,93,49,48,0,93,93,93,93,1,93,93,93,93,93,93, +43,93,33,1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,1,20,6,35,34, +38,53,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,53, +33,21,4,38,253,48,1,2,1,2,160,202,2,216,2,2,2,2,162,3,54,176,175,168,177, +43,87,131,88,93,131,84,39,159,24,47,69,45,46,71,48,25,26,48,67,41,46,72,50, +25,254,16,2,123,4,166,44,44,38,89,39,252,88,5,129,251,82,40,46,39,98,51,3, +156,250,127,2,178,188,203,201,190,91,145,101,53,53,100,145,92,81,107,64,26, +27,64,107,80,82,108,63,26,26,63,108,253,160,146,146,0,0,0,0,2,0,188,2,122, +7,25,5,129,0,39,0,47,0,148,64,9,9,24,19,23,72,136,9,1,8,184,255,232,64,16, +19,23,72,89,8,105,8,121,8,3,37,24,13,17,72,24,184,255,240,64,73,12,17,72, +44,41,196,42,24,21,196,64,22,224,22,2,22,22,0,64,47,1,47,0,42,16,42,64,42, +80,42,4,42,39,196,37,111,0,175,0,207,0,223,0,239,0,5,0,40,44,202,0,9,22,29, +4,0,42,32,42,80,42,128,42,4,42,2,15,23,37,15,3,45,3,0,63,23,51,17,51,204, +93,23,50,237,50,1,47,93,51,237,47,93,204,93,18,57,47,93,237,50,16,253,204, +49,48,43,43,93,43,93,43,1,17,53,6,7,14,1,7,3,35,3,46,1,39,38,39,6,21,6,20, +21,17,35,17,51,19,30,1,31,1,54,55,62,3,53,19,51,17,1,17,35,17,35,53,33,21, +6,155,5,4,4,5,2,230,108,163,2,24,14,17,20,1,1,128,190,223,2,5,2,6,20,16,7, +13,11,7,168,184,251,40,134,255,2,138,2,122,1,169,194,11,11,9,18,5,253,203, +1,157,5,64,38,44,55,10,10,8,18,6,253,201,3,7,253,205,4,13,7,18,51,41,18,34, +28,18,2,1,157,252,249,2,152,253,104,2,152,111,111,0,0,0,0,1,0,108,0,0,5,184, +5,150,0,57,0,221,64,95,101,36,1,101,22,1,157,49,1,143,49,1,49,16,11,15,72, +157,9,1,143,9,1,9,16,11,15,72,116,3,132,3,2,54,3,1,54,2,118,2,2,54,56,118, +56,2,116,55,132,55,2,54,55,1,42,26,1,42,32,1,41,53,48,40,10,18,32,40,96,40, +112,40,144,40,4,47,18,111,18,127,18,159,18,4,40,18,40,18,24,34,91,16,53,1, +53,184,255,192,64,65,23,29,72,191,53,207,53,2,0,53,48,53,2,53,17,5,91,31, +24,63,24,79,24,143,24,191,24,207,24,223,24,7,111,24,127,24,159,24,239,24, +255,24,5,0,24,48,24,2,8,24,10,15,19,39,48,5,42,95,18,41,18,29,95,0,4,0,63, +237,63,51,237,23,50,1,47,94,93,93,113,253,196,47,93,93,43,114,237,17,57,57, +47,47,93,93,17,51,17,51,16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43, +93,93,93,93,1,50,30,2,21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46, +2,35,34,14,2,21,20,30,2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,3,18, +151,241,168,90,59,109,157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116, +169,108,109,170,116,61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109, +59,90,168,241,5,150,86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51, +126,143,159,85,116,181,124,65,65,124,181,116,85,159,143,126,51,224,156,4, +2,3,2,54,138,167,191,106,147,234,162,86,0,0,0,2,0,88,255,222,4,124,4,72,0, +32,0,45,0,82,64,50,90,13,1,28,15,64,160,33,176,33,2,95,33,1,80,33,96,33,112, +33,3,33,47,128,32,47,1,45,208,17,1,17,5,16,45,45,22,39,10,16,22,21,27,1,6, +27,1,27,0,22,0,63,50,93,93,205,63,205,18,57,47,205,1,47,205,93,50,93,26,16, +220,93,113,113,26,205,50,49,48,93,5,34,46,2,53,52,62,2,51,50,30,2,21,33,17, +30,3,51,50,62,2,55,23,14,3,19,17,46,3,35,34,14,2,7,17,2,107,130,198,134,69, +95,152,189,95,112,194,142,81,252,197,22,64,78,88,46,75,116,93,76,35,72,36, +84,109,143,203,19,59,77,92,53,51,87,74,60,24,34,93,157,204,111,147,213,139, +66,79,146,210,130,254,156,24,45,35,20,31,60,87,56,42,57,100,76,44,2,138,1, +21,20,42,34,22,19,32,42,24,254,234,0,0,0,255,255,0,80,255,246,6,78,5,129, +16,38,0,121,0,0,16,39,2,20,2,249,0,0,17,7,2,144,3,204,253,206,0,63,64,40, +4,3,2,111,15,1,47,15,1,15,1,191,12,1,128,12,1,112,12,1,96,12,1,64,12,1,16, +12,1,12,98,64,11,11,72,4,3,2,60,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93, +53,17,93,93,53,53,53,0,0,0,255,255,0,61,255,246,6,78,5,141,16,39,2,20,2,249, +0,0,16,39,2,144,3,204,253,206,17,6,0,115,34,0,0,63,64,40,1,3,2,111,49,1,47, +49,1,49,0,191,1,1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,141,64,11,11,72, +1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53, +0,0,0,255,255,0,93,255,246,6,78,5,129,16,39,2,20,2,249,0,0,16,39,2,144,3, +204,253,206,17,6,2,142,40,0,0,63,64,40,1,3,2,111,49,1,47,49,1,49,0,191,1, +1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,126,64,11,11,72,1,3,2,49,24,0,63, +53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53,0,0,0,255,255,0,145, +255,246,6,78,5,129,16,39,2,20,2,189,0,0,16,39,2,144,3,204,253,206,17,6,2, +143,102,0,0,47,64,28,1,3,2,111,49,1,47,49,1,49,0,191,1,1,128,1,1,1,102,64, +11,11,72,1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,53,17,93,93,53,53,53,0,0, +0,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3,128,16,7,17,16,0,47, +205,1,47,205,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51,14, +1,7,33,21,2,129,29,59,31,72,58,130,82,82,130,58,72,31,59,29,3,221,1,41,34, +98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1,16,255,195,2,240,4,127, +0,17,0,26,64,10,15,64,0,0,15,12,3,17,128,7,0,47,26,205,204,50,57,57,1,47, +26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,35,1,213,34,98, +65,68,112,42,36,42,112,68,65,98,34,86,3,160,29,59,31,72,58,130,82,82,130, +58,72,31,59,29,252,35,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3, +128,7,17,16,17,0,47,205,1,47,221,26,204,50,57,57,49,48,1,46,1,39,51,30,1, +23,21,14,1,7,35,62,1,55,33,53,5,127,29,59,31,72,58,130,82,82,130,58,72,31, +59,29,252,35,1,127,34,98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1, +16,255,195,2,240,4,127,0,17,0,26,64,10,17,64,16,15,0,3,12,128,8,16,0,47,221, +26,204,50,57,57,1,47,26,205,49,48,37,62,1,55,21,14,1,7,35,46,1,39,53,30,1, +23,17,51,2,43,34,98,65,68,112,42,36,42,112,68,65,98,34,86,162,29,59,31,72, +58,130,82,82,130,58,72,31,59,29,3,221,0,0,1,1,162,0,100,6,94,2,68,0,31,0, +36,64,15,16,31,28,19,128,23,64,15,0,3,12,128,8,0,15,0,47,205,1,47,26,204, +50,57,57,26,221,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51, +14,1,7,33,46,1,39,51,30,1,23,21,14,1,7,35,62,1,55,2,129,29,59,31,72,58,130, +82,82,130,58,72,31,59,29,2,254,29,59,31,72,58,130,82,82,130,58,72,31,59,29, +1,41,34,98,65,68,112,42,36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112, +68,65,98,34,0,0,0,1,1,16,255,195,2,240,4,127,0,31,0,38,64,16,15,64,0,31,16, +19,28,128,24,64,0,15,12,3,128,7,0,47,26,204,50,57,57,26,221,26,204,50,57, +57,1,47,26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,213,34,98,65,68,112,42,36,42,112,68,65, +98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,3,160,29,59,31,72,58,130,82, +82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82,130,58,72,31,59,29,0, +2,1,16,255,72,2,240,4,127,0,3,0,35,0,40,64,17,1,19,0,4,35,20,23,32,28,3,0, +28,4,19,16,7,11,0,47,204,50,57,57,221,222,205,16,204,50,57,57,1,47,51,205, +50,49,48,5,33,21,33,19,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,16,1,224,254,32,197,34,98,65,68,112,42, +36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,104,80,4,88, +29,59,31,72,58,130,82,82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82, +130,58,72,31,59,29,0,0,2,0,56,255,229,3,186,5,197,0,47,0,69,0,222,64,93,156, +19,172,19,2,154,6,170,6,2,122,33,138,33,2,68,24,14,17,72,85,20,101,20,149, +20,165,20,4,140,7,1,74,7,90,7,122,7,3,74,56,90,56,2,67,56,11,15,72,58,67, +1,42,12,58,12,74,12,3,37,45,53,45,149,45,165,45,4,32,39,48,39,2,39,39,15, +169,48,249,48,2,40,48,1,48,28,0,70,64,96,31,1,31,184,255,192,64,64,18,21, +72,15,31,1,31,64,12,17,72,31,71,128,60,71,63,15,1,15,64,12,17,72,15,79,71, +1,39,34,80,43,53,81,27,0,22,64,22,128,22,192,22,4,7,22,22,47,43,111,43,223, +43,3,15,43,191,43,2,43,65,80,10,22,0,63,237,47,93,113,57,47,94,93,51,237, +16,237,50,1,93,47,43,93,237,26,16,220,43,93,43,113,26,237,51,51,113,113,18, +57,47,93,49,48,0,93,1,93,93,43,0,93,1,93,93,0,93,1,43,93,93,93,1,20,14,2, +7,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,51,62,1,53,52,38,35,34,14,2,7, +55,62,1,51,50,30,2,3,46,3,35,34,14,4,21,20,30,2,51,50,62,2,3,186,7,13,18, +11,31,96,130,162,97,93,127,78,35,22,47,73,102,132,83,42,77,64,50,16,4,1,3, +130,129,28,59,58,55,22,36,42,116,67,113,154,94,41,211,8,36,51,64,36,53,86, +67,49,32,15,21,42,65,44,66,108,83,56,3,170,46,104,106,106,48,128,206,144, +77,63,107,138,75,60,143,144,134,104,63,26,48,67,42,25,58,34,196,209,11,19, +28,17,147,23,39,88,149,195,254,147,42,74,55,32,51,84,110,116,116,48,53,91, +67,38,99,161,205,0,0,0,2,0,4,0,0,4,225,5,129,0,5,0,18,0,244,64,27,74,7,90, +7,106,7,3,69,17,85,17,101,17,3,3,56,8,1,55,16,1,6,24,14,17,72,18,184,255, +232,64,157,14,17,72,102,2,1,39,2,71,2,87,2,3,105,1,1,40,1,72,1,88,1,3,2,1, +12,12,0,6,59,3,1,20,3,1,244,3,1,107,3,155,3,187,3,235,3,4,52,3,84,3,2,0,3, +1,11,2,3,18,15,0,31,0,47,0,3,18,0,15,20,47,20,127,20,3,175,20,191,20,223, +20,255,20,4,32,20,112,20,144,20,3,15,20,63,20,143,20,3,58,175,20,207,20,223, +20,255,20,4,64,20,96,20,144,20,3,15,20,95,20,2,143,20,159,20,191,20,223,20, +4,0,20,32,20,80,20,112,20,4,0,3,6,3,18,95,5,18,12,32,19,22,72,153,12,1,12, +1,3,0,63,51,93,43,63,237,23,50,1,93,93,113,114,114,94,93,113,113,114,47,94, +93,51,47,95,94,93,93,93,93,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93, +43,43,93,93,95,93,93,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,5,2,5,217,1,254, +251,35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12, +141,156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,0,1,0,235,254,78,5,172,5, +129,0,7,0,54,64,36,3,90,79,4,175,4,191,4,207,4,4,4,7,90,32,0,1,15,0,1,0,0, +32,0,192,0,208,0,4,0,2,95,5,3,4,0,0,47,50,63,237,1,47,93,113,113,237,47,93, +237,49,48,1,17,33,17,35,17,33,17,4,244,252,182,191,4,193,254,78,6,145,249, +111,7,51,248,205,0,0,0,0,1,0,154,254,78,5,48,5,129,0,11,0,170,64,9,134,8, +150,8,2,163,9,1,9,184,255,192,64,26,13,16,72,163,7,1,2,144,7,1,114,7,130, +7,2,100,7,1,53,7,69,7,85,7,3,3,184,255,240,64,74,9,17,72,41,1,57,1,2,1,16, +12,17,72,8,143,6,159,6,175,6,3,2,72,17,73,15,2,127,2,2,2,6,2,6,0,207,10,1, +0,10,64,10,2,10,7,3,9,3,9,207,0,1,0,0,64,0,2,7,0,32,13,1,3,7,95,2,8,0,4,3, +1,9,95,0,0,47,237,57,63,18,57,57,237,57,1,93,47,94,93,93,51,51,47,47,51,47, +93,93,18,57,57,47,47,93,43,93,51,49,48,0,43,93,43,1,93,93,93,93,95,93,43, +93,93,19,53,9,1,53,33,21,33,9,1,33,21,154,2,123,253,149,4,66,252,178,2,72, +253,168,3,162,254,78,109,3,48,3,44,106,152,253,4,252,249,152,0,0,0,0,1,0, +101,2,96,4,72,2,242,0,3,0,32,64,20,0,2,32,2,80,2,112,2,4,2,16,0,32,0,2,0, +0,173,1,179,0,63,237,1,47,93,47,93,49,48,19,53,33,21,101,3,227,2,96,146,146, +0,0,0,0,1,0,51,255,242,4,98,6,84,0,8,0,185,185,0,0,255,232,64,135,14,17,72, +9,1,57,1,73,1,3,9,1,0,4,6,1,6,6,8,16,111,8,143,8,175,8,207,8,239,8,5,15,8, +47,8,79,8,111,8,143,8,5,8,95,2,1,2,2,15,3,47,3,79,3,111,3,4,11,3,175,10,1, +48,10,80,10,112,10,144,10,4,111,10,143,10,2,16,10,48,10,2,240,10,1,15,10, +47,10,79,10,3,57,239,10,1,176,10,208,10,2,143,10,175,10,207,10,239,10,4,112, +10,1,47,10,79,10,111,10,143,10,175,10,5,2,175,31,5,1,5,5,1,7,179,6,1,0,47, +51,63,18,57,47,93,237,1,93,113,113,114,114,94,93,93,113,113,114,114,47,94, +93,51,47,93,47,93,113,56,57,61,47,93,51,51,49,48,94,93,43,5,35,1,35,53,33, +19,1,51,2,110,106,254,229,182,1,14,242,1,174,129,14,3,24,117,253,78,5,135, +0,3,0,87,0,203,5,93,3,215,0,35,0,51,0,67,0,114,64,75,137,50,1,53,67,69,67, +2,10,15,1,10,3,1,5,33,1,5,21,1,39,26,8,52,4,18,0,0,47,32,47,64,47,112,47, +4,47,60,18,36,224,55,1,55,23,42,239,65,1,65,8,39,52,26,4,5,63,13,1,13,64, +18,21,72,0,13,80,13,2,13,31,15,23,1,23,0,47,93,51,220,93,43,113,50,23,57, +205,93,50,16,205,93,50,1,47,205,47,93,205,17,23,57,49,48,0,93,93,93,93,93, +1,93,1,20,14,2,35,34,38,39,14,3,35,34,46,2,53,52,62,2,51,50,22,23,62,3,51, +50,30,2,37,34,6,7,30,1,51,50,62,2,53,52,46,2,5,46,1,35,34,14,2,21,20,30,2, +51,50,54,5,93,44,82,115,70,97,168,70,32,75,84,90,46,69,115,83,46,44,82,116, +71,94,168,67,31,75,84,94,51,69,114,81,45,254,179,70,119,56,51,119,77,43,71, +51,27,29,51,71,254,93,51,119,78,43,70,49,27,25,48,71,47,70,120,2,78,78,141, +106,62,133,149,63,102,72,39,55,100,143,89,81,142,104,60,135,148,62,102,73, +40,55,101,143,168,126,130,128,128,40,70,94,54,54,92,69,39,250,128,128,40, +70,94,54,51,93,69,41,126,0,0,0,1,1,152,0,0,6,96,4,199,0,5,0,13,179,2,5,2, +5,0,47,205,1,47,205,49,48,1,51,17,33,21,33,1,152,94,4,106,251,56,4,199,251, +151,94,0,0,0,0,1,1,22,255,254,4,170,4,8,0,25,0,35,64,18,75,22,91,22,2,75, +16,91,16,2,25,0,12,13,13,0,19,6,0,47,205,47,51,1,47,205,47,205,49,48,0,93, +93,5,17,52,62,2,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21,17,1,22,68,122, +167,98,99,169,123,70,103,53,95,130,78,78,130,94,52,2,2,0,116,192,138,76,76, +138,192,116,254,0,2,2,98,155,108,57,56,108,156,100,254,0,0,0,1,255,158,254, +78,2,148,5,227,0,35,2,3,64,30,10,34,26,34,42,34,3,5,16,21,16,37,16,3,9,3, +218,37,1,201,37,1,154,37,170,37,186,37,3,37,184,1,0,64,162,225,228,72,76, +37,1,0,47,37,63,37,2,9,37,1,220,37,64,211,217,72,37,64,205,209,72,134,37, +1,25,37,41,37,57,37,3,11,37,1,251,37,1,233,37,1,37,64,188,191,72,107,37,123, +37,139,37,3,93,37,1,75,37,1,41,37,57,37,2,27,37,1,9,37,1,249,37,1,37,128, +170,177,72,109,37,1,37,128,164,168,72,9,37,1,163,37,128,156,162,72,189,37, +1,121,37,153,37,169,37,3,75,37,91,37,107,37,3,37,192,140,147,72,155,37,171, +37,187,37,3,125,37,141,37,2,107,37,1,93,37,1,38,37,54,37,70,37,3,228,37,1, +214,37,1,180,37,196,37,2,6,37,1,112,37,184,255,192,64,110,119,122,72,37,64, +101,107,72,219,37,1,118,37,166,37,2,9,37,25,37,41,37,3,233,37,1,37,64,79, +82,72,37,128,74,78,72,25,37,41,37,2,11,37,1,251,37,1,217,37,233,37,2,171, +37,187,37,203,37,3,153,37,1,37,128,60,63,72,41,37,57,37,73,37,3,11,37,27, +37,2,55,233,37,249,37,2,187,37,203,37,219,37,3,141,37,157,37,173,37,3,123, +37,1,109,37,1,1,95,37,1,37,184,255,128,179,39,43,72,37,184,255,192,64,13, +34,38,72,144,37,160,37,2,2,16,37,1,37,184,255,192,64,46,28,31,72,223,37,1, +96,37,112,37,160,37,176,37,192,37,5,15,37,31,37,47,37,3,7,32,22,144,22,2, +22,22,31,70,12,47,4,159,4,2,4,4,32,12,1,12,184,255,192,64,15,16,19,72,12, +25,80,64,18,128,18,2,18,7,80,0,0,47,237,47,93,237,1,47,43,93,51,47,93,16, +237,50,47,93,94,93,93,93,43,113,95,113,43,43,114,95,114,114,114,114,114,94, +93,93,43,93,93,93,93,113,113,43,43,113,114,114,114,43,43,94,93,93,93,93,113, +113,113,113,113,43,114,114,114,43,94,93,43,93,43,93,113,113,113,113,113,113, +43,113,113,114,114,114,43,43,94,93,93,95,93,43,93,93,93,49,48,0,95,94,93, +93,19,34,38,39,53,30,1,51,50,62,2,53,3,52,62,2,51,50,22,23,21,46,1,35,34, +14,2,21,17,20,14,2,36,36,75,23,20,62,35,51,66,39,16,2,50,90,125,75,34,75, +22,18,61,36,51,66,39,16,50,89,124,254,78,11,8,147,8,16,37,64,84,48,4,188, +94,134,86,40,9,9,148,10,17,40,65,84,44,251,66,94,134,86,41,0,0,0,2,0,56,1, +80,4,44,3,244,0,33,0,67,1,31,64,26,36,16,12,16,72,2,16,12,16,72,65,24,11, +17,72,66,48,9,17,72,61,48,9,17,72,42,184,255,208,179,9,17,72,48,184,255,208, +64,19,9,17,72,31,24,9,17,72,32,48,9,17,72,26,48,9,17,72,13,184,255,232,179, +13,17,72,14,184,255,208,179,9,13,72,8,184,255,208,179,14,17,72,8,184,255, +208,64,41,9,12,72,63,16,28,48,28,80,28,3,0,28,16,28,64,28,96,28,128,28,160, +28,240,28,7,28,45,11,64,12,17,72,11,47,69,1,59,173,64,45,184,255,192,180, +35,60,72,45,34,184,255,192,179,23,28,72,34,184,255,192,64,27,16,20,72,34, +128,62,64,41,60,72,62,40,173,143,49,1,32,49,48,49,2,49,15,25,173,64,11,184, +255,192,180,39,60,72,11,0,184,255,192,179,23,28,72,0,184,255,192,64,29,16, +20,72,0,128,28,64,41,60,72,28,6,173,15,15,207,15,2,15,64,23,28,72,15,64,11, +19,72,15,0,47,43,43,93,237,196,43,26,221,43,43,196,43,26,237,16,220,93,93, +237,196,43,26,221,43,43,196,43,26,237,1,93,47,43,51,47,93,113,51,49,48,0, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,1,34,38,39,46,1,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,34,38,39,46,1,35,34,14,2,7, +53,62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,40,69,145,73,65,107,45,38, +65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68, +40,69,145,73,65,107,45,38,65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51, +23,69,123,52,32,59,61,68,2,246,43,26,22,23,12,22,33,21,144,37,47,13,21,27, +13,8,15,14,8,51,43,149,23,30,19,8,254,90,44,26,23,24,12,23,32,21,141,38,46, +13,20,26,13,8,15,14,8,50,42,147,23,32,19,8,0,1,0,65,0,55,4,36,5,16,0,19,0, +162,64,108,53,2,1,58,11,1,60,12,1,42,12,1,3,3,6,7,10,11,2,11,0,17,16,13,12, +1,12,12,11,1,2,4,9,19,100,14,116,14,2,80,14,1,2,48,14,1,0,14,16,14,32,14, +96,14,4,14,4,111,9,127,9,2,95,9,111,9,2,9,16,7,8,173,9,0,1,2,3,4,4,173,17, +6,31,5,47,5,95,5,111,5,223,5,5,5,10,11,12,13,4,80,9,208,9,2,15,9,1,9,0,47, +93,93,23,51,222,93,50,50,237,23,50,16,237,50,50,1,47,93,113,51,47,93,113, +95,113,113,51,18,23,57,16,135,192,192,192,192,16,135,192,192,192,192,49,48, +1,95,93,93,93,93,1,3,35,19,35,53,33,19,33,53,33,19,51,3,33,21,33,3,33,21, +1,192,152,145,151,237,1,55,190,254,11,2,61,154,143,152,1,21,254,162,191,2, +29,1,88,254,223,1,33,148,1,108,148,1,36,254,220,148,254,148,148,0,0,0,0,3, +0,100,0,244,4,71,4,80,0,3,0,7,0,11,0,49,64,27,11,7,2,8,4,0,8,173,9,9,1,5, +173,63,4,1,4,0,173,15,1,31,1,63,1,3,1,0,47,93,237,47,93,237,17,57,47,237, +1,47,51,51,47,51,51,49,48,19,53,33,21,1,53,33,21,1,53,33,21,100,3,227,252, +29,3,227,252,29,3,227,3,188,148,148,253,56,148,148,1,100,148,148,0,0,0,2, +0,63,0,0,4,36,4,207,0,6,0,10,0,123,185,0,5,255,216,64,17,18,22,72,3,40,18, +22,72,0,40,18,22,72,137,0,1,1,184,255,216,64,63,18,22,72,134,1,1,10,48,2, +80,2,2,0,2,16,2,32,2,64,2,96,2,128,2,160,2,7,2,7,7,0,64,12,15,72,0,8,173, +7,79,6,95,6,143,6,3,6,64,2,80,2,128,2,3,2,1,0,80,4,128,4,2,4,0,25,47,93,51, +51,205,93,205,93,24,47,237,1,47,43,51,47,47,93,113,51,49,48,0,93,43,93,43, +43,43,19,53,1,21,9,1,21,5,53,33,21,65,3,227,252,166,3,90,252,27,3,227,2,119, +205,1,139,154,254,168,254,168,153,236,145,145,0,0,2,0,65,0,0,4,36,4,207,0, +6,0,10,0,121,185,0,1,255,216,64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137, +6,1,5,184,255,216,64,62,18,22,72,134,5,1,9,48,6,80,6,2,0,6,16,6,32,6,64,6, +96,6,128,6,160,6,7,6,7,0,64,12,15,72,0,8,173,7,6,5,64,4,80,4,128,4,3,4,79, +0,95,0,143,0,3,0,80,2,128,2,2,2,0,25,47,93,205,93,205,93,51,51,24,47,237, +1,47,43,51,47,93,113,51,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21,1,53, +33,21,65,3,90,252,166,3,227,252,29,3,227,236,153,1,88,1,88,154,254,117,205, +253,137,145,145,0,0,0,0,2,0,157,0,0,4,55,4,129,0,4,0,9,0,35,64,18,105,9,121, +9,2,105,7,121,7,2,6,4,5,0,2,8,5,0,0,47,205,47,205,1,47,205,221,205,49,48, +0,93,93,51,17,9,1,17,37,33,17,9,1,157,1,205,1,205,252,182,2,250,254,131,254, +131,2,123,2,6,253,250,253,133,82,2,6,1,170,254,86,0,0,0,0,1,0,100,0,180,4, +71,2,242,0,5,0,19,183,5,170,0,2,0,4,173,1,0,47,237,47,1,47,47,237,49,48,55, +17,33,21,33,17,100,3,227,252,174,180,2,62,146,254,84,0,0,0,1,2,34,253,154, +3,210,6,170,0,23,0,29,182,4,32,8,11,72,9,0,184,1,0,180,1,19,12,6,1,0,47,47, +205,205,1,47,237,204,49,48,43,1,35,17,52,55,54,51,50,22,21,20,6,35,34,39, +46,1,39,38,35,34,7,6,21,2,181,147,84,82,128,63,75,51,37,30,13,8,26,20,33, +16,36,9,6,253,154,7,86,196,123,123,63,48,40,52,10,4,24,22,39,39,35,105,0, +0,0,1,1,5,253,154,2,181,6,170,0,28,0,32,185,0,4,255,224,180,8,11,72,12,2, +184,1,0,180,28,24,17,7,0,0,47,47,205,205,1,47,253,204,49,48,43,1,51,17,20, +7,14,1,35,34,46,2,53,52,62,2,51,50,23,30,1,23,22,51,50,55,54,53,2,34,147, +90,40,103,62,30,50,37,20,14,23,31,18,33,26,5,21,15,31,16,37,8,7,6,170,248, +168,205,125,56,54,16,29,39,24,20,34,24,14,16,2,23,20,37,41,31,106,0,0,0,1, +255,246,2,37,5,181,2,182,0,3,0,22,180,3,5,0,4,0,184,1,2,177,1,252,0,63,237, +17,1,51,17,51,49,48,3,53,33,21,10,5,191,2,37,145,145,0,0,1,1,216,253,147, +2,105,7,72,0,3,0,24,187,0,2,1,0,0,3,1,6,180,4,3,254,0,250,0,63,63,1,16,246, +237,49,48,1,51,17,35,1,216,145,145,7,72,246,75,0,0,0,1,2,141,253,147,5,181, +2,182,0,5,0,34,178,2,7,3,186,1,0,0,0,1,6,179,6,5,254,3,184,1,2,177,0,252, +0,63,237,63,1,16,246,237,17,51,49,48,1,33,21,33,17,35,2,141,3,40,253,105, +145,2,182,145,251,110,0,0,0,1,255,246,253,147,3,30,2,182,0,5,0,34,187,0,2, +1,0,0,5,1,6,181,6,0,6,4,254,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16,246, +237,49,48,3,53,33,17,35,17,10,3,40,145,2,37,145,250,221,4,146,0,0,0,0,1,2, +141,2,37,5,181,7,72,0,5,0,34,178,4,7,2,189,1,0,0,5,1,6,0,6,0,5,1,2,179,2, +252,0,250,0,63,63,237,1,16,246,237,17,51,49,48,1,51,17,33,21,33,2,141,145, +2,151,252,216,7,72,251,110,145,0,0,0,1,255,246,2,37,3,30,7,72,0,5,0,34,187, +0,5,1,0,0,2,1,6,181,6,0,6,3,250,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16, +244,237,49,48,3,53,33,17,51,17,10,2,151,145,2,37,145,4,146,250,221,0,0,0, +0,1,2,141,253,147,5,181,7,72,0,7,0,39,179,4,9,5,1,186,1,0,0,0,1,6,179,8,7, +254,5,184,1,2,179,2,252,0,250,0,63,63,237,63,1,16,246,237,50,17,51,49,48, +1,51,17,33,21,33,17,35,2,141,145,2,151,253,105,145,7,72,251,110,145,251,110, +0,1,255,246,253,147,3,30,7,72,0,7,0,39,177,7,4,186,1,0,0,2,1,6,183,8,0,8, +6,254,3,250,7,184,1,2,177,2,252,0,63,237,63,63,17,1,51,16,244,237,51,49,48, +3,53,33,17,51,17,35,17,10,2,151,145,145,2,37,145,4,146,246,75,4,146,0,0,1, +255,246,253,147,5,181,2,182,0,7,0,40,178,3,9,4,186,1,0,0,7,1,6,182,8,0,8, +6,254,4,0,184,1,2,177,1,252,0,63,237,50,63,17,1,51,16,246,237,17,51,49,48, +3,53,33,21,33,17,35,17,10,5,191,253,105,145,2,37,145,145,251,110,4,146,0, +1,255,246,2,37,5,181,7,72,0,7,0,40,178,7,9,5,186,1,0,0,2,1,6,182,8,0,8,3, +250,5,0,184,1,2,177,1,252,0,63,237,51,63,17,1,51,16,244,237,17,51,49,48,3, +53,33,17,51,17,33,21,10,2,151,145,2,151,2,37,145,4,146,251,110,145,0,1,255, +246,253,147,5,181,7,72,0,11,0,51,179,7,13,5,8,187,1,0,0,2,0,11,1,6,64,9,12, +0,12,10,254,3,250,8,11,184,1,2,178,5,2,252,0,63,51,237,50,63,63,17,1,51,16, +246,50,237,50,17,51,49,48,3,53,33,17,51,17,33,21,33,17,35,17,10,2,151,145, +2,151,253,105,145,2,37,145,4,146,251,110,145,251,110,4,146,0,0,0,2,255,246, +1,113,5,181,3,106,0,3,0,7,0,37,183,3,7,7,9,0,4,8,4,184,1,2,178,5,253,0,184, +1,2,177,1,251,0,63,237,63,237,17,1,51,50,17,51,17,51,49,48,3,53,33,21,1,53, +33,21,10,5,191,250,65,5,191,2,217,145,145,254,152,145,145,0,2,1,217,253,147, +3,210,7,72,0,3,0,7,0,42,65,9,0,5,1,0,0,4,1,7,0,8,0,1,1,0,0,0,1,4,182,8,7, +3,254,4,0,250,0,63,50,63,51,1,16,246,237,16,244,237,49,48,1,51,17,35,1,51, +17,35,1,217,145,145,1,104,145,145,7,72,246,75,9,181,246,75,0,0,0,1,2,141, +253,147,5,181,3,106,0,9,0,49,181,2,6,6,11,7,3,186,1,0,0,0,1,6,179,10,9,254, +7,184,1,2,178,4,253,3,184,1,2,177,0,251,0,63,237,63,237,63,1,16,246,237,50, +17,51,17,51,49,48,1,33,21,33,21,33,21,33,17,35,2,141,3,40,253,105,2,151,253, +105,145,3,106,145,215,145,252,34,0,0,1,1,217,253,147,5,181,2,182,0,9,0,51, +178,1,11,6,191,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,178,10,2,6,184,1,2,180,9, +252,4,8,254,0,63,51,63,237,50,1,16,244,237,16,246,237,17,51,49,48,1,21,33, +17,35,17,35,17,35,17,5,181,254,29,145,215,145,2,182,145,251,110,4,146,251, +110,5,35,0,0,0,0,2,1,217,253,147,5,181,3,106,0,5,0,11,0,63,180,2,8,8,13,9, +65,11,1,0,0,6,1,7,0,12,0,3,1,0,0,0,1,4,0,12,0,9,1,2,181,6,253,11,5,254,3, +184,1,2,177,0,251,0,63,237,63,51,63,237,1,16,246,237,16,244,237,17,51,17, +51,49,48,1,33,21,33,17,35,1,33,21,33,17,35,1,217,3,220,252,181,145,1,104, +2,116,254,29,145,3,106,145,250,186,4,111,145,252,34,0,0,1,255,246,253,147, +3,30,3,106,0,9,0,49,177,9,6,186,1,0,0,3,1,6,183,10,4,0,0,10,8,254,3,184,1, +2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63,17,1,51,17,51,16,244,237, +51,49,48,3,53,33,53,33,53,33,17,35,17,10,2,151,253,105,3,40,145,1,113,145, +215,145,250,41,3,222,0,0,0,1,255,246,253,147,3,210,2,182,0,9,0,52,65,9,0, +6,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,183,10,0,10,4,8,254,6,0,184,1,2,177,1, +252,0,63,237,50,63,51,17,1,51,16,244,237,16,246,237,49,48,3,53,33,17,35,17, +35,17,35,17,10,3,220,145,215,145,2,37,145,250,221,4,146,251,110,4,146,0,0, +0,0,2,255,246,253,147,3,210,3,106,0,5,0,11,0,63,180,4,9,9,12,11,65,11,1,0, +0,8,1,4,0,12,0,0,1,0,0,3,1,7,0,12,0,9,1,2,181,10,253,2,7,254,4,184,1,2,177, +5,251,0,63,237,63,51,63,237,1,16,244,237,16,246,237,17,51,17,51,49,48,1,17, +35,17,33,53,1,35,17,33,53,33,3,210,145,252,181,2,116,145,254,29,2,116,3,106, +250,41,5,70,145,250,41,3,222,145,0,0,1,2,141,1,113,5,181,7,72,0,9,0,49,181, +4,8,8,11,2,6,189,1,0,0,9,1,6,0,10,0,9,1,2,178,6,253,5,184,1,2,179,2,251,0, +250,0,63,63,237,63,237,1,16,246,237,50,17,51,17,51,49,48,1,51,17,33,21,33, +21,33,21,33,2,141,145,2,151,253,105,2,151,252,216,7,72,252,34,145,215,145, +0,0,1,1,217,2,37,5,181,7,72,0,9,0,52,178,4,11,2,65,11,1,0,0,9,1,7,0,10,0, +8,1,0,0,5,1,4,0,10,0,5,1,2,181,2,8,252,0,6,250,0,63,51,63,51,237,1,16,246, +237,16,244,237,17,51,49,48,1,51,17,33,21,33,17,51,17,51,3,65,145,1,227,252, +36,145,215,7,72,251,110,145,5,35,251,110,0,0,0,2,1,217,1,113,5,181,7,72,0, +5,0,11,0,63,180,10,4,4,13,8,65,11,1,0,0,11,1,7,0,12,0,2,1,0,0,5,1,4,0,12, +0,11,1,2,178,8,251,5,184,1,2,180,2,253,6,0,250,0,63,50,63,237,63,237,1,16, +246,237,16,244,237,17,51,17,51,49,48,1,51,17,33,21,33,1,51,17,33,21,33,1, +217,145,3,75,252,36,1,104,145,1,227,253,140,7,72,250,186,145,5,215,252,34, +145,0,0,1,255,246,1,113,3,30,7,72,0,9,0,50,188,0,9,1,0,0,6,0,2,1,6,183,10, +4,0,0,10,7,250,3,184,1,2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63, +17,1,51,17,51,16,244,50,237,49,48,3,53,33,53,33,53,33,17,51,17,10,2,151,253, +105,2,151,145,1,113,145,215,145,3,222,250,41,0,0,1,255,246,2,37,3,210,7,72, +0,9,0,52,65,9,0,0,1,0,0,7,1,7,0,10,0,6,1,0,0,3,1,4,183,10,1,10,8,4,250,6, +1,184,1,2,177,2,252,0,63,237,51,63,51,17,1,51,16,244,237,16,244,237,49,48, +1,33,53,33,17,51,17,51,17,51,3,210,252,36,1,227,145,215,145,2,37,145,4,146, +251,110,4,146,0,0,0,2,255,246,1,113,3,210,7,72,0,5,0,11,0,63,65,9,0,8,1,0, +0,11,1,4,0,12,0,0,1,0,0,3,1,7,181,12,9,1,1,12,9,184,1,2,181,10,251,4,6,250, +1,184,1,2,177,2,253,0,63,237,63,51,63,237,17,1,51,17,51,16,244,237,16,244, +237,49,48,1,33,53,33,17,51,33,51,17,33,53,33,3,210,252,36,3,75,145,254,7, +145,253,140,1,227,1,113,145,5,70,251,145,145,0,0,0,0,1,2,141,253,147,5,181, +7,72,0,11,0,54,182,4,8,8,13,6,2,10,186,1,0,0,11,1,6,179,12,11,254,9,184,1, +2,178,6,253,5,184,1,2,179,2,251,0,250,0,63,63,237,63,237,63,1,16,246,237, +50,50,17,51,17,51,49,48,1,51,17,33,21,33,21,33,21,33,17,35,2,141,145,2,151, +253,105,2,151,253,105,145,7,72,252,34,145,215,145,252,34,0,0,0,0,2,1,217, +253,147,5,181,7,72,0,7,0,11,0,56,178,4,13,10,186,1,0,0,11,1,4,178,12,2,6, +186,1,0,0,7,1,7,183,12,7,11,254,0,8,250,5,184,1,2,177,2,252,0,63,237,63,51, +63,51,1,16,244,237,50,16,246,237,17,51,49,48,1,51,17,33,21,33,17,35,1,51, +17,35,3,65,145,1,227,254,29,145,254,152,145,145,7,72,251,110,145,251,110, +9,181,246,75,0,0,3,1,217,253,147,5,181,7,72,0,3,0,9,0,15,0,73,181,14,6,6, +17,12,8,65,12,1,0,0,15,0,9,1,7,0,16,0,0,1,0,0,1,1,4,0,16,0,15,1,2,178,12, +251,7,184,1,2,183,4,253,10,2,250,9,1,254,0,63,51,63,51,63,237,63,237,1,16, +246,237,16,244,50,237,50,17,51,17,51,49,48,1,35,17,51,19,33,21,33,17,35,17, +51,17,33,21,33,2,106,145,145,215,2,116,254,29,145,145,1,227,253,140,253,147, +9,181,250,186,145,252,34,9,181,252,34,145,0,1,255,246,253,147,3,30,7,72,0, +11,0,56,185,0,9,1,0,178,6,2,10,184,1,6,64,10,12,4,0,0,12,10,254,7,250,3,184, +1,2,178,6,251,11,184,1,2,177,2,253,0,63,237,63,237,63,63,17,1,51,17,51,16, +246,50,50,237,49,48,3,53,33,53,33,53,33,17,51,17,35,17,10,2,151,253,105,2, +151,145,145,1,113,145,215,145,3,222,246,75,3,222,0,0,0,2,255,246,253,147, +3,210,7,72,0,7,0,11,0,59,65,10,0,10,1,0,0,11,1,7,0,12,0,5,1,0,0,2,0,6,1,4, +64,10,12,0,12,11,6,254,8,3,250,7,184,1,2,177,2,252,0,63,237,63,51,63,51,17, +1,51,16,246,50,237,16,244,237,49,48,3,53,33,17,51,17,35,17,1,51,17,35,10, +1,227,145,145,1,104,145,145,2,37,145,4,146,246,75,4,146,5,35,246,75,0,0,0, +0,3,255,246,253,147,3,210,7,72,0,3,0,9,0,15,0,73,181,7,13,13,16,6,10,65,12, +1,0,0,9,0,11,1,4,0,16,0,2,1,0,0,3,1,7,0,16,0,12,1,2,181,15,253,3,11,254,6, +184,1,2,180,9,251,0,4,250,0,63,51,63,237,63,51,63,237,1,16,244,237,16,246, +50,237,50,17,51,17,51,49,48,1,51,17,35,1,51,17,33,53,33,19,35,17,33,53,33, +3,65,145,145,254,152,145,253,140,1,227,145,145,254,29,2,116,7,72,246,75,9, +181,251,145,145,250,41,3,222,145,0,0,0,2,255,246,253,147,5,181,3,106,0,7, +0,11,0,57,180,11,3,3,13,4,186,1,0,0,7,1,6,181,12,8,0,0,12,8,184,1,2,181,9, +251,6,254,4,0,184,1,2,177,1,253,0,63,237,50,63,63,237,17,1,51,17,51,16,246, +237,17,51,17,51,49,48,3,53,33,21,33,17,35,17,1,53,33,21,10,5,191,253,105, +145,253,105,5,191,1,113,145,145,252,34,3,222,1,104,145,145,0,0,1,255,246, +253,147,5,181,2,182,0,11,0,58,178,3,13,8,191,1,0,0,11,1,4,0,12,0,4,1,0,0, +7,1,7,64,9,12,0,12,6,10,254,8,4,0,184,1,2,177,1,252,0,63,237,50,50,63,51, +17,1,51,16,244,237,16,246,237,17,51,49,48,3,53,33,21,33,17,35,17,35,17,35, +17,10,5,191,254,29,145,215,145,2,37,145,145,251,110,4,146,251,110,4,146,0, +3,255,246,253,147,5,181,3,106,0,5,0,11,0,15,0,74,180,13,8,8,17,9,186,1,0, +0,6,1,7,181,16,14,3,3,16,5,189,1,0,0,2,1,4,0,16,0,14,1,2,179,15,251,9,3,184, +1,2,181,6,4,253,11,1,254,0,63,51,63,51,237,50,63,237,1,16,246,237,17,51,17, +51,16,244,237,17,51,17,51,49,48,1,35,17,33,53,33,51,33,21,33,17,35,1,21,33, +53,2,106,145,254,29,2,116,215,2,116,254,29,145,2,116,250,65,253,147,3,222, +145,145,252,34,5,215,145,145,0,0,0,0,2,255,246,1,113,5,181,7,72,0,7,0,11, +0,58,64,9,7,11,11,13,0,8,8,12,5,189,1,0,0,2,1,6,0,12,0,8,1,2,181,9,253,3, +250,5,0,184,1,2,177,1,251,0,63,237,51,63,63,237,1,16,244,237,17,51,17,51, +17,51,17,51,49,48,3,53,33,17,51,17,33,21,1,53,33,21,10,2,151,145,2,151,250, +65,5,191,2,217,145,3,222,252,34,145,254,152,145,145,0,1,255,246,2,37,5,181, +7,72,0,11,0,58,178,11,13,9,191,1,0,0,6,1,7,0,12,0,5,1,0,0,2,1,4,64,9,12,0, +12,7,3,250,9,5,0,184,1,2,177,1,252,0,63,237,51,51,63,51,17,1,51,16,244,237, +16,244,237,17,51,49,48,3,53,33,17,51,17,51,17,51,17,33,21,10,1,227,145,215, +145,1,227,2,37,145,4,146,251,110,4,146,251,110,145,0,3,255,246,1,113,5,181, +7,72,0,5,0,11,0,15,0,76,64,9,4,15,15,17,9,12,12,16,8,65,11,1,0,0,11,1,4,0, +16,0,2,1,0,0,5,1,7,0,16,0,12,1,2,179,13,253,5,9,184,1,2,181,2,10,251,0,6, +250,0,63,51,63,51,237,50,63,237,1,16,244,237,16,244,237,17,51,17,51,17,51, +17,51,49,48,1,51,17,33,21,33,1,51,17,33,53,33,1,53,33,21,3,65,145,1,227,253, +140,254,152,145,253,140,1,227,254,29,5,191,7,72,252,34,145,4,111,251,145, +145,254,7,145,145,0,0,0,1,255,246,253,147,5,181,7,72,0,19,0,76,182,11,15, +15,21,13,9,16,184,1,0,178,6,2,19,184,1,6,64,11,20,4,0,0,20,18,254,7,250,12, +4,184,1,2,180,9,5,251,16,0,184,1,2,178,13,1,253,0,63,51,237,50,63,51,237, +50,63,63,17,1,51,17,51,16,246,50,50,237,50,50,17,51,17,51,49,48,3,53,33,53, +33,53,33,17,51,17,33,21,33,21,33,21,33,17,35,17,10,2,151,253,105,2,151,145, +2,151,253,105,2,151,253,105,145,1,113,145,215,145,3,222,252,34,145,215,145, +252,34,3,222,0,0,1,255,246,253,147,5,181,7,72,0,19,0,77,179,4,21,18,9,187, +1,0,0,15,0,12,1,4,178,20,2,5,187,1,0,0,19,0,8,1,7,64,9,20,13,20,0,16,250, +9,5,13,184,1,2,182,18,2,14,252,7,11,254,0,63,51,63,51,51,237,50,50,63,51, +17,1,51,16,244,50,237,50,16,246,50,237,50,17,51,49,48,1,51,17,33,21,33,17, +35,17,35,17,35,17,33,53,33,17,51,17,51,3,65,145,1,227,254,29,145,215,145, +254,29,1,227,145,215,7,72,251,110,145,251,110,4,146,251,110,4,146,145,4,146, +251,110,0,0,0,0,4,255,246,253,147,5,181,7,72,0,5,0,11,0,17,0,23,0,93,181, +4,14,14,25,2,15,187,1,0,0,5,0,12,1,7,182,24,21,9,9,24,20,11,187,1,0,0,23, +0,8,1,4,178,24,5,21,184,1,2,183,2,22,251,0,18,250,15,9,184,1,2,181,12,10, +253,17,7,254,0,63,51,63,51,237,50,63,51,63,51,237,50,1,16,246,50,237,50,17, +51,17,51,16,244,50,237,50,17,51,17,51,49,48,1,51,17,33,21,33,3,35,17,33,53, +33,51,33,21,33,17,35,1,51,17,33,53,33,3,65,145,1,227,253,140,215,145,254, +29,2,116,215,2,116,254,29,145,254,152,145,253,140,1,227,7,72,252,34,145,250, +186,3,222,145,145,252,34,9,181,251,145,145,0,0,0,0,1,0,0,2,109,5,171,7,72, +0,3,0,18,182,0,5,1,4,2,250,1,0,47,63,17,1,51,17,51,49,48,1,33,17,33,5,171, +250,85,5,171,2,109,4,219,0,0,0,1,0,0,253,147,5,171,2,109,0,3,0,18,182,0,5, +1,4,2,1,254,0,63,47,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253, +147,4,218,0,0,0,1,0,0,253,147,5,171,7,72,0,3,0,19,183,0,5,1,4,2,250,1,254, +0,63,63,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253,147,9,181,0, +0,1,0,0,253,147,2,214,7,72,0,3,0,17,182,1,4,0,2,250,1,254,0,63,63,1,47,17, +51,49,48,1,33,17,33,2,214,253,42,2,214,253,147,9,181,0,0,0,0,1,2,213,253, +147,5,171,7,72,0,3,0,17,182,0,5,1,2,250,1,254,0,63,63,1,47,17,51,49,48,1, +33,17,33,5,171,253,42,2,214,253,147,9,181,0,0,0,0,42,0,103,253,245,5,171, +6,163,0,3,0,7,0,11,0,15,0,19,0,23,0,27,0,31,0,35,0,39,0,43,0,47,0,51,0,55, +0,59,0,63,0,67,0,71,0,75,0,79,0,83,0,87,0,91,0,95,0,99,0,103,0,107,0,111, +0,115,0,119,0,123,0,127,0,131,0,135,0,139,0,143,0,147,0,151,0,155,0,159,0, +163,0,167,2,49,181,161,157,153,149,145,165,184,1,1,182,164,109,85,69,45,13, +121,184,1,1,64,13,120,108,84,68,44,12,120,101,77,53,29,5,137,184,1,1,64,13, +136,100,76,52,28,4,136,113,89,65,41,17,125,184,1,1,64,13,124,112,88,64,40, +16,124,97,81,57,25,9,141,184,1,1,64,13,140,96,80,56,24,8,140,117,93,61,37, +21,129,184,1,1,64,33,128,116,92,60,36,20,128,120,136,124,140,128,128,140, +124,136,120,5,132,160,156,152,148,144,164,164,169,105,73,49,33,1,133,184, +1,1,64,15,104,72,48,32,0,10,132,1,8,3,132,167,143,139,135,184,1,3,180,132, +163,103,99,107,184,1,3,183,104,160,100,96,104,95,91,87,184,1,3,183,84,92, +88,84,159,83,79,75,184,1,3,183,72,156,80,76,72,67,63,71,184,1,3,183,68,64, +60,68,155,59,55,51,184,1,3,183,48,152,56,52,48,43,39,47,184,1,3,183,44,40, +36,44,151,31,27,35,184,1,3,183,32,148,28,24,32,23,19,15,184,1,3,183,12,20, +16,12,147,11,7,3,184,1,3,183,0,144,8,4,0,131,127,123,184,1,3,64,60,120,128, +124,120,22,84,1,27,72,1,25,68,1,27,48,1,27,44,1,20,32,1,104,84,72,68,48,44, +32,12,0,120,120,0,12,32,44,48,68,72,84,104,10,108,164,140,136,27,132,59,132, +2,15,132,1,2,132,119,115,111,184,1,3,178,116,112,108,0,47,51,51,237,50,50, +47,95,93,93,51,51,51,18,23,57,47,47,47,47,47,47,47,47,47,47,93,93,93,93,93, +93,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50, +50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,16,237,50,50,50,1,47,95,94,93,51,51,51,51,51, +237,50,50,50,50,50,17,51,47,51,51,51,51,51,18,23,57,47,47,47,47,47,17,51, +51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50,50,50, +17,51,51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50, +50,50,17,51,51,51,51,51,16,237,50,50,50,50,50,16,237,50,50,50,50,50,49,48, +19,51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7, +51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51, +21,35,37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,7,51,21, +35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51,21,35, +37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,37, +51,21,35,37,51,21,35,1,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,17,51, +21,35,17,51,21,35,17,51,21,35,17,51,21,35,17,51,21,35,103,104,104,1,158,104, +104,1,160,103,103,253,145,104,104,1,159,104,104,1,159,104,104,207,103,103, +254,96,104,104,254,98,104,104,4,13,104,104,254,97,104,104,254,97,104,104, +207,104,104,1,158,104,104,1,160,103,103,207,104,104,254,97,104,104,254,97, +104,104,207,104,104,1,158,104,104,1,160,103,103,253,145,104,104,1,159,104, +104,1,159,104,104,207,103,103,254,96,104,104,254,98,104,104,207,104,104,1, +159,104,104,1,159,104,104,252,194,104,104,1,159,104,104,1,159,104,104,251, +243,104,104,1,158,104,104,1,160,103,103,1,158,104,104,104,104,104,104,104, +104,104,104,104,104,5,34,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96, +96,99,96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,97,97,97,97,97, +98,94,94,94,94,94,98,97,97,97,97,97,96,96,96,96,96,96,7,237,98,98,98,98,98, +1,35,96,96,96,96,96,254,223,98,254,223,96,254,221,96,254,221,97,254,222,97, +7,238,96,0,0,0,0,84,0,0,253,245,5,171,6,163,0,3,0,7,0,11,0,15,0,19,0,23,0, +27,0,31,0,35,0,39,0,43,0,47,0,51,0,55,0,59,0,63,0,67,0,71,0,75,0,79,0,83, +0,87,0,91,0,95,0,99,0,103,0,107,0,111,0,115,0,119,0,123,0,127,0,131,0,135, +0,139,0,143,0,147,0,151,0,155,0,159,0,163,0,167,0,171,0,175,0,179,0,183,0, +187,0,191,0,195,0,199,0,203,0,207,0,211,0,215,0,219,0,223,0,227,0,231,0,235, +0,239,0,243,0,247,0,251,0,255,1,3,1,7,1,11,1,15,1,19,1,23,1,27,1,31,1,35, +1,39,1,43,1,47,1,51,1,55,1,59,1,63,1,67,1,71,1,75,1,79,0,0,19,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,37,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,37,51,21,35,5,51,21,35,39,51,21,35,39,51,21, +35,39,51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,23,51,21,35,39,51,21,35,39,51,21,35,39, +51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,19,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23, +51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,17,51,21, +35,19,51,21,35,103,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,1,158,103,103,207,104,104,208,104,104,208,103, +103,252,194,103,103,3,165,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104, +104,208,103,103,103,104,104,207,104,104,208,104,104,208,104,104,207,104,104, +207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,251,243,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,103,104,104,103,103,103,103,104,104,103,103, +103,103,104,104,103,103,103,103,104,104,103,103,103,103,103,103,104,104,5, +34,98,98,98,98,98,98,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,97,97, +97,97,97,97,97,97,97,97,97,98,94,94,94,94,94,94,94,94,94,94,94,98,97,97,97, +97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,96,96,96,7,237,98,98,98, +98,98,98,98,98,98,98,98,1,35,96,96,96,96,96,96,96,96,96,96,96,254,223,98, +97,96,96,96,99,96,96,96,99,96,96,97,98,94,98,97,96,96,7,237,98,1,35,96,0, +0,67,0,0,253,147,5,213,6,163,0,73,0,77,0,81,0,85,0,89,0,93,0,97,0,101,0,105, +0,109,0,113,0,117,0,121,0,125,0,129,0,133,0,137,0,141,0,145,0,149,0,153,0, +157,0,161,0,165,0,169,0,173,0,177,0,181,0,185,0,189,0,193,0,197,0,201,0,205, +0,209,0,213,0,217,0,221,0,225,0,229,0,233,0,237,0,241,0,245,0,249,0,253,1, +1,1,5,1,9,1,13,1,17,1,21,1,25,1,29,1,33,1,37,1,41,1,45,1,49,1,53,1,57,1,61, +1,65,1,69,1,73,1,77,1,81,0,0,1,33,17,51,53,35,17,51,53,35,17,51,53,35,17, +51,53,35,17,51,53,35,17,51,53,51,21,51,53,51,21,51,53,51,21,51,53,51,21,51, +53,51,21,51,53,51,21,51,53,51,21,35,21,51,17,35,21,51,17,35,21,51,17,35,21, +51,17,35,21,51,17,35,21,51,1,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53, +23,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,7,21,51,53,51,21,51,53,51, +21,51,53,51,21,51,53,5,35,21,51,55,21,51,53,51,21,51,53,51,21,51,53,5,21, +51,53,33,21,51,53,7,53,35,21,37,21,51,53,19,53,35,21,35,53,35,21,35,53,35, +21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53,19,53,35,21, +35,53,35,21,35,53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51, +21,51,53,19,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,1,35,21,51,39,35, +21,51,39,35,21,51,39,35,21,51,1,21,51,53,51,21,51,53,23,35,21,51,39,35,21, +51,7,21,51,53,51,21,51,53,7,35,21,51,55,21,51,53,5,21,51,53,23,53,35,21,23, +53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,19,53,35,21,35,53,35,21,7,21, +51,53,51,21,51,53,19,35,21,51,39,35,21,51,19,35,21,51,39,35,21,51,5,213,250, +43,106,106,106,106,106,106,106,106,106,106,106,107,106,107,106,107,107,107, +107,107,106,107,106,107,107,107,107,107,107,107,107,107,107,107,107,107,250, +149,107,106,107,106,107,107,107,107,107,107,214,107,107,214,106,106,213,106, +106,213,107,106,107,106,107,107,107,253,234,106,106,107,106,107,107,107,107, +252,170,107,1,63,107,213,107,1,171,107,107,107,107,107,107,106,107,106,107, +107,106,107,106,107,107,107,107,107,107,107,107,106,107,106,107,107,106,107, +106,107,107,107,107,107,107,214,107,107,214,106,106,213,106,106,2,22,107, +107,214,107,107,213,107,107,213,107,107,2,235,107,106,107,106,106,106,213, +106,106,213,107,106,107,107,106,106,107,106,254,86,107,213,107,213,106,107, +106,107,107,106,107,106,106,107,106,107,107,106,107,106,106,106,213,106,106, +107,107,107,213,107,107,253,147,1,34,97,1,34,97,1,35,96,1,33,98,1,33,98,1, +33,96,96,96,96,96,96,96,96,96,96,96,96,96,193,98,254,223,96,254,221,96,254, +221,96,254,221,94,254,221,96,6,106,96,96,96,96,96,96,96,96,192,98,98,98,98, +98,98,98,97,96,96,96,96,96,96,96,96,192,96,96,96,96,96,96,96,96,195,96,96, +96,96,96,96,96,96,96,96,254,223,97,97,97,97,97,97,97,97,98,94,94,94,94,94, +94,94,94,254,223,97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,6,205, +98,98,98,98,98,98,98,1,34,98,98,98,98,98,98,98,254,223,96,96,96,96,192,98, +98,98,97,96,96,96,96,192,96,96,96,96,195,96,96,96,96,96,193,97,97,97,97,98, +94,94,94,94,254,223,97,97,97,97,96,96,96,96,96,6,205,98,98,98,1,34,98,98, +98,0,0,0,0,1,0,123,0,117,4,90,4,84,0,3,0,0,19,33,17,33,123,3,223,252,33,4, +84,252,33,0,0,2,0,6,0,0,4,207,4,201,0,3,0,7,0,21,183,7,1,4,0,4,0,5,3,0,47, +205,221,205,1,47,205,221,205,49,48,19,33,17,33,19,17,33,17,6,4,201,251,55, +76,4,49,4,201,251,55,4,125,251,207,4,49,0,0,1,0,109,1,127,2,105,3,123,0,3, +0,26,64,13,3,48,2,1,15,2,31,2,2,8,2,1,2,0,47,205,1,47,94,93,93,205,49,48, +1,33,17,33,2,105,254,4,1,252,1,127,1,252,0,0,0,2,0,109,1,127,2,105,3,123, +0,3,0,7,0,34,64,17,5,3,6,48,2,1,15,2,31,2,2,8,2,7,1,6,2,0,47,205,221,205, +1,47,94,93,93,205,221,205,49,48,1,33,17,33,3,17,33,17,2,105,254,4,1,252,76, +254,156,1,127,1,252,254,80,1,98,254,158,0,0,0,0,1,0,0,0,0,8,0,2,104,0,3,0, +0,17,33,17,33,8,0,248,0,2,104,253,152,0,0,0,1,1,158,0,0,6,76,4,174,0,2,0, +0,33,9,1,1,158,2,88,2,86,4,174,251,82,0,0,1,1,145,255,229,6,90,4,172,0,2, +0,0,9,2,1,145,4,201,251,55,4,172,253,158,253,155,0,1,1,158,255,229,6,76,4, +147,0,2,0,0,9,2,6,76,253,170,253,168,4,147,251,82,4,174,0,1,1,145,255,229, +6,90,4,172,0,2,0,0,1,17,1,6,90,251,55,4,172,251,57,2,101,0,0,2,0,8,0,0,3, +238,5,160,0,5,0,9,0,37,64,20,134,7,1,9,0,5,16,5,2,5,7,31,2,1,2,6,3,4,8,1, +0,47,51,63,51,1,47,93,51,47,93,51,49,48,93,33,35,9,1,51,9,4,2,35,82,254,55, +1,201,82,1,203,254,14,254,158,1,98,1,96,2,207,2,209,253,49,2,53,253,203,253, +194,2,62,0,2,0,167,0,162,4,46,4,41,0,19,0,39,0,46,64,28,68,37,84,37,2,75, +33,91,33,2,75,27,91,27,2,68,23,84,23,2,30,10,20,0,25,15,35,5,0,47,205,220, +205,1,47,205,220,205,49,48,93,93,93,93,19,52,62,2,51,50,30,2,21,20,14,2,35, +34,46,2,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,167,70,122,164,94,94, +165,123,71,71,123,165,94,94,164,122,70,86,57,98,133,76,76,134,99,58,58,99, +134,76,76,133,98,57,2,100,94,165,123,71,71,123,165,94,94,164,122,70,70,122, +164,94,76,132,99,57,57,99,132,76,76,134,99,58,58,99,134,0,0,0,0,1,0,178,0, +137,4,35,3,250,0,23,0,17,182,8,16,12,15,0,1,0,0,47,93,205,1,47,205,49,48, +1,50,23,30,1,23,30,1,21,20,7,6,35,34,39,38,53,52,54,55,62,1,55,54,2,106,110, +107,53,82,29,29,31,129,129,183,182,129,129,30,29,29,83,52,108,3,250,57,28, +82,52,54,110,57,183,129,129,129,129,183,58,109,54,52,82,28,57,0,0,0,2,0,41, +0,0,4,172,4,131,0,3,0,23,0,21,183,14,2,4,1,19,1,9,0,0,47,205,221,205,1,47, +205,221,205,49,48,51,17,33,17,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2, +41,4,131,252,4,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69,4, +131,251,125,2,65,91,160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0, +3,0,41,0,0,4,172,4,131,0,3,0,23,0,43,0,34,64,14,4,24,1,14,34,2,1,19,29,0, +9,39,1,0,0,47,221,221,206,16,221,206,1,47,221,221,206,16,221,206,49,48,51, +17,33,17,1,52,62,2,51,50,30,2,21,20,14,2,35,34,46,2,39,20,30,2,51,50,62,2, +53,52,46,2,35,34,14,2,41,4,131,252,81,58,99,133,75,75,133,99,58,58,99,133, +75,75,133,99,58,77,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69, +4,131,251,125,2,65,75,133,99,58,58,99,133,75,75,133,99,58,58,99,133,75,91, +160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0,2,0,115,1,133,2,99, +3,117,0,18,0,34,0,21,183,19,0,27,11,31,6,23,15,0,47,205,220,205,1,47,205, +220,205,49,48,1,20,6,7,14,1,35,34,39,46,1,53,52,55,54,51,50,23,22,7,52,39, +38,35,34,7,6,21,20,23,22,51,50,55,54,2,99,37,37,37,86,51,101,75,35,37,72, +74,102,103,71,74,76,51,51,70,70,51,51,51,49,72,72,49,51,2,125,53,86,37,35, +37,72,37,86,53,102,72,74,74,71,103,70,51,51,51,51,70,69,54,49,49,54,0,0,0, +5,1,177,255,229,6,121,4,172,0,17,0,33,0,45,0,57,0,68,0,147,64,93,20,32,36, +32,116,32,3,20,28,36,28,116,28,3,27,24,43,24,123,24,3,27,20,43,20,123,20, +3,68,34,40,63,52,46,40,46,40,46,8,18,31,0,1,0,26,8,49,37,43,55,43,62,58,104, +58,1,89,58,1,71,58,1,25,58,1,58,60,65,15,43,95,43,111,43,3,8,65,64,9,14,72, +43,65,43,65,4,22,15,13,1,13,30,4,0,47,205,220,93,205,18,57,57,47,47,43,94, +93,16,205,51,93,93,93,93,17,51,17,51,16,205,50,1,47,205,220,93,205,18,57, +57,47,47,16,205,51,16,205,51,49,48,0,93,93,93,93,1,20,7,6,35,34,39,38,53, +52,54,55,54,51,50,23,30,1,7,52,39,38,35,34,7,6,21,20,23,22,51,50,55,54,1, +20,6,35,34,38,53,52,54,51,50,22,5,20,6,35,34,38,53,52,54,51,50,22,1,22,51, +50,55,23,6,35,34,38,39,6,121,180,179,253,253,179,180,90,90,178,254,254,178, +90,90,90,153,151,218,218,151,153,153,152,217,217,152,153,253,90,46,32,32, +45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,234,76,147,145,76,62,98, +185,94,141,48,2,72,254,178,179,179,178,254,128,215,91,178,178,91,215,128, +217,153,154,154,153,217,216,153,154,154,153,1,87,32,46,46,32,32,45,45,32, +32,46,46,32,32,45,45,254,191,137,137,35,186,95,91,0,0,4,1,209,255,229,6,153, +4,172,0,17,0,29,0,41,0,52,0,96,64,55,42,18,24,47,36,30,24,30,24,30,0,8,39, +27,21,33,21,48,52,104,52,1,89,52,1,75,52,1,61,52,1,52,50,45,15,21,31,21,95, +21,111,21,4,8,79,45,95,45,2,21,45,21,45,13,4,0,47,204,57,57,47,47,93,94,93, +16,206,51,93,93,93,93,17,51,17,51,16,206,50,1,47,205,57,57,47,47,16,206,51, +16,206,51,49,48,1,20,7,6,35,34,39,38,53,52,54,55,54,51,50,23,30,1,5,52,38, +35,34,6,21,20,22,51,50,54,37,52,38,35,34,6,21,20,22,51,50,54,1,30,1,51,50, +55,39,6,35,34,39,6,153,180,179,253,253,179,180,90,90,178,254,254,178,90,90, +253,0,46,32,32,45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,174,48,141, +94,185,98,62,76,145,147,76,2,72,254,178,179,179,178,254,128,215,91,178,178, +91,215,1,32,45,45,32,32,46,46,32,32,45,45,32,32,46,46,254,220,91,95,186,35, +137,137,0,2,1,70,255,115,6,14,4,59,0,51,0,70,0,139,185,0,47,255,240,64,13, +11,14,72,52,46,1,52,36,1,119,35,1,35,184,255,240,64,77,11,14,72,21,16,11, +14,72,59,20,1,59,9,1,8,16,11,14,72,59,47,1,52,35,1,52,21,1,59,8,1,66,143, +13,223,13,2,112,13,1,63,13,1,32,13,1,13,57,43,62,128,31,208,31,224,31,3,127, +31,1,48,31,1,47,31,1,31,52,15,51,63,51,79,51,3,8,51,0,47,94,93,205,220,93, +93,93,93,205,1,47,205,220,93,93,93,93,205,49,48,0,93,93,93,93,1,43,93,93, +43,43,93,93,93,43,1,51,21,30,3,23,55,23,7,30,1,23,51,21,35,14,1,7,23,7,39, +14,1,7,14,1,7,21,35,53,46,1,39,7,39,55,46,1,39,35,53,51,54,55,39,55,23,62, +1,55,23,34,6,7,6,21,20,23,30,1,51,50,55,54,53,52,39,46,1,3,137,66,32,57,54, +53,29,186,45,184,45,44,3,215,215,8,44,40,184,49,182,31,55,23,24,58,34,66, +63,110,48,188,43,182,40,46,8,215,215,12,80,180,40,189,57,112,54,31,69,117, +48,98,98,48,117,69,139,96,99,99,49,117,4,59,217,3,12,21,32,22,182,45,184, +59,113,57,62,60,110,51,188,43,182,23,32,11,9,12,5,217,217,9,46,35,180,45, +184,51,111,63,62,128,95,184,49,182,40,44,6,61,50,48,100,136,137,98,50,47, +97,97,138,137,99,48,50,0,0,0,2,1,218,0,80,4,38,4,129,0,28,0,47,0,98,64,62, +22,18,25,0,0,5,15,43,1,239,43,255,43,2,43,15,14,1,14,0,34,1,224,34,240,34, +2,34,5,22,25,19,0,28,16,28,80,28,3,28,0,39,1,240,39,1,39,18,0,0,128,0,2,8, +0,29,64,37,40,72,29,10,0,47,205,43,220,94,93,50,205,113,114,47,93,51,205, +50,1,47,205,113,114,220,93,205,113,114,17,57,47,51,205,50,49,48,1,46,1,39, +38,53,52,55,62,1,51,50,23,22,21,20,7,6,7,21,33,21,33,17,35,17,33,53,33,19, +34,7,14,1,21,20,22,23,22,51,50,55,54,53,52,38,39,38,2,220,55,90,35,71,83, +44,101,60,118,83,86,72,72,106,1,0,255,0,74,254,254,1,2,35,83,62,29,31,31, +29,62,83,87,59,61,30,29,62,2,66,8,46,42,80,108,122,83,43,43,86,83,122,109, +81,82,12,166,70,254,250,1,6,70,2,145,59,31,71,44,43,71,31,62,62,61,84,44, +71,31,59,0,2,1,81,0,250,4,175,4,129,0,65,0,81,0,70,64,40,49,65,59,15,78,1, +78,63,32,1,32,15,51,1,51,0,70,1,70,59,65,49,63,74,0,55,128,55,2,55,66,144, +20,1,20,15,63,1,8,63,0,47,94,93,204,93,205,220,93,205,18,57,57,1,47,205,114, +220,93,204,93,205,114,18,57,57,49,48,1,46,1,39,46,1,39,46,1,53,52,55,62,1, +51,50,22,23,30,1,51,50,54,55,54,51,50,21,20,7,14,1,21,20,22,23,30,1,21,20, +6,7,6,35,34,39,46,1,39,7,22,21,20,7,6,35,34,39,38,53,52,55,54,51,50,23,7, +34,7,6,21,20,23,22,51,50,55,54,53,52,39,38,3,255,17,54,37,28,40,14,5,3,6, +3,6,5,5,15,13,32,63,32,46,64,19,36,13,16,6,9,7,4,8,2,2,2,2,9,5,21,20,22,31, +11,237,84,86,87,118,118,87,84,84,85,122,71,83,154,90,62,61,61,64,88,89,60, +62,62,60,4,0,5,18,14,11,24,14,3,10,5,8,9,2,2,2,2,8,9,7,6,12,14,9,18,34,79, +45,31,64,34,11,16,5,5,7,3,6,39,42,82,42,238,81,109,125,86,88,84,84,117,117, +87,86,43,32,62,61,88,91,61,61,61,62,90,87,62,62,0,0,1,0,59,0,0,4,5,4,207, +0,47,0,40,64,25,38,32,10,48,10,96,10,112,10,4,10,14,34,64,8,11,72,34,23,79, +0,95,0,2,0,0,47,93,47,47,43,51,1,47,93,47,49,48,1,30,1,23,30,1,23,22,23,22, +21,20,7,6,35,34,39,22,23,30,1,31,1,33,55,50,55,62,3,39,14,1,35,34,39,38,53, +52,55,62,1,55,62,1,55,54,2,32,14,40,26,28,95,69,141,35,37,63,66,88,157,99, +3,36,38,163,137,8,252,232,6,125,86,43,66,44,20,1,45,132,83,90,66,63,30,23, +78,57,69,110,38,56,4,207,54,95,44,43,105,63,126,66,67,70,95,63,66,191,147, +87,86,99,9,37,37,49,25,69,91,119,75,96,95,66,63,91,74,59,42,85,47,59,113, +57,83,0,0,0,0,1,0,60,0,0,5,4,4,199,0,75,0,47,64,24,57,77,63,23,1,23,52,61, +67,13,47,30,4,18,31,18,1,27,18,27,18,1,41,1,0,47,47,18,57,57,47,47,93,18, +23,57,50,51,1,47,93,16,206,49,48,41,1,55,62,1,55,62,1,55,54,53,52,38,53,6, +7,14,1,35,34,38,39,38,53,52,55,54,51,50,22,23,46,1,39,46,1,53,52,55,62,1, +51,50,23,22,21,20,7,54,55,62,1,51,50,22,23,22,21,20,7,6,35,34,38,39,46,1, +39,30,1,23,30,1,23,22,23,4,70,252,182,8,84,108,27,41,64,26,52,2,58,90,43, +88,45,59,97,41,79,73,73,93,31,80,51,20,27,8,5,6,78,40,97,60,116,80,80,69, +84,16,14,30,17,51,86,36,73,80,80,112,62,132,50,17,43,26,3,23,23,22,67,46, +61,159,35,17,33,17,25,75,50,100,109,8,22,17,121,59,28,30,42,38,83,116,115, +79,80,25,26,34,52,19,17,38,20,115,78,38,40,80,78,109,86,98,40,3,5,3,37,41, +76,116,118,83,80,60,51,19,61,45,81,125,46,45,76,31,39,30,0,1,0,102,255,233, +4,90,4,121,0,39,0,38,64,23,18,2,1,4,2,1,8,29,41,16,12,64,12,80,12,112,12, +128,12,5,12,16,0,0,47,47,1,47,93,16,206,49,48,94,93,93,5,46,1,39,46,1,39, +46,1,39,46,1,53,52,55,54,51,50,23,30,1,23,62,1,51,50,22,23,22,21,20,7,14, +1,7,14,1,7,14,1,2,98,14,42,26,28,103,76,56,69,14,43,37,68,70,102,98,78,28, +47,17,34,142,88,50,85,35,70,41,20,78,60,75,108,32,31,44,23,56,101,48,50,147, +102,76,93,22,65,106,56,103,71,70,72,28,80,54,119,117,36,34,70,94,86,88,45, +119,75,96,152,55,54,110,0,0,0,0,1,0,66,255,231,3,210,4,199,0,26,0,18,183, +48,12,1,12,75,21,1,21,0,25,47,93,1,47,93,49,48,1,30,1,23,30,1,23,14,1,7,14, +1,7,46,1,39,46,1,39,46,1,39,62,1,55,62,1,2,7,45,113,69,69,116,47,39,120,83, +69,106,40,13,35,22,38,98,60,14,94,81,50,128,80,59,96,4,199,78,165,93,93,141, +53,40,150,111,93,159,72,25,58,32,57,135,80,20,119,99,59,160,107,77,148,0, +0,1,0,196,0,29,3,59,4,129,0,33,0,48,64,25,2,19,33,13,64,79,6,95,6,111,6,3, +6,128,27,33,18,10,10,47,0,1,0,31,24,0,47,205,204,93,57,47,57,1,47,205,26, +220,93,26,205,16,205,50,49,48,1,51,21,23,30,1,21,20,6,7,35,62,1,53,52,38, +39,38,39,17,20,6,7,6,35,34,38,53,52,55,54,51,50,23,1,233,76,153,51,58,48, +46,47,29,28,28,29,57,64,37,37,72,108,57,58,60,63,80,44,46,4,129,100,193,69, +163,85,78,134,59,65,124,59,60,99,40,81,9,254,6,63,98,38,75,54,46,73,60,60, +19,0,2,1,16,255,213,4,239,4,135,0,34,0,38,0,108,64,61,35,32,64,18,26,128, +36,15,64,111,0,1,0,128,15,9,1,9,9,0,26,1,26,17,35,86,35,1,67,35,1,35,16,36, +54,36,1,37,36,1,20,36,1,3,36,1,8,36,34,38,33,88,33,1,33,37,34,30,23,13,6, +0,47,205,47,205,47,51,51,93,17,51,17,51,94,93,93,93,93,17,51,51,93,93,17, +51,1,47,93,51,47,93,26,221,93,26,205,50,26,16,221,26,205,51,49,48,1,20,6, +7,14,1,35,34,38,53,52,55,54,51,50,23,17,5,17,20,6,7,6,35,34,38,53,52,55,54, +51,50,23,17,37,1,37,53,5,4,239,36,38,37,88,51,57,57,57,62,81,48,42,253,218, +37,35,74,106,57,58,59,60,84,45,45,2,186,253,144,2,38,253,218,1,68,63,101, +35,37,39,54,47,76,57,59,18,1,192,149,254,118,62,98,38,74,53,45,76,57,60,19, +2,240,178,254,103,149,117,152,0,0,0,3,0,29,0,0,3,118,5,204,0,27,0,31,0,35, +0,100,179,67,10,1,10,184,255,224,64,59,8,12,72,31,35,70,28,47,32,143,32,207, +32,3,31,32,79,32,111,32,143,32,4,32,79,16,95,16,2,16,16,1,70,144,2,1,111, +2,1,2,34,15,31,83,30,0,19,80,12,0,0,4,80,25,5,15,32,1,21,0,63,51,63,51,237, +50,63,237,63,237,63,1,47,93,93,237,50,47,93,47,93,113,51,237,50,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,53,51,21,3,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18, +40,51,29,11,211,134,180,180,180,3,183,252,73,3,183,131,122,59,101,75,43,6, +6,137,3,5,22,41,60,39,97,131,1,105,172,172,250,224,4,58,251,198,0,0,0,0,2, +0,29,0,0,3,119,5,204,0,27,0,31,0,90,179,67,10,1,10,184,255,224,64,53,8,12, +72,31,70,47,28,143,28,207,28,3,31,28,79,28,111,28,143,28,4,28,79,16,95,16, +2,16,16,1,70,144,2,1,111,2,1,2,30,0,19,80,12,0,0,4,80,25,5,15,28,1,21,0,63, +51,63,51,237,50,63,237,63,1,47,93,93,237,50,47,93,47,93,113,237,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51,29, +11,211,135,180,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41, +60,39,97,131,252,73,5,204,250,52,0,0,1,0,119,254,78,1,227,255,170,0,28,0, +75,185,0,2,255,232,179,9,17,72,27,184,255,224,64,40,9,17,72,22,22,8,16,131, +15,0,1,95,0,1,0,8,19,140,63,23,79,23,2,23,11,140,0,5,16,5,32,5,80,5,96,5, +112,5,6,5,0,47,93,237,47,93,237,1,47,221,93,113,237,18,57,47,49,48,43,43, +5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35,42,1,7,55,51,50,30,2,1, +227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14,29,14,31,62,52,84,60, +32,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,96,18,41,63,0,0,0,255,255, +0,243,1,190,1,182,2,154,17,6,0,119,56,0,0,18,64,11,0,127,0,1,111,0,1,95,0, +1,0,17,93,93,93,53,0,1,0,127,254,78,1,72,255,158,0,10,0,75,185,0,5,255,192, +179,9,17,72,2,184,255,192,64,28,9,17,72,7,151,0,150,4,9,8,146,16,3,32,3,2, +0,3,96,3,160,3,176,3,192,3,5,3,184,255,192,64,10,30,33,72,3,0,9,16,9,2,9, +0,47,93,204,43,93,113,237,1,47,51,253,237,49,48,43,43,5,20,6,7,35,62,1,53, +35,53,51,1,72,44,40,117,45,49,88,195,193,87,107,47,48,86,46,156,0,0,0,0,2, +0,14,2,51,2,150,5,129,0,10,0,23,0,108,64,74,86,10,1,86,9,1,121,6,137,6,2, +17,175,5,191,5,2,5,64,29,60,72,5,64,24,27,72,5,8,1,224,18,6,16,2,1,48,2,1, +64,2,144,2,2,2,0,4,229,8,5,95,17,111,17,127,17,3,15,17,31,17,127,17,143,17, +4,17,17,1,11,6,220,1,223,0,63,63,51,18,57,47,93,113,51,51,237,50,1,47,93, +113,114,51,51,237,50,47,43,43,93,51,49,48,93,114,114,1,21,35,53,33,53,1,51, +17,51,21,3,14,3,7,3,33,17,60,2,54,2,39,131,254,106,1,130,151,111,240,7,22, +24,22,7,199,1,23,1,2,229,178,178,111,2,45,253,213,113,2,23,13,37,39,35,11, +254,225,1,33,14,38,38,34,0,0,0,0,1,0,53,2,40,2,124,5,129,0,38,0,134,64,37, +37,36,53,36,69,36,3,3,24,9,13,72,19,34,1,4,34,1,3,31,30,25,224,139,27,1,6, +27,10,192,26,208,26,224,26,3,26,184,255,192,64,53,16,19,72,26,29,0,225,32, +19,96,19,2,32,19,96,19,160,19,224,19,4,19,22,228,34,34,16,30,229,27,220,68, +11,84,11,100,11,3,53,11,1,6,11,22,11,38,11,3,11,16,228,5,221,0,63,237,50, +93,93,93,63,237,18,57,47,237,1,47,93,113,237,50,47,43,93,51,51,95,113,237, +50,50,0,95,93,93,49,48,43,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,38,35,34,6,7,35,19,33,21,33,7,62,1,51,50,30,2,2,124,38,73,108,70,66,101, +74,44,9,133,5,24,39,54,36,71,86,81,75,51,77,23,129,33,1,250,254,114,19,29, +91,54,67,103,69,36,3,67,65,104,74,40,33,59,81,48,15,27,47,36,21,85,93,81, +85,37,23,1,212,113,245,26,33,39,71,102,0,0,0,1,0,43,2,52,2,120,5,129,0,14, +0,54,64,33,5,224,6,6,0,175,12,191,12,2,12,11,96,0,1,191,0,207,0,255,0,3,96, +0,1,0,0,12,229,13,220,5,223,0,63,63,237,50,1,47,93,93,113,51,47,93,17,57, +47,237,49,48,1,14,3,21,35,52,62,2,55,33,53,33,2,120,64,106,77,43,133,47,80, +107,60,254,52,2,77,5,28,97,176,176,187,108,102,188,179,175,88,113,0,3,0,45, +2,40,2,130,5,142,0,19,0,39,0,81,0,138,185,0,68,255,232,179,11,15,72,64,184, +255,232,64,82,11,15,72,47,24,9,13,72,43,24,9,13,72,5,15,21,15,2,76,55,71, +10,226,72,61,1,61,61,30,226,224,50,1,191,50,1,50,0,226,70,71,1,71,71,40,226, +32,20,96,20,2,32,20,96,20,160,20,224,20,4,20,76,56,25,228,15,15,35,26,5,1, +11,5,1,5,228,66,222,35,228,45,221,0,63,237,63,237,93,93,18,57,47,237,57,57, +1,47,93,113,237,50,47,113,237,47,93,93,237,51,47,113,237,18,57,57,0,93,49, +48,43,43,43,43,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,19,52,46,2,35,34, +14,2,21,20,30,2,51,50,62,2,55,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3,53, +52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,1,223,12,31,53,41,39,53,31,13,9,29, +54,45,48,54,27,7,21,13,35,61,49,45,59,36,15,15,36,61,46,46,61,34,14,142,35, +73,113,77,77,113,74,35,29,47,61,32,36,55,38,20,35,70,104,68,72,105,69,33, +20,38,56,36,36,63,46,26,4,169,28,48,34,19,19,34,48,28,23,47,39,25,25,39,48, +254,155,28,52,40,24,24,41,53,28,35,59,42,23,23,42,60,22,54,91,66,37,37,66, +90,54,46,72,52,32,5,3,8,37,52,64,35,45,79,59,34,35,60,79,44,35,63,52,37,7, +3,6,31,52,72,0,1,255,229,4,176,2,195,5,240,0,17,0,62,64,41,117,11,133,11, +2,117,7,133,7,2,12,73,15,13,191,13,239,13,3,13,6,73,64,5,12,5,128,9,142,15, +0,47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,205,50,1,47,26,237,220,93,237, +49,48,0,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,84,111,141,81,32, +2,164,6,104,93,93,104,6,164,2,32,81,141,4,176,57,91,115,57,103,96,96,103, +57,115,91,57,0,1,0,124,4,28,1,69,5,129,0,10,0,36,64,21,7,151,0,150,4,9,8, +146,80,3,96,3,2,160,3,176,3,2,3,9,3,0,63,204,93,113,237,1,47,51,253,237,49, +48,1,20,6,7,35,62,1,53,35,53,51,1,69,44,40,117,45,49,88,195,5,23,87,117,47, +48,96,46,167,0,0,1,0,130,4,187,1,75,6,32,0,10,0,47,64,30,4,9,150,7,151,10, +7,146,95,3,111,3,2,175,3,191,3,2,3,80,10,1,15,10,63,10,127,10,3,10,0,47,93, +113,205,93,113,237,1,47,237,237,50,49,48,19,52,54,55,51,14,1,21,51,21,35, +130,44,40,117,45,49,88,195,5,37,87,117,47,48,96,46,167,0,0,0,0,1,0,106,5, +250,2,18,6,240,0,5,0,48,64,30,117,3,133,3,2,128,4,1,64,4,1,4,64,1,2,64,16, +20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43,1,47,26,205,93,93, +49,48,93,1,37,53,51,23,21,1,160,254,202,207,217,5,250,217,29,226,20,0,1,0, +72,5,250,1,240,6,240,0,5,0,52,64,34,122,2,138,2,2,64,3,128,3,2,3,64,79,0, +143,0,2,0,2,64,16,20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43, +1,47,93,26,205,93,49,48,93,19,53,55,51,21,5,72,217,207,254,202,5,250,20,226, +29,217,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,9,134,9,2,120,8,136, +8,2,128,0,1,0,184,255,192,64,25,11,15,72,0,6,4,142,64,8,64,16,19,72,8,128, +6,95,1,1,1,64,9,12,72,1,0,47,43,93,51,26,221,43,26,237,1,47,204,43,93,49, +48,93,93,1,21,35,39,35,7,35,53,55,51,2,150,105,219,2,232,104,234,204,6,14, +20,139,139,20,240,0,0,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,0,134, +0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,25,11,15,72,8,64,2,7,3,64,16,19, +72,3,128,6,142,95,1,1,1,64,9,12,72,1,0,47,43,93,237,26,205,43,50,1,47,26, +204,43,93,49,48,93,93,1,35,39,53,51,23,51,55,51,21,1,182,204,234,104,232, +2,219,105,5,250,239,21,139,139,21,0,0,0,0,2,0,45,5,250,2,90,6,178,0,3,0,7, +0,35,64,19,3,133,0,7,133,4,1,5,145,0,95,4,1,4,64,9,12,72,4,0,47,43,93,51, +237,50,1,47,237,220,237,49,48,1,53,51,21,33,53,51,21,1,183,163,253,211,165, +5,250,184,184,184,184,0,0,1,255,233,5,250,2,182,7,6,0,27,0,68,181,89,2,105, +2,2,26,184,255,232,64,34,9,15,72,12,24,9,15,72,64,23,1,15,23,1,23,9,22,5, +143,64,14,128,19,143,8,95,0,1,0,64,9,12,72,0,0,47,43,93,50,237,26,221,26, +237,51,1,47,204,93,93,49,48,43,43,0,93,1,34,46,2,35,34,6,7,35,62,3,51,50, +30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45,74,59,44, +84,78,69,30,54,55,8,92,5,20,43,74,5,250,37,45,37,62,57,45,95,78,50,37,45, +37,63,56,44,95,78,51,0,0,0,0,2,0,32,5,250,3,15,6,241,0,5,0,11,0,88,64,60, +154,8,170,8,2,154,2,170,2,2,102,10,1,98,4,1,98,3,1,10,159,7,1,15,7,31,7,127, +7,223,7,4,7,7,4,64,0,64,9,31,72,0,8,2,64,16,20,72,2,128,6,95,0,1,0,64,9,12, +72,0,0,47,43,93,50,26,205,43,50,1,47,43,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,19,53,55,51,21,5,51,53,55,51,21,5,32,197,207,254,202,253,197, +207,254,202,5,250,20,227,29,218,20,227,29,218,0,1,255,232,5,250,2,130,6,243, +0,17,0,55,64,32,4,11,1,4,7,1,17,15,19,1,100,13,64,5,12,5,64,16,20,72,5,128, +9,95,0,1,0,64,9,12,72,0,0,47,43,93,205,26,205,43,50,1,47,26,204,94,93,49, +48,0,94,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,52,74,116,84,50, +8,117,17,109,91,91,107,17,117,9,50,83,116,5,250,41,69,90,49,53,60,61,52,49, +90,69,41,0,0,0,0,0,0,1,0,0,21,86,0,1,3,140,12,0,0,9,9,72,0,3,0,36,255,143, +0,3,0,55,255,219,0,3,0,60,255,219,0,3,1,82,255,143,0,3,1,91,255,143,0,3,1, +94,255,143,0,3,1,101,255,143,0,3,1,109,255,219,0,3,1,110,255,219,0,3,1,116, +255,219,0,20,0,20,255,104,0,36,0,3,255,143,0,36,0,55,255,104,0,36,0,57,255, +104,0,36,0,58,255,180,0,36,0,60,255,104,0,36,0,89,255,219,0,36,0,90,255,219, +0,36,0,92,255,219,0,36,2,3,255,104,0,41,0,15,255,29,0,41,0,17,255,29,0,41, +0,36,255,143,0,47,0,3,255,180,0,47,0,55,255,104,0,47,0,57,255,104,0,47,0, +58,255,104,0,47,0,60,255,104,0,47,0,92,255,180,0,47,2,3,255,143,0,51,0,3, +255,219,0,51,0,15,254,248,0,51,0,17,254,248,0,51,0,36,255,104,0,53,0,55,255, +219,0,53,0,57,255,219,0,53,0,58,255,219,0,53,0,60,255,219,0,55,0,3,255,219, +0,55,0,15,255,29,0,55,0,16,255,143,0,55,0,17,255,29,0,55,0,29,255,29,0,55, +0,30,255,29,0,55,0,36,255,104,0,55,0,50,255,219,0,55,0,68,255,29,0,55,0,70, +255,29,0,55,0,72,255,29,0,55,0,76,255,180,0,55,0,82,255,29,0,55,0,85,255, +180,0,55,0,86,255,29,0,55,0,88,255,180,0,55,0,90,255,143,0,55,0,92,255,143, +0,57,0,15,255,68,0,57,0,16,255,143,0,57,0,17,255,68,0,57,0,29,255,180,0,57, +0,30,255,180,0,57,0,36,255,104,0,57,0,68,255,104,0,57,0,72,255,143,0,57,0, +76,255,219,0,57,0,82,255,143,0,57,0,85,255,180,0,57,0,88,255,180,0,57,0,92, +255,180,0,58,0,15,255,143,0,58,0,16,255,219,0,58,0,17,255,143,0,58,0,29,255, +219,0,58,0,30,255,219,0,58,0,36,255,180,0,58,0,68,255,180,0,58,0,72,255,219, +0,58,0,82,255,219,0,58,0,85,255,219,0,58,0,88,255,219,0,58,0,92,255,238,0, +60,0,3,255,219,0,60,0,15,254,248,0,60,0,16,255,68,0,60,0,17,254,248,0,60, +0,29,255,143,0,60,0,30,255,123,0,60,0,36,255,104,0,60,0,68,255,104,0,60,0, +72,255,68,0,60,0,76,255,180,0,60,0,82,255,68,0,60,0,83,255,104,0,60,0,84, +255,68,0,60,0,88,255,143,0,60,0,89,255,143,0,73,0,73,255,219,0,73,2,3,0,37, +0,85,0,15,255,143,0,85,0,17,255,143,0,85,2,3,0,76,0,89,0,15,255,104,0,89, +0,17,255,104,0,90,0,15,255,143,0,90,0,17,255,143,0,92,0,15,255,104,0,92,0, +17,255,104,1,82,1,98,255,213,1,82,1,105,255,213,1,82,1,109,255,104,1,82,1, +110,255,104,1,82,1,111,255,197,1,82,1,116,255,104,1,82,1,124,255,219,1,82, +1,134,255,219,1,82,1,144,255,219,1,87,1,110,255,190,1,88,1,90,0,170,1,88, +1,91,255,104,1,88,1,94,255,104,1,88,1,98,255,141,1,88,1,101,255,104,1,88, +1,105,255,141,1,88,1,111,255,141,1,88,1,114,255,158,1,88,1,119,255,104,1, +88,1,120,255,180,1,88,1,122,255,70,1,88,1,128,255,104,1,88,1,130,255,180, +1,88,1,131,255,104,1,88,1,133,255,104,1,88,1,136,255,70,1,88,1,140,255,70, +1,88,1,143,255,70,1,88,1,147,0,98,1,88,1,149,255,70,1,89,1,110,255,209,1, +89,1,116,255,209,1,91,0,3,255,143,1,91,1,98,255,213,1,91,1,105,255,213,1, +91,1,109,255,104,1,91,1,110,255,104,1,91,1,111,255,197,1,91,1,116,255,104, +1,91,1,124,255,219,1,91,1,134,255,219,1,91,1,144,255,219,1,91,2,3,255,104, +1,93,0,15,255,31,1,93,0,17,255,31,1,93,1,90,0,164,1,93,1,91,255,68,1,93,1, +94,255,68,1,93,1,101,255,68,1,93,1,130,255,168,1,93,1,147,0,88,1,94,0,3,255, +143,1,94,1,98,255,213,1,94,1,105,255,213,1,94,1,109,255,137,1,94,1,110,255, +104,1,94,1,116,255,104,1,98,1,91,255,219,1,98,1,94,255,219,1,98,1,101,255, +219,1,98,1,110,255,190,1,98,1,116,255,190,1,100,1,98,255,193,1,100,1,105, +255,193,1,100,1,111,255,143,1,100,1,117,255,231,1,100,1,122,255,231,1,100, +1,125,255,231,1,100,1,127,255,231,1,100,1,129,255,231,1,100,1,135,255,231, +1,100,1,136,255,231,1,100,1,140,255,231,1,100,1,143,255,231,1,100,1,146,255, +231,1,100,1,149,255,231,1,100,1,151,255,231,1,101,0,3,255,143,1,101,1,98, +255,213,1,101,1,105,255,213,1,101,1,109,255,104,1,101,1,110,255,104,1,101, +1,116,255,104,1,105,1,91,255,219,1,105,1,94,255,213,1,105,1,101,255,219,1, +105,1,110,255,190,1,105,1,116,255,190,1,107,0,3,255,219,1,107,0,15,254,250, +1,107,0,17,254,250,1,107,1,91,255,104,1,107,1,94,255,104,1,107,1,101,255, +104,1,108,1,137,255,158,1,108,1,141,255,158,1,109,0,3,255,219,1,109,0,15, +255,31,1,109,0,17,255,31,1,109,0,29,255,31,1,109,0,30,255,31,1,109,1,90,0, +188,1,109,1,91,255,104,1,109,1,94,255,104,1,109,1,98,255,219,1,109,1,101, +255,104,1,109,1,105,255,219,1,109,1,111,255,219,1,109,1,114,255,219,1,109, +1,117,255,31,1,109,1,118,255,31,1,109,1,121,255,78,1,109,1,122,255,31,1,109, +1,124,255,78,1,109,1,126,255,31,1,109,1,128,255,106,1,109,1,130,255,180,1, +109,1,133,255,106,1,109,1,134,255,143,1,109,1,136,255,31,1,109,1,140,255, +31,1,109,1,142,255,80,1,109,1,143,255,31,1,109,1,144,255,143,1,109,1,145, +255,106,1,109,1,147,0,188,1,109,1,148,255,78,1,109,1,149,255,31,1,109,1,150, +255,78,1,110,0,3,255,219,1,110,0,15,254,250,1,110,0,16,255,70,1,110,0,17, +254,250,1,110,0,29,255,143,1,110,0,30,255,143,1,110,1,90,0,188,1,110,1,91, +255,104,1,110,1,94,255,104,1,110,1,98,255,141,1,110,1,101,255,104,1,110,1, +105,255,141,1,110,1,111,255,141,1,110,1,114,255,158,1,110,1,119,255,104,1, +110,1,120,255,180,1,110,1,122,255,70,1,110,1,124,255,158,1,110,1,128,255, +104,1,110,1,130,255,180,1,110,1,131,255,104,1,110,1,133,255,104,1,110,1,136, +255,70,1,110,1,140,255,70,1,110,1,143,255,70,1,110,1,147,0,121,1,110,1,149, +255,70,1,111,1,91,255,197,1,111,1,110,255,190,1,111,1,116,255,190,1,113,1, +117,255,178,1,113,1,122,255,178,1,113,1,125,255,178,1,113,1,129,255,217,1, +113,1,136,255,178,1,113,1,140,255,178,1,113,1,143,255,178,1,113,1,146,255, +178,1,113,1,149,255,178,1,113,1,151,255,178,1,114,1,110,255,209,1,114,1,116, +255,209,1,116,0,3,255,219,1,116,1,90,0,170,1,116,1,91,255,104,1,116,1,94, +255,104,1,116,1,98,255,141,1,116,1,101,255,104,1,116,1,105,255,141,1,116, +1,111,255,141,1,116,1,114,255,158,1,116,1,119,255,104,1,116,1,120,255,180, +1,116,1,122,255,70,1,116,1,128,255,104,1,116,1,130,255,180,1,116,1,131,255, +104,1,116,1,133,255,104,1,116,1,136,255,70,1,116,1,140,255,70,1,116,1,143, +255,70,1,116,1,147,0,98,1,116,1,149,255,70,1,125,1,132,255,217,1,125,1,137, +255,227,1,125,1,141,255,227,1,125,1,144,255,201,1,127,1,117,255,119,1,127, +1,119,255,219,1,127,1,122,255,119,1,127,1,124,255,170,1,127,1,125,255,180, +1,127,1,128,255,219,1,127,1,129,255,158,1,127,1,130,255,219,1,127,1,131,255, +219,1,127,1,134,255,170,1,127,1,136,255,119,1,127,1,137,255,170,1,127,1,140, +255,119,1,127,1,141,255,170,1,127,1,143,255,119,1,127,1,146,255,119,1,127, +1,149,255,119,1,127,1,151,255,119,1,129,1,132,255,217,1,131,1,117,255,231, +1,131,1,122,255,231,1,131,1,125,255,231,1,131,1,127,255,231,1,131,1,129,255, +231,1,131,1,135,255,231,1,131,1,136,255,231,1,131,1,139,255,231,1,131,1,140, +255,231,1,131,1,143,255,231,1,131,1,146,255,231,1,131,1,149,255,231,1,131, +1,151,255,231,1,132,1,117,255,225,1,132,1,122,255,225,1,132,1,125,255,225, +1,132,1,135,255,225,1,132,1,136,255,225,1,132,1,139,255,209,1,132,1,140,255, +225,1,132,1,142,255,207,1,132,1,143,255,219,1,132,1,146,255,225,1,132,1,149, +255,225,1,132,1,150,255,207,1,132,1,151,255,225,1,135,1,117,255,201,1,135, +1,122,255,201,1,135,1,125,255,201,1,135,1,127,255,201,1,135,1,135,255,201, +1,135,1,136,255,201,1,135,1,139,255,201,1,135,1,140,255,201,1,135,1,143,255, +201,1,135,1,149,255,201,1,136,1,132,255,217,1,136,1,137,255,227,1,136,1,141, +255,227,1,136,1,144,255,201,1,137,1,117,255,227,1,137,1,122,255,227,1,137, +1,127,255,227,1,137,1,136,255,227,1,137,1,139,255,227,1,137,1,140,255,227, +1,137,1,143,255,227,1,137,1,146,255,227,1,137,1,151,255,227,1,138,1,132,255, +217,1,138,1,137,255,227,1,138,1,141,255,227,1,141,1,117,255,227,1,141,1,122, +255,227,1,141,1,125,255,227,1,141,1,127,255,227,1,141,1,136,255,227,1,141, +1,139,255,227,1,141,1,140,255,227,1,141,1,143,255,227,1,141,1,146,255,227, +1,141,1,151,255,227,1,143,1,132,255,217,1,143,1,137,255,227,1,143,1,141,255, +227,1,143,1,144,255,201,1,144,1,117,255,201,1,144,1,122,255,201,1,144,1,125, +255,201,1,144,1,127,255,201,1,144,1,136,255,201,1,144,1,139,255,201,1,144, +1,140,255,201,1,144,1,143,255,201,1,144,1,146,255,201,1,144,1,149,255,201, +1,144,1,151,255,201,1,146,1,132,255,217,1,146,1,137,255,227,1,146,1,141,255, +227,1,146,1,144,255,201,1,149,1,132,255,217,1,149,1,137,255,227,1,149,1,141, +255,227,1,149,1,144,255,201,1,151,1,132,255,217,1,151,1,137,255,227,1,151, +1,141,255,227,1,151,1,144,255,201,1,154,0,15,255,6,1,154,0,17,255,6,1,154, +0,108,255,119,1,154,0,123,255,119,1,154,1,255,255,211,1,160,2,3,255,96,1, +161,2,3,255,119,1,166,1,170,0,68,1,166,1,173,255,233,1,166,1,177,0,45,1,166, +1,180,255,211,1,166,1,181,255,233,1,166,1,183,255,211,1,166,1,184,255,96, +1,166,1,185,255,166,1,166,1,186,255,188,1,166,1,189,255,96,1,166,1,195,255, +211,1,166,1,198,0,23,1,166,1,216,255,211,1,166,1,217,255,233,1,166,1,218, +0,23,1,166,1,227,0,45,1,166,2,3,255,141,1,167,1,166,255,211,1,167,1,173,255, +233,1,167,1,180,255,233,1,167,1,183,255,233,1,167,1,184,255,164,1,167,1,185, +255,209,1,167,1,186,255,233,1,167,1,187,255,211,1,167,1,189,255,164,1,167, +1,192,255,188,1,167,1,195,255,233,1,167,1,197,255,233,1,167,1,209,255,233, +1,167,1,217,255,211,1,168,1,166,255,188,1,168,1,170,255,211,1,168,1,172,255, +211,1,168,1,173,255,188,1,168,1,177,255,233,1,168,1,180,255,188,1,168,1,183, +255,188,1,168,1,184,255,119,1,168,1,185,255,188,1,168,1,186,255,188,1,168, +1,187,255,166,1,168,1,189,255,164,1,168,1,192,255,141,1,168,1,197,255,188, +1,168,1,202,255,233,1,168,1,210,255,233,1,168,1,216,255,188,1,168,1,217,255, +233,1,168,1,219,255,233,1,168,1,221,255,188,1,168,1,229,255,233,1,169,0,15, +255,6,1,169,0,17,255,6,1,169,0,108,255,119,1,169,0,123,255,119,1,169,1,166, +255,119,1,169,1,170,255,119,1,169,1,173,255,211,1,169,1,177,255,141,1,169, +1,178,255,209,1,169,1,180,255,141,1,169,1,183,255,164,1,169,1,197,255,188, +1,169,1,198,255,141,1,169,1,200,255,141,1,169,1,202,255,119,1,169,1,203,255, +119,1,169,1,206,255,141,1,169,1,209,255,141,1,169,1,210,255,141,1,169,1,211, +255,141,1,169,1,212,255,119,1,169,1,214,255,141,1,169,1,217,255,119,1,169, +1,225,255,141,1,169,1,226,255,141,1,169,1,228,255,141,1,169,1,229,255,119, +1,169,1,255,255,211,1,170,1,185,0,23,1,170,1,186,255,211,1,170,1,189,255, +186,1,170,1,205,0,68,1,170,1,212,0,23,1,170,1,217,0,45,1,171,1,173,255,211, +1,171,1,215,255,233,1,172,1,173,255,233,1,172,1,180,255,211,1,172,1,183,255, +233,1,172,1,184,0,23,1,172,1,185,0,45,1,172,1,192,0,45,1,172,1,198,0,23,1, +172,1,203,255,231,1,172,1,212,255,233,1,172,1,217,255,233,1,173,1,177,255, +233,1,173,1,180,255,233,1,173,1,183,255,233,1,173,1,184,255,211,1,173,1,185, +255,233,1,173,1,186,255,233,1,173,1,189,255,211,1,173,1,197,255,233,1,176, +1,173,255,233,1,176,1,180,255,233,1,176,1,183,255,233,1,176,1,185,0,23,1, +176,1,186,255,186,1,177,1,186,255,233,1,177,1,199,0,23,1,177,1,217,0,23,1, +178,1,186,255,233,1,178,1,189,255,233,1,178,1,198,0,23,1,178,1,203,0,23,1, +178,1,212,0,23,1,178,1,215,0,23,1,178,1,217,0,23,1,178,1,221,255,233,1,178, +1,227,0,23,1,180,1,166,255,211,1,180,1,170,255,211,1,180,1,172,255,211,1, +180,1,177,255,233,1,180,1,185,255,211,1,180,1,187,255,164,1,180,1,189,255, +211,1,180,1,197,255,211,1,180,1,202,255,211,1,180,1,209,255,233,1,180,1,219, +255,233,1,182,0,15,254,125,1,182,0,17,254,125,1,182,0,29,255,211,1,182,0, +30,255,211,1,182,0,123,255,141,1,182,1,166,255,119,1,182,1,170,255,119,1, +182,1,172,255,233,1,182,1,173,255,211,1,182,1,177,255,141,1,182,1,178,255, +233,1,182,1,180,255,211,1,182,1,183,255,233,1,182,1,184,255,164,1,182,1,185, +255,211,1,182,1,186,255,233,1,182,1,187,255,164,1,182,1,197,255,211,1,182, +1,198,255,188,1,182,1,202,255,96,1,182,1,203,255,166,1,182,1,212,255,166, +1,182,1,227,255,211,1,182,1,229,255,188,1,183,1,166,255,211,1,183,1,170,255, +211,1,183,1,173,255,233,1,183,1,177,255,188,1,183,1,178,255,233,1,183,1,180, +255,211,1,183,1,184,255,188,1,183,1,185,255,188,1,183,1,187,255,141,1,183, +1,189,255,188,1,183,1,192,255,186,1,183,1,195,255,233,1,183,1,198,0,23,1, +183,1,204,0,45,1,183,1,221,255,233,1,184,0,15,255,29,1,184,0,17,255,29,1, +184,0,108,255,166,1,184,0,123,255,166,1,184,1,166,255,188,1,184,1,170,255, +188,1,184,1,172,0,23,1,184,1,173,255,233,1,184,1,177,255,211,1,184,1,180, +255,164,1,184,1,186,255,188,1,184,1,197,255,211,1,184,1,198,255,164,1,184, +1,200,255,166,1,184,1,203,255,141,1,184,1,206,255,166,1,184,1,208,255,166, +1,184,1,209,255,164,1,184,1,210,255,166,1,184,1,212,255,96,1,184,1,213,255, +166,1,184,1,214,255,141,1,184,1,215,255,141,1,184,1,217,255,141,1,184,1,219, +255,166,1,184,1,223,255,166,1,184,1,225,255,166,1,184,1,226,255,166,1,184, +1,228,255,166,1,184,1,229,255,141,1,184,1,255,255,211,1,185,0,15,254,240, +1,185,0,17,254,240,1,185,0,29,255,211,1,185,0,30,255,211,1,185,0,108,255, +166,1,185,0,123,255,164,1,185,1,166,255,119,1,185,1,170,255,164,1,185,1,173, +255,211,1,185,1,177,255,188,1,185,1,180,255,188,1,185,1,186,255,188,1,185, +1,195,255,211,1,185,1,197,255,211,1,185,1,199,255,211,1,185,1,200,255,141, +1,185,1,201,255,164,1,185,1,202,255,96,1,185,1,203,255,119,1,185,1,204,255, +188,1,185,1,205,255,141,1,185,1,206,255,164,1,185,1,207,255,188,1,185,1,208, +255,164,1,185,1,209,255,119,1,185,1,210,255,164,1,185,1,211,255,164,1,185, +1,212,255,119,1,185,1,213,255,164,1,185,1,214,255,164,1,185,1,215,255,119, +1,185,1,219,255,164,1,185,1,220,255,164,1,185,1,222,255,164,1,185,1,223,255, +164,1,185,1,228,255,164,1,185,1,229,255,119,1,185,1,255,255,233,1,186,1,166, +255,211,1,186,1,170,255,188,1,186,1,177,255,188,1,186,1,184,255,141,1,186, +1,185,255,164,1,186,1,189,255,211,1,186,1,197,255,186,1,186,1,209,255,188, +1,187,1,173,255,211,1,187,1,180,255,188,1,187,1,183,255,188,1,187,1,186,255, +188,1,187,1,195,255,186,1,187,1,212,255,233,1,187,1,217,255,211,1,188,1,180, +255,211,1,188,1,198,0,45,1,191,1,198,0,23,1,191,1,217,0,45,1,192,1,197,255, +188,1,192,2,3,255,119,1,194,1,166,255,211,1,194,1,170,255,211,1,194,1,172, +255,188,1,194,1,173,255,233,1,194,1,177,255,186,1,194,1,178,255,211,1,194, +1,180,255,211,1,194,1,183,255,211,1,194,1,184,255,51,1,194,1,187,255,164, +1,194,1,189,255,96,1,194,1,195,255,233,1,194,1,197,255,164,1,194,2,3,255, +96,1,195,1,170,255,188,1,195,1,172,255,231,1,195,1,173,255,233,1,195,1,177, +255,188,1,195,1,187,255,186,1,195,1,197,255,211,1,195,1,202,255,188,1,195, +1,204,0,23,1,195,1,209,255,188,1,195,1,210,255,233,1,195,1,229,255,233,1, +196,1,166,255,188,1,196,1,170,255,166,1,196,1,172,255,211,1,196,1,177,255, +164,1,196,1,180,255,233,1,196,1,183,255,233,1,196,1,184,255,141,1,196,1,187, +255,164,1,196,1,189,255,188,1,196,1,202,255,164,1,196,1,209,255,164,1,196, +1,210,255,233,1,198,1,205,255,233,1,198,1,216,255,211,1,198,1,217,255,233, +1,198,1,221,255,211,1,199,1,198,255,209,1,199,1,202,255,164,1,199,1,203,255, +233,1,199,1,204,255,233,1,199,1,205,255,211,1,199,1,209,255,164,1,199,1,210, +255,211,1,199,1,215,255,233,1,199,1,217,255,211,1,199,1,218,255,233,1,199, +1,219,255,188,1,199,1,221,255,188,1,199,1,224,255,188,1,199,1,227,255,233, +1,199,1,229,255,211,1,200,1,198,255,233,1,200,1,199,255,233,1,200,1,202,255, +233,1,200,1,203,255,233,1,200,1,204,255,233,1,200,1,205,255,233,1,200,1,209, +255,209,1,200,1,210,255,233,1,200,1,212,255,233,1,200,1,215,255,233,1,200, +1,216,255,211,1,200,1,217,255,211,1,200,1,218,255,233,1,200,1,221,255,164, +1,200,1,224,255,188,1,200,1,229,255,233,1,201,0,15,255,6,1,201,0,17,255,6, +1,201,1,198,255,211,1,201,1,202,255,164,1,201,1,203,255,211,1,201,1,205,255, +233,1,201,1,209,255,211,1,201,1,212,255,211,1,201,1,215,255,211,1,201,1,229, +255,233,1,202,1,224,255,211,1,202,1,227,0,23,1,203,1,199,255,233,1,203,1, +202,255,211,1,203,1,204,255,233,1,203,1,205,255,211,1,203,1,209,255,188,1, +203,1,216,255,188,1,203,1,217,255,233,1,203,1,219,255,211,1,203,1,221,255, +188,1,204,1,199,0,23,1,204,1,217,0,23,1,204,1,221,255,233,1,204,1,224,0,45, +1,205,1,199,255,233,1,205,1,202,255,211,1,205,1,203,255,233,1,205,1,205,255, +233,1,205,1,209,255,233,1,205,1,212,255,233,1,205,1,215,255,233,1,205,1,217, +255,233,1,205,1,218,255,233,1,205,1,221,255,188,1,205,1,224,255,211,1,208, +1,198,0,45,1,208,1,199,0,45,1,208,1,203,0,23,1,208,1,205,0,23,1,208,1,209, +0,23,1,208,1,212,0,23,1,208,1,215,0,23,1,208,1,216,0,23,1,208,1,217,0,23, +1,208,1,227,0,23,1,209,1,212,0,23,1,209,1,221,255,211,1,210,1,199,255,233, +1,210,1,205,255,233,1,210,1,217,0,23,1,212,1,202,255,211,1,212,1,204,255, +233,1,212,1,205,255,233,1,212,1,209,255,211,1,212,1,216,255,211,1,212,1,217, +255,233,1,212,1,219,255,233,1,212,1,221,255,211,1,214,1,202,255,209,1,214, +1,205,255,233,1,214,1,209,255,186,1,214,1,216,255,211,1,214,1,217,255,233, +1,214,1,219,255,233,1,214,1,221,255,211,1,214,1,229,255,233,1,215,1,204,0, +23,1,215,1,212,0,23,1,215,1,221,255,233,1,215,1,227,0,23,1,216,0,15,255,29, +1,216,0,17,255,29,1,216,1,198,255,233,1,216,1,202,255,188,1,216,1,203,255, +233,1,216,1,204,0,68,1,216,1,209,255,211,1,216,1,212,255,233,1,216,1,215, +255,233,1,216,1,217,0,23,1,217,0,15,255,51,1,217,0,17,255,51,1,217,0,123, +0,23,1,217,1,198,255,233,1,217,1,199,0,23,1,217,1,202,255,188,1,217,1,203, +255,233,1,217,1,204,0,23,1,217,1,209,255,211,1,217,1,210,255,233,1,217,1, +212,255,231,1,217,1,214,255,233,1,217,1,215,255,233,1,217,1,218,255,233,1, +217,1,227,255,233,1,217,1,229,255,233,1,218,1,199,255,233,1,218,1,202,255, +211,1,218,1,209,255,211,1,218,1,216,255,211,1,218,1,217,255,233,1,218,1,221, +255,211,1,218,1,229,255,233,1,219,1,198,255,233,1,219,1,199,255,233,1,219, +1,203,255,233,1,219,1,205,255,233,1,219,1,212,255,233,1,219,1,215,255,233, +1,219,1,216,255,233,1,219,1,218,255,233,1,219,1,221,255,211,1,220,1,203,255, +233,1,220,1,205,255,233,1,220,1,212,255,233,1,220,1,215,255,233,1,223,1,203, +255,233,1,223,1,212,255,233,1,223,1,217,0,23,1,226,1,216,255,96,1,226,1,221, +255,119,1,227,1,202,255,211,1,227,1,203,0,23,1,227,1,205,255,233,1,227,1, +209,255,211,1,227,1,212,0,23,1,227,1,216,255,211,1,227,1,219,255,233,1,227, +1,229,255,233,1,228,1,202,255,211,1,228,1,204,255,233,1,228,1,209,255,211, +1,228,1,210,255,233,1,228,1,216,255,211,1,228,1,219,255,233,1,228,1,221,255, +211,1,242,0,15,255,51,1,242,0,17,255,51,1,244,0,15,255,6,1,244,0,17,255,6, +1,244,0,29,255,211,1,244,0,30,255,211,1,244,0,108,255,96,1,244,0,123,255, +96,1,244,1,255,255,211,2,2,2,2,255,219,2,3,0,3,255,180,2,3,0,86,255,219,2, +3,2,3,255,219,2,8,1,153,255,96,2,8,1,162,255,96,2,8,1,184,255,96,2,8,1,189, +255,188,2,8,1,192,255,188,0,0,0,0,0,28,1,86,0,1,0,0,0,0,0,0,0,64,0,130,0, +1,0,0,0,0,0,1,0,15,0,227,0,1,0,0,0,0,0,2,0,7,1,3,0,1,0,0,0,0,0,3,0,26,1,65, +0,1,0,0,0,0,0,4,0,15,1,124,0,1,0,0,0,0,0,5,0,12,1,166,0,1,0,0,0,0,0,6,0,14, +1,209,0,1,0,0,0,0,0,7,0,122,2,214,0,1,0,0,0,0,0,8,0,20,3,123,0,1,0,0,0,0, +0,9,0,14,3,174,0,1,0,0,0,0,0,11,0,28,3,247,0,1,0,0,0,0,0,12,0,46,4,114,0, +1,0,0,0,0,0,13,0,127,5,161,0,1,0,0,0,0,0,14,0,43,6,121,0,3,0,1,4,9,0,0,0, +128,0,0,0,3,0,1,4,9,0,1,0,30,0,195,0,3,0,1,4,9,0,2,0,14,0,243,0,3,0,1,4,9, +0,3,0,52,1,11,0,3,0,1,4,9,0,4,0,30,1,92,0,3,0,1,4,9,0,5,0,24,1,140,0,3,0, +1,4,9,0,6,0,28,1,179,0,3,0,1,4,9,0,7,0,244,1,224,0,3,0,1,4,9,0,8,0,40,3,81, +0,3,0,1,4,9,0,9,0,28,3,144,0,3,0,1,4,9,0,11,0,56,3,189,0,3,0,1,4,9,0,12,0, +92,4,20,0,3,0,1,4,9,0,13,0,254,4,161,0,3,0,1,4,9,0,14,0,86,6,33,0,68,0,105, +0,103,0,105,0,116,0,105,0,122,0,101,0,100,0,32,0,100,0,97,0,116,0,97,0,32, +0,169,0,32,0,50,0,48,0,48,0,55,0,32,0,65,0,115,0,99,0,101,0,110,0,100,0,101, +0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105,0,111,0,110, +0,46,0,32,0,65,0,108,0,108,0,32,0,114,0,105,0,103,0,104,0,116,0,115,0,32, +0,114,0,101,0,115,0,101,0,114,0,118,0,101,0,100,0,46,0,0,68,105,103,105,116, +105,122,101,100,32,100,97,116,97,32,169,32,50,48,48,55,32,65,115,99,101,110, +100,101,114,32,67,111,114,112,111,114,97,116,105,111,110,46,32,65,108,108, +32,114,105,103,104,116,115,32,114,101,115,101,114,118,101,100,46,0,0,76,0, +105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0, +115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115,0,0,82,0,101, +0,103,0,117,0,108,0,97,0,114,0,0,82,101,103,117,108,97,114,0,0,65,0,115,0, +99,0,101,0,110,0,100,0,101,0,114,0,32,0,45,0,32,0,76,0,105,0,98,0,101,0,114, +0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0,115,0,0,65,115,99,101, +110,100,101,114,32,45,32,76,105,98,101,114,97,116,105,111,110,32,83,97,110, +115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83, +0,97,0,110,0,115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115, +0,0,86,0,101,0,114,0,115,0,105,0,111,0,110,0,32,0,49,0,46,0,48,0,50,0,0,86, +101,114,115,105,111,110,32,49,46,48,50,0,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,83,0,97,0,110,0,115,0,0,76,105,98,101,114,97,116, +105,111,110,83,97,110,115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105, +0,111,0,110,0,32,0,105,0,115,0,32,0,97,0,32,0,116,0,114,0,97,0,100,0,101, +0,109,0,97,0,114,0,107,0,32,0,111,0,102,0,32,0,82,0,101,0,100,0,32,0,72,0, +97,0,116,0,44,0,32,0,73,0,110,0,99,0,46,0,32,0,114,0,101,0,103,0,105,0,115, +0,116,0,101,0,114,0,101,0,100,0,32,0,105,0,110,0,32,0,85,0,46,0,83,0,46,0, +32,0,80,0,97,0,116,0,101,0,110,0,116,0,32,0,97,0,110,0,100,0,32,0,84,0,114, +0,97,0,100,0,101,0,109,0,97,0,114,0,107,0,32,0,79,0,102,0,102,0,105,0,99, +0,101,0,32,0,97,0,110,0,100,0,32,0,99,0,101,0,114,0,116,0,97,0,105,0,110, +0,32,0,111,0,116,0,104,0,101,0,114,0,32,0,106,0,117,0,114,0,105,0,115,0,100, +0,105,0,99,0,116,0,105,0,111,0,110,0,115,0,46,0,0,76,105,98,101,114,97,116, +105,111,110,32,105,115,32,97,32,116,114,97,100,101,109,97,114,107,32,111, +102,32,82,101,100,32,72,97,116,44,32,73,110,99,46,32,114,101,103,105,115, +116,101,114,101,100,32,105,110,32,85,46,83,46,32,80,97,116,101,110,116,32, +97,110,100,32,84,114,97,100,101,109,97,114,107,32,79,102,102,105,99,101,32, +97,110,100,32,99,101,114,116,97,105,110,32,111,116,104,101,114,32,106,117, +114,105,115,100,105,99,116,105,111,110,115,46,0,0,65,0,115,0,99,0,101,0,110, +0,100,0,101,0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105, +0,111,0,110,0,0,65,115,99,101,110,100,101,114,32,67,111,114,112,111,114,97, +116,105,111,110,0,0,83,0,116,0,101,0,118,0,101,0,32,0,77,0,97,0,116,0,116, +0,101,0,115,0,111,0,110,0,0,83,116,101,118,101,32,77,97,116,116,101,115,111, +110,0,0,104,0,116,0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97, +0,115,0,99,0,101,0,110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99, +0,111,0,109,0,47,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,0,0,104,0,116,0,116,0,112, +0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0,110,0,100,0, +101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0,116,0,121,0, +112,0,101,0,100,0,101,0,115,0,105,0,103,0,110,0,101,0,114,0,115,0,46,0,104, +0,116,0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,116,121,112,101,100,101,115, +105,103,110,101,114,115,46,104,116,109,108,0,0,85,0,115,0,101,0,32,0,111, +0,102,0,32,0,116,0,104,0,105,0,115,0,32,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102, +0,116,0,119,0,97,0,114,0,101,0,32,0,105,0,115,0,32,0,115,0,117,0,98,0,106, +0,101,0,99,0,116,0,32,0,116,0,111,0,32,0,116,0,104,0,101,0,32,0,108,0,105, +0,99,0,101,0,110,0,115,0,101,0,32,0,97,0,103,0,114,0,101,0,101,0,109,0,101, +0,110,0,116,0,32,0,117,0,110,0,100,0,101,0,114,0,32,0,119,0,104,0,105,0,99, +0,104,0,32,0,121,0,111,0,117,0,32,0,97,0,99,0,99,0,101,0,112,0,116,0,101, +0,100,0,32,0,116,0,104,0,101,0,32,0,76,0,105,0,98,0,101,0,114,0,97,0,116, +0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102,0,116, +0,119,0,97,0,114,0,101,0,46,0,0,85,115,101,32,111,102,32,116,104,105,115, +32,76,105,98,101,114,97,116,105,111,110,32,102,111,110,116,32,115,111,102, +116,119,97,114,101,32,105,115,32,115,117,98,106,101,99,116,32,116,111,32, +116,104,101,32,108,105,99,101,110,115,101,32,97,103,114,101,101,109,101,110, +116,32,117,110,100,101,114,32,119,104,105,99,104,32,121,111,117,32,97,99, +99,101,112,116,101,100,32,116,104,101,32,76,105,98,101,114,97,116,105,111, +110,32,102,111,110,116,32,115,111,102,116,119,97,114,101,46,0,0,104,0,116, +0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0, +110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0, +108,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,46,0,104,0,116, +0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101,110, +100,101,114,99,111,114,112,46,99,111,109,47,108,105,98,101,114,97,116,105, +111,110,46,104,116,109,108,0,0,0,2,0,0,0,0,0,0,255,39,0,150,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,2,156,0,0,0,1,0,2,1,2,0,4,0,5,0,6,0,7,0,8,0,9,0, +10,0,11,0,12,0,13,0,14,0,15,1,3,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0, +25,0,26,0,27,0,28,0,29,1,4,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0, +40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54, +0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67,0,68,0,69, +0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,84, +0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97,0,163,0, +132,0,133,0,189,0,150,0,232,0,134,0,142,0,139,0,157,0,169,0,164,0,138,0,218, +0,131,0,147,1,5,1,6,0,141,1,7,0,136,1,8,0,222,1,9,0,158,0,170,0,245,0,244, +0,246,0,162,0,173,0,201,0,199,0,174,0,98,0,99,0,144,0,100,0,203,0,101,0,200, +0,202,0,207,0,204,0,205,0,206,0,233,0,102,0,211,0,208,0,209,0,175,0,103,0, +240,0,145,0,214,0,212,0,213,0,104,0,235,0,237,0,137,0,106,0,105,0,107,0,109, +0,108,0,110,0,160,0,111,0,113,0,112,0,114,0,115,0,117,0,116,0,118,0,119,0, +234,0,120,0,122,0,121,0,123,0,125,0,124,0,184,0,161,0,127,0,126,0,128,0,129, +0,236,0,238,0,186,1,10,1,11,1,12,1,13,1,14,1,15,0,253,0,254,1,16,1,17,1,18, +1,19,0,255,1,0,1,20,1,21,1,22,1,1,1,23,1,24,1,25,1,26,1,27,1,28,1,29,1,30, +1,31,1,32,1,33,1,34,0,248,0,249,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,42,1, +43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,0,250,0,215,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,0,226,0,227,1,66,1,67,1, +68,1,69,1,70,1,71,1,72,1,73,1,74,1,75,1,76,1,77,1,78,1,79,1,80,0,176,0,177, +1,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,0,251,0,252,0,228,0,229, +1,91,1,92,1,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104, +1,105,1,106,1,107,1,108,1,109,1,110,1,111,1,112,0,187,1,113,1,114,1,115,1, +116,0,230,0,231,1,117,0,166,1,118,1,119,1,120,1,121,1,122,1,123,0,216,0,225, +1,124,0,219,0,220,0,221,0,224,0,217,0,223,1,125,1,126,1,127,1,128,1,129,1, +130,1,131,1,132,1,133,1,134,1,135,1,136,1,137,1,138,0,168,1,139,1,140,1,141, +1,142,1,143,1,144,1,145,1,146,1,147,1,148,1,149,1,150,1,151,1,152,1,153,1, +154,1,155,1,156,1,157,0,159,1,158,1,159,1,160,1,161,1,162,1,163,1,164,1,165, +1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1,174,1,175,0,151,1,176,1, +177,1,178,0,155,1,179,1,180,1,181,1,182,1,183,1,184,1,185,1,186,1,187,1,188, +1,189,1,190,1,191,1,192,1,193,1,194,1,195,1,196,1,197,1,198,1,199,1,200,1, +201,1,202,1,203,1,204,1,205,1,206,1,207,1,208,1,209,1,210,1,211,1,212,1,213, +1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,221,1,222,1,223,1,224,1,225,1, +226,1,227,1,228,1,229,1,230,1,231,1,232,1,233,1,234,1,235,1,236,1,237,1,238, +1,239,1,240,1,241,1,242,1,243,1,244,1,245,1,246,1,247,1,248,1,249,1,250,1, +251,1,252,1,253,1,254,1,255,2,0,2,1,2,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,2,10, +2,11,2,12,2,13,2,14,2,15,2,16,2,17,2,18,2,19,2,20,2,21,2,22,2,23,2,24,2,25, +2,26,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,0,178,0, +179,2,39,2,40,0,182,0,183,0,196,2,41,0,180,0,181,0,197,0,130,0,194,0,135, +0,171,0,198,2,42,2,43,0,190,0,191,2,44,2,45,2,46,2,47,0,247,2,48,2,49,2,50, +2,51,2,52,2,53,0,140,2,54,2,55,2,56,2,57,2,58,2,59,2,60,2,61,2,62,2,63,2, +64,2,65,2,66,0,152,2,67,0,154,0,153,0,239,0,165,0,146,2,68,2,69,0,156,0,167, +0,143,2,70,0,148,0,149,2,71,2,72,2,73,2,74,2,75,2,76,2,77,2,78,2,79,2,80, +2,81,2,82,2,83,2,84,2,85,2,86,2,87,2,88,2,89,2,90,2,91,2,92,2,93,2,94,2,95, +2,96,2,97,2,98,2,99,2,100,2,101,2,102,2,103,2,104,2,105,2,106,2,107,2,108, +2,109,2,110,2,111,2,112,2,113,2,114,2,115,2,116,2,117,2,118,2,119,2,120,2, +121,2,122,2,123,2,124,2,125,2,126,2,127,2,128,2,129,2,130,2,131,0,185,2,132, +2,133,2,134,2,135,2,136,2,137,2,138,2,139,2,140,2,141,2,142,2,143,2,144,2, +145,2,146,2,147,2,148,2,149,2,150,2,151,2,152,2,153,2,154,2,155,2,156,2,157, +2,158,2,159,2,160,2,161,2,162,2,163,2,164,2,165,2,166,2,167,7,117,110,105, +48,48,65,48,7,117,110,105,48,48,65,68,7,117,110,105,48,51,55,69,7,117,110, +105,48,48,66,50,7,117,110,105,48,48,66,51,7,117,110,105,48,48,66,53,7,117, +110,105,50,50,49,57,7,117,110,105,48,48,66,57,7,65,109,97,99,114,111,110, +7,97,109,97,99,114,111,110,6,65,98,114,101,118,101,6,97,98,114,101,118,101, +7,65,111,103,111,110,101,107,7,97,111,103,111,110,101,107,11,67,99,105,114, +99,117,109,102,108,101,120,11,99,99,105,114,99,117,109,102,108,101,120,10, +67,100,111,116,97,99,99,101,110,116,10,99,100,111,116,97,99,99,101,110,116, +6,68,99,97,114,111,110,6,100,99,97,114,111,110,6,68,99,114,111,97,116,7,69, +109,97,99,114,111,110,7,101,109,97,99,114,111,110,6,69,98,114,101,118,101, +6,101,98,114,101,118,101,10,69,100,111,116,97,99,99,101,110,116,10,101,100, +111,116,97,99,99,101,110,116,7,69,111,103,111,110,101,107,7,101,111,103,111, +110,101,107,6,69,99,97,114,111,110,6,101,99,97,114,111,110,11,71,99,105,114, +99,117,109,102,108,101,120,11,103,99,105,114,99,117,109,102,108,101,120,10, +71,100,111,116,97,99,99,101,110,116,10,103,100,111,116,97,99,99,101,110,116, +12,71,99,111,109,109,97,97,99,99,101,110,116,12,103,99,111,109,109,97,97, +99,99,101,110,116,11,72,99,105,114,99,117,109,102,108,101,120,11,104,99,105, +114,99,117,109,102,108,101,120,4,72,98,97,114,4,104,98,97,114,6,73,116,105, +108,100,101,6,105,116,105,108,100,101,7,73,109,97,99,114,111,110,7,105,109, +97,99,114,111,110,6,73,98,114,101,118,101,6,105,98,114,101,118,101,7,73,111, +103,111,110,101,107,7,105,111,103,111,110,101,107,2,73,74,2,105,106,11,74, +99,105,114,99,117,109,102,108,101,120,11,106,99,105,114,99,117,109,102,108, +101,120,12,75,99,111,109,109,97,97,99,99,101,110,116,12,107,99,111,109,109, +97,97,99,99,101,110,116,12,107,103,114,101,101,110,108,97,110,100,105,99, +6,76,97,99,117,116,101,6,108,97,99,117,116,101,12,76,99,111,109,109,97,97, +99,99,101,110,116,12,108,99,111,109,109,97,97,99,99,101,110,116,6,76,99,97, +114,111,110,6,108,99,97,114,111,110,4,76,100,111,116,4,108,100,111,116,6, +78,97,99,117,116,101,6,110,97,99,117,116,101,12,78,99,111,109,109,97,97,99, +99,101,110,116,12,110,99,111,109,109,97,97,99,99,101,110,116,6,78,99,97,114, +111,110,6,110,99,97,114,111,110,11,110,97,112,111,115,116,114,111,112,104, +101,3,69,110,103,3,101,110,103,7,79,109,97,99,114,111,110,7,111,109,97,99, +114,111,110,6,79,98,114,101,118,101,6,111,98,114,101,118,101,13,79,104,117, +110,103,97,114,117,109,108,97,117,116,13,111,104,117,110,103,97,114,117,109, +108,97,117,116,6,82,97,99,117,116,101,6,114,97,99,117,116,101,12,82,99,111, +109,109,97,97,99,99,101,110,116,12,114,99,111,109,109,97,97,99,99,101,110, +116,6,82,99,97,114,111,110,6,114,99,97,114,111,110,6,83,97,99,117,116,101, +6,115,97,99,117,116,101,11,83,99,105,114,99,117,109,102,108,101,120,11,115, +99,105,114,99,117,109,102,108,101,120,12,84,99,111,109,109,97,97,99,99,101, +110,116,12,116,99,111,109,109,97,97,99,99,101,110,116,6,84,99,97,114,111, +110,6,116,99,97,114,111,110,4,84,98,97,114,4,116,98,97,114,6,85,116,105,108, +100,101,6,117,116,105,108,100,101,7,85,109,97,99,114,111,110,7,117,109,97, +99,114,111,110,6,85,98,114,101,118,101,6,117,98,114,101,118,101,5,85,114, +105,110,103,5,117,114,105,110,103,13,85,104,117,110,103,97,114,117,109,108, +97,117,116,13,117,104,117,110,103,97,114,117,109,108,97,117,116,7,85,111, +103,111,110,101,107,7,117,111,103,111,110,101,107,11,87,99,105,114,99,117, +109,102,108,101,120,11,119,99,105,114,99,117,109,102,108,101,120,11,89,99, +105,114,99,117,109,102,108,101,120,11,121,99,105,114,99,117,109,102,108,101, +120,6,90,97,99,117,116,101,6,122,97,99,117,116,101,10,90,100,111,116,97,99, +99,101,110,116,10,122,100,111,116,97,99,99,101,110,116,5,108,111,110,103, +115,10,65,114,105,110,103,97,99,117,116,101,10,97,114,105,110,103,97,99,117, +116,101,7,65,69,97,99,117,116,101,7,97,101,97,99,117,116,101,11,79,115,108, +97,115,104,97,99,117,116,101,11,111,115,108,97,115,104,97,99,117,116,101, +7,117,110,105,48,50,67,57,5,116,111,110,111,115,13,100,105,101,114,101,115, +105,115,116,111,110,111,115,10,65,108,112,104,97,116,111,110,111,115,9,97, +110,111,116,101,108,101,105,97,12,69,112,115,105,108,111,110,116,111,110, +111,115,8,69,116,97,116,111,110,111,115,9,73,111,116,97,116,111,110,111,115, +12,79,109,105,99,114,111,110,116,111,110,111,115,12,85,112,115,105,108,111, +110,116,111,110,111,115,10,79,109,101,103,97,116,111,110,111,115,17,105,111, +116,97,100,105,101,114,101,115,105,115,116,111,110,111,115,5,65,108,112,104, +97,4,66,101,116,97,5,71,97,109,109,97,7,69,112,115,105,108,111,110,4,90,101, +116,97,3,69,116,97,5,84,104,101,116,97,4,73,111,116,97,5,75,97,112,112,97, +6,76,97,109,98,100,97,2,77,117,2,78,117,2,88,105,7,79,109,105,99,114,111, +110,2,80,105,3,82,104,111,5,83,105,103,109,97,3,84,97,117,7,85,112,115,105, +108,111,110,3,80,104,105,3,67,104,105,3,80,115,105,12,73,111,116,97,100,105, +101,114,101,115,105,115,15,85,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,10,97,108,112,104,97,116,111,110,111,115,12,101,112,115,105,108, +111,110,116,111,110,111,115,8,101,116,97,116,111,110,111,115,9,105,111,116, +97,116,111,110,111,115,20,117,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,116,111,110,111,115,5,97,108,112,104,97,4,98,101,116,97,5,103, +97,109,109,97,5,100,101,108,116,97,7,101,112,115,105,108,111,110,4,122,101, +116,97,3,101,116,97,5,116,104,101,116,97,4,105,111,116,97,5,107,97,112,112, +97,6,108,97,109,98,100,97,2,110,117,2,120,105,7,111,109,105,99,114,111,110, +3,114,104,111,6,115,105,103,109,97,49,5,115,105,103,109,97,3,116,97,117,7, +117,112,115,105,108,111,110,3,112,104,105,3,99,104,105,3,112,115,105,5,111, +109,101,103,97,12,105,111,116,97,100,105,101,114,101,115,105,115,15,117,112, +115,105,108,111,110,100,105,101,114,101,115,105,115,12,111,109,105,99,114, +111,110,116,111,110,111,115,12,117,112,115,105,108,111,110,116,111,110,111, +115,10,111,109,101,103,97,116,111,110,111,115,9,97,102,105,105,49,48,48,50, +51,9,97,102,105,105,49,48,48,53,49,9,97,102,105,105,49,48,48,53,50,9,97,102, +105,105,49,48,48,53,51,9,97,102,105,105,49,48,48,53,52,9,97,102,105,105,49, +48,48,53,53,9,97,102,105,105,49,48,48,53,54,9,97,102,105,105,49,48,48,53, +55,9,97,102,105,105,49,48,48,53,56,9,97,102,105,105,49,48,48,53,57,9,97,102, +105,105,49,48,48,54,48,9,97,102,105,105,49,48,48,54,49,9,97,102,105,105,49, +48,48,54,50,9,97,102,105,105,49,48,49,52,53,9,97,102,105,105,49,48,48,49, +55,9,97,102,105,105,49,48,48,49,56,9,97,102,105,105,49,48,48,49,57,9,97,102, +105,105,49,48,48,50,48,9,97,102,105,105,49,48,48,50,49,9,97,102,105,105,49, +48,48,50,50,9,97,102,105,105,49,48,48,50,52,9,97,102,105,105,49,48,48,50, +53,9,97,102,105,105,49,48,48,50,54,9,97,102,105,105,49,48,48,50,55,9,97,102, +105,105,49,48,48,50,56,9,97,102,105,105,49,48,48,50,57,9,97,102,105,105,49, +48,48,51,48,9,97,102,105,105,49,48,48,51,49,9,97,102,105,105,49,48,48,51, +50,9,97,102,105,105,49,48,48,51,51,9,97,102,105,105,49,48,48,51,52,9,97,102, +105,105,49,48,48,51,53,9,97,102,105,105,49,48,48,51,54,9,97,102,105,105,49, +48,48,51,55,9,97,102,105,105,49,48,48,51,56,9,97,102,105,105,49,48,48,51, +57,9,97,102,105,105,49,48,48,52,48,9,97,102,105,105,49,48,48,52,49,9,97,102, +105,105,49,48,48,52,50,9,97,102,105,105,49,48,48,52,51,9,97,102,105,105,49, +48,48,52,52,9,97,102,105,105,49,48,48,52,53,9,97,102,105,105,49,48,48,52, +54,9,97,102,105,105,49,48,48,52,55,9,97,102,105,105,49,48,48,52,56,9,97,102, +105,105,49,48,48,52,57,9,97,102,105,105,49,48,48,54,53,9,97,102,105,105,49, +48,48,54,54,9,97,102,105,105,49,48,48,54,55,9,97,102,105,105,49,48,48,54, +56,9,97,102,105,105,49,48,48,54,57,9,97,102,105,105,49,48,48,55,48,9,97,102, +105,105,49,48,48,55,50,9,97,102,105,105,49,48,48,55,51,9,97,102,105,105,49, +48,48,55,52,9,97,102,105,105,49,48,48,55,53,9,97,102,105,105,49,48,48,55, +54,9,97,102,105,105,49,48,48,55,55,9,97,102,105,105,49,48,48,55,56,9,97,102, +105,105,49,48,48,55,57,9,97,102,105,105,49,48,48,56,48,9,97,102,105,105,49, +48,48,56,49,9,97,102,105,105,49,48,48,56,50,9,97,102,105,105,49,48,48,56, +51,9,97,102,105,105,49,48,48,56,52,9,97,102,105,105,49,48,48,56,53,9,97,102, +105,105,49,48,48,56,54,9,97,102,105,105,49,48,48,56,55,9,97,102,105,105,49, +48,48,56,56,9,97,102,105,105,49,48,48,56,57,9,97,102,105,105,49,48,48,57, +48,9,97,102,105,105,49,48,48,57,49,9,97,102,105,105,49,48,48,57,50,9,97,102, +105,105,49,48,48,57,51,9,97,102,105,105,49,48,48,57,52,9,97,102,105,105,49, +48,48,57,53,9,97,102,105,105,49,48,48,57,54,9,97,102,105,105,49,48,48,57, +55,9,97,102,105,105,49,48,48,55,49,9,97,102,105,105,49,48,48,57,57,9,97,102, +105,105,49,48,49,48,48,9,97,102,105,105,49,48,49,48,49,9,97,102,105,105,49, +48,49,48,50,9,97,102,105,105,49,48,49,48,51,9,97,102,105,105,49,48,49,48, +52,9,97,102,105,105,49,48,49,48,53,9,97,102,105,105,49,48,49,48,54,9,97,102, +105,105,49,48,49,48,55,9,97,102,105,105,49,48,49,48,56,9,97,102,105,105,49, +48,49,48,57,9,97,102,105,105,49,48,49,49,48,9,97,102,105,105,49,48,49,57, +51,9,97,102,105,105,49,48,48,53,48,9,97,102,105,105,49,48,48,57,56,6,87,103, +114,97,118,101,6,119,103,114,97,118,101,6,87,97,99,117,116,101,6,119,97,99, +117,116,101,9,87,100,105,101,114,101,115,105,115,9,119,100,105,101,114,101, +115,105,115,6,89,103,114,97,118,101,6,121,103,114,97,118,101,9,97,102,105, +105,48,48,50,48,56,13,117,110,100,101,114,115,99,111,114,101,100,98,108,13, +113,117,111,116,101,114,101,118,101,114,115,101,100,6,109,105,110,117,116, +101,6,115,101,99,111,110,100,9,101,120,99,108,97,109,100,98,108,7,117,110, +105,50,48,51,69,7,117,110,105,50,50,49,53,7,117,110,105,50,48,55,70,4,108, +105,114,97,6,112,101,115,101,116,97,4,69,117,114,111,9,97,102,105,105,54, +49,50,52,56,9,97,102,105,105,54,49,50,56,57,9,97,102,105,105,54,49,51,53, +50,7,117,110,105,50,49,50,54,9,101,115,116,105,109,97,116,101,100,9,111,110, +101,101,105,103,104,116,104,12,116,104,114,101,101,101,105,103,104,116,104, +115,11,102,105,118,101,101,105,103,104,116,104,115,12,115,101,118,101,110, +101,105,103,104,116,104,115,9,97,114,114,111,119,108,101,102,116,7,97,114, +114,111,119,117,112,10,97,114,114,111,119,114,105,103,104,116,9,97,114,114, +111,119,100,111,119,110,9,97,114,114,111,119,98,111,116,104,9,97,114,114, +111,119,117,112,100,110,12,97,114,114,111,119,117,112,100,110,98,115,101, +7,117,110,105,50,50,48,54,10,111,114,116,104,111,103,111,110,97,108,12,105, +110,116,101,114,115,101,99,116,105,111,110,11,101,113,117,105,118,97,108, +101,110,99,101,5,104,111,117,115,101,13,114,101,118,108,111,103,105,99,97, +108,110,111,116,10,105,110,116,101,103,114,97,108,116,112,10,105,110,116, +101,103,114,97,108,98,116,8,83,70,49,48,48,48,48,48,8,83,70,49,49,48,48,48, +48,8,83,70,48,49,48,48,48,48,8,83,70,48,51,48,48,48,48,8,83,70,48,50,48,48, +48,48,8,83,70,48,52,48,48,48,48,8,83,70,48,56,48,48,48,48,8,83,70,48,57,48, +48,48,48,8,83,70,48,54,48,48,48,48,8,83,70,48,55,48,48,48,48,8,83,70,48,53, +48,48,48,48,8,83,70,52,51,48,48,48,48,8,83,70,50,52,48,48,48,48,8,83,70,53, +49,48,48,48,48,8,83,70,53,50,48,48,48,48,8,83,70,51,57,48,48,48,48,8,83,70, +50,50,48,48,48,48,8,83,70,50,49,48,48,48,48,8,83,70,50,53,48,48,48,48,8,83, +70,53,48,48,48,48,48,8,83,70,52,57,48,48,48,48,8,83,70,51,56,48,48,48,48, +8,83,70,50,56,48,48,48,48,8,83,70,50,55,48,48,48,48,8,83,70,50,54,48,48,48, +48,8,83,70,51,54,48,48,48,48,8,83,70,51,55,48,48,48,48,8,83,70,52,50,48,48, +48,48,8,83,70,49,57,48,48,48,48,8,83,70,50,48,48,48,48,48,8,83,70,50,51,48, +48,48,48,8,83,70,52,55,48,48,48,48,8,83,70,52,56,48,48,48,48,8,83,70,52,49, +48,48,48,48,8,83,70,52,53,48,48,48,48,8,83,70,52,54,48,48,48,48,8,83,70,52, +48,48,48,48,48,8,83,70,53,52,48,48,48,48,8,83,70,53,51,48,48,48,48,8,83,70, +52,52,48,48,48,48,7,117,112,98,108,111,99,107,7,100,110,98,108,111,99,107, +5,98,108,111,99,107,7,108,102,98,108,111,99,107,7,114,116,98,108,111,99,107, +7,108,116,115,104,97,100,101,5,115,104,97,100,101,7,100,107,115,104,97,100, +101,9,102,105,108,108,101,100,98,111,120,6,72,50,50,48,55,51,6,72,49,56,53, +52,51,6,72,49,56,53,53,49,10,102,105,108,108,101,100,114,101,99,116,7,116, +114,105,97,103,117,112,7,116,114,105,97,103,114,116,7,116,114,105,97,103, +100,110,7,116,114,105,97,103,108,102,6,99,105,114,99,108,101,6,72,49,56,53, +51,51,9,105,110,118,98,117,108,108,101,116,9,105,110,118,99,105,114,99,108, +101,10,111,112,101,110,98,117,108,108,101,116,9,115,109,105,108,101,102,97, +99,101,12,105,110,118,115,109,105,108,101,102,97,99,101,3,115,117,110,6,102, +101,109,97,108,101,4,109,97,108,101,5,115,112,97,100,101,4,99,108,117,98, +5,104,101,97,114,116,7,100,105,97,109,111,110,100,11,109,117,115,105,99,97, +108,110,111,116,101,14,109,117,115,105,99,97,108,110,111,116,101,100,98,108, +7,117,110,105,70,66,48,49,7,117,110,105,70,66,48,50,7,117,110,105,70,48,48, +53,6,109,105,100,100,111,116,7,117,110,105,70,48,48,52,7,117,110,105,50,48, +55,52,7,117,110,105,50,48,55,53,7,117,110,105,50,48,55,55,7,117,110,105,50, +48,55,56,8,103,108,121,112,104,53,55,49,8,103,108,121,112,104,53,55,50,8, +103,108,121,112,104,53,55,51,8,103,108,121,112,104,53,55,52,8,103,108,121, +112,104,53,55,53,8,103,108,121,112,104,53,55,54,8,103,108,121,112,104,53, +55,55,8,103,108,121,112,104,53,55,56,8,103,108,121,112,104,53,55,57,8,103, +108,121,112,104,53,56,48,8,103,108,121,112,104,53,56,49,0,0,0,0,0,0,3,0,8, +0,2,0,17,0,1,255,255,0,3,0,1,0,0,0,14,0,0,0,24,0,0,0,0,0,2,0,1,0,1,2,155, +0,1,0,4,0,0,0,2,0,0,0,1,0,0,0,10,0,76,0,78,0,4,68,70,76,84,0,26,99,121,114, +108,0,36,103,114,101,107,0,46,108,97,116,110,0,56,0,4,0,0,0,0,255,255,0,0, +0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0, +0,0,0,0,1,0,0,0,10,0,84,0,98,0,4,68,70,76,84,0,26,99,121,114,108,0,38,103, +114,101,107,0,50,108,97,116,110,0,62,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0, +0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0, +0,0,1,107,101,114,110,0,8,0,0,0,1,0,0,0,1,0,4,0,2,0,0,0,1,0,8,0,1,15,112, +0,4,0,0,0,105,0,220,1,6,1,12,1,50,1,64,1,94,1,112,1,130,1,204,2,2,2,52,2, +114,2,124,2,138,2,148,2,138,2,158,2,196,2,202,3,28,3,38,3,84,3,118,3,144, +3,166,3,228,3,254,4,20,4,46,4,56,4,190,5,44,5,58,3,28,5,100,5,186,5,204,6, +22,6,28,6,82,6,136,5,186,6,178,6,216,6,230,5,186,7,16,5,186,5,186,5,186,7, +62,7,84,7,90,7,96,7,166,7,224,8,54,8,168,8,194,8,204,8,246,9,24,9,46,9,60, +9,98,9,144,9,242,10,48,10,174,11,72,11,106,11,136,11,146,11,156,11,166,11, +224,12,14,12,64,12,82,12,144,12,210,12,252,13,6,13,44,13,62,13,108,13,150, +13,160,13,174,13,208,13,242,14,4,14,46,14,112,14,142,14,180,14,198,14,212, +14,222,15,0,15,30,15,40,15,70,15,76,15,90,0,10,0,36,255,143,0,55,255,219, +0,60,255,219,1,82,255,143,1,91,255,143,1,94,255,143,1,101,255,143,1,109,255, +219,1,110,255,219,1,116,255,219,0,1,0,20,255,104,0,9,0,3,255,143,0,55,255, +104,0,57,255,104,0,58,255,180,0,60,255,104,0,89,255,219,0,90,255,219,0,92, +255,219,2,3,255,104,0,3,0,15,255,29,0,17,255,29,0,36,255,143,0,7,0,3,255, +180,0,55,255,104,0,57,255,104,0,58,255,104,0,60,255,104,0,92,255,180,2,3, +255,143,0,4,0,3,255,219,0,15,254,248,0,17,254,248,0,36,255,104,0,4,0,55,255, +219,0,57,255,219,0,58,255,219,0,60,255,219,0,18,0,3,255,219,0,15,255,29,0, +16,255,143,0,17,255,29,0,29,255,29,0,30,255,29,0,36,255,104,0,50,255,219, +0,68,255,29,0,70,255,29,0,72,255,29,0,76,255,180,0,82,255,29,0,85,255,180, +0,86,255,29,0,88,255,180,0,90,255,143,0,92,255,143,0,13,0,15,255,68,0,16, +255,143,0,17,255,68,0,29,255,180,0,30,255,180,0,36,255,104,0,68,255,104,0, +72,255,143,0,76,255,219,0,82,255,143,0,85,255,180,0,88,255,180,0,92,255,180, +0,12,0,15,255,143,0,16,255,219,0,17,255,143,0,29,255,219,0,30,255,219,0,36, +255,180,0,68,255,180,0,72,255,219,0,82,255,219,0,85,255,219,0,88,255,219, +0,92,255,238,0,15,0,3,255,219,0,15,254,248,0,16,255,68,0,17,254,248,0,29, +255,143,0,30,255,123,0,36,255,104,0,68,255,104,0,72,255,68,0,76,255,180,0, +82,255,68,0,83,255,104,0,84,255,68,0,88,255,143,0,89,255,143,0,2,0,73,255, +219,2,3,0,37,0,3,0,15,255,143,0,17,255,143,2,3,0,76,0,2,0,15,255,104,0,17, +255,104,0,2,0,15,255,143,0,17,255,143,0,9,1,98,255,213,1,105,255,213,1,109, +255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124,255,219,1,134,255, +219,1,144,255,219,0,1,1,110,255,190,0,20,1,90,0,170,1,91,255,104,1,94,255, +104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255,158, +1,119,255,104,1,120,255,180,1,122,255,70,1,128,255,104,1,130,255,180,1,131, +255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1, +149,255,70,0,2,1,110,255,209,1,116,255,209,0,11,0,3,255,143,1,98,255,213, +1,105,255,213,1,109,255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124, +255,219,1,134,255,219,1,144,255,219,2,3,255,104,0,8,0,15,255,31,0,17,255, +31,1,90,0,164,1,91,255,68,1,94,255,68,1,101,255,68,1,130,255,168,1,147,0, +88,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,137,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,219,1,101,255,219,1,110,255,190,1, +116,255,190,0,15,1,98,255,193,1,105,255,193,1,111,255,143,1,117,255,231,1, +122,255,231,1,125,255,231,1,127,255,231,1,129,255,231,1,135,255,231,1,136, +255,231,1,140,255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255, +231,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,104,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,213,1,101,255,219,1,110,255,190,1, +116,255,190,0,6,0,3,255,219,0,15,254,250,0,17,254,250,1,91,255,104,1,94,255, +104,1,101,255,104,0,2,1,137,255,158,1,141,255,158,0,33,0,3,255,219,0,15,255, +31,0,17,255,31,0,29,255,31,0,30,255,31,1,90,0,188,1,91,255,104,1,94,255,104, +1,98,255,219,1,101,255,104,1,105,255,219,1,111,255,219,1,114,255,219,1,117, +255,31,1,118,255,31,1,121,255,78,1,122,255,31,1,124,255,78,1,126,255,31,1, +128,255,106,1,130,255,180,1,133,255,106,1,134,255,143,1,136,255,31,1,140, +255,31,1,142,255,80,1,143,255,31,1,144,255,143,1,145,255,106,1,147,0,188, +1,148,255,78,1,149,255,31,1,150,255,78,0,27,0,3,255,219,0,15,254,250,0,16, +255,70,0,17,254,250,0,29,255,143,0,30,255,143,1,90,0,188,1,91,255,104,1,94, +255,104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255, +158,1,119,255,104,1,120,255,180,1,122,255,70,1,124,255,158,1,128,255,104, +1,130,255,180,1,131,255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143, +255,70,1,147,0,121,1,149,255,70,0,3,1,91,255,197,1,110,255,190,1,116,255, +190,0,10,1,117,255,178,1,122,255,178,1,125,255,178,1,129,255,217,1,136,255, +178,1,140,255,178,1,143,255,178,1,146,255,178,1,149,255,178,1,151,255,178, +0,21,0,3,255,219,1,90,0,170,1,91,255,104,1,94,255,104,1,98,255,141,1,101, +255,104,1,105,255,141,1,111,255,141,1,114,255,158,1,119,255,104,1,120,255, +180,1,122,255,70,1,128,255,104,1,130,255,180,1,131,255,104,1,133,255,104, +1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1,149,255,70,0,4,1,132, +255,217,1,137,255,227,1,141,255,227,1,144,255,201,0,18,1,117,255,119,1,119, +255,219,1,122,255,119,1,124,255,170,1,125,255,180,1,128,255,219,1,129,255, +158,1,130,255,219,1,131,255,219,1,134,255,170,1,136,255,119,1,137,255,170, +1,140,255,119,1,141,255,170,1,143,255,119,1,146,255,119,1,149,255,119,1,151, +255,119,0,1,1,132,255,217,0,13,1,117,255,231,1,122,255,231,1,125,255,231, +1,127,255,231,1,129,255,231,1,135,255,231,1,136,255,231,1,139,255,231,1,140, +255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255,231,0,13,1,117, +255,225,1,122,255,225,1,125,255,225,1,135,255,225,1,136,255,225,1,139,255, +209,1,140,255,225,1,142,255,207,1,143,255,219,1,146,255,225,1,149,255,225, +1,150,255,207,1,151,255,225,0,10,1,117,255,201,1,122,255,201,1,125,255,201, +1,127,255,201,1,135,255,201,1,136,255,201,1,139,255,201,1,140,255,201,1,143, +255,201,1,149,255,201,0,9,1,117,255,227,1,122,255,227,1,127,255,227,1,136, +255,227,1,139,255,227,1,140,255,227,1,143,255,227,1,146,255,227,1,151,255, +227,0,3,1,132,255,217,1,137,255,227,1,141,255,227,0,10,1,117,255,227,1,122, +255,227,1,125,255,227,1,127,255,227,1,136,255,227,1,139,255,227,1,140,255, +227,1,143,255,227,1,146,255,227,1,151,255,227,0,11,1,117,255,201,1,122,255, +201,1,125,255,201,1,127,255,201,1,136,255,201,1,139,255,201,1,140,255,201, +1,143,255,201,1,146,255,201,1,149,255,201,1,151,255,201,0,5,0,15,255,6,0, +17,255,6,0,108,255,119,0,123,255,119,1,255,255,211,0,1,2,3,255,96,0,1,2,3, +255,119,0,17,1,170,0,68,1,173,255,233,1,177,0,45,1,180,255,211,1,181,255, +233,1,183,255,211,1,184,255,96,1,185,255,166,1,186,255,188,1,189,255,96,1, +195,255,211,1,198,0,23,1,216,255,211,1,217,255,233,1,218,0,23,1,227,0,45, +2,3,255,141,0,14,1,166,255,211,1,173,255,233,1,180,255,233,1,183,255,233, +1,184,255,164,1,185,255,209,1,186,255,233,1,187,255,211,1,189,255,164,1,192, +255,188,1,195,255,233,1,197,255,233,1,209,255,233,1,217,255,211,0,21,1,166, +255,188,1,170,255,211,1,172,255,211,1,173,255,188,1,177,255,233,1,180,255, +188,1,183,255,188,1,184,255,119,1,185,255,188,1,186,255,188,1,187,255,166, +1,189,255,164,1,192,255,141,1,197,255,188,1,202,255,233,1,210,255,233,1,216, +255,188,1,217,255,233,1,219,255,233,1,221,255,188,1,229,255,233,0,28,0,15, +255,6,0,17,255,6,0,108,255,119,0,123,255,119,1,166,255,119,1,170,255,119, +1,173,255,211,1,177,255,141,1,178,255,209,1,180,255,141,1,183,255,164,1,197, +255,188,1,198,255,141,1,200,255,141,1,202,255,119,1,203,255,119,1,206,255, +141,1,209,255,141,1,210,255,141,1,211,255,141,1,212,255,119,1,214,255,141, +1,217,255,119,1,225,255,141,1,226,255,141,1,228,255,141,1,229,255,119,1,255, +255,211,0,6,1,185,0,23,1,186,255,211,1,189,255,186,1,205,0,68,1,212,0,23, +1,217,0,45,0,2,1,173,255,211,1,215,255,233,0,10,1,173,255,233,1,180,255,211, +1,183,255,233,1,184,0,23,1,185,0,45,1,192,0,45,1,198,0,23,1,203,255,231,1, +212,255,233,1,217,255,233,0,8,1,177,255,233,1,180,255,233,1,183,255,233,1, +184,255,211,1,185,255,233,1,186,255,233,1,189,255,211,1,197,255,233,0,5,1, +173,255,233,1,180,255,233,1,183,255,233,1,185,0,23,1,186,255,186,0,3,1,186, +255,233,1,199,0,23,1,217,0,23,0,9,1,186,255,233,1,189,255,233,1,198,0,23, +1,203,0,23,1,212,0,23,1,215,0,23,1,217,0,23,1,221,255,233,1,227,0,23,0,11, +1,166,255,211,1,170,255,211,1,172,255,211,1,177,255,233,1,185,255,211,1,187, +255,164,1,189,255,211,1,197,255,211,1,202,255,211,1,209,255,233,1,219,255, +233,0,24,0,15,254,125,0,17,254,125,0,29,255,211,0,30,255,211,0,123,255,141, +1,166,255,119,1,170,255,119,1,172,255,233,1,173,255,211,1,177,255,141,1,178, +255,233,1,180,255,211,1,183,255,233,1,184,255,164,1,185,255,211,1,186,255, +233,1,187,255,164,1,197,255,211,1,198,255,188,1,202,255,96,1,203,255,166, +1,212,255,166,1,227,255,211,1,229,255,188,0,15,1,166,255,211,1,170,255,211, +1,173,255,233,1,177,255,188,1,178,255,233,1,180,255,211,1,184,255,188,1,185, +255,188,1,187,255,141,1,189,255,188,1,192,255,186,1,195,255,233,1,198,0,23, +1,204,0,45,1,221,255,233,0,31,0,15,255,29,0,17,255,29,0,108,255,166,0,123, +255,166,1,166,255,188,1,170,255,188,1,172,0,23,1,173,255,233,1,177,255,211, +1,180,255,164,1,186,255,188,1,197,255,211,1,198,255,164,1,200,255,166,1,203, +255,141,1,206,255,166,1,208,255,166,1,209,255,164,1,210,255,166,1,212,255, +96,1,213,255,166,1,214,255,141,1,215,255,141,1,217,255,141,1,219,255,166, +1,223,255,166,1,225,255,166,1,226,255,166,1,228,255,166,1,229,255,141,1,255, +255,211,0,38,0,15,254,240,0,17,254,240,0,29,255,211,0,30,255,211,0,108,255, +166,0,123,255,164,1,166,255,119,1,170,255,164,1,173,255,211,1,177,255,188, +1,180,255,188,1,186,255,188,1,195,255,211,1,197,255,211,1,199,255,211,1,200, +255,141,1,201,255,164,1,202,255,96,1,203,255,119,1,204,255,188,1,205,255, +141,1,206,255,164,1,207,255,188,1,208,255,164,1,209,255,119,1,210,255,164, +1,211,255,164,1,212,255,119,1,213,255,164,1,214,255,164,1,215,255,119,1,219, +255,164,1,220,255,164,1,222,255,164,1,223,255,164,1,228,255,164,1,229,255, +119,1,255,255,233,0,8,1,166,255,211,1,170,255,188,1,177,255,188,1,184,255, +141,1,185,255,164,1,189,255,211,1,197,255,186,1,209,255,188,0,7,1,173,255, +211,1,180,255,188,1,183,255,188,1,186,255,188,1,195,255,186,1,212,255,233, +1,217,255,211,0,2,1,180,255,211,1,198,0,45,0,2,1,198,0,23,1,217,0,45,0,2, +1,197,255,188,2,3,255,119,0,14,1,166,255,211,1,170,255,211,1,172,255,188, +1,173,255,233,1,177,255,186,1,178,255,211,1,180,255,211,1,183,255,211,1,184, +255,51,1,187,255,164,1,189,255,96,1,195,255,233,1,197,255,164,2,3,255,96, +0,11,1,170,255,188,1,172,255,231,1,173,255,233,1,177,255,188,1,187,255,186, +1,197,255,211,1,202,255,188,1,204,0,23,1,209,255,188,1,210,255,233,1,229, +255,233,0,12,1,166,255,188,1,170,255,166,1,172,255,211,1,177,255,164,1,180, +255,233,1,183,255,233,1,184,255,141,1,187,255,164,1,189,255,188,1,202,255, +164,1,209,255,164,1,210,255,233,0,4,1,205,255,233,1,216,255,211,1,217,255, +233,1,221,255,211,0,15,1,198,255,209,1,202,255,164,1,203,255,233,1,204,255, +233,1,205,255,211,1,209,255,164,1,210,255,211,1,215,255,233,1,217,255,211, +1,218,255,233,1,219,255,188,1,221,255,188,1,224,255,188,1,227,255,233,1,229, +255,211,0,16,1,198,255,233,1,199,255,233,1,202,255,233,1,203,255,233,1,204, +255,233,1,205,255,233,1,209,255,209,1,210,255,233,1,212,255,233,1,215,255, +233,1,216,255,211,1,217,255,211,1,218,255,233,1,221,255,164,1,224,255,188, +1,229,255,233,0,10,0,15,255,6,0,17,255,6,1,198,255,211,1,202,255,164,1,203, +255,211,1,205,255,233,1,209,255,211,1,212,255,211,1,215,255,211,1,229,255, +233,0,2,1,224,255,211,1,227,0,23,0,9,1,199,255,233,1,202,255,211,1,204,255, +233,1,205,255,211,1,209,255,188,1,216,255,188,1,217,255,233,1,219,255,211, +1,221,255,188,0,4,1,199,0,23,1,217,0,23,1,221,255,233,1,224,0,45,0,11,1,199, +255,233,1,202,255,211,1,203,255,233,1,205,255,233,1,209,255,233,1,212,255, +233,1,215,255,233,1,217,255,233,1,218,255,233,1,221,255,188,1,224,255,211, +0,10,1,198,0,45,1,199,0,45,1,203,0,23,1,205,0,23,1,209,0,23,1,212,0,23,1, +215,0,23,1,216,0,23,1,217,0,23,1,227,0,23,0,2,1,212,0,23,1,221,255,211,0, +3,1,199,255,233,1,205,255,233,1,217,0,23,0,8,1,202,255,211,1,204,255,233, +1,205,255,233,1,209,255,211,1,216,255,211,1,217,255,233,1,219,255,233,1,221, +255,211,0,8,1,202,255,209,1,205,255,233,1,209,255,186,1,216,255,211,1,217, +255,233,1,219,255,233,1,221,255,211,1,229,255,233,0,4,1,204,0,23,1,212,0, +23,1,221,255,233,1,227,0,23,0,10,0,15,255,29,0,17,255,29,1,198,255,233,1, +202,255,188,1,203,255,233,1,204,0,68,1,209,255,211,1,212,255,233,1,215,255, +233,1,217,0,23,0,16,0,15,255,51,0,17,255,51,0,123,0,23,1,198,255,233,1,199, +0,23,1,202,255,188,1,203,255,233,1,204,0,23,1,209,255,211,1,210,255,233,1, +212,255,231,1,214,255,233,1,215,255,233,1,218,255,233,1,227,255,233,1,229, +255,233,0,7,1,199,255,233,1,202,255,211,1,209,255,211,1,216,255,211,1,217, +255,233,1,221,255,211,1,229,255,233,0,9,1,198,255,233,1,199,255,233,1,203, +255,233,1,205,255,233,1,212,255,233,1,215,255,233,1,216,255,233,1,218,255, +233,1,221,255,211,0,4,1,203,255,233,1,205,255,233,1,212,255,233,1,215,255, +233,0,3,1,203,255,233,1,212,255,233,1,217,0,23,0,2,1,216,255,96,1,221,255, +119,0,8,1,202,255,211,1,203,0,23,1,205,255,233,1,209,255,211,1,212,0,23,1, +216,255,211,1,219,255,233,1,229,255,233,0,7,1,202,255,211,1,204,255,233,1, +209,255,211,1,210,255,233,1,216,255,211,1,219,255,233,1,221,255,211,0,2,0, +15,255,51,0,17,255,51,0,7,0,15,255,6,0,17,255,6,0,29,255,211,0,30,255,211, +0,108,255,96,0,123,255,96,1,255,255,211,0,1,2,2,255,219,0,3,0,3,255,180,0, +86,255,219,2,3,255,219,0,5,1,153,255,96,1,162,255,96,1,184,255,96,1,189,255, +188,1,192,255,188,0,1,0,105,0,3,0,20,0,36,0,41,0,47,0,51,0,53,0,55,0,57,0, +58,0,60,0,73,0,85,0,89,0,90,0,92,1,82,1,87,1,88,1,89,1,91,1,93,1,94,1,98, +1,100,1,101,1,105,1,107,1,108,1,109,1,110,1,111,1,113,1,114,1,116,1,125,1, +127,1,129,1,131,1,132,1,135,1,136,1,137,1,138,1,141,1,143,1,144,1,146,1,149, +1,151,1,154,1,160,1,161,1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1, +176,1,177,1,178,1,180,1,182,1,183,1,184,1,185,1,186,1,187,1,188,1,191,1,192, +1,194,1,195,1,196,1,198,1,199,1,200,1,201,1,202,1,203,1,204,1,205,1,208,1, +209,1,210,1,212,1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,223,1,226,1,227, +1,228,1,242,1,244,2,2,2,3,2,8,0,0,0,1,0,0,0,0,199,254,176,223,0,0,0,0,191, +26,255,128,0,0,0,0,196,4,48,20,}; +#endif diff --git a/contrib/media/updf/generated/font_droid.h b/contrib/media/updf/generated/font_droid.h new file mode 100644 index 0000000000..ef0ee8ff57 --- /dev/null +++ b/contrib/media/updf/generated/font_droid.h @@ -0,0 +1,11257 @@ +#ifndef __STRICT_ANSI__ +#if defined(__linux__) || defined(__FreeBSD__) +#define HAVE_INCBIN +#endif +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_DroidSans[139280]; +asm(".globl pdf_font_DroidSans"); +asm(".balign 8"); +asm("pdf_font_DroidSans:"); +asm(".incbin \"fonts/droid/DroidSans.ttf\""); +#else +static const unsigned char pdf_font_DroidSans[139280] = { +0,1,0,0,0,19,1,0,0,4,0,48,70,70,84,77,75,29,224,116,0,2,31,244,0,0,0,28,71, +68,69,70,2,201,0,4,0,2,14,208,0,0,0,32,71,80,79,83,236,144,228,222,0,2,15, +64,0,0,16,180,71,83,85,66,147,60,130,75,0,2,14,240,0,0,0,80,79,83,47,50,247, +26,134,136,0,0,1,184,0,0,0,96,99,109,97,112,29,150,101,90,0,0,12,136,0,0, +6,242,99,118,116,32,65,244,67,234,0,0,29,92,0,0,2,20,102,112,103,109,115, +211,35,176,0,0,19,124,0,0,7,5,103,97,115,112,0,24,0,9,0,2,14,192,0,0,0,16, +103,108,121,102,155,28,79,66,0,0,36,172,0,1,184,160,104,101,97,100,248,253, +254,54,0,0,1,60,0,0,0,54,104,104,101,97,14,75,8,159,0,0,1,116,0,0,0,36,104, +109,116,120,38,164,8,117,0,0,2,24,0,0,10,112,107,101,114,110,174,170,185, +111,0,1,221,76,0,0,21,90,108,111,99,97,120,114,13,144,0,0,31,112,0,0,5,58, +109,97,120,112,7,1,7,208,0,0,1,152,0,0,0,32,110,97,109,101,35,87,171,194, +0,1,242,168,0,0,7,251,112,111,115,116,26,213,54,16,0,1,250,164,0,0,20,25, +112,114,101,112,122,200,94,246,0,0,26,132,0,0,2,213,0,1,0,0,0,1,5,30,235, +107,75,224,95,15,60,245,0,31,8,0,0,0,0,0,201,129,215,160,0,0,0,0,201,129, +215,160,254,96,253,147,8,103,7,72,0,0,0,8,0,2,0,0,0,0,0,0,0,1,0,0,7,62,254, +78,0,67,8,192,254,96,254,244,8,103,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,156, +0,1,0,0,2,156,1,82,0,84,0,140,0,5,0,2,0,16,0,47,0,90,0,0,3,158,5,192,0,3, +0,1,0,3,4,185,1,144,0,5,0,8,5,154,5,51,0,0,1,27,5,154,5,51,0,0,3,209,0,102, +2,18,8,5,2,11,6,4,2,2,2,2,2,4,160,0,2,175,80,0,120,251,0,0,0,0,0,0,0,0,49, +65,83,67,0,64,0,33,251,2,5,211,254,81,1,51,7,62,1,178,96,0,0,159,223,215, +0,0,4,58,5,129,0,0,0,32,0,2,2,236,0,68,0,0,0,0,2,170,0,0,2,57,0,0,2,57,0, +185,2,215,0,87,4,115,0,9,4,115,0,22,7,29,0,73,5,86,0,72,1,135,0,104,2,170, +0,127,2,170,0,12,3,29,0,33,4,172,0,100,2,57,0,184,2,170,0,91,2,57,0,187,2, +57,0,0,4,115,0,80,4,115,0,156,4,115,0,103,4,115,0,78,4,115,0,47,4,115,0,82, +4,115,0,104,4,115,0,105,4,115,0,89,4,115,0,96,2,57,0,187,2,57,0,184,4,172, +0,101,4,172,0,100,4,172,0,101,4,115,0,84,8,31,0,161,5,86,0,4,5,86,0,168,5, +199,0,104,5,199,0,168,5,86,0,168,4,227,0,168,6,57,0,103,5,199,0,168,2,57, +0,189,4,0,0,32,5,86,0,168,4,115,0,168,6,170,0,168,5,199,0,168,6,57,0,97,5, +86,0,168,6,57,0,97,5,199,0,168,5,86,0,93,4,227,0,46,5,199,0,158,5,86,0,9, +7,141,0,9,5,86,0,46,5,86,0,45,4,227,0,65,2,57,0,146,2,57,0,0,2,57,0,16,3, +193,0,10,4,115,255,225,2,170,0,106,4,115,0,87,4,115,0,132,4,0,0,87,4,115, +0,86,4,115,0,87,2,57,0,29,4,115,0,86,4,115,0,142,1,199,0,137,1,199,255,206, +4,0,0,138,1,199,0,138,6,170,0,136,4,115,0,136,4,115,0,86,4,115,0,132,4,115, +0,86,2,170,0,136,4,0,0,57,2,57,0,31,4,115,0,133,4,0,0,7,5,199,255,253,4,0, +0,23,4,0,0,5,4,0,0,49,2,172,0,34,2,20,0,183,2,172,0,34,4,172,0,92,2,170,0, +242,4,115,0,135,4,115,0,58,4,115,0,113,4,115,255,254,2,20,0,183,4,115,0,115, +2,170,0,45,5,229,0,31,2,246,0,26,4,115,0,83,4,172,0,100,5,229,0,31,4,107, +255,239,3,51,0,122,4,100,0,65,2,170,0,41,2,170,0,27,2,170,0,72,4,156,0,140, +4,76,0,80,2,57,0,187,2,170,0,119,2,170,0,80,2,236,0,27,4,115,0,83,6,172,0, +56,6,172,0,56,6,172,0,73,4,227,0,131,5,86,0,4,5,86,0,4,5,86,0,4,5,86,0,4, +5,86,0,4,5,86,0,4,8,0,0,24,5,199,0,104,5,86,0,168,5,86,0,168,5,86,0,168,5, +86,0,168,2,57,0,9,2,57,0,142,2,57,255,210,2,57,0,7,5,199,0,14,5,199,0,168, +6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,4,172,0,142,6,57,0,71,5, +199,0,158,5,199,0,158,5,199,0,158,5,199,0,158,5,86,0,45,5,86,0,168,4,227, +0,142,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,7, +29,0,66,4,0,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,2,57,0,10,2, +57,0,135,2,57,255,211,2,57,0,8,4,115,0,86,4,115,0,140,4,115,0,86,4,115,0, +86,4,115,0,86,4,115,0,86,4,115,0,86,4,100,0,65,4,227,0,44,4,115,0,139,4,115, +0,139,4,115,0,139,4,115,0,139,4,0,0,5,4,115,0,138,4,0,0,5,5,86,0,4,4,115, +0,87,5,86,0,4,4,115,0,87,5,86,0,4,4,115,0,87,5,199,0,104,4,0,0,87,5,199,0, +104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,168,4,235, +0,86,5,199,0,14,4,115,0,86,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5, +86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,6,57,0,103, +4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0, +86,5,199,0,168,4,115,0,142,5,199,0,14,4,115,0,10,2,57,255,184,2,57,255,184, +2,57,0,12,2,57,0,12,2,57,255,210,2,57,255,210,2,57,0,92,1,199,0,31,2,57,0, +189,2,57,0,194,5,225,0,170,3,141,0,137,4,0,0,32,1,199,255,153,5,86,0,168, +4,0,0,138,4,0,0,138,4,115,0,168,1,199,0,91,4,115,0,168,1,199,0,126,4,115, +0,168,2,85,0,138,4,115,0,168,2,172,0,138,4,115,0,20,1,199,0,16,5,199,0,168, +4,115,0,140,5,199,0,168,4,115,0,140,5,199,0,168,4,115,0,140,4,213,255,254, +5,201,0,165,4,115,0,140,6,57,0,97,4,115,0,86,6,57,0,97,4,115,0,86,6,57,0, +97,4,115,0,86,8,0,0,97,7,141,0,86,5,199,0,168,2,170,0,136,5,199,0,168,2,170, +0,129,5,199,0,168,2,170,0,56,5,86,0,93,4,0,0,57,5,86,0,93,4,0,0,57,5,86,0, +93,4,0,0,57,5,86,0,93,4,0,0,57,4,227,0,46,2,57,0,31,4,227,0,46,3,0,0,31,4, +227,0,46,2,57,0,31,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199, +0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0, +158,4,115,0,133,7,141,0,9,5,199,255,253,5,86,0,45,4,0,0,5,5,86,0,45,4,227, +0,65,4,0,0,49,4,227,0,65,4,0,0,49,4,227,0,65,4,0,0,49,1,199,0,138,4,115,0, +192,5,86,0,4,4,115,0,87,8,0,0,24,7,29,0,66,6,57,0,71,4,227,0,44,2,170,0,0, +2,170,0,0,2,170,0,51,2,170,255,221,2,170,0,156,2,170,0,51,2,170,0,80,2,170, +255,233,2,170,0,22,2,170,0,205,2,170,0,29,5,87,0,4,2,57,0,187,6,70,255,245, +6,180,255,242,3,18,255,232,6,50,255,187,6,216,0,65,6,5,255,187,1,199,255, +176,5,86,0,4,5,86,0,168,4,104,0,168,5,88,0,61,5,86,0,168,4,227,0,65,5,199, +0,168,6,57,0,97,2,57,0,189,5,86,0,168,5,88,0,10,6,170,0,168,5,199,0,168,5, +51,0,90,6,57,0,97,5,199,0,168,5,86,0,168,4,242,0,108,4,227,0,46,5,86,0,45, +6,98,0,117,5,86,0,46,6,175,0,145,5,251,0,87,2,57,0,7,5,86,0,45,4,160,0,86, +3,145,0,70,4,115,0,106,1,199,0,137,4,96,0,133,4,160,0,86,4,154,0,142,4,0, +0,7,4,116,0,86,3,145,0,70,3,135,0,86,4,115,0,106,4,115,0,106,1,199,0,137, +4,0,0,138,4,0,0,14,4,156,0,138,4,0,0,0,3,149,0,86,4,115,0,86,5,133,0,79,4, +141,0,132,3,219,0,86,4,240,0,86,3,41,0,29,4,96,0,133,5,48,0,85,4,51,0,21, +5,180,0,135,6,63,0,83,1,199,255,205,4,96,0,133,4,115,0,86,4,96,0,133,6,63, +0,83,5,87,0,168,6,235,0,46,4,85,0,168,5,192,0,104,5,86,0,93,2,57,0,189,2, +57,0,7,4,0,0,32,8,117,0,18,8,21,0,168,6,213,0,46,4,169,0,168,5,21,0,55,5, +192,0,168,5,86,0,4,5,64,0,168,5,86,0,168,4,85,0,168,5,107,0,15,5,86,0,168, +7,99,0,28,4,213,0,67,5,192,0,168,5,192,0,168,4,169,0,168,5,64,0,18,6,170, +0,168,5,199,0,168,6,57,0,97,5,192,0,166,5,86,0,168,5,199,0,104,4,227,0,46, +5,21,0,55,6,21,0,118,5,86,0,46,5,235,0,168,5,85,0,160,7,85,0,168,7,128,0, +168,6,85,0,46,7,21,0,168,5,64,0,168,5,192,0,105,8,21,0,168,5,199,0,96,4,115, +0,87,4,149,0,120,4,64,0,142,2,235,0,142,4,171,0,20,4,115,0,87,5,90,0,7,3, +171,0,49,4,120,0,142,4,120,0,142,3,128,0,138,4,171,0,11,5,128,0,142,4,107, +0,142,4,115,0,86,4,85,0,142,4,115,0,132,4,0,0,87,3,170,0,35,4,0,0,5,6,149, +0,86,4,0,0,23,4,149,0,142,4,43,0,122,6,107,0,142,6,149,0,142,5,0,0,45,5,192, +0,142,4,43,0,142,4,21,0,55,6,0,0,142,4,85,0,17,4,115,0,87,4,115,0,10,2,235, +0,142,4,21,0,87,4,0,0,57,1,199,0,137,2,57,255,248,1,199,255,206,7,64,0,11, +6,128,0,142,4,115,0,10,3,128,0,138,4,0,0,5,4,107,0,142,3,233,0,168,3,74,0, +142,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253, +5,86,0,45,4,0,0,5,4,115,0,0,8,0,0,0,8,0,0,0,4,107,255,225,1,199,0,127,1,199, +0,127,1,199,0,127,1,199,0,126,2,170,0,75,2,170,0,75,2,170,0,75,4,115,0,138, +4,115,0,136,2,205,0,81,8,0,1,22,8,0,0,55,1,128,0,85,2,213,0,85,2,170,0,88, +2,170,0,89,4,0,0,185,2,170,255,192,1,86,254,96,2,235,0,101,4,115,0,4,4,115, +0,58,8,192,0,158,4,115,0,16,7,21,0,69,2,150,0,19,8,149,0,188,8,0,0,188,6, +37,0,108,4,205,0,88,6,172,0,80,6,172,0,61,6,172,0,93,6,172,0,145,8,0,1,162, +4,0,1,16,8,0,1,162,4,0,1,16,8,0,1,162,4,0,1,16,4,0,1,16,3,244,0,56,4,229, +0,4,6,150,0,235,5,180,0,154,4,172,0,101,4,100,0,51,5,180,0,87,7,213,1,152, +5,192,1,22,2,49,255,158,4,100,0,56,4,100,0,65,4,171,0,100,4,100,0,63,4,100, +0,65,4,213,0,157,4,172,0,100,4,213,2,34,4,213,1,5,5,171,255,246,5,0,1,216, +5,171,2,141,5,171,255,246,5,171,2,141,5,171,255,246,5,171,2,141,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,1,217,5, +171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255,246, +5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171, +255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,0,0,5,171, +0,0,5,171,0,0,5,171,0,0,5,171,2,213,5,171,0,103,5,171,0,0,5,213,0,0,4,213, +0,123,4,213,0,6,2,214,0,109,2,214,0,109,8,0,0,0,7,235,1,158,7,235,1,145,7, +235,1,158,7,235,1,145,3,244,0,8,4,213,0,167,4,213,0,178,4,213,0,41,4,213, +0,41,2,214,0,115,8,43,1,177,8,107,1,209,7,85,1,70,6,0,1,218,6,0,1,81,4,64, +0,59,5,64,0,60,4,192,0,102,4,21,0,66,4,0,0,196,6,0,1,16,4,0,0,29,4,0,0,29, +2,170,0,119,2,170,0,243,2,170,0,127,2,170,0,14,2,170,0,53,2,170,0,43,2,170, +0,45,2,170,255,229,1,199,0,124,1,199,0,130,2,90,0,106,2,90,0,72,2,152,0,0, +2,152,0,0,2,135,0,45,2,160,255,233,3,47,0,32,2,72,255,232,0,0,0,3,0,0,0,3, +0,0,0,28,0,1,0,0,0,0,4,232,0,3,0,1,0,0,0,28,0,4,4,204,0,0,0,190,0,128,0,6, +0,62,0,126,1,127,1,146,1,255,2,199,2,201,2,221,3,126,3,138,3,140,3,161,3, +206,4,12,4,79,4,92,4,95,4,145,30,133,30,243,32,21,32,30,32,34,32,38,32,48, +32,51,32,58,32,60,32,62,32,68,32,127,32,164,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,94,33,149,33,168,34,2,34,6,34,15,34,18,34,21,34,26,34, +31,34,41,34,43,34,72,34,97,34,101,35,2,35,16,35,33,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,108,37,128,37,132,37,136,37, +140,37,147,37,161,37,172,37,178,37,186,37,188,37,196,37,203,37,207,37,217, +37,230,38,60,38,64,38,66,38,96,38,99,38,102,38,107,240,2,240,5,251,2,255, +255,0,0,0,32,0,160,1,146,1,250,2,198,2,201,2,216,3,126,3,132,3,140,3,142, +3,163,4,1,4,14,4,81,4,94,4,144,30,128,30,242,32,19,32,23,32,32,32,38,32,48, +32,50,32,57,32,60,32,62,32,68,32,127,32,163,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,91,33,144,33,168,34,2,34,6,34,15,34,17,34,21,34,25,34, +30,34,41,34,43,34,72,34,96,34,100,35,2,35,16,35,32,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,80,37,128,37,132,37,136,37,140, +37,144,37,160,37,170,37,178,37,186,37,188,37,196,37,202,37,207,37,216,37, +230,38,58,38,64,38,66,38,96,38,99,38,101,38,106,240,1,240,5,251,1,255,255, +255,227,0,0,255,174,255,71,254,129,254,128,254,114,252,160,253,204,253,203, +253,202,253,201,253,151,253,150,253,149,253,148,253,100,227,118,227,10,225, +235,225,234,225,233,225,230,225,221,225,220,225,215,225,214,225,213,225,208, +225,150,225,115,225,113,225,109,225,21,225,8,225,6,224,251,224,248,224,241, +224,197,224,148,224,130,224,41,224,38,224,30,224,29,223,255,0,0,224,19,224, +10,224,9,223,237,223,214,223,212,223,56,223,43,223,28,221,62,221,61,221,52, +221,49,221,46,221,43,221,40,221,33,221,26,221,19,221,12,220,249,220,230,220, +227,220,224,220,221,220,218,220,206,220,198,220,193,220,186,220,185,220,178, +220,173,220,170,220,162,220,150,220,67,220,64,220,63,220,34,220,32,220,31, +220,28,18,135,18,133,7,135,0,1,0,0,0,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,98,0,99,0,100,0,101,0, +102,0,103,0,104,0,105,0,106,0,107,0,108,0,109,0,16,0,110,0,111,0,112,0,113, +0,114,0,115,0,116,0,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0, +126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138, +0,139,0,140,0,141,0,142,0,143,0,144,0,145,0,146,0,147,0,148,0,149,0,150,0, +151,0,152,0,153,0,154,0,155,0,156,0,157,0,158,0,159,0,160,0,161,0,162,0,163, +0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,173,0,174,0,175,0, +176,0,177,0,178,0,179,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188, +0,189,0,190,0,191,0,192,0,193,0,194,0,195,0,196,0,197,0,198,0,199,0,200,0, +201,0,202,0,203,0,204,0,205,0,206,0,207,0,208,0,209,0,210,0,211,0,212,0,213, +0,214,0,215,0,216,0,217,0,218,0,219,0,220,0,221,0,222,0,223,0,224,0,225,0, +226,0,227,0,228,0,229,0,230,0,231,0,232,0,233,0,234,0,235,0,236,0,237,0,238, +0,239,0,240,0,241,0,242,0,243,0,244,0,245,0,246,0,247,0,248,0,249,0,250,0, +251,0,252,0,253,0,254,0,255,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10, +1,11,1,12,1,13,1,14,1,15,1,16,1,17,1,18,1,19,1,20,1,21,1,22,1,23,1,24,1,25, +1,26,1,27,1,28,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40, +1,41,1,42,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,0,119,2,48,0,6,2,10,0,0,0,0,1,0,0, +1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,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,0,0,0,0,0,1,0,0,0,0,0,3,0,4,0,5,0,6,0,7,0, +8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0, +23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37, +0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52, +0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67, +0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82, +0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97, +0,0,0,132,0,133,0,135,0,137,0,145,0,150,0,156,0,161,0,160,0,162,0,164,0,163, +0,165,0,167,0,169,0,168,0,170,0,171,0,173,0,172,0,174,0,175,0,177,0,179,0, +178,0,180,0,182,0,181,0,186,0,185,0,187,0,188,2,9,0,112,0,99,0,100,0,104, +2,11,0,118,0,159,0,110,0,106,2,29,0,116,0,105,2,54,0,134,0,152,2,49,0,113, +2,56,2,57,0,102,0,117,2,43,2,46,2,45,1,137,2,52,0,107,0,122,1,114,0,166,0, +184,0,127,0,98,0,109,2,48,1,64,2,53,2,44,0,108,0,123,2,12,0,3,0,128,0,131, +0,149,1,18,1,19,1,254,1,255,2,6,2,7,2,2,2,3,0,183,2,119,0,191,1,56,2,20,2, +25,2,16,2,17,2,136,2,137,2,10,0,119,2,4,2,8,2,13,0,130,0,138,0,129,0,139, +0,136,0,141,0,142,0,143,0,140,0,147,0,148,0,0,0,146,0,154,0,155,0,153,0,241, +1,71,1,78,0,111,1,74,1,75,1,76,0,120,1,79,1,77,1,72,0,0,64,69,89,88,85,84, +83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59, +58,57,56,55,54,53,49,48,47,46,45,44,40,39,38,37,36,35,34,33,31,24,20,17,16, +15,14,13,11,10,9,8,7,6,5,4,3,2,1,0,44,69,35,70,96,32,176,38,96,176,4,38,35, +72,72,45,44,69,35,70,35,97,32,176,38,97,176,4,38,35,72,72,45,44,69,35,70, +96,176,32,97,32,176,70,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,32,96, +32,176,38,97,176,32,97,176,4,38,35,72,72,45,44,69,35,70,96,176,64,97,32,176, +102,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,64,96,32,176,38,97,176, +64,97,176,4,38,35,72,72,45,44,1,16,32,60,0,60,45,44,32,69,35,32,176,205,68, +35,32,184,1,90,81,88,35,32,176,141,68,35,89,32,176,237,81,88,35,32,176,77, +68,35,89,32,176,4,38,81,88,35,32,176,13,68,35,89,33,33,45,44,32,32,69,24, +104,68,32,176,1,96,32,69,176,70,118,104,138,69,96,68,45,44,1,177,11,10,67, +35,67,101,10,45,44,0,177,10,11,67,35,67,11,45,44,0,176,40,35,112,177,1,40, +62,1,176,40,35,112,177,2,40,69,58,177,2,0,8,13,45,44,32,69,176,3,37,69,97, +100,176,80,81,88,69,68,27,33,33,89,45,44,73,176,14,35,68,45,44,32,69,176, +0,67,96,68,45,44,1,176,6,67,176,7,67,101,10,45,44,32,105,176,64,97,176,0, +139,32,177,44,192,138,140,184,16,0,98,96,43,12,100,35,100,97,92,88,176,3, +97,89,45,44,138,3,69,138,138,135,176,17,43,176,41,35,68,176,41,122,228,24, +45,44,69,101,176,44,35,68,69,176,43,35,68,45,44,75,82,88,69,68,27,33,33,89, +45,44,75,81,88,69,68,27,33,33,89,45,44,1,176,5,37,16,35,32,138,245,0,176, +1,96,35,237,236,45,44,1,176,5,37,16,35,32,138,245,0,176,1,97,35,237,236,45, +44,1,176,6,37,16,245,0,237,236,45,44,70,35,70,96,138,138,70,35,32,70,138, +96,138,97,184,255,128,98,35,32,16,35,138,177,12,12,138,112,69,96,32,176,0, +80,88,176,1,97,184,255,186,139,27,176,70,140,89,176,16,96,104,1,58,45,44, +32,69,176,3,37,70,82,75,176,19,81,91,88,176,2,37,70,32,104,97,176,3,37,176, +3,37,63,35,33,56,27,33,17,89,45,44,32,69,176,3,37,70,80,88,176,2,37,70,32, +104,97,176,3,37,176,3,37,63,35,33,56,27,33,17,89,45,44,0,176,7,67,176,6,67, +11,45,44,33,33,12,100,35,100,139,184,64,0,98,45,44,33,176,128,81,88,12,100, +35,100,139,184,32,0,98,27,178,0,64,47,43,89,176,2,96,45,44,33,176,192,81, +88,12,100,35,100,139,184,21,85,98,27,178,0,128,47,43,89,176,2,96,45,44,12, +100,35,100,139,184,64,0,98,96,35,33,45,44,75,83,88,138,176,4,37,73,100,35, +69,105,176,64,139,97,176,128,98,176,32,97,106,176,14,35,68,35,16,176,14,246, +27,33,35,138,18,17,32,57,47,89,45,44,75,83,88,32,176,3,37,73,100,105,32,176, +5,38,176,6,37,73,100,35,97,176,128,98,176,32,97,106,176,14,35,68,176,4,38, +16,176,14,246,138,16,176,14,35,68,176,14,246,176,14,35,68,176,14,237,27,138, +176,4,38,17,18,32,57,35,32,57,47,47,89,45,44,69,35,69,96,35,69,96,35,69,96, +35,118,104,24,176,128,98,32,45,44,176,72,43,45,44,32,69,176,0,84,88,176,64, +68,32,69,176,64,97,68,27,33,33,89,45,44,69,177,48,47,69,35,69,97,96,176,1, +96,105,68,45,44,75,81,88,176,47,35,112,176,20,35,66,27,33,33,89,45,44,75, +81,88,32,176,3,37,69,105,83,88,68,27,33,33,89,27,33,33,89,45,44,69,176,20, +67,176,0,96,99,176,1,96,105,68,45,44,176,47,69,68,45,44,69,35,32,69,138,96, +68,45,44,69,35,69,96,68,45,44,75,35,81,88,185,0,51,255,224,177,52,32,27,179, +51,0,52,0,89,68,68,45,44,176,22,67,88,176,3,38,69,138,88,100,102,176,31,96, +27,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,89,35,88,101,89,176,41, +35,68,35,16,176,41,224,27,33,33,33,33,33,89,45,44,176,2,67,84,88,75,83,35, +75,81,90,88,56,27,33,33,89,27,33,33,33,33,89,45,44,176,22,67,88,176,4,37, +69,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,35,88,27,101,89,176,41, +35,68,176,5,37,176,8,37,8,32,88,2,27,3,89,176,4,37,16,176,5,37,32,70,176, +4,37,35,66,60,176,4,37,176,7,37,8,176,7,37,16,176,6,37,32,70,176,4,37,176, +1,96,35,66,60,32,88,1,27,0,89,176,4,37,16,176,5,37,176,41,224,176,41,32,69, +101,68,176,7,37,16,176,6,37,176,41,224,176,5,37,176,8,37,8,32,88,2,27,3,89, +176,5,37,176,3,37,67,72,176,4,37,176,7,37,8,176,6,37,176,3,37,176,1,96,67, +72,27,33,89,33,33,33,33,33,33,33,45,44,2,176,4,37,32,32,70,176,4,37,35,66, +176,5,37,8,176,3,37,69,72,33,33,33,33,45,44,2,176,3,37,32,176,4,37,8,176, +2,37,67,72,33,33,33,45,44,69,35,32,69,24,32,176,0,80,32,88,35,101,35,89,35, +104,32,176,64,80,88,33,176,64,89,35,88,101,89,138,96,68,45,44,75,83,35,75, +81,90,88,32,69,138,96,68,27,33,33,89,45,44,75,84,88,32,69,138,96,68,27,33, +33,89,45,44,75,83,35,75,81,90,88,56,27,33,33,89,45,44,176,0,33,75,84,88,56, +27,33,33,89,45,44,176,2,67,84,88,176,70,43,27,33,33,33,33,89,45,44,176,2, +67,84,88,176,71,43,27,33,33,33,89,45,44,176,2,67,84,88,176,72,43,27,33,33, +33,33,89,45,44,176,2,67,84,88,176,73,43,27,33,33,33,89,45,44,32,138,8,35, +75,83,138,75,81,90,88,35,56,27,33,33,89,45,44,0,176,2,37,73,176,0,83,88,32, +176,64,56,17,27,33,89,45,44,1,70,35,70,96,35,70,97,35,32,16,32,70,138,97, +184,255,128,98,138,177,64,64,138,112,69,96,104,58,45,44,32,138,35,73,100, +138,35,83,88,60,27,33,89,45,44,75,82,88,125,27,122,89,45,44,176,18,0,75,1, +75,84,66,45,44,177,2,0,66,177,35,1,136,81,177,64,1,136,83,90,88,185,16,0, +0,32,136,84,88,178,2,1,2,67,96,66,89,177,36,1,136,81,88,185,32,0,0,64,136, +84,88,178,2,2,2,67,96,66,177,36,1,136,84,88,178,2,32,2,67,96,66,0,75,1,75, +82,88,178,2,8,2,67,96,66,89,27,185,64,0,0,128,136,84,88,178,2,4,2,67,96,66, +89,185,64,0,0,128,99,184,1,0,136,84,88,178,2,8,2,67,96,66,89,185,64,0,1,0, +99,184,2,0,136,84,88,178,2,16,2,67,96,66,89,185,64,0,2,0,99,184,4,0,136,84, +88,178,2,64,2,67,96,66,89,89,89,89,89,45,44,69,24,104,35,75,81,88,35,32,69, +32,100,176,64,80,88,124,89,104,138,96,89,68,45,44,176,0,22,176,2,37,176,2, +37,1,176,1,35,62,0,176,2,35,62,177,1,2,6,12,176,10,35,101,66,176,11,35,66, +1,176,1,35,63,0,176,2,35,63,177,1,2,6,12,176,6,35,101,66,176,7,35,66,176, +1,22,1,45,44,122,138,16,69,35,245,24,45,0,0,0,177,9,64,190,1,7,0,1,0,31,1, +7,0,1,0,159,1,4,64,142,1,192,253,1,175,253,1,0,253,1,10,79,251,1,32,251,1, +245,80,40,31,242,70,40,31,241,70,42,31,240,70,43,31,95,239,127,239,2,15,239, +79,239,95,239,143,239,175,239,5,11,229,228,30,31,227,226,70,31,15,226,1,64, +226,70,22,31,225,224,70,31,207,224,223,224,239,224,3,64,224,51,54,70,224, +70,24,31,221,61,223,85,222,61,3,85,223,1,3,85,220,3,255,31,15,213,31,213, +2,15,213,31,213,2,64,202,24,27,70,207,194,1,189,192,60,31,193,80,38,31,188, +190,40,31,255,185,1,80,184,112,184,128,184,3,184,255,192,64,255,184,18,50, +70,31,183,63,183,79,183,111,183,127,183,159,183,175,183,7,112,178,160,178, +176,178,3,15,178,1,144,181,1,176,181,1,15,181,1,8,15,179,63,179,239,179,3, +128,176,144,176,2,176,176,192,176,208,176,3,47,175,63,175,2,160,173,176,173, +2,192,173,208,173,2,47,172,63,172,2,159,171,1,192,170,208,170,2,79,169,143, +169,2,47,169,111,169,191,169,255,169,4,156,155,36,31,80,155,1,111,150,1,191, +150,1,150,70,29,31,149,148,23,31,127,148,143,148,255,148,3,48,145,64,145, +2,128,145,1,112,143,128,143,2,144,143,1,192,143,208,143,2,79,140,95,140,111, +140,3,134,70,255,31,159,133,1,132,131,49,31,116,115,63,31,115,80,38,31,111, +110,60,31,110,70,53,31,26,1,24,85,25,51,24,85,7,51,3,85,6,3,255,31,96,80, +38,31,95,80,38,31,92,70,49,31,91,90,72,31,90,70,49,31,19,50,18,85,5,1,3,85, +4,50,3,85,111,3,1,15,3,63,3,2,239,81,255,81,2,64,81,53,56,70,64,81,37,40, +70,207,64,84,80,1,73,70,32,31,72,70,53,31,71,70,53,31,175,70,1,223,70,239, +70,2,128,70,1,22,50,21,85,17,1,15,85,16,50,15,85,2,1,0,85,1,0,1,31,31,15, +63,15,95,15,127,15,4,15,15,47,15,79,15,111,15,143,15,223,15,255,15,7,63,15, +127,15,239,15,3,111,0,1,128,22,1,5,1,184,1,144,177,84,83,43,43,75,184,7,255, +82,75,176,7,80,91,176,1,136,176,37,83,176,1,136,176,64,81,90,176,6,136,176, +0,85,90,91,88,177,1,1,142,89,133,141,141,0,66,29,75,176,50,83,88,176,96,29, +89,75,176,100,83,88,176,64,29,89,75,176,128,83,88,176,16,29,177,22,0,66,89, +116,115,116,117,43,43,43,43,43,1,115,116,117,43,43,43,0,116,43,43,115,115, +117,43,43,43,1,43,43,43,0,43,43,43,43,43,43,1,43,43,0,43,43,1,43,115,43,0, +116,115,116,117,115,116,115,43,1,43,116,117,0,115,43,115,116,1,115,115,116, +0,115,116,116,115,116,115,1,94,115,115,116,115,115,0,115,43,115,115,1,43, +0,43,1,43,0,115,43,116,117,43,43,43,43,1,43,43,116,43,43,94,115,43,0,43,94, +115,116,1,43,43,43,0,43,115,115,94,115,115,115,1,115,115,115,24,94,0,0,0, +5,204,5,204,0,125,5,129,0,21,0,121,5,129,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +4,58,0,20,0,119,0,0,255,236,0,0,0,0,255,236,0,0,0,0,255,236,0,0,254,87,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,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,8,0,0,0,0,0,0,180,0,189,0,175,0,160,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0, +126,0,0,0,172,0,0,0,0,0,0,0,0,0,0,0,0,0,191,0,195,0,171,0,0,0,0,0,155,0,141, +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,185,0,170,0,0,0,0,0, +0,0,148,0,153,0,135,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,106, +0,131,0,141,0,164,0,180,0,0,0,0,0,0,0,0,0,0,0,96,0,106,0,121,0,152,0,172, +0,184,0,167,0,0,1,34,1,51,0,195,0,107,0,0,0,0,0,0,0,219,0,201,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,225,1,201,0,146,0,168,0,107,0,146,0,183, +0,107,0,155,0,0,2,123,2,242,0,146,2,82,0,110,2,215,3,129,0,130,0,137,0,160, +0,159,1,105,0,143,0,0,1,96,0,164,1,91,0,94,0,130,0,0,0,0,0,0,0,94,0,101,0, +111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,144,0,165,0,122,0,128,0,0,0,0,0,0, +0,0,0,0,5,129,255,243,0,13,252,167,0,131,0,137,0,143,0,150,0,105,0,113,0, +0,0,0,0,0,0,0,0,0,0,168,1,249,0,0,0,0,3,31,0,167,0,174,0,181,0,0,0,0,0,129, +0,0,0,0,0,0,0,0,7,72,3,106,2,182,2,2,253,147,0,0,0,145,0,103,0,145,0,97,1, +217,0,0,2,141,3,65,0,68,5,17,0,0,0,44,0,44,0,44,0,44,1,22,1,96,2,4,3,4,3, +230,4,240,5,14,5,84,5,158,5,246,6,50,6,114,6,144,6,178,6,218,7,80,7,150,8, +32,8,222,9,68,9,226,10,140,10,206,11,158,12,80,12,126,12,200,13,18,13,74, +13,146,14,20,15,100,16,22,16,172,17,64,17,160,17,222,18,40,18,202,19,22,19, +96,19,194,20,44,20,88,21,184,22,64,22,182,23,26,23,192,24,94,25,40,26,38, +26,146,27,42,29,162,30,254,32,64,32,148,32,190,32,242,33,28,34,172,34,202, +34,244,35,160,36,54,36,172,37,54,37,166,38,32,38,238,39,88,39,166,40,102, +41,0,41,68,42,246,43,100,43,212,44,112,45,20,45,98,46,16,46,114,46,230,48, +52,50,86,51,226,53,124,54,24,54,136,55,126,55,240,56,112,57,142,58,18,58, +196,59,100,59,234,60,238,62,28,62,144,63,134,64,72,64,168,64,210,65,178,65, +200,66,36,66,110,66,232,67,126,67,170,68,42,68,106,68,138,68,244,69,48,69, +166,70,14,70,48,70,90,70,124,71,8,71,32,71,56,71,80,71,104,71,130,71,154, +72,14,72,34,72,58,72,82,72,106,72,132,72,156,72,178,72,200,72,224,73,80,73, +104,73,128,73,152,73,176,73,200,73,226,74,68,74,252,75,20,75,44,75,68,75, +94,75,118,75,212,76,154,76,178,76,202,76,226,76,250,77,20,77,46,78,38,78, +58,78,82,78,106,78,130,78,156,78,180,78,202,78,224,78,248,79,172,79,196,79, +220,79,244,80,12,80,36,80,62,80,126,81,26,81,50,81,74,81,98,81,124,81,148, +82,24,82,50,82,74,82,98,82,122,82,146,82,166,82,186,82,210,82,234,83,2,83, +26,83,50,83,70,83,94,83,118,83,142,83,164,83,172,84,74,84,98,84,122,84,146, +84,170,84,194,84,214,84,234,84,254,85,22,85,46,85,70,85,94,85,118,85,142, +85,166,85,186,85,206,85,230,85,254,86,22,86,142,87,20,87,42,87,64,87,88,87, +110,87,132,87,154,87,172,87,192,87,216,88,170,88,182,88,210,88,234,89,228, +89,248,90,12,90,124,90,148,90,170,90,190,90,210,90,232,91,22,91,42,91,62, +91,150,91,224,91,248,92,16,92,36,92,56,92,80,92,104,92,116,93,20,93,164,93, +188,93,212,93,236,94,4,94,30,94,56,94,216,95,154,95,178,95,202,95,222,95, +242,96,10,96,34,96,58,96,82,96,106,96,130,96,150,96,170,96,194,96,218,96, +238,98,112,98,136,98,158,98,238,99,96,99,120,99,144,99,168,99,192,99,216, +99,240,100,10,100,36,100,62,100,88,100,122,100,142,100,166,100,190,100,214, +100,238,101,8,101,32,101,56,101,80,101,100,101,124,101,148,101,244,102,108, +103,104,103,140,103,164,103,188,103,212,103,236,104,34,104,88,104,142,104, +214,104,238,105,86,105,162,106,244,107,70,107,118,107,188,107,248,109,10, +109,50,109,112,109,172,109,206,112,188,112,236,114,22,114,30,114,38,114,82, +114,208,114,216,114,224,114,232,115,138,115,146,115,154,116,34,116,42,116, +50,116,116,116,124,116,182,116,190,117,56,117,64,117,72,117,234,117,242,118, +140,119,78,119,102,120,194,120,218,120,242,121,10,121,36,121,64,122,30,122, +212,123,118,124,16,124,186,125,114,125,218,126,124,127,28,127,136,128,94, +128,208,130,6,130,234,130,242,131,112,131,246,132,174,133,52,133,156,134, +4,134,138,135,74,135,188,136,108,136,134,136,160,136,184,136,208,136,232, +137,66,137,198,137,222,138,142,138,150,138,158,138,182,138,190,139,116,139, +224,140,78,140,102,140,126,140,198,140,206,141,66,141,74,141,82,141,224,141, +232,142,210,143,168,144,10,144,34,144,152,145,30,145,38,145,46,145,54,145, +108,145,116,145,124,145,132,146,12,146,156,146,164,146,226,147,78,147,158, +147,250,148,88,148,206,149,44,149,214,150,112,151,26,151,34,151,198,152,86, +152,130,152,254,153,6,153,250,154,160,155,34,155,58,155,200,156,80,157,2, +157,96,157,104,157,178,157,186,157,194,157,250,158,2,158,250,159,2,159,72, +159,160,159,242,160,86,160,184,161,28,161,134,162,24,162,150,163,6,163,32, +163,192,163,216,164,106,164,114,164,232,165,2,165,10,165,228,166,90,166,222, +166,246,167,14,167,100,167,148,167,194,167,218,167,242,168,10,168,34,168, +60,168,86,168,110,168,134,168,168,168,202,168,236,168,248,169,40,169,90,169, +140,169,188,170,18,170,114,170,208,171,12,171,102,171,172,171,238,174,134, +174,168,174,186,174,246,175,46,175,70,175,90,175,126,175,232,176,60,176,252, +178,100,179,50,180,4,180,178,181,136,182,32,182,224,183,78,183,128,183,178, +183,228,184,14,184,60,184,106,184,152,184,198,185,14,185,86,185,166,186,118, +187,22,187,70,187,184,187,214,188,72,188,226,188,250,189,52,190,108,191,92, +191,212,192,8,192,96,192,184,192,230,193,0,193,54,193,116,193,140,193,166, +193,200,193,234,194,12,194,46,194,84,194,122,194,160,194,198,194,248,195, +30,195,72,195,118,195,166,195,224,196,14,196,62,196,120,196,166,196,214,197, +16,197,62,197,110,197,168,197,220,198,18,198,86,198,138,198,194,199,8,199, +62,199,114,199,184,199,238,200,34,200,106,200,178,200,252,201,88,201,112, +201,136,201,160,201,184,201,208,203,232,205,196,207,132,207,146,207,178,207, +206,207,246,208,4,208,18,208,32,208,46,208,60,208,106,208,188,208,238,209, +32,209,114,209,180,210,100,210,228,211,148,212,14,212,166,213,6,213,140,213, +224,214,26,214,102,214,220,215,70,215,164,215,246,216,8,216,68,216,164,217, +34,217,88,218,12,218,74,218,114,218,160,218,200,218,242,219,40,219,94,219, +130,219,208,220,20,220,80,0,0,0,2,0,68,0,0,2,100,5,85,0,3,0,7,0,46,177,1, +0,47,60,178,7,4,8,237,50,177,6,5,220,60,178,3,2,8,237,50,0,177,3,0,47,60, +178,5,4,8,237,50,178,7,6,9,252,60,178,1,2,8,237,50,51,17,33,17,37,33,17,33, +68,2,32,254,36,1,152,254,104,5,85,250,171,68,4,205,0,0,0,2,0,185,0,0,1,127, +5,129,0,3,0,7,1,172,64,158,3,91,2,2,150,7,166,7,2,7,150,57,4,73,4,89,4,3, +4,64,23,27,72,6,4,1,11,4,38,9,1,201,9,217,9,2,118,9,166,9,2,25,9,41,9,2,6, +9,1,215,73,9,1,38,9,1,217,9,1,118,9,1,41,9,1,6,9,1,121,9,1,86,9,1,9,9,1,163, +169,9,1,130,9,1,84,9,100,9,116,9,3,137,9,1,98,9,114,9,2,68,9,84,9,2,34,9, +50,9,2,20,9,1,2,9,1,242,9,1,212,9,228,9,2,178,9,194,9,2,148,9,164,9,2,114, +9,130,9,2,84,9,100,9,2,66,9,1,20,9,36,9,52,9,3,2,9,1,110,9,184,255,128,64, +17,102,109,72,73,9,1,9,64,94,98,72,45,9,61,9,2,9,184,1,0,64,153,85,88,72, +9,128,81,84,72,125,9,141,9,157,9,3,95,9,111,9,2,9,128,71,75,72,9,192,67,70, +72,9,128,63,66,72,125,9,1,91,9,107,9,2,61,9,77,9,2,25,9,41,9,2,11,9,1,55, +235,9,251,9,2,205,9,221,9,2,171,9,187,9,2,9,64,45,48,72,59,9,75,9,91,9,3, +29,9,45,9,2,1,203,9,219,9,235,9,3,159,9,175,9,191,9,3,27,9,43,9,59,9,107, +9,123,9,5,15,9,1,2,127,9,143,9,159,9,191,9,207,9,5,64,9,96,9,2,15,9,31,9, +2,7,112,1,1,95,1,1,1,5,156,4,2,3,0,63,47,253,206,93,93,1,94,93,93,93,95,113, +113,113,113,95,114,114,43,114,114,114,94,93,93,93,93,93,43,43,43,113,113, +43,43,114,43,114,43,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +114,114,114,94,93,93,93,113,113,113,113,114,114,94,93,93,93,93,113,47,94, +93,43,93,237,113,51,47,237,49,48,1,35,3,51,3,53,51,21,1,103,148,24,196,198, +194,1,141,3,244,250,127,201,201,0,0,2,0,87,3,198,2,128,5,129,0,3,0,7,0,104, +64,33,48,3,1,128,3,1,3,16,2,32,2,96,2,112,2,128,2,5,96,2,112,2,2,80,2,96, +2,176,2,192,2,4,2,184,255,192,179,37,40,72,2,184,255,192,64,32,25,28,72,2, +48,7,1,128,7,1,7,111,6,127,6,143,6,3,47,6,63,6,2,6,5,32,0,1,0,6,2,3,0,63, +51,205,93,50,1,47,113,114,205,93,113,220,43,43,93,113,114,205,93,113,49,48, +1,35,3,51,1,35,3,51,2,106,142,20,184,254,121,141,21,184,3,198,1,187,254,69, +1,187,0,0,0,2,0,9,0,0,4,105,5,121,0,27,0,31,0,214,64,134,90,25,1,90,21,1, +68,14,1,68,19,1,54,19,1,68,30,1,38,30,54,30,2,68,23,1,38,23,54,23,2,3,16, +1,8,29,28,21,20,9,20,20,11,14,15,18,19,10,9,19,12,16,4,10,4,1,0,25,24,5,24, +24,27,3,3,7,30,31,22,23,6,23,5,6,4,7,8,11,4,12,13,1,14,29,30,4,13,0,15,28, +31,4,16,17,18,21,22,25,4,17,16,13,1,208,13,1,79,17,143,17,159,17,3,63,17, +79,17,2,13,17,13,17,5,20,23,24,3,19,3,6,9,10,3,5,0,47,23,51,63,23,51,18,57, +57,47,47,93,113,93,113,17,23,51,16,205,23,50,17,23,51,16,205,23,50,1,47,51, +51,135,192,192,192,192,1,23,51,16,135,192,192,192,192,1,47,23,51,135,192, +192,192,192,1,51,16,135,192,192,192,192,49,48,1,93,93,93,93,93,93,93,93,93, +93,1,3,33,21,33,3,35,19,33,3,35,19,35,53,51,19,35,53,33,19,51,3,33,19,51, +3,51,21,33,3,33,19,3,128,78,1,4,254,229,88,110,86,254,149,84,110,84,201,225, +78,252,1,18,89,110,88,1,107,88,110,88,211,253,64,80,1,106,78,3,117,254,143, +108,254,104,1,152,254,104,1,152,108,1,113,108,1,152,254,104,1,152,254,104, +108,254,143,1,113,0,3,0,22,255,114,4,82,5,236,0,48,0,59,0,70,1,46,64,92,154, +14,1,154,13,1,150,68,1,133,39,1,138,57,154,57,2,137,53,153,53,2,132,37,1, +118,6,134,6,150,6,3,70,63,86,63,134,63,3,52,38,100,38,116,38,3,37,2,1,25, +27,1,24,34,55,3,47,9,21,65,3,32,48,1,48,48,16,49,30,111,29,41,111,0,49,32, +49,2,0,49,32,49,48,49,80,49,112,49,5,8,3,49,184,255,192,179,29,35,72,49,184, +255,192,64,117,17,22,72,49,4,111,3,64,16,24,72,3,60,111,16,33,66,115,207, +54,1,157,54,1,5,136,54,1,120,10,216,10,2,199,34,215,34,2,182,34,1,135,34, +167,34,2,215,65,1,166,65,1,119,65,1,60,16,65,34,10,54,41,49,8,0,125,30,141, +30,2,26,30,1,30,24,22,64,19,23,72,22,15,21,47,21,63,21,95,21,4,21,55,9,115, +47,148,4,164,4,2,112,4,128,4,2,5,4,21,4,85,4,101,4,4,46,4,0,0,47,50,50,93, +93,93,205,237,50,47,93,205,43,51,51,93,93,18,23,57,93,93,93,93,93,93,93,93, +95,93,93,237,50,1,47,237,214,43,237,47,43,43,95,94,93,113,253,212,237,17, +18,57,47,114,23,51,205,23,50,49,48,93,0,93,93,93,93,93,93,1,93,93,93,0,93, +1,93,37,46,1,39,55,30,3,23,17,39,46,3,53,52,62,2,55,53,51,21,30,3,23,7,46, +1,39,17,30,5,21,20,14,2,7,21,35,1,52,46,2,39,17,62,3,1,20,30,2,23,17,14,3, +2,6,217,245,34,170,11,46,78,113,78,20,77,148,116,71,64,115,158,95,124,100, +145,102,66,20,174,20,122,117,59,114,103,88,64,36,56,114,175,119,124,1,160, +47,81,106,58,65,108,77,42,253,92,40,70,95,55,72,100,61,27,20,9,185,165,37, +53,87,64,39,5,1,240,5,18,50,83,128,98,84,124,83,44,4,131,131,5,45,80,115, +75,33,94,105,11,254,67,14,30,41,56,79,109,72,77,131,100,62,6,162,2,24,63, +80,51,32,15,254,44,4,31,56,81,2,197,54,74,50,33,14,1,165,4,33,52,68,0,0,0, +0,5,0,73,255,244,6,212,5,141,0,19,0,23,0,43,0,63,0,83,0,212,64,11,118,20, +134,20,2,121,22,137,22,2,42,184,255,232,64,14,8,12,72,37,24,8,12,72,32,24, +8,12,72,26,184,255,232,179,8,12,72,17,184,255,232,179,8,12,72,13,184,255, +232,64,18,8,12,72,7,24,8,12,72,3,24,8,12,72,22,23,20,21,21,184,255,240,64, +84,23,16,23,21,23,21,0,39,54,180,10,178,0,180,0,44,16,44,32,44,3,0,44,64, +44,2,0,44,16,44,32,44,80,44,96,44,112,44,224,44,240,44,8,44,64,180,29,178, +74,180,15,39,1,239,39,255,39,2,39,64,10,13,72,39,79,182,34,184,69,182,24, +4,22,3,21,18,49,182,15,184,59,182,5,19,0,63,237,244,237,63,63,63,237,244, +237,1,47,43,113,114,237,244,237,47,93,113,114,253,244,237,17,18,57,57,47, +47,56,56,17,51,17,51,49,48,0,43,43,43,43,43,43,43,43,1,93,93,1,20,14,2,35, +34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2, +53,52,62,2,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,6,212,51,87,116,66,66,115,85,49,48,86,117,68,66,115, +85,50,251,59,155,3,154,157,251,223,64,114,86,49,50,85,116,66,67,116,85,49, +49,86,118,4,250,22,43,63,40,42,64,44,22,23,43,63,41,39,63,44,24,251,240,22, +42,62,40,43,65,44,22,23,43,64,42,38,62,44,24,1,178,125,171,105,45,45,104, +171,126,133,174,103,41,41,103,174,253,201,5,129,12,41,102,172,131,126,172, +107,46,46,106,172,127,131,172,102,41,252,37,99,131,78,32,33,78,131,98,95, +128,79,34,34,79,128,2,124,98,130,78,32,33,78,130,97,95,130,79,34,34,79,130, +0,0,3,0,72,255,236,5,54,5,137,0,57,0,73,0,89,1,20,64,73,137,1,1,140,36,1, +123,42,139,42,2,98,82,114,82,130,82,3,102,71,1,127,78,1,91,78,1,73,43,89, +43,105,43,3,54,48,134,48,2,37,40,1,44,35,124,35,140,35,3,28,5,44,5,60,5,92, +5,4,10,10,26,10,42,10,3,10,2,26,2,42,2,3,31,184,255,232,64,56,9,13,72,10, +25,26,25,42,25,3,48,41,38,69,4,54,66,73,23,33,73,58,45,44,140,74,1,74,77, +18,3,23,3,58,44,80,23,1,3,44,1,23,58,44,44,58,23,3,13,15,54,1,175,54,1,54, +184,255,192,64,61,9,12,72,54,80,72,63,13,79,13,2,13,143,3,1,141,77,1,98,69, +114,69,2,54,69,70,69,2,3,74,48,41,77,44,38,18,69,9,8,63,81,144,28,1,192,28, +1,15,28,63,28,2,28,85,81,8,22,51,80,0,22,0,63,237,63,237,47,93,93,113,237, +18,23,57,93,93,93,93,1,47,93,237,47,43,93,113,18,23,57,47,47,47,0,93,1,93, +17,18,57,17,23,57,93,16,205,16,237,16,237,17,23,57,49,48,93,43,0,93,93,93, +93,1,93,93,93,0,93,93,93,93,1,93,0,93,93,5,34,38,39,14,3,35,34,46,2,53,52, +62,2,55,46,3,53,52,62,2,51,50,30,2,21,20,14,2,7,30,1,23,62,1,55,23,14,1,7, +30,1,51,50,54,55,21,14,1,1,52,46,2,35,34,6,21,20,22,23,62,3,3,46,1,39,14, +1,21,20,30,2,51,50,62,2,4,169,96,144,58,30,76,93,109,64,117,171,110,53,51, +91,126,75,18,29,22,12,40,85,133,93,73,123,90,50,66,112,148,83,62,146,85,61, +81,29,145,35,107,70,53,106,49,32,59,26,28,75,254,150,27,48,69,42,96,100,37, +28,65,116,86,50,74,89,164,66,113,123,35,72,109,73,44,79,68,55,12,66,61,26, +48,38,23,60,105,143,83,79,129,105,83,33,34,77,78,78,35,66,115,85,49,38,72, +106,68,75,117,92,75,33,114,201,97,90,199,121,43,139,227,103,54,44,7,9,135, +11,11,4,121,37,60,43,23,103,91,59,129,56,26,55,65,79,252,158,105,230,122, +48,148,105,55,95,71,41,19,30,38,0,0,1,0,104,3,198,1,32,5,129,0,3,0,33,64, +19,48,3,1,128,3,1,3,16,2,32,2,2,2,32,0,1,0,2,3,0,63,205,93,1,47,93,205,93, +113,49,48,1,35,3,51,1,10,141,21,184,3,198,1,187,0,1,0,127,254,88,2,158,5, +204,0,22,0,66,64,45,135,13,1,135,9,1,88,20,1,88,2,1,17,24,14,17,72,5,24,14, +17,72,16,6,16,16,6,128,6,2,6,11,242,0,0,16,0,32,0,3,0,16,27,5,0,0,63,63,1, +47,93,237,204,93,56,50,49,48,43,43,93,93,93,93,19,52,62,2,55,51,14,3,21,20, +30,2,23,35,46,3,53,127,42,90,140,97,174,94,137,88,43,43,88,137,94,174,97, +140,90,42,2,20,139,254,234,220,105,105,221,235,254,139,139,254,236,220,105, +105,220,234,253,140,0,0,0,1,0,12,254,88,2,43,5,204,0,22,0,72,64,13,136,13, +1,136,9,1,87,20,1,87,2,1,17,184,255,232,179,14,17,72,5,184,255,232,180,14, +17,72,16,6,184,255,240,64,16,31,6,143,6,2,6,0,242,143,11,1,11,16,0,5,27,0, +63,63,1,47,93,253,204,93,56,50,49,48,43,43,93,93,93,93,1,20,14,2,7,35,62, +3,53,52,46,2,39,51,30,3,21,2,43,42,90,140,97,174,94,137,88,43,43,88,137,94, +174,97,140,90,42,2,16,140,253,234,220,105,105,220,236,254,139,139,254,235, +221,105,105,220,234,254,139,0,0,0,0,1,0,33,2,178,2,253,5,129,0,14,0,107,64, +75,77,5,93,5,109,5,3,75,4,91,4,107,4,3,66,8,82,8,2,67,7,83,7,2,0,6,12,3,13, +95,4,1,15,4,1,4,3,32,2,48,2,2,2,14,47,10,63,10,2,10,9,8,191,13,207,13,2,16, +13,32,13,2,13,240,5,1,223,5,1,0,5,1,5,14,3,0,63,204,93,93,93,1,47,93,93,204, +51,204,93,221,204,93,51,204,113,114,18,23,57,49,48,93,93,93,93,1,37,23,5, +23,7,11,1,39,55,37,55,5,3,51,1,200,1,8,45,254,230,185,119,150,156,119,189, +254,232,45,1,11,12,136,4,90,103,132,73,250,72,1,2,255,0,72,248,73,134,107, +1,41,0,0,0,1,0,100,0,180,4,71,4,158,0,11,0,71,64,46,211,11,1,133,11,1,220, +4,1,138,4,1,9,1,170,6,16,2,32,2,2,2,217,2,1,56,2,136,2,2,2,0,4,173,9,214, +7,1,55,7,135,7,2,7,5,179,0,63,51,93,93,51,237,50,50,93,93,1,47,93,51,237, +50,49,48,93,93,93,93,1,17,35,17,33,53,33,17,51,17,33,21,2,159,147,254,88, +1,168,147,1,168,2,96,254,84,1,172,146,1,172,254,84,146,0,0,1,0,184,254,250, +1,129,0,219,0,12,0,78,185,0,4,255,224,183,11,17,72,10,151,0,150,7,184,255, +192,64,22,9,17,72,7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2, +12,184,255,192,64,14,38,41,72,12,64,13,16,72,12,7,168,0,155,11,0,47,253,228, +1,47,43,43,93,113,114,51,43,253,237,49,48,43,37,21,20,14,2,7,35,62,1,53,35, +53,1,129,9,20,29,20,123,45,49,88,219,168,53,87,75,66,32,65,132,65,219,0,0, +0,0,1,0,91,1,208,2,79,2,112,0,3,0,33,64,20,0,2,64,2,112,2,3,2,0,0,187,159, +1,207,1,2,47,1,1,1,0,47,93,113,237,1,47,47,93,49,48,19,53,33,21,91,1,244, +1,208,160,160,0,0,0,1,0,187,0,0,1,126,0,219,0,3,0,46,64,32,3,150,0,0,144, +0,2,64,0,80,0,176,0,224,0,240,0,5,144,0,160,0,2,0,64,13,16,72,0,1,155,0,0, +47,237,1,47,43,93,113,114,237,49,48,51,53,51,21,187,195,219,219,0,1,0,0,255, +236,2,57,5,204,0,3,0,51,64,26,121,0,137,0,2,1,24,13,17,72,41,2,1,2,16,0,2, +16,2,32,2,128,2,4,2,0,184,255,240,180,0,1,0,0,19,0,63,63,1,47,56,205,93,56, +49,48,93,43,93,21,1,51,1,1,155,158,254,105,20,5,224,250,32,0,0,2,0,80,255, +236,4,35,5,150,0,19,0,39,0,112,64,80,89,37,105,37,2,70,33,86,33,102,33,3, +86,27,102,27,2,89,23,105,23,2,4,18,1,118,17,134,17,2,121,13,137,13,2,11,12, +1,11,8,1,121,7,137,7,2,118,3,134,3,2,4,2,1,7,0,110,64,144,20,160,20,2,20, +41,128,30,110,63,10,1,10,25,115,15,7,35,115,5,25,0,63,237,63,237,1,47,93, +237,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93,93,93,93,93,1,20, +2,14,1,35,34,46,1,2,53,52,18,62,1,51,50,30,1,18,7,52,46,2,35,34,14,2,21,20, +30,2,51,50,62,2,4,35,77,133,180,102,103,178,131,75,75,132,180,106,101,177, +132,76,183,40,78,113,72,76,116,79,40,41,79,114,73,71,114,79,43,2,193,203, +254,235,171,74,74,170,1,21,204,213,1,23,166,67,67,166,254,233,213,168,223, +133,55,56,133,223,167,162,222,135,59,59,135,222,0,1,0,156,0,0,4,15,5,129, +0,10,0,94,64,32,32,9,128,9,2,9,9,8,110,2,144,4,1,4,47,1,143,1,2,1,1,4,6,3, +0,2,16,2,2,7,2,5,184,255,240,64,26,16,22,72,68,5,84,5,100,5,3,5,4,3,16,16, +22,72,4,3,6,6,8,1,116,0,24,0,63,237,50,63,51,51,43,47,51,93,43,1,47,94,93, +23,51,47,93,47,93,16,237,50,47,93,49,48,51,53,33,17,5,53,37,51,17,33,21,156, +1,103,254,194,1,77,166,1,87,153,4,60,227,170,229,251,24,153,0,0,0,1,0,103, +0,0,4,12,5,150,0,40,0,161,64,77,117,4,1,117,26,133,26,2,122,16,138,16,2,101, +37,1,86,37,1,41,33,89,33,105,33,3,105,35,1,28,35,1,25,21,1,117,27,133,27, +2,6,27,1,39,29,110,64,8,64,38,42,72,64,8,1,143,8,1,8,42,128,18,110,19,116, +38,132,38,2,19,38,16,0,32,0,2,0,184,255,192,64,31,30,38,72,0,8,38,142,18, +1,92,18,108,18,124,18,3,10,18,26,18,2,18,13,115,24,7,1,38,116,0,24,0,63,237, +57,63,237,51,93,93,93,18,57,1,47,43,93,51,51,93,47,237,26,16,220,93,113,43, +26,237,50,49,48,93,93,0,93,93,93,93,1,93,93,0,93,93,93,51,53,62,5,53,52,46, +2,35,34,14,2,7,39,62,3,51,50,30,2,21,20,14,6,7,33,21,103,51,147,162,159,128, +79,36,68,95,58,54,95,74,47,7,184,9,66,116,163,107,105,164,113,60,51,85,112, +122,124,109,86,24,2,223,127,117,179,145,124,124,136,86,60,91,62,31,30,60, +89,59,17,76,134,101,58,50,98,144,94,71,128,116,108,103,101,102,105,57,153, +0,0,0,0,1,0,78,255,236,4,25,5,150,0,59,0,216,64,149,122,3,138,3,2,117,2,133, +2,2,117,58,133,58,2,117,51,133,51,2,117,47,133,47,2,117,13,133,13,2,122,37, +138,37,2,91,17,107,17,2,26,41,1,21,8,1,118,46,134,46,2,7,46,1,73,39,1,38, +110,54,25,49,95,25,111,25,2,39,25,39,25,10,19,32,110,49,49,0,110,64,31,19, +47,19,159,19,3,144,19,1,19,61,128,11,110,239,10,1,63,10,1,10,54,25,116,26, +26,16,141,38,1,92,38,108,38,124,38,3,10,38,26,38,2,38,35,115,44,7,16,115, +129,11,1,83,11,99,11,115,11,3,20,11,1,5,11,1,11,5,25,0,63,51,93,93,93,93, +237,63,237,51,93,93,93,18,57,47,237,57,1,47,93,113,237,26,16,220,93,113,26, +237,50,47,237,17,18,57,57,47,47,93,17,18,57,237,113,49,48,0,93,93,93,93,1, +93,0,93,93,1,93,93,93,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,14, +2,7,21,30,3,4,25,63,121,179,115,131,179,116,58,9,186,8,43,74,108,74,136,155, +69,103,121,51,102,98,51,110,91,59,133,131,119,147,12,181,11,80,123,158,89, +118,170,108,51,34,72,111,78,85,126,82,41,1,133,97,152,105,55,65,107,137,73, +17,56,92,66,36,134,132,78,95,53,18,156,21,55,94,73,113,131,122,111,14,93, +138,91,45,59,101,136,77,62,108,86,62,16,4,9,59,88,112,0,0,2,0,47,0,0,4,55, +5,129,0,10,0,23,0,117,64,80,154,15,1,153,6,1,136,6,1,133,16,149,16,2,118, +16,1,24,22,1,118,22,134,22,150,22,3,22,5,64,12,21,72,5,91,10,107,10,123,10, +3,10,8,1,111,23,6,31,2,1,112,2,224,2,2,0,2,16,2,48,2,80,2,224,2,5,8,2,0,4, +115,8,22,22,1,11,6,6,1,24,0,63,63,51,18,57,47,51,237,50,1,47,94,93,113,114, +51,51,237,50,50,93,47,43,51,93,113,49,48,93,93,93,93,0,93,1,17,35,17,33,53, +1,51,17,51,21,1,14,3,7,1,14,3,7,33,3,113,170,253,104,2,133,189,198,254,144, +2,16,20,21,8,254,151,5,19,20,20,6,1,242,1,63,254,193,1,63,140,3,182,252,76, +142,3,119,5,29,36,37,12,253,236,8,26,27,26,7,0,1,0,82,255,236,4,29,5,129, +0,44,0,181,64,28,86,13,102,13,134,13,3,85,2,101,2,2,90,3,106,3,2,85,43,101, +43,2,85,42,101,42,2,38,184,255,216,64,89,14,17,72,21,8,1,6,10,1,25,36,153, +36,2,137,36,217,36,2,3,68,33,1,6,35,32,14,17,72,35,11,0,110,64,31,21,1,47, +21,159,21,2,144,21,1,21,46,128,36,31,37,110,33,32,32,11,110,208,10,1,63,10, +1,10,26,115,40,40,16,36,116,33,6,16,115,115,11,131,11,2,103,11,1,22,11,1, +11,5,25,0,63,51,93,93,93,237,63,237,18,57,47,237,1,47,93,113,237,51,47,51, +237,50,50,26,16,220,93,113,114,26,237,17,57,43,49,48,95,113,95,113,114,0, +93,1,93,0,43,93,1,93,0,93,1,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50, +62,2,53,52,46,2,35,34,14,2,7,35,19,33,21,33,3,62,1,51,50,30,2,4,29,64,126, +187,123,111,165,114,67,14,182,11,40,69,101,72,70,114,81,44,42,78,113,72,45, +76,65,53,23,176,47,3,33,253,131,27,48,144,99,105,168,118,64,1,203,106,176, +127,70,52,91,122,70,21,40,75,59,35,43,84,122,79,65,109,79,44,16,28,37,20, +2,246,153,254,65,37,53,64,117,162,0,0,0,0,2,0,104,255,236,4,25,5,150,0,36, +0,56,0,175,64,48,140,21,1,122,22,138,22,2,89,7,105,7,2,90,3,106,3,122,3,3, +84,2,100,2,2,84,35,100,35,116,35,3,84,34,100,34,116,34,3,53,30,69,30,2,133, +50,1,50,184,255,240,64,45,10,13,72,132,26,1,37,26,53,26,69,26,117,26,4,22, +26,1,21,111,20,20,0,110,64,47,37,159,37,2,144,37,1,37,58,128,47,29,110,16, +10,32,10,2,10,184,255,192,64,24,30,38,72,10,29,42,117,32,32,52,24,115,25, +21,153,21,2,21,15,7,52,115,5,25,0,63,237,63,51,93,237,18,57,47,237,50,1,47, +43,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,93,93,43,93,0,93, +93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,46,1,2,53,52,18,62,1,51,50,30,2, +23,7,46,1,35,34,14,2,21,62,1,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,25,59,115,170,111,123,184,122,61,69,130,187,118,72,126,103,78,23, +172,28,123,81,74,120,84,45,49,178,115,96,156,111,61,183,36,72,106,70,49,100, +81,51,40,75,106,66,65,103,72,38,1,205,106,177,127,71,94,177,1,1,164,188,1, +28,190,96,30,67,110,80,31,91,81,70,139,210,140,91,95,62,117,167,112,73,118, +83,45,29,65,106,76,78,135,100,58,45,85,122,0,0,1,0,105,0,0,4,12,5,129,0,14, +0,68,64,45,122,11,138,11,2,105,11,1,5,110,6,6,0,80,12,1,16,12,32,12,2,12, +11,95,0,1,0,0,32,0,64,0,96,0,128,0,5,0,0,12,116,13,6,5,24,0,63,63,237,50, +1,47,93,113,51,47,93,113,18,57,47,237,49,48,93,93,1,6,10,2,21,35,52,26,2, +55,33,53,33,4,12,106,178,128,71,188,80,136,180,101,253,11,3,163,4,239,162, +254,213,254,209,254,193,180,169,1,69,1,57,1,46,147,153,0,0,0,0,3,0,89,255, +236,4,26,5,150,0,41,0,61,0,81,0,191,64,132,117,40,133,40,2,117,33,133,33, +2,117,29,133,29,2,117,28,133,28,2,117,24,133,24,2,122,23,138,23,2,122,19, +138,19,2,122,12,1,122,8,138,8,2,122,7,138,7,2,122,3,138,3,2,117,2,133,2,2, +85,69,101,69,2,85,75,101,75,2,90,65,106,65,2,52,110,21,42,110,31,15,36,31, +79,21,1,21,31,21,31,10,0,110,64,15,62,31,62,2,31,62,47,62,159,62,3,144,62, +1,62,83,128,72,110,208,10,1,10,36,15,67,117,57,57,77,47,117,26,7,77,117,5, +25,0,63,237,63,237,18,57,47,237,57,57,1,47,113,237,26,16,220,93,113,114,26, +237,17,57,57,47,47,113,18,57,57,16,237,16,237,49,48,93,93,93,93,0,93,93,1, +93,93,93,93,0,93,93,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3, +53,52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,3,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,26,57,117,182, +124,124,181,119,57,47,79,101,54,59,93,63,33,57,112,166,109,115,169,111,54, +33,63,93,61,61,104,76,44,222,27,62,100,73,71,98,63,28,22,58,102,80,85,103, +55,17,35,28,68,115,86,79,111,69,32,32,70,114,81,82,112,68,29,1,137,90,151, +110,62,62,109,151,89,77,120,87,53,9,4,14,62,87,106,59,74,131,99,57,58,99, +132,74,58,106,87,61,12,4,10,53,87,120,2,76,53,88,63,35,35,63,88,53,42,88, +72,46,46,72,88,253,163,51,95,73,45,45,74,97,52,65,107,77,42,42,77,109,0,0, +0,2,0,96,255,236,4,18,5,150,0,36,0,56,0,190,64,105,169,39,1,163,11,1,149, +12,165,12,2,170,17,1,153,17,1,116,35,132,35,2,116,32,132,32,148,32,3,122, +31,138,31,154,31,3,122,27,138,27,154,27,3,123,26,139,26,155,26,3,90,40,106, +40,2,89,2,105,2,2,16,24,10,13,72,54,8,1,37,0,110,47,19,63,19,2,79,19,191, +19,2,0,19,32,19,48,19,64,19,176,19,5,7,19,58,11,111,10,10,47,110,32,29,1, +29,184,255,192,64,27,32,38,72,29,19,52,115,95,24,111,24,2,24,24,5,42,115, +34,7,14,115,23,11,1,11,5,25,0,63,51,93,237,63,237,17,57,47,93,237,50,1,47, +43,93,237,51,47,237,16,220,94,93,113,114,237,51,49,48,93,43,93,93,0,93,1, +93,93,0,93,93,1,93,93,0,93,93,1,93,1,20,2,14,1,35,34,46,2,39,55,30,1,51,50, +62,2,55,14,3,35,34,46,2,53,52,62,2,51,50,18,7,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,4,18,71,132,189,118,81,130,102,72,22,172,28,119,91,73,121,85, +48,2,21,73,93,108,55,96,155,108,59,63,120,175,111,235,242,196,37,73,107,70, +65,104,72,39,35,70,104,69,50,103,83,53,2,221,188,254,229,188,94,33,70,112, +79,27,91,85,69,138,208,140,47,74,51,27,69,124,175,107,109,176,123,66,254, +164,175,78,138,102,59,46,85,122,75,71,122,89,51,34,70,107,0,0,0,0,2,0,187, +0,0,1,126,4,58,0,3,0,7,0,54,64,36,3,7,150,0,0,4,144,4,2,64,4,80,4,224,4,240, +4,4,144,4,160,4,2,4,64,13,16,72,4,5,156,4,0,156,1,15,0,63,237,47,237,1,47, +43,93,113,114,51,237,50,49,48,19,53,51,21,3,53,51,21,187,195,195,195,3,107, +207,207,252,149,207,207,0,0,0,2,0,184,254,250,1,129,4,58,0,12,0,16,0,89,185, +0,4,255,224,64,10,11,17,72,16,10,151,0,150,13,7,184,255,192,64,22,9,17,72, +7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2,12,184,255,192,64, +18,38,41,72,12,64,13,16,72,12,13,156,14,15,7,168,0,156,11,0,47,253,228,63, +237,1,47,43,43,93,113,114,51,43,51,253,237,51,49,48,43,37,21,20,14,2,7,35, +62,1,53,35,53,17,53,51,21,1,129,9,20,29,20,123,45,49,88,195,207,156,53,87, +75,66,32,65,132,65,207,2,156,207,207,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106, +185,0,5,255,216,64,17,18,22,72,3,40,18,22,72,0,40,18,22,72,137,0,1,1,184, +255,216,64,51,18,22,72,134,1,1,6,0,2,32,2,80,2,112,2,4,2,32,0,1,0,63,6,127, +6,143,6,3,6,48,2,112,2,128,2,3,2,1,0,15,4,63,4,111,4,159,4,207,4,5,4,0,25, +47,93,51,51,205,93,205,93,1,24,47,93,47,93,51,49,48,0,93,43,93,43,43,43,19, +53,1,21,9,1,21,101,3,227,252,166,3,90,2,59,205,1,162,154,254,146,254,145, +153,0,0,0,0,2,0,100,1,88,4,71,3,236,0,3,0,7,0,70,64,49,7,64,2,96,2,2,0,2, +32,2,112,2,208,2,4,2,4,223,0,1,32,0,1,0,4,173,31,5,47,5,95,5,111,5,223,5, +5,5,0,173,80,1,208,1,2,15,1,1,1,0,47,93,93,237,222,93,237,1,47,93,93,51,47, +93,113,51,49,48,19,53,33,21,1,53,33,21,100,3,227,252,29,3,227,3,88,148,148, +254,0,148,148,0,0,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106,185,0,1,255,216, +64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137,6,1,5,184,255,216,64,51,18, +22,72,134,5,1,0,6,32,6,80,6,112,6,4,6,3,32,0,1,0,6,5,48,4,112,4,128,4,3,4, +63,0,127,0,143,0,3,0,15,2,63,2,111,2,159,2,207,2,5,2,0,25,47,93,205,93,205, +93,51,51,1,24,47,93,51,47,93,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21, +101,3,90,252,166,3,227,154,153,1,111,1,110,154,254,94,205,0,2,0,84,0,0,4, +39,5,150,0,37,0,41,0,137,64,68,117,36,133,36,2,117,35,133,35,2,90,26,106, +26,2,90,21,1,90,14,122,14,138,14,3,90,13,122,13,138,13,3,58,6,74,6,2,9,72, +10,10,176,41,192,41,2,41,150,38,38,19,27,70,28,0,70,0,19,32,19,64,19,144, +19,176,19,5,19,184,255,192,64,23,38,44,72,19,19,33,95,10,143,10,2,10,39,156, +38,76,27,1,27,24,95,33,4,0,63,237,51,93,47,253,198,93,17,57,1,47,43,93,237, +47,237,18,57,47,237,113,51,47,237,49,48,0,93,1,93,93,0,93,93,93,1,93,1,20, +14,6,7,35,62,7,53,52,46,2,35,34,6,7,39,62,3,51,50,30,2,1,53,51,21,4,39,37, +62,79,82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184, +11,67,121,179,122,114,178,123,64,253,143,195,4,8,71,108,85,67,60,58,68,83, +55,69,104,80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103, +148,251,157,201,201,0,0,0,0,2,0,161,254,229,7,110,5,204,0,93,0,114,1,101, +64,255,122,17,138,17,2,117,15,133,15,2,117,27,133,27,2,121,47,137,47,2,116, +38,132,38,2,102,38,1,99,70,1,86,69,102,69,2,123,26,139,26,2,73,26,1,74,56, +90,56,106,56,3,59,102,1,82,63,1,54,63,70,63,2,82,64,1,38,64,54,64,70,64,3, +131,3,1,37,3,53,3,69,3,3,37,2,53,2,69,2,133,2,4,25,8,57,8,2,11,8,1,11,8,27, +8,2,8,32,12,17,72,22,92,102,92,134,92,3,80,58,96,58,2,5,58,21,58,53,58,69, +58,4,137,57,1,93,57,1,10,57,26,57,2,9,7,1,125,52,141,52,2,11,52,75,52,2,10, +22,26,22,42,22,3,104,212,24,37,41,211,10,112,34,132,72,1,72,10,49,80,24,1, +80,24,1,24,10,24,10,82,0,210,64,95,49,111,49,2,143,49,159,49,2,49,116,128, +61,210,0,82,16,82,32,82,3,82,44,213,5,5,107,214,19,99,214,29,36,29,47,19, +63,19,79,19,3,32,29,48,29,64,29,3,19,29,19,29,77,54,214,89,0,149,71,1,71, +66,214,77,0,47,237,51,93,63,237,18,57,57,47,47,93,93,17,51,16,237,16,237, +51,47,237,1,47,93,237,26,16,220,93,113,26,237,18,57,57,47,47,93,114,17,18, +57,93,50,50,16,237,50,16,237,49,48,93,93,93,93,0,93,93,93,1,93,93,93,43,93, +0,93,93,1,93,93,93,0,93,93,1,93,93,0,93,93,1,93,93,0,93,93,1,93,93,93,0,93, +1,93,0,93,1,20,14,2,35,34,46,2,53,52,54,55,35,14,3,35,34,46,2,53,52,62,2, +51,50,30,2,23,51,55,51,3,14,1,21,20,22,51,50,62,2,53,52,46,2,35,34,14,4,21, +20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,62,2,36,51,50,4,22,18, +5,52,46,2,35,34,14,2,21,20,22,51,50,62,2,55,62,1,7,110,67,118,165,97,56,79, +50,22,2,1,6,24,69,93,117,71,84,125,81,40,71,132,185,114,60,96,73,54,18,6, +39,156,116,19,18,43,38,62,107,79,45,83,161,238,156,134,227,184,139,94,48, +86,165,243,158,105,182,152,120,44,55,50,135,166,196,111,190,254,217,203,105, +63,118,170,215,0,255,144,201,1,36,191,92,253,162,34,63,89,56,86,130,87,45, +95,99,69,120,96,70,18,9,14,2,243,144,239,172,96,27,47,64,38,15,43,12,45,89, +69,43,58,103,141,83,120,221,169,102,27,48,67,40,160,254,6,84,120,49,48,46, +81,142,192,112,129,222,162,92,64,116,161,192,219,115,141,238,171,96,33,48, +57,24,112,30,63,52,33,115,206,1,28,169,139,1,0,220,180,128,70,118,200,254, +248,155,50,84,60,33,85,138,173,87,120,136,62,102,132,71,36,80,0,0,0,0,2,0, +4,0,0,5,82,5,129,0,7,0,20,1,18,64,206,102,2,118,2,134,2,3,102,19,118,19,134, +19,3,105,1,121,1,137,1,3,105,20,121,20,137,20,3,115,6,131,6,2,101,6,1,124, +5,140,5,2,106,5,1,122,0,138,0,2,57,0,89,0,105,0,3,117,3,133,3,2,54,3,86,3, +102,3,3,90,4,1,72,4,1,85,7,1,71,7,1,19,2,3,1,20,0,21,6,37,6,53,6,3,6,6,1, +230,6,246,6,2,26,5,42,5,58,5,3,9,5,1,233,5,249,5,2,6,5,13,13,4,26,0,42,0, +58,0,3,9,0,1,233,0,249,0,2,0,16,7,32,7,48,7,3,32,7,1,7,7,22,21,3,37,3,53, +3,3,6,3,1,230,3,246,3,2,3,175,4,191,4,2,4,80,22,176,22,2,48,22,96,22,144, +22,192,22,240,22,5,47,22,1,1,2,95,20,19,19,118,13,1,13,5,3,4,0,18,0,63,50, +63,51,93,57,47,51,237,50,1,93,93,113,47,93,51,93,113,113,17,51,47,93,113, +51,93,113,113,18,57,61,47,51,51,93,113,113,93,113,113,18,57,57,18,57,57,49, +48,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,3,33,3,35,1,51,9,1, +46,3,39,14,3,7,3,33,4,143,161,253,126,162,198,2,63,217,2,54,253,174,16,29, +22,15,1,2,14,23,29,15,180,2,15,1,156,254,100,5,129,250,127,4,2,40,82,67,45, +5,5,46,68,82,40,254,49,0,3,0,168,0,0,4,234,5,129,0,22,0,33,0,46,0,155,64, +108,155,24,171,24,2,147,32,1,133,32,1,147,45,1,117,45,133,45,2,122,36,138, +36,154,36,3,5,11,21,11,37,11,3,6,2,22,2,38,2,3,171,18,1,159,18,1,107,18,123, +18,139,18,3,18,28,13,90,23,64,13,17,72,23,23,41,0,90,64,31,34,47,34,2,175, +34,1,34,48,128,28,41,90,0,6,16,6,64,6,3,7,6,18,40,95,127,28,1,28,28,41,27, +95,7,3,41,95,6,18,0,63,237,63,237,18,57,47,113,237,57,1,47,94,93,237,50,26, +16,220,93,113,26,237,18,57,47,43,237,17,57,93,93,93,49,48,93,93,0,93,93,93, +93,93,93,1,20,14,2,35,33,17,33,50,30,2,21,20,14,2,7,30,3,1,52,38,35,33,17, +33,50,62,2,19,52,46,2,35,33,17,33,50,62,2,4,234,84,142,188,104,253,196,2, +0,117,184,128,67,33,67,101,67,85,131,88,46,254,238,156,148,254,191,1,65,84, +116,72,32,81,49,92,129,80,254,156,1,115,73,123,89,50,1,141,107,151,95,44, +5,129,39,84,129,90,59,104,85,61,15,10,58,90,119,2,66,114,98,254,66,33,61, +86,253,190,67,94,60,28,254,4,24,60,100,0,1,0,104,255,236,5,121,5,150,0,39, +0,173,64,79,121,14,137,14,2,117,13,133,13,2,123,37,139,37,2,106,38,1,124, +36,140,36,2,106,36,1,106,28,1,85,7,1,90,3,1,42,29,106,29,2,134,23,1,42,23, +106,23,2,5,8,21,8,2,5,2,21,2,2,5,91,80,26,96,26,2,175,26,191,26,2,32,26,1, +15,26,1,26,34,16,184,255,192,64,42,7,13,72,16,16,41,32,41,1,79,35,1,35,35, +0,95,31,4,0,15,16,15,2,48,15,64,15,112,15,128,15,192,15,208,15,6,15,15,10, +95,21,19,0,63,237,51,47,93,113,63,237,51,47,93,1,93,17,51,47,43,51,47,93, +93,93,113,237,49,48,93,93,93,93,93,0,93,93,1,93,93,93,93,0,93,93,1,93,1,34, +14,2,21,20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,120,185,125,64,69,129,187,117,82,135,109,86,33,156,38,112, +151,191,118,171,254,255,173,86,91,175,1,0,164,225,1,46,71,181,20,68,102,137, +4,250,80,148,208,127,127,211,152,84,43,78,107,65,78,79,136,100,57,109,195, +1,12,159,165,1,10,187,101,176,173,60,50,91,70,42,0,2,0,168,0,0,5,101,5,129, +0,12,0,25,0,100,64,70,169,24,1,123,24,1,172,23,1,27,23,43,23,59,23,123,23, +4,169,16,1,27,16,43,16,59,16,123,16,4,123,15,1,153,3,1,121,2,1,0,90,64,47, +13,1,13,27,128,64,27,1,20,90,0,6,16,6,64,6,3,7,6,19,95,7,3,20,95,6,18,0,63, +237,63,237,1,47,94,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93, +93,93,93,1,20,2,14,1,35,33,17,33,50,4,22,18,7,52,46,2,35,33,17,33,50,62,2, +5,101,106,184,251,145,253,241,1,210,163,1,19,198,111,192,82,148,206,123,254, +241,1,58,111,189,138,78,2,207,176,254,243,181,93,5,129,81,169,254,252,180, +143,203,130,61,251,177,72,142,212,0,0,1,0,168,0,0,4,254,5,129,0,11,0,77,181, +7,3,7,3,0,10,184,255,192,64,37,7,11,72,10,10,13,5,9,90,0,0,16,0,64,0,3,7, +0,32,13,1,8,95,127,5,1,5,5,9,4,95,1,3,9,95,0,18,0,63,237,63,237,18,57,47, +113,237,1,93,47,94,93,237,50,17,51,47,43,18,57,57,47,47,49,48,51,17,33,21, +33,17,33,21,33,17,33,21,168,4,45,252,146,3,50,252,206,3,151,5,129,156,254, +60,154,254,21,156,0,0,1,0,168,0,0,4,145,5,129,0,9,0,105,185,0,2,255,192,182, +13,24,72,2,2,6,8,184,255,192,64,58,7,12,72,8,8,11,1,5,90,0,6,16,6,64,6,3, +7,6,48,11,1,4,95,239,1,1,15,1,63,1,111,1,127,1,159,1,175,1,207,1,223,1,8, +8,1,64,23,30,72,1,1,5,0,95,7,3,5,18,0,63,63,237,18,57,47,43,94,93,113,237, +1,93,47,94,93,237,50,17,51,47,43,18,57,47,43,49,48,1,17,33,21,33,17,35,17, +33,21,1,103,3,18,252,238,191,3,233,4,229,253,244,158,253,197,5,129,156,0, +1,0,103,255,236,5,160,5,150,0,45,0,185,64,130,134,43,1,106,43,1,66,37,82, +37,2,5,24,21,24,85,24,3,86,23,1,86,19,1,5,18,21,18,85,18,3,122,12,138,12, +2,89,12,105,12,2,106,3,1,106,2,1,73,37,89,37,2,53,29,1,123,13,139,13,2,64, +10,1,10,10,36,92,31,64,33,33,0,127,31,143,31,2,31,47,128,32,47,96,47,128, +47,3,21,91,175,0,191,0,2,32,0,1,15,0,1,0,33,95,240,34,1,34,34,5,26,95,41, +19,16,95,5,48,11,64,11,2,144,11,224,11,2,11,11,5,4,0,63,51,47,93,113,16,237, +63,237,17,57,47,93,237,1,47,93,93,93,237,93,26,16,204,93,17,57,47,26,16,237, +50,47,93,49,48,0,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,19,52,18,54, +36,51,50,30,2,23,7,46,3,35,34,14,2,21,20,30,2,51,50,62,2,55,53,33,53,33,17, +14,3,35,34,36,38,2,103,89,177,1,6,173,130,196,144,100,35,182,26,73,104,137, +88,128,189,124,61,66,130,193,127,83,140,113,86,29,254,91,2,85,47,127,158, +188,107,178,254,246,177,89,2,199,165,1,10,187,101,46,86,123,77,54,52,85,60, +33,80,148,208,127,127,211,153,85,28,45,55,28,254,160,254,26,48,87,66,38,109, +195,1,12,0,0,0,0,1,0,168,0,0,5,32,5,129,0,11,0,103,64,29,11,90,64,8,143,0, +159,0,175,0,223,0,4,0,13,128,64,13,1,64,13,192,13,208,13,224,13,4,13,184, +255,192,64,37,14,17,72,7,3,90,0,4,16,4,64,4,3,7,4,2,95,80,7,1,176,7,224,7, +2,15,7,1,8,7,7,9,5,3,4,0,18,0,63,50,63,51,57,47,94,93,93,113,237,1,47,94, +93,237,50,43,93,113,26,16,220,93,50,26,237,49,48,33,17,33,17,35,17,51,17, +33,17,51,17,4,97,253,6,191,191,2,250,191,2,141,253,115,5,129,253,172,2,84, +250,127,0,0,0,1,0,189,0,0,1,124,5,129,0,3,0,122,64,70,3,90,15,0,1,12,0,0, +1,61,16,0,32,0,208,0,3,96,0,112,0,2,0,0,16,0,64,0,80,0,176,0,5,7,0,175,5, +1,0,5,160,5,176,5,3,0,5,16,5,64,5,80,5,160,5,176,5,192,5,240,5,8,32,5,144, +5,240,5,3,5,184,255,192,179,56,61,72,5,184,255,192,179,45,48,72,5,184,255, +192,182,13,16,72,1,3,0,18,0,63,63,1,43,43,43,93,113,114,93,47,94,93,113,114, +94,93,94,93,237,49,48,51,17,51,17,189,191,5,129,250,127,0,0,0,1,0,32,255, +236,3,104,5,129,0,21,0,124,64,15,137,2,1,130,5,1,123,10,1,100,6,116,6,2,6, +184,255,224,64,66,14,17,72,0,14,32,14,2,128,14,144,14,224,14,240,14,4,14, +14,3,17,90,64,64,12,80,12,96,12,3,111,12,1,12,23,128,15,3,1,3,32,23,1,32, +23,64,23,80,23,96,23,4,14,95,15,3,9,95,0,64,4,1,4,4,0,19,0,63,50,47,93,16, +237,63,237,1,93,113,47,113,26,16,220,93,113,26,237,18,57,47,93,113,49,48, +0,43,1,93,93,93,0,93,5,34,38,39,55,30,3,51,50,54,53,17,33,53,33,17,20,14, +2,1,201,171,219,35,187,10,46,64,78,41,104,120,254,241,1,205,56,107,154,20, +178,192,31,65,93,60,28,143,138,3,69,156,252,35,101,162,115,62,0,1,0,168,0, +0,5,63,5,129,0,11,0,154,64,103,171,1,1,157,1,1,138,8,154,8,2,138,1,154,1, +170,1,3,102,2,1,131,7,147,7,2,100,7,1,157,0,173,0,2,107,0,123,0,139,0,3,89, +0,1,86,10,1,155,10,1,36,10,1,1,10,106,8,250,8,2,8,10,144,9,160,9,2,9,9,0, +11,16,0,11,1,11,11,13,7,2,3,90,0,4,16,4,64,4,3,7,4,7,10,1,2,4,4,8,5,3,0,4, +18,0,63,51,63,51,18,23,57,1,47,94,93,237,50,50,17,51,47,93,56,51,57,47,93, +57,51,113,17,51,49,48,0,93,93,1,93,93,93,93,0,93,93,93,1,93,93,0,93,93,33, +1,7,17,35,17,51,17,1,51,9,1,4,82,253,205,184,191,191,2,167,225,253,168,2, +168,2,168,140,253,228,5,129,253,62,2,194,253,156,252,227,0,0,0,0,1,0,168, +0,0,4,47,5,129,0,5,0,56,64,40,16,4,48,4,2,0,4,16,4,32,4,64,4,96,4,128,4,160, +4,240,4,8,4,3,90,0,0,16,0,64,0,3,7,0,1,3,3,95,0,18,0,63,237,63,1,47,94,93, +237,47,93,113,49,48,51,17,51,17,33,21,168,191,2,200,5,129,251,27,156,0,0, +0,0,1,0,168,0,0,6,2,5,129,0,44,2,44,64,12,152,41,1,151,31,1,12,16,18,24,72, +12,184,255,240,179,13,17,72,13,184,255,240,64,27,18,24,72,40,13,1,13,16,13, +17,72,42,32,33,37,72,42,32,18,28,72,42,32,9,17,72,30,184,255,224,179,33,37, +72,30,184,255,224,179,18,28,72,30,184,255,224,64,255,9,17,72,13,12,36,36, +27,44,92,42,36,0,52,0,2,212,0,1,139,0,155,0,2,4,0,1,8,0,46,139,46,1,116,46, +1,59,46,1,203,46,1,180,46,1,11,46,1,207,171,46,1,52,46,1,32,46,1,20,46,1, +0,46,1,244,46,1,208,46,1,196,46,1,176,46,1,116,46,132,46,164,46,3,96,46,1, +84,46,1,64,46,1,52,46,1,16,46,1,4,46,1,151,240,46,1,180,46,196,46,228,46, +3,160,46,1,116,46,148,46,2,80,46,1,68,46,1,48,46,1,4,46,36,46,2,244,46,1, +224,46,1,180,46,212,46,2,144,46,1,132,46,1,112,46,1,52,46,68,46,100,46,3, +32,46,1,20,46,1,244,46,1,208,46,1,116,46,132,46,164,46,196,46,4,96,46,1,52, +46,84,46,2,16,46,1,4,46,1,103,116,46,148,46,180,46,196,46,228,46,5,80,46, +1,4,46,36,46,68,46,3,20,46,52,46,68,46,100,46,132,46,180,46,212,46,244,46, +8,164,46,196,46,244,46,3,139,46,1,4,46,52,46,84,46,116,46,4,55,64,83,228, +46,1,203,46,1,36,46,68,46,116,46,148,46,180,46,5,11,46,1,212,46,244,46,2, +187,46,1,100,46,132,46,2,75,46,1,20,46,52,46,2,251,46,1,164,46,196,46,228, +46,3,128,46,1,2,64,46,80,46,112,46,3,63,46,1,0,46,32,46,2,30,27,92,0,28,64, +28,2,7,28,6,21,21,184,255,192,64,16,18,37,72,42,21,29,3,75,36,1,0,13,36,3, +28,18,0,63,23,51,93,63,51,51,43,17,51,1,47,94,93,237,50,93,93,93,95,93,93, +93,113,113,113,113,113,114,114,114,114,94,93,93,93,113,114,114,114,94,93, +93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,94,93, +93,93,113,113,113,16,220,94,93,93,93,113,50,237,18,57,61,47,51,51,49,48,43, +43,43,43,43,43,43,93,43,43,43,93,93,33,17,52,54,55,54,55,6,7,14,1,7,1,35, +1,46,3,39,38,39,22,23,30,1,21,17,35,17,51,1,30,3,23,62,3,55,1,51,17,5,86, +2,2,2,3,14,15,13,31,15,254,148,134,254,143,6,13,15,15,7,17,16,1,2,2,2,170, +251,1,119,7,20,18,15,3,3,16,21,20,8,1,112,245,3,172,51,106,44,51,48,51,50, +43,97,39,252,64,3,192,15,40,45,47,23,53,57,56,55,47,103,39,252,84,5,129,252, +47,20,63,66,59,16,16,60,66,62,20,3,209,250,127,0,0,0,0,1,0,168,0,0,5,32,5, +129,0,19,0,196,185,0,10,255,224,64,39,12,43,72,54,10,70,10,2,0,32,12,43,72, +41,0,57,0,73,0,3,11,16,29,33,72,11,32,18,28,72,150,11,166,11,2,41,11,1,1, +184,255,240,179,29,33,72,1,184,255,224,64,53,18,28,72,154,1,170,1,2,3,38, +1,1,19,92,0,68,16,84,16,148,16,3,224,16,1,2,0,16,48,16,64,16,112,16,192,16, +208,16,6,16,64,21,1,64,21,192,21,208,21,224,21,4,21,184,255,192,64,16,14, +17,72,10,7,92,0,8,16,8,64,8,3,7,8,1,184,255,192,64,16,29,43,72,17,1,9,3,11, +64,29,43,72,11,0,8,18,0,63,51,51,43,63,51,51,43,1,47,94,93,237,50,43,93,113, +47,93,95,93,113,51,237,49,48,0,93,95,93,43,43,93,93,43,43,1,93,43,93,43,33, +1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,4,58,253,14,2,3,2,3, +170,222,2,250,3,3,2,4,172,4,176,49,48,41,91,35,252,88,5,129,251,72,49,49, +42,99,45,3,156,250,127,0,0,0,0,2,0,97,255,236,5,215,5,150,0,19,0,39,0,108, +64,74,91,37,1,26,37,1,9,37,1,82,33,1,21,33,1,7,33,1,84,27,1,21,27,1,91,23, +1,25,23,1,102,17,1,104,12,1,0,91,64,15,20,1,20,41,128,32,41,128,41,2,30,91, +175,10,191,10,2,32,10,1,15,10,31,10,2,10,25,95,15,4,35,95,5,19,0,63,237,63, +237,1,47,93,93,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,215,95,180,254,252,165,174,254,250, +174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63,65, +127,189,123,132,191,123,59,2,199,165,254,242,192,104,109,195,1,12,159,165, +1,10,187,101,102,188,254,246,163,127,208,148,80,80,148,208,127,127,211,153, +85,86,153,212,0,2,0,168,0,0,4,234,5,129,0,14,0,23,0,117,64,83,169,2,1,147, +23,1,155,16,171,16,2,10,3,26,3,42,3,3,5,12,21,12,37,12,3,0,90,64,15,25,128, +64,25,1,64,25,1,20,7,90,0,8,16,8,64,8,3,8,6,95,31,20,47,20,79,20,95,20,127, +20,5,15,20,207,20,255,20,3,7,20,64,9,17,72,20,20,7,19,95,9,3,7,18,0,63,63, +237,18,57,47,43,94,93,113,237,1,47,93,237,50,93,113,26,16,220,26,237,49,48, +0,93,93,93,93,93,1,20,14,2,35,33,17,35,17,33,50,30,2,7,52,38,35,33,17,33, +50,54,4,234,61,121,182,121,254,98,191,2,81,125,186,124,62,192,164,164,254, +133,1,131,165,155,3,217,92,159,117,68,253,219,5,129,61,111,157,97,134,139, +253,212,146,0,0,0,2,0,97,254,125,5,215,5,150,0,36,0,56,0,162,64,113,108,20, +124,20,140,20,3,104,24,1,104,29,1,101,34,1,87,6,1,85,49,1,90,39,1,90,45,1, +108,19,124,19,140,19,3,26,19,90,19,2,26,40,90,40,2,21,44,85,44,2,26,54,90, +54,2,8,54,1,21,50,85,50,2,7,50,1,13,13,22,5,27,0,91,64,15,37,1,37,58,128, +47,91,175,27,191,27,2,32,27,1,15,27,31,27,2,27,32,58,128,58,2,42,95,32,4, +52,95,5,22,19,10,95,17,0,47,237,63,51,237,63,237,1,93,47,93,93,93,237,26, +16,220,113,26,237,17,57,57,50,47,49,48,93,93,93,93,93,93,0,93,93,93,93,93, +1,93,93,93,0,93,93,1,20,14,2,7,30,3,51,50,54,55,21,14,1,35,34,46,2,39,46, +2,2,53,52,18,54,36,51,50,4,22,18,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62, +2,5,215,77,145,211,134,21,53,68,83,51,28,64,23,38,91,49,86,128,97,70,27,158, +239,159,80,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63, +65,127,189,123,132,191,123,59,2,199,149,247,186,117,18,64,90,57,27,8,5,134, +9,13,51,95,138,87,8,115,193,1,3,152,165,1,10,187,101,102,188,254,246,163, +127,208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,0,0,2,0,168,0,0, +5,104,5,129,0,17,0,30,0,210,64,62,169,13,1,138,20,154,20,170,20,3,148,29, +1,117,29,133,29,2,174,0,1,157,0,1,124,0,140,0,2,74,0,90,0,106,0,3,3,160,1, +1,114,1,130,1,146,1,3,2,99,1,1,64,1,1,51,1,1,37,1,1,3,16,184,255,112,64,87, +17,73,112,16,128,16,144,16,3,84,16,100,16,2,66,16,1,2,35,16,51,16,2,1,16, +16,25,18,90,11,11,0,0,17,48,17,64,17,96,17,144,17,160,17,6,17,64,32,144,32, +160,32,3,25,3,90,0,4,16,4,64,4,3,7,4,16,2,95,47,25,95,25,111,25,143,25,4, +25,25,0,24,95,5,3,4,0,18,0,63,50,63,237,18,57,47,93,237,50,1,47,94,93,237, +50,93,47,93,51,57,47,237,18,57,17,51,49,48,93,95,93,93,93,43,95,93,93,93, +93,95,93,93,95,93,93,93,93,0,93,93,93,93,33,1,33,17,35,17,33,50,30,2,21,20, +14,2,7,1,3,52,46,2,35,33,17,33,50,62,2,4,140,254,146,254,73,191,2,151,120, +185,126,66,39,84,130,91,1,144,248,44,84,120,76,254,59,1,205,82,120,77,37, +2,73,253,183,5,129,55,104,150,94,67,130,108,78,16,253,161,3,236,64,94,63, +31,253,248,41,72,98,0,0,0,0,1,0,93,255,236,4,248,5,150,0,63,0,226,64,110, +150,62,1,68,62,1,166,59,1,134,54,1,132,49,1,151,40,1,169,33,1,11,33,27,33, +43,33,155,33,4,89,29,169,29,2,139,17,1,139,7,1,150,2,1,4,2,20,2,2,132,58, +1,96,54,1,105,21,1,118,17,1,42,90,41,41,0,90,64,176,19,1,19,65,128,9,90,8, +64,16,19,72,8,8,52,90,0,31,16,31,64,31,3,7,31,19,16,19,22,72,120,19,136,19, +152,19,3,59,19,1,52,184,255,240,64,47,19,22,72,119,52,135,52,151,52,3,58, +52,1,19,52,5,47,95,111,42,1,89,42,1,75,42,1,6,42,1,42,36,4,14,95,96,9,1,82, +9,1,68,9,1,9,5,19,0,63,51,93,93,93,237,63,51,93,93,93,93,237,18,57,57,93, +93,43,93,93,43,1,47,94,93,237,51,47,43,237,26,16,220,93,26,237,50,47,237, +49,48,0,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,20,14,2,35, +32,36,39,55,30,3,51,50,62,2,53,52,46,2,39,46,5,53,52,62,2,51,50,30,2,23,7, +46,3,35,34,14,2,21,20,30,2,23,30,5,4,248,69,144,219,150,254,249,254,218,40, +185,14,58,99,146,102,85,142,102,57,63,114,158,96,59,119,109,96,70,40,81,144, +196,114,131,186,128,77,23,188,14,53,86,123,83,98,133,81,35,63,108,142,80, +65,129,118,103,76,43,1,133,89,150,109,61,184,174,37,55,90,65,36,29,60,95, +66,69,86,56,38,22,13,31,43,58,81,107,70,100,143,92,42,41,82,121,80,33,51, +80,54,28,35,60,81,47,63,81,54,36,18,15,31,43,58,84,114,0,0,0,1,0,46,0,0,4, +180,5,129,0,7,1,212,64,255,9,9,1,201,9,217,9,249,9,3,187,9,1,73,9,89,9,121, +9,137,9,4,59,9,1,9,9,25,9,2,246,9,1,153,9,201,9,2,139,9,1,9,9,25,9,73,9,105, +9,4,199,217,9,233,9,2,203,9,1,182,9,1,41,9,89,9,105,9,137,9,153,9,5,27,9, +1,6,9,1,25,9,41,9,89,9,121,9,153,9,169,9,217,9,7,233,9,249,9,2,219,9,1,169, +9,1,150,9,1,57,9,105,9,2,45,9,1,1,11,9,1,151,107,9,123,9,139,9,171,9,187, +9,235,9,251,9,7,84,9,1,11,9,43,9,59,9,3,187,9,251,9,2,164,9,1,59,9,75,9,123, +9,3,36,9,1,139,9,155,9,187,9,203,9,251,9,5,127,9,1,2,79,9,95,9,2,48,9,1,15, +9,1,103,207,9,223,9,2,176,9,1,15,9,79,9,95,9,143,9,4,240,9,1,159,9,175,9, +207,9,223,9,4,112,9,1,95,9,1,64,9,1,31,9,1,31,9,63,9,95,9,111,9,159,9,223, +9,239,9,7,0,9,1,55,239,9,1,128,64,93,9,144,9,208,9,3,111,9,1,80,9,1,47,9, +1,0,9,1,208,9,1,175,9,1,144,9,1,111,9,127,9,2,16,9,32,9,64,9,80,9,4,255,9, +1,224,9,1,191,9,1,64,9,96,9,144,9,160,9,4,63,9,1,32,9,1,15,9,1,7,3,5,4,14, +1,90,2,64,2,7,14,112,7,160,7,176,7,3,32,7,128,7,2,7,184,255,192,64,15,23, +28,72,7,32,2,1,2,0,4,95,5,3,1,18,0,63,63,237,50,1,47,93,204,43,93,113,43, +1,26,24,16,77,253,228,50,95,94,93,93,93,93,93,93,93,113,113,113,113,113,114, +114,114,114,114,114,94,93,93,113,113,113,113,113,113,114,114,114,94,93,93, +93,95,93,93,113,113,113,113,114,114,114,94,93,95,93,93,93,93,93,93,113,114, +114,114,114,114,114,94,93,93,93,93,113,113,113,113,113,114,49,48,1,17,35, +17,33,53,33,21,2,208,190,254,28,4,134,4,229,251,27,4,229,156,156,0,0,0,0, +1,0,158,255,236,5,41,5,129,0,25,0,136,64,61,89,23,105,23,2,89,3,105,3,2,89, +2,105,2,2,69,16,1,69,10,1,21,90,64,64,18,80,18,160,18,3,48,18,144,18,240, +18,3,143,18,159,18,175,18,3,18,27,128,64,27,1,64,27,192,27,208,27,224,27, +4,27,184,255,192,64,36,14,17,72,8,90,79,5,95,5,111,5,3,143,5,159,5,2,207, +5,1,0,5,16,5,64,5,3,7,5,19,6,3,13,95,0,19,0,63,237,63,51,1,47,94,93,93,113, +114,237,43,93,113,26,16,220,93,113,114,26,237,49,48,0,93,93,93,93,93,5,34, +46,2,53,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,14,2,2,219,116,208,157, +92,191,57,102,139,83,82,146,110,63,190,93,160,215,20,62,131,201,138,3,129, +252,143,107,149,94,43,44,96,155,111,3,100,252,145,141,207,136,66,0,1,0,9, +0,0,5,77,5,129,0,16,0,235,64,181,74,14,90,14,106,14,3,69,4,85,4,101,4,3,140, +15,1,58,15,90,15,106,15,122,15,4,131,3,1,53,3,85,3,101,3,117,3,4,116,0,132, +0,2,9,0,1,140,1,1,123,1,1,6,1,1,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0, +37,0,53,0,3,6,0,1,230,0,246,0,2,1,0,9,9,2,26,15,42,15,58,15,3,3,8,15,1,232, +15,248,15,2,15,52,16,84,16,2,32,16,1,2,16,16,1,48,16,96,16,144,16,192,16, +240,16,5,16,21,3,37,3,53,3,3,6,3,1,230,3,246,3,2,3,175,2,191,2,2,2,32,18, +80,18,2,48,18,96,18,144,18,192,18,240,18,5,47,18,1,15,2,3,121,9,1,9,1,18, +0,63,51,93,63,51,1,93,93,113,47,93,51,93,113,113,47,93,113,95,113,113,51, +93,113,95,113,18,57,61,47,51,51,93,113,113,93,113,113,49,48,93,93,93,93,93, +93,93,93,93,93,93,33,35,1,51,1,30,1,23,22,23,54,55,62,1,55,1,51,3,14,198, +253,193,201,1,134,15,30,12,14,13,12,14,12,29,17,1,132,201,5,129,252,32,45, +89,35,41,39,37,41,35,88,48,3,224,0,0,1,0,9,0,0,7,134,5,129,0,46,4,87,64,73, +121,44,1,117,17,1,123,2,139,2,2,73,2,1,116,12,132,12,2,70,12,1,122,30,138, +30,2,73,30,89,30,105,30,3,117,31,133,31,2,71,31,87,31,103,31,3,142,45,1,91, +45,107,45,123,45,3,129,16,1,100,16,116,16,2,85,16,1,1,32,13,17,72,13,184, +255,224,64,255,13,17,72,131,0,1,117,0,1,68,0,84,0,100,0,3,54,0,1,140,14,1, +122,14,1,75,14,91,14,107,14,3,14,16,9,12,72,26,14,42,14,58,14,3,9,14,1,233, +14,249,14,2,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,14,13,22,26,30,42, +30,58,30,3,9,30,1,233,30,249,30,2,21,31,37,31,53,31,3,6,31,1,230,31,246,31, +2,31,30,7,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0,37,0,53,0,3,6,0,1,230, +0,246,0,2,1,0,39,123,39,1,116,22,132,22,2,22,7,39,39,7,22,3,15,26,45,42,45, +58,45,3,3,8,45,1,232,45,248,45,2,45,219,46,1,207,46,1,187,46,1,175,46,1,155, +46,1,143,46,1,123,46,1,111,46,1,91,46,1,79,46,1,2,79,46,143,46,175,46,3,46, +64,25,28,72,32,46,48,46,2,15,46,1,9,46,5,16,1,229,16,245,16,2,182,16,198, +16,214,16,3,3,16,8,15,56,15,120,15,136,15,152,15,184,15,6,12,15,64,64,255, +25,38,72,15,119,48,151,48,215,48,3,54,48,70,48,86,48,3,23,48,39,48,2,6,48, +1,55,48,103,48,119,48,167,48,183,48,199,48,231,48,247,48,8,38,48,1,7,48,23, +48,2,201,199,48,215,48,231,48,3,120,48,152,48,168,48,184,48,4,105,48,1,40, +48,56,48,88,48,3,25,48,1,7,48,1,232,48,1,217,48,1,168,48,200,48,2,153,48, +1,138,48,1,88,48,104,48,2,73,48,1,55,48,1,8,48,24,48,2,231,48,1,200,48,1, +167,48,1,8,48,24,48,40,48,72,48,136,48,5,153,199,48,1,88,48,104,48,136,48, +152,48,168,48,5,73,48,1,40,48,1,9,48,25,48,2,216,48,232,48,2,203,48,1,154, +48,170,48,186,48,3,139,48,1,48,192,124,127,72,57,48,1,42,48,1,25,48,1,10, +48,1,249,48,1,234,48,1,217,48,1,202,48,1,184,48,1,137,48,153,48,169,48,3, +120,48,1,105,48,1,58,48,74,48,90,48,3,41,48,1,26,48,1,12,48,1,104,253,48, +1,236,48,1,221,48,1,204,48,1,64,255,189,48,1,171,48,1,156,48,1,139,48,1,124, +48,1,107,48,1,92,48,1,75,48,1,60,48,1,43,48,1,28,48,1,11,48,1,252,48,1,235, +48,1,220,48,1,203,48,1,188,48,1,171,48,1,156,48,1,0,141,48,1,127,48,1,109, +48,1,95,48,1,77,48,1,47,48,63,48,2,29,48,1,15,48,1,253,48,1,239,48,1,221, +48,1,207,48,1,189,48,1,175,48,1,157,48,1,143,48,1,109,48,125,48,2,91,48,1, +77,48,1,59,48,1,45,48,1,27,48,1,13,48,1,56,251,48,1,237,48,1,219,48,1,205, +48,1,187,48,1,173,48,1,155,48,1,141,48,1,123,48,1,109,48,1,75,48,91,48,2, +57,48,1,43,48,1,25,48,1,11,48,1,249,48,1,235,48,1,221,48,1,203,48,1,189,48, +1,171,48,1,157,48,1,139,48,1,125,48,1,107,48,1,93,48,1,75,48,1,61,48,1,1, +43,48,1,31,48,1,2,95,48,127,48,159,48,191,48,223,48,255,48,6,0,48,1,8,68, +7,84,7,2,7,30,45,3,15,3,39,64,15,22,123,22,139,22,2,22,32,9,14,72,22,1,14, +18,0,63,51,51,43,93,17,51,63,23,51,93,1,94,93,93,95,113,113,95,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,113, +113,113,113,113,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,93,93,93,113,113,113,113,43,113,113,113,113,114,114,114,114,114,94,93, +93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93, +93,93,113,113,113,113,47,43,94,93,51,95,93,93,113,47,94,93,93,43,93,95,113, +113,113,113,113,113,113,113,113,113,51,93,113,95,113,18,23,57,61,47,47,47, +93,93,17,51,51,93,113,113,93,113,113,17,51,51,93,113,113,93,113,113,17,51, +51,93,113,113,93,113,113,49,48,43,93,93,93,93,93,93,93,43,43,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,33,35,3,46,1,39,38,39,6,7,14,1,7,3,35,1, +51,19,30,1,23,22,23,54,55,62,3,55,19,51,19,30,3,23,22,23,50,62,2,55,19,51, +5,231,228,244,11,25,10,12,12,13,12,11,24,11,246,228,254,97,199,253,17,31, +11,13,11,15,16,7,14,15,15,6,245,183,245,6,15,15,14,7,16,15,1,16,24,29,15, +249,199,3,127,38,104,47,55,57,58,55,48,102,38,252,129,5,129,252,129,63,124, +49,58,52,69,67,28,62,60,55,23,3,109,252,147,23,55,59,62,28,67,70,69,104,121, +52,3,127,0,0,1,0,46,0,0,5,43,5,129,0,11,2,119,64,255,92,4,1,73,4,1,59,4,1, +38,11,1,75,0,91,0,2,41,0,57,0,2,68,2,84,2,2,38,2,54,2,2,9,3,25,3,41,3,3,81, +10,1,69,10,1,51,10,1,6,10,22,10,2,93,8,1,76,8,1,43,8,59,8,2,9,8,25,8,2,82, +6,1,67,6,1,3,38,6,54,6,2,7,6,23,6,2,12,219,13,1,196,13,1,171,13,1,144,13, +1,132,13,1,96,13,1,84,13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13, +1,160,13,1,148,13,1,112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,204, +224,13,1,212,13,1,176,13,1,164,13,1,128,13,1,116,13,1,80,13,1,68,13,1,32, +13,1,20,13,1,36,13,84,13,132,13,180,13,228,13,5,4,13,52,13,100,13,148,13, +196,13,244,13,6,156,52,13,100,13,148,13,196,13,244,13,5,11,13,1,27,13,75, +13,123,13,171,13,219,13,5,139,13,187,13,235,13,3,4,13,20,13,52,13,68,13,4, +106,84,13,100,13,132,13,148,64,156,13,180,13,196,13,228,13,244,13,8,59,13, +1,36,13,1,11,13,1,244,13,1,219,13,1,196,13,1,171,13,1,148,13,1,123,13,1,100, +13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13,1,160,13,1,148,13,1, +112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,57,224,13,1,212,13,1,176, +13,1,164,13,1,128,13,1,20,13,68,13,116,13,3,36,13,84,13,132,13,180,13,228, +13,5,84,13,100,13,148,13,244,13,4,64,13,1,2,0,13,48,13,2,6,8,10,7,1,4,4,9, +5,9,5,9,3,0,11,16,192,11,240,11,2,11,184,255,192,64,16,26,30,72,175,11,1, +144,11,1,127,11,1,0,11,1,11,184,255,192,181,11,15,72,11,2,3,184,255,240,64, +41,16,3,32,3,2,224,3,240,3,2,31,3,175,3,191,3,207,3,4,3,114,7,1,52,7,68,7, +84,7,3,4,7,10,1,4,8,5,3,3,0,18,0,63,50,63,51,23,57,93,93,1,47,93,93,113,56, +51,47,43,93,93,93,93,43,93,56,51,18,57,57,47,47,18,23,57,50,51,93,95,93,93, +113,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113, +113,113,113,113,113,113,113,114,114,114,114,94,93,93,113,114,114,94,93,113, +114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,49,48,94,93,93,95,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,9,1,35,9,1,51,9,1,51,9,1, +4,88,254,89,254,80,211,2,24,254,17,211,1,136,1,125,211,254,30,2,11,2,104, +253,152,2,220,2,165,253,215,2,41,253,98,253,29,0,0,0,1,0,45,0,0,5,41,5,129, +0,8,2,83,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5,1,3,5,1,16,3,5,184,255,232, +64,255,12,15,72,5,4,14,2,1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8, +6,1,90,38,2,86,2,150,2,3,118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,10,169, +10,201,10,3,86,10,1,9,10,57,10,2,25,10,89,10,137,10,249,10,4,6,10,1,202,249, +10,1,230,10,1,9,10,25,10,185,10,201,10,4,198,10,1,89,10,121,10,169,10,3,54, +10,1,41,10,57,10,185,10,233,10,4,11,10,1,153,249,10,1,198,10,214,10,2,178, +10,1,164,10,1,150,10,1,130,10,1,116,10,1,86,10,102,10,2,66,10,1,36,10,52, +10,2,18,10,1,4,10,1,244,10,1,230,10,1,196,10,212,10,2,166,10,182,10,2,146, +10,1,132,10,1,118,10,1,98,10,1,84,10,1,54,10,70,10,2,36,10,1,22,10,1,4,10, +1,242,10,1,1,208,10,224,10,2,196,10,1,160,10,176,10,2,148,10,1,112,10,1,100, +10,1,64,10,1,20,10,36,10,52,10,3,0,10,1,105,228,10,244,10,2,208,10,64,182, +1,164,10,180,10,196,10,3,128,10,144,10,2,116,10,1,80,10,96,10,2,68,10,1,32, +10,1,4,10,20,10,2,244,10,1,224,10,1,196,10,212,10,2,176,10,1,84,10,100,10, +116,10,148,10,164,10,5,48,10,64,10,2,36,10,1,0,10,1,196,10,244,10,2,144,10, +1,4,10,20,10,36,10,68,10,84,10,116,10,132,10,7,57,224,10,1,132,10,164,10, +212,10,3,112,10,1,4,10,36,10,52,10,84,10,100,10,5,228,10,244,10,2,192,10, +1,180,10,1,144,10,1,4,10,20,10,52,10,84,10,132,10,5,212,10,228,10,2,187,10, +1,164,10,1,112,10,1,2,48,10,96,10,2,15,10,47,10,2,0,3,59,3,75,3,123,3,3,3, +1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,1,93,93,95,93,93,93,93,113,113,113, +113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113,113,114,114, +114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,95,93,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,113,113,113,114,114,114,94,93,93,113,113,113,47,94,93, +93,93,113,253,57,206,94,93,93,50,43,1,24,16,77,230,50,49,48,43,95,94,93,93, +43,93,93,1,17,35,17,1,51,9,1,51,3,9,190,253,226,210,1,173,1,171,210,2,72, +253,184,2,72,3,57,253,97,2,159,0,0,0,0,1,0,65,0,0,4,163,5,129,0,9,0,122,64, +35,100,4,116,4,132,4,3,109,3,125,3,141,3,3,91,3,1,41,3,57,3,73,3,3,114,8, +130,8,2,84,8,100,8,2,8,184,255,240,64,9,10,13,72,9,3,16,7,1,7,184,255,192, +64,18,12,17,72,7,8,4,15,2,31,2,2,2,64,12,15,72,2,11,184,255,192,64,14,13, +17,72,7,3,4,95,5,3,2,8,95,1,18,0,63,237,50,63,237,50,50,1,43,47,43,93,51, +51,47,43,93,51,51,49,48,43,93,93,93,93,93,93,41,1,53,1,33,53,33,21,1,33,4, +163,251,158,3,90,252,239,3,234,252,166,3,137,143,4,86,156,139,251,166,0,0, +1,0,146,254,87,2,41,5,204,0,7,0,49,64,30,7,48,2,1,224,2,1,2,4,241,63,1,1, +143,1,191,1,2,32,1,1,1,4,245,1,0,5,245,0,27,0,63,237,63,237,1,47,93,93,113, +237,205,93,113,50,49,48,19,17,33,21,35,17,51,21,146,1,151,233,233,254,87, +7,117,129,249,141,129,0,1,0,0,255,236,2,57,5,204,0,3,0,71,64,40,120,1,136, +1,2,0,24,13,17,72,9,3,25,3,73,3,3,70,2,1,10,2,26,2,42,2,3,3,16,0,3,16,3,32, +3,128,3,4,3,1,184,255,240,183,143,1,1,1,1,0,0,19,0,63,63,1,47,93,56,205,93, +56,49,48,93,93,93,43,93,5,1,51,1,1,151,254,105,158,1,155,20,5,224,250,32, +0,0,0,0,1,0,16,254,87,1,167,5,204,0,7,0,49,64,31,4,63,0,1,239,0,1,0,7,241, +64,2,80,2,2,192,2,208,2,224,2,3,2,4,245,5,0,1,245,0,27,0,63,237,63,237,1, +47,93,113,253,205,93,113,50,49,48,19,53,51,17,35,53,33,17,16,233,233,1,151, +254,87,129,6,115,129,248,139,0,1,0,10,2,161,3,183,5,129,0,6,2,243,181,0,24, +18,22,72,2,184,255,232,179,18,22,72,5,184,255,232,64,47,18,22,72,118,5,134, +5,2,4,24,18,22,72,121,4,137,4,2,3,54,6,70,6,2,102,6,118,6,134,6,230,6,4,6, +6,22,6,38,6,70,6,86,6,102,6,6,6,184,255,192,179,48,65,72,6,184,255,192,64, +57,18,22,72,6,5,4,57,3,73,3,2,105,3,121,3,137,3,3,9,3,25,3,41,3,89,3,105, +3,5,9,3,64,18,22,72,3,6,1,22,1,134,1,3,57,38,1,54,1,70,1,246,1,4,230,1,1, +1,184,255,192,182,60,63,72,153,1,1,1,184,255,224,64,255,30,33,72,56,1,72, +1,2,39,1,1,22,1,1,183,1,199,1,2,6,1,70,1,86,1,102,1,150,1,166,1,6,9,1,6,8, +1,246,8,1,164,8,1,121,8,1,6,8,1,246,8,1,201,8,217,8,2,187,8,1,9,8,25,8,41, +8,169,8,4,201,201,8,217,8,2,54,8,118,8,134,8,150,8,4,153,8,233,8,2,102,8, +118,8,2,9,8,25,8,57,8,3,198,8,1,139,8,1,57,8,73,8,121,8,3,43,8,1,4,8,1,152, +228,8,244,8,2,208,8,1,162,8,178,8,194,8,3,132,8,148,8,2,82,8,98,8,114,8,3, +64,8,1,50,8,1,36,8,1,2,8,18,8,2,228,8,244,8,2,214,8,1,196,8,1,146,8,162,8, +178,8,3,116,8,132,8,2,102,8,1,50,8,66,8,82,8,3,20,8,36,8,2,6,8,1,242,8,1, +212,8,228,8,2,166,8,182,8,2,130,8,146,8,2,100,8,116,8,2,86,8,1,52,8,68,8, +2,32,8,1,4,8,20,8,2,104,230,8,246,8,2,192,8,1,146,8,162,8,64,24,178,8,3,116, +8,132,8,2,82,8,98,8,2,52,8,68,8,2,22,8,38,8,2,8,184,255,128,64,24,85,88,72, +182,8,198,8,2,132,8,148,8,164,8,3,102,8,118,8,2,68,8,1,8,184,255,192,182, +72,75,72,228,8,1,8,184,255,192,64,12,66,69,72,148,8,1,114,8,130,8,2,8,184, +255,128,64,120,59,62,72,18,8,34,8,2,1,0,8,1,56,240,8,1,212,8,228,8,2,176, +8,1,100,8,132,8,148,8,164,8,4,64,8,80,8,2,36,8,52,8,2,228,8,244,8,2,171,8, +187,8,2,116,8,132,8,148,8,3,75,8,1,52,8,1,11,8,1,235,8,251,8,2,208,8,1,196, +8,1,176,8,1,132,8,148,8,164,8,3,96,8,112,8,2,2,0,8,16,8,64,8,80,8,4,8,34, +1,1,3,1,19,1,2,1,4,3,3,3,0,0,47,50,47,63,51,93,93,1,94,93,95,93,93,93,93, +93,93,113,113,113,113,113,113,114,114,114,114,114,114,94,93,95,93,43,93,93, +43,93,43,113,113,113,113,43,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,94,93,93,93,93,93,113,113,113,114,114,94,93,93,93,93,113,113,113, +113,114,25,47,94,93,93,113,113,113,43,113,43,113,114,94,93,205,43,94,93,113, +114,51,51,205,43,43,93,113,114,49,48,95,93,43,93,43,43,43,9,2,35,1,51,1,3, +19,254,203,254,206,162,1,112,203,1,114,2,161,2,121,253,135,2,224,253,32,0, +0,0,0,1,255,225,254,105,4,138,254,235,0,3,0,35,64,23,16,2,96,2,128,2,160, +2,208,2,5,96,2,128,2,240,2,3,2,0,0,186,1,0,47,237,1,47,47,93,113,49,48,3, +53,33,21,31,4,169,254,105,130,130,0,1,0,106,4,177,2,18,5,228,0,5,0,47,64, +31,117,3,133,3,2,64,4,128,4,2,4,64,16,1,1,1,2,149,128,15,0,47,0,63,0,127, +0,239,0,5,0,0,47,93,26,237,1,47,93,26,205,93,49,48,93,9,1,53,51,19,21,1,180, +254,182,207,217,4,177,1,22,29,254,225,20,0,0,0,0,2,0,87,255,236,4,115,4,78, +0,50,0,65,0,161,64,50,121,61,137,61,2,121,12,137,12,2,2,40,9,13,72,10,5,26, +5,2,43,24,9,17,72,5,28,21,28,2,37,37,30,70,64,46,9,111,56,127,56,143,56,3, +56,67,128,20,71,21,184,255,192,64,20,21,28,72,21,21,63,71,31,3,1,3,48,67, +192,67,2,160,67,1,67,184,255,192,64,32,30,35,72,33,81,40,22,57,81,9,9,26, +51,95,20,1,47,20,143,20,2,20,20,15,80,26,16,46,51,80,0,22,0,63,237,50,63, +237,51,47,93,113,17,18,57,47,237,63,237,1,43,93,113,47,93,237,51,47,43,237, +26,16,220,93,50,50,26,237,50,47,49,48,93,43,93,43,0,93,93,5,34,38,53,52,62, +2,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,21,17,20,22,51,50,54,55,21, +14,1,35,34,46,2,39,35,14,3,39,50,62,2,61,1,7,14,3,21,20,22,1,158,163,164, +81,131,168,87,243,28,58,87,59,52,84,62,38,6,188,10,56,103,155,110,204,206, +42,59,15,30,14,34,67,38,51,73,46,24,3,6,29,69,92,117,35,86,129,85,42,197, +66,119,90,53,95,20,172,150,107,137,78,30,2,4,59,67,94,58,27,15,39,67,51,17, +64,107,78,43,187,177,254,46,80,81,4,3,112,8,8,27,55,81,54,52,84,59,32,135, +63,98,116,53,89,4,1,17,50,90,73,88,96,0,0,2,0,132,255,236,4,29,5,204,0,31, +0,51,0,146,64,9,105,49,121,49,2,121,35,1,31,184,255,224,64,24,7,10,72,134, +30,150,30,2,73,27,89,27,2,73,4,89,4,2,134,1,150,1,2,1,184,255,224,64,63,7, +10,72,0,71,64,160,32,1,32,53,128,42,5,19,70,0,18,16,18,48,18,240,18,4,8,18, +176,53,1,63,53,1,112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,37,80, +29,16,18,0,12,21,5,47,80,2,22,0,63,237,50,63,63,63,237,50,1,93,93,113,113, +114,114,47,94,93,237,50,50,26,16,220,93,26,237,49,48,43,93,93,93,93,43,93, +93,1,16,33,34,38,39,35,20,14,2,7,35,62,3,53,17,51,17,20,6,7,6,7,51,62,1,51, +50,18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,29,254,114,123,163,51, +2,3,3,3,1,174,1,2,2,1,180,1,1,1,1,4,50,165,122,205,193,189,28,62,96,69,71, +109,73,38,38,73,108,70,66,96,64,31,2,34,253,202,89,99,26,56,48,34,4,9,43, +60,72,39,4,237,254,89,30,55,21,25,22,104,90,254,236,254,226,112,160,103,48, +46,102,166,120,116,158,99,43,46,102,163,0,0,0,1,0,87,255,236,3,202,4,78,0, +39,0,117,64,81,121,16,1,121,23,1,99,37,1,99,3,1,32,70,31,31,8,70,160,9,1, +9,9,41,0,71,31,19,1,19,35,80,26,31,32,127,32,143,32,223,32,4,32,32,26,16, +32,8,112,8,128,8,208,8,224,8,5,0,8,16,8,96,8,112,8,128,8,192,8,208,8,7,8, +8,5,80,14,22,31,41,1,93,0,63,237,51,47,93,113,63,51,47,93,16,237,1,47,93, +237,17,51,125,47,113,24,237,51,47,237,49,48,93,93,93,93,1,20,30,2,51,50,54, +55,23,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,7,46,1,35,34,14,2,1,19,27, +64,105,77,96,129,15,182,9,60,103,148,97,127,178,111,50,36,65,88,103,114,58, +91,142,103,64,13,185,14,114,105,77,103,64,27,2,34,93,156,113,62,104,108,12, +67,124,94,57,86,151,205,120,109,167,125,85,51,23,50,87,118,68,14,90,106,51, +103,156,0,0,0,0,2,0,86,255,236,3,239,5,204,0,31,0,51,0,123,64,87,85,34,101, +34,2,90,50,106,50,2,57,1,73,1,2,54,10,70,10,2,9,4,25,4,121,4,137,4,4,6,7, +22,7,118,7,134,7,4,19,70,64,42,0,143,18,239,18,2,18,53,128,32,71,31,6,1,6, +112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,21,18,0,11,47,80,8,16, +0,37,80,3,22,0,63,237,50,63,237,50,63,63,1,93,93,113,113,47,93,237,26,16, +220,93,50,50,26,237,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17,16,33,50, +22,23,51,52,46,1,52,53,17,51,17,20,30,2,23,35,46,3,53,1,20,30,2,51,50,62, +2,53,52,46,2,35,34,14,2,3,53,50,165,122,205,193,1,142,123,164,50,2,1,1,180, +1,2,2,1,172,2,3,3,2,253,218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64, +31,174,104,90,1,20,1,24,2,54,90,98,10,43,47,42,9,1,163,251,19,39,72,60,43, +9,10,37,48,53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102, +163,0,0,0,2,0,87,255,236,4,24,4,78,0,28,0,37,0,107,64,46,90,35,106,35,2,90, +30,106,30,2,85,3,101,3,2,8,73,9,9,27,71,64,31,29,1,144,29,1,29,39,128,37, +0,71,31,17,1,17,48,39,192,39,208,39,3,39,184,255,192,64,19,30,35,72,8,8,5, +0,80,37,37,5,32,80,22,16,5,80,14,22,0,63,237,63,237,18,57,47,237,17,57,47, +1,43,113,47,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,0,93,93, +1,20,30,2,51,50,54,55,23,14,3,35,34,2,17,52,62,2,51,50,30,2,29,1,39,46,1, +35,34,14,2,7,1,20,35,73,114,80,117,141,25,158,17,61,102,153,108,240,251,76, +132,176,100,136,183,111,47,186,15,144,135,45,99,84,58,4,1,247,85,143,103, +57,94,72,45,45,91,73,47,1,30,1,26,152,211,132,59,88,155,210,122,24,138,171, +157,29,74,127,98,0,0,0,1,0,29,0,0,2,60,5,202,0,27,0,161,64,11,3,10,19,10, +51,10,67,10,4,13,10,184,255,224,64,106,8,12,72,26,15,16,1,14,16,25,16,1,70, +5,0,2,1,18,2,31,29,47,29,79,29,95,29,127,29,143,29,159,29,7,15,29,63,29,127, +29,175,29,191,29,223,29,239,29,7,59,95,29,191,29,2,127,29,143,29,159,29,3, +29,64,86,100,72,29,64,39,44,72,32,29,48,29,96,29,3,175,29,223,29,239,29,3, +64,29,1,15,29,47,29,2,19,80,12,0,0,3,80,25,6,15,1,21,0,63,63,51,237,50,63, +237,1,93,93,93,113,43,43,113,114,94,93,113,47,94,93,51,237,50,50,47,94,93, +51,49,48,0,43,94,93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35, +34,14,2,29,1,51,21,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51, +29,11,211,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41,60,39, +97,131,0,2,0,86,254,87,3,239,4,75,0,49,0,69,0,217,64,72,122,49,138,49,2,118, +7,134,7,2,101,62,1,85,12,101,12,2,90,58,106,58,2,38,3,54,3,2,38,18,1,41,33, +1,9,23,25,23,121,23,137,23,4,6,29,22,29,118,29,134,29,4,9,47,70,64,50,34, +48,14,1,127,14,223,14,2,14,71,128,6,70,5,184,255,192,64,81,23,28,72,5,5,60, +71,15,26,1,10,26,32,71,64,71,2,207,71,1,0,71,32,71,144,71,176,71,4,80,223, +71,1,192,71,1,79,71,1,128,71,160,71,2,15,71,47,71,2,208,71,240,71,2,15,71, +1,8,41,15,34,55,80,31,16,15,65,80,21,22,9,80,53,6,1,38,6,1,6,0,27,0,63,50, +93,93,237,63,237,50,63,237,50,63,1,94,93,93,113,113,114,114,114,94,93,93, +113,47,94,93,237,51,47,43,237,26,16,220,93,113,50,50,26,237,49,48,0,94,93, +93,93,93,93,93,93,93,93,93,1,34,46,2,39,55,30,1,51,50,62,2,61,1,35,14,3,35, +34,46,2,53,52,62,2,51,50,22,23,51,52,62,2,55,51,14,3,21,17,20,6,19,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,2,36,93,144,102,64,14,181,18,123,100,61, +100,70,38,2,20,59,85,112,72,103,147,93,43,43,97,155,111,115,169,46,2,3,3, +4,2,171,1,2,2,1,223,44,49,80,103,54,69,99,65,31,31,64,98,68,54,103,82,50, +254,87,38,71,98,60,26,75,81,34,75,120,86,174,41,75,58,35,69,138,205,135,130, +208,145,77,105,97,25,62,55,40,3,9,43,60,73,39,252,197,227,229,3,198,113,161, +102,48,48,103,161,112,117,159,98,42,46,100,158,0,0,0,0,1,0,142,0,0,3,238, +5,204,0,33,0,109,185,0,8,255,192,64,36,7,11,72,11,70,64,80,12,1,159,12,255, +12,2,12,35,128,0,35,192,35,208,35,224,35,4,192,35,1,15,35,1,128,35,1,35,184, +255,192,64,32,19,23,72,28,24,70,192,25,1,0,25,16,25,48,25,224,25,240,25,5, +8,25,26,0,25,11,21,0,18,80,5,16,0,63,237,50,63,51,63,1,47,94,93,113,237,50, +43,93,113,113,114,26,16,220,93,113,26,237,49,48,43,1,62,3,51,50,30,2,21,17, +35,17,52,46,2,35,34,14,2,21,17,35,17,51,17,20,14,2,7,1,61,30,70,84,100,62, +104,133,77,29,181,17,48,88,70,64,103,73,40,180,180,2,3,2,1,3,129,55,77,50, +23,56,101,140,84,253,47,2,174,69,104,69,35,46,84,120,75,253,130,5,204,254, +126,33,66,56,39,7,0,0,0,2,0,137,0,0,1,61,5,204,0,3,0,7,0,115,64,13,3,7,70, +0,0,4,16,4,48,4,3,8,4,184,255,192,64,42,21,24,72,4,4,8,9,255,9,1,224,9,1, +223,9,1,176,9,192,9,2,159,9,1,112,9,128,9,2,31,9,1,0,9,1,240,9,1,223,9,1, +9,184,255,192,64,17,34,37,72,79,9,1,31,9,1,5,15,4,21,0,83,1,0,0,63,237,63, +63,1,93,113,43,113,113,114,114,114,114,114,114,114,114,17,18,57,47,43,94, +93,51,237,50,49,48,19,53,51,21,3,17,51,17,137,180,180,180,5,32,172,172,250, +224,4,58,251,198,0,0,0,0,2,255,206,254,87,1,61,5,204,0,3,0,23,1,51,64,151, +7,24,12,16,72,7,40,8,11,72,3,4,70,21,12,12,0,0,21,16,21,32,21,64,21,4,7,21, +21,24,25,144,25,1,63,25,1,0,25,16,25,2,219,25,64,210,213,72,208,25,224,25, +2,143,25,1,64,25,80,25,2,15,25,31,25,95,25,111,25,255,25,5,144,25,160,25, +224,25,240,25,4,79,25,1,0,25,1,160,63,25,175,25,191,25,207,25,4,239,25,1, +176,25,192,25,208,25,3,63,25,79,25,95,25,3,32,25,1,143,25,191,25,207,25,3, +0,25,1,111,239,25,1,208,25,1,63,25,143,25,2,111,25,143,25,159,25,175,25,255, +25,5,25,184,255,192,64,84,79,82,72,223,25,1,144,25,160,25,176,25,3,47,25, +63,25,79,25,3,0,25,1,61,25,64,53,56,72,112,25,128,25,144,25,176,25,4,15,25, +31,25,2,255,25,1,25,64,35,38,72,144,25,1,79,25,1,255,25,1,112,25,128,25,192, +25,208,25,224,25,5,31,25,1,22,15,16,80,9,27,0,83,1,0,0,63,237,63,237,63,1, +93,93,93,113,113,43,113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93, +93,113,113,113,113,114,94,93,93,93,113,114,114,114,43,94,93,93,93,17,18,57, +47,94,93,51,51,47,16,237,50,49,48,0,43,43,19,53,51,21,17,20,14,2,35,34,38, +39,53,30,1,51,50,62,2,53,17,51,137,180,21,54,93,72,34,65,28,13,36,13,38,49, +28,10,180,5,32,172,172,250,90,62,106,78,45,4,5,139,2,4,20,43,67,46,4,165, +0,0,1,0,138,0,0,4,3,5,204,0,11,0,251,64,84,124,2,1,122,8,1,118,7,1,86,9,102, +9,134,9,150,9,4,139,0,155,0,2,89,0,105,0,121,0,3,116,10,132,10,148,10,3,68, +10,1,1,10,10,11,42,8,1,3,8,9,16,116,9,1,9,9,0,11,16,84,11,116,11,148,11,3, +116,11,148,11,180,11,212,11,228,11,244,11,6,48,11,1,2,11,184,255,192,64,105, +7,10,72,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,31,13,63,13,2,31,13,63,13,95, +13,255,13,4,15,13,31,13,63,13,95,13,127,13,5,57,13,64,83,86,72,96,13,128, +13,160,13,192,13,208,13,5,223,13,1,0,13,96,13,128,13,160,13,4,0,13,16,13, +48,13,64,13,128,13,160,13,192,13,224,13,240,13,9,7,2,1,7,10,4,8,15,5,0,4, +21,0,21,0,63,63,63,63,23,57,1,94,93,113,113,114,43,94,93,113,114,47,94,93, +237,50,47,43,95,93,93,113,56,51,51,47,93,56,51,95,114,17,57,17,51,49,48,93, +93,93,93,93,0,93,1,93,0,93,33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132, +180,180,1,219,211,254,73,1,206,1,238,109,254,127,5,204,252,97,2,13,254,47, +253,151,0,0,0,1,0,138,0,0,1,62,5,204,0,3,0,111,64,52,3,70,192,0,1,208,0,1, +0,0,16,0,48,0,240,0,4,8,0,224,5,240,5,2,223,5,1,176,5,192,5,2,159,5,1,112, +5,128,5,2,15,5,31,5,2,240,5,1,223,5,1,5,184,255,192,64,27,34,37,72,79,5,1, +255,5,1,112,5,128,5,192,5,208,5,224,5,5,31,5,1,1,0,0,21,0,63,63,1,93,93,93, +113,43,113,113,114,114,114,114,114,114,47,94,93,113,114,237,49,48,51,17,51, +17,138,180,5,204,250,52,0,0,1,0,136,0,0,6,35,4,78,0,59,2,194,185,0,42,255, +224,179,8,11,72,32,184,255,224,64,255,8,11,72,34,59,70,0,0,13,46,70,217,47, +249,47,2,182,47,1,41,47,89,47,137,47,3,6,47,1,166,47,182,47,214,47,230,47, +4,137,47,1,118,47,1,89,47,1,6,47,22,47,70,47,3,7,47,25,12,70,198,13,1,6,13, +22,13,54,13,230,13,246,13,5,8,13,251,61,1,201,61,217,61,233,61,3,187,61,1, +153,61,1,139,61,1,105,61,121,61,2,91,61,1,73,61,1,43,61,59,61,2,249,61,1, +235,61,1,217,61,1,203,61,1,189,61,1,153,61,1,139,61,1,105,61,1,91,61,1,41, +61,57,61,2,27,61,1,9,61,1,202,235,61,251,61,2,105,61,137,61,153,61,185,61, +201,61,5,91,61,1,77,61,1,41,61,57,61,2,27,61,1,249,61,1,235,61,1,201,61,217, +61,2,187,61,1,153,61,1,139,61,1,125,61,1,1,43,61,75,61,91,61,107,61,4,31, +61,1,4,61,1,203,61,235,61,2,175,61,191,61,2,139,61,1,127,61,1,43,61,75,61, +91,61,107,61,4,31,61,1,11,61,1,154,255,61,1,235,61,64,255,1,223,61,1,187, +61,1,175,61,1,139,61,155,61,2,127,61,1,91,61,107,61,2,79,61,1,59,61,1,36, +61,1,11,61,1,235,61,1,223,61,1,187,61,1,175,61,1,155,61,1,127,61,143,61,2, +100,61,1,75,61,1,63,61,1,43,61,1,15,61,31,61,2,235,61,1,223,61,1,123,61,139, +61,171,61,187,61,4,111,61,1,59,61,1,31,61,1,11,61,1,106,187,61,203,61,235, +61,3,175,61,1,139,61,1,127,61,1,91,61,1,79,61,1,27,61,1,251,61,1,223,61,239, +61,2,187,61,203,61,2,175,61,1,100,61,148,61,2,27,61,43,61,75,61,3,4,61,1, +244,61,1,139,61,171,61,219,61,3,127,61,1,107,61,1,52,61,1,27,61,1,15,61,1, +57,187,61,219,61,251,61,3,160,61,1,116,61,148,61,2,43,61,75,61,91,61,3,31, +61,1,11,61,1,203,61,235,61,251,61,3,164,61,1,27,61,75,61,91,61,123,61,4,244, +61,1,208,61,1,2,96,61,144,61,160,61,192,61,4,79,61,1,48,61,1,47,61,1,0,64, +19,61,1,8,34,53,80,40,16,25,6,80,31,16,19,15,47,13,0,21,0,63,50,50,63,63, +237,50,63,237,50,1,94,93,93,93,93,93,95,93,93,113,113,113,114,114,114,114, +114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,47, +94,93,113,237,50,47,94,93,93,93,93,93,113,113,113,113,237,18,57,47,237,57, +49,48,0,43,43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21, +51,62,3,51,50,22,23,51,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,3,0,20,47,76,55,57,92,65,35,179,1,2,2,1,170,1,2,3,2,3,24,56,75,97,64,123, +143,28,3,24,60,80,100,64,82,119,76,36,178,20,47,76,55,57,92,65,35,2,174,79, +106,65,27,45,85,125,81,253,141,3,83,34,75,67,48,7,5,44,57,59,20,47,76,53, +29,98,107,47,76,53,29,44,92,145,100,253,47,2,174,79,106,65,27,43,84,126,83, +253,141,0,1,0,136,0,0,3,238,4,78,0,37,0,109,185,0,34,255,224,64,36,7,11,72, +37,70,64,80,0,1,159,0,255,0,2,0,39,128,0,39,192,39,208,39,224,39,4,192,39, +1,15,39,1,128,39,1,39,184,255,192,64,32,19,23,72,25,12,70,192,13,1,0,13,16, +13,48,13,224,13,240,13,5,8,13,25,6,80,31,16,19,15,13,0,21,0,63,50,63,63,237, +50,1,47,94,93,113,237,50,43,93,113,113,114,26,16,220,93,113,26,237,49,48, +43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51, +50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26, +62,82,106,70,90,130,84,39,2,174,79,106,65,27,45,85,125,81,253,141,3,83,34, +75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,253,47,0,0,0,0,2,0,86, +255,236,4,29,4,78,0,14,0,34,0,116,64,59,121,32,137,32,2,116,28,132,28,2,118, +22,134,22,2,121,18,137,18,2,150,12,166,12,2,4,12,20,12,2,11,9,27,9,2,11,5, +27,5,2,4,2,20,2,2,7,0,71,64,144,15,1,15,36,128,48,36,1,36,184,255,192,64, +20,30,35,72,223,36,1,25,71,31,8,1,8,20,80,10,16,30,80,3,22,0,63,237,63,237, +1,47,93,237,93,43,113,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93, +93,1,16,2,35,34,46,2,53,16,33,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,29,250,238,113,178,123,65,1,229,126,183,117,56,189,39,75,108,68, +69,111,78,41,44,77,105,62,69,112,78,42,2,30,254,228,254,234,68,140,211,143, +2,48,70,140,210,140,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0, +0,2,0,132,254,87,4,29,4,77,0,38,0,58,0,148,64,16,105,56,121,56,2,105,42,121, +42,2,134,36,150,36,2,36,184,255,224,64,19,7,10,72,73,31,89,31,2,73,7,89,7, +2,134,3,150,3,2,3,184,255,224,64,63,7,10,72,0,71,64,160,39,1,39,60,128,49, +28,15,70,0,16,16,16,48,16,240,16,4,8,16,176,60,1,63,60,1,112,60,144,60,2, +31,60,1,255,60,1,192,60,224,60,2,28,44,80,34,16,22,15,15,27,8,54,80,5,22, +0,63,237,50,63,63,63,237,50,1,93,93,113,113,114,114,47,94,93,237,50,50,26, +16,220,93,26,237,49,48,43,93,93,93,43,93,93,93,1,20,14,2,35,34,38,39,35,30, +3,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51,50,30,2,7,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,4,29,40,93,153,112,116,174,46,5,1,1,1,1,180,1,2,2, +1,174,1,3,3,3,4,25,64,82,101,63,112,153,93,40,189,24,59,98,74,60,106,79,46, +38,73,108,70,75,99,59,24,2,34,123,208,150,85,88,100,2,32,48,59,29,254,89, +5,6,39,72,59,42,9,3,36,51,58,26,52,73,47,21,80,145,205,129,100,156,108,56, +34,96,169,135,115,159,98,43,58,110,159,0,0,2,0,86,254,87,3,240,4,78,0,34, +0,54,0,165,64,119,85,47,101,47,2,90,43,106,43,2,57,32,73,32,2,54,9,70,9,2, +9,1,25,1,121,1,137,1,4,6,5,22,5,118,5,134,5,4,9,22,70,64,35,11,127,23,223, +23,2,23,56,128,45,71,15,3,1,10,3,32,56,64,56,2,207,56,1,0,56,32,56,144,56, +176,56,4,80,223,56,1,192,56,1,79,56,1,128,56,160,56,2,15,56,47,56,2,208,56, +240,56,2,15,56,1,8,22,27,17,16,11,40,80,6,16,29,50,80,0,22,0,63,237,50,63, +237,50,63,63,1,94,93,93,113,113,114,114,114,94,93,93,113,47,94,93,237,26, +16,220,93,50,50,26,237,49,48,0,94,93,93,93,93,93,93,5,34,2,17,16,18,51,50, +30,2,23,51,52,62,2,55,51,14,1,21,17,35,17,52,54,55,54,55,35,14,3,1,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,1,228,206,192,197,201,67,103,81,61,25, +2,3,3,4,2,173,2,5,180,1,1,1,1,2,26,63,82,103,1,16,41,75,107,66,69,98,61,29, +27,61,97,70,60,106,79,46,20,1,22,1,22,1,26,1,28,24,47,70,47,25,61,54,39,3, +17,144,134,251,54,1,183,26,56,25,28,29,51,75,49,23,2,62,118,160,96,41,51, +105,161,110,108,160,104,51,37,97,169,0,0,0,1,0,136,0,0,2,136,4,78,0,31,0, +62,64,40,16,21,48,21,2,21,21,33,12,31,70,192,0,1,0,0,16,0,48,0,224,0,240, +0,5,8,0,25,40,19,22,72,25,12,18,16,7,15,0,21,0,63,63,63,51,205,43,1,47,94, +93,113,237,50,17,51,47,93,49,48,51,17,52,46,2,39,51,30,3,21,51,62,3,51,50, +22,23,21,46,1,35,34,14,2,21,17,142,1,2,2,1,170,1,3,3,1,4,19,43,58,80,57,22, +40,11,18,48,30,62,87,55,26,3,62,34,71,66,58,23,23,59,62,57,20,62,91,59,29, +7,3,165,5,5,56,99,137,81,253,204,0,0,1,0,57,255,236,3,182,4,75,0,55,0,189, +64,85,116,46,132,46,2,111,21,127,21,143,21,3,107,22,1,37,54,1,42,27,1,21, +52,1,5,2,21,2,2,11,30,27,30,2,36,73,35,35,0,72,64,32,19,48,19,2,144,19,160, +19,176,19,3,19,57,128,11,73,10,64,25,30,72,10,10,44,72,79,29,95,29,2,32,29, +1,29,96,57,192,57,2,128,57,1,57,184,255,192,64,42,39,42,72,63,57,1,16,57, +1,19,44,5,41,80,32,0,36,1,144,36,240,36,2,36,36,32,16,14,80,5,96,11,112,11, +2,128,11,1,11,11,5,22,0,63,51,47,93,113,16,237,63,51,47,93,113,16,237,18, +57,57,1,93,93,43,93,113,47,93,113,237,51,47,43,237,26,16,220,93,113,26,237, +50,47,237,49,48,93,93,0,93,1,93,93,0,93,93,93,1,20,14,2,35,34,46,2,39,55, +30,1,51,50,62,2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,6,21, +20,30,2,23,30,5,3,182,59,112,163,105,94,151,114,77,18,159,23,144,128,58,97, +70,39,46,82,117,70,65,128,103,64,211,202,179,211,28,162,9,48,68,85,46,122, +116,43,77,108,65,43,90,85,75,56,33,1,43,76,119,81,43,29,64,105,76,31,87,81, +16,39,65,48,49,63,42,31,19,17,42,69,102,77,148,155,126,139,20,42,57,35,15, +74,75,44,57,39,29,16,11,25,35,47,66,88,0,0,0,0,1,0,31,255,240,2,42,5,44,0, +22,0,123,64,87,40,14,1,105,14,121,14,137,14,3,40,13,1,105,13,121,13,137,13, +3,139,4,1,4,32,9,13,72,108,4,124,4,156,4,172,4,4,4,32,9,12,72,111,22,127, +22,2,22,12,13,22,3,16,70,9,8,143,5,1,0,5,16,5,32,5,64,5,4,7,5,128,24,1,15, +6,80,12,63,10,1,10,9,15,19,80,3,22,0,63,237,63,205,93,51,237,50,1,93,47,94, +93,113,51,51,237,23,50,47,93,49,48,0,43,93,1,43,93,93,113,93,113,37,14,1, +35,34,53,17,35,53,51,55,51,21,51,21,35,17,20,22,51,50,54,55,2,42,41,85,56, +216,125,132,53,120,200,200,51,63,26,49,29,8,11,13,245,2,210,131,242,242,131, +253,85,78,63,8,6,0,0,0,0,1,0,133,255,236,3,235,4,58,0,37,0,121,64,69,150, +3,1,26,33,42,33,58,33,3,25,14,70,64,47,11,143,11,2,191,11,1,143,11,159,11, +255,11,3,11,39,128,1,70,223,36,239,36,2,0,36,16,36,48,36,240,36,4,8,36,176, +39,192,39,208,39,3,176,39,240,39,2,255,39,1,112,39,1,39,184,255,192,64,13, +19,23,72,25,6,80,31,22,19,21,12,0,15,0,63,50,63,63,237,50,1,43,93,93,113, +114,47,94,93,113,237,26,16,220,93,113,114,26,237,51,49,48,0,93,93,1,17,20, +30,2,51,50,62,2,53,17,51,17,20,30,2,23,35,46,3,53,35,14,3,35,34,46,2,53,17, +1,58,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90, +130,84,39,4,58,253,82,79,106,65,27,45,85,125,81,2,115,252,173,34,75,67,48, +7,5,44,57,59,20,47,76,53,29,44,92,144,101,2,209,0,0,1,0,7,0,0,3,249,4,58, +0,16,2,91,64,55,57,1,73,1,2,153,1,1,54,0,70,0,2,134,0,150,0,2,58,15,74,15, +2,154,15,1,105,15,121,15,137,15,3,53,3,69,3,2,149,3,1,3,103,3,119,3,135,3, +3,14,16,13,17,72,4,184,255,240,64,62,13,17,72,1,0,9,9,2,15,16,16,43,16,123, +16,2,4,16,20,16,2,4,16,20,16,68,16,84,16,132,16,148,16,196,16,212,16,8,219, +16,1,68,16,84,16,132,16,148,16,196,16,5,27,16,1,4,16,1,8,16,3,2,184,255,240, +64,255,11,2,91,2,2,42,2,11,18,27,18,2,11,18,27,18,75,18,91,18,139,18,155, +18,203,18,219,18,8,255,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18, +1,68,18,84,18,2,32,18,1,4,18,20,18,2,199,224,18,1,196,18,212,18,2,160,18, +1,4,18,20,18,68,18,84,18,132,18,148,18,6,68,18,84,18,132,18,148,18,196,18, +212,18,6,27,18,1,4,18,1,219,18,1,196,18,1,155,18,1,132,18,1,91,18,1,68,18, +1,27,18,1,4,18,1,151,11,18,27,18,75,18,91,18,139,18,155,18,203,18,219,18, +8,155,18,203,18,219,18,3,132,18,1,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18, +2,224,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,4,18,20,18,68, +18,84,18,4,103,4,18,20,18,68,18,84,18,132,18,148,18,196,18,212,18,8,219,18, +1,196,18,1,155,18,1,132,18,1,91,18,1,68,18,1,27,18,1,4,18,1,219,18,1,196, +18,1,11,18,27,18,75,18,64,99,91,18,139,18,155,18,6,55,75,18,91,18,139,18, +155,18,203,18,219,18,6,63,18,1,32,18,1,4,18,20,18,2,224,18,1,196,18,212,18, +2,160,18,1,132,18,148,18,2,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18,2,196, +18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,2,80,18,1,47,18,1,0,18,16,18, +2,7,15,2,15,9,1,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93,93,113,113,113, +113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113, +113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114,94,93,93,93,93,93, +93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93,93,93,93,113,114,47, +94,93,56,51,47,94,93,93,93,93,113,114,114,56,51,18,57,61,47,51,51,49,48,43, +43,93,95,93,113,93,93,113,93,113,93,113,33,35,1,51,19,30,3,23,62,3,55,19, +51,2,101,213,254,119,192,238,7,19,20,17,6,6,19,20,21,8,246,191,4,58,253,64, +22,63,68,63,21,21,63,66,63,22,2,194,0,0,0,0,1,255,253,0,0,5,204,4,58,0,42, +3,177,64,36,229,23,1,58,41,74,41,2,122,41,138,41,154,41,3,53,16,69,16,2,117, +16,133,16,149,16,3,54,29,70,29,2,54,29,1,29,184,255,240,64,22,13,17,72,57, +28,73,28,2,57,28,1,28,16,13,17,72,54,0,70,0,2,0,184,255,240,64,9,11,17,72, +54,13,70,13,2,13,184,255,240,64,51,11,17,72,57,1,73,1,2,1,16,11,17,72,57, +14,73,14,2,3,14,16,9,17,72,14,13,22,29,28,7,1,0,35,40,35,1,88,35,1,22,7,35, +35,7,22,3,15,41,42,16,42,184,255,192,64,73,47,50,72,73,42,1,52,42,1,38,42, +1,249,42,1,198,42,230,42,2,164,42,1,150,42,1,121,42,1,54,42,70,42,102,42, +3,25,42,1,244,42,1,182,42,230,42,2,132,42,148,42,2,102,42,118,42,2,57,42, +1,38,42,1,20,42,1,6,42,1,8,42,16,15,184,255,240,64,255,9,15,89,15,105,15, +121,15,4,10,15,198,44,230,44,246,44,3,164,44,1,150,44,1,121,44,1,102,44,1, +84,44,1,54,44,70,44,2,25,44,1,244,44,1,230,44,1,196,44,1,182,44,1,153,44, +1,134,44,1,116,44,1,102,44,1,57,44,1,20,44,36,44,2,6,44,1,202,249,44,1,150, +44,182,44,198,44,230,44,4,105,44,1,54,44,70,44,2,9,44,25,44,2,230,44,1,185, +44,1,86,44,102,44,134,44,3,57,44,1,43,44,1,20,44,1,6,44,1,228,44,1,214,44, +1,196,44,1,182,44,1,162,44,1,148,44,1,134,44,1,114,44,1,100,44,1,86,44,1, +52,44,68,44,2,34,44,1,20,44,1,6,44,1,153,246,44,1,194,44,210,44,2,180,44, +1,166,44,1,132,44,1,118,44,1,84,44,100,44,2,66,44,1,52,44,1,22,44,38,44,2, +4,44,1,226,44,242,44,2,212,44,1,198,44,1,164,44,1,146,44,1,132,44,1,102,44, +118,44,2,84,44,1,54,44,70,44,2,36,44,1,22,44,1,4,44,1,244,44,64,213,1,230, +44,1,196,44,1,178,44,1,164,44,1,102,44,134,44,150,44,3,68,44,84,44,2,54,44, +1,20,44,1,6,44,1,105,246,44,1,226,44,1,212,44,1,150,44,182,44,198,44,3,116, +44,132,44,2,54,44,70,44,102,44,3,36,44,1,6,44,22,44,2,244,44,1,182,44,230, +44,2,148,44,164,44,2,134,44,1,105,44,1,86,44,1,68,44,1,6,44,54,44,2,228,44, +1,214,44,1,196,44,1,166,44,182,44,2,137,44,1,114,44,1,1,96,44,1,4,44,36,44, +84,44,3,56,164,44,196,44,212,44,244,44,4,128,44,1,116,44,1,75,44,1,48,44, +1,20,44,36,44,2,251,44,1,196,44,1,160,44,1,148,44,1,123,44,1,52,44,68,44, +100,44,3,27,44,1,240,44,1,228,44,1,203,44,1,100,44,132,44,148,44,180,44,4, +63,44,1,2,0,44,16,44,2,8,7,184,255,224,64,40,14,17,72,66,7,1,52,7,1,34,7, +1,7,28,41,3,15,15,35,40,12,17,72,45,35,1,22,40,12,17,72,45,22,1,1,22,35,3, +14,21,0,63,23,51,93,43,93,43,63,23,51,93,93,93,43,1,94,93,95,93,93,93,93, +93,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93,93,95,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,47,94,93, +56,51,47,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114, +43,56,51,18,23,57,61,47,47,47,113,114,17,51,51,17,51,51,17,51,51,49,48,43, +95,113,43,113,43,113,43,113,43,93,113,43,93,113,93,113,93,113,113,33,35,3, +46,1,39,38,39,6,7,14,1,7,3,35,1,51,19,30,1,23,22,23,54,55,62,1,55,19,51,19, +30,1,23,22,23,54,55,62,1,55,19,51,4,150,209,173,8,17,8,10,9,9,10,8,19,8,178, +208,254,209,178,183,7,14,7,7,8,8,9,8,16,6,196,193,189,7,16,7,8,8,8,8,7,15, +7,191,176,2,186,27,80,38,44,47,45,44,38,82,31,253,74,4,58,253,33,23,67,32, +37,39,38,36,31,64,21,2,231,253,25,26,66,29,34,35,38,36,31,67,26,2,223,0,0, +1,0,23,0,0,3,234,4,58,0,11,2,214,64,72,148,2,1,134,2,1,141,8,157,8,2,121, +8,1,130,6,146,6,2,118,6,1,141,0,157,0,2,121,0,1,55,10,119,10,2,28,10,1,122, +4,1,19,4,1,3,24,1,120,1,136,1,152,1,4,23,7,135,7,151,7,3,6,8,10,1,7,4,4,9, +9,16,5,184,255,240,64,59,5,9,5,9,3,0,11,16,41,11,57,11,2,4,11,20,11,2,214, +11,230,11,246,11,3,196,11,1,150,11,166,11,182,11,3,132,11,1,6,11,38,11,70, +11,102,11,134,11,150,11,166,11,198,11,230,11,9,8,11,184,255,192,181,24,31, +72,11,2,3,184,255,240,64,11,9,3,1,9,3,57,3,2,10,3,13,184,255,128,64,116,223, +233,72,118,13,1,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,230, +13,246,13,2,210,13,1,192,13,1,178,13,1,132,13,148,13,164,13,3,118,13,1,100, +13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,199,246,13,1,228,13,1, +214,13,1,196,13,1,182,13,1,164,13,1,6,13,70,13,86,13,134,13,150,13,166,13, +198,13,214,13,230,13,9,150,13,198,13,2,13,184,255,192,64,187,183,192,72,132, +13,1,86,13,102,13,118,13,3,68,13,1,38,13,54,13,2,4,13,1,151,38,13,54,13,102, +13,118,13,166,13,182,13,198,13,230,13,246,13,9,230,13,1,132,13,1,118,13,1, +68,13,84,13,100,13,3,54,13,1,36,13,1,22,13,1,4,13,1,246,13,1,228,13,1,214, +13,1,196,13,1,182,13,1,164,13,1,118,13,134,13,150,13,3,100,13,1,6,13,22,13, +38,13,70,13,86,13,5,103,6,13,70,13,86,13,134,13,150,13,198,13,214,13,230, +13,8,153,13,217,13,2,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13, +1,214,13,230,13,246,13,3,196,13,1,6,13,38,13,54,13,70,13,4,55,102,13,166, +13,182,13,230,13,246,13,5,13,184,255,192,64,54,61,66,72,57,13,1,34,13,1,1, +0,13,16,13,2,244,13,1,192,13,208,13,224,13,3,180,13,1,128,13,144,13,160,13, +3,116,13,1,96,13,1,84,13,1,64,13,1,52,13,1,32,13,1,13,184,255,192,64,34,18, +24,72,160,13,1,2,0,13,16,13,80,13,112,13,128,13,144,13,6,7,10,4,4,7,1,3,2, +8,6,15,0,2,21,0,63,51,63,51,18,23,57,17,1,51,94,93,95,93,43,113,113,113,113, +113,113,113,113,113,113,114,95,114,114,43,114,94,93,93,93,113,113,113,113, +113,113,113,113,114,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +113,113,114,94,93,93,93,93,93,43,93,113,114,114,114,114,114,114,94,93,93, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,43,47,94, +93,114,56,51,47,43,94,93,113,113,113,113,114,114,56,51,18,57,57,47,47,56, +56,18,23,57,50,51,49,48,0,93,93,1,95,93,93,93,93,93,93,93,93,93,93,93,93, +33,9,1,35,9,1,51,9,1,51,9,1,3,33,254,221,254,219,194,1,129,254,145,199,1, +14,1,12,201,254,145,1,134,1,188,254,68,2,44,2,14,254,91,1,165,253,244,253, +210,0,0,0,0,1,0,5,254,87,3,252,4,58,0,31,2,207,64,59,147,3,1,147,2,1,153, +16,1,150,0,1,141,16,157,16,2,141,0,157,0,2,122,29,138,29,154,29,3,105,29, +1,157,30,1,30,16,13,16,72,146,19,1,134,19,1,114,19,1,86,19,102,19,2,146,18, +1,3,18,184,255,240,64,36,13,16,72,16,0,24,8,24,8,24,17,30,31,16,153,31,1, +134,31,1,89,31,1,70,31,1,25,31,1,6,31,1,8,31,18,17,184,255,240,64,36,17,6, +33,1,6,33,38,33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230, +33,246,33,12,199,230,33,246,33,2,33,184,255,192,64,255,217,233,72,196,33, +1,166,33,182,33,2,132,33,1,6,33,38,33,54,33,70,33,102,33,118,33,6,6,33,38, +33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230,33,246,33,12, +6,33,22,33,38,33,70,33,86,33,102,33,134,33,166,33,198,33,230,33,246,33,11, +151,244,33,1,224,33,1,194,33,210,33,2,180,33,1,160,33,1,130,33,146,33,2,116, +33,1,96,33,1,66,33,82,33,2,52,33,1,32,33,1,2,33,18,33,2,228,33,244,33,2,194, +33,210,33,2,164,33,180,33,2,130,33,146,33,2,100,33,116,33,2,66,33,82,33,2, +36,33,52,33,2,2,33,18,33,2,228,33,244,33,2,194,33,210,33,2,164,33,180,33, +2,130,33,146,33,2,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2, +33,1,103,228,33,244,33,2,214,33,1,194,33,1,164,33,180,33,2,150,33,1,130,33, +1,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2,33,1,228,33,244, +33,2,214,33,1,64,166,194,33,1,1,160,33,176,33,2,132,33,148,33,2,96,33,112, +33,2,68,33,84,33,2,32,33,48,33,2,4,33,20,33,2,224,33,240,33,2,196,33,212, +33,2,160,33,176,33,2,132,33,148,33,2,96,33,112,33,2,68,33,84,33,2,32,33,48, +33,2,4,33,20,33,2,55,224,33,1,196,33,212,33,2,160,33,1,132,33,148,33,2,96, +33,1,68,33,84,33,2,32,33,1,4,33,20,33,2,224,33,1,196,33,212,33,2,160,33,1, +132,33,148,33,2,96,33,1,2,0,33,32,33,48,33,80,33,4,80,33,128,33,144,33,192, +33,4,47,33,1,0,33,16,33,2,7,16,0,24,0,32,30,17,15,12,80,5,27,0,63,237,63, +51,17,51,51,17,51,1,94,93,93,93,113,95,113,113,113,113,113,114,114,114,114, +114,114,114,114,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,95,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,114,114,114,94,93,113,114,114,114,114,43,114,94,93,113,47,56,51,47, +94,93,93,93,93,93,93,56,51,18,57,57,61,47,24,47,17,51,51,49,48,43,95,93,93, +93,93,93,43,93,93,93,0,93,93,1,93,93,93,93,33,14,3,35,34,38,39,53,30,1,51, +50,54,63,1,1,51,19,30,3,23,62,3,55,19,51,2,92,38,79,98,120,78,34,58,32,19, +48,17,79,136,51,17,254,83,192,228,10,31,31,24,2,3,23,29,30,10,212,190,98, +157,111,59,4,7,135,3,3,118,129,43,4,53,253,170,27,90,90,72,9,11,65,80,82, +30,2,106,0,1,0,49,0,0,3,182,4,58,0,9,1,11,64,78,157,2,173,2,2,139,2,1,89, +2,105,2,2,146,7,162,7,2,116,7,132,7,2,70,7,86,7,102,7,3,40,8,1,3,8,2,123, +6,1,4,6,20,6,36,6,164,6,180,6,212,6,228,6,7,7,6,7,3,11,1,59,1,91,1,3,10,1, +64,39,55,72,1,64,17,20,72,1,11,184,255,192,64,40,92,100,72,192,11,1,180,11, +1,160,11,1,148,11,1,128,11,1,116,11,1,96,11,1,84,11,1,64,11,1,52,11,68,11, +100,11,132,11,4,11,184,255,192,64,32,73,82,72,32,11,1,20,11,1,0,11,1,63,68, +11,100,11,132,11,164,11,4,4,11,36,11,68,11,100,11,4,11,184,255,192,179,51, +62,72,11,184,255,192,64,18,31,39,72,224,11,1,2,0,11,32,11,80,11,112,11,4, +7,11,184,255,192,64,13,16,20,72,6,3,80,4,15,1,7,80,0,21,0,63,237,50,63,237, +50,1,43,94,93,95,93,43,43,113,114,94,93,93,93,43,93,113,113,113,113,113,113, +113,113,113,43,47,43,43,94,93,51,51,47,94,93,113,51,51,95,113,49,48,93,93, +93,93,93,93,51,53,1,33,53,33,21,1,33,21,49,2,149,253,147,3,56,253,106,2,187, +137,3,38,139,137,252,218,139,0,0,0,1,0,34,254,87,2,136,5,204,0,45,0,96,64, +65,3,32,9,12,72,19,32,9,13,72,23,45,33,28,40,240,17,11,31,5,63,5,2,143,5, +1,64,5,1,5,33,11,245,47,12,111,12,2,15,12,79,12,223,12,239,12,4,47,12,79, +12,111,12,3,12,12,0,24,245,21,0,43,245,0,27,0,63,237,63,237,18,57,47,93,113, +114,237,57,1,47,93,93,113,51,51,237,50,50,205,50,49,48,43,43,1,34,46,2,53, +17,52,46,2,39,53,62,3,53,17,52,54,59,1,21,35,34,6,21,17,20,14,2,7,21,30,3, +21,17,20,22,59,1,21,2,1,65,99,66,34,29,55,80,51,51,80,55,29,133,131,135,63, +91,77,30,52,71,41,43,71,51,29,77,91,63,254,87,41,76,108,68,1,105,63,88,56, +28,2,127,2,28,56,88,62,1,106,141,152,129,107,108,254,156,50,84,64,44,10,2, +10,44,65,84,51,254,155,106,109,129,0,1,0,183,254,78,1,93,5,204,0,3,1,207, +64,21,3,171,6,0,1,11,0,0,4,5,214,5,230,5,246,5,3,194,5,1,5,184,255,128,179, +226,229,72,5,184,255,192,64,10,222,225,72,2,5,18,5,2,218,5,184,255,128,179, +214,217,72,5,184,255,192,64,20,210,213,72,180,5,196,5,2,162,5,1,1,112,5,128, +5,144,5,3,5,184,255,192,64,20,199,202,72,0,5,1,240,5,1,212,5,228,5,2,176, +5,192,5,2,5,184,255,192,64,43,187,190,72,48,5,64,5,80,5,3,4,5,20,5,36,5,3, +240,5,1,196,5,212,5,228,5,3,128,5,144,5,160,5,3,4,5,20,5,36,5,3,164,5,184, +255,192,179,168,171,72,5,184,255,128,179,160,163,72,5,184,255,192,64,14,156, +159,72,112,5,128,5,144,5,3,228,5,1,5,184,255,192,64,11,145,148,72,176,5,192, +5,208,5,3,5,184,255,192,64,15,133,136,72,48,5,1,20,5,36,5,2,0,5,1,5,184,255, +192,64,15,122,125,72,128,5,1,4,5,20,5,36,5,3,110,5,184,255,192,64,10,114, +117,72,192,5,1,84,5,1,5,184,255,192,182,102,105,72,16,5,1,5,184,255,192,64, +9,91,94,72,80,5,96,5,2,5,184,255,192,64,15,79,82,72,203,5,219,5,2,160,5,176, +5,2,2,5,184,255,192,64,10,68,71,72,15,5,31,5,2,62,5,184,255,192,64,29,56, +61,72,207,5,1,96,5,112,5,160,5,176,5,4,31,5,1,0,5,1,160,5,224,5,240,5,3,5, +184,255,192,64,28,25,28,72,5,64,17,21,72,64,5,112,5,128,5,144,5,4,15,5,31, +5,47,5,3,7,1,0,0,0,47,63,1,94,93,93,43,43,113,114,114,114,114,43,94,93,43, +95,93,93,43,113,43,114,43,114,114,43,94,93,93,43,113,113,113,43,113,43,113, +114,43,43,43,94,93,93,93,93,113,113,43,113,113,113,114,43,114,95,114,114, +43,43,94,93,43,43,93,93,17,18,57,47,94,93,237,49,48,19,17,51,17,183,166,254, +78,7,126,248,130,0,0,0,0,1,0,34,254,87,2,135,5,204,0,45,0,98,185,0,40,255, +224,179,9,12,72,24,184,255,224,64,55,9,13,72,20,44,32,26,38,240,15,9,48,3, +1,192,3,208,3,2,3,9,32,245,47,31,111,31,2,15,31,79,31,223,31,239,31,4,47, +31,79,31,111,31,3,31,31,21,45,245,44,27,20,245,21,0,0,63,237,63,237,18,57, +47,93,113,114,237,57,1,47,93,113,51,51,253,50,50,205,50,49,48,43,43,19,50, +54,53,17,52,62,2,55,53,46,3,53,17,52,38,43,1,53,51,50,22,21,17,20,30,2,23, +21,14,3,21,17,20,14,2,43,1,53,94,91,79,28,51,71,43,42,70,52,29,79,91,60,132, +131,133,29,55,81,52,52,81,55,29,34,66,99,65,132,254,216,109,106,1,101,51, +84,65,44,10,2,10,44,64,84,50,1,100,108,107,129,152,141,254,150,62,88,56,28, +2,127,2,28,56,88,63,254,151,68,108,76,41,129,0,0,0,0,1,0,92,2,41,4,80,3,39, +0,32,0,154,64,26,90,3,138,3,2,25,2,41,2,57,2,3,30,48,10,16,72,13,31,1,25, +48,9,12,72,13,184,255,208,179,9,13,72,7,184,255,208,64,19,9,13,72,0,27,32, +27,112,27,3,27,32,10,1,10,24,173,64,10,184,255,192,180,38,60,72,10,0,184, +255,192,179,23,28,72,0,184,255,192,64,41,14,20,72,0,128,27,64,41,60,72,27, +5,173,31,14,79,14,159,14,3,111,14,127,14,159,14,175,14,207,14,239,14,255, +14,7,14,64,9,13,72,14,0,47,43,93,113,237,196,43,26,221,43,43,196,43,26,237, +1,47,93,47,93,49,48,0,43,43,43,93,43,93,93,1,34,38,39,38,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,76,69,145,73,129,88,38,65,60, +56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68,2,41, +44,26,45,12,23,32,21,143,38,46,13,20,26,13,8,15,14,8,50,42,149,23,30,19,8, +0,0,0,2,0,242,254,185,1,184,4,58,0,3,0,7,2,19,64,133,2,91,3,3,166,5,182,5, +2,5,150,105,6,185,6,2,70,6,86,6,2,57,6,1,6,64,23,27,72,182,6,198,6,2,73,6, +89,6,105,6,3,22,6,54,6,2,9,6,1,10,6,121,9,137,9,153,9,201,9,4,70,9,1,9,9, +57,9,2,249,9,1,182,9,1,105,9,121,9,169,9,3,38,9,1,9,9,1,204,217,9,233,9,2, +150,9,1,73,9,89,9,121,9,3,6,9,1,185,9,201,9,2,134,9,1,116,9,1,86,9,102,9, +2,68,9,1,22,9,38,9,54,9,3,9,184,255,192,64,14,168,171,72,180,9,1,134,9,150, +9,166,9,3,9,184,255,192,64,22,159,162,72,36,9,1,6,9,22,9,2,156,182,9,198, +9,214,9,246,9,4,9,184,255,64,64,14,147,150,72,102,9,1,150,9,166,9,182,9,3, +9,184,255,192,64,24,137,144,72,98,9,114,9,130,9,3,64,9,80,9,2,34,9,50,9,2, +16,9,1,9,184,255,64,182,117,124,72,128,9,1,9,184,255,64,64,10,110,115,72, +4,9,20,9,2,108,9,184,255,64,64,62,101,107,72,180,9,196,9,212,9,3,150,9,166, +9,2,132,9,1,118,9,1,82,9,98,9,2,36,9,52,9,68,9,3,6,9,22,9,2,246,9,1,194,9, +210,9,2,1,144,9,160,9,176,9,3,100,9,116,9,132,9,3,9,184,255,128,64,16,71, +75,72,212,9,228,9,244,9,3,160,9,176,9,2,9,184,255,192,64,61,59,64,72,16,9, +32,9,2,4,9,1,55,180,9,228,9,244,9,3,128,9,144,9,2,84,9,100,9,116,9,3,27,9, +1,0,9,1,240,9,1,196,9,212,9,228,9,3,84,9,100,9,164,9,212,9,228,9,244,9,6, +9,184,255,192,64,20,26,31,72,64,9,1,2,15,9,1,7,0,6,156,7,15,0,3,1,3,0,47, +93,63,253,206,1,94,93,95,93,43,93,113,113,114,114,114,114,114,94,93,93,43, +93,93,43,113,113,95,113,113,114,114,114,114,114,114,114,43,94,93,43,93,43, +113,113,113,113,43,113,114,43,114,94,93,93,43,93,93,43,113,113,113,113,113, +113,114,114,114,114,94,93,93,93,93,93,113,113,113,47,94,93,93,93,93,43,113, +113,113,237,113,51,47,237,49,48,1,51,19,35,19,21,35,53,1,10,148,24,196,198, +194,2,173,252,12,5,129,201,201,0,0,0,1,0,135,255,225,3,250,5,129,0,43,0,137, +64,31,88,14,104,14,2,87,20,103,20,2,26,28,1,21,6,1,6,3,1,25,10,22,0,11,1, +11,11,3,39,71,17,184,255,192,64,56,8,11,72,17,31,70,30,30,3,70,4,34,80,217, +31,1,124,31,140,31,2,25,31,1,31,22,96,25,112,25,2,160,25,1,25,23,3,12,213, +3,1,112,3,128,3,2,21,3,101,3,2,3,0,80,9,10,0,47,221,237,51,93,93,93,51,63, +221,93,113,50,50,93,93,93,237,1,47,237,51,47,237,47,43,237,18,57,47,113,51, +205,50,49,48,0,93,93,93,93,93,1,50,54,55,23,14,3,7,21,35,53,46,3,53,52,62, +2,55,53,51,21,30,3,23,7,46,1,35,34,14,2,21,20,30,2,2,84,96,129,15,182,8,51, +88,126,83,124,111,154,95,43,66,111,146,80,124,78,120,86,54,12,185,14,114, +105,77,103,64,27,27,64,105,1,21,104,108,12,62,116,92,62,8,168,168,10,93,149, +195,113,150,206,131,63,7,155,155,8,55,85,109,63,14,90,106,51,103,156,105, +93,156,113,62,0,0,1,0,58,0,0,4,80,5,150,0,50,0,210,64,83,70,23,1,54,2,70, +2,2,21,18,37,18,53,18,3,36,0,39,13,6,26,111,25,25,39,0,44,110,6,35,39,110, +14,95,10,1,10,10,0,79,6,95,6,111,6,3,6,50,111,0,0,32,0,2,0,0,32,0,48,0,80, +0,112,0,144,0,176,0,208,0,8,0,0,16,0,48,0,192,0,224,0,5,0,184,255,192,64, +64,14,18,72,0,38,11,81,35,15,14,31,14,175,14,3,15,14,63,14,111,14,127,14, +159,14,175,14,207,14,223,14,8,8,14,64,37,42,72,14,64,27,32,72,14,14,44,31, +115,26,20,7,7,44,116,22,50,118,50,134,50,3,50,6,24,0,63,51,93,237,50,63,51, +237,18,57,47,43,43,94,93,113,51,237,50,1,47,43,93,113,114,237,47,93,18,57, +47,113,51,237,50,16,237,17,18,57,47,237,17,51,17,18,57,49,48,0,93,1,93,0, +93,1,14,3,35,33,53,62,1,61,1,35,53,51,17,52,62,2,51,50,30,2,23,7,46,3,35, +34,6,21,17,33,21,33,21,20,14,2,7,33,50,62,2,55,4,80,9,57,89,115,67,253,70, +89,86,186,186,48,99,152,103,70,123,99,71,18,174,10,39,53,65,36,114,112,1, +152,254,104,22,44,63,40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160, +121,144,129,1,24,92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,254,224, +129,126,56,106,92,71,21,19,42,67,48,0,0,0,2,0,113,0,225,4,2,4,115,0,35,0, +55,0,153,64,119,74,29,90,29,106,29,3,44,29,60,29,2,74,25,90,25,106,25,3,44, +25,60,25,2,69,11,85,11,101,11,3,35,11,51,11,2,69,7,85,7,101,7,3,35,7,51,7, +2,74,34,90,34,106,34,3,45,34,61,34,2,69,20,85,20,101,20,3,35,20,51,20,2,69, +16,85,16,101,16,3,35,16,51,16,2,74,2,90,2,106,2,3,45,2,61,2,2,46,176,18,36, +176,207,0,223,0,2,0,0,1,0,47,57,1,41,176,27,51,176,9,0,47,237,220,237,1,93, +47,93,93,237,220,237,49,48,93,93,93,93,93,93,93,93,0,93,93,93,93,93,93,93, +93,19,52,54,55,39,55,23,62,1,51,50,22,23,55,23,7,30,1,21,20,6,7,23,7,39,14, +1,35,34,38,39,7,39,55,46,1,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,137, +41,37,100,104,99,54,127,73,71,126,54,97,104,96,37,43,44,38,100,102,101,54, +126,71,72,128,52,105,102,102,37,41,154,44,77,102,58,57,102,77,44,44,77,102, +57,58,102,77,44,2,172,71,127,54,100,103,101,39,43,42,38,97,105,96,54,127, +71,71,128,53,100,105,101,37,41,42,38,105,105,102,54,127,73,58,102,76,44,44, +76,102,58,58,102,76,45,45,76,102,0,1,255,254,0,0,4,118,5,129,0,22,0,185,64, +134,151,0,167,0,2,152,17,168,17,2,73,22,1,70,18,1,155,21,171,21,2,74,21,106, +21,122,21,138,21,4,148,19,164,19,2,69,19,101,19,117,19,133,19,4,19,15,18, +31,18,79,18,143,18,4,18,9,21,0,22,16,22,64,22,128,22,4,22,20,4,0,8,92,17, +13,0,9,16,9,64,9,128,9,4,7,9,3,15,81,16,7,11,81,4,47,12,159,12,175,12,3,12, +64,41,45,72,0,12,16,12,32,12,160,12,4,12,20,0,0,16,1,15,16,175,16,2,8,16, +16,8,21,18,3,8,18,0,63,63,51,18,57,47,94,93,113,51,51,222,93,43,113,50,237, +50,16,237,50,1,47,94,93,51,51,253,50,50,57,204,93,50,16,204,93,50,49,48,93, +93,93,93,93,93,93,93,1,33,21,33,21,33,21,33,17,35,17,33,53,33,55,33,53,33, +1,51,9,1,51,2,208,1,65,254,129,1,127,254,129,178,254,131,1,125,2,254,129, +1,64,254,91,199,1,115,1,119,199,2,197,125,154,127,254,209,1,47,127,154,125, +2,188,253,121,2,135,0,2,0,183,254,78,1,93,5,204,0,3,0,7,1,221,64,23,3,7,171, +0,6,4,1,11,4,4,8,9,214,9,230,9,246,9,3,194,9,1,9,184,255,128,179,226,229, +72,9,184,255,192,64,10,222,225,72,2,9,18,9,2,218,9,184,255,128,179,214,217, +72,9,184,255,192,64,20,210,213,72,180,9,196,9,2,162,9,1,1,112,9,128,9,144, +9,3,9,184,255,192,64,20,199,202,72,0,9,1,240,9,1,212,9,228,9,2,176,9,192, +9,2,9,184,255,192,64,43,187,190,72,48,9,64,9,80,9,3,4,9,20,9,36,9,3,240,9, +1,196,9,212,9,228,9,3,128,9,144,9,160,9,3,4,9,20,9,36,9,3,164,9,184,255,192, +179,168,171,72,9,184,255,128,179,160,163,72,9,184,255,192,64,14,156,159,72, +112,9,128,9,144,9,3,228,9,1,9,184,255,192,64,11,145,148,72,176,9,192,9,208, +9,3,9,184,255,192,64,15,133,136,72,48,9,1,20,9,36,9,2,0,9,1,9,184,255,192, +64,15,122,125,72,128,9,1,4,9,20,9,36,9,3,110,9,184,255,192,64,10,114,117, +72,192,9,1,84,9,1,9,184,255,192,182,102,105,72,16,9,1,9,184,255,192,64,9, +91,94,72,80,9,96,9,2,9,184,255,192,64,15,79,82,72,203,9,219,9,2,160,9,176, +9,2,2,9,184,255,192,64,10,68,71,72,15,9,31,9,2,62,9,184,255,192,64,29,56, +61,72,207,9,1,96,9,112,9,160,9,176,9,4,31,9,1,0,9,1,160,9,224,9,240,9,3,9, +184,255,192,64,33,25,28,72,9,64,17,21,72,64,9,112,9,128,9,144,9,4,15,9,31, +9,47,9,3,7,5,0,5,0,1,4,1,0,0,63,47,18,57,57,47,47,1,94,93,93,43,43,113,114, +114,114,114,43,94,93,43,95,93,93,43,113,43,114,43,114,114,43,94,93,93,43, +113,113,113,43,113,43,113,114,43,43,43,94,93,93,93,93,113,113,43,113,113, +113,114,43,114,95,114,114,43,43,94,93,43,43,93,93,17,18,57,47,94,93,51,237, +50,49,48,19,17,51,17,3,17,51,17,183,166,166,166,2,194,3,10,252,246,251,140, +3,11,252,245,0,0,0,0,2,0,115,255,84,4,0,5,204,0,77,0,97,1,79,64,144,117,47, +133,47,2,122,8,138,8,2,100,85,1,43,85,107,85,2,45,81,109,81,2,45,57,109,57, +125,57,141,57,4,85,96,117,96,133,96,3,83,62,115,62,131,62,3,83,90,115,90, +131,90,3,121,80,137,80,2,111,80,1,90,80,1,45,80,1,116,16,132,16,2,54,16,70, +16,2,42,73,1,37,42,1,37,45,1,43,3,1,25,3,1,5,31,21,31,2,5,36,21,36,2,11,76, +27,76,2,14,73,75,34,73,55,144,75,1,75,55,75,55,78,70,29,65,24,6,73,5,5,24, +73,160,78,1,0,78,32,78,64,78,144,78,4,78,184,255,192,179,29,33,72,78,184, +255,192,64,18,21,26,72,78,45,73,44,44,88,73,0,65,32,65,176,65,3,65,184,255, +192,64,68,34,38,72,65,217,55,1,203,55,1,188,55,1,152,55,1,245,3,1,230,3,1, +149,3,1,121,83,1,106,83,1,218,83,1,155,83,1,228,14,244,14,2,166,14,1,119, +14,135,14,2,104,14,1,14,83,93,55,4,0,50,81,45,39,11,81,6,0,0,0,63,50,237, +47,51,237,18,23,57,93,93,93,93,93,93,113,113,93,93,93,93,93,93,93,1,47,43, +93,237,51,47,237,47,43,43,93,113,237,50,16,237,17,18,57,57,17,57,57,47,47, +114,16,237,16,237,49,48,93,93,93,93,93,0,93,93,1,93,0,93,93,93,93,93,93,93, +93,93,93,93,93,1,93,93,93,1,50,30,2,23,7,46,3,35,34,6,21,20,30,2,23,30,3, +21,20,14,2,7,30,3,21,20,14,2,35,34,46,2,39,55,30,3,51,50,62,2,53,52,46,2, +39,46,3,53,52,62,2,55,46,3,53,52,54,1,52,46,2,39,14,3,21,20,30,2,23,62,3, +2,76,79,138,108,73,15,161,8,46,68,84,46,125,129,50,83,109,59,68,139,112,70, +28,55,82,54,49,79,55,30,58,112,164,107,93,154,117,79,19,161,12,54,78,100, +57,58,102,76,45,57,95,123,65,65,131,104,65,32,59,84,53,42,75,57,33,211,1, +225,53,88,113,61,58,89,60,31,49,82,108,60,54,93,68,39,5,204,30,63,98,69,20, +45,58,34,13,79,71,45,64,46,32,14,16,46,73,106,76,45,87,73,55,13,21,51,64, +81,51,73,117,83,44,27,64,104,77,31,55,67,37,13,18,40,65,47,54,72,51,36,16, +15,46,73,105,74,45,83,71,53,15,14,46,64,80,48,139,155,252,203,48,69,51,35, +14,3,33,52,69,39,46,66,48,34,15,1,24,47,70,0,0,0,0,2,0,45,4,195,2,90,5,123, +0,3,0,7,0,193,178,3,133,0,184,255,192,179,19,22,72,0,184,255,192,64,131,13, +16,72,0,7,133,4,64,19,22,72,4,64,14,17,72,4,1,5,145,0,59,4,1,45,4,1,11,4, +27,4,2,57,253,4,1,235,4,1,219,4,1,201,4,1,171,4,187,4,2,153,4,1,141,4,1,1, +4,128,44,48,72,27,4,43,4,2,15,4,1,235,4,251,4,2,191,4,207,4,223,4,3,171,4, +1,159,4,1,123,4,139,4,2,111,4,1,91,4,1,79,4,1,59,4,1,31,4,47,4,2,2,15,4,63, +4,175,4,191,4,4,4,64,22,25,72,4,64,14,17,72,4,0,47,43,43,93,95,113,113,113, +113,113,113,113,113,113,113,114,114,43,95,114,114,114,114,114,114,114,94, +93,93,93,51,237,50,1,47,43,43,237,220,43,43,237,49,48,1,53,51,21,33,53,51, +21,1,183,163,253,211,165,4,195,184,184,184,184,0,0,0,0,3,0,31,255,240,5,197, +5,150,0,25,0,49,0,91,0,245,64,111,138,81,1,10,73,26,73,42,73,3,10,69,26,69, +42,69,3,76,60,1,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,138, +90,154,90,2,53,81,69,81,2,58,61,1,133,52,149,52,2,54,46,70,46,2,54,41,70, +41,2,57,35,73,35,2,57,30,73,30,2,50,196,81,61,95,71,111,71,2,71,61,71,61, +14,0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,68, +15,23,72,26,38,195,111,14,127,14,2,14,60,55,201,66,87,201,76,82,76,15,66, +127,66,2,15,66,31,66,127,66,143,66,159,66,255,66,6,0,76,1,0,76,16,76,112, +76,128,76,144,76,240,76,6,66,76,66,76,7,33,200,21,4,43,200,7,19,0,63,237, +63,237,18,57,57,47,47,93,113,93,113,17,51,16,237,16,237,51,1,47,113,237,47, +43,93,113,237,17,57,57,47,47,93,17,51,237,49,48,0,93,93,93,93,93,93,93,93, +1,93,93,93,93,113,93,93,113,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18, +7,52,46,4,35,34,14,2,21,20,30,2,51,50,62,4,37,20,30,2,51,50,62,2,55,23,14, +3,35,34,46,2,53,52,62,2,51,50,30,2,23,7,46,3,35,34,14,2,5,197,52,94,131,161, +185,100,99,185,160,133,94,52,52,94,132,161,184,100,150,1,7,197,113,92,45, +82,116,140,161,87,130,228,171,99,99,171,228,130,87,161,140,116,82,45,252, +137,33,67,100,67,49,75,56,39,14,115,22,58,82,111,75,101,149,98,48,48,97,146, +98,75,112,80,55,18,114,12,38,55,72,47,69,99,64,30,2,195,100,185,161,131,94, +52,52,94,131,161,185,100,100,184,161,132,94,52,114,196,254,249,150,86,161, +139,115,82,45,99,171,228,130,131,229,171,98,45,81,115,140,161,89,72,120,86, +48,27,45,55,29,35,43,81,63,38,64,114,158,94,97,157,111,59,36,59,75,39,33, +26,50,38,23,46,83,118,0,2,0,26,2,139,2,253,5,152,0,50,0,65,0,203,64,21,45, +40,10,17,72,46,40,10,17,72,3,40,11,17,72,7,24,11,14,72,29,184,255,216,64, +16,9,17,72,23,51,1,39,39,32,226,47,11,212,56,1,56,184,255,192,64,18,19,22, +72,144,56,1,100,56,116,56,132,56,3,80,56,1,2,56,184,255,192,64,20,10,13,72, +56,20,227,21,21,63,227,5,64,22,38,72,5,192,67,1,67,184,255,192,64,51,13,18, +72,26,57,1,11,57,1,57,228,152,20,1,20,8,10,13,72,20,16,11,1,2,11,1,11,11, +26,35,7,51,1,51,228,0,42,42,0,0,32,0,80,0,3,0,0,17,228,26,222,0,63,237,51, +47,93,51,47,16,237,93,50,17,57,47,93,93,51,43,93,237,93,93,1,43,93,47,43, +237,51,47,237,47,43,95,93,93,93,43,113,51,51,237,50,47,0,93,49,48,1,43,43, +43,43,43,1,34,46,2,53,52,62,2,63,1,53,52,46,2,35,34,6,7,39,62,3,51,50,30, +2,21,17,20,22,51,50,54,55,21,14,1,35,34,46,2,39,35,14,1,39,50,62,2,61,1,7, +14,3,21,20,22,1,4,53,86,62,33,51,86,113,62,178,21,39,56,35,67,81,9,149,7, +43,75,108,71,68,109,77,42,28,35,12,22,9,19,42,22,41,57,38,20,2,4,38,132,51, +48,80,57,32,138,41,74,55,32,58,2,139,29,56,82,52,69,92,56,24,1,4,60,46,60, +35,14,59,76,10,47,82,62,35,29,60,95,66,254,204,58,50,5,3,104,5,8,22,39,51, +29,77,70,111,34,55,71,37,65,4,2,11,29,52,43,56,65,0,0,2,0,83,0,141,4,32,3, +172,0,8,0,17,0,113,64,84,106,12,122,12,138,12,3,106,9,122,9,138,9,3,106,3, +122,3,138,3,3,106,0,122,0,138,0,3,17,236,15,235,14,236,95,10,127,10,143,10, +3,64,10,96,10,2,31,10,1,10,7,236,6,235,5,236,176,1,1,95,1,1,32,1,96,1,128, +1,3,1,9,0,239,12,15,3,47,3,111,3,127,3,4,3,0,47,93,51,228,50,1,47,93,113, +113,237,237,237,47,93,93,113,237,237,237,49,48,93,93,93,93,37,1,53,1,51,21, +9,1,21,33,1,53,1,51,21,9,1,21,3,118,254,174,1,82,168,254,174,1,84,253,131, +254,176,1,80,167,254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,1, +109,63,1,115,31,254,140,254,145,29,0,1,0,100,0,180,4,71,2,242,0,5,0,51,64, +19,223,2,1,32,2,1,2,5,170,224,0,1,159,0,1,80,0,1,0,184,255,192,64,9,9,12, +72,0,2,173,0,3,179,0,63,204,237,1,47,43,93,93,93,237,47,93,93,49,48,37,17, +33,53,33,17,3,182,252,174,3,227,180,1,172,146,253,194,0,0,4,0,31,255,240, +5,197,5,150,0,25,0,49,0,63,0,72,0,240,183,4,61,20,61,36,61,3,58,184,255,224, +64,94,11,16,72,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,61, +32,9,13,72,54,46,70,46,2,54,41,70,41,2,57,35,73,35,2,57,30,73,30,2,6,69,22, +69,2,51,62,62,69,63,69,53,196,54,64,196,59,59,50,63,63,16,54,63,54,63,14, +0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,60,15, +23,72,26,38,195,111,14,127,14,2,14,50,50,54,62,52,201,69,9,68,25,68,2,68, +201,55,15,54,31,54,127,54,3,223,55,1,0,55,16,55,112,55,3,54,69,55,55,69,54, +3,7,33,200,21,4,43,200,7,19,0,63,237,63,237,18,23,57,47,47,47,93,113,93,16, +237,93,16,237,50,17,51,47,1,47,113,237,47,43,93,113,237,17,57,57,47,47,56, +17,51,51,47,237,16,237,50,17,18,57,17,51,0,93,49,48,93,93,93,93,43,1,93,93, +93,93,43,93,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18,7,52,46,4,35,34, +14,2,21,20,30,2,51,50,62,4,1,3,35,17,35,17,33,50,22,21,20,6,7,19,3,52,38, +43,1,17,51,50,54,5,197,52,94,131,161,185,100,99,185,160,133,94,52,52,94,132, +161,184,100,150,1,7,197,113,92,45,82,116,140,161,87,130,228,171,99,99,171, +228,130,87,161,140,116,82,45,254,82,199,161,127,1,51,142,151,104,85,221,159, +95,81,170,182,80,84,2,195,100,185,161,131,94,52,52,94,131,161,185,100,100, +184,161,132,94,52,114,196,254,249,150,86,161,139,115,82,45,99,171,228,130, +131,229,171,98,45,81,115,140,161,254,181,1,80,254,176,3,63,126,111,102,123, +19,254,162,2,80,69,72,254,211,85,0,0,1,255,239,5,172,4,124,6,10,0,3,0,14, +180,1,0,2,140,1,0,47,237,1,47,47,49,48,1,33,53,33,4,124,251,115,4,141,5,172, +94,0,0,0,0,2,0,122,3,92,2,184,5,150,0,19,0,39,0,66,185,0,17,255,232,179,9, +12,72,13,184,255,232,64,33,9,12,72,7,24,9,12,72,3,24,9,12,72,20,172,0,30, +172,0,10,16,10,32,10,3,10,35,175,5,25,175,15,4,0,63,237,220,237,1,47,93,237, +220,237,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7, +52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,184,45,78,105,59,59,104,78,46, +46,78,104,59,59,105,78,45,109,27,48,65,38,37,65,48,28,28,48,65,37,38,65,48, +27,4,121,59,104,77,45,45,77,104,59,60,104,77,44,44,77,104,60,37,66,49,28, +28,49,66,37,37,65,49,29,29,49,65,0,0,0,2,0,65,0,0,4,36,4,195,0,11,0,15,0, +85,64,53,13,222,4,1,140,4,1,4,2,14,209,11,1,131,11,1,11,9,1,170,6,32,2,1, +2,13,173,12,151,2,1,2,0,4,173,9,152,7,1,7,239,5,1,80,5,128,5,160,5,208,5, +4,5,0,47,93,93,51,93,51,237,50,50,93,47,237,1,47,93,51,253,50,222,93,93,196, +16,222,93,93,196,49,48,1,17,35,17,33,53,33,17,51,17,33,21,1,53,33,21,2,124, +147,254,88,1,168,147,1,168,252,29,3,227,2,168,254,117,1,139,145,1,138,254, +118,145,253,88,145,145,0,0,1,0,41,2,51,2,131,5,141,0,34,0,142,64,56,6,18, +1,6,17,1,6,12,1,106,31,122,31,138,31,3,89,15,105,15,2,106,14,1,73,14,89,14, +2,10,3,26,3,2,10,2,26,2,58,2,74,2,4,58,17,90,17,106,17,3,6,23,22,23,2,23, +184,255,224,64,40,9,15,72,33,25,225,32,8,1,32,8,96,8,160,8,224,8,4,8,14,224, +15,15,32,191,0,1,0,8,32,14,11,228,20,222,1,32,229,0,223,0,63,237,50,63,237, +51,18,57,1,47,93,51,51,47,237,47,93,113,237,50,49,48,43,0,93,93,1,93,93,0, +93,93,93,93,1,113,113,113,19,39,62,5,53,52,38,35,34,6,7,39,62,3,51,50,30, +2,21,20,14,4,7,33,21,43,2,27,88,100,103,82,52,71,74,68,88,8,133,6,46,76,107, +68,65,103,71,37,54,83,102,95,78,18,1,187,2,51,103,61,96,81,72,73,80,49,62, +75,73,68,8,51,87,64,37,33,60,86,54,62,100,86,75,73,74,42,113,0,0,1,0,27,2, +39,2,130,5,141,0,53,0,150,64,17,102,6,1,102,8,1,86,9,102,9,2,89,34,105,34, +2,42,184,255,232,64,80,11,15,72,2,32,9,13,72,48,45,21,21,15,8,28,225,45,45, +0,225,32,15,96,15,2,32,15,96,15,160,15,224,15,4,15,34,225,8,35,1,35,35,9, +225,191,8,1,8,64,24,37,72,8,49,21,228,22,22,12,105,34,1,72,34,88,34,2,34, +31,228,40,222,12,228,71,9,1,9,3,221,0,63,51,93,237,63,237,51,93,93,18,57, +47,237,57,1,47,43,93,237,51,47,113,237,47,93,113,237,50,47,237,17,18,57,47, +18,57,49,48,0,43,43,93,93,93,93,1,20,6,35,34,46,2,39,55,30,1,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,6, +7,21,30,3,2,130,155,142,87,116,73,36,6,136,9,88,85,77,83,37,56,67,29,61,57, +29,61,50,32,74,71,68,84,6,135,7,50,79,102,59,69,104,70,35,86,90,52,75,48, +22,3,27,116,128,39,64,81,43,13,67,69,72,76,45,54,29,9,109,13,31,53,40,60, +69,70,65,12,58,86,57,28,33,59,79,46,75,110,20,2,5,37,54,69,0,0,1,0,72,4,177, +1,240,5,228,0,5,0,55,64,37,70,4,1,122,2,138,2,2,128,3,1,3,64,143,0,1,0,64, +9,13,72,0,2,149,128,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,26,237,1,47,43, +93,26,205,93,49,48,93,93,19,53,19,51,21,1,72,217,207,254,182,4,177,20,1,31, +29,254,234,0,1,0,140,254,87,4,109,4,58,0,39,0,136,64,74,29,32,9,17,72,138, +37,154,37,2,108,37,124,37,2,37,24,14,17,72,22,22,13,70,64,31,79,12,1,127, +12,143,12,159,12,3,12,64,32,35,72,12,64,20,23,72,0,12,1,12,41,128,39,2,70, +0,1,16,1,48,1,224,1,240,1,5,8,1,96,41,128,41,2,41,184,255,192,64,17,20,23, +72,31,8,80,35,22,19,80,26,22,12,1,15,0,27,0,63,63,51,63,237,63,237,50,1,43, +93,47,94,93,237,50,26,16,220,93,43,43,93,113,50,26,237,50,47,49,48,43,0,93, +93,1,43,19,17,51,17,20,30,2,51,50,54,53,17,51,17,20,30,2,51,50,54,55,21,14, +1,35,34,46,2,39,35,14,1,35,34,38,39,17,140,181,32,58,84,52,128,146,180,11, +20,29,18,11,32,11,26,51,36,54,71,44,20,2,3,52,147,100,67,109,31,254,87,5, +227,253,82,78,106,65,28,174,162,2,115,252,208,44,56,32,13,5,3,129,8,12,30, +52,71,41,95,99,41,38,254,28,0,0,0,0,1,0,80,254,248,3,245,5,129,0,19,0,61, +64,39,12,1,15,2,191,2,207,2,3,2,5,95,6,111,6,127,6,175,6,191,6,5,0,6,16,6, +48,6,3,6,7,7,1,0,4,17,3,6,1,0,47,51,63,205,50,18,57,47,1,47,93,93,205,220, +93,205,47,49,48,1,17,35,17,35,17,35,17,34,46,2,53,52,62,2,51,33,21,3,116, +112,217,113,80,133,96,53,50,95,138,87,2,51,5,27,249,221,6,35,249,221,3,190, +45,88,133,89,84,133,93,50,102,0,0,1,0,187,1,190,1,126,2,154,0,3,0,38,64,24, +3,150,0,0,16,0,176,0,3,7,0,0,155,15,1,31,1,2,1,64,15,38,72,1,0,47,43,93,237, +1,47,94,93,237,49,48,19,53,51,21,187,195,1,190,220,220,0,0,0,1,0,119,254, +78,1,227,0,0,0,27,0,126,64,16,24,32,20,23,72,25,32,20,23,72,70,26,86,26,2, +2,184,255,232,179,9,17,72,27,184,255,224,64,62,9,17,72,24,16,25,32,25,48, +25,3,25,131,23,22,22,8,16,131,47,0,1,31,0,1,15,0,111,0,2,8,0,239,8,1,8,19, +25,64,9,13,72,25,25,5,23,11,140,32,5,80,5,96,5,112,5,176,5,192,5,6,5,0,47, +93,237,47,18,57,47,43,205,1,47,93,221,94,93,113,114,237,18,57,47,51,237,93, +50,49,48,43,43,93,43,43,5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35, +42,1,7,55,51,7,30,1,1,227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14, +29,14,65,107,39,94,94,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,182,100, +3,81,0,0,1,0,80,2,51,2,125,5,129,0,10,0,75,64,44,32,5,48,5,2,96,9,1,9,9,8, +224,2,32,4,48,4,2,4,111,0,1,0,0,4,6,3,32,2,144,2,2,2,5,4,4,3,6,220,8,1,228, +0,223,0,63,237,50,63,51,51,47,51,1,47,93,23,51,47,93,47,0,93,1,16,237,50, +47,93,49,48,0,93,19,53,51,17,7,53,55,51,17,51,21,80,211,202,210,123,215,2, +51,107,2,108,138,120,137,253,29,107,0,0,0,0,2,0,27,2,139,2,211,5,152,0,15, +0,35,0,130,185,0,13,255,232,179,7,12,72,9,184,255,224,64,43,7,12,72,4,32, +7,12,72,2,32,7,12,72,0,227,4,16,36,16,52,16,100,16,4,148,16,180,16,196,16, +212,16,244,16,5,128,16,1,2,0,16,1,16,184,255,192,64,38,12,16,72,16,26,227, +6,64,22,33,72,6,239,37,1,112,37,128,37,2,47,37,1,31,228,0,3,32,3,80,3,3,3, +3,21,228,11,222,0,63,237,51,47,93,237,1,93,93,93,47,43,237,47,43,93,95,93, +93,113,237,49,48,0,43,43,43,43,1,20,6,35,34,38,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,211,176,175,168,177,43,87,131,88, +93,131,84,39,149,25,50,72,48,48,75,51,26,28,51,70,43,49,75,52,27,4,18,188, +203,201,190,91,145,101,53,53,100,145,92,83,110,65,27,27,66,110,82,84,110, +66,26,26,66,110,0,2,0,83,0,141,4,32,3,172,0,8,0,17,0,133,64,100,101,15,117, +15,133,15,3,101,9,117,9,133,9,3,101,6,117,6,133,6,3,101,0,117,0,133,0,3,13, +236,10,236,17,235,15,12,1,239,12,1,112,12,128,12,2,208,12,1,63,12,111,12, +127,12,3,0,12,1,12,4,236,1,236,8,235,112,3,128,3,176,3,3,176,3,208,3,2,63, +3,1,0,3,32,3,2,3,10,0,239,14,15,5,47,5,111,5,127,5,4,5,0,47,93,51,228,50, +1,47,93,93,93,113,253,237,237,47,93,93,93,113,113,114,253,237,237,49,48,93, +93,93,93,37,35,53,9,1,53,51,1,21,1,35,53,9,1,53,51,1,21,2,206,168,1,82,254, +176,166,1,82,252,221,170,1,82,254,176,168,1,79,141,29,1,111,1,116,31,254, +141,63,254,147,29,1,111,1,116,31,254,141,63,255,255,0,56,0,0,6,78,5,129,16, +38,0,121,232,0,16,39,2,20,2,249,0,0,17,7,2,141,3,184,253,207,0,31,64,18,1, +191,12,1,112,12,1,96,12,1,16,12,1,12,3,2,17,24,0,63,53,53,1,17,93,93,93,93, +53,0,0,0,255,255,0,56,0,0,6,117,5,129,16,38,0,121,232,0,16,39,2,20,2,249, +0,0,17,7,0,114,3,242,253,207,0,47,64,30,2,111,15,1,47,15,1,15,1,191,12,1, +112,12,1,96,12,1,16,12,1,12,51,64,11,11,72,2,15,24,0,63,53,1,43,17,93,93, +93,93,53,17,93,93,53,0,0,0,255,255,0,73,0,0,6,78,5,141,16,39,2,20,3,13,0, +0,16,39,2,141,3,184,253,207,17,6,0,115,46,0,0,33,64,20,0,112,0,1,96,0,1,16, +0,1,0,83,64,11,11,72,1,2,6,24,0,63,53,53,1,43,17,93,93,93,53,0,0,2,0,131, +254,164,4,86,4,58,0,37,0,41,0,159,64,112,121,4,137,4,2,122,35,138,35,2,122, +36,138,36,2,84,26,100,26,2,58,6,74,6,122,6,138,6,4,10,72,9,9,176,39,192,39, +2,39,150,40,40,0,28,70,95,27,127,27,2,27,64,29,60,72,27,64,23,27,72,32,27, +1,27,19,70,0,64,29,60,72,0,64,23,27,72,0,64,13,17,72,32,0,1,0,32,43,1,19, +33,9,40,156,41,15,67,27,1,27,24,95,47,33,63,33,2,111,33,207,33,2,33,0,47, +93,113,237,51,93,63,253,206,17,57,1,93,47,93,43,43,43,237,47,93,43,43,93, +237,18,57,47,237,113,51,47,237,49,48,93,0,93,1,93,0,93,1,93,55,52,62,6,55, +51,14,7,21,20,30,2,51,50,54,55,23,14,3,35,34,46,2,1,21,35,53,131,37,62,79, +82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184,11,67, +121,179,122,114,178,123,64,2,113,195,50,71,108,85,67,60,58,68,83,55,69,104, +80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103,147,4,100, +201,201,0,0,0,255,255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,148,1,78,0, +0,0,21,180,2,21,5,38,2,184,255,225,180,22,25,4,7,37,1,43,53,0,43,53,0,255, +255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,149,1,219,0,0,0,19,64,11,2,21, +5,38,2,76,21,24,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,6,254,18, +38,0,36,0,0,17,7,2,150,1,96,0,0,0,19,64,11,2,22,5,38,2,0,27,21,4,7,37,1,43, +53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,7,6,18,38,0,36,0,0,17,7,2,153,1,94, +0,0,0,19,64,11,2,21,5,38,2,2,30,44,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0, +4,0,0,5,82,6,178,18,38,0,36,0,0,17,7,2,152,1,108,0,0,0,23,64,13,3,2,21,5, +38,3,2,4,25,23,4,7,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,4,0,0,5,82,6, +251,18,38,0,36,0,0,17,7,1,76,1,137,0,136,0,22,64,12,3,2,56,3,3,2,3,31,21, +4,7,37,1,43,53,53,0,63,53,53,0,2,0,24,0,0,7,168,5,129,0,15,0,26,0,136,64, +86,116,25,1,114,2,1,86,2,102,2,2,115,3,131,3,2,85,3,101,3,2,127,5,143,5,2, +109,5,1,92,5,1,25,5,41,5,2,0,7,1,11,7,11,7,0,16,14,32,14,2,14,2,25,3,17,3, +4,17,9,13,90,26,5,0,2,95,25,25,5,4,12,95,9,9,13,16,8,95,5,3,4,18,13,95,0, +18,0,63,237,63,63,237,50,18,57,47,237,17,18,57,47,237,1,47,51,51,237,50,51, +47,51,17,18,57,57,47,93,18,57,57,47,47,113,49,48,93,93,93,93,93,93,93,93, +93,33,17,33,3,35,1,33,21,33,17,33,21,33,17,33,21,1,35,14,5,7,3,33,3,201,253, +220,198,199,2,174,4,185,253,9,2,187,253,69,3,32,252,33,151,1,16,22,27,24, +18,2,217,1,222,1,156,254,100,5,129,156,254,60,154,254,21,156,4,238,3,35,50, +58,51,38,5,254,51,0,0,255,255,0,104,254,78,5,121,5,150,18,38,0,38,0,0,17, +7,0,120,1,254,0,0,0,11,182,1,58,48,40,26,16,37,1,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,240,18,38,0,40,0,0,17,7,2,148,1,63,0,0,0,21,180,1,12,5,38,1,184, +255,170,180,13,16,0,10,37,1,43,53,0,43,53,0,255,255,0,168,0,0,4,254,6,240, +18,38,0,40,0,0,17,7,2,149,1,223,0,0,0,19,64,11,1,12,5,38,1,40,12,15,0,10, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40,0,0,17, +7,2,150,1,119,0,0,0,21,180,1,13,5,38,1,184,255,239,180,18,12,0,10,37,1,43, +53,0,43,53,0,255,255,0,168,0,0,4,254,6,178,18,38,0,40,0,0,17,7,2,152,1,121, +0,0,0,25,182,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10,37,1,43,53,53,0,43, +53,53,0,255,255,0,9,0,0,1,177,6,240,18,38,0,44,0,0,17,6,2,148,159,0,0,21, +180,1,4,5,38,1,184,255,193,180,5,8,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0, +142,0,0,2,54,6,240,18,38,0,44,0,0,17,6,2,149,70,0,0,19,64,11,1,4,5,38,1,69, +4,7,0,2,37,1,43,53,0,43,53,0,255,255,255,210,0,0,2,104,6,254,18,38,0,44,0, +0,17,6,2,150,210,0,0,19,64,11,1,5,5,38,1,0,10,4,0,2,37,1,43,53,0,43,53,0, +255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218,0,0,23,64,13,2,1, +4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,2,0,14,0,0,5,101,5,129, +0,16,0,33,0,112,64,69,117,10,1,91,32,139,32,2,91,31,139,31,2,90,20,138,20, +2,91,19,1,10,31,26,31,2,10,20,26,20,2,26,26,28,8,90,64,15,17,1,17,35,128, +24,28,90,14,16,16,1,14,27,16,95,24,127,0,1,0,0,2,28,95,14,18,23,95,2,3,0, +63,237,63,237,17,57,47,113,51,237,50,1,47,51,51,47,16,237,50,26,16,220,113, +26,237,18,57,47,49,48,93,93,93,0,93,1,93,93,0,93,19,51,17,33,50,4,22,18,21, +20,2,14,1,35,33,17,35,37,52,46,2,35,33,17,33,21,33,17,33,50,62,2,14,154,1, +210,163,1,19,198,111,106,184,251,145,253,241,154,4,151,82,148,206,123,254, +241,1,150,254,106,1,58,111,189,138,78,3,33,2,96,81,169,254,252,180,176,254, +243,181,93,2,135,72,143,203,130,61,254,57,154,254,18,72,142,212,0,255,255, +0,168,0,0,5,32,7,6,18,38,0,49,0,0,17,7,2,153,1,161,0,0,0,19,64,11,1,20,5, +38,1,12,29,43,8,18,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +240,18,38,0,50,0,0,17,7,2,148,1,182,0,0,0,21,180,2,40,5,38,2,184,255,216, +180,41,44,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255,236,5,215,6,240,18,38, +0,50,0,0,17,7,2,149,2,37,0,0,0,19,64,11,2,40,5,38,2,37,40,43,10,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6,254,18,38,0,50,0,0,17,7,2,150, +1,213,0,0,0,19,64,11,2,41,5,38,2,4,46,40,10,0,37,1,43,53,0,43,53,0,0,0,255, +255,0,97,255,236,5,215,7,6,18,38,0,50,0,0,17,7,2,153,1,193,0,0,0,21,180,2, +40,5,38,2,184,255,245,180,49,63,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255, +236,5,215,6,178,18,38,0,50,0,0,17,7,2,152,1,215,0,0,0,25,182,3,2,40,5,38, +3,2,184,255,255,180,44,42,10,0,37,1,43,53,53,0,43,53,53,0,0,1,0,142,0,225, +4,31,4,115,0,11,0,129,185,0,5,255,232,179,18,22,72,3,184,255,232,64,14,18, +22,72,11,24,18,22,72,9,24,18,22,72,8,184,255,232,179,18,22,72,6,184,255,232, +64,14,18,22,72,2,24,18,22,72,0,24,18,22,72,7,184,255,232,64,14,18,22,72,1, +24,18,22,72,10,24,18,22,72,4,184,255,232,64,23,18,22,72,212,4,228,4,2,180, +4,196,4,212,4,3,32,4,1,4,0,7,1,7,0,25,47,113,1,47,93,93,113,49,48,0,43,43, +1,43,43,43,43,43,43,0,43,43,43,43,19,9,1,55,9,1,23,9,1,7,9,1,142,1,98,254, +160,104,1,94,1,94,105,254,162,1,96,102,254,159,254,156,1,74,1,98,1,96,103, +254,159,1,95,105,254,164,254,160,105,1,97,254,157,0,3,0,71,255,203,5,244, +5,186,0,27,0,39,0,51,0,196,64,141,89,44,1,8,37,1,84,33,1,5,26,21,26,101,26, +3,139,23,1,123,22,139,22,2,108,22,1,90,22,1,105,16,1,10,12,26,12,2,132,9, +1,116,8,132,8,2,99,8,1,85,8,1,27,50,91,50,2,114,43,130,43,2,84,43,1,20,38, +84,38,2,85,37,1,140,31,1,74,31,90,31,122,31,3,4,21,20,21,100,21,3,11,7,27, +7,107,7,3,32,44,40,0,91,64,15,28,1,28,53,128,32,53,1,40,91,175,14,191,14, +2,32,14,1,15,14,31,14,2,14,43,31,35,47,95,23,19,4,35,95,9,5,19,0,63,51,237, +63,51,237,17,57,57,1,47,93,93,93,237,93,26,16,220,113,26,237,18,57,57,49, +48,0,93,93,93,93,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,1,20,2,6,4,35,34,38,39,7,35,55,38,2,53,52,18,54,36,51,50,22,23,55,51,7, +22,18,7,52,38,39,1,30,1,51,50,62,2,37,20,22,23,1,46,1,35,34,14,2,5,215,95, +180,254,252,165,127,206,81,120,190,200,88,86,92,178,1,5,169,125,207,82,121, +192,201,85,87,195,49,49,253,59,59,150,93,132,191,123,59,252,15,50,51,2,195, +59,151,92,126,190,127,63,2,199,165,254,242,192,104,58,54,145,241,97,1,10, +160,165,1,10,187,101,56,54,146,242,94,254,253,160,112,184,72,252,171,44,47, +86,153,212,125,113,190,75,3,85,42,46,80,148,208,0,0,255,255,0,158,255,236, +5,41,6,240,18,38,0,56,0,0,17,7,2,148,1,141,0,0,0,21,180,1,26,5,38,1,184,255, +232,180,27,30,5,20,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,6,240, +18,38,0,56,0,0,17,7,2,149,1,237,0,0,0,19,64,11,1,26,5,38,1,37,26,29,5,20, +37,1,43,53,0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,254,18,38,0,56,0,0, +17,7,2,150,1,152,0,0,0,19,64,11,1,27,5,38,1,0,32,26,5,20,37,1,43,53,0,43, +53,0,0,0,255,255,0,158,255,236,5,41,6,178,18,38,0,56,0,0,17,7,2,152,1,158, +0,0,0,25,182,2,1,26,5,38,2,1,184,255,254,180,30,28,5,20,37,1,43,53,53,0,43, +53,53,0,255,255,0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,149,1,208,0,0,0, +19,64,11,1,9,5,38,1,65,9,12,4,8,37,1,43,53,0,43,53,0,0,0,0,2,0,168,0,0,4, +234,5,129,0,16,0,27,0,95,64,63,150,15,1,116,26,132,26,2,123,18,139,18,2,0, +90,16,17,48,17,144,17,3,255,17,1,0,17,16,17,32,17,64,17,4,17,22,11,7,90,0, +8,16,8,64,8,3,7,8,22,95,6,21,95,11,6,11,6,11,7,9,3,7,18,0,63,63,18,57,57, +47,47,16,237,16,237,1,47,94,93,237,50,50,47,93,93,113,237,49,48,0,93,93,93, +1,20,14,2,35,33,17,35,17,51,21,33,50,30,2,7,52,38,35,33,17,33,50,62,2,4,234, +59,121,182,123,254,98,191,191,1,146,125,186,124,62,192,164,164,254,133,1, +131,82,121,79,38,2,223,88,159,120,71,254,215,5,129,252,60,111,156,99,134, +149,253,192,44,79,107,0,0,0,0,1,0,142,255,236,4,143,5,204,0,67,0,214,64,150, +149,51,1,133,63,149,63,2,133,47,149,47,2,133,46,149,46,2,118,65,1,118,56, +1,83,26,131,26,147,26,3,92,39,108,39,124,39,3,107,22,1,58,22,1,145,52,1,21, +52,37,52,2,22,66,38,66,118,66,3,26,3,42,3,2,61,72,24,54,72,31,32,24,1,31, +31,1,9,24,31,31,24,9,3,43,0,72,64,48,17,160,17,2,160,17,176,17,2,17,69,128, +42,70,0,43,16,43,48,43,3,8,43,112,69,1,63,69,79,69,2,212,31,1,197,31,1,182, +31,1,219,17,1,202,17,1,185,17,1,31,17,5,36,80,49,0,43,21,14,80,5,22,0,63, +237,63,63,237,18,57,57,93,93,93,93,93,93,1,93,93,47,94,93,237,26,16,220,93, +113,26,237,18,23,57,47,47,47,93,93,16,237,16,237,49,48,0,93,1,93,93,93,93, +93,0,93,93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,38,47,1,30,3,51,50,54,53, +52,46,4,53,52,62,4,53,52,46,2,35,34,14,2,21,17,35,17,52,62,2,51,50,30,2,21, +20,14,4,21,20,30,4,4,143,41,87,136,94,80,148,55,2,25,67,74,78,37,92,98,54, +81,95,81,54,33,49,58,49,33,33,63,90,57,68,107,73,39,180,63,120,174,110,102, +155,105,53,33,51,58,51,33,55,82,95,82,55,1,39,66,115,85,49,25,24,164,14,25, +19,11,86,79,56,77,62,57,73,98,73,51,73,58,48,52,63,43,37,62,45,26,35,77,122, +88,252,3,4,3,118,173,112,54,46,80,109,62,61,90,69,53,47,48,28,38,59,57,64, +85,114,0,0,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,67,0, +188,0,0,0,21,180,2,66,17,38,2,184,255,149,180,67,70,3,36,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,116,1,84,0,0, +0,19,64,11,2,66,17,38,2,11,66,69,3,36,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,115,5,211,18,38,0,68,0,0,17,7,1,71,0,218,0,0,0,21,180,2,67,17, +38,2,184,255,192,180,72,66,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236, +4,115,5,189,18,38,0,68,0,0,17,7,1,78,0,245,0,0,0,21,180,2,66,17,38,2,184, +255,224,180,75,89,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,115,5, +123,18,38,0,68,0,0,17,7,0,105,0,235,0,0,0,25,182,3,2,66,17,38,3,2,184,255, +202,180,70,68,3,36,37,1,43,53,53,0,43,53,53,0,255,255,0,87,255,236,4,115, +6,115,18,38,0,68,0,0,17,7,1,76,1,8,0,0,0,25,182,3,2,71,17,38,3,2,184,255, +200,180,76,66,3,36,37,1,43,53,53,0,43,53,53,0,0,3,0,66,255,236,6,194,4,78, +0,62,0,79,0,88,0,251,64,96,134,54,1,122,36,1,123,58,1,117,8,133,8,2,101,68, +117,68,133,68,3,124,86,1,106,86,1,126,81,1,106,81,1,101,4,117,4,2,41,47,1, +41,44,1,24,40,9,13,72,10,28,26,28,2,17,53,88,1,70,33,31,79,79,79,95,79,127, +79,4,79,79,80,25,9,73,10,10,61,71,64,31,80,47,80,63,80,3,144,80,1,80,90,128, +44,71,45,184,255,192,64,19,21,28,72,45,45,71,71,25,64,12,15,72,25,62,80,80, +80,6,53,184,255,184,64,43,17,73,53,83,80,56,16,63,81,33,33,74,50,143,44,1, +43,44,1,44,44,39,80,50,16,17,74,80,22,22,6,80,15,239,9,1,128,9,1,9,9,15,22, +0,63,51,47,93,93,16,237,63,237,50,63,237,51,47,93,93,17,18,57,47,237,63,237, +50,43,18,57,47,237,1,47,43,237,51,47,43,237,26,16,220,93,113,26,237,50,47, +237,17,18,57,47,93,51,237,50,57,57,49,48,93,43,0,93,93,1,93,0,93,93,93,93, +1,93,0,93,1,93,0,93,93,1,21,30,3,51,50,54,55,23,14,3,35,32,3,14,3,35,34,38, +53,52,62,4,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,23,62,1,51,50,30, +2,29,1,37,7,14,5,21,20,22,51,50,62,2,53,37,46,1,35,34,14,2,7,3,200,1,34,70, +109,78,117,141,25,158,17,61,102,153,108,254,191,102,29,74,102,137,93,167, +169,38,67,91,107,117,60,240,26,57,88,61,54,88,64,39,7,188,10,58,105,159,112, +128,172,49,63,177,106,136,183,111,47,252,80,195,40,81,76,66,49,28,100,93, +90,129,83,40,2,246,15,144,135,45,96,81,54,4,1,247,17,82,136,98,55,94,72,45, +45,91,73,47,1,1,51,93,71,42,172,150,71,108,78,51,32,13,1,4,59,67,94,58,27, +15,39,67,51,17,64,107,78,43,70,69,74,65,88,155,210,122,24,31,4,1,6,18,31, +51,73,51,87,97,63,98,116,53,196,171,157,29,74,127,98,255,255,0,87,254,78, +3,202,4,78,18,38,0,70,0,0,17,7,0,120,1,12,0,0,0,11,182,1,40,48,40,19,9,37, +1,43,53,0,0,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,67,0, +221,0,0,0,21,180,2,38,17,38,2,184,255,228,180,39,42,17,27,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,116,1,112,0,0, +0,19,64,11,2,38,17,38,2,84,38,41,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,24,5,211,18,38,0,72,0,0,17,7,1,71,0,245,0,0,0,19,64,11,2,39, +17,38,2,8,44,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,24, +5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3,2,4,42, +40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,10,0,0,1,178,5,228,18,38, +0,241,0,0,17,6,0,67,160,0,0,21,180,1,4,17,38,1,184,255,194,180,5,8,0,2,37, +1,43,53,0,43,53,0,0,0,255,255,0,135,0,0,2,47,5,228,18,38,0,241,0,0,17,6,0, +116,63,0,0,19,64,11,1,4,17,38,1,63,4,7,0,2,37,1,43,53,0,43,53,0,255,255,255, +211,0,0,2,105,5,211,18,38,0,241,0,0,17,6,1,71,211,0,0,19,64,11,1,5,17,38, +1,2,10,4,0,2,37,1,43,53,0,43,53,0,255,255,0,8,0,0,2,53,5,123,18,38,0,241, +0,0,17,6,0,105,219,0,0,23,64,13,2,1,4,17,38,2,1,2,8,6,0,2,37,1,43,53,53,0, +43,53,53,0,0,2,0,86,255,236,4,39,5,234,0,39,0,57,0,190,64,94,100,51,1,100, +56,1,107,42,1,107,48,1,10,14,26,14,2,37,17,53,17,69,17,3,6,8,22,8,2,23,26, +29,3,50,15,28,31,28,2,28,28,50,35,71,40,64,19,16,13,3,40,17,64,14,19,72,22, +5,17,17,5,144,40,1,144,40,160,40,2,40,59,128,50,71,31,5,1,5,26,19,29,16,4, +17,27,27,22,45,80,13,80,10,1,10,184,255,192,64,28,7,10,72,82,17,1,36,17,52, +17,68,17,3,2,17,18,17,2,10,17,10,17,22,0,53,80,0,22,0,63,237,63,57,57,47, +47,93,93,93,43,93,51,237,17,51,47,18,23,57,1,47,93,237,26,16,204,93,113,17, +57,47,18,57,43,18,23,57,26,16,237,17,57,47,93,18,23,57,49,48,0,93,93,1,93, +0,93,93,93,93,5,34,46,2,53,52,62,2,51,50,22,23,46,1,39,5,53,55,46,1,39,51, +30,1,23,37,15,1,30,3,29,1,20,14,2,19,52,46,2,35,34,14,2,21,20,22,51,50,62, +2,2,54,125,181,118,56,52,116,186,133,71,117,43,43,115,76,254,211,218,56,120, +66,209,45,83,42,1,50,1,211,81,129,88,47,57,120,188,176,33,71,113,80,81,115, +73,33,144,145,81,118,75,36,20,73,132,185,111,107,182,134,75,32,27,86,176, +69,133,114,94,45,78,35,20,51,31,132,112,92,74,176,200,223,121,6,122,196,138, +74,1,245,94,137,90,44,45,92,137,91,190,178,44,90,139,0,255,255,0,140,0,0, +3,242,5,189,18,38,0,81,4,0,17,7,1,78,0,245,0,0,0,19,64,11,1,38,17,38,1,5, +47,61,19,36,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,228,18,38, +0,82,0,0,17,7,0,67,0,223,0,0,0,21,180,2,35,17,38,2,184,255,228,180,36,39, +8,0,37,1,43,53,0,43,53,0,255,255,0,86,255,236,4,29,5,228,18,38,0,82,0,0,17, +7,0,116,1,103,0,0,0,19,64,11,2,35,17,38,2,73,35,38,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,86,255,236,4,29,5,211,18,38,0,82,0,0,17,7,1,71,0,240,0,0, +0,19,64,11,2,36,17,38,2,1,41,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86, +255,236,4,29,5,189,18,38,0,82,0,0,17,7,1,78,0,247,0,0,0,19,64,11,2,35,17, +38,2,13,44,58,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,123, +18,38,0,82,0,0,17,7,0,105,0,250,0,0,0,23,64,13,3,2,35,17,38,3,2,4,39,37,8, +0,37,1,43,53,53,0,43,53,53,0,0,0,0,3,0,65,0,223,4,36,4,117,0,3,0,7,0,11,0, +75,64,48,3,11,171,0,8,8,4,128,6,160,6,2,95,6,1,32,6,1,6,63,4,95,4,111,4,3, +4,9,174,64,8,144,8,2,8,4,173,5,0,174,79,1,159,1,2,1,5,179,0,63,222,93,237, +16,253,222,93,237,1,47,93,47,93,93,93,18,57,47,51,237,50,49,48,1,53,51,21, +1,53,33,21,1,53,51,21,1,222,168,253,187,3,227,253,186,168,3,190,183,183,254, +162,146,146,254,127,183,183,0,0,3,0,44,255,218,4,180,4,92,0,22,0,34,0,45, +0,161,64,93,117,33,133,33,2,117,27,133,27,2,122,38,138,38,2,122,44,138,44, +2,150,16,1,66,16,1,77,5,1,68,21,1,75,10,1,27,38,35,0,71,64,15,23,207,23,2, +159,23,175,23,255,23,3,23,47,128,35,71,0,12,1,0,12,16,12,32,12,64,12,240, +12,5,7,12,144,47,160,47,240,47,3,224,47,1,223,47,1,0,47,32,47,2,47,184,255, +192,64,16,13,21,72,37,26,30,41,80,18,14,16,30,80,7,3,22,0,63,51,237,63,51, +237,17,57,57,1,43,93,93,93,113,47,94,93,113,237,26,16,220,93,113,26,237,18, +57,57,49,48,93,93,0,93,93,93,93,1,93,93,0,93,1,16,2,35,34,38,39,7,35,55,46, +1,53,16,33,50,22,23,55,51,7,30,1,7,52,38,39,1,30,1,51,50,62,2,37,20,23,1, +46,1,35,34,14,2,4,88,250,238,97,156,60,100,167,184,41,42,1,229,103,156,57, +91,167,173,42,39,189,12,11,254,29,38,105,62,69,112,78,42,253,179,24,1,226, +37,104,66,69,111,78,41,2,30,254,228,254,234,48,50,116,214,68,182,116,2,48, +46,45,105,201,69,185,119,68,109,44,253,206,49,39,39,98,166,126,130,85,2,49, +45,36,41,99,164,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0, +67,0,236,0,0,0,21,180,1,38,17,38,1,184,255,236,180,39,42,36,19,37,1,43,53, +0,43,53,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0,116,1,87, +0,0,0,19,64,11,1,38,17,38,1,53,38,41,36,19,37,1,43,53,0,43,53,0,0,0,255,255, +0,139,255,236,3,241,5,211,18,38,0,88,6,0,17,7,1,71,0,239,0,0,0,21,180,1,39, +17,38,1,184,255,252,180,44,38,36,19,37,1,43,53,0,43,53,0,255,255,0,139,255, +236,3,241,5,123,18,38,0,88,6,0,17,7,0,105,0,237,0,0,0,25,182,2,1,38,17,38, +2,1,184,255,243,180,42,40,36,19,37,1,43,53,53,0,43,53,53,0,255,255,0,5,254, +87,3,252,5,228,18,38,0,92,0,0,17,7,0,116,1,27,0,0,0,19,64,11,1,32,17,38,1, +54,32,35,17,31,37,1,43,53,0,43,53,0,0,0,0,2,0,138,254,87,4,29,5,204,0,34, +0,54,0,109,64,76,102,52,118,52,2,105,38,121,38,2,73,25,89,25,2,70,10,86,10, +2,25,21,41,21,137,21,153,21,4,22,15,38,15,134,15,150,15,4,18,71,64,160,35, +1,35,56,128,45,7,33,70,0,34,16,34,48,34,240,34,4,8,34,33,27,26,50,80,23,22, +7,40,80,13,16,0,0,0,63,63,237,50,63,237,50,63,1,47,94,93,237,50,50,26,16, +220,93,26,237,49,48,0,93,93,93,93,93,93,19,51,17,20,6,7,6,7,51,62,3,51,50, +30,2,21,20,14,2,35,34,38,39,35,30,3,21,17,35,1,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,138,180,1,1,1,1,6,25,64,82,101,63,112,153,93,40,40,93,153,112, +116,174,46,5,1,1,1,1,180,2,214,24,59,98,74,60,106,79,46,38,73,108,70,75,99, +59,24,5,204,254,89,30,55,21,25,22,52,73,47,21,80,145,205,125,123,208,150, +85,88,100,2,32,48,59,29,254,89,3,199,100,156,108,56,34,96,169,135,115,159, +98,43,58,110,159,255,255,0,5,254,87,3,252,5,123,18,38,0,92,0,0,17,7,0,105, +0,187,0,0,0,25,182,2,1,32,17,38,2,1,184,255,254,180,36,34,17,31,37,1,43,53, +53,0,43,53,53,0,255,255,0,4,0,0,5,82,6,161,18,38,0,36,0,0,17,7,1,73,1,104, +1,78,0,19,64,11,2,21,5,38,2,2,22,21,4,7,37,1,43,53,0,43,53,0,0,0,255,255, +0,87,255,236,4,115,5,83,18,38,0,68,0,0,17,7,1,73,0,233,0,0,0,21,180,2,66, +17,38,2,184,255,202,180,67,66,3,36,37,1,43,53,0,43,53,0,255,255,0,4,0,0,5, +82,6,243,18,38,0,36,0,0,17,7,2,155,1,121,0,0,0,19,64,11,2,21,5,38,2,3,26, +34,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,115,5,230,18,38,0, +68,0,0,17,7,1,74,1,7,0,0,0,21,180,2,66,17,38,2,184,255,204,180,71,83,3,36, +37,1,43,53,0,43,53,0,255,255,0,4,254,96,5,99,5,129,18,38,0,36,0,0,17,7,1, +77,3,181,0,11,0,13,185,0,2,255,207,180,33,33,7,7,37,43,53,0,255,255,0,87, +254,85,4,115,4,78,18,38,0,68,0,0,17,7,1,77,2,197,0,0,0,13,185,0,2,255,194, +180,78,78,36,36,37,43,53,0,255,255,0,104,255,236,5,121,6,240,18,38,0,38,0, +0,17,7,2,149,2,83,0,0,0,19,64,11,1,40,5,38,1,126,40,43,26,16,37,1,43,53,0, +43,53,0,0,0,255,255,0,87,255,236,3,202,5,228,18,38,0,70,0,0,17,7,0,116,1, +103,0,0,0,19,64,11,1,40,17,38,1,114,40,43,19,9,37,1,43,53,0,43,53,0,0,0,255, +255,0,104,255,236,5,121,6,254,18,38,0,38,0,0,17,7,2,150,1,204,0,0,0,19,64, +11,1,41,5,38,1,38,46,40,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236, +3,202,5,211,18,38,0,70,0,0,17,7,1,71,0,208,0,0,0,19,64,11,1,41,17,38,1,10, +46,40,19,9,37,1,43,53,0,43,53,0,0,0,255,255,0,104,255,236,5,121,6,241,18, +38,0,38,0,0,17,7,1,75,2,34,1,37,0,19,64,11,1,40,5,38,1,39,40,42,26,16,37, +1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,204,18,38,0,70,0,0,17, +7,1,75,1,44,0,0,0,11,182,1,17,40,42,19,9,37,1,43,53,0,0,0,255,255,0,104,255, +236,5,121,6,254,18,38,0,38,0,0,17,7,2,151,1,204,0,0,0,19,64,11,1,40,5,38, +1,38,42,48,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,211, +18,38,0,70,0,0,17,7,1,72,0,214,0,0,0,19,64,11,1,40,17,38,1,16,42,48,19,9, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,5,101,6,254,18,38,0,39,0,0,17, +7,2,151,1,102,0,0,0,21,180,2,26,5,38,2,184,255,171,180,28,34,6,0,37,1,43, +53,0,43,53,0,255,255,0,86,255,236,4,255,5,204,16,38,0,71,0,0,17,7,2,146,3, +186,0,75,0,18,64,10,2,61,0,2,83,61,61,19,19,37,1,43,53,0,63,53,255,255,0, +14,0,0,5,101,5,129,18,6,0,144,0,0,0,2,0,86,255,236,4,109,5,204,0,39,0,59, +0,146,64,86,85,42,101,42,2,90,58,106,58,2,57,1,73,1,2,54,10,70,10,2,9,4,25, +4,121,4,137,4,4,6,7,22,7,118,7,134,7,4,25,27,70,64,20,6,0,21,50,3,18,61,128, +40,71,31,6,1,6,63,61,1,143,61,1,33,21,27,19,81,24,15,20,1,239,20,255,20,2, +20,20,8,22,0,11,55,80,8,184,255,192,64,10,9,13,72,8,16,0,45,80,3,22,0,63, +237,50,63,43,237,50,63,18,57,47,93,113,51,237,50,63,1,93,114,47,93,237,26, +16,220,23,50,17,57,26,237,50,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17, +16,33,50,22,23,51,52,46,1,52,61,1,33,53,33,53,51,21,51,21,35,17,20,30,2,23, +35,46,3,53,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,3,53,50,165,122,205, +193,1,142,123,164,50,2,1,1,254,212,1,44,180,132,132,1,2,2,1,172,2,3,3,2,253, +218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64,31,174,104,90,1,20,1,24, +2,54,90,98,10,43,47,42,9,141,131,147,147,131,252,41,39,72,60,43,9,10,37,48, +53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102,163,0,0,255, +255,0,168,0,0,4,254,6,161,18,38,0,40,0,0,17,7,1,73,1,122,1,78,0,21,180,1, +12,5,38,1,184,255,237,180,13,12,0,10,37,1,43,53,0,43,53,0,255,255,0,87,255, +236,4,24,5,83,18,38,0,72,0,0,17,7,1,73,0,245,0,0,0,19,64,11,2,38,17,38,2, +3,39,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,243,18,38, +0,40,0,0,17,7,2,155,1,137,0,0,0,21,180,1,12,5,38,1,184,255,235,180,17,25, +0,10,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,230,18,38,0,72,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,38,17,38,2,2,43,55,17,27,37,1,43,53,0,43, +53,0,0,0,255,255,0,168,0,0,4,254,6,241,18,38,0,40,0,0,17,7,1,75,1,201,1,37, +0,21,180,1,12,5,38,1,184,255,236,180,12,14,0,10,37,1,43,53,0,43,53,0,255, +255,0,87,255,236,4,24,5,204,18,38,0,72,0,0,17,7,1,75,1,68,0,0,0,12,182,2, +2,38,40,17,27,37,1,43,53,0,0,0,255,255,0,168,254,85,4,254,5,129,18,38,0,40, +0,0,17,7,1,77,3,80,0,0,0,13,185,0,1,255,194,180,24,24,11,11,37,43,53,0,255, +255,0,87,254,85,4,24,4,78,18,38,0,72,0,0,17,7,1,77,1,125,0,0,0,13,185,0,2, +254,242,180,50,50,9,9,37,43,53,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40, +0,0,17,7,2,151,1,111,0,0,0,21,180,1,12,5,38,1,184,255,231,180,14,20,0,10, +37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,211,18,38,0,72,0,0,17,7, +1,72,0,234,0,0,0,21,180,2,38,17,38,2,184,255,254,180,40,46,17,27,37,1,43, +53,0,43,53,0,255,255,0,103,255,236,5,160,6,254,18,38,0,42,0,0,17,7,2,150, +1,219,0,0,0,19,64,11,1,47,5,38,1,34,52,46,0,35,37,1,43,53,0,43,53,0,0,0,255, +255,0,86,254,87,3,239,5,211,18,38,0,74,0,0,17,7,1,71,0,216,0,0,0,19,64,11, +2,71,17,38,2,0,76,70,26,41,37,1,43,53,0,43,53,0,0,0,255,255,0,103,255,236, +5,160,6,243,18,38,0,42,0,0,17,7,2,155,1,246,0,0,0,19,64,11,1,46,5,38,1,39, +51,59,0,35,37,1,43,53,0,43,53,0,0,0,255,255,0,86,254,87,3,239,5,230,18,38, +0,74,0,0,17,7,1,74,0,249,0,0,0,19,64,11,2,70,17,38,2,0,75,87,26,41,37,1,43, +53,0,43,53,0,0,0,255,255,0,103,255,236,5,160,6,241,18,38,0,42,0,0,17,7,1, +75,2,53,1,37,0,19,64,11,1,46,5,38,1,39,46,48,0,35,37,1,43,53,0,43,53,0,0, +0,255,255,0,86,254,87,3,239,5,204,18,38,0,74,0,0,17,7,1,75,1,45,0,0,0,11, +182,2,0,70,72,26,41,37,1,43,53,0,0,0,255,255,0,103,254,78,5,160,5,150,18, +38,0,42,0,0,17,7,2,140,2,78,0,0,0,11,182,1,46,50,46,0,35,37,1,43,53,0,0,0, +255,255,0,86,254,87,3,239,6,32,16,38,0,74,0,0,17,7,2,147,1,56,0,0,0,21,180, +2,79,17,38,2,184,255,252,180,70,74,26,41,37,1,43,53,0,43,53,0,255,255,0,168, +0,0,5,32,6,254,18,38,0,43,0,0,17,7,2,150,1,153,0,0,0,19,64,11,1,13,5,38,1, +0,18,12,4,10,37,1,43,53,0,43,53,0,0,0,255,255,0,142,0,0,3,238,7,62,18,38, +0,75,0,0,17,7,2,150,0,242,0,64,0,21,180,1,35,2,38,1,184,255,255,180,40,34, +25,10,37,1,43,53,0,43,53,0,0,2,0,14,0,0,5,185,5,129,0,19,0,23,0,166,64,72, +23,11,3,90,8,7,4,4,20,4,2,7,4,16,15,19,90,20,12,59,0,1,4,0,1,56,164,0,1,155, +0,1,68,0,1,244,0,1,235,0,1,68,0,148,0,2,224,0,1,2,0,0,48,0,112,0,208,0,4, +7,0,32,25,1,160,25,176,25,192,25,3,25,184,255,192,64,36,14,17,72,47,25,1, +22,18,6,95,15,11,80,7,96,7,2,7,2,95,64,23,1,160,23,208,23,2,23,23,13,9,3, +4,0,18,0,63,50,63,51,57,47,93,113,237,220,93,50,50,237,50,50,1,93,43,93,113, +47,94,93,95,93,113,113,113,114,114,114,94,93,93,51,51,237,50,50,47,94,93, +51,51,237,50,50,49,48,33,17,33,17,35,17,35,53,51,53,51,21,33,53,51,21,51, +21,35,17,3,53,33,21,4,102,253,1,191,154,154,191,2,255,186,153,153,186,253, +1,2,141,253,115,4,1,154,230,230,230,230,154,251,255,3,45,212,212,0,1,0,10, +0,0,3,238,5,204,0,41,0,150,185,0,7,255,232,64,66,9,13,72,0,7,16,7,2,7,33, +24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,32,36,24,70,29,28,192,25,1, +0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240,43, +2,255,43,1,112,43,1,43,184,255,192,64,19,19,23,72,35,27,81,32,28,28,5,30, +0,25,11,21,0,18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63, +18,57,47,51,237,50,1,43,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16, +220,93,113,26,237,18,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52, +46,2,35,34,14,2,21,17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61, +30,70,84,100,62,104,133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180, +1,44,254,212,2,3,2,1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69, +35,46,84,120,75,253,170,4,182,131,147,147,131,148,33,66,56,39,7,255,255,255, +184,0,0,2,133,7,6,18,38,0,44,0,0,17,6,2,153,207,0,0,19,64,11,1,4,5,38,1,2, +13,27,0,2,37,1,43,53,0,43,53,0,255,255,255,184,0,0,2,133,5,189,18,38,0,241, +0,0,17,6,1,78,207,0,0,19,64,11,1,4,17,38,1,2,13,27,0,2,37,1,43,53,0,43,53, +0,255,255,0,12,0,0,2,49,6,161,18,38,0,44,0,0,17,7,1,73,255,217,1,78,0,19, +64,11,1,4,5,38,1,2,5,4,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0,12,0,0,2,49, +5,83,18,38,0,241,0,0,17,6,1,73,217,0,0,19,64,11,1,4,17,38,1,2,5,4,0,2,37, +1,43,53,0,43,53,0,255,255,255,210,0,0,2,108,6,243,18,38,0,44,0,0,17,6,2,155, +234,0,0,19,64,11,1,4,5,38,1,2,9,17,0,2,37,1,43,53,0,43,53,0,255,255,255,210, +0,0,2,108,5,230,18,38,0,241,0,0,17,6,1,74,245,0,0,19,64,11,1,4,17,38,1,3, +9,21,0,2,37,1,43,53,0,43,53,0,255,255,0,92,254,85,1,186,5,129,18,38,0,44, +0,0,17,6,1,77,12,0,0,10,182,1,0,16,16,3,3,37,43,53,0,0,255,255,0,31,254,85, +1,125,5,204,18,38,0,76,0,0,17,6,1,77,207,0,0,15,64,10,23,22,1,2,0,20,20,7, +7,37,43,53,93,0,255,255,0,189,0,0,1,124,6,241,18,38,0,44,0,0,17,7,1,75,0, +39,1,37,0,19,64,11,1,4,5,38,1,0,4,6,0,2,37,1,43,53,0,43,53,0,0,0,0,1,0,194, +0,0,1,118,4,58,0,3,1,137,64,24,3,70,4,0,36,0,2,9,0,0,4,5,52,5,1,0,5,16,5, +32,5,3,229,5,184,255,192,64,55,225,228,72,240,5,1,228,5,1,176,5,192,5,208, +5,3,132,5,148,5,164,5,3,64,5,1,52,5,1,0,5,16,5,32,5,3,212,5,228,5,244,5,3, +144,5,1,116,5,132,5,2,96,5,1,5,184,255,192,64,22,193,196,72,224,5,1,196,5, +212,5,2,176,5,1,20,5,36,5,52,5,3,5,184,255,192,183,182,185,72,0,5,1,175,5, +184,255,192,179,171,174,72,5,184,255,192,182,161,167,72,128,5,1,5,184,255, +192,64,38,150,156,72,208,5,1,100,5,116,5,164,5,180,5,196,5,5,32,5,1,4,5,20, +5,2,4,5,20,5,180,5,196,5,244,5,5,117,5,184,255,192,179,121,124,72,5,184,255, +192,179,110,113,72,5,184,255,192,64,24,99,102,72,224,5,1,180,5,196,5,212, +5,3,48,5,1,4,5,20,5,36,5,3,5,184,255,192,183,67,70,72,11,5,1,62,5,184,255, +192,64,9,56,59,72,203,5,219,5,2,5,184,255,192,64,42,45,48,72,27,5,43,5,2, +196,5,212,5,228,5,3,107,5,123,5,2,64,5,1,2,16,5,32,5,48,5,3,191,5,207,5,2, +32,5,64,5,2,5,184,255,192,64,13,13,16,72,15,5,31,5,2,7,1,15,0,21,0,63,63, +1,94,93,43,93,93,113,95,113,113,113,114,43,114,43,94,93,43,113,113,113,113, +43,43,43,94,93,113,113,113,113,43,114,43,43,94,93,43,93,93,93,93,43,113,113, +113,113,114,114,114,114,114,114,114,43,94,93,93,17,18,57,47,94,93,237,49, +48,51,17,51,17,194,180,4,58,251,198,0,0,0,255,255,0,170,255,236,5,73,5,129, +16,38,0,44,237,0,16,7,0,45,1,225,0,0,255,255,0,137,254,87,3,3,5,204,16,38, +0,76,0,0,17,7,0,77,1,198,0,0,0,30,64,18,3,2,111,8,1,48,8,1,16,8,1,8,1,0,16, +0,1,0,17,93,53,53,17,93,93,93,53,53,255,255,0,32,255,236,3,205,6,254,18,38, +0,45,0,0,17,7,2,150,1,55,0,0,0,19,64,11,1,23,5,38,1,190,28,22,3,16,37,1,43, +53,0,43,53,0,0,0,0,2,255,153,254,87,2,47,5,211,0,19,0,29,1,148,64,25,150, +29,166,29,2,152,28,168,28,2,3,18,24,12,16,72,18,40,8,11,72,164,21,1,21,184, +255,192,64,49,11,15,72,21,251,26,1,59,26,1,26,64,12,15,72,36,26,1,26,15,70, +12,3,3,4,12,20,12,36,12,68,12,4,7,12,12,31,30,144,31,1,2,0,31,16,31,2,219, +31,184,255,192,64,9,223,227,72,31,64,210,213,72,31,184,255,192,64,51,205, +209,72,143,31,1,64,31,80,31,2,95,31,111,31,239,31,255,31,4,32,31,48,31,64, +31,3,144,31,160,31,224,31,240,31,4,79,31,1,0,31,1,160,175,31,191,31,207,31, +3,31,184,255,192,64,57,147,150,72,239,31,1,176,31,192,31,208,31,3,95,31,1, +32,31,1,31,31,47,31,63,31,143,31,191,31,207,31,6,0,31,1,111,239,31,1,208, +31,1,63,31,1,111,31,143,31,159,31,175,31,255,31,5,31,184,255,192,64,101,79, +82,72,223,31,1,144,31,160,31,176,31,3,47,31,63,31,79,31,3,0,31,1,61,31,64, +53,56,72,112,31,128,31,144,31,176,31,4,15,31,31,31,2,255,31,1,31,64,35,38, +72,144,31,1,79,31,1,255,31,1,112,31,128,31,192,31,208,31,224,31,5,31,31,1, +24,142,64,28,148,26,128,22,22,15,26,47,26,63,26,127,26,239,26,5,26,13,15, +7,80,0,27,0,63,237,63,47,93,51,47,26,16,253,26,237,1,93,93,93,113,113,43, +113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93,93,113,113,113,113, +43,114,94,93,93,93,113,113,114,114,43,43,43,94,93,95,93,17,18,57,47,94,93, +51,47,16,237,47,93,43,93,113,204,43,93,49,48,0,43,43,1,95,93,93,19,34,38, +39,53,30,1,51,50,62,2,53,17,51,17,20,14,2,1,21,35,39,35,7,35,53,19,51,77, +34,65,28,13,36,13,38,49,28,10,180,21,54,93,1,154,105,219,2,232,104,234,204, +254,87,4,5,139,2,4,20,43,67,46,4,165,251,64,62,106,78,45,6,110,20,169,169, +20,1,14,0,255,255,0,168,254,78,5,63,5,129,18,38,0,46,0,0,17,7,2,140,1,221, +0,0,0,14,185,0,1,255,205,180,16,12,4,11,37,1,43,53,255,255,0,138,254,78,4, +3,5,204,18,38,0,78,0,0,17,7,2,140,1,78,0,0,0,14,185,0,1,255,235,180,16,12, +4,11,37,1,43,53,0,1,0,138,0,0,4,3,4,58,0,11,0,166,64,72,123,1,1,116,7,1,86, +9,102,9,2,123,0,139,0,155,0,3,89,0,105,0,2,67,10,1,58,2,1,42,9,1,155,8,1, +122,8,138,8,2,44,8,1,1,10,8,10,9,16,112,9,128,9,144,9,3,9,9,0,11,16,80,11, +1,144,11,208,11,240,11,3,11,184,255,192,64,40,7,11,72,11,7,3,70,0,4,16,4, +48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2,1,7,10,4,8,8,5,15,4,0,21, +0,63,50,63,51,17,23,57,1,93,93,47,94,93,237,50,47,43,93,113,56,51,57,47,93, +56,57,51,17,51,49,48,93,93,93,93,0,93,1,93,93,93,93,0,93,1,93,33,1,7,17,35, +17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73,1,206,1,238,108, +254,126,4,58,253,243,2,13,254,47,253,151,0,0,0,255,255,0,168,0,0,4,47,6,240, +18,38,0,47,0,0,17,7,2,149,0,173,0,0,0,21,180,1,6,5,38,1,184,255,94,180,6, +9,0,4,37,1,43,53,0,43,53,0,255,255,0,91,0,0,2,3,7,62,18,38,0,79,0,0,17,6, +2,149,19,78,0,19,64,11,1,4,2,38,1,75,4,7,0,2,37,1,43,53,0,43,53,0,255,255, +0,168,254,78,4,47,5,129,18,38,0,47,0,0,17,7,2,140,1,133,0,0,0,14,185,0,1, +255,253,180,10,6,0,4,37,1,43,53,255,255,0,126,254,78,1,71,5,204,18,38,0,79, +0,0,17,6,2,140,255,0,0,14,185,0,1,255,255,180,8,4,0,2,37,1,43,53,0,0,255, +255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,2,146,2,21,0,0,0,18,64,10,1, +15,3,1,138,10,6,0,4,37,1,43,53,0,63,53,255,255,0,138,0,0,2,105,5,204,16,38, +0,79,0,0,17,7,2,146,1,36,0,75,0,65,64,16,16,64,29,29,72,16,64,22,22,72,16, +64,18,18,72,16,184,255,192,179,17,17,72,16,184,255,192,64,12,16,16,72,16, +64,11,11,72,1,13,0,1,184,1,32,180,8,4,0,2,37,1,43,53,0,63,53,1,43,43,43,43, +43,43,0,255,255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,1,75,1,213,253,143, +0,11,182,1,95,6,8,0,4,37,1,43,53,0,0,0,255,255,0,138,0,0,2,146,5,204,16,38, +0,79,0,0,17,7,1,75,1,66,253,143,0,14,185,0,1,1,84,180,4,6,0,2,37,1,43,53, +0,1,0,20,0,0,4,47,5,129,0,13,0,119,64,49,121,0,137,0,2,100,8,116,8,132,8, +3,86,8,1,134,8,1,86,7,1,134,7,1,12,2,90,9,5,16,3,1,0,3,32,3,64,3,96,3,128, +3,208,3,240,3,7,3,12,184,255,224,179,19,22,72,9,184,255,224,64,24,19,22,72, +6,1,9,12,4,16,7,1,7,0,13,1,13,13,5,10,3,2,95,5,18,0,63,237,63,18,57,47,93, +205,93,23,57,43,43,1,47,93,113,47,51,237,50,49,48,113,114,113,114,0,93,93, +1,5,17,33,21,33,17,7,53,55,17,51,17,37,2,104,254,255,2,200,252,121,148,148, +191,1,1,3,29,149,254,20,156,2,26,85,158,85,2,201,253,165,148,0,1,0,16,0,0, +1,186,5,204,0,11,0,102,64,42,39,3,1,39,2,1,8,7,11,70,4,2,0,0,16,0,32,0,64, +0,4,7,0,0,12,13,255,13,1,112,13,128,13,192,13,208,13,4,31,13,1,4,184,255, +224,64,23,18,22,72,10,32,18,22,72,1,10,4,7,4,2,79,8,1,8,8,5,0,0,21,0,63,63, +57,47,93,205,23,57,43,43,1,93,93,93,17,18,57,47,94,93,51,51,237,50,50,49, +48,113,113,51,17,7,53,55,17,51,17,55,21,7,17,138,122,122,180,124,124,2,30, +68,158,68,3,16,253,88,72,159,71,253,122,255,255,0,168,0,0,5,32,6,240,18,38, +0,49,0,0,17,7,2,149,2,17,0,0,0,19,64,11,1,20,5,38,1,73,20,23,8,18,37,1,43, +53,0,43,53,0,0,0,255,255,0,140,0,0,3,242,5,228,18,38,0,81,4,0,17,7,0,116, +1,132,0,0,0,19,64,11,1,38,17,38,1,97,38,41,19,36,37,1,43,53,0,43,53,0,0,0, +255,255,0,168,254,78,5,32,5,129,18,38,0,49,0,0,17,7,2,140,1,252,0,0,0,14, +185,0,1,255,252,180,24,20,8,18,37,1,43,53,255,255,0,140,254,78,3,242,4,78, +18,38,0,81,4,0,17,7,2,140,1,91,0,0,0,11,182,1,0,42,38,19,36,37,1,43,53,0, +0,0,255,255,0,168,0,0,5,32,6,254,18,38,0,49,0,0,17,7,2,151,1,147,0,0,0,21, +180,1,20,5,38,1,184,255,250,180,22,28,8,18,37,1,43,53,0,43,53,0,255,255,0, +140,0,0,3,242,5,211,18,38,0,81,4,0,17,7,1,72,0,242,0,0,0,21,180,1,38,17,38, +1,184,255,254,180,40,46,19,36,37,1,43,53,0,43,53,0,255,255,255,254,0,0,4, +80,5,129,16,38,0,81,98,0,16,7,2,3,255,127,0,0,0,1,0,165,255,236,5,52,5,149, +0,55,0,162,64,16,154,53,1,149,7,165,7,2,131,41,147,41,163,41,3,48,184,255, +232,179,12,15,72,47,184,255,216,64,91,12,15,72,42,54,58,54,154,54,170,54, +4,6,143,5,159,5,175,5,3,5,5,51,39,26,90,0,27,16,27,64,27,3,27,51,90,0,14, +64,14,80,14,112,14,160,14,176,14,6,48,14,80,14,144,14,240,14,4,224,14,1,143, +14,159,14,175,14,3,0,14,48,14,2,7,14,39,20,95,45,4,33,3,26,18,9,95,0,6,6, +0,19,0,63,50,47,16,237,63,63,63,237,50,1,47,94,93,93,93,113,114,237,47,93, +237,50,17,57,47,93,51,49,48,0,93,43,1,43,0,93,93,93,5,34,46,2,39,55,30,1, +51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,173,56,96,79,63,24,127,37,100,59,64,78,41, +13,39,81,127,87,94,163,121,70,191,1,1,1,1,184,1,3,2,1,4,34,103,130,153,86, +124,177,112,53,30,86,152,20,24,40,54,30,115,45,65,58,107,153,95,1,66,108, +154,98,46,62,105,139,77,252,133,4,68,37,92,90,76,22,22,63,69,69,28,61,101, +70,39,64,133,204,139,254,165,130,208,146,78,0,0,0,0,1,0,140,254,87,3,242, +4,78,0,53,0,135,64,18,121,52,137,52,2,90,52,106,52,2,43,52,59,52,75,52,3, +46,184,255,232,64,74,9,12,72,3,46,19,46,2,3,3,24,49,70,64,160,12,1,96,12, +208,12,2,31,12,1,175,12,1,12,55,128,37,24,70,160,25,176,25,2,0,25,192,25, +208,25,3,0,25,16,25,32,25,64,25,224,25,240,25,6,7,25,37,18,80,43,16,31,15, +24,21,7,80,0,27,0,63,237,63,63,63,237,50,1,47,94,93,113,114,237,50,26,16, +220,93,113,113,114,26,237,17,57,47,49,48,93,43,0,93,93,93,1,34,38,39,53,30, +1,51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,1,34,65,28,13,36,13,38,49,28,10,23,52,85, +63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90,130,84,39,22, +54,93,254,87,4,5,139,2,4,20,43,67,46,3,25,79,106,65,27,45,85,125,81,253,141, +3,83,34,75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,252,169,62,106, +78,45,0,0,0,255,255,0,97,255,236,5,215,6,161,18,38,0,50,0,0,17,7,1,73,1,214, +1,78,0,19,64,11,2,40,5,38,2,0,41,40,10,0,37,1,43,53,0,43,53,0,0,0,255,255, +0,86,255,236,4,29,5,83,18,38,0,82,0,0,17,7,1,73,0,244,0,0,0,19,64,11,2,35, +17,38,2,0,36,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +243,18,38,0,50,0,0,17,7,2,155,1,231,0,0,0,19,64,11,2,40,5,38,2,0,45,53,10, +0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,230,18,38,0,82,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,35,17,38,2,0,40,52,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,97,255,236,5,215,6,241,18,38,0,50,0,0,17,7,2,154,1,226,0, +0,0,23,64,13,3,2,40,5,38,3,2,93,40,49,10,0,37,1,43,53,53,0,43,53,53,0,0,0, +255,255,0,86,255,236,4,34,5,228,18,38,0,82,0,0,17,7,1,79,1,9,0,0,0,23,64, +13,3,2,35,17,38,3,2,103,35,44,8,0,37,1,43,53,53,0,43,53,53,0,0,0,0,2,0,97, +255,246,7,166,5,140,0,30,0,49,0,170,64,119,137,13,1,102,13,1,105,12,1,86, +48,1,89,42,1,84,8,132,8,2,4,47,20,47,84,47,3,11,43,27,43,91,43,3,0,20,24, +28,90,34,0,26,32,26,48,26,3,26,22,26,22,29,15,34,47,34,79,34,3,63,34,95,34, +127,34,159,34,207,34,239,34,6,34,64,31,38,72,34,16,29,32,29,2,29,45,91,32, +10,1,15,10,31,10,2,10,127,51,1,27,95,24,24,21,29,95,30,18,22,95,21,3,40,95, +15,4,31,95,5,19,0,63,237,63,237,63,237,63,237,17,57,47,237,1,93,47,93,93, +237,47,93,47,43,93,113,18,57,57,47,47,93,16,237,50,57,57,49,48,0,93,93,93, +93,93,1,93,0,93,93,33,14,3,35,34,36,38,2,53,52,18,54,36,51,50,30,2,23,33, +21,33,17,33,21,33,17,33,21,37,50,54,55,17,46,2,34,35,34,14,2,21,20,30,2,3, +231,20,51,57,57,25,169,254,253,175,89,94,178,1,2,164,26,58,57,52,19,3,146, +252,221,2,231,253,25,3,76,251,111,32,76,26,11,32,37,37,15,125,187,125,63, +64,126,186,3,3,3,1,106,191,1,9,159,165,1,7,183,98,2,3,4,2,156,254,60,154, +254,21,156,145,2,2,4,87,1,2,1,74,142,206,131,129,209,148,80,0,3,0,86,255, +236,7,50,4,78,0,39,0,59,0,68,0,190,64,131,132,7,1,102,7,118,7,2,97,2,1,85, +2,1,90,66,106,66,2,108,61,1,90,61,1,69,58,85,58,101,58,3,69,52,85,52,101, +52,3,74,48,90,48,106,48,3,74,42,90,42,106,42,3,8,73,9,9,38,71,64,31,60,47, +60,63,60,3,144,60,1,60,70,128,17,30,68,0,71,144,40,1,32,40,1,40,50,71,25, +0,80,68,68,5,63,80,33,16,116,30,132,30,2,123,17,139,17,2,30,17,20,45,80,28, +16,55,80,20,22,5,80,14,239,8,1,128,8,1,8,8,14,22,0,63,51,47,93,93,16,237, +63,237,63,237,18,57,57,93,93,63,237,18,57,47,237,1,47,237,47,93,114,237,50, +57,57,26,16,220,93,113,26,237,50,47,237,49,48,0,93,93,93,93,93,93,93,93,93, +93,93,1,20,30,2,51,50,54,55,23,14,3,35,34,38,39,14,1,35,34,46,2,53,16,18, +51,32,23,62,1,51,50,30,2,29,1,37,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2, +37,46,1,35,34,14,2,7,4,46,35,73,114,80,117,141,25,158,17,61,102,153,108,137, +198,61,63,201,137,113,181,127,68,253,242,1,25,117,67,200,119,136,183,111, +47,252,63,42,77,110,68,69,114,81,45,47,81,108,62,69,114,81,44,3,7,15,144, +135,45,99,84,58,4,1,247,85,143,103,57,94,72,45,45,91,73,47,91,92,93,90,68, +140,211,143,1,23,1,25,177,94,83,88,155,210,122,24,39,126,164,98,39,41,99, +164,123,126,165,98,40,39,98,166,225,171,157,29,74,127,98,255,255,0,168,0, +0,5,104,6,240,18,38,0,53,0,0,17,7,2,149,1,225,0,0,0,21,180,2,31,5,38,2,184, +255,245,180,31,34,4,17,37,1,43,53,0,43,53,0,255,255,0,136,0,0,2,166,5,228, +18,38,0,85,0,0,17,7,0,116,0,182,0,0,0,19,64,11,1,32,17,38,1,74,32,35,6,21, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,254,78,5,104,5,129,18,38,0,53,0,0, +17,7,2,140,2,5,0,0,0,14,185,0,2,255,225,180,35,31,4,17,37,1,43,53,255,255, +0,129,254,78,2,136,4,78,18,38,0,85,0,0,17,6,2,140,2,0,0,14,185,0,1,255,94, +180,36,32,6,21,37,1,43,53,0,0,255,255,0,168,0,0,5,104,6,254,18,38,0,53,0, +0,17,7,2,151,1,102,0,0,0,21,180,2,31,5,38,2,184,255,169,180,33,39,4,17,37, +1,43,53,0,43,53,0,255,255,0,56,0,0,2,206,5,211,18,38,0,85,0,0,17,6,1,72,56, +0,0,21,180,1,32,17,38,1,184,255,251,180,34,40,6,21,37,1,43,53,0,43,53,0,0, +0,255,255,0,93,255,236,4,248,7,45,18,38,0,54,0,0,17,7,0,116,1,234,1,73,0, +19,64,11,1,64,5,38,1,91,64,67,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,228,18,38,0,86,0,0,17,7,0,116,1,57,0,0,0,19,64,11,1,56,17,38, +1,93,56,59,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,93,255,236,4,248,7,26, +18,38,0,54,0,0,17,7,1,71,1,114,1,71,0,19,64,11,1,65,5,38,1,18,70,64,8,0,37, +1,43,53,0,43,53,0,0,0,255,255,0,57,255,236,3,182,5,211,18,38,0,86,0,0,17, +7,1,71,0,172,0,0,0,19,64,11,1,57,17,38,1,0,62,56,10,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,93,254,78,4,248,5,150,18,38,0,54,0,0,17,7,0,120,1,166,0,0, +0,11,182,1,40,72,64,8,0,37,1,43,53,0,0,0,255,255,0,57,254,78,3,182,4,75,18, +38,0,86,0,0,17,7,0,120,0,218,0,0,0,11,182,1,15,64,56,10,0,37,1,43,53,0,0, +0,255,255,0,93,255,236,4,248,6,254,18,38,0,54,0,0,17,7,2,151,1,115,0,0,0, +19,64,11,1,64,5,38,1,19,66,72,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,211,18,38,0,86,0,0,17,7,1,72,0,173,0,0,0,19,64,11,1,56,17,38, +1,0,58,64,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,46,254,78,4,180,5,129,18, +38,0,55,0,0,17,7,2,140,1,139,0,0,0,14,185,0,1,255,254,180,12,8,4,6,37,1,43, +53,255,255,0,31,254,78,2,42,5,44,16,38,0,87,0,0,17,6,2,140,115,0,2,233,64, +255,35,64,232,232,72,35,64,231,231,72,35,64,228,228,72,35,64,227,227,72,35, +64,226,226,72,35,64,221,221,72,35,64,217,217,72,35,64,216,216,72,35,64,215, +215,72,35,64,214,214,72,35,64,213,213,72,35,64,210,210,72,35,64,206,206,72, +35,64,205,205,72,35,64,203,203,72,35,64,202,202,72,35,64,199,199,72,35,64, +196,196,72,35,64,195,195,72,35,64,194,194,72,35,64,192,192,72,35,64,191,191, +72,35,64,190,190,72,35,64,185,185,72,35,64,184,184,72,35,64,181,181,72,35, +64,180,180,72,35,64,179,179,72,35,64,178,178,72,35,64,174,174,72,35,64,173, +173,72,35,64,170,170,72,35,64,169,169,72,35,64,168,168,72,35,64,167,167,72, +35,64,163,163,72,35,64,162,162,72,35,64,160,160,72,35,64,159,159,72,35,64, +158,158,72,35,64,157,157,72,35,64,156,156,72,35,64,152,152,72,35,64,149,149, +72,35,64,148,148,72,35,64,147,147,72,35,64,146,146,72,35,64,145,145,72,35, +64,144,144,72,35,64,142,142,72,35,64,141,141,72,64,221,35,64,138,138,72,35, +64,137,137,72,35,64,136,136,72,35,64,134,134,72,35,64,133,133,72,35,64,131, +131,72,35,64,130,130,72,35,64,127,127,72,35,64,126,126,72,35,64,125,125,72, +35,64,124,124,72,35,64,123,123,72,35,64,122,122,72,35,64,121,121,72,35,64, +120,120,72,35,64,116,116,72,35,64,115,115,72,35,64,113,113,72,35,64,112,112, +72,35,64,111,111,72,35,64,110,110,72,35,64,109,109,72,35,64,106,106,72,35, +64,105,105,72,35,64,104,104,72,35,64,102,102,72,35,64,101,101,72,35,64,100, +100,72,35,64,99,99,72,35,64,98,98,72,35,64,95,95,72,35,64,94,94,72,35,64, +93,93,72,35,64,91,91,72,35,64,90,90,72,35,64,89,89,72,35,128,88,88,72,35, +64,87,87,72,35,64,84,84,72,35,64,83,83,72,35,64,80,80,72,35,64,79,79,72,35, +64,78,78,72,35,64,77,77,72,35,184,255,192,179,74,74,72,35,184,255,192,179, +71,71,72,35,184,255,192,179,63,63,72,35,184,255,192,64,9,60,60,72,35,64,52, +52,72,35,184,255,192,179,50,50,72,35,184,255,192,179,49,49,72,35,184,255, +192,64,9,45,45,72,35,64,41,41,72,35,184,255,192,179,39,39,72,35,184,255,192, +64,9,38,38,72,35,64,30,30,72,35,184,255,192,179,28,28,72,35,184,255,192,64, +9,27,27,72,35,64,19,19,72,35,184,255,192,179,17,17,72,35,184,255,192,179, +13,13,72,35,184,255,192,64,15,9,9,72,35,64,8,8,72,1,50,27,23,7,0,37,1,43, +53,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0,0,255,255,0,46,0,0,4,180, +6,254,18,38,0,55,0,0,17,7,2,151,1,33,0,0,0,21,180,1,8,5,38,1,184,255,251, +180,10,16,4,6,37,1,43,53,0,43,53,0,255,255,0,31,255,240,3,17,5,204,16,38, +0,87,0,0,17,7,2,146,1,204,0,75,0,17,177,1,1,184,1,136,180,27,23,7,0,37,1, +43,53,0,53,0,0,1,0,46,0,0,4,180,5,129,0,15,0,101,64,62,0,17,16,17,32,17,3, +9,3,2,5,15,14,6,12,5,14,9,6,127,12,175,12,191,12,3,47,12,143,12,2,12,64,23, +28,72,12,1,5,90,10,16,6,32,6,2,6,0,12,95,13,4,8,95,1,9,9,5,13,3,5,18,0,63, +63,18,57,47,51,237,50,16,237,50,1,47,93,51,253,50,204,43,93,113,17,57,43, +1,24,16,77,228,17,57,95,94,93,49,48,1,17,33,21,33,17,35,17,33,53,33,17,33, +53,33,21,2,208,1,25,254,231,190,254,233,1,23,254,28,4,134,4,229,254,60,154, +253,121,2,135,154,1,196,156,156,0,1,0,31,255,240,2,42,5,44,0,30,0,140,64, +91,40,30,1,40,29,1,40,26,1,40,25,1,12,32,9,15,72,156,12,172,12,2,12,40,9, +14,72,20,15,15,13,29,25,111,7,127,7,2,7,24,28,7,3,1,70,21,17,143,13,1,0,13, +16,13,32,13,3,7,13,128,32,1,47,32,1,27,19,80,20,0,15,80,28,127,16,191,16, +207,16,3,16,16,4,24,22,20,15,4,80,11,22,0,63,237,63,206,51,18,57,47,93,51, +237,50,16,237,50,1,93,93,47,94,93,113,51,51,237,23,50,47,93,51,51,17,51,17, +51,49,48,0,43,93,1,43,113,113,113,113,1,21,20,22,51,50,54,55,21,14,1,35,34, +53,17,35,53,51,17,35,53,51,55,51,21,51,21,35,17,51,21,1,80,51,63,26,49,29, +41,85,56,216,125,125,125,132,53,120,200,200,200,2,4,248,78,63,8,6,133,11, +13,245,1,31,131,1,48,131,242,242,131,254,208,131,255,255,0,158,255,236,5, +41,7,6,18,38,0,56,0,0,17,7,2,153,1,148,0,0,0,19,64,11,1,26,5,38,1,0,35,49, +5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5,189,18,38,0,88, +0,0,17,7,1,78,0,246,0,0,0,19,64,11,1,38,17,38,1,13,47,61,36,19,37,1,43,53, +0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,156,18,38,0,56,0,0,17,7,1,73,1, +159,1,73,0,19,64,11,1,26,5,38,1,1,27,26,5,20,37,1,43,53,0,43,53,0,0,0,255, +255,0,133,255,236,3,235,5,83,18,38,0,88,0,0,17,7,1,73,0,240,0,0,0,21,180, +1,38,17,38,1,184,255,254,180,39,38,36,19,37,1,43,53,0,43,53,0,255,255,0,158, +255,236,5,41,6,243,18,38,0,56,0,0,17,7,2,155,1,174,0,0,0,19,64,11,1,26,5, +38,1,0,31,39,5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5, +230,18,38,0,88,0,0,17,7,1,74,1,11,0,0,0,21,180,1,38,17,38,1,184,255,253,180, +43,55,36,19,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,7,62,18,38,0, +56,0,0,17,7,1,76,1,191,0,203,0,23,64,13,2,1,31,5,38,2,1,0,36,26,5,20,37,1, +43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,235,6,115,18,38,0,88,0, +0,17,7,1,76,1,20,0,0,0,23,64,13,2,1,43,17,38,2,1,1,48,38,36,19,37,1,43,53, +53,0,43,53,53,0,0,0,255,255,0,158,255,236,5,41,6,241,18,38,0,56,0,0,17,7, +2,154,1,157,0,0,0,23,64,13,2,1,26,5,38,2,1,81,26,35,5,20,37,1,43,53,53,0, +43,53,53,0,0,0,255,255,0,133,255,236,4,30,5,228,18,38,0,88,0,0,17,7,1,79, +1,5,0,0,0,23,64,13,2,1,38,17,38,2,1,100,38,47,36,19,37,1,43,53,53,0,43,53, +53,0,0,0,255,255,0,158,254,85,5,41,5,129,16,38,0,56,0,0,17,7,1,77,2,32,0, +0,0,40,185,0,1,254,103,181,39,39,21,21,37,51,184,255,192,179,21,21,72,51, +184,255,192,179,20,20,72,51,184,255,192,178,19,19,72,43,43,43,43,53,0,0,255, +255,0,133,254,85,4,5,4,58,18,38,0,88,0,0,17,7,1,77,2,87,0,0,0,13,185,0,1, +255,226,180,50,50,14,14,37,43,53,0,255,255,0,9,0,0,7,134,6,254,18,38,0,58, +0,0,17,7,2,150,2,121,0,0,0,21,180,1,48,5,38,1,184,255,253,180,53,47,15,46, +37,1,43,53,0,43,53,0,255,255,255,253,0,0,5,204,5,211,18,38,0,90,0,0,17,7, +1,71,1,148,0,0,0,21,180,1,44,17,38,1,184,255,251,180,49,43,15,42,37,1,43, +53,0,43,53,0,255,255,0,45,0,0,5,41,6,254,18,38,0,60,0,0,17,7,2,150,1,91,0, +0,0,21,180,1,10,5,38,1,184,255,251,180,15,9,4,8,37,1,43,53,0,43,53,0,255, +255,0,5,254,87,3,252,5,211,18,38,0,92,0,0,17,7,1,71,0,182,0,0,0,19,64,11, +1,33,17,38,1,0,38,32,17,31,37,1,43,53,0,43,53,0,0,0,255,255,0,45,0,0,5,41, +6,178,18,38,0,60,0,0,17,7,2,152,1,104,0,0,0,23,64,13,2,1,9,5,38,2,1,0,13, +11,4,8,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,65,0,0,4,163,6,240,18,38, +0,61,0,0,17,7,2,149,1,160,0,0,0,19,64,11,1,10,5,38,1,74,10,13,1,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,228,18,38,0,93,0,0,17,7,0,116,1, +53,0,0,0,19,64,11,1,10,17,38,1,93,10,13,0,8,37,1,43,53,0,43,53,0,0,0,255, +255,0,65,0,0,4,163,6,241,18,38,0,61,0,0,17,7,1,75,1,124,1,37,0,19,64,11,1, +10,5,38,1,0,10,12,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,204, +18,38,0,93,0,0,17,7,1,75,0,253,0,0,0,12,182,1,0,10,12,0,8,37,1,43,53,0,0, +0,255,255,0,65,0,0,4,163,6,254,18,38,0,61,0,0,17,7,2,151,1,56,0,0,0,19,64, +11,1,10,5,38,1,17,12,18,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182, +5,211,18,38,0,93,0,0,17,7,1,72,0,156,0,0,0,21,180,1,10,17,38,1,184,255,244, +180,12,18,0,8,37,1,43,53,0,43,53,0,0,1,0,138,0,0,2,17,5,202,0,19,0,125,185, +0,5,255,216,179,13,17,72,5,184,255,224,64,56,8,12,72,111,10,1,10,10,0,70, +0,1,16,1,48,1,240,1,4,8,1,255,21,1,224,21,1,223,21,1,176,21,192,21,2,159, +21,1,112,21,128,21,2,31,21,1,0,21,1,240,21,1,223,21,1,21,184,255,192,64,18, +34,37,72,79,21,1,112,21,1,31,21,1,14,80,7,0,0,21,0,63,63,237,1,93,93,113, +43,113,113,114,114,114,114,114,114,114,114,47,94,93,237,50,47,93,49,48,0, +43,43,33,35,17,52,62,2,51,50,22,23,21,46,1,35,34,14,2,21,1,62,180,22,59,102, +81,32,69,26,17,45,18,40,51,29,11,4,180,59,101,75,43,6,6,137,3,5,22,41,60, +39,0,0,0,0,1,0,192,254,78,3,195,5,174,0,27,0,148,64,107,133,6,1,122,18,138, +18,2,139,15,1,89,15,105,15,121,15,3,131,13,1,85,13,101,13,117,13,3,54,13, +1,38,7,1,38,8,1,34,22,50,22,114,22,130,22,4,21,17,37,17,53,17,3,27,212,8, +228,8,244,8,3,80,8,144,8,2,38,8,54,8,70,8,3,8,10,27,3,13,13,17,19,3,8,95, +14,159,14,2,14,12,16,80,9,17,17,13,3,81,15,24,127,24,175,24,3,24,13,0,47, +47,93,237,18,57,47,51,237,50,1,47,113,51,23,51,17,23,51,113,113,113,47,49, +48,93,0,93,1,93,93,93,93,93,93,93,93,93,1,46,1,35,34,14,2,15,1,51,7,35,3, +35,19,35,55,51,55,62,3,51,50,22,23,3,164,17,62,31,31,46,33,24,9,26,211,25, +213,254,180,254,152,27,151,29,12,40,71,109,81,32,82,35,5,32,5,10,19,40,64, +45,137,131,250,211,5,45,131,152,59,102,76,43,10,10,0,0,0,4,0,4,0,0,5,82,7, +62,0,26,0,39,0,61,0,67,1,36,64,18,122,64,138,64,2,102,5,118,5,134,5,3,86, +6,102,6,2,25,184,255,232,64,183,9,17,72,19,24,9,17,72,12,16,14,17,72,10,12, +1,12,38,9,10,32,8,39,32,7,32,40,130,0,68,66,132,66,2,66,62,50,130,17,175, +62,191,62,207,62,3,15,17,47,17,2,144,17,1,0,0,32,0,2,15,0,159,0,2,0,62,17, +17,62,0,3,6,11,5,32,32,10,7,139,7,1,90,7,106,7,122,7,3,7,16,6,32,6,48,6,3, +32,6,1,6,6,69,80,69,176,69,2,48,69,96,69,144,69,192,69,240,69,5,47,69,1,132, +10,1,85,10,101,10,117,10,3,10,11,62,62,45,141,112,22,128,22,2,22,22,57,127, +64,159,64,175,64,191,64,4,64,64,9,13,72,64,8,9,39,38,38,10,5,12,32,3,128, +57,1,63,57,1,0,57,1,57,7,7,10,0,47,51,47,47,93,93,93,23,51,18,57,47,51,205, +50,47,43,93,18,57,47,93,237,51,47,1,47,51,93,93,93,93,113,17,51,47,93,113, +51,93,93,17,18,57,17,51,17,18,23,57,47,47,47,93,113,93,113,93,16,237,16,205, +93,16,237,16,135,192,192,135,192,192,1,51,49,48,93,43,43,43,93,93,93,1,20, +6,7,6,7,1,35,3,33,3,35,1,38,39,46,1,53,52,62,2,51,50,30,2,3,46,3,39,14,3, +7,3,33,3,52,46,2,35,34,14,2,21,20,30,1,23,22,23,51,50,62,2,3,53,55,51,21, +5,3,158,38,33,16,18,2,29,195,161,253,126,162,198,2,36,21,18,33,38,38,66,88, +50,50,88,66,38,158,16,29,22,15,1,2,14,23,29,15,180,2,15,131,21,36,49,28,29, +49,36,21,21,36,24,21,24,9,28,49,36,21,247,217,207,254,202,5,112,45,79,30, +15,11,251,68,1,115,254,141,4,185,12,17,30,79,45,45,79,59,34,34,59,79,253, +254,36,74,60,41,4,4,41,62,73,36,254,95,3,119,25,44,33,19,19,33,44,25,26,44, +35,10,8,1,19,35,44,1,35,16,181,23,174,0,255,255,0,87,255,236,4,115,7,62,18, +38,0,68,0,0,16,39,1,76,1,20,255,85,17,7,0,116,1,99,1,90,0,35,64,14,3,2,101, +16,38,4,26,106,109,3,36,37,3,2,184,255,212,180,76,66,3,36,37,1,43,53,53,43, +53,0,43,53,53,0,0,0,255,255,0,24,0,0,7,168,6,240,18,38,0,134,0,0,17,7,2,149, +3,228,0,0,0,21,180,2,27,5,38,2,184,1,32,180,27,30,4,14,37,1,43,53,0,43,53, +0,255,255,0,66,255,236,6,194,5,228,18,38,0,166,0,0,17,7,0,116,2,175,0,0,0, +19,64,11,3,89,17,38,3,73,89,92,25,61,37,1,43,53,0,43,53,0,0,0,255,255,0,71, +255,203,5,244,6,240,18,38,0,152,0,0,17,7,2,149,2,75,0,0,0,19,64,11,3,52,5, +38,3,73,52,55,10,24,37,1,43,53,0,43,53,0,0,0,255,255,0,44,255,218,4,180,5, +228,18,38,0,184,0,0,17,7,0,116,1,178,0,0,0,19,64,11,3,46,17,38,3,94,46,49, +8,19,37,1,43,53,0,43,53,0,0,0,0,1,0,0,4,177,2,150,5,211,0,9,0,66,64,14,118, +9,134,9,2,120,8,136,8,2,128,0,1,0,184,255,192,64,27,11,15,72,0,191,6,1,6, +4,142,64,8,148,128,6,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93,51,26,253,26, +237,1,47,93,204,43,93,49,48,93,93,1,21,35,39,35,7,35,53,19,51,2,150,105,219, +2,232,104,234,204,4,197,20,169,169,20,1,14,0,0,1,0,0,4,177,2,150,5,211,0, +9,0,66,64,14,118,0,134,0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,27,11,15, +72,8,64,191,2,1,2,7,3,148,128,6,142,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93, +237,26,237,50,1,47,93,26,204,43,93,49,48,93,93,1,35,3,53,51,23,51,55,51,21, +1,182,204,234,104,232,2,219,105,4,177,1,14,20,169,169,20,0,0,1,0,51,4,212, +2,88,5,83,0,3,0,81,64,59,4,1,1,228,1,244,1,2,1,164,0,1,91,0,107,0,2,52,0, +68,0,2,0,2,32,18,25,72,2,142,1,64,28,33,72,47,1,1,2,15,1,63,1,175,1,191,1, +4,1,64,22,26,72,1,64,14,17,72,1,0,47,43,43,93,95,113,43,237,43,1,47,93,93, +93,47,93,113,49,48,1,33,53,33,2,88,253,219,2,37,4,212,127,0,1,255,221,4,177, +2,119,5,230,0,21,0,73,64,51,133,14,1,133,8,1,31,17,79,17,127,17,175,17,223, +17,5,239,17,1,17,64,5,64,29,60,72,5,16,80,5,96,5,2,5,149,128,11,143,15,0, +47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,237,113,50,1,47,43,26,204,93,113, +49,48,0,93,93,1,34,46,2,39,51,30,3,51,50,62,2,55,51,14,3,1,41,74,116,84,50, +8,117,8,39,56,72,42,42,71,56,38,8,117,9,50,83,116,4,177,51,85,112,61,43,59, +36,15,16,36,59,42,61,112,85,51,0,1,0,156,5,32,1,80,5,204,0,3,0,23,64,12,3, +134,0,64,14,17,72,0,0,83,1,0,0,63,237,1,47,43,237,49,48,19,53,51,21,156,180, +5,32,172,172,0,0,2,0,51,4,144,2,23,6,115,0,19,0,39,0,89,185,0,18,255,232, +64,14,9,14,72,12,24,9,14,72,8,24,9,14,72,2,184,255,232,64,42,9,14,72,20,130, +64,0,192,30,130,95,10,1,10,25,141,15,15,31,15,2,15,35,141,15,5,47,5,63,5, +79,5,127,5,159,5,191,5,239,5,8,5,0,47,93,237,220,93,237,1,47,93,237,26,220, +26,237,49,48,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,23,38,66,88,50,50,88,66,38,38,66, +88,50,50,88,66,38,108,21,36,49,28,29,49,36,21,21,36,49,29,28,49,36,21,5,130, +50,88,66,38,38,66,88,50,50,88,65,38,38,65,88,50,28,49,36,21,21,36,49,28,29, +49,38,21,21,38,49,0,0,0,0,1,0,80,254,85,1,174,0,0,0,23,0,76,64,55,14,24,9, +13,72,9,24,9,13,72,5,32,9,17,72,12,17,132,15,0,31,0,2,95,0,191,0,2,0,6,11, +64,7,10,72,11,20,141,16,3,1,32,3,80,3,96,3,112,3,176,3,192,3,6,3,0,47,93, +113,237,47,43,1,47,205,93,113,237,50,49,48,43,43,43,1,14,1,35,34,38,53,52, +62,2,55,51,14,3,21,20,22,51,50,54,55,1,174,28,71,40,105,106,34,48,53,20,133, +25,52,43,27,49,45,29,58,28,254,112,12,15,102,85,47,79,61,42,11,14,45,59,70, +39,42,48,13,11,0,1,255,233,4,177,2,182,5,189,0,27,2,77,185,0,26,255,232,64, +182,9,17,72,12,24,9,17,72,41,29,1,25,29,41,29,57,29,89,29,105,29,5,29,64, +229,232,72,29,64,217,220,72,11,29,1,208,169,29,185,29,201,29,3,155,29,1,9, +29,57,29,2,185,29,201,29,217,29,3,29,64,195,198,72,155,29,171,29,2,137,29, +1,123,29,1,73,29,1,137,29,185,29,2,29,64,171,175,72,6,29,54,29,2,158,153, +29,1,125,29,141,29,2,111,29,1,45,29,61,29,77,29,3,27,29,1,13,29,1,237,29, +253,29,2,29,128,136,139,72,137,29,153,29,2,91,29,107,29,123,29,3,29,192,127, +130,72,9,29,1,249,29,1,235,29,1,201,29,217,29,2,171,29,187,29,2,153,29,1, +22,29,38,29,102,29,118,29,134,29,5,4,29,1,110,29,184,255,64,64,96,101,109, +72,148,29,1,112,29,128,29,2,82,29,98,29,2,64,29,1,18,29,34,29,50,29,3,4,29, +1,228,29,244,29,2,214,29,1,196,29,1,176,29,1,162,29,1,128,29,144,29,2,82, +29,98,29,114,29,3,36,29,52,29,68,29,3,6,29,22,29,2,246,29,1,210,29,226,29, +2,192,29,1,146,29,162,29,178,29,3,100,29,116,29,132,29,3,29,184,255,192,64, +9,60,64,72,2,29,1,59,1,29,184,255,128,64,57,53,58,72,164,29,180,29,2,144, +29,1,100,29,116,29,132,29,3,48,29,64,29,80,29,3,4,29,20,29,36,29,3,208,29, +224,29,2,164,29,180,29,196,29,3,112,29,128,29,2,148,29,164,29,228,29,3,29, +184,255,192,64,19,26,31,72,128,29,1,84,29,100,29,116,29,3,29,64,7,10,72,23, +184,255,128,64,9,36,39,72,148,23,164,23,2,23,184,255,128,64,23,30,33,72,68, +23,1,48,23,1,2,0,23,16,23,32,23,3,208,23,224,23,2,23,184,255,192,64,43,13, +19,72,15,23,1,23,9,22,22,5,143,64,15,14,31,14,2,255,14,1,14,64,16,19,72,14, +128,19,143,8,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,50,237,26,221,43,93,113, +26,237,51,47,1,47,204,93,43,93,113,95,113,113,43,113,43,43,93,93,43,93,113, +113,113,114,114,114,114,114,43,95,94,93,43,93,93,93,93,93,113,113,113,113, +113,113,113,113,113,114,114,114,114,114,114,43,94,93,93,93,93,93,93,93,113, +43,113,113,43,113,114,114,114,114,114,114,94,93,43,93,113,113,113,113,43, +113,114,114,114,94,93,43,43,93,113,49,48,43,43,1,34,46,2,35,34,6,7,35,62, +3,51,50,30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45, +74,59,44,84,78,69,30,54,55,8,92,5,20,43,74,4,177,37,45,37,62,57,45,95,78, +50,37,45,37,63,56,44,95,78,51,0,0,0,2,0,22,4,177,3,25,5,228,0,5,0,11,0,111, +64,82,164,10,1,102,10,1,154,8,170,8,2,98,4,162,4,2,98,3,1,154,2,170,2,2,10, +159,6,1,15,6,31,6,127,6,223,6,4,7,6,4,64,63,0,79,0,143,0,175,0,191,0,207, +0,6,0,64,30,41,72,0,64,23,26,72,0,8,2,149,128,6,15,0,47,0,63,0,127,0,239, +0,5,0,0,47,93,50,26,237,50,1,47,43,43,93,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,93,19,53,19,51,21,1,51,53,19,51,21,1,22,217,207,254,182,253,217, +207,254,182,4,177,20,1,31,29,254,234,20,1,31,29,254,234,0,0,1,0,205,4,194, +1,225,6,7,0,5,0,64,64,43,2,16,12,17,72,41,2,1,10,5,26,5,42,5,3,3,43,3,1,3, +64,0,2,128,132,0,148,0,2,112,0,1,2,16,0,32,0,64,0,96,0,4,0,0,47,93,95,93, +93,26,205,1,47,26,205,93,49,48,95,93,93,43,19,53,19,51,21,3,205,69,207,201, +4,194,33,1,36,37,254,224,0,3,0,29,4,176,2,139,6,65,0,5,0,9,0,13,0,83,64,53, +2,16,11,17,72,10,5,26,5,42,5,3,47,4,1,4,47,1,1,1,1,6,192,13,208,13,2,13,10, +192,9,208,9,2,9,6,11,7,144,6,2,0,0,10,192,6,1,15,6,63,6,2,6,0,47,93,93,51, +51,47,205,16,237,50,1,47,205,93,47,205,93,18,57,47,113,205,93,49,48,93,43, +19,53,19,51,21,3,37,53,51,21,33,53,51,21,250,69,187,181,254,216,150,1,66, +150,4,176,33,1,112,37,254,148,31,172,172,172,172,0,0,255,255,0,4,0,0,5,82, +5,131,16,38,0,36,0,0,17,7,1,80,255,108,255,124,0,94,179,2,0,24,1,184,255, +10,181,24,24,5,5,37,28,184,255,192,179,36,36,72,28,184,255,192,179,30,30, +72,28,184,255,192,179,24,24,72,28,184,255,192,179,21,21,72,28,184,255,192, +179,18,18,72,28,184,255,192,179,15,15,72,28,184,255,192,64,11,12,12,72,28, +64,11,11,72,2,23,3,0,63,53,1,43,43,43,43,43,43,43,43,43,93,53,0,1,0,187,1, +190,1,126,2,154,0,3,2,10,179,3,134,0,5,184,255,128,64,12,229,233,72,6,5,22, +5,2,246,5,1,5,184,255,128,64,33,222,225,72,150,5,166,5,2,116,5,132,5,2,86, +5,102,5,2,68,5,1,38,5,54,5,2,2,5,18,5,2,211,5,184,255,128,64,22,207,210,72, +198,5,214,5,2,180,5,1,150,5,166,5,2,116,5,132,5,2,5,184,255,192,64,36,195, +199,72,4,5,20,5,2,214,5,230,5,246,5,3,194,5,1,148,5,164,5,180,5,3,118,5,134, +5,2,84,5,100,5,2,5,184,255,192,64,34,174,181,72,164,5,180,5,196,5,3,70,5, +86,5,118,5,134,5,150,5,5,52,5,1,38,5,1,4,5,20,5,2,161,5,184,255,192,179,157, +160,72,5,184,255,192,64,37,152,155,72,100,5,116,5,2,54,5,70,5,86,5,3,36,5, +1,6,5,22,5,2,244,5,1,214,5,230,5,2,178,5,194,5,2,5,184,255,128,64,28,135, +138,72,86,5,102,5,2,36,5,52,5,68,5,3,2,5,18,5,2,212,5,228,5,244,5,3,5,184, +255,192,64,23,119,124,72,82,5,98,5,2,1,32,5,48,5,64,5,3,4,5,20,5,2,112,5, +184,255,128,64,9,103,111,72,68,5,84,5,2,5,184,255,192,179,99,102,72,5,184, +255,128,179,92,95,72,5,184,255,192,179,87,91,72,5,184,255,128,64,21,81,86, +72,36,5,52,5,68,5,3,228,5,1,176,5,192,5,208,5,3,5,184,255,192,64,16,67,70, +72,48,5,1,36,5,1,0,5,16,5,2,60,5,184,255,192,64,12,56,59,72,187,5,1,128,5, +144,5,2,5,184,255,192,64,41,45,48,72,11,5,1,208,5,224,5,2,164,5,180,5,196, +5,3,32,5,48,5,2,2,0,5,16,5,2,240,5,1,159,5,175,5,2,0,5,1,5,184,255,192,181, +13,17,72,0,155,1,0,47,237,1,43,93,93,93,113,95,113,113,113,114,43,114,114, +43,94,93,93,93,43,93,93,113,43,43,43,43,114,43,94,93,93,95,93,43,93,113,113, +113,43,113,113,113,114,114,114,114,43,43,94,93,93,93,93,93,43,113,113,113, +113,113,114,43,114,114,114,114,43,94,93,93,93,93,93,93,43,93,113,43,47,237, +49,48,19,53,51,21,187,195,1,190,220,220,0,0,255,255,255,245,0,0,5,238,5,131, +16,39,0,40,0,240,0,0,17,7,1,80,255,40,255,124,0,49,64,10,1,14,3,1,16,15,1, +0,15,1,184,255,113,64,19,15,15,1,1,37,0,208,0,1,191,0,1,47,0,1,47,0,1,0,16, +93,93,93,93,53,43,93,93,53,0,63,53,0,0,0,255,255,255,242,0,0,6,13,5,131,16, +39,0,43,0,237,0,0,17,7,1,80,255,37,255,124,0,95,185,0,19,255,192,179,21,21, +72,19,184,255,192,179,20,20,72,19,184,255,192,179,19,19,72,19,184,255,192, +179,17,17,72,19,184,255,192,64,13,14,14,72,1,14,3,1,16,15,1,0,15,1,184,255, +113,64,19,15,15,5,5,37,0,207,0,1,191,0,1,111,0,1,47,0,1,0,16,93,93,93,93, +53,43,93,93,53,0,63,53,1,43,43,43,43,43,0,255,255,255,232,0,0,2,85,5,131, +16,39,0,44,0,217,0,0,17,7,1,80,255,27,255,124,0,92,185,0,11,255,192,179,17, +17,72,11,184,255,192,64,23,12,12,72,11,64,11,11,72,11,64,9,9,72,1,6,3,1,16, +7,1,0,7,1,184,255,102,64,28,7,7,1,1,37,0,128,0,1,127,0,1,111,0,1,95,0,1,79, +0,1,47,0,1,47,0,1,0,16,93,93,93,93,93,93,93,53,43,93,93,53,0,63,53,1,43,43, +43,43,255,255,255,187,255,236,5,211,5,150,16,38,0,50,252,0,17,7,1,80,254, +238,255,124,0,39,64,10,2,42,3,2,192,40,1,0,40,1,184,255,94,64,11,40,40,10, +10,37,1,0,47,0,1,0,16,93,53,53,43,93,93,53,0,63,53,0,0,0,255,255,0,65,0,0, +6,171,5,131,16,39,0,60,1,130,0,0,17,7,1,80,255,116,255,124,5,192,64,21,16, +64,233,233,72,16,64,229,229,72,16,64,227,227,72,16,64,226,226,72,16,184,255, +192,179,224,224,72,16,184,255,192,64,19,222,222,72,16,64,220,220,72,16,64, +219,219,72,16,64,216,216,72,16,184,255,192,179,215,215,72,16,184,255,192, +64,19,211,211,72,16,64,207,207,72,16,64,206,206,72,16,64,205,205,72,16,184, +255,192,179,204,204,72,16,184,255,192,64,19,202,202,72,16,64,199,199,72,16, +64,186,186,72,16,64,184,184,72,16,184,255,192,179,183,183,72,16,184,255,192, +64,14,182,182,72,16,64,179,179,72,16,64,177,177,72,16,184,255,192,64,19,172, +172,72,16,64,166,166,72,16,64,164,164,72,16,64,163,163,72,16,184,255,192, +64,24,161,161,72,16,64,156,156,72,16,128,153,153,72,16,64,152,152,72,16,64, +151,151,72,16,184,255,192,179,149,149,72,16,184,255,128,179,148,148,72,16, +184,255,128,179,147,147,72,16,184,255,192,179,146,146,72,16,184,255,128,179, +145,145,72,16,184,255,192,179,144,144,72,16,184,255,128,179,141,141,72,16, +184,255,128,179,140,140,72,16,184,255,192,179,139,139,72,16,184,255,128,179, +138,138,72,16,184,255,192,179,137,137,72,16,184,255,192,179,136,136,72,16, +184,255,192,179,135,135,72,16,184,255,128,179,134,134,72,16,184,255,192,179, +133,133,72,16,184,255,128,179,131,131,72,16,184,255,192,179,130,130,72,16, +184,255,0,179,129,129,72,16,184,255,0,179,128,128,72,16,184,254,192,179,127, +127,72,16,184,255,0,179,126,126,72,16,184,255,0,179,125,125,72,16,184,255, +64,179,124,124,72,16,184,255,64,179,123,123,72,16,184,255,64,179,122,122, +72,16,184,255,0,179,121,121,72,16,184,254,192,179,120,120,72,16,184,255,0, +179,119,119,72,16,184,255,0,179,118,118,72,16,184,255,64,179,117,117,72,16, +184,255,0,179,116,116,72,16,184,255,64,179,115,115,72,16,184,255,0,179,114, +114,72,16,184,255,64,179,113,113,72,16,184,255,64,179,112,112,72,16,184,255, +64,179,111,111,72,16,184,255,128,179,110,110,72,16,184,255,64,179,109,109, +72,16,184,255,128,179,108,108,72,16,184,255,0,179,107,107,72,16,184,255,64, +179,106,106,72,16,184,255,0,179,105,105,72,16,184,255,64,179,104,104,72,16, +184,255,64,179,103,103,72,16,184,255,64,179,102,102,72,16,184,255,128,179, +101,101,72,16,184,255,64,179,100,100,72,16,184,255,64,179,99,99,72,16,184, +255,0,179,98,98,72,16,184,255,64,179,97,97,72,16,184,255,64,179,96,96,72, +16,184,255,64,179,95,95,72,16,184,255,64,179,94,94,72,16,184,255,64,179,93, +93,72,16,184,255,128,179,92,92,72,16,184,255,64,179,91,91,72,16,184,255,128, +179,90,90,72,16,184,255,64,179,89,89,72,16,184,255,128,179,88,88,72,16,184, +255,64,179,87,87,72,16,184,255,64,179,86,86,72,16,184,255,64,179,85,85,72, +16,184,255,64,179,84,84,72,16,184,255,64,179,83,83,72,16,184,255,128,179, +82,82,72,16,184,255,192,179,81,81,72,16,184,255,128,179,80,80,72,16,184,255, +128,179,79,79,72,16,184,255,64,179,78,78,72,16,184,255,64,179,77,77,72,16, +184,255,64,179,76,76,72,16,184,255,128,179,75,75,72,16,184,255,128,179,74, +74,72,16,184,255,128,179,73,73,72,16,184,255,64,179,72,72,72,16,184,255,128, +179,71,71,72,16,184,255,192,179,70,70,72,16,184,255,128,179,69,69,72,16,184, +255,192,179,68,68,72,16,184,255,192,179,67,67,72,16,184,255,128,179,66,66, +72,16,184,255,64,179,65,65,72,16,184,255,128,179,64,64,72,16,184,255,128, +179,63,63,72,16,184,255,128,179,62,62,72,16,184,255,192,179,61,61,72,16,184, +255,192,179,60,60,72,16,184,255,192,179,59,59,72,16,184,255,128,179,58,58, +72,16,184,255,128,179,57,57,72,16,184,255,128,179,56,56,72,16,184,255,128, +179,55,55,72,16,184,255,128,179,54,54,72,16,184,255,192,179,53,53,72,16,184, +255,192,179,52,52,72,16,184,255,128,179,51,51,72,16,184,255,192,179,50,50, +72,16,184,255,128,179,49,49,72,16,184,255,128,179,48,48,72,16,184,255,128, +179,47,47,72,16,184,255,192,179,46,46,72,16,184,255,128,179,45,45,72,16,184, +255,128,179,44,44,72,16,184,255,128,179,43,43,72,16,184,255,192,179,42,42, +72,16,184,255,192,179,41,41,72,16,184,255,192,179,40,40,72,16,184,255,192, +179,39,39,72,16,184,255,128,179,38,38,72,16,184,255,128,179,37,37,72,16,184, +255,128,179,36,36,72,16,184,255,192,179,35,35,72,16,184,255,128,179,34,34, +72,16,184,255,192,179,33,33,72,16,184,255,192,179,32,32,72,16,184,255,192, +179,31,31,72,16,184,255,192,179,30,30,72,16,184,255,192,179,29,29,72,16,184, +255,192,179,28,28,72,16,184,255,192,179,27,27,72,16,184,255,192,179,26,26, +72,16,184,255,192,179,25,25,72,16,184,255,192,179,24,24,72,16,184,255,128, +179,23,23,72,16,184,255,192,179,22,22,72,16,184,255,192,179,21,21,72,16,184, +255,192,179,17,17,72,16,184,255,128,179,16,16,72,16,184,255,192,179,15,15, +72,16,184,255,192,179,14,14,72,16,184,255,192,64,30,12,12,72,16,64,11,11, +72,1,11,3,1,128,12,1,112,12,1,96,12,1,64,12,1,16,12,1,0,12,1,184,255,166, +64,13,12,12,4,4,37,0,176,0,1,0,0,1,0,16,93,93,53,43,93,93,93,93,93,93,53, +0,63,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,187,0,0, +5,173,5,150,16,38,1,114,10,0,17,7,1,80,254,238,255,124,0,68,64,15,65,64,19, +19,72,1,60,3,1,144,58,1,16,58,1,184,255,62,64,28,58,58,53,53,37,0,159,0,1, +95,0,1,31,0,1,223,0,1,175,0,1,159,0,1,31,0,1,0,16,93,93,93,93,113,113,113, +53,43,93,93,53,0,63,53,1,43,0,0,255,255,255,176,0,0,2,30,6,65,16,38,1,130, +0,0,17,6,1,81,147,0,2,60,64,11,29,64,227,227,72,29,64,226,226,72,29,184,255, +192,179,223,223,72,29,184,255,192,179,220,220,72,29,184,255,192,64,19,219, +219,72,29,64,213,213,72,29,64,212,212,72,29,64,211,211,72,29,184,255,192, +179,207,207,72,29,184,255,192,179,206,206,72,29,184,255,192,64,19,205,205, +72,29,64,200,200,72,29,64,199,199,72,29,64,198,198,72,29,184,255,192,64,14, +192,192,72,29,64,182,182,72,29,64,177,177,72,29,184,255,192,179,175,175,72, +29,184,255,192,64,19,174,174,72,29,64,168,168,72,29,64,167,167,72,29,64,164, +164,72,29,184,255,192,179,161,161,72,29,184,255,192,64,19,160,160,72,29,64, +155,155,72,29,64,154,154,72,29,64,153,153,72,29,184,255,192,179,152,152,72, +29,184,255,192,64,19,151,151,72,29,64,141,141,72,29,64,132,132,72,29,64,131, +131,72,29,184,255,192,64,9,129,129,72,29,64,119,119,72,29,184,255,192,64, +14,115,115,72,29,64,110,110,72,29,64,109,109,72,29,184,255,192,64,19,106, +106,72,29,64,101,101,72,29,64,100,100,72,29,64,96,96,72,29,184,255,192,179, +94,94,72,29,184,255,192,64,19,93,93,72,29,64,87,87,72,29,64,86,86,72,29,64, +85,85,72,29,184,255,192,179,84,84,72,29,184,255,192,64,9,79,79,72,29,64,74, +74,72,29,184,255,192,64,24,61,61,72,29,64,56,56,72,29,64,55,55,72,29,64,54, +54,72,29,64,51,51,72,29,184,255,192,179,50,50,72,29,184,255,192,179,49,49, +72,29,184,255,192,64,19,48,48,72,29,64,42,42,72,29,64,41,41,72,29,64,40,40, +72,29,184,255,192,179,36,36,72,29,184,255,192,179,35,35,72,29,184,255,192, +64,19,34,34,72,29,64,29,29,72,29,64,24,24,72,29,64,23,23,72,29,184,255,192, +179,21,21,72,29,184,255,192,179,17,17,72,29,184,255,192,64,14,16,16,72,29, +64,9,9,72,29,64,8,8,72,29,184,255,192,64,12,7,7,72,3,2,1,14,17,38,3,2,1,184, +255,220,180,20,26,5,13,37,1,43,53,53,53,0,43,53,53,53,1,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,0,4,0,0,5,82,5,129, +18,6,0,36,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,0,1,0,168,0,1,4, +47,5,130,0,5,0,56,64,40,3,90,0,4,16,4,64,4,3,4,16,0,48,0,80,0,3,0,0,16,0, +32,0,64,0,96,0,128,0,160,0,7,7,0,2,95,5,3,3,18,0,63,63,237,1,47,94,93,113, +47,93,237,49,48,1,21,33,17,35,17,4,47,253,56,191,5,130,156,251,27,5,129,0, +2,0,61,0,0,5,26,5,129,0,5,0,18,0,176,64,26,106,7,122,7,138,7,3,101,17,117, +17,133,17,3,89,8,1,86,16,1,6,24,13,17,72,18,184,255,232,64,64,13,17,72,132, +2,1,70,2,102,2,118,2,3,139,1,1,73,1,105,1,121,1,3,2,1,12,12,0,6,95,3,1,16, +3,1,15,3,1,175,3,207,3,223,3,255,3,4,79,3,127,3,2,48,3,1,31,3,1,3,18,128, +0,1,0,184,255,192,64,29,21,30,72,0,48,20,1,47,20,1,0,3,6,3,18,95,5,18,12, +32,19,22,72,153,12,1,12,1,3,0,63,51,93,43,63,237,23,50,1,93,93,47,43,93,51, +47,93,93,93,93,113,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93,43,43,93, +93,93,93,49,48,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,62,2,5,217,1,254,251, +35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12,141, +156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,255,255,0,168,0,0,4,254,5,129, +18,6,0,40,0,0,255,255,0,65,0,0,4,163,5,129,18,6,0,61,0,0,255,255,0,168,0, +0,5,32,5,129,18,6,0,43,0,0,0,3,0,97,255,236,5,215,5,150,0,19,0,39,0,43,0, +179,64,130,105,12,1,102,17,1,89,22,1,86,32,1,86,28,1,26,23,90,23,2,21,27, +85,27,2,9,42,1,6,43,1,10,37,26,37,90,37,3,5,33,21,33,85,33,3,9,43,42,30,0, +91,15,20,1,59,207,20,239,20,2,0,20,1,239,20,255,20,2,176,20,1,111,20,1,48, +20,1,31,20,1,0,20,16,20,32,20,64,20,80,20,160,20,6,7,20,30,91,175,10,191, +10,2,32,10,1,15,10,31,10,2,10,43,95,40,40,35,25,95,15,4,35,95,5,19,128,45, +1,32,45,1,93,93,0,63,237,63,237,18,57,47,237,1,47,93,93,93,237,47,94,93,113, +113,113,113,113,114,114,94,93,237,18,57,57,49,48,94,93,93,93,93,93,93,93, +93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,37,33,21,33,5,215,95,180,254,252,165,174, +254,250,174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127, +63,65,127,189,123,132,191,123,59,252,226,2,75,253,181,2,199,165,254,242,192, +104,109,195,1,12,159,165,1,10,187,101,102,188,254,246,163,127,208,148,80, +80,148,208,127,127,211,153,85,86,153,212,208,160,0,0,0,255,255,0,189,0,0, +1,124,5,129,18,6,0,44,0,0,255,255,0,168,0,0,5,63,5,129,18,6,0,46,0,0,0,1, +0,10,0,1,5,78,5,130,0,16,0,202,64,11,116,16,132,16,2,123,15,139,15,2,13,184, +255,232,182,14,17,72,54,13,1,12,184,255,240,64,127,13,17,72,2,16,13,17,72, +1,24,14,17,72,57,1,1,111,18,1,48,18,1,47,18,1,0,18,1,21,16,37,16,53,16,3, +6,16,1,230,16,246,16,2,16,26,15,42,15,58,15,3,9,15,1,233,15,249,15,2,15,7, +7,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,13,175,14,191,14,2,14,26,1,42, +1,58,1,3,9,1,1,233,1,249,1,2,1,16,0,32,0,48,0,3,111,0,1,0,0,48,0,2,0,118, +7,134,7,2,7,15,3,14,0,18,0,63,50,63,51,93,1,47,93,93,113,50,93,113,113,47, +93,51,93,113,113,57,61,47,51,93,113,113,51,93,113,113,93,93,93,93,49,48,93, +43,43,43,93,43,93,93,37,35,1,46,1,39,38,39,6,7,14,1,7,1,35,1,51,5,78,201, +254,124,17,29,12,14,12,13,14,12,30,15,254,122,201,2,63,198,1,3,224,47,89, +35,41,37,39,41,35,89,45,252,32,5,129,0,255,255,0,168,0,0,6,2,5,129,18,6,0, +48,0,0,255,255,0,168,0,0,5,32,5,129,18,6,0,49,0,0,0,3,0,90,0,0,4,217,5,129, +0,3,0,7,0,11,0,75,64,49,82,3,1,10,9,5,3,95,6,1,15,6,31,6,175,6,191,6,4,6, +2,16,5,48,5,2,32,5,64,5,112,5,160,5,4,5,10,95,11,11,0,7,95,6,18,3,95,0,3, +0,63,237,63,237,17,57,47,237,1,47,93,113,51,47,93,113,51,18,57,57,49,48,113, +19,33,21,33,1,21,33,53,1,21,33,53,125,4,57,251,199,4,92,251,129,3,228,252, +183,5,129,156,251,183,156,156,2,133,154,154,0,0,0,255,255,0,97,255,236,5, +215,5,150,18,6,0,50,0,0,0,1,0,168,0,0,5,32,5,129,0,7,0,79,64,40,3,90,0,4, +16,4,64,4,3,7,4,7,90,64,111,0,127,0,143,0,191,0,4,0,0,9,128,32,9,1,32,9,160, +9,176,9,192,9,4,9,184,255,192,64,10,14,17,72,2,95,5,3,4,0,18,0,63,50,63,237, +1,43,93,113,26,16,204,47,93,26,237,47,94,93,237,49,48,33,17,33,17,35,17,33, +17,4,97,253,6,191,4,120,4,224,251,32,5,129,250,127,255,255,0,168,0,0,4,234, +5,129,18,6,0,51,0,0,0,1,0,108,0,0,4,161,5,129,0,12,0,188,64,135,169,3,1,105, +9,1,116,9,132,9,164,9,3,148,8,164,8,2,87,8,103,8,2,145,7,1,84,7,100,7,2,146, +10,162,10,2,116,10,132,10,2,70,10,86,10,102,10,3,57,3,185,3,2,249,3,1,103, +3,1,168,8,1,103,8,1,8,100,2,1,39,2,1,175,6,1,2,6,2,6,1,208,11,1,0,11,16,11, +48,11,80,11,96,11,128,11,6,7,11,70,7,1,11,7,1,7,3,3,10,175,1,191,1,2,32,1, +1,15,1,1,1,3,7,95,9,2,8,3,0,4,3,1,10,95,0,18,0,63,237,50,63,18,23,57,237, +50,1,47,93,93,93,51,51,47,51,113,113,47,94,93,93,18,57,57,47,47,93,113,113, +51,113,113,113,113,114,49,48,93,93,93,93,93,93,93,93,113,93,51,53,9,1,53, +33,21,33,1,21,1,33,21,108,2,26,253,247,3,231,252,240,1,202,254,22,3,109,162, +2,67,1,251,161,156,254,67,124,253,240,156,0,255,255,0,46,0,0,4,180,5,129, +18,6,0,55,0,0,255,255,0,45,0,0,5,41,5,129,18,6,0,60,0,0,0,3,0,117,255,245, +5,238,5,139,0,29,0,40,0,51,0,180,185,0,28,255,240,179,12,15,72,17,184,255, +240,179,12,15,72,27,184,255,240,179,12,15,72,18,184,255,240,64,72,12,15,72, +41,90,11,15,123,15,171,15,3,15,8,30,90,4,0,116,0,164,0,3,0,35,24,7,90,47, +21,4,8,1,20,8,36,8,68,8,116,8,164,8,244,8,6,8,20,53,68,53,2,0,53,1,132,53, +164,53,196,53,244,53,4,112,53,1,2,96,53,1,53,184,255,192,64,24,10,13,72,35, +46,96,10,6,10,34,49,96,20,24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57, +47,47,17,51,16,237,50,17,51,16,237,50,1,43,93,95,93,93,113,113,47,93,113, +51,51,253,50,50,220,93,237,16,220,93,237,49,48,0,43,43,43,43,1,20,14,2,43, +1,21,35,53,35,34,46,2,53,52,62,2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17, +51,50,62,2,37,20,30,2,59,1,17,35,34,6,5,238,64,131,197,133,83,185,83,133, +197,131,64,67,133,201,135,72,185,71,135,202,133,67,192,185,183,48,56,92,136, +89,43,252,7,43,89,136,92,56,52,182,182,2,224,105,188,143,84,227,227,84,143, +188,105,113,185,131,72,182,182,72,131,185,117,187,180,253,22,53,98,140,88, +88,140,98,53,2,234,180,255,255,0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,145, +0,0,6,30,5,129,0,35,0,203,64,127,90,31,106,31,2,85,30,101,30,2,90,4,106,4, +2,90,5,106,5,2,74,22,1,69,13,1,3,25,90,100,28,1,132,28,148,28,2,28,19,35, +90,0,10,90,107,7,1,139,7,155,7,2,7,16,219,0,1,4,0,100,0,132,0,3,219,0,1,4, +0,52,0,68,0,100,0,132,0,148,0,180,0,196,0,8,7,0,4,37,36,37,52,37,68,37,132, +37,196,37,212,37,7,228,37,244,37,2,160,37,1,132,37,148,37,2,96,37,112,37, +2,84,37,1,64,37,1,2,37,184,255,192,64,18,9,12,72,34,2,96,19,239,15,1,15,15, +26,17,8,3,0,18,0,63,63,51,51,57,47,93,51,237,50,1,43,95,93,93,93,93,93,93, +113,47,94,93,93,113,113,51,220,93,113,237,16,253,50,220,93,113,237,49,48, +95,93,93,93,0,93,1,93,0,93,33,17,35,34,46,2,53,17,51,17,20,30,2,59,1,17,51, +17,51,50,62,2,53,17,51,17,20,14,2,43,1,17,2,251,83,133,201,134,67,191,47, +93,139,92,56,185,56,95,140,91,45,191,68,134,201,132,83,1,171,84,142,189,104, +1,207,254,45,80,137,100,57,3,73,252,183,57,100,137,80,1,211,254,49,104,189, +142,84,254,85,0,0,0,1,0,87,0,0,5,163,5,150,0,57,0,225,64,91,101,36,1,101, +22,1,157,49,1,143,49,1,49,16,11,15,72,157,9,1,143,9,1,9,16,11,15,72,116,3, +132,3,2,54,3,1,54,2,118,2,2,54,56,118,56,2,116,55,132,55,2,54,55,1,42,26, +1,42,32,1,41,53,48,40,10,18,96,40,112,40,144,40,3,111,18,127,18,159,18,3, +40,18,40,18,24,34,91,80,53,1,53,184,255,192,64,69,27,30,72,191,53,207,53, +2,48,53,1,53,17,5,91,31,24,79,24,2,224,24,1,15,24,31,24,95,24,207,24,223, +24,5,160,24,1,111,24,159,24,2,0,24,32,24,48,24,3,8,24,95,59,1,10,15,19,39, +48,5,42,95,18,41,18,29,95,0,4,0,63,237,63,51,237,23,50,1,93,47,94,93,93,93, +113,113,114,253,196,47,93,93,43,114,237,17,57,57,47,47,93,93,17,51,17,51, +16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,1,50,30,2, +21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46,2,35,34,14,2,21,20,30, +2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,2,253,151,241,168,90,59,109, +157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116,169,108,109,170,116, +61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109,59,90,168,241,5,150, +86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51,126,143,159,85,116,181, +124,65,65,124,181,116,85,159,143,126,51,224,156,4,2,3,2,54,138,167,191,106, +147,234,162,86,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218, +0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,3,0,45, +0,0,5,41,6,178,0,8,0,12,0,16,2,114,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5, +1,3,5,1,16,3,5,184,255,232,64,255,12,15,72,12,133,9,16,133,64,13,5,4,14,2, +1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8,6,1,90,38,2,86,2,150,2,3, +118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,18,169,18,201,18,3,86,18,1,9,18, +57,18,2,25,18,89,18,137,18,249,18,4,6,18,1,202,249,18,1,230,18,1,9,18,25, +18,185,18,201,18,4,198,18,1,89,18,121,18,169,18,3,54,18,1,41,18,57,18,185, +18,233,18,4,11,18,1,153,249,18,1,198,18,214,18,2,178,18,1,164,18,1,150,18, +1,130,18,1,116,18,1,86,18,102,18,2,66,18,1,36,18,52,18,2,18,18,1,4,18,1,244, +18,1,230,18,1,196,18,212,18,2,166,18,182,18,2,146,18,1,132,18,1,118,18,1, +98,18,1,84,18,1,54,18,70,18,2,36,18,1,22,18,1,4,18,1,242,18,1,1,208,18,224, +18,2,196,18,1,160,18,176,18,2,148,18,1,112,18,1,100,18,1,64,18,1,20,18,36, +18,52,18,3,0,18,1,105,64,202,228,18,244,18,2,208,18,1,164,18,180,18,196,18, +3,128,18,144,18,2,116,18,1,80,18,96,18,2,68,18,1,32,18,1,4,18,20,18,2,244, +18,1,224,18,1,196,18,212,18,2,176,18,1,84,18,100,18,116,18,148,18,164,18, +5,48,18,64,18,2,36,18,1,0,18,1,196,18,244,18,2,144,18,1,4,18,20,18,36,18, +68,18,84,18,116,18,132,18,7,57,224,18,1,132,18,164,18,212,18,3,112,18,1,4, +18,36,18,52,18,84,18,100,18,5,228,18,244,18,2,192,18,1,180,18,1,144,18,1, +4,18,20,18,52,18,84,18,132,18,5,212,18,228,18,2,187,18,1,164,18,1,112,18, +1,2,48,18,96,18,2,15,18,47,18,2,10,14,145,9,95,13,1,13,64,9,12,72,13,0,3, +59,3,75,3,123,3,3,3,1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,47,43,93,51,237, +50,1,93,93,95,93,93,93,93,113,113,113,113,113,114,114,114,114,94,93,93,93, +113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,95,93,113,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,113,113, +113,114,114,114,94,93,93,113,113,113,47,94,93,93,93,113,253,57,206,94,93, +93,50,43,1,24,16,77,230,50,47,26,237,220,237,49,48,43,95,94,93,93,43,93,93, +1,17,35,19,1,51,9,1,51,37,53,51,21,33,53,51,21,3,9,190,2,253,224,205,1,178, +1,176,205,253,249,163,253,211,165,2,72,253,184,2,72,3,57,253,97,2,159,121, +184,184,184,184,255,255,0,86,255,236,4,101,6,7,18,38,1,122,0,0,17,7,1,80, +1,33,0,0,0,19,64,11,2,60,17,38,2,26,60,63,8,23,37,1,43,53,0,43,53,0,0,0,255, +255,0,70,255,236,3,106,6,7,18,38,1,126,0,0,17,7,1,80,0,202,0,0,0,19,64,11, +1,58,17,38,1,73,58,61,16,6,37,1,43,53,0,43,53,0,0,0,255,255,0,106,254,88, +3,238,6,7,18,38,1,128,0,0,17,7,1,80,1,57,0,0,0,19,64,11,1,36,17,38,1,100, +36,39,17,34,37,1,43,53,0,43,53,0,0,0,255,255,0,137,0,0,1,178,6,7,18,38,1, +130,0,0,17,6,1,80,209,0,0,27,64,17,1,14,17,38,1,16,14,1,0,14,1,29,14,17,5, +13,37,1,43,93,93,53,0,43,53,0,255,255,0,133,255,236,3,254,6,65,18,38,1,142, +0,0,17,7,1,81,0,222,0,0,0,30,64,9,3,2,1,32,17,38,3,2,1,184,255,241,180,38, +44,10,0,37,1,43,53,53,53,0,43,53,53,53,0,2,0,86,255,236,4,101,4,78,0,39,0, +59,1,15,64,196,122,48,138,48,2,121,52,137,52,2,101,43,1,90,58,106,58,2,54, +14,70,14,2,29,31,45,31,2,29,38,45,38,2,47,37,1,29,37,1,75,36,107,36,2,47, +36,63,36,2,29,36,1,139,35,1,47,35,1,29,35,1,47,34,1,29,34,1,47,22,1,27,22, +1,47,21,1,27,21,1,75,20,107,20,2,47,20,1,27,20,1,45,19,1,27,19,1,121,6,137, +6,2,11,6,27,6,2,34,48,18,22,72,34,33,22,48,18,22,72,22,23,26,33,42,33,2,73, +23,1,26,23,42,23,2,33,23,159,28,175,28,191,28,3,28,64,29,33,72,28,64,0,16, +22,34,4,144,50,160,50,176,50,3,127,50,1,32,50,64,50,2,50,61,128,40,71,8,16, +61,1,0,50,28,16,4,23,33,21,23,15,55,80,11,16,45,80,5,22,0,63,237,63,237,63, +63,18,23,57,1,93,47,237,26,16,220,93,93,93,23,50,26,205,43,93,50,50,93,93, +93,17,51,43,17,51,43,49,48,0,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,0,93,1,93,0,93,1,93,37,14,3,35,34,2,17,16,18, +51,50,30,2,23,51,62,3,55,51,14,3,7,30,3,23,35,46,3,39,1,20,30,2,51,50,62, +2,55,46,3,35,34,14,2,3,75,26,65,87,111,70,205,193,217,209,69,112,86,63,20, +2,4,14,19,23,13,188,22,46,39,30,5,3,23,31,36,18,183,11,21,16,13,3,253,196, +28,59,93,66,54,100,82,61,14,12,45,71,102,70,66,96,64,31,237,56,94,69,38,1, +20,1,24,1,28,1,26,39,69,93,54,21,56,63,65,30,47,128,139,139,58,103,175,144, +110,39,28,66,65,58,20,1,49,112,160,103,48,52,107,160,108,86,154,115,68,46, +102,163,0,2,0,142,254,87,4,73,5,204,0,32,0,62,0,185,64,68,149,20,1,154,16, +1,123,7,139,7,2,122,60,138,60,2,106,3,122,3,138,3,3,102,31,118,31,2,74,50, +90,50,106,50,3,21,2,37,2,101,2,117,2,133,2,5,147,21,1,21,21,37,21,2,28,48, +23,72,52,48,48,64,48,2,96,48,1,48,184,255,192,64,58,20,23,72,48,52,48,52, +14,0,72,64,48,43,64,43,160,43,3,160,43,176,43,192,43,3,43,64,128,33,13,70, +0,14,16,14,48,14,3,8,14,28,48,80,49,49,38,57,80,18,0,13,27,33,38,80,9,5,22, +0,63,51,237,50,63,63,237,18,57,47,237,57,1,47,94,93,237,50,26,16,220,93,113, +26,237,18,57,57,47,47,43,93,113,16,237,17,57,49,48,93,93,93,93,93,0,93,93, +93,1,93,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35,17,52,54,51,50,30,2,21, +20,14,2,7,30,3,1,30,3,51,50,62,2,53,52,46,2,35,53,62,1,53,52,46,2,35,34,14, +2,21,4,73,53,111,173,120,102,160,56,6,3,3,180,228,226,99,152,102,53,35,61, +81,46,57,114,91,56,252,249,28,71,81,87,43,72,110,73,38,38,81,128,89,127,113, +27,57,87,60,70,104,68,34,1,149,89,154,116,66,55,39,57,92,53,254,215,5,172, +237,220,47,90,130,82,73,111,82,56,18,11,55,93,137,254,218,19,34,25,14,41, +76,106,66,65,110,81,45,142,27,139,122,44,77,57,32,35,77,122,88,0,0,0,0,1, +0,7,254,88,3,249,4,58,0,24,0,237,64,59,59,22,75,22,2,41,22,1,59,21,75,21, +2,26,21,42,21,2,9,21,1,42,12,58,12,74,12,3,25,12,1,77,13,1,13,16,13,16,72, +66,2,1,54,2,1,34,2,1,6,2,22,2,2,13,2,1,1,17,1,184,255,240,64,76,13,16,72, +24,15,7,7,13,14,16,15,14,47,14,2,57,31,14,63,14,95,14,127,14,159,14,191,14, +223,14,255,14,8,63,14,127,14,159,14,191,14,223,14,255,14,6,0,14,32,14,2,224, +14,1,191,14,1,160,14,1,95,14,159,14,2,0,14,16,14,64,14,3,8,14,1,0,184,255, +240,64,17,127,0,1,0,64,26,1,0,26,48,26,96,26,144,26,4,26,184,255,192,64,14, +21,26,72,7,15,24,3,25,20,27,13,13,0,15,0,63,50,47,63,17,23,51,1,43,93,113, +47,93,56,50,47,94,93,93,93,93,93,113,113,114,94,93,56,51,57,61,47,51,51,49, +48,43,94,93,94,93,93,93,93,43,93,93,93,93,93,93,93,93,19,51,19,30,3,23,62, +3,55,19,51,1,14,3,7,35,62,1,55,7,192,245,7,21,20,17,4,5,18,21,22,8,239,191, +254,122,17,31,27,23,7,191,17,48,24,4,58,253,93,22,63,67,63,22,21,62,67,63, +22,2,165,251,251,45,111,124,132,65,131,213,91,0,0,0,2,0,86,255,236,4,29,5, +204,0,19,0,50,0,156,64,81,115,28,131,28,2,106,28,1,118,46,134,46,2,106,46, +1,90,2,106,2,2,90,17,106,17,2,85,13,101,13,2,114,26,130,26,2,38,26,1,128, +25,1,114,25,1,51,25,67,25,2,50,50,31,71,0,64,25,46,5,47,47,41,31,0,1,144, +0,1,0,52,128,10,71,31,41,1,41,47,20,80,5,184,255,224,64,22,23,28,72,5,24, +18,22,72,111,5,1,90,5,1,5,46,48,0,15,80,36,22,0,63,237,63,57,57,93,93,43, +43,237,50,1,47,93,237,26,16,204,93,113,17,57,47,57,57,51,26,16,237,50,47, +49,48,93,93,93,93,93,93,93,93,93,93,93,93,1,52,46,2,39,14,3,21,20,30,2,51, +50,62,2,1,34,46,2,39,1,30,3,21,20,14,2,35,34,46,2,53,52,62,2,55,1,53,33,21, +3,96,49,69,76,26,73,134,102,60,35,73,111,77,81,112,69,31,254,255,13,42,45, +41,13,1,60,54,102,79,49,64,123,180,115,114,180,125,66,73,127,169,96,254,193, +2,221,1,215,85,145,115,86,27,26,81,114,146,91,76,131,96,55,54,95,131,3,191, +2,3,2,1,254,188,55,116,134,159,97,110,182,131,72,68,127,183,115,112,176,135, +97,33,1,83,119,132,0,1,0,70,255,236,3,106,4,78,0,57,0,179,64,49,140,37,1, +133,3,1,53,36,69,36,2,55,34,1,42,8,1,37,5,1,14,24,9,12,72,10,29,26,29,42, +29,3,42,70,21,48,27,48,27,48,16,35,35,6,64,37,48,72,6,184,255,192,179,14, +17,72,6,184,255,192,64,66,8,11,72,6,59,53,71,31,16,63,16,79,16,95,16,4,16, +64,37,43,72,16,128,59,1,31,59,95,59,2,21,48,80,15,47,31,47,79,47,95,47,175, +47,223,47,239,47,7,191,47,207,47,2,47,47,0,39,80,36,32,16,0,80,5,11,22,0, +63,51,237,63,51,237,18,57,47,93,113,237,57,1,93,113,47,43,93,237,16,198,43, +43,43,50,47,17,57,57,47,47,18,57,237,49,48,93,43,0,93,1,93,0,93,93,93,93, +37,50,62,2,55,23,14,3,35,34,46,2,53,52,62,2,55,53,46,3,53,52,62,2,51,50,22, +23,7,46,1,35,34,6,21,20,30,2,51,21,34,14,2,21,20,30,2,1,200,54,96,79,63,21, +105,32,84,106,130,78,96,141,92,45,42,72,96,54,51,85,61,34,50,95,136,87,118, +191,67,128,47,125,75,91,96,55,97,131,75,72,139,109,66,29,52,74,114,31,48, +56,26,100,39,71,53,32,46,84,116,69,58,95,69,42,5,2,6,40,64,86,51,62,106,77, +44,86,99,88,71,68,85,74,57,70,37,12,135,11,40,80,69,45,69,46,24,0,0,0,1,0, +86,254,159,3,96,5,204,0,56,0,209,64,117,169,38,1,156,29,172,29,2,149,55,165, +55,2,173,39,1,124,39,140,39,156,39,3,117,8,1,115,2,1,100,36,132,36,148,36, +164,36,4,139,24,155,24,171,24,3,57,24,1,44,31,156,31,172,31,3,44,30,60,30, +76,30,3,100,54,132,54,164,54,3,38,54,86,54,2,240,47,1,47,47,21,0,71,33,40, +50,50,10,31,21,79,21,2,191,21,1,21,64,29,33,72,0,21,16,21,32,21,64,21,4,7, +21,50,47,80,5,26,0,184,255,240,64,31,19,22,72,135,0,151,0,2,218,33,1,169, +33,185,33,201,33,3,136,33,152,33,2,26,33,0,3,15,48,0,15,0,47,63,18,23,57, +93,93,93,93,43,17,51,237,50,1,47,94,93,43,93,113,205,50,47,51,47,237,18,57, +47,113,49,48,93,93,93,93,0,93,93,1,93,0,93,93,1,93,93,93,0,93,1,93,1,20,30, +2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,55,53,14,3,35, +33,53,33,21,14,5,1,21,43,74,100,57,54,111,90,58,18,26,29,10,126,9,19,16,11, +36,66,94,57,42,89,82,73,54,31,49,85,113,127,135,64,12,34,36,34,11,254,167, +2,130,62,131,123,108,81,47,1,123,64,79,49,31,15,15,34,57,88,68,34,68,62,51, +17,56,12,33,38,39,19,34,45,33,25,13,10,23,36,50,74,100,67,83,176,176,175, +166,155,68,4,1,1,1,1,131,127,70,157,166,172,171,166,0,0,0,0,1,0,106,254,88, +3,238,4,78,0,35,0,100,185,0,32,255,232,64,46,9,12,72,35,70,64,80,0,1,159, +0,255,0,2,0,37,128,23,12,70,192,13,1,0,13,16,13,48,13,224,13,240,13,5,8,13, +240,37,1,255,37,1,112,37,1,37,184,255,192,64,14,19,23,72,35,27,23,6,80,29, +16,17,15,12,21,0,63,63,63,237,50,63,1,43,93,93,113,47,94,93,113,237,50,26, +16,220,93,113,26,237,49,48,43,1,17,52,46,2,35,34,14,2,21,17,35,17,52,38,39, +51,30,3,21,51,62,3,51,50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,22, +14,170,9,14,10,5,3,26,62,82,106,70,90,130,84,39,254,88,4,86,79,106,65,27, +45,85,125,81,253,141,3,83,68,121,42,21,48,49,47,20,47,76,53,29,44,92,145, +100,251,135,0,0,0,0,3,0,106,255,236,4,9,5,203,0,15,0,26,0,37,0,194,64,108, +153,19,169,19,2,150,24,166,24,2,138,2,1,133,5,1,138,14,1,133,10,1,124,36, +140,36,2,115,29,131,29,2,85,29,101,29,2,124,18,140,18,2,74,18,90,18,106,18, +3,115,25,131,25,2,69,25,85,25,101,25,3,6,13,22,13,2,6,10,1,9,5,1,9,2,1,7, +33,0,71,64,15,21,31,21,127,21,143,21,239,21,255,21,6,21,64,45,48,72,21,39, +128,32,22,71,32,8,1,8,184,255,192,183,29,35,72,8,48,39,1,39,184,255,192,64, +19,30,35,72,223,39,1,22,80,32,32,16,27,80,11,0,16,80,3,22,0,63,237,63,237, +18,57,47,237,1,93,43,113,47,43,93,237,50,26,16,220,43,113,26,237,51,49,48, +0,94,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,16,2,35,34,46, +1,2,53,16,18,51,50,30,1,18,1,50,62,2,55,33,30,3,19,34,14,2,7,33,46,3,4,9, +240,228,108,171,118,62,233,232,121,175,112,54,254,42,62,100,73,42,3,253,221, +3,44,71,94,66,62,99,72,42,3,2,35,3,40,69,97,2,221,254,131,254,140,92,186, +1,27,192,1,117,1,121,93,188,254,231,252,216,52,128,216,164,164,215,129,52, +4,217,51,126,212,161,161,212,126,51,0,0,0,1,0,137,0,0,1,141,4,58,0,13,1,13, +64,210,13,8,70,207,5,223,5,2,0,5,32,5,208,5,3,9,5,5,14,15,95,15,111,15,2, +32,15,1,224,15,240,15,2,111,15,127,15,143,15,3,0,15,16,15,32,15,3,205,207, +15,223,15,239,15,3,96,15,1,127,15,207,15,2,64,15,80,15,2,175,15,223,15,239, +15,3,96,15,112,15,2,15,15,31,15,2,154,255,15,1,208,15,224,15,2,63,15,1,159, +15,175,15,2,112,15,1,223,15,1,144,15,1,63,15,79,15,2,0,15,1,106,159,15,223, +15,239,15,3,96,15,112,15,2,15,15,1,239,15,255,15,2,128,15,208,15,2,63,15, +1,96,15,1,15,15,31,15,2,55,207,15,255,15,2,144,15,160,15,176,15,3,31,15,47, +15,63,15,3,176,15,192,15,208,15,3,15,15,31,15,111,15,3,144,15,160,15,224, +15,3,31,15,63,15,2,0,15,1,7,6,15,0,21,0,63,63,1,94,93,93,93,113,113,114,114, +114,94,93,93,113,113,113,114,114,114,94,93,93,93,93,113,113,114,114,114,94, +93,93,93,113,113,114,114,94,93,93,93,113,113,17,18,57,47,94,93,113,237,50, +49,48,51,46,3,53,17,51,17,20,30,2,23,199,15,24,15,8,180,11,21,30,18,16,53, +64,70,33,3,78,252,169,32,64,60,52,19,0,0,0,1,0,138,0,0,4,3,4,58,0,11,0,158, +64,114,148,9,164,9,2,102,9,118,9,134,9,3,172,0,1,139,0,155,0,2,105,0,121, +0,2,86,10,150,10,166,10,3,151,10,167,10,2,84,10,1,70,7,134,7,2,1,10,247,8, +1,8,10,9,16,9,9,0,11,16,0,11,160,11,2,0,11,16,11,32,11,64,11,160,11,224,11, +6,7,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2, +1,7,10,4,8,5,15,4,0,21,0,63,50,63,51,23,57,1,93,93,47,94,93,237,50,47,94, +93,113,56,51,57,47,56,57,51,113,17,51,49,48,0,93,93,93,1,93,93,93,93,93,93, +33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73, +1,206,1,238,109,254,127,4,58,253,243,2,13,254,47,253,151,0,0,0,0,1,0,14,0, +0,3,238,5,204,0,33,1,60,64,101,149,15,1,157,23,1,138,2,1,137,1,1,137,25,153, +25,2,140,21,156,21,2,115,0,131,0,147,0,3,140,20,156,20,2,106,20,122,20,2, +146,32,1,132,32,1,101,32,117,32,2,3,102,26,118,26,150,26,3,141,26,157,26, +2,2,126,26,1,108,26,1,3,84,18,1,148,31,1,101,31,117,31,133,31,3,86,31,1,146, +29,1,2,128,29,1,84,29,1,144,28,1,28,184,255,224,64,59,13,16,72,146,27,1,84, +27,100,27,116,27,3,93,0,109,0,2,149,17,1,73,17,1,150,18,1,138,18,1,101,18, +117,18,2,38,18,86,18,2,42,3,58,3,74,3,122,3,138,3,5,26,0,20,10,10,19,32,33, +184,255,240,64,69,33,20,19,16,31,19,63,19,2,31,19,63,19,95,19,127,19,159, +19,191,19,223,19,255,19,8,223,19,255,19,2,192,19,1,95,19,159,19,2,0,19,16, +19,64,19,3,8,19,0,35,48,35,96,35,160,35,176,35,5,26,0,13,33,19,21,6,80,13, +0,0,63,237,63,51,18,57,57,1,93,47,94,93,93,93,93,113,114,56,51,47,56,51,18, +57,47,18,57,57,49,48,93,93,93,93,93,93,93,0,93,1,93,93,43,93,93,93,95,93, +93,93,93,0,93,95,93,93,95,93,1,93,95,93,93,93,93,93,93,93,93,93,93,93,0,93, +1,39,46,3,35,34,6,7,39,62,1,51,50,30,2,23,1,35,3,46,3,39,14,3,7,1,35,1,207, +36,27,42,45,57,40,11,32,6,35,25,72,32,55,87,73,67,36,1,171,190,207,8,18,18, +16,5,7,22,25,24,8,254,255,187,3,197,99,73,105,67,31,7,3,130,9,15,36,81,131, +95,251,139,2,65,22,56,59,56,21,21,60,62,55,18,253,193,0,0,0,1,0,138,254,119, +4,6,4,58,0,41,0,108,64,55,13,40,14,17,72,90,8,106,8,2,35,70,5,15,34,95,34, +2,159,34,175,34,255,34,3,0,34,16,34,32,34,3,7,34,43,23,19,70,0,20,16,20,48, +20,240,20,4,8,20,96,43,128,43,2,43,184,255,192,64,15,20,23,72,41,21,34,21, +15,19,5,28,80,14,11,22,0,63,51,237,50,47,63,51,63,1,43,93,47,94,93,237,50, +16,220,94,93,93,113,50,237,49,48,0,93,1,43,33,46,3,53,35,14,3,35,34,38,39, +35,30,1,21,17,35,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,30,2,23,3,94, +1,3,3,3,4,26,56,69,86,57,82,120,32,4,3,1,182,182,25,59,98,74,67,100,67,33, +181,1,2,2,1,6,46,59,59,20,51,79,53,27,64,58,32,63,27,254,139,5,195,253,124, +69,116,85,47,52,91,126,75,2,105,252,175,34,76,67,49,7,0,0,1,0,0,0,0,3,178, +4,58,0,18,2,35,64,79,130,17,146,17,162,17,3,153,6,169,6,2,131,8,147,8,163, +8,3,3,87,8,103,8,119,8,3,6,5,9,32,14,17,72,9,9,7,15,16,16,0,70,64,91,12,107, +12,123,12,3,91,12,219,12,235,12,3,180,12,196,12,2,11,12,27,12,59,12,91,12, +107,12,5,7,12,20,128,8,7,184,255,240,64,255,7,11,20,27,20,2,11,20,27,20,75, +20,91,20,139,20,155,20,203,20,219,20,8,255,20,1,196,20,212,20,2,160,20,1, +132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4,20,20,20,2,199,224,20,1,196, +20,212,20,2,160,20,1,4,20,20,20,68,20,84,20,132,20,148,20,6,68,20,84,20,132, +20,148,20,196,20,212,20,6,27,20,1,4,20,1,219,20,1,196,20,1,155,20,1,132,20, +1,91,20,1,68,20,1,27,20,1,4,20,1,151,11,20,27,20,75,20,91,20,139,20,155,20, +203,20,219,20,8,155,20,203,20,219,20,3,132,20,1,96,20,1,68,20,84,20,2,32, +20,1,4,20,20,20,2,224,20,1,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20, +1,4,20,20,20,68,20,84,20,4,103,4,20,20,20,68,20,84,20,132,20,148,20,196,20, +212,20,8,219,20,1,196,20,1,155,20,1,132,20,1,91,20,1,68,20,1,27,20,1,4,20, +1,219,20,1,196,20,1,11,20,27,20,75,20,91,20,139,20,155,20,64,93,6,55,75,20, +91,20,139,20,155,20,203,20,219,20,6,63,20,1,32,20,1,4,20,20,20,2,224,20,1, +196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4, +20,20,20,2,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,2,80,20,1,47, +20,1,0,20,16,20,2,7,15,7,15,9,6,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93, +93,113,113,113,113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113, +113,113,113,113,113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114, +94,93,93,93,93,93,93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93, +93,93,93,113,114,47,56,51,26,16,220,94,93,93,113,114,26,237,50,17,51,17,57, +61,47,43,51,51,49,48,93,95,93,93,93,1,20,14,2,7,35,1,51,1,54,18,53,52,38, +39,51,30,1,3,178,63,106,140,77,170,254,122,189,1,55,142,124,29,20,177,24, +28,3,78,99,218,221,214,94,4,58,252,96,185,1,86,156,81,119,45,45,113,0,0,0, +1,0,86,254,159,3,106,5,204,0,74,1,0,64,125,122,71,138,71,2,101,33,117,33, +133,33,3,105,39,1,85,50,1,83,44,1,57,2,1,110,66,126,66,142,66,3,26,66,42, +66,2,12,29,28,29,44,29,3,13,40,9,12,72,12,73,28,73,44,73,108,73,124,73,140, +73,6,5,11,95,37,1,79,37,1,112,37,128,37,2,37,17,95,26,1,111,26,1,26,37,26, +52,63,31,70,11,32,11,1,23,11,23,11,0,31,63,63,63,79,63,111,63,127,63,143, +63,175,63,191,63,207,63,9,159,63,175,63,255,63,3,63,184,255,192,64,17,7,11, +72,63,42,71,31,0,1,0,5,37,80,31,11,24,42,184,255,240,64,32,19,22,72,151,42, +1,0,16,19,22,72,152,0,1,52,0,42,3,57,32,36,1,36,36,24,57,26,17,23,80,24,0, +0,63,237,50,50,47,18,57,47,93,18,23,57,93,43,93,43,18,57,57,237,57,1,47,93, +237,47,43,93,113,18,57,57,47,47,93,16,237,16,205,50,50,47,93,114,51,47,93, +113,114,18,57,49,48,93,43,93,0,93,93,1,93,0,93,93,93,1,93,0,93,19,52,62,2, +55,53,46,3,53,52,62,2,55,53,14,3,43,1,53,33,21,14,3,21,20,30,2,23,21,14,3, +21,20,30,2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,86,51,110,175, +125,68,118,87,51,50,79,97,47,12,68,80,76,18,74,2,122,77,144,112,68,60,99, +130,69,100,175,131,76,43,74,100,57,54,114,94,61,18,26,29,10,126,9,19,16,11, +39,70,97,57,42,89,82,73,54,31,1,98,76,147,124,90,19,2,5,39,68,96,62,64,93, +64,40,10,8,1,2,3,2,131,125,9,34,59,90,67,63,81,49,24,6,131,13,54,89,127,84, +64,79,49,31,15,15,34,57,88,68,34,68,62,51,17,56,12,33,38,39,19,34,45,33,25, +13,10,23,36,50,74,100,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +79,255,236,5,43,4,58,0,48,0,115,64,35,53,12,117,12,133,12,3,3,40,7,17,72, +3,40,7,17,72,46,80,32,96,32,2,46,32,35,70,64,111,5,1,80,5,1,5,184,255,192, +64,38,8,11,72,5,50,128,15,50,47,50,2,13,7,72,79,25,95,25,111,25,207,25,4, +25,14,20,34,7,20,80,31,15,14,21,40,80,0,22,0,63,237,63,63,237,50,50,1,47, +50,50,93,237,50,93,26,16,220,43,93,113,26,237,50,50,93,47,49,48,43,0,43,1, +93,5,34,46,2,53,17,33,21,20,14,2,7,35,62,3,61,1,34,14,2,7,53,62,3,51,33,21, +35,17,20,30,2,51,50,62,2,55,21,14,1,4,102,59,82,52,24,254,110,16,27,36,19, +188,19,39,32,20,39,79,69,53,12,12,43,51,54,23,4,37,234,13,24,35,22,7,23,25, +23,8,31,69,20,28,59,94,66,2,212,72,131,251,228,195,74,76,197,226,247,125, +80,7,10,13,7,139,6,11,8,4,131,253,83,44,56,32,13,2,2,3,1,129,8,12,0,2,0,132, +254,87,4,59,4,79,0,26,0,47,0,129,64,64,122,25,1,101,20,117,20,2,106,19,122, +19,2,106,45,122,45,2,75,8,91,8,107,8,3,125,30,1,107,30,1,74,30,90,30,2,0, +71,64,160,27,1,27,49,128,38,15,70,223,16,1,0,16,16,16,48,16,3,8,16,48,49, +1,49,184,255,192,64,21,30,35,72,223,49,1,96,49,128,49,2,32,80,22,16,15,27, +43,80,5,22,0,63,237,63,63,237,1,93,93,43,113,47,94,93,113,237,50,26,16,220, +93,26,237,49,48,93,93,93,0,93,1,93,93,0,93,1,93,1,20,14,2,35,34,46,2,39,35, +30,1,21,17,35,17,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,17,30,3,51,50, +62,2,4,59,63,115,161,98,62,98,80,66,28,4,2,2,180,60,116,169,110,103,181,134, +78,193,44,83,116,72,69,100,64,30,28,72,80,87,44,67,100,67,33,2,4,118,197, +142,79,20,37,53,33,30,61,32,254,87,3,238,119,193,136,74,79,150,219,131,104, +166,115,61,53,101,146,93,254,195,35,55,37,20,58,107,152,0,0,1,0,86,254,159, +3,156,4,78,0,57,0,209,64,38,137,55,1,139,54,1,143,53,1,123,53,1,106,50,1, +96,2,1,52,15,68,15,84,15,3,82,10,98,10,130,10,3,51,10,67,10,2,3,184,255,224, +64,52,12,17,72,3,24,11,14,72,26,31,106,31,122,31,138,31,4,139,30,1,10,37, +26,37,2,7,71,31,40,1,40,52,17,79,28,1,143,28,159,28,223,28,3,28,64,24,27, +72,96,28,1,28,184,255,192,183,7,12,72,28,48,59,1,59,184,255,192,64,19,30, +35,72,223,59,1,12,33,40,16,19,22,72,136,40,152,40,2,7,184,255,240,64,19,19, +22,72,135,7,151,7,2,33,7,40,3,22,53,0,80,47,16,22,0,47,63,237,51,18,23,57, +93,43,93,43,17,51,1,93,43,113,47,43,93,43,93,113,205,50,47,93,237,49,48,93, +93,0,93,43,1,43,0,93,93,93,1,93,0,93,1,93,93,0,93,93,1,34,14,4,21,20,30,2, +23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,51,50,30,2,23, +7,46,3,2,70,54,88,67,49,32,15,32,76,124,92,53,114,95,61,18,26,29,10,126,9, +19,16,11,35,68,97,63,66,113,94,72,50,26,20,46,75,110,148,97,68,99,73,54,22, +116,18,42,49,57,3,193,49,80,104,108,106,42,68,96,72,57,30,17,37,59,89,68, +34,68,62,51,17,56,12,33,38,39,19,30,44,36,31,17,18,40,51,68,93,122,81,47, +130,140,136,108,66,21,34,44,23,119,19,36,28,17,0,2,0,86,255,236,4,209,4,58, +0,28,0,47,0,132,64,94,133,12,1,122,13,138,13,2,131,46,1,101,46,117,46,2,100, +42,116,42,132,42,3,124,33,140,33,2,90,33,106,33,2,143,38,1,108,38,124,38, +2,74,38,90,38,2,15,17,31,17,111,17,127,17,4,7,17,0,71,64,15,29,143,29,191, +29,3,0,29,32,29,64,29,3,29,49,128,40,71,31,10,143,10,2,10,23,35,80,15,15, +43,80,5,22,0,63,237,63,237,50,1,47,93,237,26,16,220,93,113,26,237,196,94, +93,49,48,0,93,93,93,1,93,93,93,0,93,93,93,1,93,1,20,14,2,35,34,46,2,53,52, +62,2,51,33,21,35,34,46,2,39,21,30,3,7,52,46,2,39,35,34,14,2,21,20,22,51,50, +62,2,4,48,61,123,183,123,123,186,124,63,86,153,213,126,2,57,165,9,35,43,44, +17,28,55,43,26,189,20,34,45,25,89,83,143,107,61,151,147,78,117,76,38,1,235, +112,188,135,76,74,139,202,129,144,210,138,66,131,1,2,2,1,4,42,99,115,131, +78,74,132,116,99,42,50,105,160,110,207,206,52,97,139,0,1,0,29,255,236,3,24, +4,58,0,35,0,99,64,50,35,13,131,13,2,31,32,12,17,72,13,31,29,31,45,31,3,26, +13,26,127,5,143,5,2,5,15,70,0,34,32,34,2,34,34,36,37,79,37,1,208,37,1,159, +37,1,16,37,1,37,184,255,192,64,12,14,17,72,20,80,29,22,14,35,80,11,15,0,63, +237,50,63,237,1,43,93,93,93,113,17,18,57,47,93,253,204,93,51,51,47,49,48, +0,93,43,1,93,1,34,14,2,7,53,62,3,51,33,21,33,17,20,30,2,51,50,62,2,55,21, +14,1,35,34,46,2,53,17,1,25,39,79,69,53,12,12,43,51,54,23,2,68,254,208,13, +24,35,22,7,23,25,23,8,31,69,43,59,82,52,24,3,183,7,10,13,7,139,6,11,8,4,131, +253,83,44,56,32,13,2,2,3,1,129,8,12,28,59,94,66,2,212,0,0,0,1,0,133,255,236, +3,254,4,58,0,31,0,113,64,62,134,3,1,133,15,149,15,2,106,18,122,18,2,86,28, +1,25,8,41,8,2,27,0,71,64,15,21,1,47,21,159,21,2,160,21,1,21,33,128,13,70, +0,10,16,10,48,10,240,10,4,8,10,240,33,1,255,33,1,112,33,1,33,184,255,192, +64,13,20,23,72,31,33,1,26,11,15,16,80,5,22,0,63,237,63,51,1,93,43,93,93,113, +47,94,93,237,26,16,220,93,113,114,26,237,50,49,48,93,93,93,93,93,1,20,14, +2,35,34,46,2,53,17,51,17,20,22,51,50,62,2,53,52,46,2,39,51,30,3,3,254,53, +113,176,123,109,160,104,51,181,117,134,73,104,65,30,20,33,40,21,188,18,40, +32,21,2,59,137,218,154,82,50,107,166,116,2,151,253,99,146,148,50,108,170, +120,68,147,139,120,41,40,113,134,149,0,2,0,85,254,87,4,218,4,82,0,35,0,45, +0,130,64,21,101,34,1,101,33,117,33,133,33,3,74,21,90,21,2,69,21,85,21,2,45, +184,255,192,179,11,14,72,25,184,255,224,64,54,11,14,72,11,29,27,29,2,64,19, +80,19,2,19,19,24,71,13,7,36,71,224,0,1,0,43,6,72,27,0,7,64,7,2,7,64,47,1, +19,80,18,18,39,80,31,16,43,27,80,5,8,22,6,27,0,63,63,51,237,50,63,237,51, +47,237,1,113,47,93,51,253,50,220,113,237,16,220,237,50,47,93,49,48,93,0,43, +43,1,93,0,93,1,93,93,1,20,14,2,7,17,35,17,46,3,53,52,62,2,55,23,14,3,21,20, +22,23,17,52,54,51,50,30,2,7,52,38,35,34,6,21,17,62,1,4,218,74,132,184,110, +170,114,181,125,67,49,103,159,109,21,69,96,60,27,147,151,154,158,84,133,92, +49,189,87,80,68,76,162,149,2,53,151,215,140,71,6,254,105,1,151,5,72,138,207, +141,102,188,150,103,18,136,15,77,114,143,80,213,201,8,2,68,193,212,76,141, +199,121,193,211,129,140,253,185,7,218,0,0,0,1,0,21,254,88,4,27,4,80,0,27, +1,26,64,51,169,25,1,153,3,1,138,6,154,6,2,174,23,1,123,23,139,23,155,23,3, +84,21,1,173,27,1,140,27,156,27,2,123,27,1,90,27,106,27,2,41,27,57,27,2,26, +16,9,17,72,2,184,255,240,64,99,9,17,72,162,1,1,131,1,147,1,2,116,1,1,69,1, +85,1,101,1,3,38,1,54,1,2,166,25,1,153,25,1,39,25,55,25,71,25,3,3,101,19,117, +19,2,86,19,1,39,19,55,19,2,25,22,0,3,4,2,26,23,24,24,27,26,16,27,26,59,26, +91,26,123,26,155,26,187,26,219,26,7,219,26,251,26,2,4,26,20,26,68,26,3,7, +26,13,13,1,2,184,255,240,183,2,36,29,1,11,29,1,22,184,255,208,64,41,14,17, +72,70,22,1,53,22,1,139,0,1,125,0,1,2,75,0,91,0,107,0,3,63,0,1,0,25,3,22,4, +1,23,15,9,80,16,16,27,1,27,0,63,51,63,237,63,18,23,57,93,93,95,93,93,93,93, +43,1,93,93,47,56,51,51,47,47,94,93,93,113,56,51,51,47,51,17,18,23,57,49,48, +93,93,93,95,93,93,93,93,93,93,93,93,43,43,93,93,93,93,93,93,93,93,93,93,0, +93,37,1,35,1,3,46,3,35,34,6,7,39,62,1,51,50,30,2,23,19,1,51,9,1,35,2,30,254, +179,188,1,184,170,27,44,40,42,25,11,32,7,34,24,62,32,48,70,60,59,36,142,1, +8,187,254,144,1,150,190,239,253,105,3,57,1,87,54,82,55,28,7,3,131,9,11,27, +62,102,75,254,217,2,27,253,71,252,215,0,0,1,0,135,254,87,5,44,5,60,0,31,0, +128,64,90,121,18,1,18,16,7,10,72,121,19,137,19,153,19,3,121,11,1,11,16,7, +10,72,121,10,137,10,153,10,3,24,70,21,15,5,70,8,0,14,72,29,0,15,16,15,160, +15,208,15,4,8,15,128,33,176,33,224,33,3,111,33,1,32,33,1,255,33,1,80,33,128, +33,144,33,192,33,4,30,30,6,22,15,0,29,80,13,16,22,14,27,0,63,63,51,237,50, +63,51,51,47,1,93,93,113,113,113,47,94,93,51,253,50,220,237,16,220,237,49, +48,0,93,43,93,93,43,93,37,62,3,53,17,51,17,20,14,2,7,17,35,17,46,3,53,17, +51,17,20,30,2,23,17,51,3,46,87,124,80,37,182,59,124,193,134,170,134,192,124, +59,181,38,79,124,87,170,119,1,31,73,121,91,2,134,253,124,122,172,110,53,1, +254,107,1,149,1,53,110,172,122,2,132,253,122,90,121,73,32,1,4,197,0,0,0,0, +1,0,83,255,236,5,235,4,79,0,63,0,176,64,83,153,33,169,33,2,153,26,169,26, +2,119,16,1,122,58,138,58,2,10,37,26,37,42,37,154,37,170,37,5,10,22,26,22, +42,22,154,22,170,22,5,29,0,73,61,61,40,8,46,13,46,13,51,19,71,64,128,8,176, +8,2,15,8,1,7,8,65,128,51,71,63,40,1,40,0,65,1,48,65,1,240,65,1,65,184,255, +192,64,32,30,35,72,175,65,223,65,2,0,65,32,65,64,65,3,30,35,62,62,14,3,56, +80,24,35,22,46,13,80,45,14,16,0,63,51,237,50,63,51,237,50,17,57,47,18,57, +1,93,93,43,93,113,114,47,93,237,26,16,220,94,93,93,26,237,18,57,57,47,47, +17,18,57,47,237,57,49,48,0,93,93,1,93,93,0,93,93,1,20,22,51,50,62,2,53,52, +46,2,39,55,30,3,21,20,14,2,35,34,46,2,39,35,14,3,35,34,46,2,53,52,62,2,55, +23,14,3,21,20,30,2,51,50,62,2,61,1,51,3,115,114,102,65,87,53,22,29,61,97, +67,23,109,159,103,49,53,101,148,95,68,104,77,52,16,4,16,52,77,105,67,95,148, +101,53,49,103,159,109,23,68,96,62,28,22,52,86,65,51,82,57,30,166,1,193,157, +173,56,102,145,90,82,150,121,84,15,139,18,112,161,194,101,128,200,137,72, +36,68,99,64,64,99,68,36,72,137,200,128,101,194,161,112,18,139,15,84,121,150, +82,90,145,102,56,45,84,123,78,252,0,0,0,255,255,255,205,0,0,1,250,5,123,18, +38,1,130,0,0,17,6,0,105,160,0,0,25,182,2,1,14,17,38,2,1,184,255,217,180,18, +16,5,13,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,254,5,123, +18,38,1,142,0,0,17,7,0,105,0,242,0,0,0,25,182,2,1,32,17,38,2,1,184,255,244, +180,36,34,10,0,37,1,43,53,53,0,43,53,53,0,255,255,0,86,255,236,4,29,6,7,18, +38,0,82,0,0,17,7,1,80,1,41,0,0,0,19,64,11,2,35,17,38,2,70,35,38,8,0,37,1, +43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,254,6,7,18,38,1,142,0,0,17,7, +1,80,0,252,0,0,0,19,64,11,1,32,17,38,1,17,32,35,10,0,37,1,43,53,0,43,53,0, +0,0,255,255,0,83,255,236,5,235,6,7,18,38,1,146,0,0,17,7,1,80,1,255,0,0,0, +19,64,11,1,64,17,38,1,55,64,67,40,19,37,1,43,53,0,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,178,16,38,0,40,0,0,17,7,2,152,1,121,0,0,0,153,185,0,21,255,192, +179,233,233,72,21,184,255,192,179,230,230,72,21,184,255,192,179,227,227,72, +21,184,255,192,179,224,224,72,21,184,255,192,179,221,221,72,21,184,255,192, +179,218,218,72,21,184,255,192,179,215,215,72,21,184,255,192,179,212,212,72, +21,184,255,192,179,209,209,72,21,184,255,192,179,206,206,72,21,184,255,192, +179,203,203,72,21,184,255,192,179,200,200,72,21,184,255,192,179,197,197,72, +21,184,255,192,64,10,11,11,72,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10, +37,1,43,53,53,0,43,53,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0, +1,0,46,255,236,6,79,5,129,0,45,0,133,64,13,155,31,171,31,2,101,37,117,37, +133,37,3,2,184,255,224,64,71,13,17,72,18,16,12,15,72,42,13,58,13,2,36,7,52, +7,2,20,20,10,42,1,39,90,45,175,40,1,0,40,1,40,10,90,0,29,16,29,176,29,224, +29,4,7,29,0,42,95,43,38,33,95,1,6,6,40,43,3,40,18,26,95,15,63,21,1,21,21, +15,19,0,63,51,47,93,16,237,63,63,18,57,47,51,237,50,16,237,50,1,47,94,93, +237,47,93,93,204,253,50,204,18,57,47,49,48,0,93,93,43,43,93,93,1,17,62,3, +51,50,22,29,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,61,1,52,38,35,34,14, +2,7,17,35,17,33,53,33,21,2,208,33,109,127,130,53,226,217,41,86,133,92,53, +88,75,64,29,111,18,41,48,56,33,84,80,129,144,51,123,120,105,33,190,254,28, +4,134,4,229,254,160,7,20,19,13,187,188,214,93,145,100,53,17,32,46,28,123, +16,33,26,17,101,111,219,119,122,10,15,17,8,253,12,4,229,156,156,0,255,255, +0,168,0,1,4,47,6,240,16,38,1,93,0,0,17,7,2,149,1,113,0,0,0,19,64,11,1,6,5, +38,1,33,6,9,4,0,37,1,43,53,0,43,53,0,0,0,0,1,0,104,255,236,5,121,5,150,0, +42,0,218,64,156,156,17,172,17,2,156,15,172,15,2,156,39,172,39,2,138,39,1, +156,41,172,41,2,138,41,1,137,31,1,117,11,1,117,10,165,10,2,166,26,1,73,26, +137,26,2,70,32,134,32,2,37,10,53,10,2,42,3,58,3,2,3,68,44,1,7,7,19,5,8,91, +116,29,132,29,2,203,29,219,29,2,68,29,1,43,29,1,29,37,235,19,1,100,19,116, +19,164,19,212,19,4,64,19,1,2,0,19,48,19,2,7,19,8,95,127,5,175,5,2,5,5,13, +34,79,38,1,38,38,0,95,34,4,13,95,24,16,18,32,18,2,48,18,64,18,112,18,128, +18,192,18,208,18,6,18,18,24,19,0,63,51,47,93,113,16,237,63,237,51,47,93,17, +18,57,47,113,237,1,47,94,93,95,93,93,113,51,47,93,93,93,113,237,50,17,57, +47,93,49,48,0,95,93,93,93,93,93,1,93,0,93,1,93,93,93,93,93,93,93,1,34,14, +2,7,33,21,33,30,3,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,111,173,124,73,10,2,142,253,114,9,77,128,176,109,90,141, +108,79,27,156,40,108,148,191,123,171,254,255,173,86,91,175,1,0,164,225,1, +46,71,181,20,68,102,137,4,250,68,126,178,110,154,112,185,132,72,50,82,105, +55,77,79,136,100,57,109,195,1,12,159,165,1,10,187,101,176,173,60,50,91,70, +42,0,0,255,255,0,93,255,236,4,248,5,150,18,6,0,54,0,0,255,255,0,189,0,0,1, +124,5,129,18,6,0,44,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2, +152,218,0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0, +255,255,0,32,255,236,3,104,5,129,18,6,0,45,0,0,0,2,0,18,255,240,8,11,5,129, +0,38,0,47,0,215,64,98,57,29,1,166,8,1,167,11,1,162,10,1,133,10,149,10,2,58, +10,1,154,15,170,15,2,141,13,157,13,173,13,3,121,13,1,116,47,132,47,148,47, +3,123,40,139,40,155,40,3,101,11,1,141,14,157,14,173,14,3,14,32,10,14,72,43, +30,123,30,139,30,155,30,4,42,31,122,31,2,0,90,48,39,1,0,39,16,39,2,7,39,20, +13,36,13,52,13,3,13,184,255,248,64,14,22,25,72,73,8,1,20,8,36,8,52,8,3,8, +184,255,248,64,39,22,25,72,9,31,73,31,2,8,13,31,3,175,20,191,20,2,20,33,44, +90,6,43,95,33,33,6,8,95,31,3,23,95,16,19,44,95,6,18,0,63,237,63,237,63,237, +18,57,47,237,1,47,237,50,47,93,23,51,113,43,113,113,43,113,47,94,93,113,237, +49,48,93,93,0,43,93,1,93,0,93,93,93,93,93,1,93,93,93,93,93,93,1,20,14,2,35, +33,17,33,3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,33,50,30,2, +7,52,38,35,33,17,33,50,54,8,11,61,121,182,121,253,183,254,96,49,22,43,49, +60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,3,2,1,126,125,186, +124,62,192,164,164,254,153,1,111,164,156,1,157,87,150,112,64,4,225,254,144, +172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161,1,254,253,172, +58,105,147,92,121,129,254,2,136,0,0,0,2,0,168,0,0,7,171,5,129,0,22,0,31,0, +110,64,25,116,31,132,31,148,31,3,123,24,139,24,155,24,3,38,20,54,20,2,0,90, +176,23,1,23,184,255,192,64,43,7,11,72,23,13,9,90,0,10,16,10,64,10,3,7,10, +17,28,90,14,0,6,1,8,6,27,95,17,17,8,95,13,13,10,15,11,3,10,18,28,95,6,18, +0,63,237,63,63,51,18,57,47,237,51,47,237,1,47,94,93,51,237,50,47,94,93,237, +50,47,43,93,237,49,48,0,93,93,93,1,20,14,2,35,33,17,33,17,35,17,51,17,33, +17,51,17,33,50,30,2,7,52,38,35,33,17,33,50,54,7,171,61,121,182,121,253,223, +253,194,191,191,2,62,191,1,86,125,186,124,62,192,164,164,254,193,1,71,164, +156,1,157,87,150,112,64,2,141,253,115,5,129,253,172,2,84,253,172,58,105,147, +92,121,129,254,2,136,0,0,0,0,1,0,46,0,0,6,47,5,129,0,27,0,131,64,13,155,2, +171,2,2,101,8,117,8,133,8,3,19,184,255,224,64,76,13,17,72,37,24,53,24,69, +24,3,18,13,10,90,16,175,11,1,0,11,48,11,2,11,27,90,0,0,48,0,192,0,208,0,4, +7,0,176,29,192,29,208,29,3,176,29,240,29,2,255,29,1,16,29,112,29,160,29,176, +29,4,9,4,95,18,23,23,0,17,13,95,14,3,11,0,18,0,63,50,63,237,50,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,237,47,93,93,204,253,204,51,49,48,0,93,43, +93,93,33,17,52,38,35,34,14,2,7,17,35,17,33,53,33,21,33,17,62,3,51,50,22,21, +17,5,113,128,133,53,116,110,98,35,190,254,28,4,179,253,239,36,98,112,118, +56,229,214,2,63,122,109,10,15,18,7,253,12,4,229,156,156,254,160,8,20,18,13, +187,178,253,173,0,0,0,255,255,0,168,0,0,4,157,6,240,18,38,1,176,0,0,17,7, +2,149,1,172,0,0,0,19,64,11,1,23,5,38,1,37,23,26,0,13,37,1,43,53,0,43,53,0, +0,0,255,255,0,55,255,236,5,31,7,58,18,38,1,185,0,0,17,7,2,145,1,94,1,74,0, +19,64,11,1,26,5,38,1,7,31,39,21,25,37,1,43,53,0,43,53,0,0,0,0,1,0,168,254, +104,5,24,5,129,0,11,0,94,64,64,11,92,0,0,2,9,90,127,6,1,0,6,48,6,64,6,3,143, +6,159,6,207,6,3,0,6,64,6,2,6,5,90,0,2,16,2,64,2,3,7,2,16,13,1,32,13,128,13, +224,13,3,15,13,1,7,7,3,3,10,5,95,2,18,0,0,47,63,237,51,63,51,47,1,93,93,113, +47,94,93,237,47,93,93,113,113,237,18,57,47,237,49,48,1,17,33,17,51,17,33, +17,51,17,33,17,2,134,254,34,191,2,247,186,254,34,254,104,1,152,5,129,251, +31,4,225,250,127,254,104,255,255,0,4,0,0,5,82,5,129,18,6,0,36,0,0,0,2,0,168, +0,0,4,214,5,129,0,16,0,25,0,142,64,70,116,25,132,25,148,25,3,123,18,139,18, +155,18,3,153,14,1,38,14,1,9,9,0,90,223,17,1,80,17,128,17,2,31,17,1,255,17, +1,192,17,1,159,17,1,0,17,16,17,32,17,64,17,4,17,11,22,90,0,6,16,6,64,6,3, +7,6,48,27,1,27,184,255,192,64,27,30,35,72,223,27,1,21,95,64,11,1,160,11,208, +11,2,11,11,6,10,95,7,3,22,95,6,18,0,63,237,63,237,18,57,47,93,113,237,1,93, +43,113,47,94,93,237,50,47,93,93,93,93,113,113,113,237,50,47,49,48,0,93,93, +93,93,1,20,14,2,35,33,17,33,21,33,17,33,50,30,2,7,52,38,35,33,17,33,50,54, +4,214,61,121,182,121,253,183,3,158,253,33,1,126,125,186,124,62,192,164,164, +254,153,1,111,164,156,1,157,87,150,112,64,5,129,156,254,72,58,105,147,92, +121,129,254,2,136,0,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,255,255, +0,168,0,1,4,47,5,130,16,6,1,93,0,0,0,2,0,15,254,104,5,69,5,129,0,16,0,25, +0,194,64,95,150,10,1,150,20,1,150,15,1,144,19,1,134,19,1,115,22,131,22,2, +3,147,24,1,2,128,24,1,114,24,1,102,24,1,85,11,101,11,2,90,14,106,14,2,97, +23,145,23,2,83,23,1,53,23,69,23,2,2,92,3,3,0,90,191,17,207,17,2,160,17,1, +31,17,95,17,127,17,143,17,159,17,5,0,17,1,8,17,20,25,36,25,52,25,3,25,184, +255,248,64,11,22,25,72,20,19,36,19,52,19,3,19,184,255,248,64,28,22,25,72, +9,15,19,25,4,6,92,7,15,27,47,27,2,19,95,15,3,8,0,25,95,5,18,7,2,0,47,51,63, +237,50,50,63,237,1,93,47,237,23,51,43,113,43,113,47,94,93,93,93,93,237,50, +47,237,49,48,93,93,93,93,93,93,93,93,95,93,95,93,93,93,93,93,93,37,51,17, +35,17,33,17,35,17,51,62,3,55,19,33,3,17,33,3,14,3,7,4,150,175,180,252,50, +180,144,41,66,55,44,18,67,2,212,186,254,137,49,18,40,46,54,32,160,253,200, +1,152,254,104,2,56,51,138,181,228,141,1,254,251,31,4,65,254,144,134,221,178, +137,51,255,255,0,168,0,0,4,254,5,129,18,6,0,40,0,0,0,1,0,28,0,0,7,71,5,129, +0,41,1,72,64,41,133,8,1,117,31,133,31,2,117,14,1,99,24,1,108,25,124,25,140, +25,3,108,26,124,26,140,26,3,101,13,117,13,133,13,3,33,40,14,17,72,6,184,255, +216,64,35,14,17,72,58,24,74,24,2,41,24,1,53,15,69,15,117,15,3,3,39,15,1,27, +48,14,17,72,40,27,56,27,72,27,3,12,184,255,208,64,11,14,17,72,39,12,55,12, +71,12,3,31,184,255,224,179,14,17,72,31,184,255,240,64,73,10,13,72,8,32,14, +17,72,8,16,10,13,72,34,31,27,31,28,28,32,21,40,90,41,5,8,12,8,41,11,11,7, +18,52,41,1,116,41,196,41,228,41,3,41,33,32,16,32,64,29,32,72,228,32,1,155, +32,171,32,2,68,32,116,32,2,11,32,43,32,2,32,6,7,184,255,240,64,51,171,7,187, +7,2,7,68,43,116,43,132,43,228,43,4,47,43,1,2,15,43,1,31,8,34,5,8,5,39,0,96, +21,127,18,175,18,2,47,18,1,18,18,6,27,19,11,3,41,33,6,18,0,63,51,51,63,51, +51,18,57,47,93,113,51,237,50,57,57,17,51,17,51,1,93,95,93,93,47,93,56,51, +47,93,93,93,93,43,56,51,47,93,113,51,18,57,47,18,57,51,17,51,16,237,50,17, +57,47,57,51,17,51,49,48,43,43,43,43,93,43,93,43,93,95,93,93,93,43,43,93,93, +93,0,93,1,93,0,93,93,1,34,46,2,39,1,35,1,38,39,1,51,19,30,3,51,17,51,17,50, +62,2,55,19,51,1,6,7,1,35,1,14,3,35,17,35,3,82,17,45,48,46,17,254,85,222,1, +253,48,131,254,229,200,205,66,90,76,81,57,191,57,81,76,90,66,205,200,254, +229,131,48,1,253,222,254,85,17,46,48,45,17,191,2,133,6,11,13,8,253,85,3,7, +35,189,1,154,254,207,99,123,68,24,2,107,253,149,24,68,123,99,1,49,254,102, +189,35,252,249,2,171,8,13,11,6,253,123,0,1,0,67,255,236,4,112,5,149,0,60, +1,7,64,51,138,33,1,134,7,1,124,28,140,28,2,3,112,21,1,112,20,1,2,96,20,1, +101,8,117,8,133,8,3,132,34,1,101,34,117,34,2,124,13,1,90,13,106,13,2,59,23, +75,23,2,33,184,255,232,64,122,11,16,72,5,43,1,3,51,20,25,90,46,64,25,37,72, +46,46,56,90,16,139,36,155,36,171,36,3,127,20,1,2,95,20,111,20,2,36,20,36, +20,5,112,16,1,79,16,111,16,2,255,16,1,160,16,1,127,16,1,0,16,16,16,48,16, +3,16,175,5,191,5,2,5,64,32,45,72,5,64,13,16,72,5,51,20,95,127,21,175,21,2, +21,21,11,41,35,64,13,16,72,35,35,30,95,41,4,11,95,0,32,6,48,6,112,6,128,6, +4,208,6,1,6,184,255,192,182,13,17,72,6,6,0,19,0,63,50,47,43,93,113,16,237, +63,237,51,47,43,17,18,57,47,113,237,57,1,47,43,43,93,47,93,93,93,93,113,113, +18,57,57,47,47,93,95,93,113,16,237,50,47,43,237,18,57,49,48,0,95,93,1,43, +93,93,93,93,93,93,93,95,93,93,95,93,93,0,93,5,34,46,2,39,55,30,3,51,50,62, +2,53,52,38,43,1,53,51,50,54,53,52,46,2,35,34,14,2,7,39,62,3,51,50,30,2,21, +20,14,2,7,30,3,21,20,14,2,2,109,118,176,130,94,36,165,24,66,91,121,80,77, +122,85,45,192,202,71,71,181,173,39,72,104,65,77,114,83,56,19,178,33,96,132, +168,105,108,172,120,64,40,73,104,63,67,117,87,51,69,132,192,20,50,91,128, +79,77,55,98,75,44,37,69,100,64,133,118,148,119,123,55,86,59,30,40,68,90,49, +61,82,127,87,45,53,96,136,83,68,107,80,55,15,10,50,82,115,73,95,156,113,62, +0,1,0,168,0,0,5,24,5,129,0,19,0,123,64,17,172,18,1,138,18,154,18,2,147,8, +163,8,2,133,8,1,19,184,255,232,64,65,9,17,72,9,24,9,17,72,11,92,41,9,1,9, +64,12,80,12,144,12,3,224,12,1,143,12,159,12,175,12,3,0,12,48,12,2,12,166, +19,1,19,2,92,0,1,16,1,2,7,1,15,21,47,21,2,9,18,9,1,3,12,12,8,0,18,0,63,50, +50,47,63,51,51,47,1,93,47,94,93,237,50,113,47,93,93,93,113,51,113,237,49, +48,43,43,0,93,93,93,93,51,17,51,17,20,6,7,6,7,1,51,17,35,17,52,54,55,54,55, +1,168,172,2,2,2,2,2,238,222,170,1,2,1,2,253,26,5,129,252,100,51,98,39,46, +40,4,174,250,127,3,168,39,89,38,44,44,251,90,0,255,255,0,168,0,0,5,24,7,58, +18,38,1,174,0,0,17,7,2,145,1,146,1,74,0,19,64,11,1,20,5,38,1,6,25,33,0,10, +37,1,43,53,0,43,53,0,0,0,0,1,0,168,0,0,4,157,5,129,0,22,0,151,64,104,84,12, +116,12,132,12,3,84,15,1,139,8,1,122,8,1,89,8,105,8,2,140,14,1,14,24,13,16, +72,58,5,1,100,12,116,12,132,12,3,80,12,1,53,12,69,12,2,15,12,8,12,9,16,32, +9,96,9,128,9,3,9,9,13,2,21,90,32,22,1,22,14,13,16,15,13,127,13,207,13,239, +13,4,47,13,1,13,47,24,1,15,12,20,96,47,2,1,2,2,22,13,18,8,0,3,0,63,50,63, +51,57,47,93,237,50,57,1,93,47,93,113,56,51,47,93,237,50,17,57,47,93,56,57, +51,17,51,49,48,93,93,93,93,43,93,93,93,93,93,0,93,19,51,17,50,62,2,55,19, +51,1,6,7,1,35,1,14,3,35,17,35,168,191,57,81,76,90,66,205,200,254,229,131, +48,1,253,222,254,85,17,46,48,45,17,191,5,129,253,149,24,68,123,99,1,49,254, +102,189,35,252,249,2,171,8,13,11,6,253,123,0,0,0,0,1,0,18,255,240,4,153,5, +129,0,27,0,176,64,35,150,1,1,147,3,1,117,3,133,3,2,85,4,149,4,2,145,7,1,115, +7,131,7,2,85,7,101,7,2,129,6,145,6,2,6,184,255,216,64,46,12,15,72,37,6,53, +6,2,26,2,1,26,23,106,23,122,23,138,23,4,26,90,32,27,64,27,2,224,27,1,95,27, +1,0,27,1,8,27,20,6,36,6,52,6,3,6,184,255,248,64,14,22,25,72,73,1,1,20,1,36, +1,52,1,3,1,184,255,248,64,26,22,25,72,9,24,73,24,2,1,6,24,3,12,128,29,1,27, +18,1,95,24,3,16,95,9,19,0,63,237,63,237,63,1,93,47,23,51,113,43,113,113,43, +113,47,94,93,93,93,113,237,49,48,93,93,93,43,93,93,93,93,93,93,93,93,1,33, +3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,35,3,223,254,94,49, +22,43,49,60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,2,255,186, +4,225,254,144,172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161, +1,254,250,127,255,255,0,168,0,0,6,2,5,129,18,6,0,48,0,0,255,255,0,168,0,0, +5,32,5,129,18,6,0,43,0,0,255,255,0,97,255,236,5,215,5,150,18,6,0,50,0,0,255, +255,0,166,0,0,5,30,5,129,17,6,1,106,254,0,0,88,185,0,9,255,192,179,27,27, +72,9,184,255,192,179,21,21,72,9,184,255,192,179,20,20,72,9,184,255,192,179, +19,19,72,9,184,255,192,179,17,17,72,9,184,255,192,179,16,16,72,9,184,255, +192,179,15,15,72,9,184,255,192,179,14,14,72,9,184,255,192,183,11,11,72,9, +64,9,9,72,43,43,43,43,43,43,43,43,43,43,0,0,255,255,0,168,0,0,4,234,5,129, +18,6,0,51,0,0,255,255,0,104,255,236,5,121,5,150,18,6,0,38,0,0,255,255,0,46, +0,0,4,180,5,129,18,6,0,55,0,0,0,1,0,55,255,236,5,31,5,129,0,25,0,181,64,111, +217,24,1,139,24,1,90,24,106,24,122,24,3,41,24,1,85,23,101,23,133,23,3,70, +23,1,214,22,1,131,22,1,100,22,116,22,2,86,22,1,121,18,1,128,2,1,5,2,21,2, +2,132,1,1,131,0,1,84,0,100,0,2,70,0,1,198,23,214,23,2,113,23,129,23,2,86, +23,102,23,2,143,3,1,58,3,74,3,2,20,23,24,32,25,144,25,2,25,16,25,22,10,63, +21,79,21,111,21,127,21,4,21,184,255,240,64,14,21,23,20,21,5,24,24,21,3,11, +14,95,5,19,0,63,237,50,63,51,47,17,18,57,57,1,47,56,93,50,50,47,56,93,51, +57,57,49,48,0,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,1,14,3,35,34,46,2,39,55,30,1,51,50,62,2,63,1,1,51,9,1,51,2,222,47, +81,90,109,75,32,66,64,58,23,81,35,83,48,37,58,53,57,38,49,253,195,218,1,193, +1,128,205,1,62,88,128,82,40,10,18,26,16,144,22,37,21,52,90,68,89,3,186,252, +240,3,16,0,0,3,0,118,255,245,5,159,5,139,0,29,0,40,0,51,0,143,64,92,70,28, +86,28,102,28,3,73,17,89,17,105,17,3,59,51,1,59,31,1,53,43,1,38,43,1,53,39, +1,38,39,1,41,90,15,8,30,90,0,35,24,7,90,46,21,224,8,1,79,8,1,32,8,1,8,32, +53,1,112,53,208,53,224,53,3,79,53,1,16,53,1,36,47,96,10,6,10,34,49,96,20, +24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57,47,47,17,51,16,237,50,17,51, +16,237,50,1,93,93,93,113,47,93,93,93,51,51,253,50,50,220,237,16,220,237,49, +48,0,93,93,93,93,93,93,1,93,93,1,20,14,2,43,1,21,35,53,35,34,46,2,53,52,62, +2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17,51,50,62,2,37,20,30,2,59,1,17, +35,34,6,5,159,64,131,197,133,40,191,40,133,197,131,64,67,133,201,135,29,191, +28,135,202,133,67,192,185,183,5,13,92,136,89,43,252,87,43,89,136,92,13,9, +182,182,2,224,105,188,143,84,227,227,84,143,188,105,113,185,131,72,182,182, +72,131,185,117,187,180,253,22,53,98,140,88,88,140,98,53,2,234,180,0,255,255, +0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,168,254,104,5,197,5,129,0,11,0,74, +64,47,1,92,2,2,11,90,0,8,1,175,8,1,0,8,64,8,112,8,3,8,7,90,0,4,16,4,64,4, +3,7,4,32,13,224,13,2,9,9,5,3,11,11,7,95,4,18,2,0,47,63,237,50,47,63,51,47, +1,93,47,94,93,237,47,93,93,113,237,50,47,237,49,48,37,17,35,17,33,17,51,17, +33,17,51,17,5,197,180,251,151,191,2,245,186,160,253,200,1,152,5,129,251,31, +4,225,251,31,0,0,0,1,0,160,0,0,4,174,5,129,0,25,0,134,64,70,164,14,1,20,40, +13,17,72,1,32,13,17,72,42,7,58,7,74,7,3,23,90,25,144,22,1,143,22,1,48,22, +64,22,2,207,22,1,112,22,1,111,22,1,16,22,64,22,2,22,12,90,207,11,1,0,11,16, +11,64,11,3,7,11,32,27,1,32,27,1,27,184,255,192,64,19,14,17,72,0,5,95,21,47, +16,1,16,16,11,24,18,22,22,11,3,0,63,51,47,63,18,57,47,93,51,237,50,1,43,93, +113,47,94,93,93,237,47,93,93,93,93,113,113,113,51,237,49,48,0,93,43,43,93, +1,14,3,35,34,46,2,53,17,51,17,20,22,51,50,62,2,55,17,51,17,35,3,240,36,94, +107,115,56,114,166,108,52,190,130,134,53,110,104,92,35,190,190,1,252,8,20, +18,12,47,92,137,89,2,82,253,194,123,108,10,15,17,7,2,244,250,127,0,0,1,0, +168,0,0,6,173,5,129,0,11,0,114,64,76,7,90,4,4,0,11,90,36,8,1,11,8,1,228,8, +1,219,8,1,148,8,1,123,8,1,4,8,20,8,100,8,3,8,3,90,4,0,68,0,228,0,3,7,0,235, +13,1,196,13,1,187,13,1,132,13,1,112,13,1,2,64,13,1,15,13,1,9,5,1,3,7,7,3, +95,0,18,0,63,237,50,47,63,51,51,1,93,93,95,93,93,93,93,93,47,94,93,237,47, +93,93,93,93,93,113,113,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,168,191,1,233,186,1,233,186,5,129,251,31,4,225,251,31,4,225,250, +127,0,1,0,168,254,104,7,47,5,129,0,15,0,125,64,84,132,17,148,17,180,17,3, +123,17,1,84,17,1,1,92,2,2,15,90,12,11,90,8,8,4,11,12,59,12,75,12,91,12,123, +12,139,12,155,12,203,12,8,219,12,251,12,2,207,12,1,2,159,12,1,128,12,1,111, +12,1,0,12,1,8,12,7,90,32,4,1,4,13,9,5,3,15,15,11,11,7,95,4,18,2,0,47,63,237, +50,47,50,47,63,51,51,1,47,93,237,47,94,93,93,93,93,95,93,93,113,18,57,47, +237,16,237,50,47,237,93,93,93,49,48,37,17,35,17,33,17,51,17,33,17,51,17,33, +17,51,17,7,47,180,250,45,191,1,211,186,1,210,186,160,253,200,1,152,5,129, +251,31,4,225,251,31,4,225,251,31,0,2,0,46,0,0,5,235,5,129,0,16,0,25,0,100, +64,68,116,25,132,25,148,25,3,123,18,139,18,155,18,3,153,3,1,38,3,1,64,27, +1,6,90,47,17,127,17,2,176,17,1,159,17,1,0,17,16,17,32,17,64,17,4,7,17,14, +0,22,90,32,12,1,12,21,95,0,0,12,14,95,15,3,22,95,12,18,0,63,237,63,237,18, +57,47,237,1,47,93,253,50,204,47,94,93,93,93,113,237,93,49,48,0,93,93,93,93, +1,33,50,30,2,21,20,14,2,35,33,17,33,53,33,1,52,38,35,33,17,33,50,54,2,184, +1,66,125,186,124,62,61,121,182,121,253,243,254,53,2,138,2,115,164,164,254, +213,1,51,164,156,3,45,58,105,147,90,87,150,112,64,4,229,156,252,26,121,129, +254,2,136,0,3,0,168,0,0,6,109,5,129,0,14,0,23,0,27,0,140,64,76,116,23,132, +23,148,23,3,123,16,139,16,155,16,3,153,12,1,38,12,1,27,90,159,24,207,24,223, +24,3,16,24,64,24,80,24,112,24,4,24,0,90,0,15,1,224,15,1,159,15,1,0,15,16, +15,32,15,64,15,4,15,9,20,90,0,6,16,6,64,6,3,7,6,128,29,1,29,184,255,192,64, +19,11,14,72,19,95,9,9,6,7,25,25,7,3,24,24,20,95,6,18,0,63,237,51,47,63,51, +47,17,18,57,47,237,1,43,93,47,94,93,237,50,47,93,93,93,113,237,47,93,93,237, +49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50,30,2,7,52,38,35,33,17, +33,50,54,1,17,51,17,4,214,61,121,182,121,253,183,191,1,126,125,186,124,62, +192,164,164,254,153,1,111,164,156,1,152,191,1,157,87,150,112,64,5,129,253, +172,58,105,147,92,121,129,254,2,136,254,225,5,129,250,127,0,2,0,168,0,0,4, +214,5,129,0,14,0,23,0,107,64,76,116,23,132,23,148,23,3,123,16,139,16,155, +16,3,153,12,1,38,12,1,0,90,31,15,1,160,15,176,15,2,159,15,1,0,15,16,15,32, +15,64,15,96,15,5,15,9,20,90,0,6,16,6,2,7,6,175,25,1,64,25,128,25,144,25,3, +19,95,9,9,6,7,3,20,95,6,18,0,63,237,63,18,57,47,237,1,93,93,47,94,93,237, +50,47,93,93,93,113,237,49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50, +30,2,7,52,38,35,33,17,33,50,54,4,214,61,121,182,121,253,183,191,1,126,125, +186,124,62,192,164,164,254,153,1,111,165,155,1,157,87,150,112,64,5,129,253, +172,58,105,147,96,121,131,254,4,131,0,1,0,105,255,236,5,121,5,150,0,42,0, +206,64,81,115,26,131,26,2,115,28,131,28,2,101,28,1,115,4,131,4,2,101,4,1, +115,2,131,2,2,101,2,1,101,12,1,101,11,1,135,17,1,106,17,1,90,33,138,33,2, +10,32,26,32,90,32,3,10,40,26,40,2,36,36,24,38,14,91,32,35,112,35,2,144,35, +176,35,2,127,35,1,64,35,1,35,184,255,192,64,63,7,10,72,35,6,80,24,96,24,2, +175,24,191,24,2,32,24,1,24,35,95,127,38,175,38,2,38,38,9,30,95,19,16,25,32, +25,2,48,25,64,25,112,25,128,25,192,25,208,25,6,25,25,19,19,79,5,1,5,5,0,95, +9,4,0,63,237,51,47,93,63,51,47,93,113,16,237,17,57,47,113,237,1,47,93,93, +113,51,47,43,93,93,93,113,237,51,18,57,47,49,48,0,93,1,93,93,0,93,93,93,1, +93,93,93,93,93,93,93,93,1,34,14,2,7,39,54,36,51,50,4,22,18,21,20,2,6,4,35, +34,46,2,39,55,30,3,51,50,62,2,55,33,53,33,46,3,2,201,88,137,102,69,19,181, +71,1,46,225,164,1,0,175,91,86,172,254,255,171,118,189,149,113,41,156,27,81, +109,140,87,109,176,128,77,9,253,114,2,142,10,73,124,173,4,250,42,70,91,50, +60,173,176,101,187,254,246,165,159,254,244,195,109,54,99,136,83,78,55,105, +83,50,72,132,185,112,154,110,178,126,68,0,0,2,0,168,255,236,7,179,5,150,0, +26,0,46,0,168,64,63,165,7,1,133,24,1,138,20,1,121,29,1,118,35,1,118,39,1, +74,19,138,19,2,58,30,122,30,2,53,34,117,34,2,42,44,58,44,122,44,3,37,40,53, +40,117,40,3,160,48,1,0,91,144,27,160,27,2,160,27,176,27,2,27,184,255,192, +64,54,7,11,72,27,16,12,90,0,13,16,13,64,13,3,7,13,37,91,17,48,10,112,10,2, +10,32,95,22,4,11,95,80,16,1,176,16,224,16,2,15,16,1,8,16,16,13,14,3,13,18, +42,95,5,19,0,63,237,63,63,18,57,47,94,93,93,113,237,63,237,1,47,93,51,237, +47,94,93,237,50,47,43,93,113,237,93,49,48,93,93,93,93,93,93,93,93,93,93,93, +1,20,2,14,1,35,34,46,2,39,33,17,35,17,51,17,33,62,3,51,50,30,1,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,7,179,90,170,245,155,156,239,165,90,7, +254,217,191,191,1,42,13,99,166,232,146,159,245,167,87,195,60,117,173,113, +116,175,117,58,60,117,173,114,121,176,114,54,2,199,165,254,242,192,104,99, +179,247,148,253,115,5,129,253,172,142,229,160,86,102,188,254,246,163,127, +208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,2,0,96,0,0,5,32,5,129, +0,17,0,30,0,239,64,22,156,29,172,29,2,138,29,1,147,20,1,117,20,133,20,2,67, +17,83,17,2,17,184,255,216,64,25,33,36,72,130,17,146,17,162,17,3,100,17,116, +17,2,86,17,1,67,16,83,16,2,3,16,184,255,216,64,117,33,36,72,172,16,1,155, +16,1,125,16,141,16,2,2,94,16,110,16,2,73,16,1,44,16,60,16,2,3,175,1,1,2,1, +104,14,16,72,94,1,110,1,2,73,1,1,44,1,60,1,2,16,1,1,6,24,24,14,18,90,6,6, +0,13,90,224,14,1,143,14,159,14,175,14,207,14,4,0,14,64,14,2,7,14,17,32,0, +1,15,0,31,0,2,0,1,15,95,47,24,95,24,111,24,143,24,4,24,24,0,26,95,11,3,14, +14,0,18,0,63,50,47,63,237,18,57,47,93,237,50,1,47,93,93,51,47,94,93,93,93, +237,18,57,47,237,17,51,17,18,57,17,51,49,48,93,93,93,43,95,93,95,93,93,93, +95,93,93,93,43,95,113,93,93,93,43,113,0,93,93,93,93,51,1,46,3,53,52,62,2, +51,33,17,35,17,33,1,19,20,30,2,51,33,17,33,34,14,2,96,1,144,91,130,84,39, +66,126,185,120,2,151,191,254,73,254,146,28,37,77,119,83,1,205,254,59,76,120, +84,44,2,95,16,78,108,130,67,94,150,104,55,250,127,2,73,253,183,3,236,57,98, +72,41,2,8,31,63,94,255,255,0,87,255,236,4,115,4,78,18,6,0,68,0,0,0,2,0,120, +255,236,4,63,5,222,0,19,0,56,0,158,64,69,137,44,1,122,45,138,45,2,102,21, +118,21,134,21,3,84,18,1,84,12,1,91,2,1,90,35,122,35,138,35,3,90,47,106,47, +138,47,3,123,46,139,46,2,73,46,105,46,2,42,42,23,71,64,208,0,1,144,0,1,0, +58,128,48,58,1,128,58,1,58,184,255,192,64,12,30,35,72,52,10,71,0,31,32,31, +2,31,184,255,192,64,23,26,35,72,31,52,5,80,20,20,42,48,41,1,64,41,240,41, +2,41,15,80,26,22,0,63,237,47,93,113,51,57,47,237,50,1,47,43,93,237,57,43, +93,113,26,16,220,93,113,26,237,50,47,49,48,0,93,93,93,93,93,93,93,93,93,93, +1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,3,50,18,17,16,2,35,34,46,2,53, +52,18,62,1,55,62,3,55,21,14,1,7,14,5,7,62,3,3,130,39,73,104,65,69,114,81, +44,44,77,105,62,69,112,78,42,243,222,210,250,238,113,178,123,65,58,128,206, +147,57,100,91,86,43,86,161,91,78,124,94,67,44,23,2,19,67,97,126,1,246,114, +151,91,37,39,92,150,112,114,150,89,36,36,88,151,2,127,254,251,254,250,254, +247,254,253,70,156,250,180,192,1,22,193,115,28,11,17,14,12,6,161,11,23,17, +14,33,50,73,108,149,101,55,97,72,41,0,0,0,0,3,0,142,0,0,3,231,4,58,0,23,0, +36,0,47,0,149,64,12,42,19,1,37,2,1,26,18,42,18,2,3,184,255,232,64,33,9,12, +72,139,10,155,10,2,10,38,44,71,5,5,24,16,71,64,47,30,159,30,2,160,30,1,30, +49,128,64,49,1,49,184,255,192,64,50,30,35,72,31,49,63,49,239,49,3,38,24,70, +192,22,1,0,22,16,22,48,22,224,22,240,22,5,8,22,10,36,81,143,38,159,38,175, +38,3,38,38,24,37,80,23,15,24,80,22,21,0,63,237,63,237,18,57,47,113,237,57, +1,47,94,93,113,237,50,93,43,113,26,16,220,93,113,26,237,17,57,47,237,18,57, +93,49,48,0,43,93,93,93,1,50,30,2,21,20,14,2,7,21,30,3,21,20,14,2,35,33,17, +19,51,50,62,2,53,52,46,2,43,1,25,1,51,50,62,2,53,52,38,35,2,52,76,144,112, +68,35,60,82,46,54,95,69,40,61,109,151,91,254,67,180,236,69,95,59,27,28,63, +100,71,224,216,68,91,55,23,102,121,4,58,24,62,104,81,53,81,58,37,9,7,7,35, +61,90,61,78,117,78,39,4,58,252,75,20,44,67,47,50,70,44,20,1,194,254,192,19, +39,61,43,82,76,0,1,0,142,0,0,2,175,4,58,0,5,0,54,64,35,0,64,18,39,72,48,0, +1,0,0,7,3,70,192,4,1,0,4,16,4,48,4,224,4,240,4,5,8,4,2,80,5,15,3,21,0,63, +63,237,1,47,94,93,113,237,17,51,47,93,43,49,48,1,21,33,17,35,17,2,175,254, +147,180,4,58,131,252,73,4,58,0,0,0,2,0,20,254,104,4,136,4,58,0,7,0,23,0,159, +64,65,134,3,1,32,3,1,102,1,1,34,5,114,5,130,5,3,34,20,1,34,17,1,137,18,1, +34,18,1,25,19,121,19,2,102,2,118,2,2,34,2,1,25,2,1,34,16,1,4,16,1,98,4,1, +4,4,36,4,68,4,84,4,4,8,73,9,184,255,192,64,42,18,25,72,9,9,22,70,64,111,7, +127,7,143,7,3,32,7,64,7,2,7,25,128,20,15,12,73,6,1,13,1,80,20,15,22,6,14, +80,11,21,13,8,0,47,51,63,237,50,50,63,237,1,47,51,51,237,51,51,26,16,220, +93,93,26,237,50,47,43,237,49,48,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,1,33,6,2,14,1,7,33,1,35,17,33,17,35,17,51,62,2,18,55,33,17,51,3,66, +254,206,24,49,48,48,22,1,241,1,70,163,252,210,163,119,30,58,58,57,28,2,132, +146,3,183,177,254,249,194,136,50,253,229,1,152,254,104,2,27,50,143,220,1, +59,223,252,73,255,255,0,87,255,236,4,24,4,78,18,6,0,72,0,0,0,1,0,7,0,0,5, +83,4,58,0,39,1,97,64,88,165,23,1,165,14,1,171,34,1,164,3,1,172,24,1,154,24, +1,163,13,1,149,13,1,90,6,106,6,122,6,3,85,31,101,31,117,31,3,74,33,154,33, +170,33,3,69,4,149,4,165,4,3,42,28,58,28,2,37,9,53,9,2,34,31,170,26,1,26,31, +27,16,27,27,32,20,38,70,39,165,11,1,11,10,3,6,6,39,10,184,255,240,64,49,10, +10,17,39,39,5,33,32,16,15,32,1,255,32,1,160,32,1,159,32,1,80,32,1,63,32,1, +32,32,1,207,32,1,128,32,144,32,2,95,32,1,32,32,48,32,2,32,4,5,184,255,240, +64,64,31,5,47,5,2,127,5,159,5,2,63,5,159,5,223,5,255,5,4,5,15,41,1,255,41, +1,160,41,1,111,41,159,41,2,80,41,1,63,41,1,32,41,1,207,41,1,128,41,144,41, +2,79,41,95,41,2,48,41,1,31,6,34,3,6,184,255,240,64,37,11,17,72,6,3,37,0,80, +20,15,17,31,17,79,17,95,17,4,15,17,31,17,79,17,3,7,17,17,4,26,18,10,15,39, +33,4,21,0,63,51,51,63,51,51,18,57,47,94,93,113,51,237,50,57,57,43,17,51,17, +51,1,93,93,93,93,113,113,113,113,113,113,114,47,93,113,114,56,51,47,93,93, +93,93,113,113,113,113,113,113,114,56,51,18,57,47,51,57,47,56,18,57,17,51, +17,51,93,16,237,50,17,57,47,56,57,51,93,17,51,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,0,93,93,1,34,38,39,1,35,1,46,1,39,3,51,23,30,3,51,17,51,17, +50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,2,83,26,65,19,254,234,200,1, +97,17,66,45,216,188,148,48,65,52,48,30,180,30,48,52,65,48,148,188,216,45, +66,17,1,97,200,254,234,19,65,26,180,1,221,12,8,254,15,2,80,14,85,66,1,69, +239,77,92,50,16,1,218,254,38,16,50,92,77,239,254,187,66,85,14,253,176,1,241, +8,12,254,35,0,0,0,1,0,49,255,236,3,94,4,78,0,55,0,175,64,28,5,53,21,53,2, +5,38,21,38,37,38,3,131,45,1,45,15,21,70,40,40,51,71,10,29,73,64,30,184,255, +192,64,86,30,36,72,143,15,1,30,15,30,15,3,144,10,1,144,10,160,10,2,31,10, +1,10,57,128,16,57,1,4,73,3,64,12,20,72,3,45,15,80,143,16,159,16,175,16,3, +16,16,35,7,0,29,1,144,29,224,29,240,29,3,29,29,24,80,35,16,7,80,0,96,4,112, +4,128,4,3,239,4,1,32,4,1,4,4,0,22,0,63,50,47,93,93,113,16,237,63,237,51,47, +93,113,17,18,57,47,113,237,57,1,47,43,237,93,26,16,204,93,93,113,17,57,57, +47,47,93,43,26,237,16,237,50,47,237,18,57,113,49,48,93,93,5,34,38,39,55,30, +1,51,50,54,53,52,46,2,35,53,50,62,2,53,52,38,35,34,14,2,7,39,62,3,51,50,30, +2,21,20,14,2,7,21,30,3,21,20,14,2,1,202,167,197,45,159,25,126,103,96,113, +55,92,120,64,64,114,86,49,99,93,35,70,60,42,7,162,12,62,97,128,78,85,138, +98,53,44,71,88,45,56,100,75,43,49,101,152,20,125,129,44,78,86,94,91,59,78, +45,18,137,15,38,67,52,74,86,14,33,55,42,20,68,98,63,29,42,76,104,63,57,88, +61,36,4,2,6,41,67,93,58,69,119,87,49,0,0,0,0,1,0,142,0,0,3,234,4,58,0,19, +0,186,64,25,9,17,1,233,17,249,17,2,4,15,1,228,15,244,15,2,11,5,1,235,5,251, +5,2,16,184,255,192,64,107,29,60,72,153,16,1,6,64,29,60,72,119,6,151,6,2,6, +7,1,230,7,246,7,2,156,7,1,105,7,137,7,2,31,17,47,17,79,17,3,9,72,64,7,64, +10,1,80,10,1,159,10,255,10,2,10,21,128,0,21,192,21,208,21,224,21,4,192,21, +1,128,21,144,21,176,21,192,21,208,21,5,17,1,72,192,18,1,0,18,16,18,48,18, +224,18,240,18,5,8,18,16,7,19,15,10,6,18,21,0,63,51,51,63,51,51,1,47,94,93, +113,237,50,93,113,114,26,16,220,93,113,114,50,26,237,49,48,0,93,1,93,93,113, +114,0,93,43,93,43,113,114,113,114,1,113,114,1,17,20,14,2,7,1,51,17,35,17, +52,62,2,55,1,35,17,1,60,3,3,3,1,1,243,197,172,2,3,3,2,254,6,192,4,58,253, +176,23,77,82,74,21,3,101,251,198,2,148,19,57,60,57,20,252,151,4,58,0,255, +255,0,142,0,0,3,234,5,240,18,38,1,206,0,0,17,7,2,145,0,234,0,0,0,19,64,11, +1,20,17,38,1,2,25,33,18,8,37,1,43,53,0,43,53,0,0,0,0,1,0,138,0,0,3,138,4, +58,0,21,0,202,64,17,117,16,133,16,149,16,3,57,15,121,15,137,15,153,15,4,13, +184,255,208,64,123,12,17,72,133,11,149,11,2,120,5,1,133,13,149,13,2,47,23, +79,23,2,73,16,1,56,16,1,16,13,121,8,137,8,153,8,3,8,71,13,1,54,13,1,13,9, +16,9,9,14,2,20,70,0,21,16,21,48,21,240,21,4,21,57,15,73,15,2,15,32,14,1,32, +14,144,14,2,144,14,1,79,14,1,48,14,1,47,14,1,16,14,1,14,16,14,13,19,80,15, +2,63,2,79,2,3,15,2,63,2,255,2,3,8,2,2,14,21,21,14,21,8,8,0,15,0,63,50,47, +63,51,47,17,57,47,94,93,113,237,50,1,47,56,93,93,93,93,93,113,114,51,113, +47,93,237,50,17,57,47,56,57,113,113,51,93,17,51,113,113,93,49,48,0,93,1,93, +93,43,93,93,19,51,17,50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,138,180, +30,48,52,65,48,148,188,216,45,66,17,1,97,200,254,234,19,65,26,180,4,58,254, +38,16,50,92,77,239,254,187,66,85,14,253,176,1,241,8,12,254,35,0,0,0,0,1,0, +11,255,236,4,29,4,58,0,25,0,186,64,42,26,21,1,130,7,1,116,7,1,85,7,101,7, +2,130,6,1,117,6,1,22,6,38,6,102,6,3,114,5,130,5,2,100,5,1,86,5,1,134,4,1, +4,184,255,240,64,61,12,15,72,26,3,1,116,2,1,7,24,12,17,72,25,70,64,127,0, +143,0,239,0,3,0,27,128,176,27,192,27,208,27,3,176,27,240,27,2,64,27,96,27, +112,27,160,27,176,27,192,27,6,131,23,1,23,54,6,1,6,2,184,255,240,64,26,24, +28,72,215,2,231,2,2,128,2,1,2,143,12,1,12,2,80,23,15,16,80,9,22,0,21,0,63, +63,237,63,237,1,47,93,51,93,93,43,51,113,51,93,93,113,114,26,16,220,93,26, +237,49,48,0,43,1,93,93,43,93,93,93,93,93,93,93,93,93,93,93,33,17,33,6,2,14, +3,35,34,38,39,53,30,1,51,50,62,3,18,55,33,17,3,104,254,137,25,42,44,51,71, +94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2,206,3,183,184,254,225,216, +149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,251,198,0,0,1,0,142,0,0,4,243, +4,58,0,28,1,3,64,21,137,18,153,18,2,134,12,150,12,2,107,17,123,17,2,100,13, +116,13,2,1,184,255,224,64,122,29,60,72,138,1,154,1,2,57,1,1,0,32,29,60,72, +133,0,149,0,2,54,0,86,0,2,143,19,159,19,2,93,19,109,19,125,19,3,59,19,75, +19,2,25,19,41,19,2,128,11,144,11,2,82,11,98,11,114,11,3,52,11,68,11,2,22, +11,38,11,2,1,0,15,15,8,21,72,64,19,80,22,1,159,22,255,22,2,22,30,128,144, +30,192,30,208,30,3,79,30,1,11,8,72,192,9,1,0,9,16,9,48,9,224,9,240,9,5,8, +9,28,2,2,184,255,192,64,22,29,60,72,2,32,19,22,72,84,2,1,19,2,10,15,22,15, +64,29,60,72,15,184,255,224,64,18,19,22,72,47,15,63,15,79,15,127,15,143,15, +5,15,1,9,21,0,63,51,51,93,43,43,51,63,51,51,93,43,43,17,51,1,47,94,93,113, +237,50,93,93,26,16,220,93,113,50,26,237,18,57,61,47,51,51,49,48,93,93,93, +93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,33,35,1,30,3,21,17,35,17,33, +19,30,1,23,62,1,55,19,33,17,35,17,52,62,2,55,3,19,153,254,188,1,3,1,1,174, +1,24,220,23,37,8,10,35,23,220,1,13,173,1,3,2,2,3,183,26,60,61,57,23,253,44, +4,58,253,107,63,151,72,72,151,63,2,149,251,198,2,212,22,60,64,60,23,0,1,0, +142,0,0,3,221,4,58,0,11,0,139,64,48,5,70,64,2,15,6,79,6,2,57,47,6,111,6,143, +6,255,6,4,191,6,1,143,6,159,6,255,6,3,6,13,128,0,13,192,13,208,13,224,13, +4,192,13,1,128,13,1,13,184,255,192,64,49,19,23,72,1,9,70,192,10,1,0,10,16, +10,48,10,224,10,240,10,5,10,8,80,176,1,192,1,2,159,1,175,1,191,1,3,15,1,63, +1,2,8,1,1,10,5,21,3,0,15,0,63,50,63,51,57,47,94,93,113,114,237,1,47,93,113, +237,50,43,93,113,114,26,16,220,93,113,114,94,93,50,26,237,49,48,1,17,33,17, +51,17,35,17,33,17,35,17,1,66,1,231,180,180,254,25,180,4,58,254,54,1,202,251, +198,1,237,254,19,4,58,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +142,0,0,3,199,4,58,0,7,0,109,64,80,1,70,64,15,2,79,2,2,57,47,2,111,2,143, +2,255,2,4,191,2,1,143,2,159,2,255,2,3,2,9,128,0,9,192,9,208,9,224,9,4,192, +9,1,128,9,176,9,192,9,208,9,4,47,9,1,5,70,192,6,1,0,6,16,6,48,6,224,6,240, +6,5,8,6,4,80,7,15,6,1,21,0,63,51,63,237,1,47,94,93,113,237,93,93,113,114, +26,16,220,93,113,114,94,93,26,237,49,48,1,17,35,17,33,17,35,17,3,199,180, +254,47,180,4,58,251,198,3,183,252,73,4,58,0,255,255,0,132,254,87,4,29,4,77, +18,6,0,83,0,0,255,255,0,87,255,236,3,202,4,78,18,6,0,70,0,0,0,1,0,35,0,0, +3,135,4,58,0,7,0,72,64,43,7,14,4,2,5,14,223,2,1,2,4,70,0,5,16,5,2,8,5,5,8, +9,160,9,1,95,9,1,48,9,64,9,2,47,9,1,4,21,3,7,80,0,15,0,63,237,50,63,1,93, +93,93,93,17,18,57,47,94,93,237,204,93,43,1,24,16,77,228,49,48,19,33,21,33, +17,35,17,33,35,3,100,254,168,180,254,168,4,58,131,252,73,3,183,0,0,0,255, +255,0,5,254,87,3,252,4,58,18,6,0,92,0,0,0,3,0,86,254,87,6,62,5,204,0,53,0, +74,0,95,0,229,64,13,141,93,157,93,173,93,3,78,24,14,17,72,72,184,255,232, +179,14,17,72,57,184,255,232,182,14,17,72,109,82,1,51,184,255,224,64,75,7, +10,72,15,26,31,26,47,26,3,24,32,7,10,72,0,3,16,3,32,3,3,7,4,54,71,64,25,14, +13,0,14,14,75,71,36,0,68,0,148,0,164,0,4,0,85,39,13,72,65,38,4,14,1,4,14, +36,14,68,14,100,14,132,14,180,14,228,14,7,7,14,52,97,1,97,184,255,192,64, +52,30,35,72,219,97,1,84,97,100,97,132,97,148,97,4,64,97,1,2,32,97,48,97,2, +31,97,1,0,97,1,38,0,31,45,80,3,70,80,49,28,16,8,18,91,3,59,80,5,22,22,13, +27,0,63,63,51,237,23,50,63,51,237,23,50,63,1,93,93,93,95,93,93,93,43,113, +47,94,93,113,51,51,237,50,50,220,93,237,43,1,24,16,77,244,26,237,49,48,95, +94,93,43,93,0,43,93,1,43,43,43,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35, +17,52,54,55,35,14,1,35,34,2,17,16,18,51,50,22,23,51,52,46,2,53,17,51,17,20, +14,2,21,51,62,1,51,50,30,2,5,20,30,2,51,50,62,2,55,53,52,46,2,35,34,14,2, +5,52,46,2,35,34,14,2,29,1,30,3,51,50,62,2,6,62,38,86,140,101,105,158,42,6, +2,3,170,2,3,5,46,149,111,186,179,185,180,112,149,45,5,2,2,1,170,1,1,1,5,46, +144,114,101,140,86,38,250,213,26,56,85,60,60,94,65,34,2,34,64,94,61,57,86, +57,29,4,110,23,52,88,64,53,92,70,40,1,35,65,92,60,65,88,53,23,2,34,123,208, +150,85,88,100,35,77,58,254,89,1,167,54,82,40,104,90,1,19,1,25,1,28,1,26,90, +98,10,41,46,42,12,1,163,254,92,11,43,47,43,12,104,89,80,145,205,129,112,160, +103,48,43,98,157,113,24,115,159,98,43,46,102,163,116,100,156,108,56,34,96, +169,135,23,108,150,93,41,58,110,159,0,0,0,255,255,0,23,0,0,3,234,4,58,18, +6,0,91,0,0,0,1,0,142,254,104,4,102,4,58,0,11,0,91,178,7,73,8,184,255,192, +64,54,18,21,72,8,8,5,70,64,223,2,1,207,2,223,2,2,2,64,25,28,72,0,2,48,2,2, +2,13,128,111,13,1,1,70,0,10,16,10,48,10,240,10,4,8,10,5,1,80,10,21,8,3,0, +15,0,63,50,47,63,237,50,1,47,94,93,237,93,26,16,220,93,43,93,113,26,237,50, +47,43,237,49,48,1,17,33,17,51,17,51,17,35,17,33,17,1,66,1,221,180,147,163, +252,203,4,58,252,73,3,183,252,73,253,229,1,152,4,58,0,1,0,122,0,0,3,156,4, +58,0,25,0,92,64,37,108,15,124,15,140,15,3,22,32,7,10,72,21,24,7,12,72,12, +70,64,9,175,13,1,127,13,143,13,239,13,3,13,27,128,1,70,24,184,255,192,64, +20,9,12,72,24,14,19,80,9,15,6,31,6,2,6,6,12,21,10,0,15,0,63,50,63,57,47,93, +51,237,50,1,47,43,237,26,16,220,93,113,50,26,237,49,48,43,43,0,93,1,17,20, +30,2,51,50,54,55,17,51,17,35,17,14,3,35,34,46,2,53,17,1,46,16,39,64,47,70, +132,74,180,180,38,81,87,93,51,66,101,69,36,4,58,254,110,34,59,44,25,26,21, +2,5,251,198,1,205,15,31,24,16,41,76,110,69,1,155,0,0,0,1,0,142,0,0,5,221, +4,58,0,11,0,116,64,52,7,70,4,4,0,11,70,64,4,8,52,8,2,36,8,132,8,212,8,228, +8,4,11,8,1,139,8,251,8,2,8,13,128,251,13,1,180,13,212,13,2,128,13,1,2,112, +13,1,95,13,1,13,184,255,192,64,23,9,12,72,3,70,0,0,16,0,48,0,3,8,0,9,5,1, +15,7,3,80,0,21,0,63,237,50,63,51,51,1,47,94,93,237,43,93,93,95,93,93,93,26, +16,220,93,113,113,114,26,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,142,180,1,154,180,1,153,180,4,58,252,73,3,183,252,73,3,183,251,198, +0,0,0,1,0,142,254,104,6,102,4,58,0,15,0,141,64,96,13,73,244,14,1,14,14,11, +70,8,7,70,64,4,4,0,107,8,1,4,8,1,84,8,228,8,2,59,8,1,107,8,123,8,139,8,251, +8,4,84,8,1,8,17,128,251,17,1,212,17,1,128,17,176,17,2,2,96,17,112,17,2,95, +17,1,32,17,48,17,64,17,3,3,70,0,0,16,0,48,0,240,0,4,8,0,14,9,5,1,15,11,7, +3,80,0,21,0,63,237,50,50,63,51,51,47,1,47,94,93,237,93,93,93,95,93,93,93, +26,16,204,93,93,113,113,114,114,17,57,47,26,237,16,237,50,47,93,237,49,48, +51,17,51,17,33,17,51,17,33,17,51,17,51,17,35,17,142,180,1,149,180,1,148,180, +147,163,4,58,252,73,3,183,252,73,3,183,252,73,253,229,1,152,0,0,0,0,2,0,45, +0,0,4,172,4,58,0,14,0,25,0,113,185,0,5,255,224,179,7,10,72,2,184,255,224, +64,16,7,11,72,3,71,64,176,21,1,21,27,128,80,27,1,27,184,255,192,64,45,30, +35,72,255,27,1,14,11,15,70,32,9,1,32,9,1,9,25,81,175,14,191,14,207,14,3,15, +14,31,14,79,14,3,7,14,14,9,11,80,12,15,15,81,9,21,0,63,237,63,237,18,57,47, +94,93,113,237,1,47,93,113,253,204,51,93,43,113,26,16,220,93,26,237,49,48, +43,43,1,50,22,21,20,14,2,35,33,17,33,53,33,25,1,51,50,62,2,53,52,38,43,1, +3,13,205,210,52,104,155,103,254,103,254,184,1,252,202,69,96,59,26,116,133, +203,2,112,147,159,74,118,82,44,3,183,131,254,54,254,15,25,49,71,46,94,87, +0,3,0,142,0,0,5,50,4,58,0,12,0,23,0,27,0,105,185,0,5,255,224,179,7,10,72, +2,184,255,224,64,58,7,10,72,3,71,19,19,9,27,70,64,159,24,175,24,2,24,29,128, +12,13,70,16,9,32,9,64,9,3,9,23,81,175,12,191,12,207,12,3,15,12,31,12,79,12, +3,7,12,12,9,25,10,15,24,13,81,9,21,0,63,237,51,63,51,18,57,47,94,93,113,237, +1,47,93,237,50,26,16,220,93,26,237,18,57,47,237,49,48,43,43,1,50,22,21,20, +14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,1,17,51,17,2,38,205,210,52, +104,155,103,254,103,180,202,69,96,59,26,116,133,203,3,60,180,2,112,147,159, +74,118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,254,13,4,58,251,198,0,0, +0,0,2,0,142,0,0,3,215,4,58,0,12,0,23,0,132,185,0,5,255,224,179,7,10,72,2, +184,255,224,64,86,7,10,72,3,71,64,176,19,1,19,25,128,47,25,1,47,25,175,25, +2,63,25,95,25,127,25,159,25,191,25,207,25,223,25,255,25,8,25,64,35,39,72, +12,13,70,0,9,208,9,2,16,9,32,9,64,9,240,9,4,9,23,81,175,12,191,12,207,12, +3,15,12,31,12,79,12,3,7,12,12,9,10,15,13,81,9,21,0,63,237,63,18,57,47,94, +93,113,237,1,47,93,113,237,50,43,93,113,114,26,16,220,93,26,237,49,48,43, +43,1,50,22,21,20,14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,2,56,205, +210,52,104,155,103,254,85,180,220,69,96,59,26,116,133,221,2,112,147,159,74, +118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,0,0,0,0,1,0,55,255,236,3,190, +4,78,0,40,0,170,64,87,118,34,1,22,29,1,118,28,1,107,15,1,107,6,1,16,10,32, +10,2,10,10,0,31,71,64,12,31,9,1,144,9,1,9,42,128,20,70,21,21,1,70,31,0,1, +223,0,1,0,64,12,18,72,0,10,80,143,11,159,11,175,11,3,11,11,26,4,80,36,0,1, +16,1,32,1,96,1,112,1,128,1,192,1,208,1,8,1,184,255,192,64,29,27,34,72,1,1, +36,22,31,20,47,20,127,20,143,20,223,20,5,20,64,29,32,72,20,20,17,80,26,16, +0,63,237,51,47,43,93,63,51,47,43,93,16,237,17,57,47,113,237,1,47,43,113,114, +237,51,47,237,26,16,220,93,113,50,26,237,18,57,47,93,49,48,93,93,93,93,93, +19,55,30,1,51,50,62,2,55,33,53,33,46,3,35,34,6,7,39,62,3,51,50,30,2,21,20, +14,2,35,34,46,2,55,182,16,133,100,73,103,68,34,5,254,99,1,157,4,34,67,103, +73,109,118,15,185,13,66,105,145,93,90,170,134,81,51,114,182,130,99,151,106, +61,1,59,12,108,104,53,97,135,82,131,90,133,88,44,105,91,14,68,116,84,48,53, +128,216,163,120,205,151,86,54,92,122,0,0,0,0,2,0,142,255,236,5,170,4,78,0, +19,0,39,0,128,64,85,121,37,137,37,2,116,33,132,33,2,118,27,134,27,2,121,23, +137,23,2,150,18,166,18,2,30,71,15,15,8,31,8,2,7,8,8,11,0,71,64,160,20,1,20, +41,128,14,10,70,192,11,1,0,11,16,11,48,11,224,11,240,11,5,8,11,25,80,17,16, +9,80,47,14,1,14,14,11,12,15,11,21,35,80,3,22,0,63,237,63,63,18,57,47,93,237, +63,237,1,47,94,93,113,237,50,26,16,220,93,26,237,18,57,47,94,93,51,237,49, +48,0,93,1,93,93,93,93,1,16,2,35,34,46,2,39,35,17,35,17,51,17,51,18,33,50, +18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,170,235,223,102,161,115,65, +5,222,180,180,223,33,1,164,237,215,189,35,67,97,61,63,99,70,37,39,70,94,56, +62,100,70,38,2,30,254,228,254,234,62,128,192,131,254,19,4,58,254,54,1,222, +254,232,254,232,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0,0,2, +0,17,0,0,3,199,4,58,0,13,0,22,0,143,64,68,117,1,133,1,2,3,32,11,17,72,0,32, +40,43,72,223,0,239,0,2,0,32,29,37,72,52,0,1,43,0,1,41,4,1,4,48,7,10,72,7, +32,7,11,72,18,71,0,3,3,12,6,6,2,22,11,70,64,175,12,1,239,12,1,12,24,128,1, +2,184,255,240,64,22,91,2,107,2,2,2,3,0,81,47,21,1,21,21,1,15,81,9,15,12,1, +21,0,63,51,63,237,18,57,47,93,237,50,1,47,93,56,51,26,16,220,93,113,26,237, +51,18,57,47,18,57,17,51,237,49,48,43,0,43,93,1,93,113,43,113,43,43,93,9,1, +35,1,46,1,53,52,54,51,33,17,35,25,1,35,34,6,21,20,22,59,1,2,23,254,197,203, +1,88,131,118,216,207,1,176,180,234,130,120,107,124,253,1,202,254,54,1,215, +27,163,122,149,150,251,198,1,202,1,241,92,93,94,93,0,255,255,0,87,255,236, +4,24,5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3, +2,4,42,40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,0,1,0,10,254,87,3,238,5,204, +0,57,0,162,64,9,170,49,1,31,32,9,15,72,24,184,255,232,64,86,9,13,72,0,24, +16,24,2,7,36,36,57,28,70,64,80,45,1,159,45,1,45,59,128,10,7,57,70,4,3,192, +0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176,59,192,59,208,59,3,176,59,240,59, +2,255,59,1,112,59,160,59,176,59,3,57,21,40,80,33,27,15,51,80,22,10,2,81,7, +3,3,5,22,184,255,192,182,7,13,72,22,15,5,0,0,63,63,43,18,57,47,51,237,50, +16,237,50,63,237,63,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220, +93,113,26,237,17,57,47,49,48,0,94,93,43,43,1,93,51,17,35,53,51,53,51,21,33, +21,33,21,20,14,2,7,51,62,3,51,50,30,2,21,17,20,14,2,35,34,38,39,53,30,1,51, +50,62,2,53,17,52,46,2,35,34,14,2,21,17,142,132,132,180,1,44,254,212,2,3,2, +1,3,30,70,84,100,62,104,133,77,29,21,54,93,72,34,65,28,13,36,13,38,49,27, +10,17,48,88,70,64,103,73,40,4,182,131,147,147,131,148,33,66,56,39,7,55,77, +50,23,56,101,140,84,252,209,62,106,78,45,4,5,139,2,4,20,43,67,46,2,241,69, +104,69,35,46,84,120,75,253,170,0,0,0,255,255,0,142,0,0,2,200,5,228,18,38, +1,201,0,0,17,7,0,116,0,216,0,0,0,19,64,11,1,6,17,38,1,85,6,9,4,0,37,1,43, +53,0,43,53,0,0,0,0,1,0,87,255,236,3,222,4,78,0,40,0,171,64,113,116,30,1,116, +21,1,137,8,1,137,2,1,47,42,1,63,26,1,26,26,27,36,16,70,15,15,35,70,0,36,32, +36,2,0,36,64,36,96,36,128,36,160,36,192,36,224,36,7,8,36,24,27,71,31,5,1, +5,27,80,143,24,159,24,175,24,3,24,24,32,19,80,10,31,16,47,16,127,16,143,16, +223,16,5,16,64,29,32,72,16,16,10,16,32,80,0,0,35,16,35,32,35,96,35,112,35, +128,35,192,35,208,35,8,35,184,255,192,182,27,34,72,35,35,0,22,0,63,50,47, +43,93,16,237,63,51,47,43,93,16,237,18,57,47,113,237,1,47,93,237,50,47,94, +93,113,237,51,47,237,17,18,57,47,93,93,49,48,93,93,93,93,5,34,46,2,53,52, +62,2,51,50,30,2,23,7,46,1,35,34,14,2,7,33,21,33,30,3,51,50,54,55,23,14,3, +2,52,130,182,114,51,81,134,170,90,93,145,105,66,13,185,15,118,109,73,103, +67,34,4,1,156,254,99,4,35,68,103,74,100,133,16,182,9,61,106,151,20,86,151, +205,120,163,216,128,53,48,84,116,68,14,91,105,44,88,133,90,131,82,135,97, +53,103,109,12,67,122,92,54,0,255,255,0,57,255,236,3,182,4,75,18,6,0,86,0, +0,255,255,0,137,0,0,1,61,5,204,16,38,0,241,199,0,17,6,1,75,237,0,0,212,181, +9,64,56,56,72,9,184,255,192,64,9,55,55,72,9,64,54,54,72,9,184,255,192,179, +53,53,72,9,184,255,192,64,9,52,52,72,9,64,50,50,72,9,184,255,192,179,49,49, +72,9,184,255,192,64,9,48,48,72,9,64,42,42,72,9,184,255,192,179,41,41,72,9, +184,255,192,64,9,40,40,72,9,64,38,38,72,9,184,255,192,179,37,37,72,9,184, +255,192,179,36,36,72,9,184,255,192,179,35,35,72,9,184,255,192,64,16,34,34, +72,9,64,29,29,72,9,64,10,10,72,1,0,0,184,255,192,179,49,49,72,0,184,255,192, +64,9,40,41,72,0,64,25,27,72,0,184,255,192,182,18,18,72,128,0,1,0,184,255, +192,64,11,8,8,72,0,1,0,4,7,1,2,37,1,43,53,17,43,93,43,43,43,43,53,53,1,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,248,0,0,2, +37,5,123,18,38,0,241,0,0,17,6,0,105,203,0,0,25,182,2,1,4,17,38,2,1,184,255, +243,180,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,0,255,255,255,206,254,87,1,61, +5,204,18,6,0,77,0,0,0,2,0,11,255,236,6,236,4,58,0,34,0,45,1,42,64,82,163, +16,1,148,16,1,117,16,133,16,2,106,14,1,57,14,1,14,16,18,22,72,131,14,147, +14,163,14,3,117,14,1,106,13,1,57,13,1,13,16,18,22,72,163,13,1,87,13,103,13, +119,13,3,16,24,12,17,72,109,15,1,15,32,18,22,72,162,15,1,117,15,133,15,149, +15,3,54,15,70,15,2,5,184,255,224,179,7,10,72,2,184,255,224,64,18,7,11,72, +34,35,70,64,9,1,9,9,22,3,71,176,41,1,41,184,255,192,64,9,8,11,72,41,47,80, +47,1,47,184,255,192,64,93,30,35,72,255,47,1,48,47,1,109,11,1,31,11,63,11, +2,255,11,1,233,11,1,187,11,203,11,219,11,3,163,11,1,149,11,1,31,32,63,32, +2,255,32,1,106,32,1,41,32,1,163,32,1,53,32,1,11,15,32,3,22,45,81,175,34,191, +34,207,34,3,15,34,31,34,79,34,3,7,34,34,9,11,80,32,15,25,80,18,22,35,81,9, +21,0,63,237,63,237,63,237,18,57,47,94,93,113,237,1,47,23,51,93,93,113,113, +93,113,93,93,93,93,93,113,113,93,93,43,113,16,220,43,93,237,18,57,47,93,237, +50,49,48,43,43,93,93,93,43,113,0,43,1,93,93,43,113,113,93,93,43,113,113,93, +93,93,1,50,22,21,20,14,2,35,33,17,33,6,2,14,3,35,34,38,39,53,30,1,51,50,62, +3,18,55,33,25,1,51,50,62,2,53,52,38,43,1,5,77,205,210,52,104,155,103,254, +62,254,101,25,42,44,51,71,94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2, +242,242,69,96,59,26,116,133,243,2,112,147,159,74,118,82,44,3,183,184,254, +225,216,149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,254,54,254,15,25,49, +71,46,94,87,0,0,2,0,142,0,0,6,44,4,58,0,20,0,31,0,133,185,0,7,255,224,179, +7,10,72,4,184,255,224,64,23,7,11,72,1,21,70,19,11,11,15,5,71,64,176,27,1, +27,33,128,80,33,1,33,184,255,192,64,50,30,35,72,255,33,1,18,14,70,16,15,32, +15,64,15,3,15,31,81,1,1,13,80,175,18,191,18,207,18,3,15,18,31,18,79,18,3, +7,18,18,0,15,21,21,81,11,21,16,0,15,0,63,50,63,237,63,18,57,47,94,93,113, +237,51,47,237,1,47,93,237,50,93,43,113,26,16,220,93,26,237,18,57,47,51,237, +50,49,48,43,43,1,17,51,50,22,21,20,14,2,35,33,17,33,17,35,17,51,17,33,17, +19,51,50,62,2,53,52,38,43,1,3,169,228,205,210,52,104,155,103,254,102,254, +78,180,180,1,178,181,202,69,96,59,26,116,133,203,4,58,254,54,147,159,74,118, +82,44,1,237,254,19,4,58,254,54,1,202,252,69,25,49,71,46,94,87,0,0,0,0,1,0, +10,0,0,3,238,5,204,0,41,0,144,185,0,7,255,232,64,85,9,13,72,0,7,16,7,2,7, +33,24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,35,32,24,70,29,28,192,25, +1,0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240, +43,2,255,43,1,112,43,160,43,176,43,3,35,27,81,32,28,28,5,30,0,25,11,21,0, +18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220,93,113,26,237, +17,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61,30,70,84,100,62,104, +133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180,1,44,254,212,2,3,2, +1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69,35,46,84,120,75,253, +170,4,182,131,147,147,131,148,33,66,56,39,7,0,0,255,255,0,138,0,0,3,138,5, +228,18,38,1,208,0,0,17,7,0,116,1,63,0,0,0,19,64,11,1,22,17,38,1,81,22,25, +0,14,37,1,43,53,0,43,53,0,0,0,255,255,0,5,254,87,3,252,5,240,18,38,0,92,0, +0,17,7,2,145,0,183,0,0,0,19,64,11,1,32,17,38,1,10,37,45,17,31,37,1,43,53, +0,43,53,0,0,0,0,1,0,142,254,104,3,221,4,58,0,11,0,125,64,89,9,73,15,10,79, +10,2,38,10,10,0,7,70,64,15,4,79,4,2,57,47,4,111,4,143,4,255,4,4,191,4,1,143, +4,159,4,255,4,3,4,13,128,3,70,192,0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176, +13,192,13,208,13,3,176,13,240,13,2,112,13,160,13,176,13,192,13,4,9,5,1,15, +8,3,80,0,0,47,237,51,63,51,47,1,93,113,114,47,94,93,113,237,26,16,220,93, +113,114,94,93,26,237,18,57,47,94,93,237,49,48,51,17,51,17,33,17,51,17,33, +17,35,17,142,180,1,231,180,254,170,163,4,58,252,73,3,183,251,198,254,104, +1,152,0,0,1,0,168,0,1,3,186,7,28,0,7,0,55,64,37,5,90,0,6,16,6,64,6,3,6,3, +70,255,0,1,0,0,16,0,64,0,128,0,176,0,208,0,6,7,0,4,95,1,7,3,5,18,0,63,63, +51,237,1,47,94,93,93,237,47,93,237,49,48,1,17,51,17,33,17,35,17,3,6,180,253, +173,191,5,129,1,155,253,201,251,28,5,128,0,0,0,0,1,0,142,0,0,3,10,5,204,0, +7,0,56,64,36,6,73,16,3,48,3,2,3,3,9,0,70,192,1,1,0,1,16,1,48,1,224,1,240, +1,5,8,1,4,0,7,80,2,15,0,21,0,63,63,237,63,1,47,94,93,113,237,17,51,47,93, +237,49,48,33,35,17,33,17,51,17,33,1,66,180,1,217,163,254,56,4,58,1,146,253, +235,255,255,0,9,0,0,7,134,6,240,18,38,0,58,0,0,17,7,2,148,2,65,0,0,0,21,180, +1,47,5,38,1,184,255,184,180,48,51,15,46,37,1,43,53,0,43,53,0,255,255,255, +253,0,0,5,204,5,228,18,38,0,90,0,0,17,7,0,67,1,72,0,0,0,21,180,1,43,17,38, +1,184,255,162,180,44,47,15,42,37,1,43,53,0,43,53,0,255,255,0,9,0,0,7,134, +6,240,18,38,0,58,0,0,17,7,2,149,2,247,0,0,0,19,64,11,1,47,5,38,1,75,47,50, +15,46,37,1,43,53,0,43,53,0,0,0,255,255,255,253,0,0,5,204,5,228,18,38,0,90, +0,0,17,7,0,116,2,38,0,0,0,19,64,11,1,43,17,38,1,93,43,46,15,42,37,1,43,53, +0,43,53,0,0,0,255,255,0,9,0,0,7,134,6,178,18,38,0,58,0,0,17,7,2,152,2,134, +0,0,0,23,64,13,2,1,47,5,38,2,1,2,51,49,15,46,37,1,43,53,53,0,43,53,53,0,0, +0,255,255,255,253,0,0,5,204,5,123,18,38,0,90,0,0,17,7,0,105,1,161,0,0,0,23, +64,13,2,1,43,17,38,2,1,0,47,45,15,42,37,1,43,53,53,0,43,53,53,0,0,0,255,255, +0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,148,1,34,0,0,0,21,180,1,9,5,38, +1,184,255,181,180,10,13,4,8,37,1,43,53,0,43,53,0,255,255,0,5,254,87,3,252, +5,228,18,38,0,92,0,0,17,6,0,67,105,0,0,21,180,1,32,17,38,1,184,255,167,180, +33,36,17,31,37,1,43,53,0,43,53,0,0,0,0,1,0,0,1,195,4,114,2,76,0,3,0,43,64, +30,2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38, +43,72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,4,114,1,195,137,137, +0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30,2,0,0,186,15,1,31,1,63,1,79,1,4,47, +1,63,1,111,1,175,1,223,1,5,1,64,38,43,72,1,0,47,43,93,113,237,1,47,47,49, +48,17,53,33,21,8,0,1,195,137,137,0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30, +2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38,43, +72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,8,0,1,195,137,137,0,255, +255,255,225,254,78,4,138,255,169,16,38,0,66,0,229,16,7,0,66,0,0,0,190,0,1, +0,127,3,184,1,72,5,129,0,12,0,47,64,16,4,32,11,17,72,7,64,11,17,72,7,12,150, +10,151,0,184,255,192,64,10,8,11,72,0,10,156,0,169,7,3,0,63,244,237,1,47,43, +237,237,50,43,49,48,43,19,53,52,62,2,55,51,14,1,21,51,21,127,10,20,30,20, +121,45,50,89,3,184,146,52,86,75,66,32,65,132,65,195,0,0,0,1,0,127,3,184,1, +72,5,129,0,12,0,52,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255,192, +180,11,17,72,6,11,184,255,192,64,10,8,11,72,11,10,156,5,169,11,3,0,63,228, +237,1,47,43,51,43,253,237,49,48,43,1,20,14,2,7,35,62,1,53,35,53,51,1,72,9, +20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,63,197,0,1,0,127,254, +250,1,72,0,195,0,12,0,51,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255, +192,180,11,17,72,6,11,184,255,192,64,9,8,11,72,11,5,169,11,156,10,0,47,253, +228,1,47,43,51,43,253,237,49,48,43,37,20,14,2,7,35,62,1,53,35,53,51,1,72, +9,20,29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,0,0,0,1,0,126, +3,184,1,71,5,129,0,12,0,47,64,16,8,32,11,17,72,5,64,11,17,72,5,1,150,2,151, +11,184,255,192,64,10,8,11,72,11,5,169,2,156,12,3,0,63,237,228,1,47,43,237, +237,50,43,49,48,43,1,21,35,20,22,23,35,46,3,61,1,1,65,88,49,45,123,20,29, +20,9,5,129,197,63,132,65,32,66,75,86,53,145,0,0,0,2,0,75,3,184,2,95,5,129, +0,12,0,25,0,89,64,58,17,32,11,17,72,4,32,11,17,72,20,64,11,17,72,20,25,150, +13,7,64,11,17,72,7,12,150,10,151,128,0,1,15,0,31,0,2,8,0,23,151,13,159,27, +175,27,2,10,23,156,13,0,0,13,169,6,20,3,0,63,51,228,50,47,16,237,50,1,93, +47,237,220,94,93,93,237,237,50,43,16,237,50,43,49,48,43,43,1,53,52,62,2,55, +51,14,1,21,51,21,33,53,52,62,2,55,51,14,1,21,51,21,1,151,10,19,29,20,122, +45,49,88,253,242,10,20,30,20,121,45,50,89,3,184,146,52,86,75,66,32,65,132, +65,195,146,52,86,75,66,32,65,132,65,195,0,0,2,0,75,3,184,2,95,5,129,0,12, +0,25,0,107,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22, +151,13,150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31, +11,2,8,11,19,184,255,192,64,24,11,17,72,19,63,24,1,24,159,27,175,27,2,10, +23,156,24,5,5,18,169,11,24,3,0,63,51,228,50,47,16,237,50,1,93,47,93,51,43, +220,94,93,93,50,43,253,237,16,253,237,49,48,43,43,1,20,14,2,7,35,62,1,53, +35,53,51,5,20,14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194, +254,181,9,20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,65,195,145, +53,86,75,66,32,65,132,65,195,0,0,0,2,0,75,254,250,2,95,0,195,0,12,0,25,0, +104,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22,151,13, +150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31,11,2, +8,11,19,184,255,192,64,21,11,17,72,19,24,159,27,175,27,2,5,5,18,169,24,11, +11,24,156,10,23,0,47,51,237,50,47,16,228,50,47,1,93,47,51,43,220,94,93,93, +50,43,253,237,16,253,237,49,48,43,43,37,20,14,2,7,35,62,1,53,35,53,51,5,20, +14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194,254,181,9,20, +29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,144,53,87,75,66,32, +65,132,65,195,0,0,0,1,0,138,255,118,3,234,5,204,0,11,0,64,64,37,11,192,0, +8,9,8,0,188,3,7,7,6,4,192,47,3,111,3,175,3,3,32,3,1,3,11,193,10,194,7,4,193, +5,194,7,0,1,0,47,63,246,237,16,244,237,1,47,93,113,237,51,51,47,16,237,50, +50,47,16,237,49,48,1,3,35,3,5,53,5,3,51,3,37,21,2,137,22,115,22,254,160,1, +96,28,215,28,1,97,3,232,251,142,4,114,27,164,29,1,120,254,136,29,164,0,0, +1,0,136,255,115,3,233,5,204,0,21,0,86,64,50,12,8,189,9,15,5,6,11,14,15,5, +9,190,19,1,189,0,20,17,0,16,3,4,16,3,32,0,1,0,19,193,18,194,15,12,193,13, +194,15,8,193,7,194,4,1,193,2,194,4,0,0,63,246,237,16,244,237,47,246,237,16, +244,237,1,47,93,23,51,47,17,51,51,16,237,50,237,23,50,47,16,237,50,49,48, +1,5,53,5,3,51,3,37,21,37,3,19,37,21,37,19,35,19,5,53,5,19,1,241,254,152,1, +104,16,175,16,1,105,254,151,26,26,1,104,254,152,16,175,16,254,151,1,105,26, +3,232,27,164,29,1,120,254,136,29,164,27,254,182,254,185,27,164,29,254,136, +1,120,29,164,27,1,71,0,0,0,0,1,0,81,1,145,2,124,3,188,0,19,0,73,185,0,17, +255,232,179,9,12,72,13,184,255,232,64,39,9,12,72,7,24,9,12,72,3,24,9,12,72, +128,0,1,15,0,63,0,2,0,191,10,1,10,143,5,1,0,5,48,5,2,5,15,15,1,15,0,47,93, +205,93,93,1,47,93,205,93,93,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52, +62,2,51,50,30,2,2,124,45,76,102,58,57,99,75,43,43,75,99,57,58,102,76,45,2, +170,58,102,77,44,44,77,102,58,57,100,74,43,43,74,100,0,0,0,3,1,22,0,0,6,234, +0,219,0,3,0,7,0,11,0,86,64,61,7,150,4,4,0,11,150,0,8,48,8,96,8,128,8,144, +8,160,8,208,8,240,8,8,0,8,48,8,64,8,96,8,144,8,192,8,208,8,240,8,8,8,8,3, +150,47,0,191,0,2,16,0,1,0,5,1,9,155,4,0,8,0,47,51,51,237,50,50,1,47,93,93, +237,47,94,93,113,237,18,57,47,237,49,48,33,53,51,21,33,53,51,21,33,53,51, +21,6,40,194,252,183,192,252,181,195,219,219,219,219,219,219,0,0,7,0,55,255, +245,7,200,5,141,0,3,0,23,0,43,0,63,0,83,0,103,0,123,3,217,64,12,118,0,134, +0,2,121,2,137,2,2,3,102,184,255,224,64,14,8,12,72,96,24,8,12,72,92,24,8,12, +72,86,184,255,224,179,8,12,72,62,184,255,232,64,14,8,12,72,56,24,8,12,72, +52,24,8,12,72,46,184,255,224,179,8,12,72,22,184,255,224,64,14,8,12,72,16, +24,8,12,72,12,24,8,12,72,6,184,255,224,64,13,8,12,72,74,180,59,181,49,0,1, +2,3,1,184,255,240,64,131,3,16,118,3,1,9,1,25,1,121,1,3,9,1,3,1,3,19,49,180, +102,64,1,38,64,182,64,198,64,214,64,4,64,64,19,114,180,99,181,89,180,105, +104,1,22,104,38,104,2,201,104,249,104,2,139,104,1,118,104,1,89,104,1,70,104, +1,41,104,1,27,104,1,233,104,1,150,104,198,104,2,121,104,1,107,104,1,86,104, +1,57,104,1,6,104,22,104,38,104,3,10,104,24,180,9,181,34,180,9,19,25,19,41, +19,73,19,89,19,121,19,137,19,153,19,8,34,19,64,45,49,72,19,184,255,192,64, +255,19,23,72,19,217,125,1,198,125,1,169,125,1,155,125,1,121,125,1,107,125, +1,93,125,1,73,125,1,59,125,1,45,125,1,9,125,25,125,2,251,125,1,237,125,1, +217,125,1,203,125,1,189,125,1,155,125,1,125,125,141,125,2,105,125,1,91,125, +1,77,125,1,54,125,1,41,125,1,11,125,27,125,2,204,233,125,249,125,2,214,125, +1,187,125,1,173,125,1,137,125,153,125,2,123,125,1,102,125,1,75,125,1,61,125, +1,9,125,1,219,125,251,125,2,205,125,1,153,125,169,125,2,107,125,139,125,2, +93,125,1,57,125,1,43,125,1,29,125,1,9,125,1,237,125,253,125,2,185,125,201, +125,217,125,3,123,125,171,125,2,89,125,1,11,125,59,125,75,125,3,155,249,125, +1,235,125,1,214,125,1,187,125,1,153,125,1,123,125,139,125,2,102,125,1,59, +125,75,125,2,9,125,25,125,2,246,125,1,217,125,1,205,125,1,169,125,185,125, +2,155,125,1,105,125,121,125,2,93,125,1,57,125,73,125,2,43,125,1,22,125,1, +249,125,1,237,125,1,201,125,64,249,1,187,125,1,153,125,1,123,125,1,102,125, +1,73,125,1,54,125,1,9,125,25,125,2,105,249,125,1,235,125,1,221,125,1,169, +125,1,150,125,1,121,125,1,107,125,1,73,125,1,59,125,1,25,125,1,11,125,1,253, +125,1,217,125,1,203,125,1,169,125,1,155,125,1,141,125,1,121,125,1,91,125, +107,125,2,57,125,1,27,125,43,125,2,249,125,1,235,125,1,169,125,201,125,2, +150,125,1,121,125,1,107,125,1,57,125,1,38,125,1,9,125,1,56,249,125,1,230, +125,1,201,125,1,182,125,1,153,125,1,139,125,1,89,125,1,70,125,1,41,125,1, +27,125,1,249,125,1,235,125,1,201,125,1,187,125,1,173,125,1,1,148,125,1,123, +125,1,100,125,1,75,125,1,63,125,1,27,125,1,15,125,1,228,125,1,203,125,1,176, +125,1,2,160,125,1,143,125,1,112,125,1,95,125,1,64,125,1,31,125,1,0,125,1, +8,109,182,84,183,119,182,94,19,69,182,44,183,79,182,54,19,39,182,14,183,29, +182,4,4,2,3,0,18,0,63,63,63,237,244,237,63,237,244,237,63,237,244,237,1,94, +93,93,93,93,93,93,93,95,93,93,93,113,113,113,113,113,113,113,95,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113, +113,113,113,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,113,113, +113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,47,43,43,94,93,237,244,237,47,94,93,93,93,93,93,93,93,113,113,113,113, +113,113,113,114,114,253,244,237,18,57,47,93,113,237,17,57,57,47,47,94,93, +93,56,56,17,51,17,51,16,244,237,49,48,0,43,43,43,43,43,43,43,43,43,43,43, +43,1,95,93,93,33,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2,53,52,62,2,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2,35,34,46,2,53, +52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2, +35,34,46,2,53,52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,48,155, +3,154,157,252,152,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19, +37,55,35,38,58,39,19,20,39,56,37,34,54,39,21,2,30,60,107,80,46,46,81,108, +62,63,108,80,46,46,81,110,210,19,37,55,35,38,58,39,19,20,39,56,37,34,54,39, +21,1,253,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19,37,55,35, +38,58,39,19,20,39,56,37,34,54,39,21,5,129,12,33,83,139,106,102,140,86,38, +37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71,97,59,26,26, +59,97,254,239,33,83,139,106,102,140,86,38,37,86,140,103,106,139,83,33,254, +151,73,98,58,24,24,59,97,73,71,97,59,26,26,59,97,1,176,33,83,139,106,102, +140,86,38,37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71, +97,59,26,26,59,97,0,0,0,0,1,0,85,3,122,1,89,5,129,0,3,0,40,64,25,3,16,10, +13,72,1,16,10,13,72,1,150,31,2,47,2,2,2,48,0,1,0,0,1,3,0,63,205,1,47,93,221, +93,237,49,48,43,43,27,1,51,3,85,64,196,158,3,122,2,7,253,249,255,255,0,85, +3,122,2,175,5,129,16,38,2,14,0,0,17,7,2,14,1,86,0,0,0,9,180,1,96,4,1,4,17, +93,53,0,0,1,0,88,0,141,2,81,3,172,0,8,0,72,64,55,106,3,122,3,138,3,3,106, +0,122,0,138,0,3,7,236,6,235,5,236,31,1,79,1,95,1,127,1,143,1,5,48,1,64,1, +96,1,112,1,160,1,5,1,0,239,15,3,47,3,111,3,127,3,4,3,0,47,93,228,1,47,93, +113,237,237,237,49,48,93,93,37,1,53,1,51,21,9,1,21,1,168,254,176,1,80,167, +254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,0,0,0,1,0,89,0,141, +2,82,3,172,0,8,0,66,64,48,101,6,117,6,133,6,3,101,0,117,0,133,0,3,4,236,1, +236,8,235,112,3,128,3,176,3,3,208,3,1,111,3,127,3,2,3,0,239,15,6,47,6,111, +6,127,6,4,6,0,47,93,228,1,47,93,93,113,253,237,237,49,48,93,93,37,35,53,9, +1,53,51,1,21,1,1,168,1,82,254,176,166,1,81,141,29,1,111,1,116,31,254,141, +63,0,0,0,255,255,0,185,0,0,3,71,5,129,16,38,0,4,0,0,17,7,0,4,1,200,0,0,0, +22,64,12,3,2,47,8,1,8,1,0,47,0,1,0,17,93,53,53,17,93,53,53,0,1,255,192,5, +223,2,235,6,84,0,3,0,13,179,1,0,2,1,0,47,205,1,47,47,49,48,1,33,53,33,2,235, +252,213,3,43,5,223,117,0,1,254,96,0,0,2,98,5,129,0,3,0,45,182,3,16,111,3, +1,3,1,184,255,240,64,18,239,1,1,1,64,13,18,72,1,64,8,11,72,1,2,3,0,18,0,63, +63,1,47,43,43,93,56,47,93,56,49,48,33,35,1,51,254,244,148,3,113,145,5,129, +0,0,1,0,101,2,7,2,131,4,157,0,33,0,111,185,0,30,255,216,64,30,9,17,72,23, +10,224,36,11,1,11,33,224,36,0,212,0,228,0,3,0,23,6,228,11,139,0,251,0,2,0, +184,255,192,64,38,10,13,72,4,0,1,0,29,17,17,75,29,91,29,2,29,64,21,25,72, +29,64,16,19,72,47,29,63,29,2,27,29,1,15,29,1,2,29,0,47,95,93,93,93,43,43, +93,51,47,16,204,93,43,93,50,237,50,1,47,93,237,47,93,237,50,49,48,0,43,1, +17,52,46,2,35,34,6,21,17,35,17,52,46,2,53,51,20,30,2,21,51,62,3,51,50,22, +21,17,2,2,13,29,47,35,72,85,128,1,1,2,119,2,2,2,2,15,38,49,64,42,110,97,2, +7,1,142,46,61,37,16,100,94,254,148,1,255,20,46,40,29,4,3,27,34,35,12,28,46, +32,17,108,121,254,79,0,0,0,1,0,4,0,0,4,46,5,129,0,17,0,106,64,69,7,3,7,3, +10,0,16,32,16,2,16,16,48,16,80,16,112,16,144,16,224,16,6,16,5,1,9,92,14,12, +10,8,12,81,5,31,13,1,0,13,1,13,4,95,15,1,31,1,63,1,79,1,4,63,1,1,15,1,1,8, +1,1,9,0,95,15,3,9,18,0,63,63,237,18,57,47,94,93,93,113,237,220,93,113,50, +237,50,1,47,51,51,237,50,50,47,93,113,18,57,57,47,47,49,48,1,17,33,21,33, +21,33,21,33,17,35,17,35,53,51,17,33,21,1,103,2,175,253,81,1,146,254,110,180, +175,175,3,123,4,230,254,36,157,213,129,254,233,1,23,129,3,233,155,0,1,0,58, +0,0,4,80,5,150,0,58,0,221,64,81,133,58,149,58,2,21,22,37,22,53,22,3,40,44, +0,48,17,13,6,30,111,29,29,0,52,110,6,43,39,48,110,18,14,10,10,0,79,6,95,6, +111,6,3,6,58,111,0,0,32,0,2,0,0,32,0,48,0,80,0,112,0,144,0,176,0,208,0,8, +0,0,16,0,48,0,192,0,224,0,5,8,0,184,255,192,64,70,14,18,72,0,42,16,81,17, +46,12,81,43,175,13,1,13,64,42,45,72,0,13,16,13,32,13,3,13,39,111,17,1,47, +17,95,17,111,17,143,17,159,17,223,17,239,17,7,17,17,52,35,115,41,30,1,30, +24,7,7,52,116,37,58,1,23,58,1,58,6,24,0,63,51,93,93,237,50,63,51,93,237,18, +57,47,93,113,51,222,93,43,93,50,237,50,16,237,50,1,47,43,94,93,113,114,237, +47,93,18,57,47,51,51,237,50,50,16,237,17,57,47,237,17,51,51,17,18,57,57,49, +48,0,93,93,1,14,3,35,33,53,62,1,61,1,35,53,51,53,35,53,51,53,52,62,2,51,50, +30,2,23,7,46,3,35,34,6,29,1,33,21,33,21,33,21,33,21,20,14,2,7,33,50,62,2, +55,4,80,9,57,89,115,67,253,70,89,86,186,186,186,186,48,99,152,103,70,123, +99,71,18,174,10,39,53,65,36,114,112,1,152,254,104,1,152,254,104,22,44,63, +40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160,121,25,129,140,129,130, +92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,138,129,140,129,7,56,106, +92,71,21,19,42,67,48,0,0,0,0,4,0,158,255,236,8,103,5,129,0,14,0,23,0,47,0, +98,1,193,64,71,134,2,1,117,91,133,91,2,91,73,107,73,139,73,3,143,68,1,109, +68,1,91,68,1,105,82,1,105,80,1,125,22,1,91,22,107,22,2,125,17,141,17,2,91, +17,107,17,2,84,57,100,57,2,54,57,70,57,2,37,97,53,97,69,97,3,76,32,9,14,72, +49,184,255,224,64,94,9,14,72,29,32,12,17,72,13,29,29,29,45,29,3,82,73,81, +81,48,72,65,0,70,15,24,39,75,37,41,72,30,34,32,30,57,73,15,56,1,102,56,1, +56,56,89,72,75,95,15,1,63,75,95,75,239,75,3,75,64,27,39,72,239,30,1,31,30, +95,30,127,30,3,15,30,75,75,30,15,3,8,64,65,80,65,96,65,3,127,65,143,65,2, +65,184,255,192,64,16,7,12,72,65,20,7,70,0,8,16,8,32,8,3,8,100,184,255,192, +179,91,95,72,100,184,255,192,179,80,88,72,100,184,255,192,179,70,74,72,100, +184,255,192,179,59,62,72,100,184,255,192,179,48,53,72,100,184,255,192,64, +11,27,31,72,79,100,95,100,111,100,3,100,184,255,192,179,7,10,72,89,184,255, +248,64,71,19,22,72,65,8,19,22,72,89,65,78,60,80,57,51,22,44,80,27,22,6,95, +20,87,80,121,82,1,72,82,88,82,104,82,3,82,78,40,32,80,33,78,37,33,35,35,33, +127,33,143,33,2,175,20,1,20,64,9,17,72,20,33,20,33,8,19,95,9,3,8,18,0,63, +63,237,18,57,57,47,47,43,93,93,17,51,47,17,51,51,16,237,50,47,51,93,93,237, +16,237,63,237,63,51,237,18,57,57,43,43,1,43,93,43,43,43,43,43,43,47,93,237, +50,47,43,93,113,18,23,57,47,47,47,93,113,43,93,93,16,237,51,47,93,113,237, +17,51,51,16,237,50,17,57,57,16,237,16,237,50,47,237,49,48,93,43,43,43,93, +0,93,93,1,93,93,93,93,0,93,93,93,93,93,1,93,0,93,1,93,1,20,14,2,43,1,17,35, +17,33,50,30,2,7,52,38,43,1,17,51,50,54,1,14,1,35,34,38,53,17,35,53,51,55, +51,21,51,21,35,17,20,22,51,50,54,55,37,20,6,35,34,46,2,39,55,30,1,51,50,62, +2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,21,20,30,2,23,30,3, +3,186,61,121,182,121,130,181,1,43,125,186,124,62,182,164,164,105,113,165, +155,2,123,35,74,48,105,93,104,111,53,110,157,157,41,55,23,40,26,2,232,183, +170,75,121,92,61,15,159,17,99,88,40,68,49,27,34,62,87,52,49,96,77,47,168, +161,141,165,22,161,6,31,45,54,30,155,32,57,80,48,48,100,82,52,3,217,92,159, +117,68,253,219,5,129,61,111,157,97,134,139,253,212,146,252,186,11,13,123, +122,1,197,131,242,242,131,254,98,78,73,8,6,98,120,129,24,54,88,64,26,61,58, +10,25,40,30,30,41,29,23,13,12,32,53,79,59,112,119,105,116,17,28,38,24,10, +85,25,36,28,22,11,11,31,54,87,0,1,0,16,255,236,4,86,5,150,0,61,0,232,185, +0,2,255,235,64,68,15,73,106,38,1,58,43,74,43,122,43,138,43,4,36,59,52,59, +68,59,116,59,132,59,5,46,55,55,4,57,45,51,110,20,24,15,14,26,15,3,20,37,110, +36,36,3,110,64,4,96,4,128,4,160,4,176,4,5,0,4,144,4,176,4,208,4,4,4,184,255, +192,64,94,24,27,72,4,48,24,81,25,57,15,81,54,15,16,31,16,127,16,143,16,159, +16,5,16,64,39,47,72,0,16,16,16,128,16,3,16,45,47,25,63,25,127,25,3,47,25, +63,25,175,25,207,25,4,47,25,175,25,2,25,25,0,40,115,216,37,1,124,37,140,37, +2,26,37,42,37,2,37,31,7,0,115,115,3,131,3,2,21,3,37,3,2,3,9,25,0,63,51,93, +93,237,63,51,93,93,93,237,18,57,47,93,113,114,51,220,93,43,113,50,237,50, +16,237,50,1,47,43,93,113,237,51,47,237,47,23,51,47,196,16,237,50,50,17,57, +47,196,49,48,0,93,93,93,43,37,50,54,55,23,14,3,35,34,46,2,39,35,55,51,46, +1,53,52,54,55,35,55,51,62,3,51,50,30,2,23,7,46,1,35,34,14,2,7,33,7,33,14, +1,21,20,22,23,33,7,33,30,3,2,179,100,120,14,185,13,63,103,147,97,120,177, +121,69,13,171,40,120,1,2,2,1,160,40,129,15,73,123,173,115,97,147,103,63,13, +185,14,121,106,68,106,79,50,11,1,190,40,254,99,2,1,2,2,1,196,40,254,108,9, +42,77,114,126,100,91,14,68,118,87,50,77,139,192,114,129,8,46,24,27,53,6,127, +122,189,130,67,50,87,118,68,14,91,100,39,87,137,99,127,16,47,23,22,37,19, +129,81,138,100,57,0,0,0,0,4,0,69,255,244,6,208,5,140,0,19,0,23,0,43,0,79, +0,192,64,14,118,20,134,20,2,121,22,137,22,2,133,47,1,66,184,255,232,64,9, +8,11,72,60,24,8,11,72,17,184,255,232,179,8,11,72,13,184,255,232,64,29,8,11, +72,7,24,8,11,72,3,24,8,11,72,22,23,20,21,74,180,73,73,52,180,53,178,63,23, +16,21,184,255,240,64,62,21,23,21,23,0,44,180,63,64,10,14,72,63,34,180,10, +178,0,180,0,24,16,24,32,24,80,24,96,24,208,24,224,24,240,24,8,24,38,52,1, +52,49,182,58,184,77,182,74,68,4,23,3,20,18,29,182,15,184,39,182,5,19,0,63, +237,244,237,63,63,63,51,237,244,237,51,93,1,47,93,253,244,237,47,43,237,18, +57,57,47,47,56,56,16,244,237,51,47,237,17,51,17,51,49,48,0,43,43,43,43,43, +43,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,20,30,2,51,50,54,55,23,14,3,35,34, +46,2,53,52,62,2,51,50,30,2,23,7,46,1,35,34,6,6,208,51,87,116,66,66,115,85, +49,48,86,117,68,66,115,85,50,251,59,155,3,154,157,149,22,43,63,40,42,64,44, +22,23,43,63,41,39,63,44,24,250,155,20,47,75,54,69,94,11,141,6,45,77,111,72, +94,132,82,38,59,97,124,65,68,106,76,48,9,143,10,83,75,108,87,1,178,125,171, +105,45,45,104,171,126,133,174,103,41,41,103,174,253,201,5,129,252,49,99,131, +78,32,33,78,131,98,95,128,79,34,34,79,128,2,124,75,124,90,50,82,87,9,54,99, +76,45,69,121,164,96,130,173,103,42,40,70,94,55,11,72,85,164,0,2,0,19,255, +236,2,126,5,149,0,39,0,55,0,185,64,9,138,32,1,53,40,14,17,72,26,184,255,232, +179,8,16,72,22,184,255,232,64,67,8,16,72,8,32,8,16,72,6,32,11,16,72,5,27, +21,27,2,5,21,21,21,2,3,4,4,29,16,40,32,40,2,96,40,112,40,128,40,192,40,4, +15,40,1,40,40,4,51,20,51,2,8,51,159,35,1,35,18,14,192,10,208,10,224,10,3, +10,184,255,192,179,34,38,72,10,184,255,192,64,26,7,11,72,10,79,57,1,18,51, +45,15,11,34,24,14,14,7,45,24,3,3,7,24,7,0,7,0,47,205,63,18,57,47,16,205,17, +57,47,18,57,57,205,17,57,57,1,93,47,43,43,93,198,51,205,93,50,0,94,93,1,51, +47,93,93,113,205,50,47,51,49,48,0,93,93,43,43,43,43,1,43,93,37,50,54,55,51, +14,1,35,34,38,61,1,14,1,7,53,62,1,55,17,52,62,2,51,50,30,2,21,20,14,2,7,21, +20,30,2,19,52,46,2,35,34,14,2,21,17,62,3,1,177,51,68,17,69,20,120,109,111, +127,32,66,34,35,66,31,25,59,98,72,52,79,53,27,44,79,110,66,19,32,42,115,14, +27,40,26,32,39,22,8,49,77,54,28,78,104,109,154,157,159,155,175,17,28,13,73, +14,29,16,2,75,59,108,83,49,42,78,111,69,99,180,152,118,38,244,57,83,54,26, +4,20,52,85,61,33,36,61,81,46,254,5,33,104,131,151,0,0,0,0,4,0,188,0,0,8,46, +5,129,0,19,0,35,0,55,0,59,0,244,64,124,141,0,1,0,24,13,16,72,61,0,1,25,0, +1,132,10,1,114,10,1,69,10,85,10,101,10,3,22,10,38,10,2,5,33,21,33,37,33,3, +4,29,20,29,2,11,24,27,24,2,11,22,27,22,2,47,61,1,58,20,73,36,19,73,16,0,16, +57,46,73,26,144,16,160,16,192,16,3,31,26,1,16,26,16,26,8,144,36,160,36,176, +36,3,47,36,1,0,36,1,36,10,1,7,73,48,8,64,8,80,8,3,0,8,16,8,32,8,144,8,4,8, +41,31,15,1,184,255,192,179,29,36,72,1,184,255,192,64,15,18,21,72,1,17,9,3, +51,23,192,57,208,57,2,57,184,255,192,64,21,35,44,72,57,56,11,64,29,36,72, +11,64,18,21,72,0,11,56,3,8,18,0,63,23,51,43,43,47,221,43,93,222,205,63,51, +51,43,43,63,205,1,47,93,113,237,50,50,47,93,93,93,18,57,57,47,47,93,93,16, +237,51,17,51,16,237,16,237,50,93,49,48,0,93,93,93,93,1,93,93,93,93,93,93, +43,93,33,1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,1,20,6,35,34, +38,53,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,53, +33,21,4,38,253,48,1,2,1,2,160,202,2,216,2,2,2,2,162,3,54,176,175,168,177, +43,87,131,88,93,131,84,39,159,24,47,69,45,46,71,48,25,26,48,67,41,46,72,50, +25,254,16,2,123,4,166,44,44,38,89,39,252,88,5,129,251,82,40,46,39,98,51,3, +156,250,127,2,178,188,203,201,190,91,145,101,53,53,100,145,92,81,107,64,26, +27,64,107,80,82,108,63,26,26,63,108,253,160,146,146,0,0,0,0,2,0,188,2,122, +7,25,5,129,0,39,0,47,0,148,64,9,9,24,19,23,72,136,9,1,8,184,255,232,64,16, +19,23,72,89,8,105,8,121,8,3,37,24,13,17,72,24,184,255,240,64,73,12,17,72, +44,41,196,42,24,21,196,64,22,224,22,2,22,22,0,64,47,1,47,0,42,16,42,64,42, +80,42,4,42,39,196,37,111,0,175,0,207,0,223,0,239,0,5,0,40,44,202,0,9,22,29, +4,0,42,32,42,80,42,128,42,4,42,2,15,23,37,15,3,45,3,0,63,23,51,17,51,204, +93,23,50,237,50,1,47,93,51,237,47,93,204,93,18,57,47,93,237,50,16,253,204, +49,48,43,43,93,43,93,43,1,17,53,6,7,14,1,7,3,35,3,46,1,39,38,39,6,21,6,20, +21,17,35,17,51,19,30,1,31,1,54,55,62,3,53,19,51,17,1,17,35,17,35,53,33,21, +6,155,5,4,4,5,2,230,108,163,2,24,14,17,20,1,1,128,190,223,2,5,2,6,20,16,7, +13,11,7,168,184,251,40,134,255,2,138,2,122,1,169,194,11,11,9,18,5,253,203, +1,157,5,64,38,44,55,10,10,8,18,6,253,201,3,7,253,205,4,13,7,18,51,41,18,34, +28,18,2,1,157,252,249,2,152,253,104,2,152,111,111,0,0,0,0,1,0,108,0,0,5,184, +5,150,0,57,0,221,64,95,101,36,1,101,22,1,157,49,1,143,49,1,49,16,11,15,72, +157,9,1,143,9,1,9,16,11,15,72,116,3,132,3,2,54,3,1,54,2,118,2,2,54,56,118, +56,2,116,55,132,55,2,54,55,1,42,26,1,42,32,1,41,53,48,40,10,18,32,40,96,40, +112,40,144,40,4,47,18,111,18,127,18,159,18,4,40,18,40,18,24,34,91,16,53,1, +53,184,255,192,64,65,23,29,72,191,53,207,53,2,0,53,48,53,2,53,17,5,91,31, +24,63,24,79,24,143,24,191,24,207,24,223,24,7,111,24,127,24,159,24,239,24, +255,24,5,0,24,48,24,2,8,24,10,15,19,39,48,5,42,95,18,41,18,29,95,0,4,0,63, +237,63,51,237,23,50,1,47,94,93,93,113,253,196,47,93,93,43,114,237,17,57,57, +47,47,93,93,17,51,17,51,16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43, +93,93,93,93,1,50,30,2,21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46, +2,35,34,14,2,21,20,30,2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,3,18, +151,241,168,90,59,109,157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116, +169,108,109,170,116,61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109, +59,90,168,241,5,150,86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51, +126,143,159,85,116,181,124,65,65,124,181,116,85,159,143,126,51,224,156,4, +2,3,2,54,138,167,191,106,147,234,162,86,0,0,0,2,0,88,255,222,4,124,4,72,0, +32,0,45,0,82,64,50,90,13,1,28,15,64,160,33,176,33,2,95,33,1,80,33,96,33,112, +33,3,33,47,128,32,47,1,45,208,17,1,17,5,16,45,45,22,39,10,16,22,21,27,1,6, +27,1,27,0,22,0,63,50,93,93,205,63,205,18,57,47,205,1,47,205,93,50,93,26,16, +220,93,113,113,26,205,50,49,48,93,5,34,46,2,53,52,62,2,51,50,30,2,21,33,17, +30,3,51,50,62,2,55,23,14,3,19,17,46,3,35,34,14,2,7,17,2,107,130,198,134,69, +95,152,189,95,112,194,142,81,252,197,22,64,78,88,46,75,116,93,76,35,72,36, +84,109,143,203,19,59,77,92,53,51,87,74,60,24,34,93,157,204,111,147,213,139, +66,79,146,210,130,254,156,24,45,35,20,31,60,87,56,42,57,100,76,44,2,138,1, +21,20,42,34,22,19,32,42,24,254,234,0,0,0,255,255,0,80,255,246,6,78,5,129, +16,38,0,121,0,0,16,39,2,20,2,249,0,0,17,7,2,144,3,204,253,206,0,63,64,40, +4,3,2,111,15,1,47,15,1,15,1,191,12,1,128,12,1,112,12,1,96,12,1,64,12,1,16, +12,1,12,98,64,11,11,72,4,3,2,60,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93, +53,17,93,93,53,53,53,0,0,0,255,255,0,61,255,246,6,78,5,141,16,39,2,20,2,249, +0,0,16,39,2,144,3,204,253,206,17,6,0,115,34,0,0,63,64,40,1,3,2,111,49,1,47, +49,1,49,0,191,1,1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,141,64,11,11,72, +1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53, +0,0,0,255,255,0,93,255,246,6,78,5,129,16,39,2,20,2,249,0,0,16,39,2,144,3, +204,253,206,17,6,2,142,40,0,0,63,64,40,1,3,2,111,49,1,47,49,1,49,0,191,1, +1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,126,64,11,11,72,1,3,2,49,24,0,63, +53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53,0,0,0,255,255,0,145, +255,246,6,78,5,129,16,39,2,20,2,189,0,0,16,39,2,144,3,204,253,206,17,6,2, +143,102,0,0,47,64,28,1,3,2,111,49,1,47,49,1,49,0,191,1,1,128,1,1,1,102,64, +11,11,72,1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,53,17,93,93,53,53,53,0,0, +0,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3,128,16,7,17,16,0,47, +205,1,47,205,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51,14, +1,7,33,21,2,129,29,59,31,72,58,130,82,82,130,58,72,31,59,29,3,221,1,41,34, +98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1,16,255,195,2,240,4,127, +0,17,0,26,64,10,15,64,0,0,15,12,3,17,128,7,0,47,26,205,204,50,57,57,1,47, +26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,35,1,213,34,98, +65,68,112,42,36,42,112,68,65,98,34,86,3,160,29,59,31,72,58,130,82,82,130, +58,72,31,59,29,252,35,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3, +128,7,17,16,17,0,47,205,1,47,221,26,204,50,57,57,49,48,1,46,1,39,51,30,1, +23,21,14,1,7,35,62,1,55,33,53,5,127,29,59,31,72,58,130,82,82,130,58,72,31, +59,29,252,35,1,127,34,98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1, +16,255,195,2,240,4,127,0,17,0,26,64,10,17,64,16,15,0,3,12,128,8,16,0,47,221, +26,204,50,57,57,1,47,26,205,49,48,37,62,1,55,21,14,1,7,35,46,1,39,53,30,1, +23,17,51,2,43,34,98,65,68,112,42,36,42,112,68,65,98,34,86,162,29,59,31,72, +58,130,82,82,130,58,72,31,59,29,3,221,0,0,1,1,162,0,100,6,94,2,68,0,31,0, +36,64,15,16,31,28,19,128,23,64,15,0,3,12,128,8,0,15,0,47,205,1,47,26,204, +50,57,57,26,221,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51, +14,1,7,33,46,1,39,51,30,1,23,21,14,1,7,35,62,1,55,2,129,29,59,31,72,58,130, +82,82,130,58,72,31,59,29,2,254,29,59,31,72,58,130,82,82,130,58,72,31,59,29, +1,41,34,98,65,68,112,42,36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112, +68,65,98,34,0,0,0,1,1,16,255,195,2,240,4,127,0,31,0,38,64,16,15,64,0,31,16, +19,28,128,24,64,0,15,12,3,128,7,0,47,26,204,50,57,57,26,221,26,204,50,57, +57,1,47,26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,213,34,98,65,68,112,42,36,42,112,68,65, +98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,3,160,29,59,31,72,58,130,82, +82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82,130,58,72,31,59,29,0, +2,1,16,255,72,2,240,4,127,0,3,0,35,0,40,64,17,1,19,0,4,35,20,23,32,28,3,0, +28,4,19,16,7,11,0,47,204,50,57,57,221,222,205,16,204,50,57,57,1,47,51,205, +50,49,48,5,33,21,33,19,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,16,1,224,254,32,197,34,98,65,68,112,42, +36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,104,80,4,88, +29,59,31,72,58,130,82,82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82, +130,58,72,31,59,29,0,0,2,0,56,255,229,3,186,5,197,0,47,0,69,0,222,64,93,156, +19,172,19,2,154,6,170,6,2,122,33,138,33,2,68,24,14,17,72,85,20,101,20,149, +20,165,20,4,140,7,1,74,7,90,7,122,7,3,74,56,90,56,2,67,56,11,15,72,58,67, +1,42,12,58,12,74,12,3,37,45,53,45,149,45,165,45,4,32,39,48,39,2,39,39,15, +169,48,249,48,2,40,48,1,48,28,0,70,64,96,31,1,31,184,255,192,64,64,18,21, +72,15,31,1,31,64,12,17,72,31,71,128,60,71,63,15,1,15,64,12,17,72,15,79,71, +1,39,34,80,43,53,81,27,0,22,64,22,128,22,192,22,4,7,22,22,47,43,111,43,223, +43,3,15,43,191,43,2,43,65,80,10,22,0,63,237,47,93,113,57,47,94,93,51,237, +16,237,50,1,93,47,43,93,237,26,16,220,43,93,43,113,26,237,51,51,113,113,18, +57,47,93,49,48,0,93,1,93,93,43,0,93,1,93,93,0,93,1,43,93,93,93,1,20,14,2, +7,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,51,62,1,53,52,38,35,34,14,2,7, +55,62,1,51,50,30,2,3,46,3,35,34,14,4,21,20,30,2,51,50,62,2,3,186,7,13,18, +11,31,96,130,162,97,93,127,78,35,22,47,73,102,132,83,42,77,64,50,16,4,1,3, +130,129,28,59,58,55,22,36,42,116,67,113,154,94,41,211,8,36,51,64,36,53,86, +67,49,32,15,21,42,65,44,66,108,83,56,3,170,46,104,106,106,48,128,206,144, +77,63,107,138,75,60,143,144,134,104,63,26,48,67,42,25,58,34,196,209,11,19, +28,17,147,23,39,88,149,195,254,147,42,74,55,32,51,84,110,116,116,48,53,91, +67,38,99,161,205,0,0,0,2,0,4,0,0,4,225,5,129,0,5,0,18,0,244,64,27,74,7,90, +7,106,7,3,69,17,85,17,101,17,3,3,56,8,1,55,16,1,6,24,14,17,72,18,184,255, +232,64,157,14,17,72,102,2,1,39,2,71,2,87,2,3,105,1,1,40,1,72,1,88,1,3,2,1, +12,12,0,6,59,3,1,20,3,1,244,3,1,107,3,155,3,187,3,235,3,4,52,3,84,3,2,0,3, +1,11,2,3,18,15,0,31,0,47,0,3,18,0,15,20,47,20,127,20,3,175,20,191,20,223, +20,255,20,4,32,20,112,20,144,20,3,15,20,63,20,143,20,3,58,175,20,207,20,223, +20,255,20,4,64,20,96,20,144,20,3,15,20,95,20,2,143,20,159,20,191,20,223,20, +4,0,20,32,20,80,20,112,20,4,0,3,6,3,18,95,5,18,12,32,19,22,72,153,12,1,12, +1,3,0,63,51,93,43,63,237,23,50,1,93,93,113,114,114,94,93,113,113,114,47,94, +93,51,47,95,94,93,93,93,93,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93, +43,43,93,93,95,93,93,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,5,2,5,217,1,254, +251,35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12, +141,156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,0,1,0,235,254,78,5,172,5, +129,0,7,0,54,64,36,3,90,79,4,175,4,191,4,207,4,4,4,7,90,32,0,1,15,0,1,0,0, +32,0,192,0,208,0,4,0,2,95,5,3,4,0,0,47,50,63,237,1,47,93,113,113,237,47,93, +237,49,48,1,17,33,17,35,17,33,17,4,244,252,182,191,4,193,254,78,6,145,249, +111,7,51,248,205,0,0,0,0,1,0,154,254,78,5,48,5,129,0,11,0,170,64,9,134,8, +150,8,2,163,9,1,9,184,255,192,64,26,13,16,72,163,7,1,2,144,7,1,114,7,130, +7,2,100,7,1,53,7,69,7,85,7,3,3,184,255,240,64,74,9,17,72,41,1,57,1,2,1,16, +12,17,72,8,143,6,159,6,175,6,3,2,72,17,73,15,2,127,2,2,2,6,2,6,0,207,10,1, +0,10,64,10,2,10,7,3,9,3,9,207,0,1,0,0,64,0,2,7,0,32,13,1,3,7,95,2,8,0,4,3, +1,9,95,0,0,47,237,57,63,18,57,57,237,57,1,93,47,94,93,93,51,51,47,47,51,47, +93,93,18,57,57,47,47,93,43,93,51,49,48,0,43,93,43,1,93,93,93,93,95,93,43, +93,93,19,53,9,1,53,33,21,33,9,1,33,21,154,2,123,253,149,4,66,252,178,2,72, +253,168,3,162,254,78,109,3,48,3,44,106,152,253,4,252,249,152,0,0,0,0,1,0, +101,2,96,4,72,2,242,0,3,0,32,64,20,0,2,32,2,80,2,112,2,4,2,16,0,32,0,2,0, +0,173,1,179,0,63,237,1,47,93,47,93,49,48,19,53,33,21,101,3,227,2,96,146,146, +0,0,0,0,1,0,51,255,242,4,98,6,84,0,8,0,185,185,0,0,255,232,64,135,14,17,72, +9,1,57,1,73,1,3,9,1,0,4,6,1,6,6,8,16,111,8,143,8,175,8,207,8,239,8,5,15,8, +47,8,79,8,111,8,143,8,5,8,95,2,1,2,2,15,3,47,3,79,3,111,3,4,11,3,175,10,1, +48,10,80,10,112,10,144,10,4,111,10,143,10,2,16,10,48,10,2,240,10,1,15,10, +47,10,79,10,3,57,239,10,1,176,10,208,10,2,143,10,175,10,207,10,239,10,4,112, +10,1,47,10,79,10,111,10,143,10,175,10,5,2,175,31,5,1,5,5,1,7,179,6,1,0,47, +51,63,18,57,47,93,237,1,93,113,113,114,114,94,93,93,113,113,114,114,47,94, +93,51,47,93,47,93,113,56,57,61,47,93,51,51,49,48,94,93,43,5,35,1,35,53,33, +19,1,51,2,110,106,254,229,182,1,14,242,1,174,129,14,3,24,117,253,78,5,135, +0,3,0,87,0,203,5,93,3,215,0,35,0,51,0,67,0,114,64,75,137,50,1,53,67,69,67, +2,10,15,1,10,3,1,5,33,1,5,21,1,39,26,8,52,4,18,0,0,47,32,47,64,47,112,47, +4,47,60,18,36,224,55,1,55,23,42,239,65,1,65,8,39,52,26,4,5,63,13,1,13,64, +18,21,72,0,13,80,13,2,13,31,15,23,1,23,0,47,93,51,220,93,43,113,50,23,57, +205,93,50,16,205,93,50,1,47,205,47,93,205,17,23,57,49,48,0,93,93,93,93,93, +1,93,1,20,14,2,35,34,38,39,14,3,35,34,46,2,53,52,62,2,51,50,22,23,62,3,51, +50,30,2,37,34,6,7,30,1,51,50,62,2,53,52,46,2,5,46,1,35,34,14,2,21,20,30,2, +51,50,54,5,93,44,82,115,70,97,168,70,32,75,84,90,46,69,115,83,46,44,82,116, +71,94,168,67,31,75,84,94,51,69,114,81,45,254,179,70,119,56,51,119,77,43,71, +51,27,29,51,71,254,93,51,119,78,43,70,49,27,25,48,71,47,70,120,2,78,78,141, +106,62,133,149,63,102,72,39,55,100,143,89,81,142,104,60,135,148,62,102,73, +40,55,101,143,168,126,130,128,128,40,70,94,54,54,92,69,39,250,128,128,40, +70,94,54,51,93,69,41,126,0,0,0,1,1,152,0,0,6,96,4,199,0,5,0,13,179,2,5,2, +5,0,47,205,1,47,205,49,48,1,51,17,33,21,33,1,152,94,4,106,251,56,4,199,251, +151,94,0,0,0,0,1,1,22,255,254,4,170,4,8,0,25,0,35,64,18,75,22,91,22,2,75, +16,91,16,2,25,0,12,13,13,0,19,6,0,47,205,47,51,1,47,205,47,205,49,48,0,93, +93,5,17,52,62,2,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21,17,1,22,68,122, +167,98,99,169,123,70,103,53,95,130,78,78,130,94,52,2,2,0,116,192,138,76,76, +138,192,116,254,0,2,2,98,155,108,57,56,108,156,100,254,0,0,0,1,255,158,254, +78,2,148,5,227,0,35,2,3,64,30,10,34,26,34,42,34,3,5,16,21,16,37,16,3,9,3, +218,37,1,201,37,1,154,37,170,37,186,37,3,37,184,1,0,64,162,225,228,72,76, +37,1,0,47,37,63,37,2,9,37,1,220,37,64,211,217,72,37,64,205,209,72,134,37, +1,25,37,41,37,57,37,3,11,37,1,251,37,1,233,37,1,37,64,188,191,72,107,37,123, +37,139,37,3,93,37,1,75,37,1,41,37,57,37,2,27,37,1,9,37,1,249,37,1,37,128, +170,177,72,109,37,1,37,128,164,168,72,9,37,1,163,37,128,156,162,72,189,37, +1,121,37,153,37,169,37,3,75,37,91,37,107,37,3,37,192,140,147,72,155,37,171, +37,187,37,3,125,37,141,37,2,107,37,1,93,37,1,38,37,54,37,70,37,3,228,37,1, +214,37,1,180,37,196,37,2,6,37,1,112,37,184,255,192,64,110,119,122,72,37,64, +101,107,72,219,37,1,118,37,166,37,2,9,37,25,37,41,37,3,233,37,1,37,64,79, +82,72,37,128,74,78,72,25,37,41,37,2,11,37,1,251,37,1,217,37,233,37,2,171, +37,187,37,203,37,3,153,37,1,37,128,60,63,72,41,37,57,37,73,37,3,11,37,27, +37,2,55,233,37,249,37,2,187,37,203,37,219,37,3,141,37,157,37,173,37,3,123, +37,1,109,37,1,1,95,37,1,37,184,255,128,179,39,43,72,37,184,255,192,64,13, +34,38,72,144,37,160,37,2,2,16,37,1,37,184,255,192,64,46,28,31,72,223,37,1, +96,37,112,37,160,37,176,37,192,37,5,15,37,31,37,47,37,3,7,32,22,144,22,2, +22,22,31,70,12,47,4,159,4,2,4,4,32,12,1,12,184,255,192,64,15,16,19,72,12, +25,80,64,18,128,18,2,18,7,80,0,0,47,237,47,93,237,1,47,43,93,51,47,93,16, +237,50,47,93,94,93,93,93,43,113,95,113,43,43,114,95,114,114,114,114,114,94, +93,93,43,93,93,93,93,113,113,43,43,113,114,114,114,43,43,94,93,93,93,93,113, +113,113,113,113,43,114,114,114,43,94,93,43,93,43,93,113,113,113,113,113,113, +43,113,113,114,114,114,43,43,94,93,93,95,93,43,93,93,93,49,48,0,95,94,93, +93,19,34,38,39,53,30,1,51,50,62,2,53,3,52,62,2,51,50,22,23,21,46,1,35,34, +14,2,21,17,20,14,2,36,36,75,23,20,62,35,51,66,39,16,2,50,90,125,75,34,75, +22,18,61,36,51,66,39,16,50,89,124,254,78,11,8,147,8,16,37,64,84,48,4,188, +94,134,86,40,9,9,148,10,17,40,65,84,44,251,66,94,134,86,41,0,0,0,2,0,56,1, +80,4,44,3,244,0,33,0,67,1,31,64,26,36,16,12,16,72,2,16,12,16,72,65,24,11, +17,72,66,48,9,17,72,61,48,9,17,72,42,184,255,208,179,9,17,72,48,184,255,208, +64,19,9,17,72,31,24,9,17,72,32,48,9,17,72,26,48,9,17,72,13,184,255,232,179, +13,17,72,14,184,255,208,179,9,13,72,8,184,255,208,179,14,17,72,8,184,255, +208,64,41,9,12,72,63,16,28,48,28,80,28,3,0,28,16,28,64,28,96,28,128,28,160, +28,240,28,7,28,45,11,64,12,17,72,11,47,69,1,59,173,64,45,184,255,192,180, +35,60,72,45,34,184,255,192,179,23,28,72,34,184,255,192,64,27,16,20,72,34, +128,62,64,41,60,72,62,40,173,143,49,1,32,49,48,49,2,49,15,25,173,64,11,184, +255,192,180,39,60,72,11,0,184,255,192,179,23,28,72,0,184,255,192,64,29,16, +20,72,0,128,28,64,41,60,72,28,6,173,15,15,207,15,2,15,64,23,28,72,15,64,11, +19,72,15,0,47,43,43,93,237,196,43,26,221,43,43,196,43,26,237,16,220,93,93, +237,196,43,26,221,43,43,196,43,26,237,1,93,47,43,51,47,93,113,51,49,48,0, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,1,34,38,39,46,1,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,34,38,39,46,1,35,34,14,2,7, +53,62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,40,69,145,73,65,107,45,38, +65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68, +40,69,145,73,65,107,45,38,65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51, +23,69,123,52,32,59,61,68,2,246,43,26,22,23,12,22,33,21,144,37,47,13,21,27, +13,8,15,14,8,51,43,149,23,30,19,8,254,90,44,26,23,24,12,23,32,21,141,38,46, +13,20,26,13,8,15,14,8,50,42,147,23,32,19,8,0,1,0,65,0,55,4,36,5,16,0,19,0, +162,64,108,53,2,1,58,11,1,60,12,1,42,12,1,3,3,6,7,10,11,2,11,0,17,16,13,12, +1,12,12,11,1,2,4,9,19,100,14,116,14,2,80,14,1,2,48,14,1,0,14,16,14,32,14, +96,14,4,14,4,111,9,127,9,2,95,9,111,9,2,9,16,7,8,173,9,0,1,2,3,4,4,173,17, +6,31,5,47,5,95,5,111,5,223,5,5,5,10,11,12,13,4,80,9,208,9,2,15,9,1,9,0,47, +93,93,23,51,222,93,50,50,237,23,50,16,237,50,50,1,47,93,113,51,47,93,113, +95,113,113,51,18,23,57,16,135,192,192,192,192,16,135,192,192,192,192,49,48, +1,95,93,93,93,93,1,3,35,19,35,53,33,19,33,53,33,19,51,3,33,21,33,3,33,21, +1,192,152,145,151,237,1,55,190,254,11,2,61,154,143,152,1,21,254,162,191,2, +29,1,88,254,223,1,33,148,1,108,148,1,36,254,220,148,254,148,148,0,0,0,0,3, +0,100,0,244,4,71,4,80,0,3,0,7,0,11,0,49,64,27,11,7,2,8,4,0,8,173,9,9,1,5, +173,63,4,1,4,0,173,15,1,31,1,63,1,3,1,0,47,93,237,47,93,237,17,57,47,237, +1,47,51,51,47,51,51,49,48,19,53,33,21,1,53,33,21,1,53,33,21,100,3,227,252, +29,3,227,252,29,3,227,3,188,148,148,253,56,148,148,1,100,148,148,0,0,0,2, +0,63,0,0,4,36,4,207,0,6,0,10,0,123,185,0,5,255,216,64,17,18,22,72,3,40,18, +22,72,0,40,18,22,72,137,0,1,1,184,255,216,64,63,18,22,72,134,1,1,10,48,2, +80,2,2,0,2,16,2,32,2,64,2,96,2,128,2,160,2,7,2,7,7,0,64,12,15,72,0,8,173, +7,79,6,95,6,143,6,3,6,64,2,80,2,128,2,3,2,1,0,80,4,128,4,2,4,0,25,47,93,51, +51,205,93,205,93,24,47,237,1,47,43,51,47,47,93,113,51,49,48,0,93,43,93,43, +43,43,19,53,1,21,9,1,21,5,53,33,21,65,3,227,252,166,3,90,252,27,3,227,2,119, +205,1,139,154,254,168,254,168,153,236,145,145,0,0,2,0,65,0,0,4,36,4,207,0, +6,0,10,0,121,185,0,1,255,216,64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137, +6,1,5,184,255,216,64,62,18,22,72,134,5,1,9,48,6,80,6,2,0,6,16,6,32,6,64,6, +96,6,128,6,160,6,7,6,7,0,64,12,15,72,0,8,173,7,6,5,64,4,80,4,128,4,3,4,79, +0,95,0,143,0,3,0,80,2,128,2,2,2,0,25,47,93,205,93,205,93,51,51,24,47,237, +1,47,43,51,47,93,113,51,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21,1,53, +33,21,65,3,90,252,166,3,227,252,29,3,227,236,153,1,88,1,88,154,254,117,205, +253,137,145,145,0,0,0,0,2,0,157,0,0,4,55,4,129,0,4,0,9,0,35,64,18,105,9,121, +9,2,105,7,121,7,2,6,4,5,0,2,8,5,0,0,47,205,47,205,1,47,205,221,205,49,48, +0,93,93,51,17,9,1,17,37,33,17,9,1,157,1,205,1,205,252,182,2,250,254,131,254, +131,2,123,2,6,253,250,253,133,82,2,6,1,170,254,86,0,0,0,0,1,0,100,0,180,4, +71,2,242,0,5,0,19,183,5,170,0,2,0,4,173,1,0,47,237,47,1,47,47,237,49,48,55, +17,33,21,33,17,100,3,227,252,174,180,2,62,146,254,84,0,0,0,1,2,34,253,154, +3,210,6,170,0,23,0,29,182,4,32,8,11,72,9,0,184,1,0,180,1,19,12,6,1,0,47,47, +205,205,1,47,237,204,49,48,43,1,35,17,52,55,54,51,50,22,21,20,6,35,34,39, +46,1,39,38,35,34,7,6,21,2,181,147,84,82,128,63,75,51,37,30,13,8,26,20,33, +16,36,9,6,253,154,7,86,196,123,123,63,48,40,52,10,4,24,22,39,39,35,105,0, +0,0,1,1,5,253,154,2,181,6,170,0,28,0,32,185,0,4,255,224,180,8,11,72,12,2, +184,1,0,180,28,24,17,7,0,0,47,47,205,205,1,47,253,204,49,48,43,1,51,17,20, +7,14,1,35,34,46,2,53,52,62,2,51,50,23,30,1,23,22,51,50,55,54,53,2,34,147, +90,40,103,62,30,50,37,20,14,23,31,18,33,26,5,21,15,31,16,37,8,7,6,170,248, +168,205,125,56,54,16,29,39,24,20,34,24,14,16,2,23,20,37,41,31,106,0,0,0,1, +255,246,2,37,5,181,2,182,0,3,0,22,180,3,5,0,4,0,184,1,2,177,1,252,0,63,237, +17,1,51,17,51,49,48,3,53,33,21,10,5,191,2,37,145,145,0,0,1,1,216,253,147, +2,105,7,72,0,3,0,24,187,0,2,1,0,0,3,1,6,180,4,3,254,0,250,0,63,63,1,16,246, +237,49,48,1,51,17,35,1,216,145,145,7,72,246,75,0,0,0,1,2,141,253,147,5,181, +2,182,0,5,0,34,178,2,7,3,186,1,0,0,0,1,6,179,6,5,254,3,184,1,2,177,0,252, +0,63,237,63,1,16,246,237,17,51,49,48,1,33,21,33,17,35,2,141,3,40,253,105, +145,2,182,145,251,110,0,0,0,1,255,246,253,147,3,30,2,182,0,5,0,34,187,0,2, +1,0,0,5,1,6,181,6,0,6,4,254,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16,246, +237,49,48,3,53,33,17,35,17,10,3,40,145,2,37,145,250,221,4,146,0,0,0,0,1,2, +141,2,37,5,181,7,72,0,5,0,34,178,4,7,2,189,1,0,0,5,1,6,0,6,0,5,1,2,179,2, +252,0,250,0,63,63,237,1,16,246,237,17,51,49,48,1,51,17,33,21,33,2,141,145, +2,151,252,216,7,72,251,110,145,0,0,0,1,255,246,2,37,3,30,7,72,0,5,0,34,187, +0,5,1,0,0,2,1,6,181,6,0,6,3,250,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16, +244,237,49,48,3,53,33,17,51,17,10,2,151,145,2,37,145,4,146,250,221,0,0,0, +0,1,2,141,253,147,5,181,7,72,0,7,0,39,179,4,9,5,1,186,1,0,0,0,1,6,179,8,7, +254,5,184,1,2,179,2,252,0,250,0,63,63,237,63,1,16,246,237,50,17,51,49,48, +1,51,17,33,21,33,17,35,2,141,145,2,151,253,105,145,7,72,251,110,145,251,110, +0,1,255,246,253,147,3,30,7,72,0,7,0,39,177,7,4,186,1,0,0,2,1,6,183,8,0,8, +6,254,3,250,7,184,1,2,177,2,252,0,63,237,63,63,17,1,51,16,244,237,51,49,48, +3,53,33,17,51,17,35,17,10,2,151,145,145,2,37,145,4,146,246,75,4,146,0,0,1, +255,246,253,147,5,181,2,182,0,7,0,40,178,3,9,4,186,1,0,0,7,1,6,182,8,0,8, +6,254,4,0,184,1,2,177,1,252,0,63,237,50,63,17,1,51,16,246,237,17,51,49,48, +3,53,33,21,33,17,35,17,10,5,191,253,105,145,2,37,145,145,251,110,4,146,0, +1,255,246,2,37,5,181,7,72,0,7,0,40,178,7,9,5,186,1,0,0,2,1,6,182,8,0,8,3, +250,5,0,184,1,2,177,1,252,0,63,237,51,63,17,1,51,16,244,237,17,51,49,48,3, +53,33,17,51,17,33,21,10,2,151,145,2,151,2,37,145,4,146,251,110,145,0,1,255, +246,253,147,5,181,7,72,0,11,0,51,179,7,13,5,8,187,1,0,0,2,0,11,1,6,64,9,12, +0,12,10,254,3,250,8,11,184,1,2,178,5,2,252,0,63,51,237,50,63,63,17,1,51,16, +246,50,237,50,17,51,49,48,3,53,33,17,51,17,33,21,33,17,35,17,10,2,151,145, +2,151,253,105,145,2,37,145,4,146,251,110,145,251,110,4,146,0,0,0,2,255,246, +1,113,5,181,3,106,0,3,0,7,0,37,183,3,7,7,9,0,4,8,4,184,1,2,178,5,253,0,184, +1,2,177,1,251,0,63,237,63,237,17,1,51,50,17,51,17,51,49,48,3,53,33,21,1,53, +33,21,10,5,191,250,65,5,191,2,217,145,145,254,152,145,145,0,2,1,217,253,147, +3,210,7,72,0,3,0,7,0,42,65,9,0,5,1,0,0,4,1,7,0,8,0,1,1,0,0,0,1,4,182,8,7, +3,254,4,0,250,0,63,50,63,51,1,16,246,237,16,244,237,49,48,1,51,17,35,1,51, +17,35,1,217,145,145,1,104,145,145,7,72,246,75,9,181,246,75,0,0,0,1,2,141, +253,147,5,181,3,106,0,9,0,49,181,2,6,6,11,7,3,186,1,0,0,0,1,6,179,10,9,254, +7,184,1,2,178,4,253,3,184,1,2,177,0,251,0,63,237,63,237,63,1,16,246,237,50, +17,51,17,51,49,48,1,33,21,33,21,33,21,33,17,35,2,141,3,40,253,105,2,151,253, +105,145,3,106,145,215,145,252,34,0,0,1,1,217,253,147,5,181,2,182,0,9,0,51, +178,1,11,6,191,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,178,10,2,6,184,1,2,180,9, +252,4,8,254,0,63,51,63,237,50,1,16,244,237,16,246,237,17,51,49,48,1,21,33, +17,35,17,35,17,35,17,5,181,254,29,145,215,145,2,182,145,251,110,4,146,251, +110,5,35,0,0,0,0,2,1,217,253,147,5,181,3,106,0,5,0,11,0,63,180,2,8,8,13,9, +65,11,1,0,0,6,1,7,0,12,0,3,1,0,0,0,1,4,0,12,0,9,1,2,181,6,253,11,5,254,3, +184,1,2,177,0,251,0,63,237,63,51,63,237,1,16,246,237,16,244,237,17,51,17, +51,49,48,1,33,21,33,17,35,1,33,21,33,17,35,1,217,3,220,252,181,145,1,104, +2,116,254,29,145,3,106,145,250,186,4,111,145,252,34,0,0,1,255,246,253,147, +3,30,3,106,0,9,0,49,177,9,6,186,1,0,0,3,1,6,183,10,4,0,0,10,8,254,3,184,1, +2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63,17,1,51,17,51,16,244,237, +51,49,48,3,53,33,53,33,53,33,17,35,17,10,2,151,253,105,3,40,145,1,113,145, +215,145,250,41,3,222,0,0,0,1,255,246,253,147,3,210,2,182,0,9,0,52,65,9,0, +6,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,183,10,0,10,4,8,254,6,0,184,1,2,177,1, +252,0,63,237,50,63,51,17,1,51,16,244,237,16,246,237,49,48,3,53,33,17,35,17, +35,17,35,17,10,3,220,145,215,145,2,37,145,250,221,4,146,251,110,4,146,0,0, +0,0,2,255,246,253,147,3,210,3,106,0,5,0,11,0,63,180,4,9,9,12,11,65,11,1,0, +0,8,1,4,0,12,0,0,1,0,0,3,1,7,0,12,0,9,1,2,181,10,253,2,7,254,4,184,1,2,177, +5,251,0,63,237,63,51,63,237,1,16,244,237,16,246,237,17,51,17,51,49,48,1,17, +35,17,33,53,1,35,17,33,53,33,3,210,145,252,181,2,116,145,254,29,2,116,3,106, +250,41,5,70,145,250,41,3,222,145,0,0,1,2,141,1,113,5,181,7,72,0,9,0,49,181, +4,8,8,11,2,6,189,1,0,0,9,1,6,0,10,0,9,1,2,178,6,253,5,184,1,2,179,2,251,0, +250,0,63,63,237,63,237,1,16,246,237,50,17,51,17,51,49,48,1,51,17,33,21,33, +21,33,21,33,2,141,145,2,151,253,105,2,151,252,216,7,72,252,34,145,215,145, +0,0,1,1,217,2,37,5,181,7,72,0,9,0,52,178,4,11,2,65,11,1,0,0,9,1,7,0,10,0, +8,1,0,0,5,1,4,0,10,0,5,1,2,181,2,8,252,0,6,250,0,63,51,63,51,237,1,16,246, +237,16,244,237,17,51,49,48,1,51,17,33,21,33,17,51,17,51,3,65,145,1,227,252, +36,145,215,7,72,251,110,145,5,35,251,110,0,0,0,2,1,217,1,113,5,181,7,72,0, +5,0,11,0,63,180,10,4,4,13,8,65,11,1,0,0,11,1,7,0,12,0,2,1,0,0,5,1,4,0,12, +0,11,1,2,178,8,251,5,184,1,2,180,2,253,6,0,250,0,63,50,63,237,63,237,1,16, +246,237,16,244,237,17,51,17,51,49,48,1,51,17,33,21,33,1,51,17,33,21,33,1, +217,145,3,75,252,36,1,104,145,1,227,253,140,7,72,250,186,145,5,215,252,34, +145,0,0,1,255,246,1,113,3,30,7,72,0,9,0,50,188,0,9,1,0,0,6,0,2,1,6,183,10, +4,0,0,10,7,250,3,184,1,2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63, +17,1,51,17,51,16,244,50,237,49,48,3,53,33,53,33,53,33,17,51,17,10,2,151,253, +105,2,151,145,1,113,145,215,145,3,222,250,41,0,0,1,255,246,2,37,3,210,7,72, +0,9,0,52,65,9,0,0,1,0,0,7,1,7,0,10,0,6,1,0,0,3,1,4,183,10,1,10,8,4,250,6, +1,184,1,2,177,2,252,0,63,237,51,63,51,17,1,51,16,244,237,16,244,237,49,48, +1,33,53,33,17,51,17,51,17,51,3,210,252,36,1,227,145,215,145,2,37,145,4,146, +251,110,4,146,0,0,0,2,255,246,1,113,3,210,7,72,0,5,0,11,0,63,65,9,0,8,1,0, +0,11,1,4,0,12,0,0,1,0,0,3,1,7,181,12,9,1,1,12,9,184,1,2,181,10,251,4,6,250, +1,184,1,2,177,2,253,0,63,237,63,51,63,237,17,1,51,17,51,16,244,237,16,244, +237,49,48,1,33,53,33,17,51,33,51,17,33,53,33,3,210,252,36,3,75,145,254,7, +145,253,140,1,227,1,113,145,5,70,251,145,145,0,0,0,0,1,2,141,253,147,5,181, +7,72,0,11,0,54,182,4,8,8,13,6,2,10,186,1,0,0,11,1,6,179,12,11,254,9,184,1, +2,178,6,253,5,184,1,2,179,2,251,0,250,0,63,63,237,63,237,63,1,16,246,237, +50,50,17,51,17,51,49,48,1,51,17,33,21,33,21,33,21,33,17,35,2,141,145,2,151, +253,105,2,151,253,105,145,7,72,252,34,145,215,145,252,34,0,0,0,0,2,1,217, +253,147,5,181,7,72,0,7,0,11,0,56,178,4,13,10,186,1,0,0,11,1,4,178,12,2,6, +186,1,0,0,7,1,7,183,12,7,11,254,0,8,250,5,184,1,2,177,2,252,0,63,237,63,51, +63,51,1,16,244,237,50,16,246,237,17,51,49,48,1,51,17,33,21,33,17,35,1,51, +17,35,3,65,145,1,227,254,29,145,254,152,145,145,7,72,251,110,145,251,110, +9,181,246,75,0,0,3,1,217,253,147,5,181,7,72,0,3,0,9,0,15,0,73,181,14,6,6, +17,12,8,65,12,1,0,0,15,0,9,1,7,0,16,0,0,1,0,0,1,1,4,0,16,0,15,1,2,178,12, +251,7,184,1,2,183,4,253,10,2,250,9,1,254,0,63,51,63,51,63,237,63,237,1,16, +246,237,16,244,50,237,50,17,51,17,51,49,48,1,35,17,51,19,33,21,33,17,35,17, +51,17,33,21,33,2,106,145,145,215,2,116,254,29,145,145,1,227,253,140,253,147, +9,181,250,186,145,252,34,9,181,252,34,145,0,1,255,246,253,147,3,30,7,72,0, +11,0,56,185,0,9,1,0,178,6,2,10,184,1,6,64,10,12,4,0,0,12,10,254,7,250,3,184, +1,2,178,6,251,11,184,1,2,177,2,253,0,63,237,63,237,63,63,17,1,51,17,51,16, +246,50,50,237,49,48,3,53,33,53,33,53,33,17,51,17,35,17,10,2,151,253,105,2, +151,145,145,1,113,145,215,145,3,222,246,75,3,222,0,0,0,2,255,246,253,147, +3,210,7,72,0,7,0,11,0,59,65,10,0,10,1,0,0,11,1,7,0,12,0,5,1,0,0,2,0,6,1,4, +64,10,12,0,12,11,6,254,8,3,250,7,184,1,2,177,2,252,0,63,237,63,51,63,51,17, +1,51,16,246,50,237,16,244,237,49,48,3,53,33,17,51,17,35,17,1,51,17,35,10, +1,227,145,145,1,104,145,145,2,37,145,4,146,246,75,4,146,5,35,246,75,0,0,0, +0,3,255,246,253,147,3,210,7,72,0,3,0,9,0,15,0,73,181,7,13,13,16,6,10,65,12, +1,0,0,9,0,11,1,4,0,16,0,2,1,0,0,3,1,7,0,16,0,12,1,2,181,15,253,3,11,254,6, +184,1,2,180,9,251,0,4,250,0,63,51,63,237,63,51,63,237,1,16,244,237,16,246, +50,237,50,17,51,17,51,49,48,1,51,17,35,1,51,17,33,53,33,19,35,17,33,53,33, +3,65,145,145,254,152,145,253,140,1,227,145,145,254,29,2,116,7,72,246,75,9, +181,251,145,145,250,41,3,222,145,0,0,0,2,255,246,253,147,5,181,3,106,0,7, +0,11,0,57,180,11,3,3,13,4,186,1,0,0,7,1,6,181,12,8,0,0,12,8,184,1,2,181,9, +251,6,254,4,0,184,1,2,177,1,253,0,63,237,50,63,63,237,17,1,51,17,51,16,246, +237,17,51,17,51,49,48,3,53,33,21,33,17,35,17,1,53,33,21,10,5,191,253,105, +145,253,105,5,191,1,113,145,145,252,34,3,222,1,104,145,145,0,0,1,255,246, +253,147,5,181,2,182,0,11,0,58,178,3,13,8,191,1,0,0,11,1,4,0,12,0,4,1,0,0, +7,1,7,64,9,12,0,12,6,10,254,8,4,0,184,1,2,177,1,252,0,63,237,50,50,63,51, +17,1,51,16,244,237,16,246,237,17,51,49,48,3,53,33,21,33,17,35,17,35,17,35, +17,10,5,191,254,29,145,215,145,2,37,145,145,251,110,4,146,251,110,4,146,0, +3,255,246,253,147,5,181,3,106,0,5,0,11,0,15,0,74,180,13,8,8,17,9,186,1,0, +0,6,1,7,181,16,14,3,3,16,5,189,1,0,0,2,1,4,0,16,0,14,1,2,179,15,251,9,3,184, +1,2,181,6,4,253,11,1,254,0,63,51,63,51,237,50,63,237,1,16,246,237,17,51,17, +51,16,244,237,17,51,17,51,49,48,1,35,17,33,53,33,51,33,21,33,17,35,1,21,33, +53,2,106,145,254,29,2,116,215,2,116,254,29,145,2,116,250,65,253,147,3,222, +145,145,252,34,5,215,145,145,0,0,0,0,2,255,246,1,113,5,181,7,72,0,7,0,11, +0,58,64,9,7,11,11,13,0,8,8,12,5,189,1,0,0,2,1,6,0,12,0,8,1,2,181,9,253,3, +250,5,0,184,1,2,177,1,251,0,63,237,51,63,63,237,1,16,244,237,17,51,17,51, +17,51,17,51,49,48,3,53,33,17,51,17,33,21,1,53,33,21,10,2,151,145,2,151,250, +65,5,191,2,217,145,3,222,252,34,145,254,152,145,145,0,1,255,246,2,37,5,181, +7,72,0,11,0,58,178,11,13,9,191,1,0,0,6,1,7,0,12,0,5,1,0,0,2,1,4,64,9,12,0, +12,7,3,250,9,5,0,184,1,2,177,1,252,0,63,237,51,51,63,51,17,1,51,16,244,237, +16,244,237,17,51,49,48,3,53,33,17,51,17,51,17,51,17,33,21,10,1,227,145,215, +145,1,227,2,37,145,4,146,251,110,4,146,251,110,145,0,3,255,246,1,113,5,181, +7,72,0,5,0,11,0,15,0,76,64,9,4,15,15,17,9,12,12,16,8,65,11,1,0,0,11,1,4,0, +16,0,2,1,0,0,5,1,7,0,16,0,12,1,2,179,13,253,5,9,184,1,2,181,2,10,251,0,6, +250,0,63,51,63,51,237,50,63,237,1,16,244,237,16,244,237,17,51,17,51,17,51, +17,51,49,48,1,51,17,33,21,33,1,51,17,33,53,33,1,53,33,21,3,65,145,1,227,253, +140,254,152,145,253,140,1,227,254,29,5,191,7,72,252,34,145,4,111,251,145, +145,254,7,145,145,0,0,0,1,255,246,253,147,5,181,7,72,0,19,0,76,182,11,15, +15,21,13,9,16,184,1,0,178,6,2,19,184,1,6,64,11,20,4,0,0,20,18,254,7,250,12, +4,184,1,2,180,9,5,251,16,0,184,1,2,178,13,1,253,0,63,51,237,50,63,51,237, +50,63,63,17,1,51,17,51,16,246,50,50,237,50,50,17,51,17,51,49,48,3,53,33,53, +33,53,33,17,51,17,33,21,33,21,33,21,33,17,35,17,10,2,151,253,105,2,151,145, +2,151,253,105,2,151,253,105,145,1,113,145,215,145,3,222,252,34,145,215,145, +252,34,3,222,0,0,1,255,246,253,147,5,181,7,72,0,19,0,77,179,4,21,18,9,187, +1,0,0,15,0,12,1,4,178,20,2,5,187,1,0,0,19,0,8,1,7,64,9,20,13,20,0,16,250, +9,5,13,184,1,2,182,18,2,14,252,7,11,254,0,63,51,63,51,51,237,50,50,63,51, +17,1,51,16,244,50,237,50,16,246,50,237,50,17,51,49,48,1,51,17,33,21,33,17, +35,17,35,17,35,17,33,53,33,17,51,17,51,3,65,145,1,227,254,29,145,215,145, +254,29,1,227,145,215,7,72,251,110,145,251,110,4,146,251,110,4,146,145,4,146, +251,110,0,0,0,0,4,255,246,253,147,5,181,7,72,0,5,0,11,0,17,0,23,0,93,181, +4,14,14,25,2,15,187,1,0,0,5,0,12,1,7,182,24,21,9,9,24,20,11,187,1,0,0,23, +0,8,1,4,178,24,5,21,184,1,2,183,2,22,251,0,18,250,15,9,184,1,2,181,12,10, +253,17,7,254,0,63,51,63,51,237,50,63,51,63,51,237,50,1,16,246,50,237,50,17, +51,17,51,16,244,50,237,50,17,51,17,51,49,48,1,51,17,33,21,33,3,35,17,33,53, +33,51,33,21,33,17,35,1,51,17,33,53,33,3,65,145,1,227,253,140,215,145,254, +29,2,116,215,2,116,254,29,145,254,152,145,253,140,1,227,7,72,252,34,145,250, +186,3,222,145,145,252,34,9,181,251,145,145,0,0,0,0,1,0,0,2,109,5,171,7,72, +0,3,0,18,182,0,5,1,4,2,250,1,0,47,63,17,1,51,17,51,49,48,1,33,17,33,5,171, +250,85,5,171,2,109,4,219,0,0,0,1,0,0,253,147,5,171,2,109,0,3,0,18,182,0,5, +1,4,2,1,254,0,63,47,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253, +147,4,218,0,0,0,1,0,0,253,147,5,171,7,72,0,3,0,19,183,0,5,1,4,2,250,1,254, +0,63,63,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253,147,9,181,0, +0,1,0,0,253,147,2,214,7,72,0,3,0,17,182,1,4,0,2,250,1,254,0,63,63,1,47,17, +51,49,48,1,33,17,33,2,214,253,42,2,214,253,147,9,181,0,0,0,0,1,2,213,253, +147,5,171,7,72,0,3,0,17,182,0,5,1,2,250,1,254,0,63,63,1,47,17,51,49,48,1, +33,17,33,5,171,253,42,2,214,253,147,9,181,0,0,0,0,42,0,103,253,245,5,171, +6,163,0,3,0,7,0,11,0,15,0,19,0,23,0,27,0,31,0,35,0,39,0,43,0,47,0,51,0,55, +0,59,0,63,0,67,0,71,0,75,0,79,0,83,0,87,0,91,0,95,0,99,0,103,0,107,0,111, +0,115,0,119,0,123,0,127,0,131,0,135,0,139,0,143,0,147,0,151,0,155,0,159,0, +163,0,167,2,49,181,161,157,153,149,145,165,184,1,1,182,164,109,85,69,45,13, +121,184,1,1,64,13,120,108,84,68,44,12,120,101,77,53,29,5,137,184,1,1,64,13, +136,100,76,52,28,4,136,113,89,65,41,17,125,184,1,1,64,13,124,112,88,64,40, +16,124,97,81,57,25,9,141,184,1,1,64,13,140,96,80,56,24,8,140,117,93,61,37, +21,129,184,1,1,64,33,128,116,92,60,36,20,128,120,136,124,140,128,128,140, +124,136,120,5,132,160,156,152,148,144,164,164,169,105,73,49,33,1,133,184, +1,1,64,15,104,72,48,32,0,10,132,1,8,3,132,167,143,139,135,184,1,3,180,132, +163,103,99,107,184,1,3,183,104,160,100,96,104,95,91,87,184,1,3,183,84,92, +88,84,159,83,79,75,184,1,3,183,72,156,80,76,72,67,63,71,184,1,3,183,68,64, +60,68,155,59,55,51,184,1,3,183,48,152,56,52,48,43,39,47,184,1,3,183,44,40, +36,44,151,31,27,35,184,1,3,183,32,148,28,24,32,23,19,15,184,1,3,183,12,20, +16,12,147,11,7,3,184,1,3,183,0,144,8,4,0,131,127,123,184,1,3,64,60,120,128, +124,120,22,84,1,27,72,1,25,68,1,27,48,1,27,44,1,20,32,1,104,84,72,68,48,44, +32,12,0,120,120,0,12,32,44,48,68,72,84,104,10,108,164,140,136,27,132,59,132, +2,15,132,1,2,132,119,115,111,184,1,3,178,116,112,108,0,47,51,51,237,50,50, +47,95,93,93,51,51,51,18,23,57,47,47,47,47,47,47,47,47,47,47,93,93,93,93,93, +93,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50, +50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,16,237,50,50,50,1,47,95,94,93,51,51,51,51,51, +237,50,50,50,50,50,17,51,47,51,51,51,51,51,18,23,57,47,47,47,47,47,17,51, +51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50,50,50, +17,51,51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50, +50,50,17,51,51,51,51,51,16,237,50,50,50,50,50,16,237,50,50,50,50,50,49,48, +19,51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7, +51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51, +21,35,37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,7,51,21, +35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51,21,35, +37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,37, +51,21,35,37,51,21,35,1,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,17,51, +21,35,17,51,21,35,17,51,21,35,17,51,21,35,17,51,21,35,103,104,104,1,158,104, +104,1,160,103,103,253,145,104,104,1,159,104,104,1,159,104,104,207,103,103, +254,96,104,104,254,98,104,104,4,13,104,104,254,97,104,104,254,97,104,104, +207,104,104,1,158,104,104,1,160,103,103,207,104,104,254,97,104,104,254,97, +104,104,207,104,104,1,158,104,104,1,160,103,103,253,145,104,104,1,159,104, +104,1,159,104,104,207,103,103,254,96,104,104,254,98,104,104,207,104,104,1, +159,104,104,1,159,104,104,252,194,104,104,1,159,104,104,1,159,104,104,251, +243,104,104,1,158,104,104,1,160,103,103,1,158,104,104,104,104,104,104,104, +104,104,104,104,104,5,34,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96, +96,99,96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,97,97,97,97,97, +98,94,94,94,94,94,98,97,97,97,97,97,96,96,96,96,96,96,7,237,98,98,98,98,98, +1,35,96,96,96,96,96,254,223,98,254,223,96,254,221,96,254,221,97,254,222,97, +7,238,96,0,0,0,0,84,0,0,253,245,5,171,6,163,0,3,0,7,0,11,0,15,0,19,0,23,0, +27,0,31,0,35,0,39,0,43,0,47,0,51,0,55,0,59,0,63,0,67,0,71,0,75,0,79,0,83, +0,87,0,91,0,95,0,99,0,103,0,107,0,111,0,115,0,119,0,123,0,127,0,131,0,135, +0,139,0,143,0,147,0,151,0,155,0,159,0,163,0,167,0,171,0,175,0,179,0,183,0, +187,0,191,0,195,0,199,0,203,0,207,0,211,0,215,0,219,0,223,0,227,0,231,0,235, +0,239,0,243,0,247,0,251,0,255,1,3,1,7,1,11,1,15,1,19,1,23,1,27,1,31,1,35, +1,39,1,43,1,47,1,51,1,55,1,59,1,63,1,67,1,71,1,75,1,79,0,0,19,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,37,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,37,51,21,35,5,51,21,35,39,51,21,35,39,51,21, +35,39,51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,23,51,21,35,39,51,21,35,39,51,21,35,39, +51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,19,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23, +51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,17,51,21, +35,19,51,21,35,103,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,1,158,103,103,207,104,104,208,104,104,208,103, +103,252,194,103,103,3,165,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104, +104,208,103,103,103,104,104,207,104,104,208,104,104,208,104,104,207,104,104, +207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,251,243,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,103,104,104,103,103,103,103,104,104,103,103, +103,103,104,104,103,103,103,103,104,104,103,103,103,103,103,103,104,104,5, +34,98,98,98,98,98,98,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,97,97, +97,97,97,97,97,97,97,97,97,98,94,94,94,94,94,94,94,94,94,94,94,98,97,97,97, +97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,96,96,96,7,237,98,98,98, +98,98,98,98,98,98,98,98,1,35,96,96,96,96,96,96,96,96,96,96,96,254,223,98, +97,96,96,96,99,96,96,96,99,96,96,97,98,94,98,97,96,96,7,237,98,1,35,96,0, +0,67,0,0,253,147,5,213,6,163,0,73,0,77,0,81,0,85,0,89,0,93,0,97,0,101,0,105, +0,109,0,113,0,117,0,121,0,125,0,129,0,133,0,137,0,141,0,145,0,149,0,153,0, +157,0,161,0,165,0,169,0,173,0,177,0,181,0,185,0,189,0,193,0,197,0,201,0,205, +0,209,0,213,0,217,0,221,0,225,0,229,0,233,0,237,0,241,0,245,0,249,0,253,1, +1,1,5,1,9,1,13,1,17,1,21,1,25,1,29,1,33,1,37,1,41,1,45,1,49,1,53,1,57,1,61, +1,65,1,69,1,73,1,77,1,81,0,0,1,33,17,51,53,35,17,51,53,35,17,51,53,35,17, +51,53,35,17,51,53,35,17,51,53,51,21,51,53,51,21,51,53,51,21,51,53,51,21,51, +53,51,21,51,53,51,21,51,53,51,21,35,21,51,17,35,21,51,17,35,21,51,17,35,21, +51,17,35,21,51,17,35,21,51,1,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53, +23,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,7,21,51,53,51,21,51,53,51, +21,51,53,51,21,51,53,5,35,21,51,55,21,51,53,51,21,51,53,51,21,51,53,5,21, +51,53,33,21,51,53,7,53,35,21,37,21,51,53,19,53,35,21,35,53,35,21,35,53,35, +21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53,19,53,35,21, +35,53,35,21,35,53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51, +21,51,53,19,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,1,35,21,51,39,35, +21,51,39,35,21,51,39,35,21,51,1,21,51,53,51,21,51,53,23,35,21,51,39,35,21, +51,7,21,51,53,51,21,51,53,7,35,21,51,55,21,51,53,5,21,51,53,23,53,35,21,23, +53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,19,53,35,21,35,53,35,21,7,21, +51,53,51,21,51,53,19,35,21,51,39,35,21,51,19,35,21,51,39,35,21,51,5,213,250, +43,106,106,106,106,106,106,106,106,106,106,106,107,106,107,106,107,107,107, +107,107,106,107,106,107,107,107,107,107,107,107,107,107,107,107,107,107,250, +149,107,106,107,106,107,107,107,107,107,107,214,107,107,214,106,106,213,106, +106,213,107,106,107,106,107,107,107,253,234,106,106,107,106,107,107,107,107, +252,170,107,1,63,107,213,107,1,171,107,107,107,107,107,107,106,107,106,107, +107,106,107,106,107,107,107,107,107,107,107,107,106,107,106,107,107,106,107, +106,107,107,107,107,107,107,214,107,107,214,106,106,213,106,106,2,22,107, +107,214,107,107,213,107,107,213,107,107,2,235,107,106,107,106,106,106,213, +106,106,213,107,106,107,107,106,106,107,106,254,86,107,213,107,213,106,107, +106,107,107,106,107,106,106,107,106,107,107,106,107,106,106,106,213,106,106, +107,107,107,213,107,107,253,147,1,34,97,1,34,97,1,35,96,1,33,98,1,33,98,1, +33,96,96,96,96,96,96,96,96,96,96,96,96,96,193,98,254,223,96,254,221,96,254, +221,96,254,221,94,254,221,96,6,106,96,96,96,96,96,96,96,96,192,98,98,98,98, +98,98,98,97,96,96,96,96,96,96,96,96,192,96,96,96,96,96,96,96,96,195,96,96, +96,96,96,96,96,96,96,96,254,223,97,97,97,97,97,97,97,97,98,94,94,94,94,94, +94,94,94,254,223,97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,6,205, +98,98,98,98,98,98,98,1,34,98,98,98,98,98,98,98,254,223,96,96,96,96,192,98, +98,98,97,96,96,96,96,192,96,96,96,96,195,96,96,96,96,96,193,97,97,97,97,98, +94,94,94,94,254,223,97,97,97,97,96,96,96,96,96,6,205,98,98,98,1,34,98,98, +98,0,0,0,0,1,0,123,0,117,4,90,4,84,0,3,0,0,19,33,17,33,123,3,223,252,33,4, +84,252,33,0,0,2,0,6,0,0,4,207,4,201,0,3,0,7,0,21,183,7,1,4,0,4,0,5,3,0,47, +205,221,205,1,47,205,221,205,49,48,19,33,17,33,19,17,33,17,6,4,201,251,55, +76,4,49,4,201,251,55,4,125,251,207,4,49,0,0,1,0,109,1,127,2,105,3,123,0,3, +0,26,64,13,3,48,2,1,15,2,31,2,2,8,2,1,2,0,47,205,1,47,94,93,93,205,49,48, +1,33,17,33,2,105,254,4,1,252,1,127,1,252,0,0,0,2,0,109,1,127,2,105,3,123, +0,3,0,7,0,34,64,17,5,3,6,48,2,1,15,2,31,2,2,8,2,7,1,6,2,0,47,205,221,205, +1,47,94,93,93,205,221,205,49,48,1,33,17,33,3,17,33,17,2,105,254,4,1,252,76, +254,156,1,127,1,252,254,80,1,98,254,158,0,0,0,0,1,0,0,0,0,8,0,2,104,0,3,0, +0,17,33,17,33,8,0,248,0,2,104,253,152,0,0,0,1,1,158,0,0,6,76,4,174,0,2,0, +0,33,9,1,1,158,2,88,2,86,4,174,251,82,0,0,1,1,145,255,229,6,90,4,172,0,2, +0,0,9,2,1,145,4,201,251,55,4,172,253,158,253,155,0,1,1,158,255,229,6,76,4, +147,0,2,0,0,9,2,6,76,253,170,253,168,4,147,251,82,4,174,0,1,1,145,255,229, +6,90,4,172,0,2,0,0,1,17,1,6,90,251,55,4,172,251,57,2,101,0,0,2,0,8,0,0,3, +238,5,160,0,5,0,9,0,37,64,20,134,7,1,9,0,5,16,5,2,5,7,31,2,1,2,6,3,4,8,1, +0,47,51,63,51,1,47,93,51,47,93,51,49,48,93,33,35,9,1,51,9,4,2,35,82,254,55, +1,201,82,1,203,254,14,254,158,1,98,1,96,2,207,2,209,253,49,2,53,253,203,253, +194,2,62,0,2,0,167,0,162,4,46,4,41,0,19,0,39,0,46,64,28,68,37,84,37,2,75, +33,91,33,2,75,27,91,27,2,68,23,84,23,2,30,10,20,0,25,15,35,5,0,47,205,220, +205,1,47,205,220,205,49,48,93,93,93,93,19,52,62,2,51,50,30,2,21,20,14,2,35, +34,46,2,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,167,70,122,164,94,94, +165,123,71,71,123,165,94,94,164,122,70,86,57,98,133,76,76,134,99,58,58,99, +134,76,76,133,98,57,2,100,94,165,123,71,71,123,165,94,94,164,122,70,70,122, +164,94,76,132,99,57,57,99,132,76,76,134,99,58,58,99,134,0,0,0,0,1,0,178,0, +137,4,35,3,250,0,23,0,17,182,8,16,12,15,0,1,0,0,47,93,205,1,47,205,49,48, +1,50,23,30,1,23,30,1,21,20,7,6,35,34,39,38,53,52,54,55,62,1,55,54,2,106,110, +107,53,82,29,29,31,129,129,183,182,129,129,30,29,29,83,52,108,3,250,57,28, +82,52,54,110,57,183,129,129,129,129,183,58,109,54,52,82,28,57,0,0,0,2,0,41, +0,0,4,172,4,131,0,3,0,23,0,21,183,14,2,4,1,19,1,9,0,0,47,205,221,205,1,47, +205,221,205,49,48,51,17,33,17,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2, +41,4,131,252,4,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69,4, +131,251,125,2,65,91,160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0, +3,0,41,0,0,4,172,4,131,0,3,0,23,0,43,0,34,64,14,4,24,1,14,34,2,1,19,29,0, +9,39,1,0,0,47,221,221,206,16,221,206,1,47,221,221,206,16,221,206,49,48,51, +17,33,17,1,52,62,2,51,50,30,2,21,20,14,2,35,34,46,2,39,20,30,2,51,50,62,2, +53,52,46,2,35,34,14,2,41,4,131,252,81,58,99,133,75,75,133,99,58,58,99,133, +75,75,133,99,58,77,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69, +4,131,251,125,2,65,75,133,99,58,58,99,133,75,75,133,99,58,58,99,133,75,91, +160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0,2,0,115,1,133,2,99, +3,117,0,18,0,34,0,21,183,19,0,27,11,31,6,23,15,0,47,205,220,205,1,47,205, +220,205,49,48,1,20,6,7,14,1,35,34,39,46,1,53,52,55,54,51,50,23,22,7,52,39, +38,35,34,7,6,21,20,23,22,51,50,55,54,2,99,37,37,37,86,51,101,75,35,37,72, +74,102,103,71,74,76,51,51,70,70,51,51,51,49,72,72,49,51,2,125,53,86,37,35, +37,72,37,86,53,102,72,74,74,71,103,70,51,51,51,51,70,69,54,49,49,54,0,0,0, +5,1,177,255,229,6,121,4,172,0,17,0,33,0,45,0,57,0,68,0,147,64,93,20,32,36, +32,116,32,3,20,28,36,28,116,28,3,27,24,43,24,123,24,3,27,20,43,20,123,20, +3,68,34,40,63,52,46,40,46,40,46,8,18,31,0,1,0,26,8,49,37,43,55,43,62,58,104, +58,1,89,58,1,71,58,1,25,58,1,58,60,65,15,43,95,43,111,43,3,8,65,64,9,14,72, +43,65,43,65,4,22,15,13,1,13,30,4,0,47,205,220,93,205,18,57,57,47,47,43,94, +93,16,205,51,93,93,93,93,17,51,17,51,16,205,50,1,47,205,220,93,205,18,57, +57,47,47,16,205,51,16,205,51,49,48,0,93,93,93,93,1,20,7,6,35,34,39,38,53, +52,54,55,54,51,50,23,30,1,7,52,39,38,35,34,7,6,21,20,23,22,51,50,55,54,1, +20,6,35,34,38,53,52,54,51,50,22,5,20,6,35,34,38,53,52,54,51,50,22,1,22,51, +50,55,23,6,35,34,38,39,6,121,180,179,253,253,179,180,90,90,178,254,254,178, +90,90,90,153,151,218,218,151,153,153,152,217,217,152,153,253,90,46,32,32, +45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,234,76,147,145,76,62,98, +185,94,141,48,2,72,254,178,179,179,178,254,128,215,91,178,178,91,215,128, +217,153,154,154,153,217,216,153,154,154,153,1,87,32,46,46,32,32,45,45,32, +32,46,46,32,32,45,45,254,191,137,137,35,186,95,91,0,0,4,1,209,255,229,6,153, +4,172,0,17,0,29,0,41,0,52,0,96,64,55,42,18,24,47,36,30,24,30,24,30,0,8,39, +27,21,33,21,48,52,104,52,1,89,52,1,75,52,1,61,52,1,52,50,45,15,21,31,21,95, +21,111,21,4,8,79,45,95,45,2,21,45,21,45,13,4,0,47,204,57,57,47,47,93,94,93, +16,206,51,93,93,93,93,17,51,17,51,16,206,50,1,47,205,57,57,47,47,16,206,51, +16,206,51,49,48,1,20,7,6,35,34,39,38,53,52,54,55,54,51,50,23,30,1,5,52,38, +35,34,6,21,20,22,51,50,54,37,52,38,35,34,6,21,20,22,51,50,54,1,30,1,51,50, +55,39,6,35,34,39,6,153,180,179,253,253,179,180,90,90,178,254,254,178,90,90, +253,0,46,32,32,45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,174,48,141, +94,185,98,62,76,145,147,76,2,72,254,178,179,179,178,254,128,215,91,178,178, +91,215,1,32,45,45,32,32,46,46,32,32,45,45,32,32,46,46,254,220,91,95,186,35, +137,137,0,2,1,70,255,115,6,14,4,59,0,51,0,70,0,139,185,0,47,255,240,64,13, +11,14,72,52,46,1,52,36,1,119,35,1,35,184,255,240,64,77,11,14,72,21,16,11, +14,72,59,20,1,59,9,1,8,16,11,14,72,59,47,1,52,35,1,52,21,1,59,8,1,66,143, +13,223,13,2,112,13,1,63,13,1,32,13,1,13,57,43,62,128,31,208,31,224,31,3,127, +31,1,48,31,1,47,31,1,31,52,15,51,63,51,79,51,3,8,51,0,47,94,93,205,220,93, +93,93,93,205,1,47,205,220,93,93,93,93,205,49,48,0,93,93,93,93,1,43,93,93, +43,43,93,93,93,43,1,51,21,30,3,23,55,23,7,30,1,23,51,21,35,14,1,7,23,7,39, +14,1,7,14,1,7,21,35,53,46,1,39,7,39,55,46,1,39,35,53,51,54,55,39,55,23,62, +1,55,23,34,6,7,6,21,20,23,30,1,51,50,55,54,53,52,39,46,1,3,137,66,32,57,54, +53,29,186,45,184,45,44,3,215,215,8,44,40,184,49,182,31,55,23,24,58,34,66, +63,110,48,188,43,182,40,46,8,215,215,12,80,180,40,189,57,112,54,31,69,117, +48,98,98,48,117,69,139,96,99,99,49,117,4,59,217,3,12,21,32,22,182,45,184, +59,113,57,62,60,110,51,188,43,182,23,32,11,9,12,5,217,217,9,46,35,180,45, +184,51,111,63,62,128,95,184,49,182,40,44,6,61,50,48,100,136,137,98,50,47, +97,97,138,137,99,48,50,0,0,0,2,1,218,0,80,4,38,4,129,0,28,0,47,0,98,64,62, +22,18,25,0,0,5,15,43,1,239,43,255,43,2,43,15,14,1,14,0,34,1,224,34,240,34, +2,34,5,22,25,19,0,28,16,28,80,28,3,28,0,39,1,240,39,1,39,18,0,0,128,0,2,8, +0,29,64,37,40,72,29,10,0,47,205,43,220,94,93,50,205,113,114,47,93,51,205, +50,1,47,205,113,114,220,93,205,113,114,17,57,47,51,205,50,49,48,1,46,1,39, +38,53,52,55,62,1,51,50,23,22,21,20,7,6,7,21,33,21,33,17,35,17,33,53,33,19, +34,7,14,1,21,20,22,23,22,51,50,55,54,53,52,38,39,38,2,220,55,90,35,71,83, +44,101,60,118,83,86,72,72,106,1,0,255,0,74,254,254,1,2,35,83,62,29,31,31, +29,62,83,87,59,61,30,29,62,2,66,8,46,42,80,108,122,83,43,43,86,83,122,109, +81,82,12,166,70,254,250,1,6,70,2,145,59,31,71,44,43,71,31,62,62,61,84,44, +71,31,59,0,2,1,81,0,250,4,175,4,129,0,65,0,81,0,70,64,40,49,65,59,15,78,1, +78,63,32,1,32,15,51,1,51,0,70,1,70,59,65,49,63,74,0,55,128,55,2,55,66,144, +20,1,20,15,63,1,8,63,0,47,94,93,204,93,205,220,93,205,18,57,57,1,47,205,114, +220,93,204,93,205,114,18,57,57,49,48,1,46,1,39,46,1,39,46,1,53,52,55,62,1, +51,50,22,23,30,1,51,50,54,55,54,51,50,21,20,7,14,1,21,20,22,23,30,1,21,20, +6,7,6,35,34,39,46,1,39,7,22,21,20,7,6,35,34,39,38,53,52,55,54,51,50,23,7, +34,7,6,21,20,23,22,51,50,55,54,53,52,39,38,3,255,17,54,37,28,40,14,5,3,6, +3,6,5,5,15,13,32,63,32,46,64,19,36,13,16,6,9,7,4,8,2,2,2,2,9,5,21,20,22,31, +11,237,84,86,87,118,118,87,84,84,85,122,71,83,154,90,62,61,61,64,88,89,60, +62,62,60,4,0,5,18,14,11,24,14,3,10,5,8,9,2,2,2,2,8,9,7,6,12,14,9,18,34,79, +45,31,64,34,11,16,5,5,7,3,6,39,42,82,42,238,81,109,125,86,88,84,84,117,117, +87,86,43,32,62,61,88,91,61,61,61,62,90,87,62,62,0,0,1,0,59,0,0,4,5,4,207, +0,47,0,40,64,25,38,32,10,48,10,96,10,112,10,4,10,14,34,64,8,11,72,34,23,79, +0,95,0,2,0,0,47,93,47,47,43,51,1,47,93,47,49,48,1,30,1,23,30,1,23,22,23,22, +21,20,7,6,35,34,39,22,23,30,1,31,1,33,55,50,55,62,3,39,14,1,35,34,39,38,53, +52,55,62,1,55,62,1,55,54,2,32,14,40,26,28,95,69,141,35,37,63,66,88,157,99, +3,36,38,163,137,8,252,232,6,125,86,43,66,44,20,1,45,132,83,90,66,63,30,23, +78,57,69,110,38,56,4,207,54,95,44,43,105,63,126,66,67,70,95,63,66,191,147, +87,86,99,9,37,37,49,25,69,91,119,75,96,95,66,63,91,74,59,42,85,47,59,113, +57,83,0,0,0,0,1,0,60,0,0,5,4,4,199,0,75,0,47,64,24,57,77,63,23,1,23,52,61, +67,13,47,30,4,18,31,18,1,27,18,27,18,1,41,1,0,47,47,18,57,57,47,47,93,18, +23,57,50,51,1,47,93,16,206,49,48,41,1,55,62,1,55,62,1,55,54,53,52,38,53,6, +7,14,1,35,34,38,39,38,53,52,55,54,51,50,22,23,46,1,39,46,1,53,52,55,62,1, +51,50,23,22,21,20,7,54,55,62,1,51,50,22,23,22,21,20,7,6,35,34,38,39,46,1, +39,30,1,23,30,1,23,22,23,4,70,252,182,8,84,108,27,41,64,26,52,2,58,90,43, +88,45,59,97,41,79,73,73,93,31,80,51,20,27,8,5,6,78,40,97,60,116,80,80,69, +84,16,14,30,17,51,86,36,73,80,80,112,62,132,50,17,43,26,3,23,23,22,67,46, +61,159,35,17,33,17,25,75,50,100,109,8,22,17,121,59,28,30,42,38,83,116,115, +79,80,25,26,34,52,19,17,38,20,115,78,38,40,80,78,109,86,98,40,3,5,3,37,41, +76,116,118,83,80,60,51,19,61,45,81,125,46,45,76,31,39,30,0,1,0,102,255,233, +4,90,4,121,0,39,0,38,64,23,18,2,1,4,2,1,8,29,41,16,12,64,12,80,12,112,12, +128,12,5,12,16,0,0,47,47,1,47,93,16,206,49,48,94,93,93,5,46,1,39,46,1,39, +46,1,39,46,1,53,52,55,54,51,50,23,30,1,23,62,1,51,50,22,23,22,21,20,7,14, +1,7,14,1,7,14,1,2,98,14,42,26,28,103,76,56,69,14,43,37,68,70,102,98,78,28, +47,17,34,142,88,50,85,35,70,41,20,78,60,75,108,32,31,44,23,56,101,48,50,147, +102,76,93,22,65,106,56,103,71,70,72,28,80,54,119,117,36,34,70,94,86,88,45, +119,75,96,152,55,54,110,0,0,0,0,1,0,66,255,231,3,210,4,199,0,26,0,18,183, +48,12,1,12,75,21,1,21,0,25,47,93,1,47,93,49,48,1,30,1,23,30,1,23,14,1,7,14, +1,7,46,1,39,46,1,39,46,1,39,62,1,55,62,1,2,7,45,113,69,69,116,47,39,120,83, +69,106,40,13,35,22,38,98,60,14,94,81,50,128,80,59,96,4,199,78,165,93,93,141, +53,40,150,111,93,159,72,25,58,32,57,135,80,20,119,99,59,160,107,77,148,0, +0,1,0,196,0,29,3,59,4,129,0,33,0,48,64,25,2,19,33,13,64,79,6,95,6,111,6,3, +6,128,27,33,18,10,10,47,0,1,0,31,24,0,47,205,204,93,57,47,57,1,47,205,26, +220,93,26,205,16,205,50,49,48,1,51,21,23,30,1,21,20,6,7,35,62,1,53,52,38, +39,38,39,17,20,6,7,6,35,34,38,53,52,55,54,51,50,23,1,233,76,153,51,58,48, +46,47,29,28,28,29,57,64,37,37,72,108,57,58,60,63,80,44,46,4,129,100,193,69, +163,85,78,134,59,65,124,59,60,99,40,81,9,254,6,63,98,38,75,54,46,73,60,60, +19,0,2,1,16,255,213,4,239,4,135,0,34,0,38,0,108,64,61,35,32,64,18,26,128, +36,15,64,111,0,1,0,128,15,9,1,9,9,0,26,1,26,17,35,86,35,1,67,35,1,35,16,36, +54,36,1,37,36,1,20,36,1,3,36,1,8,36,34,38,33,88,33,1,33,37,34,30,23,13,6, +0,47,205,47,205,47,51,51,93,17,51,17,51,94,93,93,93,93,17,51,51,93,93,17, +51,1,47,93,51,47,93,26,221,93,26,205,50,26,16,221,26,205,51,49,48,1,20,6, +7,14,1,35,34,38,53,52,55,54,51,50,23,17,5,17,20,6,7,6,35,34,38,53,52,55,54, +51,50,23,17,37,1,37,53,5,4,239,36,38,37,88,51,57,57,57,62,81,48,42,253,218, +37,35,74,106,57,58,59,60,84,45,45,2,186,253,144,2,38,253,218,1,68,63,101, +35,37,39,54,47,76,57,59,18,1,192,149,254,118,62,98,38,74,53,45,76,57,60,19, +2,240,178,254,103,149,117,152,0,0,0,3,0,29,0,0,3,118,5,204,0,27,0,31,0,35, +0,100,179,67,10,1,10,184,255,224,64,59,8,12,72,31,35,70,28,47,32,143,32,207, +32,3,31,32,79,32,111,32,143,32,4,32,79,16,95,16,2,16,16,1,70,144,2,1,111, +2,1,2,34,15,31,83,30,0,19,80,12,0,0,4,80,25,5,15,32,1,21,0,63,51,63,51,237, +50,63,237,63,237,63,1,47,93,93,237,50,47,93,47,93,113,51,237,50,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,53,51,21,3,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18, +40,51,29,11,211,134,180,180,180,3,183,252,73,3,183,131,122,59,101,75,43,6, +6,137,3,5,22,41,60,39,97,131,1,105,172,172,250,224,4,58,251,198,0,0,0,0,2, +0,29,0,0,3,119,5,204,0,27,0,31,0,90,179,67,10,1,10,184,255,224,64,53,8,12, +72,31,70,47,28,143,28,207,28,3,31,28,79,28,111,28,143,28,4,28,79,16,95,16, +2,16,16,1,70,144,2,1,111,2,1,2,30,0,19,80,12,0,0,4,80,25,5,15,28,1,21,0,63, +51,63,51,237,50,63,237,63,1,47,93,93,237,50,47,93,47,93,113,237,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51,29, +11,211,135,180,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41, +60,39,97,131,252,73,5,204,250,52,0,0,1,0,119,254,78,1,227,255,170,0,28,0, +75,185,0,2,255,232,179,9,17,72,27,184,255,224,64,40,9,17,72,22,22,8,16,131, +15,0,1,95,0,1,0,8,19,140,63,23,79,23,2,23,11,140,0,5,16,5,32,5,80,5,96,5, +112,5,6,5,0,47,93,237,47,93,237,1,47,221,93,113,237,18,57,47,49,48,43,43, +5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35,42,1,7,55,51,50,30,2,1, +227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14,29,14,31,62,52,84,60, +32,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,96,18,41,63,0,0,0,255,255, +0,243,1,190,1,182,2,154,17,6,0,119,56,0,0,18,64,11,0,127,0,1,111,0,1,95,0, +1,0,17,93,93,93,53,0,1,0,127,254,78,1,72,255,158,0,10,0,75,185,0,5,255,192, +179,9,17,72,2,184,255,192,64,28,9,17,72,7,151,0,150,4,9,8,146,16,3,32,3,2, +0,3,96,3,160,3,176,3,192,3,5,3,184,255,192,64,10,30,33,72,3,0,9,16,9,2,9, +0,47,93,204,43,93,113,237,1,47,51,253,237,49,48,43,43,5,20,6,7,35,62,1,53, +35,53,51,1,72,44,40,117,45,49,88,195,193,87,107,47,48,86,46,156,0,0,0,0,2, +0,14,2,51,2,150,5,129,0,10,0,23,0,108,64,74,86,10,1,86,9,1,121,6,137,6,2, +17,175,5,191,5,2,5,64,29,60,72,5,64,24,27,72,5,8,1,224,18,6,16,2,1,48,2,1, +64,2,144,2,2,2,0,4,229,8,5,95,17,111,17,127,17,3,15,17,31,17,127,17,143,17, +4,17,17,1,11,6,220,1,223,0,63,63,51,18,57,47,93,113,51,51,237,50,1,47,93, +113,114,51,51,237,50,47,43,43,93,51,49,48,93,114,114,1,21,35,53,33,53,1,51, +17,51,21,3,14,3,7,3,33,17,60,2,54,2,39,131,254,106,1,130,151,111,240,7,22, +24,22,7,199,1,23,1,2,229,178,178,111,2,45,253,213,113,2,23,13,37,39,35,11, +254,225,1,33,14,38,38,34,0,0,0,0,1,0,53,2,40,2,124,5,129,0,38,0,134,64,37, +37,36,53,36,69,36,3,3,24,9,13,72,19,34,1,4,34,1,3,31,30,25,224,139,27,1,6, +27,10,192,26,208,26,224,26,3,26,184,255,192,64,53,16,19,72,26,29,0,225,32, +19,96,19,2,32,19,96,19,160,19,224,19,4,19,22,228,34,34,16,30,229,27,220,68, +11,84,11,100,11,3,53,11,1,6,11,22,11,38,11,3,11,16,228,5,221,0,63,237,50, +93,93,93,63,237,18,57,47,237,1,47,93,113,237,50,47,43,93,51,51,95,113,237, +50,50,0,95,93,93,49,48,43,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,38,35,34,6,7,35,19,33,21,33,7,62,1,51,50,30,2,2,124,38,73,108,70,66,101, +74,44,9,133,5,24,39,54,36,71,86,81,75,51,77,23,129,33,1,250,254,114,19,29, +91,54,67,103,69,36,3,67,65,104,74,40,33,59,81,48,15,27,47,36,21,85,93,81, +85,37,23,1,212,113,245,26,33,39,71,102,0,0,0,1,0,43,2,52,2,120,5,129,0,14, +0,54,64,33,5,224,6,6,0,175,12,191,12,2,12,11,96,0,1,191,0,207,0,255,0,3,96, +0,1,0,0,12,229,13,220,5,223,0,63,63,237,50,1,47,93,93,113,51,47,93,17,57, +47,237,49,48,1,14,3,21,35,52,62,2,55,33,53,33,2,120,64,106,77,43,133,47,80, +107,60,254,52,2,77,5,28,97,176,176,187,108,102,188,179,175,88,113,0,3,0,45, +2,40,2,130,5,142,0,19,0,39,0,81,0,138,185,0,68,255,232,179,11,15,72,64,184, +255,232,64,82,11,15,72,47,24,9,13,72,43,24,9,13,72,5,15,21,15,2,76,55,71, +10,226,72,61,1,61,61,30,226,224,50,1,191,50,1,50,0,226,70,71,1,71,71,40,226, +32,20,96,20,2,32,20,96,20,160,20,224,20,4,20,76,56,25,228,15,15,35,26,5,1, +11,5,1,5,228,66,222,35,228,45,221,0,63,237,63,237,93,93,18,57,47,237,57,57, +1,47,93,113,237,50,47,113,237,47,93,93,237,51,47,113,237,18,57,57,0,93,49, +48,43,43,43,43,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,19,52,46,2,35,34, +14,2,21,20,30,2,51,50,62,2,55,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3,53, +52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,1,223,12,31,53,41,39,53,31,13,9,29, +54,45,48,54,27,7,21,13,35,61,49,45,59,36,15,15,36,61,46,46,61,34,14,142,35, +73,113,77,77,113,74,35,29,47,61,32,36,55,38,20,35,70,104,68,72,105,69,33, +20,38,56,36,36,63,46,26,4,169,28,48,34,19,19,34,48,28,23,47,39,25,25,39,48, +254,155,28,52,40,24,24,41,53,28,35,59,42,23,23,42,60,22,54,91,66,37,37,66, +90,54,46,72,52,32,5,3,8,37,52,64,35,45,79,59,34,35,60,79,44,35,63,52,37,7, +3,6,31,52,72,0,1,255,229,4,176,2,195,5,240,0,17,0,62,64,41,117,11,133,11, +2,117,7,133,7,2,12,73,15,13,191,13,239,13,3,13,6,73,64,5,12,5,128,9,142,15, +0,47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,205,50,1,47,26,237,220,93,237, +49,48,0,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,84,111,141,81,32, +2,164,6,104,93,93,104,6,164,2,32,81,141,4,176,57,91,115,57,103,96,96,103, +57,115,91,57,0,1,0,124,4,28,1,69,5,129,0,10,0,36,64,21,7,151,0,150,4,9,8, +146,80,3,96,3,2,160,3,176,3,2,3,9,3,0,63,204,93,113,237,1,47,51,253,237,49, +48,1,20,6,7,35,62,1,53,35,53,51,1,69,44,40,117,45,49,88,195,5,23,87,117,47, +48,96,46,167,0,0,1,0,130,4,187,1,75,6,32,0,10,0,47,64,30,4,9,150,7,151,10, +7,146,95,3,111,3,2,175,3,191,3,2,3,80,10,1,15,10,63,10,127,10,3,10,0,47,93, +113,205,93,113,237,1,47,237,237,50,49,48,19,52,54,55,51,14,1,21,51,21,35, +130,44,40,117,45,49,88,195,5,37,87,117,47,48,96,46,167,0,0,0,0,1,0,106,5, +250,2,18,6,240,0,5,0,48,64,30,117,3,133,3,2,128,4,1,64,4,1,4,64,1,2,64,16, +20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43,1,47,26,205,93,93, +49,48,93,1,37,53,51,23,21,1,160,254,202,207,217,5,250,217,29,226,20,0,1,0, +72,5,250,1,240,6,240,0,5,0,52,64,34,122,2,138,2,2,64,3,128,3,2,3,64,79,0, +143,0,2,0,2,64,16,20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43, +1,47,93,26,205,93,49,48,93,19,53,55,51,21,5,72,217,207,254,202,5,250,20,226, +29,217,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,9,134,9,2,120,8,136, +8,2,128,0,1,0,184,255,192,64,25,11,15,72,0,6,4,142,64,8,64,16,19,72,8,128, +6,95,1,1,1,64,9,12,72,1,0,47,43,93,51,26,221,43,26,237,1,47,204,43,93,49, +48,93,93,1,21,35,39,35,7,35,53,55,51,2,150,105,219,2,232,104,234,204,6,14, +20,139,139,20,240,0,0,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,0,134, +0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,25,11,15,72,8,64,2,7,3,64,16,19, +72,3,128,6,142,95,1,1,1,64,9,12,72,1,0,47,43,93,237,26,205,43,50,1,47,26, +204,43,93,49,48,93,93,1,35,39,53,51,23,51,55,51,21,1,182,204,234,104,232, +2,219,105,5,250,239,21,139,139,21,0,0,0,0,2,0,45,5,250,2,90,6,178,0,3,0,7, +0,35,64,19,3,133,0,7,133,4,1,5,145,0,95,4,1,4,64,9,12,72,4,0,47,43,93,51, +237,50,1,47,237,220,237,49,48,1,53,51,21,33,53,51,21,1,183,163,253,211,165, +5,250,184,184,184,184,0,0,1,255,233,5,250,2,182,7,6,0,27,0,68,181,89,2,105, +2,2,26,184,255,232,64,34,9,15,72,12,24,9,15,72,64,23,1,15,23,1,23,9,22,5, +143,64,14,128,19,143,8,95,0,1,0,64,9,12,72,0,0,47,43,93,50,237,26,221,26, +237,51,1,47,204,93,93,49,48,43,43,0,93,1,34,46,2,35,34,6,7,35,62,3,51,50, +30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45,74,59,44, +84,78,69,30,54,55,8,92,5,20,43,74,5,250,37,45,37,62,57,45,95,78,50,37,45, +37,63,56,44,95,78,51,0,0,0,0,2,0,32,5,250,3,15,6,241,0,5,0,11,0,88,64,60, +154,8,170,8,2,154,2,170,2,2,102,10,1,98,4,1,98,3,1,10,159,7,1,15,7,31,7,127, +7,223,7,4,7,7,4,64,0,64,9,31,72,0,8,2,64,16,20,72,2,128,6,95,0,1,0,64,9,12, +72,0,0,47,43,93,50,26,205,43,50,1,47,43,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,19,53,55,51,21,5,51,53,55,51,21,5,32,197,207,254,202,253,197, +207,254,202,5,250,20,227,29,218,20,227,29,218,0,1,255,232,5,250,2,130,6,243, +0,17,0,55,64,32,4,11,1,4,7,1,17,15,19,1,100,13,64,5,12,5,64,16,20,72,5,128, +9,95,0,1,0,64,9,12,72,0,0,47,43,93,205,26,205,43,50,1,47,26,204,94,93,49, +48,0,94,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,52,74,116,84,50, +8,117,17,109,91,91,107,17,117,9,50,83,116,5,250,41,69,90,49,53,60,61,52,49, +90,69,41,0,0,0,0,0,0,1,0,0,21,86,0,1,3,140,12,0,0,9,9,72,0,3,0,36,255,143, +0,3,0,55,255,219,0,3,0,60,255,219,0,3,1,82,255,143,0,3,1,91,255,143,0,3,1, +94,255,143,0,3,1,101,255,143,0,3,1,109,255,219,0,3,1,110,255,219,0,3,1,116, +255,219,0,20,0,20,255,104,0,36,0,3,255,143,0,36,0,55,255,104,0,36,0,57,255, +104,0,36,0,58,255,180,0,36,0,60,255,104,0,36,0,89,255,219,0,36,0,90,255,219, +0,36,0,92,255,219,0,36,2,3,255,104,0,41,0,15,255,29,0,41,0,17,255,29,0,41, +0,36,255,143,0,47,0,3,255,180,0,47,0,55,255,104,0,47,0,57,255,104,0,47,0, +58,255,104,0,47,0,60,255,104,0,47,0,92,255,180,0,47,2,3,255,143,0,51,0,3, +255,219,0,51,0,15,254,248,0,51,0,17,254,248,0,51,0,36,255,104,0,53,0,55,255, +219,0,53,0,57,255,219,0,53,0,58,255,219,0,53,0,60,255,219,0,55,0,3,255,219, +0,55,0,15,255,29,0,55,0,16,255,143,0,55,0,17,255,29,0,55,0,29,255,29,0,55, +0,30,255,29,0,55,0,36,255,104,0,55,0,50,255,219,0,55,0,68,255,29,0,55,0,70, +255,29,0,55,0,72,255,29,0,55,0,76,255,180,0,55,0,82,255,29,0,55,0,85,255, +180,0,55,0,86,255,29,0,55,0,88,255,180,0,55,0,90,255,143,0,55,0,92,255,143, +0,57,0,15,255,68,0,57,0,16,255,143,0,57,0,17,255,68,0,57,0,29,255,180,0,57, +0,30,255,180,0,57,0,36,255,104,0,57,0,68,255,104,0,57,0,72,255,143,0,57,0, +76,255,219,0,57,0,82,255,143,0,57,0,85,255,180,0,57,0,88,255,180,0,57,0,92, +255,180,0,58,0,15,255,143,0,58,0,16,255,219,0,58,0,17,255,143,0,58,0,29,255, +219,0,58,0,30,255,219,0,58,0,36,255,180,0,58,0,68,255,180,0,58,0,72,255,219, +0,58,0,82,255,219,0,58,0,85,255,219,0,58,0,88,255,219,0,58,0,92,255,238,0, +60,0,3,255,219,0,60,0,15,254,248,0,60,0,16,255,68,0,60,0,17,254,248,0,60, +0,29,255,143,0,60,0,30,255,123,0,60,0,36,255,104,0,60,0,68,255,104,0,60,0, +72,255,68,0,60,0,76,255,180,0,60,0,82,255,68,0,60,0,83,255,104,0,60,0,84, +255,68,0,60,0,88,255,143,0,60,0,89,255,143,0,73,0,73,255,219,0,73,2,3,0,37, +0,85,0,15,255,143,0,85,0,17,255,143,0,85,2,3,0,76,0,89,0,15,255,104,0,89, +0,17,255,104,0,90,0,15,255,143,0,90,0,17,255,143,0,92,0,15,255,104,0,92,0, +17,255,104,1,82,1,98,255,213,1,82,1,105,255,213,1,82,1,109,255,104,1,82,1, +110,255,104,1,82,1,111,255,197,1,82,1,116,255,104,1,82,1,124,255,219,1,82, +1,134,255,219,1,82,1,144,255,219,1,87,1,110,255,190,1,88,1,90,0,170,1,88, +1,91,255,104,1,88,1,94,255,104,1,88,1,98,255,141,1,88,1,101,255,104,1,88, +1,105,255,141,1,88,1,111,255,141,1,88,1,114,255,158,1,88,1,119,255,104,1, +88,1,120,255,180,1,88,1,122,255,70,1,88,1,128,255,104,1,88,1,130,255,180, +1,88,1,131,255,104,1,88,1,133,255,104,1,88,1,136,255,70,1,88,1,140,255,70, +1,88,1,143,255,70,1,88,1,147,0,98,1,88,1,149,255,70,1,89,1,110,255,209,1, +89,1,116,255,209,1,91,0,3,255,143,1,91,1,98,255,213,1,91,1,105,255,213,1, +91,1,109,255,104,1,91,1,110,255,104,1,91,1,111,255,197,1,91,1,116,255,104, +1,91,1,124,255,219,1,91,1,134,255,219,1,91,1,144,255,219,1,91,2,3,255,104, +1,93,0,15,255,31,1,93,0,17,255,31,1,93,1,90,0,164,1,93,1,91,255,68,1,93,1, +94,255,68,1,93,1,101,255,68,1,93,1,130,255,168,1,93,1,147,0,88,1,94,0,3,255, +143,1,94,1,98,255,213,1,94,1,105,255,213,1,94,1,109,255,137,1,94,1,110,255, +104,1,94,1,116,255,104,1,98,1,91,255,219,1,98,1,94,255,219,1,98,1,101,255, +219,1,98,1,110,255,190,1,98,1,116,255,190,1,100,1,98,255,193,1,100,1,105, +255,193,1,100,1,111,255,143,1,100,1,117,255,231,1,100,1,122,255,231,1,100, +1,125,255,231,1,100,1,127,255,231,1,100,1,129,255,231,1,100,1,135,255,231, +1,100,1,136,255,231,1,100,1,140,255,231,1,100,1,143,255,231,1,100,1,146,255, +231,1,100,1,149,255,231,1,100,1,151,255,231,1,101,0,3,255,143,1,101,1,98, +255,213,1,101,1,105,255,213,1,101,1,109,255,104,1,101,1,110,255,104,1,101, +1,116,255,104,1,105,1,91,255,219,1,105,1,94,255,213,1,105,1,101,255,219,1, +105,1,110,255,190,1,105,1,116,255,190,1,107,0,3,255,219,1,107,0,15,254,250, +1,107,0,17,254,250,1,107,1,91,255,104,1,107,1,94,255,104,1,107,1,101,255, +104,1,108,1,137,255,158,1,108,1,141,255,158,1,109,0,3,255,219,1,109,0,15, +255,31,1,109,0,17,255,31,1,109,0,29,255,31,1,109,0,30,255,31,1,109,1,90,0, +188,1,109,1,91,255,104,1,109,1,94,255,104,1,109,1,98,255,219,1,109,1,101, +255,104,1,109,1,105,255,219,1,109,1,111,255,219,1,109,1,114,255,219,1,109, +1,117,255,31,1,109,1,118,255,31,1,109,1,121,255,78,1,109,1,122,255,31,1,109, +1,124,255,78,1,109,1,126,255,31,1,109,1,128,255,106,1,109,1,130,255,180,1, +109,1,133,255,106,1,109,1,134,255,143,1,109,1,136,255,31,1,109,1,140,255, +31,1,109,1,142,255,80,1,109,1,143,255,31,1,109,1,144,255,143,1,109,1,145, +255,106,1,109,1,147,0,188,1,109,1,148,255,78,1,109,1,149,255,31,1,109,1,150, +255,78,1,110,0,3,255,219,1,110,0,15,254,250,1,110,0,16,255,70,1,110,0,17, +254,250,1,110,0,29,255,143,1,110,0,30,255,143,1,110,1,90,0,188,1,110,1,91, +255,104,1,110,1,94,255,104,1,110,1,98,255,141,1,110,1,101,255,104,1,110,1, +105,255,141,1,110,1,111,255,141,1,110,1,114,255,158,1,110,1,119,255,104,1, +110,1,120,255,180,1,110,1,122,255,70,1,110,1,124,255,158,1,110,1,128,255, +104,1,110,1,130,255,180,1,110,1,131,255,104,1,110,1,133,255,104,1,110,1,136, +255,70,1,110,1,140,255,70,1,110,1,143,255,70,1,110,1,147,0,121,1,110,1,149, +255,70,1,111,1,91,255,197,1,111,1,110,255,190,1,111,1,116,255,190,1,113,1, +117,255,178,1,113,1,122,255,178,1,113,1,125,255,178,1,113,1,129,255,217,1, +113,1,136,255,178,1,113,1,140,255,178,1,113,1,143,255,178,1,113,1,146,255, +178,1,113,1,149,255,178,1,113,1,151,255,178,1,114,1,110,255,209,1,114,1,116, +255,209,1,116,0,3,255,219,1,116,1,90,0,170,1,116,1,91,255,104,1,116,1,94, +255,104,1,116,1,98,255,141,1,116,1,101,255,104,1,116,1,105,255,141,1,116, +1,111,255,141,1,116,1,114,255,158,1,116,1,119,255,104,1,116,1,120,255,180, +1,116,1,122,255,70,1,116,1,128,255,104,1,116,1,130,255,180,1,116,1,131,255, +104,1,116,1,133,255,104,1,116,1,136,255,70,1,116,1,140,255,70,1,116,1,143, +255,70,1,116,1,147,0,98,1,116,1,149,255,70,1,125,1,132,255,217,1,125,1,137, +255,227,1,125,1,141,255,227,1,125,1,144,255,201,1,127,1,117,255,119,1,127, +1,119,255,219,1,127,1,122,255,119,1,127,1,124,255,170,1,127,1,125,255,180, +1,127,1,128,255,219,1,127,1,129,255,158,1,127,1,130,255,219,1,127,1,131,255, +219,1,127,1,134,255,170,1,127,1,136,255,119,1,127,1,137,255,170,1,127,1,140, +255,119,1,127,1,141,255,170,1,127,1,143,255,119,1,127,1,146,255,119,1,127, +1,149,255,119,1,127,1,151,255,119,1,129,1,132,255,217,1,131,1,117,255,231, +1,131,1,122,255,231,1,131,1,125,255,231,1,131,1,127,255,231,1,131,1,129,255, +231,1,131,1,135,255,231,1,131,1,136,255,231,1,131,1,139,255,231,1,131,1,140, +255,231,1,131,1,143,255,231,1,131,1,146,255,231,1,131,1,149,255,231,1,131, +1,151,255,231,1,132,1,117,255,225,1,132,1,122,255,225,1,132,1,125,255,225, +1,132,1,135,255,225,1,132,1,136,255,225,1,132,1,139,255,209,1,132,1,140,255, +225,1,132,1,142,255,207,1,132,1,143,255,219,1,132,1,146,255,225,1,132,1,149, +255,225,1,132,1,150,255,207,1,132,1,151,255,225,1,135,1,117,255,201,1,135, +1,122,255,201,1,135,1,125,255,201,1,135,1,127,255,201,1,135,1,135,255,201, +1,135,1,136,255,201,1,135,1,139,255,201,1,135,1,140,255,201,1,135,1,143,255, +201,1,135,1,149,255,201,1,136,1,132,255,217,1,136,1,137,255,227,1,136,1,141, +255,227,1,136,1,144,255,201,1,137,1,117,255,227,1,137,1,122,255,227,1,137, +1,127,255,227,1,137,1,136,255,227,1,137,1,139,255,227,1,137,1,140,255,227, +1,137,1,143,255,227,1,137,1,146,255,227,1,137,1,151,255,227,1,138,1,132,255, +217,1,138,1,137,255,227,1,138,1,141,255,227,1,141,1,117,255,227,1,141,1,122, +255,227,1,141,1,125,255,227,1,141,1,127,255,227,1,141,1,136,255,227,1,141, +1,139,255,227,1,141,1,140,255,227,1,141,1,143,255,227,1,141,1,146,255,227, +1,141,1,151,255,227,1,143,1,132,255,217,1,143,1,137,255,227,1,143,1,141,255, +227,1,143,1,144,255,201,1,144,1,117,255,201,1,144,1,122,255,201,1,144,1,125, +255,201,1,144,1,127,255,201,1,144,1,136,255,201,1,144,1,139,255,201,1,144, +1,140,255,201,1,144,1,143,255,201,1,144,1,146,255,201,1,144,1,149,255,201, +1,144,1,151,255,201,1,146,1,132,255,217,1,146,1,137,255,227,1,146,1,141,255, +227,1,146,1,144,255,201,1,149,1,132,255,217,1,149,1,137,255,227,1,149,1,141, +255,227,1,149,1,144,255,201,1,151,1,132,255,217,1,151,1,137,255,227,1,151, +1,141,255,227,1,151,1,144,255,201,1,154,0,15,255,6,1,154,0,17,255,6,1,154, +0,108,255,119,1,154,0,123,255,119,1,154,1,255,255,211,1,160,2,3,255,96,1, +161,2,3,255,119,1,166,1,170,0,68,1,166,1,173,255,233,1,166,1,177,0,45,1,166, +1,180,255,211,1,166,1,181,255,233,1,166,1,183,255,211,1,166,1,184,255,96, +1,166,1,185,255,166,1,166,1,186,255,188,1,166,1,189,255,96,1,166,1,195,255, +211,1,166,1,198,0,23,1,166,1,216,255,211,1,166,1,217,255,233,1,166,1,218, +0,23,1,166,1,227,0,45,1,166,2,3,255,141,1,167,1,166,255,211,1,167,1,173,255, +233,1,167,1,180,255,233,1,167,1,183,255,233,1,167,1,184,255,164,1,167,1,185, +255,209,1,167,1,186,255,233,1,167,1,187,255,211,1,167,1,189,255,164,1,167, +1,192,255,188,1,167,1,195,255,233,1,167,1,197,255,233,1,167,1,209,255,233, +1,167,1,217,255,211,1,168,1,166,255,188,1,168,1,170,255,211,1,168,1,172,255, +211,1,168,1,173,255,188,1,168,1,177,255,233,1,168,1,180,255,188,1,168,1,183, +255,188,1,168,1,184,255,119,1,168,1,185,255,188,1,168,1,186,255,188,1,168, +1,187,255,166,1,168,1,189,255,164,1,168,1,192,255,141,1,168,1,197,255,188, +1,168,1,202,255,233,1,168,1,210,255,233,1,168,1,216,255,188,1,168,1,217,255, +233,1,168,1,219,255,233,1,168,1,221,255,188,1,168,1,229,255,233,1,169,0,15, +255,6,1,169,0,17,255,6,1,169,0,108,255,119,1,169,0,123,255,119,1,169,1,166, +255,119,1,169,1,170,255,119,1,169,1,173,255,211,1,169,1,177,255,141,1,169, +1,178,255,209,1,169,1,180,255,141,1,169,1,183,255,164,1,169,1,197,255,188, +1,169,1,198,255,141,1,169,1,200,255,141,1,169,1,202,255,119,1,169,1,203,255, +119,1,169,1,206,255,141,1,169,1,209,255,141,1,169,1,210,255,141,1,169,1,211, +255,141,1,169,1,212,255,119,1,169,1,214,255,141,1,169,1,217,255,119,1,169, +1,225,255,141,1,169,1,226,255,141,1,169,1,228,255,141,1,169,1,229,255,119, +1,169,1,255,255,211,1,170,1,185,0,23,1,170,1,186,255,211,1,170,1,189,255, +186,1,170,1,205,0,68,1,170,1,212,0,23,1,170,1,217,0,45,1,171,1,173,255,211, +1,171,1,215,255,233,1,172,1,173,255,233,1,172,1,180,255,211,1,172,1,183,255, +233,1,172,1,184,0,23,1,172,1,185,0,45,1,172,1,192,0,45,1,172,1,198,0,23,1, +172,1,203,255,231,1,172,1,212,255,233,1,172,1,217,255,233,1,173,1,177,255, +233,1,173,1,180,255,233,1,173,1,183,255,233,1,173,1,184,255,211,1,173,1,185, +255,233,1,173,1,186,255,233,1,173,1,189,255,211,1,173,1,197,255,233,1,176, +1,173,255,233,1,176,1,180,255,233,1,176,1,183,255,233,1,176,1,185,0,23,1, +176,1,186,255,186,1,177,1,186,255,233,1,177,1,199,0,23,1,177,1,217,0,23,1, +178,1,186,255,233,1,178,1,189,255,233,1,178,1,198,0,23,1,178,1,203,0,23,1, +178,1,212,0,23,1,178,1,215,0,23,1,178,1,217,0,23,1,178,1,221,255,233,1,178, +1,227,0,23,1,180,1,166,255,211,1,180,1,170,255,211,1,180,1,172,255,211,1, +180,1,177,255,233,1,180,1,185,255,211,1,180,1,187,255,164,1,180,1,189,255, +211,1,180,1,197,255,211,1,180,1,202,255,211,1,180,1,209,255,233,1,180,1,219, +255,233,1,182,0,15,254,125,1,182,0,17,254,125,1,182,0,29,255,211,1,182,0, +30,255,211,1,182,0,123,255,141,1,182,1,166,255,119,1,182,1,170,255,119,1, +182,1,172,255,233,1,182,1,173,255,211,1,182,1,177,255,141,1,182,1,178,255, +233,1,182,1,180,255,211,1,182,1,183,255,233,1,182,1,184,255,164,1,182,1,185, +255,211,1,182,1,186,255,233,1,182,1,187,255,164,1,182,1,197,255,211,1,182, +1,198,255,188,1,182,1,202,255,96,1,182,1,203,255,166,1,182,1,212,255,166, +1,182,1,227,255,211,1,182,1,229,255,188,1,183,1,166,255,211,1,183,1,170,255, +211,1,183,1,173,255,233,1,183,1,177,255,188,1,183,1,178,255,233,1,183,1,180, +255,211,1,183,1,184,255,188,1,183,1,185,255,188,1,183,1,187,255,141,1,183, +1,189,255,188,1,183,1,192,255,186,1,183,1,195,255,233,1,183,1,198,0,23,1, +183,1,204,0,45,1,183,1,221,255,233,1,184,0,15,255,29,1,184,0,17,255,29,1, +184,0,108,255,166,1,184,0,123,255,166,1,184,1,166,255,188,1,184,1,170,255, +188,1,184,1,172,0,23,1,184,1,173,255,233,1,184,1,177,255,211,1,184,1,180, +255,164,1,184,1,186,255,188,1,184,1,197,255,211,1,184,1,198,255,164,1,184, +1,200,255,166,1,184,1,203,255,141,1,184,1,206,255,166,1,184,1,208,255,166, +1,184,1,209,255,164,1,184,1,210,255,166,1,184,1,212,255,96,1,184,1,213,255, +166,1,184,1,214,255,141,1,184,1,215,255,141,1,184,1,217,255,141,1,184,1,219, +255,166,1,184,1,223,255,166,1,184,1,225,255,166,1,184,1,226,255,166,1,184, +1,228,255,166,1,184,1,229,255,141,1,184,1,255,255,211,1,185,0,15,254,240, +1,185,0,17,254,240,1,185,0,29,255,211,1,185,0,30,255,211,1,185,0,108,255, +166,1,185,0,123,255,164,1,185,1,166,255,119,1,185,1,170,255,164,1,185,1,173, +255,211,1,185,1,177,255,188,1,185,1,180,255,188,1,185,1,186,255,188,1,185, +1,195,255,211,1,185,1,197,255,211,1,185,1,199,255,211,1,185,1,200,255,141, +1,185,1,201,255,164,1,185,1,202,255,96,1,185,1,203,255,119,1,185,1,204,255, +188,1,185,1,205,255,141,1,185,1,206,255,164,1,185,1,207,255,188,1,185,1,208, +255,164,1,185,1,209,255,119,1,185,1,210,255,164,1,185,1,211,255,164,1,185, +1,212,255,119,1,185,1,213,255,164,1,185,1,214,255,164,1,185,1,215,255,119, +1,185,1,219,255,164,1,185,1,220,255,164,1,185,1,222,255,164,1,185,1,223,255, +164,1,185,1,228,255,164,1,185,1,229,255,119,1,185,1,255,255,233,1,186,1,166, +255,211,1,186,1,170,255,188,1,186,1,177,255,188,1,186,1,184,255,141,1,186, +1,185,255,164,1,186,1,189,255,211,1,186,1,197,255,186,1,186,1,209,255,188, +1,187,1,173,255,211,1,187,1,180,255,188,1,187,1,183,255,188,1,187,1,186,255, +188,1,187,1,195,255,186,1,187,1,212,255,233,1,187,1,217,255,211,1,188,1,180, +255,211,1,188,1,198,0,45,1,191,1,198,0,23,1,191,1,217,0,45,1,192,1,197,255, +188,1,192,2,3,255,119,1,194,1,166,255,211,1,194,1,170,255,211,1,194,1,172, +255,188,1,194,1,173,255,233,1,194,1,177,255,186,1,194,1,178,255,211,1,194, +1,180,255,211,1,194,1,183,255,211,1,194,1,184,255,51,1,194,1,187,255,164, +1,194,1,189,255,96,1,194,1,195,255,233,1,194,1,197,255,164,1,194,2,3,255, +96,1,195,1,170,255,188,1,195,1,172,255,231,1,195,1,173,255,233,1,195,1,177, +255,188,1,195,1,187,255,186,1,195,1,197,255,211,1,195,1,202,255,188,1,195, +1,204,0,23,1,195,1,209,255,188,1,195,1,210,255,233,1,195,1,229,255,233,1, +196,1,166,255,188,1,196,1,170,255,166,1,196,1,172,255,211,1,196,1,177,255, +164,1,196,1,180,255,233,1,196,1,183,255,233,1,196,1,184,255,141,1,196,1,187, +255,164,1,196,1,189,255,188,1,196,1,202,255,164,1,196,1,209,255,164,1,196, +1,210,255,233,1,198,1,205,255,233,1,198,1,216,255,211,1,198,1,217,255,233, +1,198,1,221,255,211,1,199,1,198,255,209,1,199,1,202,255,164,1,199,1,203,255, +233,1,199,1,204,255,233,1,199,1,205,255,211,1,199,1,209,255,164,1,199,1,210, +255,211,1,199,1,215,255,233,1,199,1,217,255,211,1,199,1,218,255,233,1,199, +1,219,255,188,1,199,1,221,255,188,1,199,1,224,255,188,1,199,1,227,255,233, +1,199,1,229,255,211,1,200,1,198,255,233,1,200,1,199,255,233,1,200,1,202,255, +233,1,200,1,203,255,233,1,200,1,204,255,233,1,200,1,205,255,233,1,200,1,209, +255,209,1,200,1,210,255,233,1,200,1,212,255,233,1,200,1,215,255,233,1,200, +1,216,255,211,1,200,1,217,255,211,1,200,1,218,255,233,1,200,1,221,255,164, +1,200,1,224,255,188,1,200,1,229,255,233,1,201,0,15,255,6,1,201,0,17,255,6, +1,201,1,198,255,211,1,201,1,202,255,164,1,201,1,203,255,211,1,201,1,205,255, +233,1,201,1,209,255,211,1,201,1,212,255,211,1,201,1,215,255,211,1,201,1,229, +255,233,1,202,1,224,255,211,1,202,1,227,0,23,1,203,1,199,255,233,1,203,1, +202,255,211,1,203,1,204,255,233,1,203,1,205,255,211,1,203,1,209,255,188,1, +203,1,216,255,188,1,203,1,217,255,233,1,203,1,219,255,211,1,203,1,221,255, +188,1,204,1,199,0,23,1,204,1,217,0,23,1,204,1,221,255,233,1,204,1,224,0,45, +1,205,1,199,255,233,1,205,1,202,255,211,1,205,1,203,255,233,1,205,1,205,255, +233,1,205,1,209,255,233,1,205,1,212,255,233,1,205,1,215,255,233,1,205,1,217, +255,233,1,205,1,218,255,233,1,205,1,221,255,188,1,205,1,224,255,211,1,208, +1,198,0,45,1,208,1,199,0,45,1,208,1,203,0,23,1,208,1,205,0,23,1,208,1,209, +0,23,1,208,1,212,0,23,1,208,1,215,0,23,1,208,1,216,0,23,1,208,1,217,0,23, +1,208,1,227,0,23,1,209,1,212,0,23,1,209,1,221,255,211,1,210,1,199,255,233, +1,210,1,205,255,233,1,210,1,217,0,23,1,212,1,202,255,211,1,212,1,204,255, +233,1,212,1,205,255,233,1,212,1,209,255,211,1,212,1,216,255,211,1,212,1,217, +255,233,1,212,1,219,255,233,1,212,1,221,255,211,1,214,1,202,255,209,1,214, +1,205,255,233,1,214,1,209,255,186,1,214,1,216,255,211,1,214,1,217,255,233, +1,214,1,219,255,233,1,214,1,221,255,211,1,214,1,229,255,233,1,215,1,204,0, +23,1,215,1,212,0,23,1,215,1,221,255,233,1,215,1,227,0,23,1,216,0,15,255,29, +1,216,0,17,255,29,1,216,1,198,255,233,1,216,1,202,255,188,1,216,1,203,255, +233,1,216,1,204,0,68,1,216,1,209,255,211,1,216,1,212,255,233,1,216,1,215, +255,233,1,216,1,217,0,23,1,217,0,15,255,51,1,217,0,17,255,51,1,217,0,123, +0,23,1,217,1,198,255,233,1,217,1,199,0,23,1,217,1,202,255,188,1,217,1,203, +255,233,1,217,1,204,0,23,1,217,1,209,255,211,1,217,1,210,255,233,1,217,1, +212,255,231,1,217,1,214,255,233,1,217,1,215,255,233,1,217,1,218,255,233,1, +217,1,227,255,233,1,217,1,229,255,233,1,218,1,199,255,233,1,218,1,202,255, +211,1,218,1,209,255,211,1,218,1,216,255,211,1,218,1,217,255,233,1,218,1,221, +255,211,1,218,1,229,255,233,1,219,1,198,255,233,1,219,1,199,255,233,1,219, +1,203,255,233,1,219,1,205,255,233,1,219,1,212,255,233,1,219,1,215,255,233, +1,219,1,216,255,233,1,219,1,218,255,233,1,219,1,221,255,211,1,220,1,203,255, +233,1,220,1,205,255,233,1,220,1,212,255,233,1,220,1,215,255,233,1,223,1,203, +255,233,1,223,1,212,255,233,1,223,1,217,0,23,1,226,1,216,255,96,1,226,1,221, +255,119,1,227,1,202,255,211,1,227,1,203,0,23,1,227,1,205,255,233,1,227,1, +209,255,211,1,227,1,212,0,23,1,227,1,216,255,211,1,227,1,219,255,233,1,227, +1,229,255,233,1,228,1,202,255,211,1,228,1,204,255,233,1,228,1,209,255,211, +1,228,1,210,255,233,1,228,1,216,255,211,1,228,1,219,255,233,1,228,1,221,255, +211,1,242,0,15,255,51,1,242,0,17,255,51,1,244,0,15,255,6,1,244,0,17,255,6, +1,244,0,29,255,211,1,244,0,30,255,211,1,244,0,108,255,96,1,244,0,123,255, +96,1,244,1,255,255,211,2,2,2,2,255,219,2,3,0,3,255,180,2,3,0,86,255,219,2, +3,2,3,255,219,2,8,1,153,255,96,2,8,1,162,255,96,2,8,1,184,255,96,2,8,1,189, +255,188,2,8,1,192,255,188,0,0,0,0,0,28,1,86,0,1,0,0,0,0,0,0,0,64,0,130,0, +1,0,0,0,0,0,1,0,15,0,227,0,1,0,0,0,0,0,2,0,7,1,3,0,1,0,0,0,0,0,3,0,26,1,65, +0,1,0,0,0,0,0,4,0,15,1,124,0,1,0,0,0,0,0,5,0,12,1,166,0,1,0,0,0,0,0,6,0,14, +1,209,0,1,0,0,0,0,0,7,0,122,2,214,0,1,0,0,0,0,0,8,0,20,3,123,0,1,0,0,0,0, +0,9,0,14,3,174,0,1,0,0,0,0,0,11,0,28,3,247,0,1,0,0,0,0,0,12,0,46,4,114,0, +1,0,0,0,0,0,13,0,127,5,161,0,1,0,0,0,0,0,14,0,43,6,121,0,3,0,1,4,9,0,0,0, +128,0,0,0,3,0,1,4,9,0,1,0,30,0,195,0,3,0,1,4,9,0,2,0,14,0,243,0,3,0,1,4,9, +0,3,0,52,1,11,0,3,0,1,4,9,0,4,0,30,1,92,0,3,0,1,4,9,0,5,0,24,1,140,0,3,0, +1,4,9,0,6,0,28,1,179,0,3,0,1,4,9,0,7,0,244,1,224,0,3,0,1,4,9,0,8,0,40,3,81, +0,3,0,1,4,9,0,9,0,28,3,144,0,3,0,1,4,9,0,11,0,56,3,189,0,3,0,1,4,9,0,12,0, +92,4,20,0,3,0,1,4,9,0,13,0,254,4,161,0,3,0,1,4,9,0,14,0,86,6,33,0,68,0,105, +0,103,0,105,0,116,0,105,0,122,0,101,0,100,0,32,0,100,0,97,0,116,0,97,0,32, +0,169,0,32,0,50,0,48,0,48,0,55,0,32,0,65,0,115,0,99,0,101,0,110,0,100,0,101, +0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105,0,111,0,110, +0,46,0,32,0,65,0,108,0,108,0,32,0,114,0,105,0,103,0,104,0,116,0,115,0,32, +0,114,0,101,0,115,0,101,0,114,0,118,0,101,0,100,0,46,0,0,68,105,103,105,116, +105,122,101,100,32,100,97,116,97,32,169,32,50,48,48,55,32,65,115,99,101,110, +100,101,114,32,67,111,114,112,111,114,97,116,105,111,110,46,32,65,108,108, +32,114,105,103,104,116,115,32,114,101,115,101,114,118,101,100,46,0,0,76,0, +105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0, +115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115,0,0,82,0,101, +0,103,0,117,0,108,0,97,0,114,0,0,82,101,103,117,108,97,114,0,0,65,0,115,0, +99,0,101,0,110,0,100,0,101,0,114,0,32,0,45,0,32,0,76,0,105,0,98,0,101,0,114, +0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0,115,0,0,65,115,99,101, +110,100,101,114,32,45,32,76,105,98,101,114,97,116,105,111,110,32,83,97,110, +115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83, +0,97,0,110,0,115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115, +0,0,86,0,101,0,114,0,115,0,105,0,111,0,110,0,32,0,49,0,46,0,48,0,50,0,0,86, +101,114,115,105,111,110,32,49,46,48,50,0,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,83,0,97,0,110,0,115,0,0,76,105,98,101,114,97,116, +105,111,110,83,97,110,115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105, +0,111,0,110,0,32,0,105,0,115,0,32,0,97,0,32,0,116,0,114,0,97,0,100,0,101, +0,109,0,97,0,114,0,107,0,32,0,111,0,102,0,32,0,82,0,101,0,100,0,32,0,72,0, +97,0,116,0,44,0,32,0,73,0,110,0,99,0,46,0,32,0,114,0,101,0,103,0,105,0,115, +0,116,0,101,0,114,0,101,0,100,0,32,0,105,0,110,0,32,0,85,0,46,0,83,0,46,0, +32,0,80,0,97,0,116,0,101,0,110,0,116,0,32,0,97,0,110,0,100,0,32,0,84,0,114, +0,97,0,100,0,101,0,109,0,97,0,114,0,107,0,32,0,79,0,102,0,102,0,105,0,99, +0,101,0,32,0,97,0,110,0,100,0,32,0,99,0,101,0,114,0,116,0,97,0,105,0,110, +0,32,0,111,0,116,0,104,0,101,0,114,0,32,0,106,0,117,0,114,0,105,0,115,0,100, +0,105,0,99,0,116,0,105,0,111,0,110,0,115,0,46,0,0,76,105,98,101,114,97,116, +105,111,110,32,105,115,32,97,32,116,114,97,100,101,109,97,114,107,32,111, +102,32,82,101,100,32,72,97,116,44,32,73,110,99,46,32,114,101,103,105,115, +116,101,114,101,100,32,105,110,32,85,46,83,46,32,80,97,116,101,110,116,32, +97,110,100,32,84,114,97,100,101,109,97,114,107,32,79,102,102,105,99,101,32, +97,110,100,32,99,101,114,116,97,105,110,32,111,116,104,101,114,32,106,117, +114,105,115,100,105,99,116,105,111,110,115,46,0,0,65,0,115,0,99,0,101,0,110, +0,100,0,101,0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105, +0,111,0,110,0,0,65,115,99,101,110,100,101,114,32,67,111,114,112,111,114,97, +116,105,111,110,0,0,83,0,116,0,101,0,118,0,101,0,32,0,77,0,97,0,116,0,116, +0,101,0,115,0,111,0,110,0,0,83,116,101,118,101,32,77,97,116,116,101,115,111, +110,0,0,104,0,116,0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97, +0,115,0,99,0,101,0,110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99, +0,111,0,109,0,47,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,0,0,104,0,116,0,116,0,112, +0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0,110,0,100,0, +101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0,116,0,121,0, +112,0,101,0,100,0,101,0,115,0,105,0,103,0,110,0,101,0,114,0,115,0,46,0,104, +0,116,0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,116,121,112,101,100,101,115, +105,103,110,101,114,115,46,104,116,109,108,0,0,85,0,115,0,101,0,32,0,111, +0,102,0,32,0,116,0,104,0,105,0,115,0,32,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102, +0,116,0,119,0,97,0,114,0,101,0,32,0,105,0,115,0,32,0,115,0,117,0,98,0,106, +0,101,0,99,0,116,0,32,0,116,0,111,0,32,0,116,0,104,0,101,0,32,0,108,0,105, +0,99,0,101,0,110,0,115,0,101,0,32,0,97,0,103,0,114,0,101,0,101,0,109,0,101, +0,110,0,116,0,32,0,117,0,110,0,100,0,101,0,114,0,32,0,119,0,104,0,105,0,99, +0,104,0,32,0,121,0,111,0,117,0,32,0,97,0,99,0,99,0,101,0,112,0,116,0,101, +0,100,0,32,0,116,0,104,0,101,0,32,0,76,0,105,0,98,0,101,0,114,0,97,0,116, +0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102,0,116, +0,119,0,97,0,114,0,101,0,46,0,0,85,115,101,32,111,102,32,116,104,105,115, +32,76,105,98,101,114,97,116,105,111,110,32,102,111,110,116,32,115,111,102, +116,119,97,114,101,32,105,115,32,115,117,98,106,101,99,116,32,116,111,32, +116,104,101,32,108,105,99,101,110,115,101,32,97,103,114,101,101,109,101,110, +116,32,117,110,100,101,114,32,119,104,105,99,104,32,121,111,117,32,97,99, +99,101,112,116,101,100,32,116,104,101,32,76,105,98,101,114,97,116,105,111, +110,32,102,111,110,116,32,115,111,102,116,119,97,114,101,46,0,0,104,0,116, +0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0, +110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0, +108,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,46,0,104,0,116, +0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101,110, +100,101,114,99,111,114,112,46,99,111,109,47,108,105,98,101,114,97,116,105, +111,110,46,104,116,109,108,0,0,0,2,0,0,0,0,0,0,255,39,0,150,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,2,156,0,0,0,1,0,2,1,2,0,4,0,5,0,6,0,7,0,8,0,9,0, +10,0,11,0,12,0,13,0,14,0,15,1,3,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0, +25,0,26,0,27,0,28,0,29,1,4,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0, +40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54, +0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67,0,68,0,69, +0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,84, +0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97,0,163,0, +132,0,133,0,189,0,150,0,232,0,134,0,142,0,139,0,157,0,169,0,164,0,138,0,218, +0,131,0,147,1,5,1,6,0,141,1,7,0,136,1,8,0,222,1,9,0,158,0,170,0,245,0,244, +0,246,0,162,0,173,0,201,0,199,0,174,0,98,0,99,0,144,0,100,0,203,0,101,0,200, +0,202,0,207,0,204,0,205,0,206,0,233,0,102,0,211,0,208,0,209,0,175,0,103,0, +240,0,145,0,214,0,212,0,213,0,104,0,235,0,237,0,137,0,106,0,105,0,107,0,109, +0,108,0,110,0,160,0,111,0,113,0,112,0,114,0,115,0,117,0,116,0,118,0,119,0, +234,0,120,0,122,0,121,0,123,0,125,0,124,0,184,0,161,0,127,0,126,0,128,0,129, +0,236,0,238,0,186,1,10,1,11,1,12,1,13,1,14,1,15,0,253,0,254,1,16,1,17,1,18, +1,19,0,255,1,0,1,20,1,21,1,22,1,1,1,23,1,24,1,25,1,26,1,27,1,28,1,29,1,30, +1,31,1,32,1,33,1,34,0,248,0,249,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,42,1, +43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,0,250,0,215,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,0,226,0,227,1,66,1,67,1, +68,1,69,1,70,1,71,1,72,1,73,1,74,1,75,1,76,1,77,1,78,1,79,1,80,0,176,0,177, +1,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,0,251,0,252,0,228,0,229, +1,91,1,92,1,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104, +1,105,1,106,1,107,1,108,1,109,1,110,1,111,1,112,0,187,1,113,1,114,1,115,1, +116,0,230,0,231,1,117,0,166,1,118,1,119,1,120,1,121,1,122,1,123,0,216,0,225, +1,124,0,219,0,220,0,221,0,224,0,217,0,223,1,125,1,126,1,127,1,128,1,129,1, +130,1,131,1,132,1,133,1,134,1,135,1,136,1,137,1,138,0,168,1,139,1,140,1,141, +1,142,1,143,1,144,1,145,1,146,1,147,1,148,1,149,1,150,1,151,1,152,1,153,1, +154,1,155,1,156,1,157,0,159,1,158,1,159,1,160,1,161,1,162,1,163,1,164,1,165, +1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1,174,1,175,0,151,1,176,1, +177,1,178,0,155,1,179,1,180,1,181,1,182,1,183,1,184,1,185,1,186,1,187,1,188, +1,189,1,190,1,191,1,192,1,193,1,194,1,195,1,196,1,197,1,198,1,199,1,200,1, +201,1,202,1,203,1,204,1,205,1,206,1,207,1,208,1,209,1,210,1,211,1,212,1,213, +1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,221,1,222,1,223,1,224,1,225,1, +226,1,227,1,228,1,229,1,230,1,231,1,232,1,233,1,234,1,235,1,236,1,237,1,238, +1,239,1,240,1,241,1,242,1,243,1,244,1,245,1,246,1,247,1,248,1,249,1,250,1, +251,1,252,1,253,1,254,1,255,2,0,2,1,2,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,2,10, +2,11,2,12,2,13,2,14,2,15,2,16,2,17,2,18,2,19,2,20,2,21,2,22,2,23,2,24,2,25, +2,26,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,0,178,0, +179,2,39,2,40,0,182,0,183,0,196,2,41,0,180,0,181,0,197,0,130,0,194,0,135, +0,171,0,198,2,42,2,43,0,190,0,191,2,44,2,45,2,46,2,47,0,247,2,48,2,49,2,50, +2,51,2,52,2,53,0,140,2,54,2,55,2,56,2,57,2,58,2,59,2,60,2,61,2,62,2,63,2, +64,2,65,2,66,0,152,2,67,0,154,0,153,0,239,0,165,0,146,2,68,2,69,0,156,0,167, +0,143,2,70,0,148,0,149,2,71,2,72,2,73,2,74,2,75,2,76,2,77,2,78,2,79,2,80, +2,81,2,82,2,83,2,84,2,85,2,86,2,87,2,88,2,89,2,90,2,91,2,92,2,93,2,94,2,95, +2,96,2,97,2,98,2,99,2,100,2,101,2,102,2,103,2,104,2,105,2,106,2,107,2,108, +2,109,2,110,2,111,2,112,2,113,2,114,2,115,2,116,2,117,2,118,2,119,2,120,2, +121,2,122,2,123,2,124,2,125,2,126,2,127,2,128,2,129,2,130,2,131,0,185,2,132, +2,133,2,134,2,135,2,136,2,137,2,138,2,139,2,140,2,141,2,142,2,143,2,144,2, +145,2,146,2,147,2,148,2,149,2,150,2,151,2,152,2,153,2,154,2,155,2,156,2,157, +2,158,2,159,2,160,2,161,2,162,2,163,2,164,2,165,2,166,2,167,7,117,110,105, +48,48,65,48,7,117,110,105,48,48,65,68,7,117,110,105,48,51,55,69,7,117,110, +105,48,48,66,50,7,117,110,105,48,48,66,51,7,117,110,105,48,48,66,53,7,117, +110,105,50,50,49,57,7,117,110,105,48,48,66,57,7,65,109,97,99,114,111,110, +7,97,109,97,99,114,111,110,6,65,98,114,101,118,101,6,97,98,114,101,118,101, +7,65,111,103,111,110,101,107,7,97,111,103,111,110,101,107,11,67,99,105,114, +99,117,109,102,108,101,120,11,99,99,105,114,99,117,109,102,108,101,120,10, +67,100,111,116,97,99,99,101,110,116,10,99,100,111,116,97,99,99,101,110,116, +6,68,99,97,114,111,110,6,100,99,97,114,111,110,6,68,99,114,111,97,116,7,69, +109,97,99,114,111,110,7,101,109,97,99,114,111,110,6,69,98,114,101,118,101, +6,101,98,114,101,118,101,10,69,100,111,116,97,99,99,101,110,116,10,101,100, +111,116,97,99,99,101,110,116,7,69,111,103,111,110,101,107,7,101,111,103,111, +110,101,107,6,69,99,97,114,111,110,6,101,99,97,114,111,110,11,71,99,105,114, +99,117,109,102,108,101,120,11,103,99,105,114,99,117,109,102,108,101,120,10, +71,100,111,116,97,99,99,101,110,116,10,103,100,111,116,97,99,99,101,110,116, +12,71,99,111,109,109,97,97,99,99,101,110,116,12,103,99,111,109,109,97,97, +99,99,101,110,116,11,72,99,105,114,99,117,109,102,108,101,120,11,104,99,105, +114,99,117,109,102,108,101,120,4,72,98,97,114,4,104,98,97,114,6,73,116,105, +108,100,101,6,105,116,105,108,100,101,7,73,109,97,99,114,111,110,7,105,109, +97,99,114,111,110,6,73,98,114,101,118,101,6,105,98,114,101,118,101,7,73,111, +103,111,110,101,107,7,105,111,103,111,110,101,107,2,73,74,2,105,106,11,74, +99,105,114,99,117,109,102,108,101,120,11,106,99,105,114,99,117,109,102,108, +101,120,12,75,99,111,109,109,97,97,99,99,101,110,116,12,107,99,111,109,109, +97,97,99,99,101,110,116,12,107,103,114,101,101,110,108,97,110,100,105,99, +6,76,97,99,117,116,101,6,108,97,99,117,116,101,12,76,99,111,109,109,97,97, +99,99,101,110,116,12,108,99,111,109,109,97,97,99,99,101,110,116,6,76,99,97, +114,111,110,6,108,99,97,114,111,110,4,76,100,111,116,4,108,100,111,116,6, +78,97,99,117,116,101,6,110,97,99,117,116,101,12,78,99,111,109,109,97,97,99, +99,101,110,116,12,110,99,111,109,109,97,97,99,99,101,110,116,6,78,99,97,114, +111,110,6,110,99,97,114,111,110,11,110,97,112,111,115,116,114,111,112,104, +101,3,69,110,103,3,101,110,103,7,79,109,97,99,114,111,110,7,111,109,97,99, +114,111,110,6,79,98,114,101,118,101,6,111,98,114,101,118,101,13,79,104,117, +110,103,97,114,117,109,108,97,117,116,13,111,104,117,110,103,97,114,117,109, +108,97,117,116,6,82,97,99,117,116,101,6,114,97,99,117,116,101,12,82,99,111, +109,109,97,97,99,99,101,110,116,12,114,99,111,109,109,97,97,99,99,101,110, +116,6,82,99,97,114,111,110,6,114,99,97,114,111,110,6,83,97,99,117,116,101, +6,115,97,99,117,116,101,11,83,99,105,114,99,117,109,102,108,101,120,11,115, +99,105,114,99,117,109,102,108,101,120,12,84,99,111,109,109,97,97,99,99,101, +110,116,12,116,99,111,109,109,97,97,99,99,101,110,116,6,84,99,97,114,111, +110,6,116,99,97,114,111,110,4,84,98,97,114,4,116,98,97,114,6,85,116,105,108, +100,101,6,117,116,105,108,100,101,7,85,109,97,99,114,111,110,7,117,109,97, +99,114,111,110,6,85,98,114,101,118,101,6,117,98,114,101,118,101,5,85,114, +105,110,103,5,117,114,105,110,103,13,85,104,117,110,103,97,114,117,109,108, +97,117,116,13,117,104,117,110,103,97,114,117,109,108,97,117,116,7,85,111, +103,111,110,101,107,7,117,111,103,111,110,101,107,11,87,99,105,114,99,117, +109,102,108,101,120,11,119,99,105,114,99,117,109,102,108,101,120,11,89,99, +105,114,99,117,109,102,108,101,120,11,121,99,105,114,99,117,109,102,108,101, +120,6,90,97,99,117,116,101,6,122,97,99,117,116,101,10,90,100,111,116,97,99, +99,101,110,116,10,122,100,111,116,97,99,99,101,110,116,5,108,111,110,103, +115,10,65,114,105,110,103,97,99,117,116,101,10,97,114,105,110,103,97,99,117, +116,101,7,65,69,97,99,117,116,101,7,97,101,97,99,117,116,101,11,79,115,108, +97,115,104,97,99,117,116,101,11,111,115,108,97,115,104,97,99,117,116,101, +7,117,110,105,48,50,67,57,5,116,111,110,111,115,13,100,105,101,114,101,115, +105,115,116,111,110,111,115,10,65,108,112,104,97,116,111,110,111,115,9,97, +110,111,116,101,108,101,105,97,12,69,112,115,105,108,111,110,116,111,110, +111,115,8,69,116,97,116,111,110,111,115,9,73,111,116,97,116,111,110,111,115, +12,79,109,105,99,114,111,110,116,111,110,111,115,12,85,112,115,105,108,111, +110,116,111,110,111,115,10,79,109,101,103,97,116,111,110,111,115,17,105,111, +116,97,100,105,101,114,101,115,105,115,116,111,110,111,115,5,65,108,112,104, +97,4,66,101,116,97,5,71,97,109,109,97,7,69,112,115,105,108,111,110,4,90,101, +116,97,3,69,116,97,5,84,104,101,116,97,4,73,111,116,97,5,75,97,112,112,97, +6,76,97,109,98,100,97,2,77,117,2,78,117,2,88,105,7,79,109,105,99,114,111, +110,2,80,105,3,82,104,111,5,83,105,103,109,97,3,84,97,117,7,85,112,115,105, +108,111,110,3,80,104,105,3,67,104,105,3,80,115,105,12,73,111,116,97,100,105, +101,114,101,115,105,115,15,85,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,10,97,108,112,104,97,116,111,110,111,115,12,101,112,115,105,108, +111,110,116,111,110,111,115,8,101,116,97,116,111,110,111,115,9,105,111,116, +97,116,111,110,111,115,20,117,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,116,111,110,111,115,5,97,108,112,104,97,4,98,101,116,97,5,103, +97,109,109,97,5,100,101,108,116,97,7,101,112,115,105,108,111,110,4,122,101, +116,97,3,101,116,97,5,116,104,101,116,97,4,105,111,116,97,5,107,97,112,112, +97,6,108,97,109,98,100,97,2,110,117,2,120,105,7,111,109,105,99,114,111,110, +3,114,104,111,6,115,105,103,109,97,49,5,115,105,103,109,97,3,116,97,117,7, +117,112,115,105,108,111,110,3,112,104,105,3,99,104,105,3,112,115,105,5,111, +109,101,103,97,12,105,111,116,97,100,105,101,114,101,115,105,115,15,117,112, +115,105,108,111,110,100,105,101,114,101,115,105,115,12,111,109,105,99,114, +111,110,116,111,110,111,115,12,117,112,115,105,108,111,110,116,111,110,111, +115,10,111,109,101,103,97,116,111,110,111,115,9,97,102,105,105,49,48,48,50, +51,9,97,102,105,105,49,48,48,53,49,9,97,102,105,105,49,48,48,53,50,9,97,102, +105,105,49,48,48,53,51,9,97,102,105,105,49,48,48,53,52,9,97,102,105,105,49, +48,48,53,53,9,97,102,105,105,49,48,48,53,54,9,97,102,105,105,49,48,48,53, +55,9,97,102,105,105,49,48,48,53,56,9,97,102,105,105,49,48,48,53,57,9,97,102, +105,105,49,48,48,54,48,9,97,102,105,105,49,48,48,54,49,9,97,102,105,105,49, +48,48,54,50,9,97,102,105,105,49,48,49,52,53,9,97,102,105,105,49,48,48,49, +55,9,97,102,105,105,49,48,48,49,56,9,97,102,105,105,49,48,48,49,57,9,97,102, +105,105,49,48,48,50,48,9,97,102,105,105,49,48,48,50,49,9,97,102,105,105,49, +48,48,50,50,9,97,102,105,105,49,48,48,50,52,9,97,102,105,105,49,48,48,50, +53,9,97,102,105,105,49,48,48,50,54,9,97,102,105,105,49,48,48,50,55,9,97,102, +105,105,49,48,48,50,56,9,97,102,105,105,49,48,48,50,57,9,97,102,105,105,49, +48,48,51,48,9,97,102,105,105,49,48,48,51,49,9,97,102,105,105,49,48,48,51, +50,9,97,102,105,105,49,48,48,51,51,9,97,102,105,105,49,48,48,51,52,9,97,102, +105,105,49,48,48,51,53,9,97,102,105,105,49,48,48,51,54,9,97,102,105,105,49, +48,48,51,55,9,97,102,105,105,49,48,48,51,56,9,97,102,105,105,49,48,48,51, +57,9,97,102,105,105,49,48,48,52,48,9,97,102,105,105,49,48,48,52,49,9,97,102, +105,105,49,48,48,52,50,9,97,102,105,105,49,48,48,52,51,9,97,102,105,105,49, +48,48,52,52,9,97,102,105,105,49,48,48,52,53,9,97,102,105,105,49,48,48,52, +54,9,97,102,105,105,49,48,48,52,55,9,97,102,105,105,49,48,48,52,56,9,97,102, +105,105,49,48,48,52,57,9,97,102,105,105,49,48,48,54,53,9,97,102,105,105,49, +48,48,54,54,9,97,102,105,105,49,48,48,54,55,9,97,102,105,105,49,48,48,54, +56,9,97,102,105,105,49,48,48,54,57,9,97,102,105,105,49,48,48,55,48,9,97,102, +105,105,49,48,48,55,50,9,97,102,105,105,49,48,48,55,51,9,97,102,105,105,49, +48,48,55,52,9,97,102,105,105,49,48,48,55,53,9,97,102,105,105,49,48,48,55, +54,9,97,102,105,105,49,48,48,55,55,9,97,102,105,105,49,48,48,55,56,9,97,102, +105,105,49,48,48,55,57,9,97,102,105,105,49,48,48,56,48,9,97,102,105,105,49, +48,48,56,49,9,97,102,105,105,49,48,48,56,50,9,97,102,105,105,49,48,48,56, +51,9,97,102,105,105,49,48,48,56,52,9,97,102,105,105,49,48,48,56,53,9,97,102, +105,105,49,48,48,56,54,9,97,102,105,105,49,48,48,56,55,9,97,102,105,105,49, +48,48,56,56,9,97,102,105,105,49,48,48,56,57,9,97,102,105,105,49,48,48,57, +48,9,97,102,105,105,49,48,48,57,49,9,97,102,105,105,49,48,48,57,50,9,97,102, +105,105,49,48,48,57,51,9,97,102,105,105,49,48,48,57,52,9,97,102,105,105,49, +48,48,57,53,9,97,102,105,105,49,48,48,57,54,9,97,102,105,105,49,48,48,57, +55,9,97,102,105,105,49,48,48,55,49,9,97,102,105,105,49,48,48,57,57,9,97,102, +105,105,49,48,49,48,48,9,97,102,105,105,49,48,49,48,49,9,97,102,105,105,49, +48,49,48,50,9,97,102,105,105,49,48,49,48,51,9,97,102,105,105,49,48,49,48, +52,9,97,102,105,105,49,48,49,48,53,9,97,102,105,105,49,48,49,48,54,9,97,102, +105,105,49,48,49,48,55,9,97,102,105,105,49,48,49,48,56,9,97,102,105,105,49, +48,49,48,57,9,97,102,105,105,49,48,49,49,48,9,97,102,105,105,49,48,49,57, +51,9,97,102,105,105,49,48,48,53,48,9,97,102,105,105,49,48,48,57,56,6,87,103, +114,97,118,101,6,119,103,114,97,118,101,6,87,97,99,117,116,101,6,119,97,99, +117,116,101,9,87,100,105,101,114,101,115,105,115,9,119,100,105,101,114,101, +115,105,115,6,89,103,114,97,118,101,6,121,103,114,97,118,101,9,97,102,105, +105,48,48,50,48,56,13,117,110,100,101,114,115,99,111,114,101,100,98,108,13, +113,117,111,116,101,114,101,118,101,114,115,101,100,6,109,105,110,117,116, +101,6,115,101,99,111,110,100,9,101,120,99,108,97,109,100,98,108,7,117,110, +105,50,48,51,69,7,117,110,105,50,50,49,53,7,117,110,105,50,48,55,70,4,108, +105,114,97,6,112,101,115,101,116,97,4,69,117,114,111,9,97,102,105,105,54, +49,50,52,56,9,97,102,105,105,54,49,50,56,57,9,97,102,105,105,54,49,51,53, +50,7,117,110,105,50,49,50,54,9,101,115,116,105,109,97,116,101,100,9,111,110, +101,101,105,103,104,116,104,12,116,104,114,101,101,101,105,103,104,116,104, +115,11,102,105,118,101,101,105,103,104,116,104,115,12,115,101,118,101,110, +101,105,103,104,116,104,115,9,97,114,114,111,119,108,101,102,116,7,97,114, +114,111,119,117,112,10,97,114,114,111,119,114,105,103,104,116,9,97,114,114, +111,119,100,111,119,110,9,97,114,114,111,119,98,111,116,104,9,97,114,114, +111,119,117,112,100,110,12,97,114,114,111,119,117,112,100,110,98,115,101, +7,117,110,105,50,50,48,54,10,111,114,116,104,111,103,111,110,97,108,12,105, +110,116,101,114,115,101,99,116,105,111,110,11,101,113,117,105,118,97,108, +101,110,99,101,5,104,111,117,115,101,13,114,101,118,108,111,103,105,99,97, +108,110,111,116,10,105,110,116,101,103,114,97,108,116,112,10,105,110,116, +101,103,114,97,108,98,116,8,83,70,49,48,48,48,48,48,8,83,70,49,49,48,48,48, +48,8,83,70,48,49,48,48,48,48,8,83,70,48,51,48,48,48,48,8,83,70,48,50,48,48, +48,48,8,83,70,48,52,48,48,48,48,8,83,70,48,56,48,48,48,48,8,83,70,48,57,48, +48,48,48,8,83,70,48,54,48,48,48,48,8,83,70,48,55,48,48,48,48,8,83,70,48,53, +48,48,48,48,8,83,70,52,51,48,48,48,48,8,83,70,50,52,48,48,48,48,8,83,70,53, +49,48,48,48,48,8,83,70,53,50,48,48,48,48,8,83,70,51,57,48,48,48,48,8,83,70, +50,50,48,48,48,48,8,83,70,50,49,48,48,48,48,8,83,70,50,53,48,48,48,48,8,83, +70,53,48,48,48,48,48,8,83,70,52,57,48,48,48,48,8,83,70,51,56,48,48,48,48, +8,83,70,50,56,48,48,48,48,8,83,70,50,55,48,48,48,48,8,83,70,50,54,48,48,48, +48,8,83,70,51,54,48,48,48,48,8,83,70,51,55,48,48,48,48,8,83,70,52,50,48,48, +48,48,8,83,70,49,57,48,48,48,48,8,83,70,50,48,48,48,48,48,8,83,70,50,51,48, +48,48,48,8,83,70,52,55,48,48,48,48,8,83,70,52,56,48,48,48,48,8,83,70,52,49, +48,48,48,48,8,83,70,52,53,48,48,48,48,8,83,70,52,54,48,48,48,48,8,83,70,52, +48,48,48,48,48,8,83,70,53,52,48,48,48,48,8,83,70,53,51,48,48,48,48,8,83,70, +52,52,48,48,48,48,7,117,112,98,108,111,99,107,7,100,110,98,108,111,99,107, +5,98,108,111,99,107,7,108,102,98,108,111,99,107,7,114,116,98,108,111,99,107, +7,108,116,115,104,97,100,101,5,115,104,97,100,101,7,100,107,115,104,97,100, +101,9,102,105,108,108,101,100,98,111,120,6,72,50,50,48,55,51,6,72,49,56,53, +52,51,6,72,49,56,53,53,49,10,102,105,108,108,101,100,114,101,99,116,7,116, +114,105,97,103,117,112,7,116,114,105,97,103,114,116,7,116,114,105,97,103, +100,110,7,116,114,105,97,103,108,102,6,99,105,114,99,108,101,6,72,49,56,53, +51,51,9,105,110,118,98,117,108,108,101,116,9,105,110,118,99,105,114,99,108, +101,10,111,112,101,110,98,117,108,108,101,116,9,115,109,105,108,101,102,97, +99,101,12,105,110,118,115,109,105,108,101,102,97,99,101,3,115,117,110,6,102, +101,109,97,108,101,4,109,97,108,101,5,115,112,97,100,101,4,99,108,117,98, +5,104,101,97,114,116,7,100,105,97,109,111,110,100,11,109,117,115,105,99,97, +108,110,111,116,101,14,109,117,115,105,99,97,108,110,111,116,101,100,98,108, +7,117,110,105,70,66,48,49,7,117,110,105,70,66,48,50,7,117,110,105,70,48,48, +53,6,109,105,100,100,111,116,7,117,110,105,70,48,48,52,7,117,110,105,50,48, +55,52,7,117,110,105,50,48,55,53,7,117,110,105,50,48,55,55,7,117,110,105,50, +48,55,56,8,103,108,121,112,104,53,55,49,8,103,108,121,112,104,53,55,50,8, +103,108,121,112,104,53,55,51,8,103,108,121,112,104,53,55,52,8,103,108,121, +112,104,53,55,53,8,103,108,121,112,104,53,55,54,8,103,108,121,112,104,53, +55,55,8,103,108,121,112,104,53,55,56,8,103,108,121,112,104,53,55,57,8,103, +108,121,112,104,53,56,48,8,103,108,121,112,104,53,56,49,0,0,0,0,0,0,3,0,8, +0,2,0,17,0,1,255,255,0,3,0,1,0,0,0,14,0,0,0,24,0,0,0,0,0,2,0,1,0,1,2,155, +0,1,0,4,0,0,0,2,0,0,0,1,0,0,0,10,0,76,0,78,0,4,68,70,76,84,0,26,99,121,114, +108,0,36,103,114,101,107,0,46,108,97,116,110,0,56,0,4,0,0,0,0,255,255,0,0, +0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0, +0,0,0,0,1,0,0,0,10,0,84,0,98,0,4,68,70,76,84,0,26,99,121,114,108,0,38,103, +114,101,107,0,50,108,97,116,110,0,62,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0, +0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0, +0,0,1,107,101,114,110,0,8,0,0,0,1,0,0,0,1,0,4,0,2,0,0,0,1,0,8,0,1,15,112, +0,4,0,0,0,105,0,220,1,6,1,12,1,50,1,64,1,94,1,112,1,130,1,204,2,2,2,52,2, +114,2,124,2,138,2,148,2,138,2,158,2,196,2,202,3,28,3,38,3,84,3,118,3,144, +3,166,3,228,3,254,4,20,4,46,4,56,4,190,5,44,5,58,3,28,5,100,5,186,5,204,6, +22,6,28,6,82,6,136,5,186,6,178,6,216,6,230,5,186,7,16,5,186,5,186,5,186,7, +62,7,84,7,90,7,96,7,166,7,224,8,54,8,168,8,194,8,204,8,246,9,24,9,46,9,60, +9,98,9,144,9,242,10,48,10,174,11,72,11,106,11,136,11,146,11,156,11,166,11, +224,12,14,12,64,12,82,12,144,12,210,12,252,13,6,13,44,13,62,13,108,13,150, +13,160,13,174,13,208,13,242,14,4,14,46,14,112,14,142,14,180,14,198,14,212, +14,222,15,0,15,30,15,40,15,70,15,76,15,90,0,10,0,36,255,143,0,55,255,219, +0,60,255,219,1,82,255,143,1,91,255,143,1,94,255,143,1,101,255,143,1,109,255, +219,1,110,255,219,1,116,255,219,0,1,0,20,255,104,0,9,0,3,255,143,0,55,255, +104,0,57,255,104,0,58,255,180,0,60,255,104,0,89,255,219,0,90,255,219,0,92, +255,219,2,3,255,104,0,3,0,15,255,29,0,17,255,29,0,36,255,143,0,7,0,3,255, +180,0,55,255,104,0,57,255,104,0,58,255,104,0,60,255,104,0,92,255,180,2,3, +255,143,0,4,0,3,255,219,0,15,254,248,0,17,254,248,0,36,255,104,0,4,0,55,255, +219,0,57,255,219,0,58,255,219,0,60,255,219,0,18,0,3,255,219,0,15,255,29,0, +16,255,143,0,17,255,29,0,29,255,29,0,30,255,29,0,36,255,104,0,50,255,219, +0,68,255,29,0,70,255,29,0,72,255,29,0,76,255,180,0,82,255,29,0,85,255,180, +0,86,255,29,0,88,255,180,0,90,255,143,0,92,255,143,0,13,0,15,255,68,0,16, +255,143,0,17,255,68,0,29,255,180,0,30,255,180,0,36,255,104,0,68,255,104,0, +72,255,143,0,76,255,219,0,82,255,143,0,85,255,180,0,88,255,180,0,92,255,180, +0,12,0,15,255,143,0,16,255,219,0,17,255,143,0,29,255,219,0,30,255,219,0,36, +255,180,0,68,255,180,0,72,255,219,0,82,255,219,0,85,255,219,0,88,255,219, +0,92,255,238,0,15,0,3,255,219,0,15,254,248,0,16,255,68,0,17,254,248,0,29, +255,143,0,30,255,123,0,36,255,104,0,68,255,104,0,72,255,68,0,76,255,180,0, +82,255,68,0,83,255,104,0,84,255,68,0,88,255,143,0,89,255,143,0,2,0,73,255, +219,2,3,0,37,0,3,0,15,255,143,0,17,255,143,2,3,0,76,0,2,0,15,255,104,0,17, +255,104,0,2,0,15,255,143,0,17,255,143,0,9,1,98,255,213,1,105,255,213,1,109, +255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124,255,219,1,134,255, +219,1,144,255,219,0,1,1,110,255,190,0,20,1,90,0,170,1,91,255,104,1,94,255, +104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255,158, +1,119,255,104,1,120,255,180,1,122,255,70,1,128,255,104,1,130,255,180,1,131, +255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1, +149,255,70,0,2,1,110,255,209,1,116,255,209,0,11,0,3,255,143,1,98,255,213, +1,105,255,213,1,109,255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124, +255,219,1,134,255,219,1,144,255,219,2,3,255,104,0,8,0,15,255,31,0,17,255, +31,1,90,0,164,1,91,255,68,1,94,255,68,1,101,255,68,1,130,255,168,1,147,0, +88,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,137,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,219,1,101,255,219,1,110,255,190,1, +116,255,190,0,15,1,98,255,193,1,105,255,193,1,111,255,143,1,117,255,231,1, +122,255,231,1,125,255,231,1,127,255,231,1,129,255,231,1,135,255,231,1,136, +255,231,1,140,255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255, +231,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,104,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,213,1,101,255,219,1,110,255,190,1, +116,255,190,0,6,0,3,255,219,0,15,254,250,0,17,254,250,1,91,255,104,1,94,255, +104,1,101,255,104,0,2,1,137,255,158,1,141,255,158,0,33,0,3,255,219,0,15,255, +31,0,17,255,31,0,29,255,31,0,30,255,31,1,90,0,188,1,91,255,104,1,94,255,104, +1,98,255,219,1,101,255,104,1,105,255,219,1,111,255,219,1,114,255,219,1,117, +255,31,1,118,255,31,1,121,255,78,1,122,255,31,1,124,255,78,1,126,255,31,1, +128,255,106,1,130,255,180,1,133,255,106,1,134,255,143,1,136,255,31,1,140, +255,31,1,142,255,80,1,143,255,31,1,144,255,143,1,145,255,106,1,147,0,188, +1,148,255,78,1,149,255,31,1,150,255,78,0,27,0,3,255,219,0,15,254,250,0,16, +255,70,0,17,254,250,0,29,255,143,0,30,255,143,1,90,0,188,1,91,255,104,1,94, +255,104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255, +158,1,119,255,104,1,120,255,180,1,122,255,70,1,124,255,158,1,128,255,104, +1,130,255,180,1,131,255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143, +255,70,1,147,0,121,1,149,255,70,0,3,1,91,255,197,1,110,255,190,1,116,255, +190,0,10,1,117,255,178,1,122,255,178,1,125,255,178,1,129,255,217,1,136,255, +178,1,140,255,178,1,143,255,178,1,146,255,178,1,149,255,178,1,151,255,178, +0,21,0,3,255,219,1,90,0,170,1,91,255,104,1,94,255,104,1,98,255,141,1,101, +255,104,1,105,255,141,1,111,255,141,1,114,255,158,1,119,255,104,1,120,255, +180,1,122,255,70,1,128,255,104,1,130,255,180,1,131,255,104,1,133,255,104, +1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1,149,255,70,0,4,1,132, +255,217,1,137,255,227,1,141,255,227,1,144,255,201,0,18,1,117,255,119,1,119, +255,219,1,122,255,119,1,124,255,170,1,125,255,180,1,128,255,219,1,129,255, +158,1,130,255,219,1,131,255,219,1,134,255,170,1,136,255,119,1,137,255,170, +1,140,255,119,1,141,255,170,1,143,255,119,1,146,255,119,1,149,255,119,1,151, +255,119,0,1,1,132,255,217,0,13,1,117,255,231,1,122,255,231,1,125,255,231, +1,127,255,231,1,129,255,231,1,135,255,231,1,136,255,231,1,139,255,231,1,140, +255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255,231,0,13,1,117, +255,225,1,122,255,225,1,125,255,225,1,135,255,225,1,136,255,225,1,139,255, +209,1,140,255,225,1,142,255,207,1,143,255,219,1,146,255,225,1,149,255,225, +1,150,255,207,1,151,255,225,0,10,1,117,255,201,1,122,255,201,1,125,255,201, +1,127,255,201,1,135,255,201,1,136,255,201,1,139,255,201,1,140,255,201,1,143, +255,201,1,149,255,201,0,9,1,117,255,227,1,122,255,227,1,127,255,227,1,136, +255,227,1,139,255,227,1,140,255,227,1,143,255,227,1,146,255,227,1,151,255, +227,0,3,1,132,255,217,1,137,255,227,1,141,255,227,0,10,1,117,255,227,1,122, +255,227,1,125,255,227,1,127,255,227,1,136,255,227,1,139,255,227,1,140,255, +227,1,143,255,227,1,146,255,227,1,151,255,227,0,11,1,117,255,201,1,122,255, +201,1,125,255,201,1,127,255,201,1,136,255,201,1,139,255,201,1,140,255,201, +1,143,255,201,1,146,255,201,1,149,255,201,1,151,255,201,0,5,0,15,255,6,0, +17,255,6,0,108,255,119,0,123,255,119,1,255,255,211,0,1,2,3,255,96,0,1,2,3, +255,119,0,17,1,170,0,68,1,173,255,233,1,177,0,45,1,180,255,211,1,181,255, +233,1,183,255,211,1,184,255,96,1,185,255,166,1,186,255,188,1,189,255,96,1, +195,255,211,1,198,0,23,1,216,255,211,1,217,255,233,1,218,0,23,1,227,0,45, +2,3,255,141,0,14,1,166,255,211,1,173,255,233,1,180,255,233,1,183,255,233, +1,184,255,164,1,185,255,209,1,186,255,233,1,187,255,211,1,189,255,164,1,192, +255,188,1,195,255,233,1,197,255,233,1,209,255,233,1,217,255,211,0,21,1,166, +255,188,1,170,255,211,1,172,255,211,1,173,255,188,1,177,255,233,1,180,255, +188,1,183,255,188,1,184,255,119,1,185,255,188,1,186,255,188,1,187,255,166, +1,189,255,164,1,192,255,141,1,197,255,188,1,202,255,233,1,210,255,233,1,216, +255,188,1,217,255,233,1,219,255,233,1,221,255,188,1,229,255,233,0,28,0,15, +255,6,0,17,255,6,0,108,255,119,0,123,255,119,1,166,255,119,1,170,255,119, +1,173,255,211,1,177,255,141,1,178,255,209,1,180,255,141,1,183,255,164,1,197, +255,188,1,198,255,141,1,200,255,141,1,202,255,119,1,203,255,119,1,206,255, +141,1,209,255,141,1,210,255,141,1,211,255,141,1,212,255,119,1,214,255,141, +1,217,255,119,1,225,255,141,1,226,255,141,1,228,255,141,1,229,255,119,1,255, +255,211,0,6,1,185,0,23,1,186,255,211,1,189,255,186,1,205,0,68,1,212,0,23, +1,217,0,45,0,2,1,173,255,211,1,215,255,233,0,10,1,173,255,233,1,180,255,211, +1,183,255,233,1,184,0,23,1,185,0,45,1,192,0,45,1,198,0,23,1,203,255,231,1, +212,255,233,1,217,255,233,0,8,1,177,255,233,1,180,255,233,1,183,255,233,1, +184,255,211,1,185,255,233,1,186,255,233,1,189,255,211,1,197,255,233,0,5,1, +173,255,233,1,180,255,233,1,183,255,233,1,185,0,23,1,186,255,186,0,3,1,186, +255,233,1,199,0,23,1,217,0,23,0,9,1,186,255,233,1,189,255,233,1,198,0,23, +1,203,0,23,1,212,0,23,1,215,0,23,1,217,0,23,1,221,255,233,1,227,0,23,0,11, +1,166,255,211,1,170,255,211,1,172,255,211,1,177,255,233,1,185,255,211,1,187, +255,164,1,189,255,211,1,197,255,211,1,202,255,211,1,209,255,233,1,219,255, +233,0,24,0,15,254,125,0,17,254,125,0,29,255,211,0,30,255,211,0,123,255,141, +1,166,255,119,1,170,255,119,1,172,255,233,1,173,255,211,1,177,255,141,1,178, +255,233,1,180,255,211,1,183,255,233,1,184,255,164,1,185,255,211,1,186,255, +233,1,187,255,164,1,197,255,211,1,198,255,188,1,202,255,96,1,203,255,166, +1,212,255,166,1,227,255,211,1,229,255,188,0,15,1,166,255,211,1,170,255,211, +1,173,255,233,1,177,255,188,1,178,255,233,1,180,255,211,1,184,255,188,1,185, +255,188,1,187,255,141,1,189,255,188,1,192,255,186,1,195,255,233,1,198,0,23, +1,204,0,45,1,221,255,233,0,31,0,15,255,29,0,17,255,29,0,108,255,166,0,123, +255,166,1,166,255,188,1,170,255,188,1,172,0,23,1,173,255,233,1,177,255,211, +1,180,255,164,1,186,255,188,1,197,255,211,1,198,255,164,1,200,255,166,1,203, +255,141,1,206,255,166,1,208,255,166,1,209,255,164,1,210,255,166,1,212,255, +96,1,213,255,166,1,214,255,141,1,215,255,141,1,217,255,141,1,219,255,166, +1,223,255,166,1,225,255,166,1,226,255,166,1,228,255,166,1,229,255,141,1,255, +255,211,0,38,0,15,254,240,0,17,254,240,0,29,255,211,0,30,255,211,0,108,255, +166,0,123,255,164,1,166,255,119,1,170,255,164,1,173,255,211,1,177,255,188, +1,180,255,188,1,186,255,188,1,195,255,211,1,197,255,211,1,199,255,211,1,200, +255,141,1,201,255,164,1,202,255,96,1,203,255,119,1,204,255,188,1,205,255, +141,1,206,255,164,1,207,255,188,1,208,255,164,1,209,255,119,1,210,255,164, +1,211,255,164,1,212,255,119,1,213,255,164,1,214,255,164,1,215,255,119,1,219, +255,164,1,220,255,164,1,222,255,164,1,223,255,164,1,228,255,164,1,229,255, +119,1,255,255,233,0,8,1,166,255,211,1,170,255,188,1,177,255,188,1,184,255, +141,1,185,255,164,1,189,255,211,1,197,255,186,1,209,255,188,0,7,1,173,255, +211,1,180,255,188,1,183,255,188,1,186,255,188,1,195,255,186,1,212,255,233, +1,217,255,211,0,2,1,180,255,211,1,198,0,45,0,2,1,198,0,23,1,217,0,45,0,2, +1,197,255,188,2,3,255,119,0,14,1,166,255,211,1,170,255,211,1,172,255,188, +1,173,255,233,1,177,255,186,1,178,255,211,1,180,255,211,1,183,255,211,1,184, +255,51,1,187,255,164,1,189,255,96,1,195,255,233,1,197,255,164,2,3,255,96, +0,11,1,170,255,188,1,172,255,231,1,173,255,233,1,177,255,188,1,187,255,186, +1,197,255,211,1,202,255,188,1,204,0,23,1,209,255,188,1,210,255,233,1,229, +255,233,0,12,1,166,255,188,1,170,255,166,1,172,255,211,1,177,255,164,1,180, +255,233,1,183,255,233,1,184,255,141,1,187,255,164,1,189,255,188,1,202,255, +164,1,209,255,164,1,210,255,233,0,4,1,205,255,233,1,216,255,211,1,217,255, +233,1,221,255,211,0,15,1,198,255,209,1,202,255,164,1,203,255,233,1,204,255, +233,1,205,255,211,1,209,255,164,1,210,255,211,1,215,255,233,1,217,255,211, +1,218,255,233,1,219,255,188,1,221,255,188,1,224,255,188,1,227,255,233,1,229, +255,211,0,16,1,198,255,233,1,199,255,233,1,202,255,233,1,203,255,233,1,204, +255,233,1,205,255,233,1,209,255,209,1,210,255,233,1,212,255,233,1,215,255, +233,1,216,255,211,1,217,255,211,1,218,255,233,1,221,255,164,1,224,255,188, +1,229,255,233,0,10,0,15,255,6,0,17,255,6,1,198,255,211,1,202,255,164,1,203, +255,211,1,205,255,233,1,209,255,211,1,212,255,211,1,215,255,211,1,229,255, +233,0,2,1,224,255,211,1,227,0,23,0,9,1,199,255,233,1,202,255,211,1,204,255, +233,1,205,255,211,1,209,255,188,1,216,255,188,1,217,255,233,1,219,255,211, +1,221,255,188,0,4,1,199,0,23,1,217,0,23,1,221,255,233,1,224,0,45,0,11,1,199, +255,233,1,202,255,211,1,203,255,233,1,205,255,233,1,209,255,233,1,212,255, +233,1,215,255,233,1,217,255,233,1,218,255,233,1,221,255,188,1,224,255,211, +0,10,1,198,0,45,1,199,0,45,1,203,0,23,1,205,0,23,1,209,0,23,1,212,0,23,1, +215,0,23,1,216,0,23,1,217,0,23,1,227,0,23,0,2,1,212,0,23,1,221,255,211,0, +3,1,199,255,233,1,205,255,233,1,217,0,23,0,8,1,202,255,211,1,204,255,233, +1,205,255,233,1,209,255,211,1,216,255,211,1,217,255,233,1,219,255,233,1,221, +255,211,0,8,1,202,255,209,1,205,255,233,1,209,255,186,1,216,255,211,1,217, +255,233,1,219,255,233,1,221,255,211,1,229,255,233,0,4,1,204,0,23,1,212,0, +23,1,221,255,233,1,227,0,23,0,10,0,15,255,29,0,17,255,29,1,198,255,233,1, +202,255,188,1,203,255,233,1,204,0,68,1,209,255,211,1,212,255,233,1,215,255, +233,1,217,0,23,0,16,0,15,255,51,0,17,255,51,0,123,0,23,1,198,255,233,1,199, +0,23,1,202,255,188,1,203,255,233,1,204,0,23,1,209,255,211,1,210,255,233,1, +212,255,231,1,214,255,233,1,215,255,233,1,218,255,233,1,227,255,233,1,229, +255,233,0,7,1,199,255,233,1,202,255,211,1,209,255,211,1,216,255,211,1,217, +255,233,1,221,255,211,1,229,255,233,0,9,1,198,255,233,1,199,255,233,1,203, +255,233,1,205,255,233,1,212,255,233,1,215,255,233,1,216,255,233,1,218,255, +233,1,221,255,211,0,4,1,203,255,233,1,205,255,233,1,212,255,233,1,215,255, +233,0,3,1,203,255,233,1,212,255,233,1,217,0,23,0,2,1,216,255,96,1,221,255, +119,0,8,1,202,255,211,1,203,0,23,1,205,255,233,1,209,255,211,1,212,0,23,1, +216,255,211,1,219,255,233,1,229,255,233,0,7,1,202,255,211,1,204,255,233,1, +209,255,211,1,210,255,233,1,216,255,211,1,219,255,233,1,221,255,211,0,2,0, +15,255,51,0,17,255,51,0,7,0,15,255,6,0,17,255,6,0,29,255,211,0,30,255,211, +0,108,255,96,0,123,255,96,1,255,255,211,0,1,2,2,255,219,0,3,0,3,255,180,0, +86,255,219,2,3,255,219,0,5,1,153,255,96,1,162,255,96,1,184,255,96,1,189,255, +188,1,192,255,188,0,1,0,105,0,3,0,20,0,36,0,41,0,47,0,51,0,53,0,55,0,57,0, +58,0,60,0,73,0,85,0,89,0,90,0,92,1,82,1,87,1,88,1,89,1,91,1,93,1,94,1,98, +1,100,1,101,1,105,1,107,1,108,1,109,1,110,1,111,1,113,1,114,1,116,1,125,1, +127,1,129,1,131,1,132,1,135,1,136,1,137,1,138,1,141,1,143,1,144,1,146,1,149, +1,151,1,154,1,160,1,161,1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1, +176,1,177,1,178,1,180,1,182,1,183,1,184,1,185,1,186,1,187,1,188,1,191,1,192, +1,194,1,195,1,196,1,198,1,199,1,200,1,201,1,202,1,203,1,204,1,205,1,208,1, +209,1,210,1,212,1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,223,1,226,1,227, +1,228,1,242,1,244,2,2,2,3,2,8,0,0,0,1,0,0,0,0,199,254,176,223,0,0,0,0,191, +26,255,128,0,0,0,0,196,4,48,20,}; +#endif + +#ifdef HAVE_INCBIN +extern const unsigned char pdf_font_DroidSansMono[139280]; +asm(".globl pdf_font_DroidSansMono"); +asm(".balign 8"); +asm("pdf_font_DroidSansMono:"); +asm(".incbin \"fonts/droid/DroidSansMono.ttf\""); +#else +static const unsigned char pdf_font_DroidSansMono[139280] = { +0,1,0,0,0,19,1,0,0,4,0,48,70,70,84,77,75,29,224,116,0,2,31,244,0,0,0,28,71, +68,69,70,2,201,0,4,0,2,14,208,0,0,0,32,71,80,79,83,236,144,228,222,0,2,15, +64,0,0,16,180,71,83,85,66,147,60,130,75,0,2,14,240,0,0,0,80,79,83,47,50,247, +26,134,136,0,0,1,184,0,0,0,96,99,109,97,112,29,150,101,90,0,0,12,136,0,0, +6,242,99,118,116,32,65,244,67,234,0,0,29,92,0,0,2,20,102,112,103,109,115, +211,35,176,0,0,19,124,0,0,7,5,103,97,115,112,0,24,0,9,0,2,14,192,0,0,0,16, +103,108,121,102,155,28,79,66,0,0,36,172,0,1,184,160,104,101,97,100,248,253, +254,54,0,0,1,60,0,0,0,54,104,104,101,97,14,75,8,159,0,0,1,116,0,0,0,36,104, +109,116,120,38,164,8,117,0,0,2,24,0,0,10,112,107,101,114,110,174,170,185, +111,0,1,221,76,0,0,21,90,108,111,99,97,120,114,13,144,0,0,31,112,0,0,5,58, +109,97,120,112,7,1,7,208,0,0,1,152,0,0,0,32,110,97,109,101,35,87,171,194, +0,1,242,168,0,0,7,251,112,111,115,116,26,213,54,16,0,1,250,164,0,0,20,25, +112,114,101,112,122,200,94,246,0,0,26,132,0,0,2,213,0,1,0,0,0,1,5,30,235, +107,75,224,95,15,60,245,0,31,8,0,0,0,0,0,201,129,215,160,0,0,0,0,201,129, +215,160,254,96,253,147,8,103,7,72,0,0,0,8,0,2,0,0,0,0,0,0,0,1,0,0,7,62,254, +78,0,67,8,192,254,96,254,244,8,103,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,156, +0,1,0,0,2,156,1,82,0,84,0,140,0,5,0,2,0,16,0,47,0,90,0,0,3,158,5,192,0,3, +0,1,0,3,4,185,1,144,0,5,0,8,5,154,5,51,0,0,1,27,5,154,5,51,0,0,3,209,0,102, +2,18,8,5,2,11,6,4,2,2,2,2,2,4,160,0,2,175,80,0,120,251,0,0,0,0,0,0,0,0,49, +65,83,67,0,64,0,33,251,2,5,211,254,81,1,51,7,62,1,178,96,0,0,159,223,215, +0,0,4,58,5,129,0,0,0,32,0,2,2,236,0,68,0,0,0,0,2,170,0,0,2,57,0,0,2,57,0, +185,2,215,0,87,4,115,0,9,4,115,0,22,7,29,0,73,5,86,0,72,1,135,0,104,2,170, +0,127,2,170,0,12,3,29,0,33,4,172,0,100,2,57,0,184,2,170,0,91,2,57,0,187,2, +57,0,0,4,115,0,80,4,115,0,156,4,115,0,103,4,115,0,78,4,115,0,47,4,115,0,82, +4,115,0,104,4,115,0,105,4,115,0,89,4,115,0,96,2,57,0,187,2,57,0,184,4,172, +0,101,4,172,0,100,4,172,0,101,4,115,0,84,8,31,0,161,5,86,0,4,5,86,0,168,5, +199,0,104,5,199,0,168,5,86,0,168,4,227,0,168,6,57,0,103,5,199,0,168,2,57, +0,189,4,0,0,32,5,86,0,168,4,115,0,168,6,170,0,168,5,199,0,168,6,57,0,97,5, +86,0,168,6,57,0,97,5,199,0,168,5,86,0,93,4,227,0,46,5,199,0,158,5,86,0,9, +7,141,0,9,5,86,0,46,5,86,0,45,4,227,0,65,2,57,0,146,2,57,0,0,2,57,0,16,3, +193,0,10,4,115,255,225,2,170,0,106,4,115,0,87,4,115,0,132,4,0,0,87,4,115, +0,86,4,115,0,87,2,57,0,29,4,115,0,86,4,115,0,142,1,199,0,137,1,199,255,206, +4,0,0,138,1,199,0,138,6,170,0,136,4,115,0,136,4,115,0,86,4,115,0,132,4,115, +0,86,2,170,0,136,4,0,0,57,2,57,0,31,4,115,0,133,4,0,0,7,5,199,255,253,4,0, +0,23,4,0,0,5,4,0,0,49,2,172,0,34,2,20,0,183,2,172,0,34,4,172,0,92,2,170,0, +242,4,115,0,135,4,115,0,58,4,115,0,113,4,115,255,254,2,20,0,183,4,115,0,115, +2,170,0,45,5,229,0,31,2,246,0,26,4,115,0,83,4,172,0,100,5,229,0,31,4,107, +255,239,3,51,0,122,4,100,0,65,2,170,0,41,2,170,0,27,2,170,0,72,4,156,0,140, +4,76,0,80,2,57,0,187,2,170,0,119,2,170,0,80,2,236,0,27,4,115,0,83,6,172,0, +56,6,172,0,56,6,172,0,73,4,227,0,131,5,86,0,4,5,86,0,4,5,86,0,4,5,86,0,4, +5,86,0,4,5,86,0,4,8,0,0,24,5,199,0,104,5,86,0,168,5,86,0,168,5,86,0,168,5, +86,0,168,2,57,0,9,2,57,0,142,2,57,255,210,2,57,0,7,5,199,0,14,5,199,0,168, +6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,6,57,0,97,4,172,0,142,6,57,0,71,5, +199,0,158,5,199,0,158,5,199,0,158,5,199,0,158,5,86,0,45,5,86,0,168,4,227, +0,142,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,7, +29,0,66,4,0,0,87,4,115,0,87,4,115,0,87,4,115,0,87,4,115,0,87,2,57,0,10,2, +57,0,135,2,57,255,211,2,57,0,8,4,115,0,86,4,115,0,140,4,115,0,86,4,115,0, +86,4,115,0,86,4,115,0,86,4,115,0,86,4,100,0,65,4,227,0,44,4,115,0,139,4,115, +0,139,4,115,0,139,4,115,0,139,4,0,0,5,4,115,0,138,4,0,0,5,5,86,0,4,4,115, +0,87,5,86,0,4,4,115,0,87,5,86,0,4,4,115,0,87,5,199,0,104,4,0,0,87,5,199,0, +104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,104,4,0,0,87,5,199,0,168,4,235, +0,86,5,199,0,14,4,115,0,86,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5, +86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,5,86,0,168,4,115,0,87,6,57,0,103, +4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0,86,6,57,0,103,4,115,0, +86,5,199,0,168,4,115,0,142,5,199,0,14,4,115,0,10,2,57,255,184,2,57,255,184, +2,57,0,12,2,57,0,12,2,57,255,210,2,57,255,210,2,57,0,92,1,199,0,31,2,57,0, +189,2,57,0,194,5,225,0,170,3,141,0,137,4,0,0,32,1,199,255,153,5,86,0,168, +4,0,0,138,4,0,0,138,4,115,0,168,1,199,0,91,4,115,0,168,1,199,0,126,4,115, +0,168,2,85,0,138,4,115,0,168,2,172,0,138,4,115,0,20,1,199,0,16,5,199,0,168, +4,115,0,140,5,199,0,168,4,115,0,140,5,199,0,168,4,115,0,140,4,213,255,254, +5,201,0,165,4,115,0,140,6,57,0,97,4,115,0,86,6,57,0,97,4,115,0,86,6,57,0, +97,4,115,0,86,8,0,0,97,7,141,0,86,5,199,0,168,2,170,0,136,5,199,0,168,2,170, +0,129,5,199,0,168,2,170,0,56,5,86,0,93,4,0,0,57,5,86,0,93,4,0,0,57,5,86,0, +93,4,0,0,57,5,86,0,93,4,0,0,57,4,227,0,46,2,57,0,31,4,227,0,46,3,0,0,31,4, +227,0,46,2,57,0,31,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199, +0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0,158,4,115,0,133,5,199,0, +158,4,115,0,133,7,141,0,9,5,199,255,253,5,86,0,45,4,0,0,5,5,86,0,45,4,227, +0,65,4,0,0,49,4,227,0,65,4,0,0,49,4,227,0,65,4,0,0,49,1,199,0,138,4,115,0, +192,5,86,0,4,4,115,0,87,8,0,0,24,7,29,0,66,6,57,0,71,4,227,0,44,2,170,0,0, +2,170,0,0,2,170,0,51,2,170,255,221,2,170,0,156,2,170,0,51,2,170,0,80,2,170, +255,233,2,170,0,22,2,170,0,205,2,170,0,29,5,87,0,4,2,57,0,187,6,70,255,245, +6,180,255,242,3,18,255,232,6,50,255,187,6,216,0,65,6,5,255,187,1,199,255, +176,5,86,0,4,5,86,0,168,4,104,0,168,5,88,0,61,5,86,0,168,4,227,0,65,5,199, +0,168,6,57,0,97,2,57,0,189,5,86,0,168,5,88,0,10,6,170,0,168,5,199,0,168,5, +51,0,90,6,57,0,97,5,199,0,168,5,86,0,168,4,242,0,108,4,227,0,46,5,86,0,45, +6,98,0,117,5,86,0,46,6,175,0,145,5,251,0,87,2,57,0,7,5,86,0,45,4,160,0,86, +3,145,0,70,4,115,0,106,1,199,0,137,4,96,0,133,4,160,0,86,4,154,0,142,4,0, +0,7,4,116,0,86,3,145,0,70,3,135,0,86,4,115,0,106,4,115,0,106,1,199,0,137, +4,0,0,138,4,0,0,14,4,156,0,138,4,0,0,0,3,149,0,86,4,115,0,86,5,133,0,79,4, +141,0,132,3,219,0,86,4,240,0,86,3,41,0,29,4,96,0,133,5,48,0,85,4,51,0,21, +5,180,0,135,6,63,0,83,1,199,255,205,4,96,0,133,4,115,0,86,4,96,0,133,6,63, +0,83,5,87,0,168,6,235,0,46,4,85,0,168,5,192,0,104,5,86,0,93,2,57,0,189,2, +57,0,7,4,0,0,32,8,117,0,18,8,21,0,168,6,213,0,46,4,169,0,168,5,21,0,55,5, +192,0,168,5,86,0,4,5,64,0,168,5,86,0,168,4,85,0,168,5,107,0,15,5,86,0,168, +7,99,0,28,4,213,0,67,5,192,0,168,5,192,0,168,4,169,0,168,5,64,0,18,6,170, +0,168,5,199,0,168,6,57,0,97,5,192,0,166,5,86,0,168,5,199,0,104,4,227,0,46, +5,21,0,55,6,21,0,118,5,86,0,46,5,235,0,168,5,85,0,160,7,85,0,168,7,128,0, +168,6,85,0,46,7,21,0,168,5,64,0,168,5,192,0,105,8,21,0,168,5,199,0,96,4,115, +0,87,4,149,0,120,4,64,0,142,2,235,0,142,4,171,0,20,4,115,0,87,5,90,0,7,3, +171,0,49,4,120,0,142,4,120,0,142,3,128,0,138,4,171,0,11,5,128,0,142,4,107, +0,142,4,115,0,86,4,85,0,142,4,115,0,132,4,0,0,87,3,170,0,35,4,0,0,5,6,149, +0,86,4,0,0,23,4,149,0,142,4,43,0,122,6,107,0,142,6,149,0,142,5,0,0,45,5,192, +0,142,4,43,0,142,4,21,0,55,6,0,0,142,4,85,0,17,4,115,0,87,4,115,0,10,2,235, +0,142,4,21,0,87,4,0,0,57,1,199,0,137,2,57,255,248,1,199,255,206,7,64,0,11, +6,128,0,142,4,115,0,10,3,128,0,138,4,0,0,5,4,107,0,142,3,233,0,168,3,74,0, +142,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253,7,141,0,9,5,199,255,253, +5,86,0,45,4,0,0,5,4,115,0,0,8,0,0,0,8,0,0,0,4,107,255,225,1,199,0,127,1,199, +0,127,1,199,0,127,1,199,0,126,2,170,0,75,2,170,0,75,2,170,0,75,4,115,0,138, +4,115,0,136,2,205,0,81,8,0,1,22,8,0,0,55,1,128,0,85,2,213,0,85,2,170,0,88, +2,170,0,89,4,0,0,185,2,170,255,192,1,86,254,96,2,235,0,101,4,115,0,4,4,115, +0,58,8,192,0,158,4,115,0,16,7,21,0,69,2,150,0,19,8,149,0,188,8,0,0,188,6, +37,0,108,4,205,0,88,6,172,0,80,6,172,0,61,6,172,0,93,6,172,0,145,8,0,1,162, +4,0,1,16,8,0,1,162,4,0,1,16,8,0,1,162,4,0,1,16,4,0,1,16,3,244,0,56,4,229, +0,4,6,150,0,235,5,180,0,154,4,172,0,101,4,100,0,51,5,180,0,87,7,213,1,152, +5,192,1,22,2,49,255,158,4,100,0,56,4,100,0,65,4,171,0,100,4,100,0,63,4,100, +0,65,4,213,0,157,4,172,0,100,4,213,2,34,4,213,1,5,5,171,255,246,5,0,1,216, +5,171,2,141,5,171,255,246,5,171,2,141,5,171,255,246,5,171,2,141,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,1,217,5, +171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255,246, +5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,2,141,5,171,1,217,5,171,1,217,5,171,255,246,5,171,255,246,5,171, +255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255, +246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,255,246,5,171,0,0,5,171, +0,0,5,171,0,0,5,171,0,0,5,171,2,213,5,171,0,103,5,171,0,0,5,213,0,0,4,213, +0,123,4,213,0,6,2,214,0,109,2,214,0,109,8,0,0,0,7,235,1,158,7,235,1,145,7, +235,1,158,7,235,1,145,3,244,0,8,4,213,0,167,4,213,0,178,4,213,0,41,4,213, +0,41,2,214,0,115,8,43,1,177,8,107,1,209,7,85,1,70,6,0,1,218,6,0,1,81,4,64, +0,59,5,64,0,60,4,192,0,102,4,21,0,66,4,0,0,196,6,0,1,16,4,0,0,29,4,0,0,29, +2,170,0,119,2,170,0,243,2,170,0,127,2,170,0,14,2,170,0,53,2,170,0,43,2,170, +0,45,2,170,255,229,1,199,0,124,1,199,0,130,2,90,0,106,2,90,0,72,2,152,0,0, +2,152,0,0,2,135,0,45,2,160,255,233,3,47,0,32,2,72,255,232,0,0,0,3,0,0,0,3, +0,0,0,28,0,1,0,0,0,0,4,232,0,3,0,1,0,0,0,28,0,4,4,204,0,0,0,190,0,128,0,6, +0,62,0,126,1,127,1,146,1,255,2,199,2,201,2,221,3,126,3,138,3,140,3,161,3, +206,4,12,4,79,4,92,4,95,4,145,30,133,30,243,32,21,32,30,32,34,32,38,32,48, +32,51,32,58,32,60,32,62,32,68,32,127,32,164,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,94,33,149,33,168,34,2,34,6,34,15,34,18,34,21,34,26,34, +31,34,41,34,43,34,72,34,97,34,101,35,2,35,16,35,33,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,108,37,128,37,132,37,136,37, +140,37,147,37,161,37,172,37,178,37,186,37,188,37,196,37,203,37,207,37,217, +37,230,38,60,38,64,38,66,38,96,38,99,38,102,38,107,240,2,240,5,251,2,255, +255,0,0,0,32,0,160,1,146,1,250,2,198,2,201,2,216,3,126,3,132,3,140,3,142, +3,163,4,1,4,14,4,81,4,94,4,144,30,128,30,242,32,19,32,23,32,32,32,38,32,48, +32,50,32,57,32,60,32,62,32,68,32,127,32,163,32,167,32,172,33,5,33,19,33,22, +33,34,33,38,33,46,33,91,33,144,33,168,34,2,34,6,34,15,34,17,34,21,34,25,34, +30,34,41,34,43,34,72,34,96,34,100,35,2,35,16,35,32,37,0,37,2,37,12,37,16, +37,20,37,24,37,28,37,36,37,44,37,52,37,60,37,80,37,128,37,132,37,136,37,140, +37,144,37,160,37,170,37,178,37,186,37,188,37,196,37,202,37,207,37,216,37, +230,38,58,38,64,38,66,38,96,38,99,38,101,38,106,240,1,240,5,251,1,255,255, +255,227,0,0,255,174,255,71,254,129,254,128,254,114,252,160,253,204,253,203, +253,202,253,201,253,151,253,150,253,149,253,148,253,100,227,118,227,10,225, +235,225,234,225,233,225,230,225,221,225,220,225,215,225,214,225,213,225,208, +225,150,225,115,225,113,225,109,225,21,225,8,225,6,224,251,224,248,224,241, +224,197,224,148,224,130,224,41,224,38,224,30,224,29,223,255,0,0,224,19,224, +10,224,9,223,237,223,214,223,212,223,56,223,43,223,28,221,62,221,61,221,52, +221,49,221,46,221,43,221,40,221,33,221,26,221,19,221,12,220,249,220,230,220, +227,220,224,220,221,220,218,220,206,220,198,220,193,220,186,220,185,220,178, +220,173,220,170,220,162,220,150,220,67,220,64,220,63,220,34,220,32,220,31, +220,28,18,135,18,133,7,135,0,1,0,0,0,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,98,0,99,0,100,0,101,0, +102,0,103,0,104,0,105,0,106,0,107,0,108,0,109,0,16,0,110,0,111,0,112,0,113, +0,114,0,115,0,116,0,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0, +126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138, +0,139,0,140,0,141,0,142,0,143,0,144,0,145,0,146,0,147,0,148,0,149,0,150,0, +151,0,152,0,153,0,154,0,155,0,156,0,157,0,158,0,159,0,160,0,161,0,162,0,163, +0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,173,0,174,0,175,0, +176,0,177,0,178,0,179,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188, +0,189,0,190,0,191,0,192,0,193,0,194,0,195,0,196,0,197,0,198,0,199,0,200,0, +201,0,202,0,203,0,204,0,205,0,206,0,207,0,208,0,209,0,210,0,211,0,212,0,213, +0,214,0,215,0,216,0,217,0,218,0,219,0,220,0,221,0,222,0,223,0,224,0,225,0, +226,0,227,0,228,0,229,0,230,0,231,0,232,0,233,0,234,0,235,0,236,0,237,0,238, +0,239,0,240,0,241,0,242,0,243,0,244,0,245,0,246,0,247,0,248,0,249,0,250,0, +251,0,252,0,253,0,254,0,255,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10, +1,11,1,12,1,13,1,14,1,15,1,16,1,17,1,18,1,19,1,20,1,21,1,22,1,23,1,24,1,25, +1,26,1,27,1,28,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40, +1,41,1,42,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,0,119,2,48,0,6,2,10,0,0,0,0,1,0,0, +1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,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,0,0,0,0,0,1,0,0,0,0,0,3,0,4,0,5,0,6,0,7,0, +8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0, +23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37, +0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52, +0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67, +0,68,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82, +0,83,0,84,0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97, +0,0,0,132,0,133,0,135,0,137,0,145,0,150,0,156,0,161,0,160,0,162,0,164,0,163, +0,165,0,167,0,169,0,168,0,170,0,171,0,173,0,172,0,174,0,175,0,177,0,179,0, +178,0,180,0,182,0,181,0,186,0,185,0,187,0,188,2,9,0,112,0,99,0,100,0,104, +2,11,0,118,0,159,0,110,0,106,2,29,0,116,0,105,2,54,0,134,0,152,2,49,0,113, +2,56,2,57,0,102,0,117,2,43,2,46,2,45,1,137,2,52,0,107,0,122,1,114,0,166,0, +184,0,127,0,98,0,109,2,48,1,64,2,53,2,44,0,108,0,123,2,12,0,3,0,128,0,131, +0,149,1,18,1,19,1,254,1,255,2,6,2,7,2,2,2,3,0,183,2,119,0,191,1,56,2,20,2, +25,2,16,2,17,2,136,2,137,2,10,0,119,2,4,2,8,2,13,0,130,0,138,0,129,0,139, +0,136,0,141,0,142,0,143,0,140,0,147,0,148,0,0,0,146,0,154,0,155,0,153,0,241, +1,71,1,78,0,111,1,74,1,75,1,76,0,120,1,79,1,77,1,72,0,0,64,69,89,88,85,84, +83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59, +58,57,56,55,54,53,49,48,47,46,45,44,40,39,38,37,36,35,34,33,31,24,20,17,16, +15,14,13,11,10,9,8,7,6,5,4,3,2,1,0,44,69,35,70,96,32,176,38,96,176,4,38,35, +72,72,45,44,69,35,70,35,97,32,176,38,97,176,4,38,35,72,72,45,44,69,35,70, +96,176,32,97,32,176,70,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,32,96, +32,176,38,97,176,32,97,176,4,38,35,72,72,45,44,69,35,70,96,176,64,97,32,176, +102,96,176,4,38,35,72,72,45,44,69,35,70,35,97,176,64,96,32,176,38,97,176, +64,97,176,4,38,35,72,72,45,44,1,16,32,60,0,60,45,44,32,69,35,32,176,205,68, +35,32,184,1,90,81,88,35,32,176,141,68,35,89,32,176,237,81,88,35,32,176,77, +68,35,89,32,176,4,38,81,88,35,32,176,13,68,35,89,33,33,45,44,32,32,69,24, +104,68,32,176,1,96,32,69,176,70,118,104,138,69,96,68,45,44,1,177,11,10,67, +35,67,101,10,45,44,0,177,10,11,67,35,67,11,45,44,0,176,40,35,112,177,1,40, +62,1,176,40,35,112,177,2,40,69,58,177,2,0,8,13,45,44,32,69,176,3,37,69,97, +100,176,80,81,88,69,68,27,33,33,89,45,44,73,176,14,35,68,45,44,32,69,176, +0,67,96,68,45,44,1,176,6,67,176,7,67,101,10,45,44,32,105,176,64,97,176,0, +139,32,177,44,192,138,140,184,16,0,98,96,43,12,100,35,100,97,92,88,176,3, +97,89,45,44,138,3,69,138,138,135,176,17,43,176,41,35,68,176,41,122,228,24, +45,44,69,101,176,44,35,68,69,176,43,35,68,45,44,75,82,88,69,68,27,33,33,89, +45,44,75,81,88,69,68,27,33,33,89,45,44,1,176,5,37,16,35,32,138,245,0,176, +1,96,35,237,236,45,44,1,176,5,37,16,35,32,138,245,0,176,1,97,35,237,236,45, +44,1,176,6,37,16,245,0,237,236,45,44,70,35,70,96,138,138,70,35,32,70,138, +96,138,97,184,255,128,98,35,32,16,35,138,177,12,12,138,112,69,96,32,176,0, +80,88,176,1,97,184,255,186,139,27,176,70,140,89,176,16,96,104,1,58,45,44, +32,69,176,3,37,70,82,75,176,19,81,91,88,176,2,37,70,32,104,97,176,3,37,176, +3,37,63,35,33,56,27,33,17,89,45,44,32,69,176,3,37,70,80,88,176,2,37,70,32, +104,97,176,3,37,176,3,37,63,35,33,56,27,33,17,89,45,44,0,176,7,67,176,6,67, +11,45,44,33,33,12,100,35,100,139,184,64,0,98,45,44,33,176,128,81,88,12,100, +35,100,139,184,32,0,98,27,178,0,64,47,43,89,176,2,96,45,44,33,176,192,81, +88,12,100,35,100,139,184,21,85,98,27,178,0,128,47,43,89,176,2,96,45,44,12, +100,35,100,139,184,64,0,98,96,35,33,45,44,75,83,88,138,176,4,37,73,100,35, +69,105,176,64,139,97,176,128,98,176,32,97,106,176,14,35,68,35,16,176,14,246, +27,33,35,138,18,17,32,57,47,89,45,44,75,83,88,32,176,3,37,73,100,105,32,176, +5,38,176,6,37,73,100,35,97,176,128,98,176,32,97,106,176,14,35,68,176,4,38, +16,176,14,246,138,16,176,14,35,68,176,14,246,176,14,35,68,176,14,237,27,138, +176,4,38,17,18,32,57,35,32,57,47,47,89,45,44,69,35,69,96,35,69,96,35,69,96, +35,118,104,24,176,128,98,32,45,44,176,72,43,45,44,32,69,176,0,84,88,176,64, +68,32,69,176,64,97,68,27,33,33,89,45,44,69,177,48,47,69,35,69,97,96,176,1, +96,105,68,45,44,75,81,88,176,47,35,112,176,20,35,66,27,33,33,89,45,44,75, +81,88,32,176,3,37,69,105,83,88,68,27,33,33,89,27,33,33,89,45,44,69,176,20, +67,176,0,96,99,176,1,96,105,68,45,44,176,47,69,68,45,44,69,35,32,69,138,96, +68,45,44,69,35,69,96,68,45,44,75,35,81,88,185,0,51,255,224,177,52,32,27,179, +51,0,52,0,89,68,68,45,44,176,22,67,88,176,3,38,69,138,88,100,102,176,31,96, +27,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,89,35,88,101,89,176,41, +35,68,35,16,176,41,224,27,33,33,33,33,33,89,45,44,176,2,67,84,88,75,83,35, +75,81,90,88,56,27,33,33,89,27,33,33,33,33,89,45,44,176,22,67,88,176,4,37, +69,100,176,32,96,102,32,88,27,33,176,64,89,176,1,97,35,88,27,101,89,176,41, +35,68,176,5,37,176,8,37,8,32,88,2,27,3,89,176,4,37,16,176,5,37,32,70,176, +4,37,35,66,60,176,4,37,176,7,37,8,176,7,37,16,176,6,37,32,70,176,4,37,176, +1,96,35,66,60,32,88,1,27,0,89,176,4,37,16,176,5,37,176,41,224,176,41,32,69, +101,68,176,7,37,16,176,6,37,176,41,224,176,5,37,176,8,37,8,32,88,2,27,3,89, +176,5,37,176,3,37,67,72,176,4,37,176,7,37,8,176,6,37,176,3,37,176,1,96,67, +72,27,33,89,33,33,33,33,33,33,33,45,44,2,176,4,37,32,32,70,176,4,37,35,66, +176,5,37,8,176,3,37,69,72,33,33,33,33,45,44,2,176,3,37,32,176,4,37,8,176, +2,37,67,72,33,33,33,45,44,69,35,32,69,24,32,176,0,80,32,88,35,101,35,89,35, +104,32,176,64,80,88,33,176,64,89,35,88,101,89,138,96,68,45,44,75,83,35,75, +81,90,88,32,69,138,96,68,27,33,33,89,45,44,75,84,88,32,69,138,96,68,27,33, +33,89,45,44,75,83,35,75,81,90,88,56,27,33,33,89,45,44,176,0,33,75,84,88,56, +27,33,33,89,45,44,176,2,67,84,88,176,70,43,27,33,33,33,33,89,45,44,176,2, +67,84,88,176,71,43,27,33,33,33,89,45,44,176,2,67,84,88,176,72,43,27,33,33, +33,33,89,45,44,176,2,67,84,88,176,73,43,27,33,33,33,89,45,44,32,138,8,35, +75,83,138,75,81,90,88,35,56,27,33,33,89,45,44,0,176,2,37,73,176,0,83,88,32, +176,64,56,17,27,33,89,45,44,1,70,35,70,96,35,70,97,35,32,16,32,70,138,97, +184,255,128,98,138,177,64,64,138,112,69,96,104,58,45,44,32,138,35,73,100, +138,35,83,88,60,27,33,89,45,44,75,82,88,125,27,122,89,45,44,176,18,0,75,1, +75,84,66,45,44,177,2,0,66,177,35,1,136,81,177,64,1,136,83,90,88,185,16,0, +0,32,136,84,88,178,2,1,2,67,96,66,89,177,36,1,136,81,88,185,32,0,0,64,136, +84,88,178,2,2,2,67,96,66,177,36,1,136,84,88,178,2,32,2,67,96,66,0,75,1,75, +82,88,178,2,8,2,67,96,66,89,27,185,64,0,0,128,136,84,88,178,2,4,2,67,96,66, +89,185,64,0,0,128,99,184,1,0,136,84,88,178,2,8,2,67,96,66,89,185,64,0,1,0, +99,184,2,0,136,84,88,178,2,16,2,67,96,66,89,185,64,0,2,0,99,184,4,0,136,84, +88,178,2,64,2,67,96,66,89,89,89,89,89,45,44,69,24,104,35,75,81,88,35,32,69, +32,100,176,64,80,88,124,89,104,138,96,89,68,45,44,176,0,22,176,2,37,176,2, +37,1,176,1,35,62,0,176,2,35,62,177,1,2,6,12,176,10,35,101,66,176,11,35,66, +1,176,1,35,63,0,176,2,35,63,177,1,2,6,12,176,6,35,101,66,176,7,35,66,176, +1,22,1,45,44,122,138,16,69,35,245,24,45,0,0,0,177,9,64,190,1,7,0,1,0,31,1, +7,0,1,0,159,1,4,64,142,1,192,253,1,175,253,1,0,253,1,10,79,251,1,32,251,1, +245,80,40,31,242,70,40,31,241,70,42,31,240,70,43,31,95,239,127,239,2,15,239, +79,239,95,239,143,239,175,239,5,11,229,228,30,31,227,226,70,31,15,226,1,64, +226,70,22,31,225,224,70,31,207,224,223,224,239,224,3,64,224,51,54,70,224, +70,24,31,221,61,223,85,222,61,3,85,223,1,3,85,220,3,255,31,15,213,31,213, +2,15,213,31,213,2,64,202,24,27,70,207,194,1,189,192,60,31,193,80,38,31,188, +190,40,31,255,185,1,80,184,112,184,128,184,3,184,255,192,64,255,184,18,50, +70,31,183,63,183,79,183,111,183,127,183,159,183,175,183,7,112,178,160,178, +176,178,3,15,178,1,144,181,1,176,181,1,15,181,1,8,15,179,63,179,239,179,3, +128,176,144,176,2,176,176,192,176,208,176,3,47,175,63,175,2,160,173,176,173, +2,192,173,208,173,2,47,172,63,172,2,159,171,1,192,170,208,170,2,79,169,143, +169,2,47,169,111,169,191,169,255,169,4,156,155,36,31,80,155,1,111,150,1,191, +150,1,150,70,29,31,149,148,23,31,127,148,143,148,255,148,3,48,145,64,145, +2,128,145,1,112,143,128,143,2,144,143,1,192,143,208,143,2,79,140,95,140,111, +140,3,134,70,255,31,159,133,1,132,131,49,31,116,115,63,31,115,80,38,31,111, +110,60,31,110,70,53,31,26,1,24,85,25,51,24,85,7,51,3,85,6,3,255,31,96,80, +38,31,95,80,38,31,92,70,49,31,91,90,72,31,90,70,49,31,19,50,18,85,5,1,3,85, +4,50,3,85,111,3,1,15,3,63,3,2,239,81,255,81,2,64,81,53,56,70,64,81,37,40, +70,207,64,84,80,1,73,70,32,31,72,70,53,31,71,70,53,31,175,70,1,223,70,239, +70,2,128,70,1,22,50,21,85,17,1,15,85,16,50,15,85,2,1,0,85,1,0,1,31,31,15, +63,15,95,15,127,15,4,15,15,47,15,79,15,111,15,143,15,223,15,255,15,7,63,15, +127,15,239,15,3,111,0,1,128,22,1,5,1,184,1,144,177,84,83,43,43,75,184,7,255, +82,75,176,7,80,91,176,1,136,176,37,83,176,1,136,176,64,81,90,176,6,136,176, +0,85,90,91,88,177,1,1,142,89,133,141,141,0,66,29,75,176,50,83,88,176,96,29, +89,75,176,100,83,88,176,64,29,89,75,176,128,83,88,176,16,29,177,22,0,66,89, +116,115,116,117,43,43,43,43,43,1,115,116,117,43,43,43,0,116,43,43,115,115, +117,43,43,43,1,43,43,43,0,43,43,43,43,43,43,1,43,43,0,43,43,1,43,115,43,0, +116,115,116,117,115,116,115,43,1,43,116,117,0,115,43,115,116,1,115,115,116, +0,115,116,116,115,116,115,1,94,115,115,116,115,115,0,115,43,115,115,1,43, +0,43,1,43,0,115,43,116,117,43,43,43,43,1,43,43,116,43,43,94,115,43,0,43,94, +115,116,1,43,43,43,0,43,115,115,94,115,115,115,1,115,115,115,24,94,0,0,0, +5,204,5,204,0,125,5,129,0,21,0,121,5,129,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +4,58,0,20,0,119,0,0,255,236,0,0,0,0,255,236,0,0,0,0,255,236,0,0,254,87,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,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,8,0,0,0,0,0,0,180,0,189,0,175,0,160,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0, +126,0,0,0,172,0,0,0,0,0,0,0,0,0,0,0,0,0,191,0,195,0,171,0,0,0,0,0,155,0,141, +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,185,0,170,0,0,0,0,0, +0,0,148,0,153,0,135,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,106, +0,131,0,141,0,164,0,180,0,0,0,0,0,0,0,0,0,0,0,96,0,106,0,121,0,152,0,172, +0,184,0,167,0,0,1,34,1,51,0,195,0,107,0,0,0,0,0,0,0,219,0,201,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,225,1,201,0,146,0,168,0,107,0,146,0,183, +0,107,0,155,0,0,2,123,2,242,0,146,2,82,0,110,2,215,3,129,0,130,0,137,0,160, +0,159,1,105,0,143,0,0,1,96,0,164,1,91,0,94,0,130,0,0,0,0,0,0,0,94,0,101,0, +111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,144,0,165,0,122,0,128,0,0,0,0,0,0, +0,0,0,0,5,129,255,243,0,13,252,167,0,131,0,137,0,143,0,150,0,105,0,113,0, +0,0,0,0,0,0,0,0,0,0,168,1,249,0,0,0,0,3,31,0,167,0,174,0,181,0,0,0,0,0,129, +0,0,0,0,0,0,0,0,7,72,3,106,2,182,2,2,253,147,0,0,0,145,0,103,0,145,0,97,1, +217,0,0,2,141,3,65,0,68,5,17,0,0,0,44,0,44,0,44,0,44,1,22,1,96,2,4,3,4,3, +230,4,240,5,14,5,84,5,158,5,246,6,50,6,114,6,144,6,178,6,218,7,80,7,150,8, +32,8,222,9,68,9,226,10,140,10,206,11,158,12,80,12,126,12,200,13,18,13,74, +13,146,14,20,15,100,16,22,16,172,17,64,17,160,17,222,18,40,18,202,19,22,19, +96,19,194,20,44,20,88,21,184,22,64,22,182,23,26,23,192,24,94,25,40,26,38, +26,146,27,42,29,162,30,254,32,64,32,148,32,190,32,242,33,28,34,172,34,202, +34,244,35,160,36,54,36,172,37,54,37,166,38,32,38,238,39,88,39,166,40,102, +41,0,41,68,42,246,43,100,43,212,44,112,45,20,45,98,46,16,46,114,46,230,48, +52,50,86,51,226,53,124,54,24,54,136,55,126,55,240,56,112,57,142,58,18,58, +196,59,100,59,234,60,238,62,28,62,144,63,134,64,72,64,168,64,210,65,178,65, +200,66,36,66,110,66,232,67,126,67,170,68,42,68,106,68,138,68,244,69,48,69, +166,70,14,70,48,70,90,70,124,71,8,71,32,71,56,71,80,71,104,71,130,71,154, +72,14,72,34,72,58,72,82,72,106,72,132,72,156,72,178,72,200,72,224,73,80,73, +104,73,128,73,152,73,176,73,200,73,226,74,68,74,252,75,20,75,44,75,68,75, +94,75,118,75,212,76,154,76,178,76,202,76,226,76,250,77,20,77,46,78,38,78, +58,78,82,78,106,78,130,78,156,78,180,78,202,78,224,78,248,79,172,79,196,79, +220,79,244,80,12,80,36,80,62,80,126,81,26,81,50,81,74,81,98,81,124,81,148, +82,24,82,50,82,74,82,98,82,122,82,146,82,166,82,186,82,210,82,234,83,2,83, +26,83,50,83,70,83,94,83,118,83,142,83,164,83,172,84,74,84,98,84,122,84,146, +84,170,84,194,84,214,84,234,84,254,85,22,85,46,85,70,85,94,85,118,85,142, +85,166,85,186,85,206,85,230,85,254,86,22,86,142,87,20,87,42,87,64,87,88,87, +110,87,132,87,154,87,172,87,192,87,216,88,170,88,182,88,210,88,234,89,228, +89,248,90,12,90,124,90,148,90,170,90,190,90,210,90,232,91,22,91,42,91,62, +91,150,91,224,91,248,92,16,92,36,92,56,92,80,92,104,92,116,93,20,93,164,93, +188,93,212,93,236,94,4,94,30,94,56,94,216,95,154,95,178,95,202,95,222,95, +242,96,10,96,34,96,58,96,82,96,106,96,130,96,150,96,170,96,194,96,218,96, +238,98,112,98,136,98,158,98,238,99,96,99,120,99,144,99,168,99,192,99,216, +99,240,100,10,100,36,100,62,100,88,100,122,100,142,100,166,100,190,100,214, +100,238,101,8,101,32,101,56,101,80,101,100,101,124,101,148,101,244,102,108, +103,104,103,140,103,164,103,188,103,212,103,236,104,34,104,88,104,142,104, +214,104,238,105,86,105,162,106,244,107,70,107,118,107,188,107,248,109,10, +109,50,109,112,109,172,109,206,112,188,112,236,114,22,114,30,114,38,114,82, +114,208,114,216,114,224,114,232,115,138,115,146,115,154,116,34,116,42,116, +50,116,116,116,124,116,182,116,190,117,56,117,64,117,72,117,234,117,242,118, +140,119,78,119,102,120,194,120,218,120,242,121,10,121,36,121,64,122,30,122, +212,123,118,124,16,124,186,125,114,125,218,126,124,127,28,127,136,128,94, +128,208,130,6,130,234,130,242,131,112,131,246,132,174,133,52,133,156,134, +4,134,138,135,74,135,188,136,108,136,134,136,160,136,184,136,208,136,232, +137,66,137,198,137,222,138,142,138,150,138,158,138,182,138,190,139,116,139, +224,140,78,140,102,140,126,140,198,140,206,141,66,141,74,141,82,141,224,141, +232,142,210,143,168,144,10,144,34,144,152,145,30,145,38,145,46,145,54,145, +108,145,116,145,124,145,132,146,12,146,156,146,164,146,226,147,78,147,158, +147,250,148,88,148,206,149,44,149,214,150,112,151,26,151,34,151,198,152,86, +152,130,152,254,153,6,153,250,154,160,155,34,155,58,155,200,156,80,157,2, +157,96,157,104,157,178,157,186,157,194,157,250,158,2,158,250,159,2,159,72, +159,160,159,242,160,86,160,184,161,28,161,134,162,24,162,150,163,6,163,32, +163,192,163,216,164,106,164,114,164,232,165,2,165,10,165,228,166,90,166,222, +166,246,167,14,167,100,167,148,167,194,167,218,167,242,168,10,168,34,168, +60,168,86,168,110,168,134,168,168,168,202,168,236,168,248,169,40,169,90,169, +140,169,188,170,18,170,114,170,208,171,12,171,102,171,172,171,238,174,134, +174,168,174,186,174,246,175,46,175,70,175,90,175,126,175,232,176,60,176,252, +178,100,179,50,180,4,180,178,181,136,182,32,182,224,183,78,183,128,183,178, +183,228,184,14,184,60,184,106,184,152,184,198,185,14,185,86,185,166,186,118, +187,22,187,70,187,184,187,214,188,72,188,226,188,250,189,52,190,108,191,92, +191,212,192,8,192,96,192,184,192,230,193,0,193,54,193,116,193,140,193,166, +193,200,193,234,194,12,194,46,194,84,194,122,194,160,194,198,194,248,195, +30,195,72,195,118,195,166,195,224,196,14,196,62,196,120,196,166,196,214,197, +16,197,62,197,110,197,168,197,220,198,18,198,86,198,138,198,194,199,8,199, +62,199,114,199,184,199,238,200,34,200,106,200,178,200,252,201,88,201,112, +201,136,201,160,201,184,201,208,203,232,205,196,207,132,207,146,207,178,207, +206,207,246,208,4,208,18,208,32,208,46,208,60,208,106,208,188,208,238,209, +32,209,114,209,180,210,100,210,228,211,148,212,14,212,166,213,6,213,140,213, +224,214,26,214,102,214,220,215,70,215,164,215,246,216,8,216,68,216,164,217, +34,217,88,218,12,218,74,218,114,218,160,218,200,218,242,219,40,219,94,219, +130,219,208,220,20,220,80,0,0,0,2,0,68,0,0,2,100,5,85,0,3,0,7,0,46,177,1, +0,47,60,178,7,4,8,237,50,177,6,5,220,60,178,3,2,8,237,50,0,177,3,0,47,60, +178,5,4,8,237,50,178,7,6,9,252,60,178,1,2,8,237,50,51,17,33,17,37,33,17,33, +68,2,32,254,36,1,152,254,104,5,85,250,171,68,4,205,0,0,0,2,0,185,0,0,1,127, +5,129,0,3,0,7,1,172,64,158,3,91,2,2,150,7,166,7,2,7,150,57,4,73,4,89,4,3, +4,64,23,27,72,6,4,1,11,4,38,9,1,201,9,217,9,2,118,9,166,9,2,25,9,41,9,2,6, +9,1,215,73,9,1,38,9,1,217,9,1,118,9,1,41,9,1,6,9,1,121,9,1,86,9,1,9,9,1,163, +169,9,1,130,9,1,84,9,100,9,116,9,3,137,9,1,98,9,114,9,2,68,9,84,9,2,34,9, +50,9,2,20,9,1,2,9,1,242,9,1,212,9,228,9,2,178,9,194,9,2,148,9,164,9,2,114, +9,130,9,2,84,9,100,9,2,66,9,1,20,9,36,9,52,9,3,2,9,1,110,9,184,255,128,64, +17,102,109,72,73,9,1,9,64,94,98,72,45,9,61,9,2,9,184,1,0,64,153,85,88,72, +9,128,81,84,72,125,9,141,9,157,9,3,95,9,111,9,2,9,128,71,75,72,9,192,67,70, +72,9,128,63,66,72,125,9,1,91,9,107,9,2,61,9,77,9,2,25,9,41,9,2,11,9,1,55, +235,9,251,9,2,205,9,221,9,2,171,9,187,9,2,9,64,45,48,72,59,9,75,9,91,9,3, +29,9,45,9,2,1,203,9,219,9,235,9,3,159,9,175,9,191,9,3,27,9,43,9,59,9,107, +9,123,9,5,15,9,1,2,127,9,143,9,159,9,191,9,207,9,5,64,9,96,9,2,15,9,31,9, +2,7,112,1,1,95,1,1,1,5,156,4,2,3,0,63,47,253,206,93,93,1,94,93,93,93,95,113, +113,113,113,95,114,114,43,114,114,114,94,93,93,93,93,93,43,43,43,113,113, +43,43,114,43,114,43,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +114,114,114,94,93,93,93,113,113,113,113,114,114,94,93,93,93,93,113,47,94, +93,43,93,237,113,51,47,237,49,48,1,35,3,51,3,53,51,21,1,103,148,24,196,198, +194,1,141,3,244,250,127,201,201,0,0,2,0,87,3,198,2,128,5,129,0,3,0,7,0,104, +64,33,48,3,1,128,3,1,3,16,2,32,2,96,2,112,2,128,2,5,96,2,112,2,2,80,2,96, +2,176,2,192,2,4,2,184,255,192,179,37,40,72,2,184,255,192,64,32,25,28,72,2, +48,7,1,128,7,1,7,111,6,127,6,143,6,3,47,6,63,6,2,6,5,32,0,1,0,6,2,3,0,63, +51,205,93,50,1,47,113,114,205,93,113,220,43,43,93,113,114,205,93,113,49,48, +1,35,3,51,1,35,3,51,2,106,142,20,184,254,121,141,21,184,3,198,1,187,254,69, +1,187,0,0,0,2,0,9,0,0,4,105,5,121,0,27,0,31,0,214,64,134,90,25,1,90,21,1, +68,14,1,68,19,1,54,19,1,68,30,1,38,30,54,30,2,68,23,1,38,23,54,23,2,3,16, +1,8,29,28,21,20,9,20,20,11,14,15,18,19,10,9,19,12,16,4,10,4,1,0,25,24,5,24, +24,27,3,3,7,30,31,22,23,6,23,5,6,4,7,8,11,4,12,13,1,14,29,30,4,13,0,15,28, +31,4,16,17,18,21,22,25,4,17,16,13,1,208,13,1,79,17,143,17,159,17,3,63,17, +79,17,2,13,17,13,17,5,20,23,24,3,19,3,6,9,10,3,5,0,47,23,51,63,23,51,18,57, +57,47,47,93,113,93,113,17,23,51,16,205,23,50,17,23,51,16,205,23,50,1,47,51, +51,135,192,192,192,192,1,23,51,16,135,192,192,192,192,1,47,23,51,135,192, +192,192,192,1,51,16,135,192,192,192,192,49,48,1,93,93,93,93,93,93,93,93,93, +93,1,3,33,21,33,3,35,19,33,3,35,19,35,53,51,19,35,53,33,19,51,3,33,19,51, +3,51,21,33,3,33,19,3,128,78,1,4,254,229,88,110,86,254,149,84,110,84,201,225, +78,252,1,18,89,110,88,1,107,88,110,88,211,253,64,80,1,106,78,3,117,254,143, +108,254,104,1,152,254,104,1,152,108,1,113,108,1,152,254,104,1,152,254,104, +108,254,143,1,113,0,3,0,22,255,114,4,82,5,236,0,48,0,59,0,70,1,46,64,92,154, +14,1,154,13,1,150,68,1,133,39,1,138,57,154,57,2,137,53,153,53,2,132,37,1, +118,6,134,6,150,6,3,70,63,86,63,134,63,3,52,38,100,38,116,38,3,37,2,1,25, +27,1,24,34,55,3,47,9,21,65,3,32,48,1,48,48,16,49,30,111,29,41,111,0,49,32, +49,2,0,49,32,49,48,49,80,49,112,49,5,8,3,49,184,255,192,179,29,35,72,49,184, +255,192,64,117,17,22,72,49,4,111,3,64,16,24,72,3,60,111,16,33,66,115,207, +54,1,157,54,1,5,136,54,1,120,10,216,10,2,199,34,215,34,2,182,34,1,135,34, +167,34,2,215,65,1,166,65,1,119,65,1,60,16,65,34,10,54,41,49,8,0,125,30,141, +30,2,26,30,1,30,24,22,64,19,23,72,22,15,21,47,21,63,21,95,21,4,21,55,9,115, +47,148,4,164,4,2,112,4,128,4,2,5,4,21,4,85,4,101,4,4,46,4,0,0,47,50,50,93, +93,93,205,237,50,47,93,205,43,51,51,93,93,18,23,57,93,93,93,93,93,93,93,93, +95,93,93,237,50,1,47,237,214,43,237,47,43,43,95,94,93,113,253,212,237,17, +18,57,47,114,23,51,205,23,50,49,48,93,0,93,93,93,93,93,93,1,93,93,93,0,93, +1,93,37,46,1,39,55,30,3,23,17,39,46,3,53,52,62,2,55,53,51,21,30,3,23,7,46, +1,39,17,30,5,21,20,14,2,7,21,35,1,52,46,2,39,17,62,3,1,20,30,2,23,17,14,3, +2,6,217,245,34,170,11,46,78,113,78,20,77,148,116,71,64,115,158,95,124,100, +145,102,66,20,174,20,122,117,59,114,103,88,64,36,56,114,175,119,124,1,160, +47,81,106,58,65,108,77,42,253,92,40,70,95,55,72,100,61,27,20,9,185,165,37, +53,87,64,39,5,1,240,5,18,50,83,128,98,84,124,83,44,4,131,131,5,45,80,115, +75,33,94,105,11,254,67,14,30,41,56,79,109,72,77,131,100,62,6,162,2,24,63, +80,51,32,15,254,44,4,31,56,81,2,197,54,74,50,33,14,1,165,4,33,52,68,0,0,0, +0,5,0,73,255,244,6,212,5,141,0,19,0,23,0,43,0,63,0,83,0,212,64,11,118,20, +134,20,2,121,22,137,22,2,42,184,255,232,64,14,8,12,72,37,24,8,12,72,32,24, +8,12,72,26,184,255,232,179,8,12,72,17,184,255,232,179,8,12,72,13,184,255, +232,64,18,8,12,72,7,24,8,12,72,3,24,8,12,72,22,23,20,21,21,184,255,240,64, +84,23,16,23,21,23,21,0,39,54,180,10,178,0,180,0,44,16,44,32,44,3,0,44,64, +44,2,0,44,16,44,32,44,80,44,96,44,112,44,224,44,240,44,8,44,64,180,29,178, +74,180,15,39,1,239,39,255,39,2,39,64,10,13,72,39,79,182,34,184,69,182,24, +4,22,3,21,18,49,182,15,184,59,182,5,19,0,63,237,244,237,63,63,63,237,244, +237,1,47,43,113,114,237,244,237,47,93,113,114,253,244,237,17,18,57,57,47, +47,56,56,17,51,17,51,49,48,0,43,43,43,43,43,43,43,43,1,93,93,1,20,14,2,35, +34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2, +53,52,62,2,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,6,212,51,87,116,66,66,115,85,49,48,86,117,68,66,115, +85,50,251,59,155,3,154,157,251,223,64,114,86,49,50,85,116,66,67,116,85,49, +49,86,118,4,250,22,43,63,40,42,64,44,22,23,43,63,41,39,63,44,24,251,240,22, +42,62,40,43,65,44,22,23,43,64,42,38,62,44,24,1,178,125,171,105,45,45,104, +171,126,133,174,103,41,41,103,174,253,201,5,129,12,41,102,172,131,126,172, +107,46,46,106,172,127,131,172,102,41,252,37,99,131,78,32,33,78,131,98,95, +128,79,34,34,79,128,2,124,98,130,78,32,33,78,130,97,95,130,79,34,34,79,130, +0,0,3,0,72,255,236,5,54,5,137,0,57,0,73,0,89,1,20,64,73,137,1,1,140,36,1, +123,42,139,42,2,98,82,114,82,130,82,3,102,71,1,127,78,1,91,78,1,73,43,89, +43,105,43,3,54,48,134,48,2,37,40,1,44,35,124,35,140,35,3,28,5,44,5,60,5,92, +5,4,10,10,26,10,42,10,3,10,2,26,2,42,2,3,31,184,255,232,64,56,9,13,72,10, +25,26,25,42,25,3,48,41,38,69,4,54,66,73,23,33,73,58,45,44,140,74,1,74,77, +18,3,23,3,58,44,80,23,1,3,44,1,23,58,44,44,58,23,3,13,15,54,1,175,54,1,54, +184,255,192,64,61,9,12,72,54,80,72,63,13,79,13,2,13,143,3,1,141,77,1,98,69, +114,69,2,54,69,70,69,2,3,74,48,41,77,44,38,18,69,9,8,63,81,144,28,1,192,28, +1,15,28,63,28,2,28,85,81,8,22,51,80,0,22,0,63,237,63,237,47,93,93,113,237, +18,23,57,93,93,93,93,1,47,93,237,47,43,93,113,18,23,57,47,47,47,0,93,1,93, +17,18,57,17,23,57,93,16,205,16,237,16,237,17,23,57,49,48,93,43,0,93,93,93, +93,1,93,93,93,0,93,93,93,93,1,93,0,93,93,5,34,38,39,14,3,35,34,46,2,53,52, +62,2,55,46,3,53,52,62,2,51,50,30,2,21,20,14,2,7,30,1,23,62,1,55,23,14,1,7, +30,1,51,50,54,55,21,14,1,1,52,46,2,35,34,6,21,20,22,23,62,3,3,46,1,39,14, +1,21,20,30,2,51,50,62,2,4,169,96,144,58,30,76,93,109,64,117,171,110,53,51, +91,126,75,18,29,22,12,40,85,133,93,73,123,90,50,66,112,148,83,62,146,85,61, +81,29,145,35,107,70,53,106,49,32,59,26,28,75,254,150,27,48,69,42,96,100,37, +28,65,116,86,50,74,89,164,66,113,123,35,72,109,73,44,79,68,55,12,66,61,26, +48,38,23,60,105,143,83,79,129,105,83,33,34,77,78,78,35,66,115,85,49,38,72, +106,68,75,117,92,75,33,114,201,97,90,199,121,43,139,227,103,54,44,7,9,135, +11,11,4,121,37,60,43,23,103,91,59,129,56,26,55,65,79,252,158,105,230,122, +48,148,105,55,95,71,41,19,30,38,0,0,1,0,104,3,198,1,32,5,129,0,3,0,33,64, +19,48,3,1,128,3,1,3,16,2,32,2,2,2,32,0,1,0,2,3,0,63,205,93,1,47,93,205,93, +113,49,48,1,35,3,51,1,10,141,21,184,3,198,1,187,0,1,0,127,254,88,2,158,5, +204,0,22,0,66,64,45,135,13,1,135,9,1,88,20,1,88,2,1,17,24,14,17,72,5,24,14, +17,72,16,6,16,16,6,128,6,2,6,11,242,0,0,16,0,32,0,3,0,16,27,5,0,0,63,63,1, +47,93,237,204,93,56,50,49,48,43,43,93,93,93,93,19,52,62,2,55,51,14,3,21,20, +30,2,23,35,46,3,53,127,42,90,140,97,174,94,137,88,43,43,88,137,94,174,97, +140,90,42,2,20,139,254,234,220,105,105,221,235,254,139,139,254,236,220,105, +105,220,234,253,140,0,0,0,1,0,12,254,88,2,43,5,204,0,22,0,72,64,13,136,13, +1,136,9,1,87,20,1,87,2,1,17,184,255,232,179,14,17,72,5,184,255,232,180,14, +17,72,16,6,184,255,240,64,16,31,6,143,6,2,6,0,242,143,11,1,11,16,0,5,27,0, +63,63,1,47,93,253,204,93,56,50,49,48,43,43,93,93,93,93,1,20,14,2,7,35,62, +3,53,52,46,2,39,51,30,3,21,2,43,42,90,140,97,174,94,137,88,43,43,88,137,94, +174,97,140,90,42,2,16,140,253,234,220,105,105,220,236,254,139,139,254,235, +221,105,105,220,234,254,139,0,0,0,0,1,0,33,2,178,2,253,5,129,0,14,0,107,64, +75,77,5,93,5,109,5,3,75,4,91,4,107,4,3,66,8,82,8,2,67,7,83,7,2,0,6,12,3,13, +95,4,1,15,4,1,4,3,32,2,48,2,2,2,14,47,10,63,10,2,10,9,8,191,13,207,13,2,16, +13,32,13,2,13,240,5,1,223,5,1,0,5,1,5,14,3,0,63,204,93,93,93,1,47,93,93,204, +51,204,93,221,204,93,51,204,113,114,18,23,57,49,48,93,93,93,93,1,37,23,5, +23,7,11,1,39,55,37,55,5,3,51,1,200,1,8,45,254,230,185,119,150,156,119,189, +254,232,45,1,11,12,136,4,90,103,132,73,250,72,1,2,255,0,72,248,73,134,107, +1,41,0,0,0,1,0,100,0,180,4,71,4,158,0,11,0,71,64,46,211,11,1,133,11,1,220, +4,1,138,4,1,9,1,170,6,16,2,32,2,2,2,217,2,1,56,2,136,2,2,2,0,4,173,9,214, +7,1,55,7,135,7,2,7,5,179,0,63,51,93,93,51,237,50,50,93,93,1,47,93,51,237, +50,49,48,93,93,93,93,1,17,35,17,33,53,33,17,51,17,33,21,2,159,147,254,88, +1,168,147,1,168,2,96,254,84,1,172,146,1,172,254,84,146,0,0,1,0,184,254,250, +1,129,0,219,0,12,0,78,185,0,4,255,224,183,11,17,72,10,151,0,150,7,184,255, +192,64,22,9,17,72,7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2, +12,184,255,192,64,14,38,41,72,12,64,13,16,72,12,7,168,0,155,11,0,47,253,228, +1,47,43,43,93,113,114,51,43,253,237,49,48,43,37,21,20,14,2,7,35,62,1,53,35, +53,1,129,9,20,29,20,123,45,49,88,219,168,53,87,75,66,32,65,132,65,219,0,0, +0,0,1,0,91,1,208,2,79,2,112,0,3,0,33,64,20,0,2,64,2,112,2,3,2,0,0,187,159, +1,207,1,2,47,1,1,1,0,47,93,113,237,1,47,47,93,49,48,19,53,33,21,91,1,244, +1,208,160,160,0,0,0,1,0,187,0,0,1,126,0,219,0,3,0,46,64,32,3,150,0,0,144, +0,2,64,0,80,0,176,0,224,0,240,0,5,144,0,160,0,2,0,64,13,16,72,0,1,155,0,0, +47,237,1,47,43,93,113,114,237,49,48,51,53,51,21,187,195,219,219,0,1,0,0,255, +236,2,57,5,204,0,3,0,51,64,26,121,0,137,0,2,1,24,13,17,72,41,2,1,2,16,0,2, +16,2,32,2,128,2,4,2,0,184,255,240,180,0,1,0,0,19,0,63,63,1,47,56,205,93,56, +49,48,93,43,93,21,1,51,1,1,155,158,254,105,20,5,224,250,32,0,0,2,0,80,255, +236,4,35,5,150,0,19,0,39,0,112,64,80,89,37,105,37,2,70,33,86,33,102,33,3, +86,27,102,27,2,89,23,105,23,2,4,18,1,118,17,134,17,2,121,13,137,13,2,11,12, +1,11,8,1,121,7,137,7,2,118,3,134,3,2,4,2,1,7,0,110,64,144,20,160,20,2,20, +41,128,30,110,63,10,1,10,25,115,15,7,35,115,5,25,0,63,237,63,237,1,47,93, +237,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93,93,93,93,93,1,20, +2,14,1,35,34,46,1,2,53,52,18,62,1,51,50,30,1,18,7,52,46,2,35,34,14,2,21,20, +30,2,51,50,62,2,4,35,77,133,180,102,103,178,131,75,75,132,180,106,101,177, +132,76,183,40,78,113,72,76,116,79,40,41,79,114,73,71,114,79,43,2,193,203, +254,235,171,74,74,170,1,21,204,213,1,23,166,67,67,166,254,233,213,168,223, +133,55,56,133,223,167,162,222,135,59,59,135,222,0,1,0,156,0,0,4,15,5,129, +0,10,0,94,64,32,32,9,128,9,2,9,9,8,110,2,144,4,1,4,47,1,143,1,2,1,1,4,6,3, +0,2,16,2,2,7,2,5,184,255,240,64,26,16,22,72,68,5,84,5,100,5,3,5,4,3,16,16, +22,72,4,3,6,6,8,1,116,0,24,0,63,237,50,63,51,51,43,47,51,93,43,1,47,94,93, +23,51,47,93,47,93,16,237,50,47,93,49,48,51,53,33,17,5,53,37,51,17,33,21,156, +1,103,254,194,1,77,166,1,87,153,4,60,227,170,229,251,24,153,0,0,0,1,0,103, +0,0,4,12,5,150,0,40,0,161,64,77,117,4,1,117,26,133,26,2,122,16,138,16,2,101, +37,1,86,37,1,41,33,89,33,105,33,3,105,35,1,28,35,1,25,21,1,117,27,133,27, +2,6,27,1,39,29,110,64,8,64,38,42,72,64,8,1,143,8,1,8,42,128,18,110,19,116, +38,132,38,2,19,38,16,0,32,0,2,0,184,255,192,64,31,30,38,72,0,8,38,142,18, +1,92,18,108,18,124,18,3,10,18,26,18,2,18,13,115,24,7,1,38,116,0,24,0,63,237, +57,63,237,51,93,93,93,18,57,1,47,43,93,51,51,93,47,237,26,16,220,93,113,43, +26,237,50,49,48,93,93,0,93,93,93,93,1,93,93,0,93,93,93,51,53,62,5,53,52,46, +2,35,34,14,2,7,39,62,3,51,50,30,2,21,20,14,6,7,33,21,103,51,147,162,159,128, +79,36,68,95,58,54,95,74,47,7,184,9,66,116,163,107,105,164,113,60,51,85,112, +122,124,109,86,24,2,223,127,117,179,145,124,124,136,86,60,91,62,31,30,60, +89,59,17,76,134,101,58,50,98,144,94,71,128,116,108,103,101,102,105,57,153, +0,0,0,0,1,0,78,255,236,4,25,5,150,0,59,0,216,64,149,122,3,138,3,2,117,2,133, +2,2,117,58,133,58,2,117,51,133,51,2,117,47,133,47,2,117,13,133,13,2,122,37, +138,37,2,91,17,107,17,2,26,41,1,21,8,1,118,46,134,46,2,7,46,1,73,39,1,38, +110,54,25,49,95,25,111,25,2,39,25,39,25,10,19,32,110,49,49,0,110,64,31,19, +47,19,159,19,3,144,19,1,19,61,128,11,110,239,10,1,63,10,1,10,54,25,116,26, +26,16,141,38,1,92,38,108,38,124,38,3,10,38,26,38,2,38,35,115,44,7,16,115, +129,11,1,83,11,99,11,115,11,3,20,11,1,5,11,1,11,5,25,0,63,51,93,93,93,93, +237,63,237,51,93,93,93,18,57,47,237,57,1,47,93,113,237,26,16,220,93,113,26, +237,50,47,237,17,18,57,57,47,47,93,17,18,57,237,113,49,48,0,93,93,93,93,1, +93,0,93,93,1,93,93,93,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,14, +2,7,21,30,3,4,25,63,121,179,115,131,179,116,58,9,186,8,43,74,108,74,136,155, +69,103,121,51,102,98,51,110,91,59,133,131,119,147,12,181,11,80,123,158,89, +118,170,108,51,34,72,111,78,85,126,82,41,1,133,97,152,105,55,65,107,137,73, +17,56,92,66,36,134,132,78,95,53,18,156,21,55,94,73,113,131,122,111,14,93, +138,91,45,59,101,136,77,62,108,86,62,16,4,9,59,88,112,0,0,2,0,47,0,0,4,55, +5,129,0,10,0,23,0,117,64,80,154,15,1,153,6,1,136,6,1,133,16,149,16,2,118, +16,1,24,22,1,118,22,134,22,150,22,3,22,5,64,12,21,72,5,91,10,107,10,123,10, +3,10,8,1,111,23,6,31,2,1,112,2,224,2,2,0,2,16,2,48,2,80,2,224,2,5,8,2,0,4, +115,8,22,22,1,11,6,6,1,24,0,63,63,51,18,57,47,51,237,50,1,47,94,93,113,114, +51,51,237,50,50,93,47,43,51,93,113,49,48,93,93,93,93,0,93,1,17,35,17,33,53, +1,51,17,51,21,1,14,3,7,1,14,3,7,33,3,113,170,253,104,2,133,189,198,254,144, +2,16,20,21,8,254,151,5,19,20,20,6,1,242,1,63,254,193,1,63,140,3,182,252,76, +142,3,119,5,29,36,37,12,253,236,8,26,27,26,7,0,1,0,82,255,236,4,29,5,129, +0,44,0,181,64,28,86,13,102,13,134,13,3,85,2,101,2,2,90,3,106,3,2,85,43,101, +43,2,85,42,101,42,2,38,184,255,216,64,89,14,17,72,21,8,1,6,10,1,25,36,153, +36,2,137,36,217,36,2,3,68,33,1,6,35,32,14,17,72,35,11,0,110,64,31,21,1,47, +21,159,21,2,144,21,1,21,46,128,36,31,37,110,33,32,32,11,110,208,10,1,63,10, +1,10,26,115,40,40,16,36,116,33,6,16,115,115,11,131,11,2,103,11,1,22,11,1, +11,5,25,0,63,51,93,93,93,237,63,237,18,57,47,237,1,47,93,113,237,51,47,51, +237,50,50,26,16,220,93,113,114,26,237,17,57,43,49,48,95,113,95,113,114,0, +93,1,93,0,43,93,1,93,0,93,1,93,0,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50, +62,2,53,52,46,2,35,34,14,2,7,35,19,33,21,33,3,62,1,51,50,30,2,4,29,64,126, +187,123,111,165,114,67,14,182,11,40,69,101,72,70,114,81,44,42,78,113,72,45, +76,65,53,23,176,47,3,33,253,131,27,48,144,99,105,168,118,64,1,203,106,176, +127,70,52,91,122,70,21,40,75,59,35,43,84,122,79,65,109,79,44,16,28,37,20, +2,246,153,254,65,37,53,64,117,162,0,0,0,0,2,0,104,255,236,4,25,5,150,0,36, +0,56,0,175,64,48,140,21,1,122,22,138,22,2,89,7,105,7,2,90,3,106,3,122,3,3, +84,2,100,2,2,84,35,100,35,116,35,3,84,34,100,34,116,34,3,53,30,69,30,2,133, +50,1,50,184,255,240,64,45,10,13,72,132,26,1,37,26,53,26,69,26,117,26,4,22, +26,1,21,111,20,20,0,110,64,47,37,159,37,2,144,37,1,37,58,128,47,29,110,16, +10,32,10,2,10,184,255,192,64,24,30,38,72,10,29,42,117,32,32,52,24,115,25, +21,153,21,2,21,15,7,52,115,5,25,0,63,237,63,51,93,237,18,57,47,237,50,1,47, +43,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,93,93,43,93,0,93, +93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,46,1,2,53,52,18,62,1,51,50,30,2, +23,7,46,1,35,34,14,2,21,62,1,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,25,59,115,170,111,123,184,122,61,69,130,187,118,72,126,103,78,23, +172,28,123,81,74,120,84,45,49,178,115,96,156,111,61,183,36,72,106,70,49,100, +81,51,40,75,106,66,65,103,72,38,1,205,106,177,127,71,94,177,1,1,164,188,1, +28,190,96,30,67,110,80,31,91,81,70,139,210,140,91,95,62,117,167,112,73,118, +83,45,29,65,106,76,78,135,100,58,45,85,122,0,0,1,0,105,0,0,4,12,5,129,0,14, +0,68,64,45,122,11,138,11,2,105,11,1,5,110,6,6,0,80,12,1,16,12,32,12,2,12, +11,95,0,1,0,0,32,0,64,0,96,0,128,0,5,0,0,12,116,13,6,5,24,0,63,63,237,50, +1,47,93,113,51,47,93,113,18,57,47,237,49,48,93,93,1,6,10,2,21,35,52,26,2, +55,33,53,33,4,12,106,178,128,71,188,80,136,180,101,253,11,3,163,4,239,162, +254,213,254,209,254,193,180,169,1,69,1,57,1,46,147,153,0,0,0,0,3,0,89,255, +236,4,26,5,150,0,41,0,61,0,81,0,191,64,132,117,40,133,40,2,117,33,133,33, +2,117,29,133,29,2,117,28,133,28,2,117,24,133,24,2,122,23,138,23,2,122,19, +138,19,2,122,12,1,122,8,138,8,2,122,7,138,7,2,122,3,138,3,2,117,2,133,2,2, +85,69,101,69,2,85,75,101,75,2,90,65,106,65,2,52,110,21,42,110,31,15,36,31, +79,21,1,21,31,21,31,10,0,110,64,15,62,31,62,2,31,62,47,62,159,62,3,144,62, +1,62,83,128,72,110,208,10,1,10,36,15,67,117,57,57,77,47,117,26,7,77,117,5, +25,0,63,237,63,237,18,57,47,237,57,57,1,47,113,237,26,16,220,93,113,114,26, +237,17,57,57,47,47,113,18,57,57,16,237,16,237,49,48,93,93,93,93,0,93,93,1, +93,93,93,93,0,93,93,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3, +53,52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,3,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,26,57,117,182, +124,124,181,119,57,47,79,101,54,59,93,63,33,57,112,166,109,115,169,111,54, +33,63,93,61,61,104,76,44,222,27,62,100,73,71,98,63,28,22,58,102,80,85,103, +55,17,35,28,68,115,86,79,111,69,32,32,70,114,81,82,112,68,29,1,137,90,151, +110,62,62,109,151,89,77,120,87,53,9,4,14,62,87,106,59,74,131,99,57,58,99, +132,74,58,106,87,61,12,4,10,53,87,120,2,76,53,88,63,35,35,63,88,53,42,88, +72,46,46,72,88,253,163,51,95,73,45,45,74,97,52,65,107,77,42,42,77,109,0,0, +0,2,0,96,255,236,4,18,5,150,0,36,0,56,0,190,64,105,169,39,1,163,11,1,149, +12,165,12,2,170,17,1,153,17,1,116,35,132,35,2,116,32,132,32,148,32,3,122, +31,138,31,154,31,3,122,27,138,27,154,27,3,123,26,139,26,155,26,3,90,40,106, +40,2,89,2,105,2,2,16,24,10,13,72,54,8,1,37,0,110,47,19,63,19,2,79,19,191, +19,2,0,19,32,19,48,19,64,19,176,19,5,7,19,58,11,111,10,10,47,110,32,29,1, +29,184,255,192,64,27,32,38,72,29,19,52,115,95,24,111,24,2,24,24,5,42,115, +34,7,14,115,23,11,1,11,5,25,0,63,51,93,237,63,237,17,57,47,93,237,50,1,47, +43,93,237,51,47,237,16,220,94,93,113,114,237,51,49,48,93,43,93,93,0,93,1, +93,93,0,93,93,1,93,93,0,93,93,1,93,1,20,2,14,1,35,34,46,2,39,55,30,1,51,50, +62,2,55,14,3,35,34,46,2,53,52,62,2,51,50,18,7,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,4,18,71,132,189,118,81,130,102,72,22,172,28,119,91,73,121,85, +48,2,21,73,93,108,55,96,155,108,59,63,120,175,111,235,242,196,37,73,107,70, +65,104,72,39,35,70,104,69,50,103,83,53,2,221,188,254,229,188,94,33,70,112, +79,27,91,85,69,138,208,140,47,74,51,27,69,124,175,107,109,176,123,66,254, +164,175,78,138,102,59,46,85,122,75,71,122,89,51,34,70,107,0,0,0,0,2,0,187, +0,0,1,126,4,58,0,3,0,7,0,54,64,36,3,7,150,0,0,4,144,4,2,64,4,80,4,224,4,240, +4,4,144,4,160,4,2,4,64,13,16,72,4,5,156,4,0,156,1,15,0,63,237,47,237,1,47, +43,93,113,114,51,237,50,49,48,19,53,51,21,3,53,51,21,187,195,195,195,3,107, +207,207,252,149,207,207,0,0,0,2,0,184,254,250,1,129,4,58,0,12,0,16,0,89,185, +0,4,255,224,64,10,11,17,72,16,10,151,0,150,13,7,184,255,192,64,22,9,17,72, +7,128,12,144,12,2,64,12,80,12,176,12,3,144,12,160,12,2,12,184,255,192,64, +18,38,41,72,12,64,13,16,72,12,13,156,14,15,7,168,0,156,11,0,47,253,228,63, +237,1,47,43,43,93,113,114,51,43,51,253,237,51,49,48,43,37,21,20,14,2,7,35, +62,1,53,35,53,17,53,51,21,1,129,9,20,29,20,123,45,49,88,195,207,156,53,87, +75,66,32,65,132,65,207,2,156,207,207,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106, +185,0,5,255,216,64,17,18,22,72,3,40,18,22,72,0,40,18,22,72,137,0,1,1,184, +255,216,64,51,18,22,72,134,1,1,6,0,2,32,2,80,2,112,2,4,2,32,0,1,0,63,6,127, +6,143,6,3,6,48,2,112,2,128,2,3,2,1,0,15,4,63,4,111,4,159,4,207,4,5,4,0,25, +47,93,51,51,205,93,205,93,1,24,47,93,47,93,51,49,48,0,93,43,93,43,43,43,19, +53,1,21,9,1,21,101,3,227,252,166,3,90,2,59,205,1,162,154,254,146,254,145, +153,0,0,0,0,2,0,100,1,88,4,71,3,236,0,3,0,7,0,70,64,49,7,64,2,96,2,2,0,2, +32,2,112,2,208,2,4,2,4,223,0,1,32,0,1,0,4,173,31,5,47,5,95,5,111,5,223,5, +5,5,0,173,80,1,208,1,2,15,1,1,1,0,47,93,93,237,222,93,237,1,47,93,93,51,47, +93,113,51,49,48,19,53,33,21,1,53,33,21,100,3,227,252,29,3,227,3,88,148,148, +254,0,148,148,0,0,0,0,1,0,101,0,154,4,72,4,170,0,6,0,106,185,0,1,255,216, +64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137,6,1,5,184,255,216,64,51,18, +22,72,134,5,1,0,6,32,6,80,6,112,6,4,6,3,32,0,1,0,6,5,48,4,112,4,128,4,3,4, +63,0,127,0,143,0,3,0,15,2,63,2,111,2,159,2,207,2,5,2,0,25,47,93,205,93,205, +93,51,51,1,24,47,93,51,47,93,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21, +101,3,90,252,166,3,227,154,153,1,111,1,110,154,254,94,205,0,2,0,84,0,0,4, +39,5,150,0,37,0,41,0,137,64,68,117,36,133,36,2,117,35,133,35,2,90,26,106, +26,2,90,21,1,90,14,122,14,138,14,3,90,13,122,13,138,13,3,58,6,74,6,2,9,72, +10,10,176,41,192,41,2,41,150,38,38,19,27,70,28,0,70,0,19,32,19,64,19,144, +19,176,19,5,19,184,255,192,64,23,38,44,72,19,19,33,95,10,143,10,2,10,39,156, +38,76,27,1,27,24,95,33,4,0,63,237,51,93,47,253,198,93,17,57,1,47,43,93,237, +47,237,18,57,47,237,113,51,47,237,49,48,0,93,1,93,93,0,93,93,93,1,93,1,20, +14,6,7,35,62,7,53,52,46,2,35,34,6,7,39,62,3,51,50,30,2,1,53,51,21,4,39,37, +62,79,82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184, +11,67,121,179,122,114,178,123,64,253,143,195,4,8,71,108,85,67,60,58,68,83, +55,69,104,80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103, +148,251,157,201,201,0,0,0,0,2,0,161,254,229,7,110,5,204,0,93,0,114,1,101, +64,255,122,17,138,17,2,117,15,133,15,2,117,27,133,27,2,121,47,137,47,2,116, +38,132,38,2,102,38,1,99,70,1,86,69,102,69,2,123,26,139,26,2,73,26,1,74,56, +90,56,106,56,3,59,102,1,82,63,1,54,63,70,63,2,82,64,1,38,64,54,64,70,64,3, +131,3,1,37,3,53,3,69,3,3,37,2,53,2,69,2,133,2,4,25,8,57,8,2,11,8,1,11,8,27, +8,2,8,32,12,17,72,22,92,102,92,134,92,3,80,58,96,58,2,5,58,21,58,53,58,69, +58,4,137,57,1,93,57,1,10,57,26,57,2,9,7,1,125,52,141,52,2,11,52,75,52,2,10, +22,26,22,42,22,3,104,212,24,37,41,211,10,112,34,132,72,1,72,10,49,80,24,1, +80,24,1,24,10,24,10,82,0,210,64,95,49,111,49,2,143,49,159,49,2,49,116,128, +61,210,0,82,16,82,32,82,3,82,44,213,5,5,107,214,19,99,214,29,36,29,47,19, +63,19,79,19,3,32,29,48,29,64,29,3,19,29,19,29,77,54,214,89,0,149,71,1,71, +66,214,77,0,47,237,51,93,63,237,18,57,57,47,47,93,93,17,51,16,237,16,237, +51,47,237,1,47,93,237,26,16,220,93,113,26,237,18,57,57,47,47,93,114,17,18, +57,93,50,50,16,237,50,16,237,49,48,93,93,93,93,0,93,93,93,1,93,93,93,43,93, +0,93,93,1,93,93,93,0,93,93,1,93,93,0,93,93,1,93,93,0,93,93,1,93,93,93,0,93, +1,93,0,93,1,20,14,2,35,34,46,2,53,52,54,55,35,14,3,35,34,46,2,53,52,62,2, +51,50,30,2,23,51,55,51,3,14,1,21,20,22,51,50,62,2,53,52,46,2,35,34,14,4,21, +20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,62,2,36,51,50,4,22,18, +5,52,46,2,35,34,14,2,21,20,22,51,50,62,2,55,62,1,7,110,67,118,165,97,56,79, +50,22,2,1,6,24,69,93,117,71,84,125,81,40,71,132,185,114,60,96,73,54,18,6, +39,156,116,19,18,43,38,62,107,79,45,83,161,238,156,134,227,184,139,94,48, +86,165,243,158,105,182,152,120,44,55,50,135,166,196,111,190,254,217,203,105, +63,118,170,215,0,255,144,201,1,36,191,92,253,162,34,63,89,56,86,130,87,45, +95,99,69,120,96,70,18,9,14,2,243,144,239,172,96,27,47,64,38,15,43,12,45,89, +69,43,58,103,141,83,120,221,169,102,27,48,67,40,160,254,6,84,120,49,48,46, +81,142,192,112,129,222,162,92,64,116,161,192,219,115,141,238,171,96,33,48, +57,24,112,30,63,52,33,115,206,1,28,169,139,1,0,220,180,128,70,118,200,254, +248,155,50,84,60,33,85,138,173,87,120,136,62,102,132,71,36,80,0,0,0,0,2,0, +4,0,0,5,82,5,129,0,7,0,20,1,18,64,206,102,2,118,2,134,2,3,102,19,118,19,134, +19,3,105,1,121,1,137,1,3,105,20,121,20,137,20,3,115,6,131,6,2,101,6,1,124, +5,140,5,2,106,5,1,122,0,138,0,2,57,0,89,0,105,0,3,117,3,133,3,2,54,3,86,3, +102,3,3,90,4,1,72,4,1,85,7,1,71,7,1,19,2,3,1,20,0,21,6,37,6,53,6,3,6,6,1, +230,6,246,6,2,26,5,42,5,58,5,3,9,5,1,233,5,249,5,2,6,5,13,13,4,26,0,42,0, +58,0,3,9,0,1,233,0,249,0,2,0,16,7,32,7,48,7,3,32,7,1,7,7,22,21,3,37,3,53, +3,3,6,3,1,230,3,246,3,2,3,175,4,191,4,2,4,80,22,176,22,2,48,22,96,22,144, +22,192,22,240,22,5,47,22,1,1,2,95,20,19,19,118,13,1,13,5,3,4,0,18,0,63,50, +63,51,93,57,47,51,237,50,1,93,93,113,47,93,51,93,113,113,17,51,47,93,113, +51,93,113,113,18,57,61,47,51,51,93,113,113,93,113,113,18,57,57,18,57,57,49, +48,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,3,33,3,35,1,51,9,1, +46,3,39,14,3,7,3,33,4,143,161,253,126,162,198,2,63,217,2,54,253,174,16,29, +22,15,1,2,14,23,29,15,180,2,15,1,156,254,100,5,129,250,127,4,2,40,82,67,45, +5,5,46,68,82,40,254,49,0,3,0,168,0,0,4,234,5,129,0,22,0,33,0,46,0,155,64, +108,155,24,171,24,2,147,32,1,133,32,1,147,45,1,117,45,133,45,2,122,36,138, +36,154,36,3,5,11,21,11,37,11,3,6,2,22,2,38,2,3,171,18,1,159,18,1,107,18,123, +18,139,18,3,18,28,13,90,23,64,13,17,72,23,23,41,0,90,64,31,34,47,34,2,175, +34,1,34,48,128,28,41,90,0,6,16,6,64,6,3,7,6,18,40,95,127,28,1,28,28,41,27, +95,7,3,41,95,6,18,0,63,237,63,237,18,57,47,113,237,57,1,47,94,93,237,50,26, +16,220,93,113,26,237,18,57,47,43,237,17,57,93,93,93,49,48,93,93,0,93,93,93, +93,93,93,1,20,14,2,35,33,17,33,50,30,2,21,20,14,2,7,30,3,1,52,38,35,33,17, +33,50,62,2,19,52,46,2,35,33,17,33,50,62,2,4,234,84,142,188,104,253,196,2, +0,117,184,128,67,33,67,101,67,85,131,88,46,254,238,156,148,254,191,1,65,84, +116,72,32,81,49,92,129,80,254,156,1,115,73,123,89,50,1,141,107,151,95,44, +5,129,39,84,129,90,59,104,85,61,15,10,58,90,119,2,66,114,98,254,66,33,61, +86,253,190,67,94,60,28,254,4,24,60,100,0,1,0,104,255,236,5,121,5,150,0,39, +0,173,64,79,121,14,137,14,2,117,13,133,13,2,123,37,139,37,2,106,38,1,124, +36,140,36,2,106,36,1,106,28,1,85,7,1,90,3,1,42,29,106,29,2,134,23,1,42,23, +106,23,2,5,8,21,8,2,5,2,21,2,2,5,91,80,26,96,26,2,175,26,191,26,2,32,26,1, +15,26,1,26,34,16,184,255,192,64,42,7,13,72,16,16,41,32,41,1,79,35,1,35,35, +0,95,31,4,0,15,16,15,2,48,15,64,15,112,15,128,15,192,15,208,15,6,15,15,10, +95,21,19,0,63,237,51,47,93,113,63,237,51,47,93,1,93,17,51,47,43,51,47,93, +93,93,113,237,49,48,93,93,93,93,93,0,93,93,1,93,93,93,93,0,93,93,1,93,1,34, +14,2,21,20,30,2,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,120,185,125,64,69,129,187,117,82,135,109,86,33,156,38,112, +151,191,118,171,254,255,173,86,91,175,1,0,164,225,1,46,71,181,20,68,102,137, +4,250,80,148,208,127,127,211,152,84,43,78,107,65,78,79,136,100,57,109,195, +1,12,159,165,1,10,187,101,176,173,60,50,91,70,42,0,2,0,168,0,0,5,101,5,129, +0,12,0,25,0,100,64,70,169,24,1,123,24,1,172,23,1,27,23,43,23,59,23,123,23, +4,169,16,1,27,16,43,16,59,16,123,16,4,123,15,1,153,3,1,121,2,1,0,90,64,47, +13,1,13,27,128,64,27,1,20,90,0,6,16,6,64,6,3,7,6,19,95,7,3,20,95,6,18,0,63, +237,63,237,1,47,94,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93, +93,93,93,1,20,2,14,1,35,33,17,33,50,4,22,18,7,52,46,2,35,33,17,33,50,62,2, +5,101,106,184,251,145,253,241,1,210,163,1,19,198,111,192,82,148,206,123,254, +241,1,58,111,189,138,78,2,207,176,254,243,181,93,5,129,81,169,254,252,180, +143,203,130,61,251,177,72,142,212,0,0,1,0,168,0,0,4,254,5,129,0,11,0,77,181, +7,3,7,3,0,10,184,255,192,64,37,7,11,72,10,10,13,5,9,90,0,0,16,0,64,0,3,7, +0,32,13,1,8,95,127,5,1,5,5,9,4,95,1,3,9,95,0,18,0,63,237,63,237,18,57,47, +113,237,1,93,47,94,93,237,50,17,51,47,43,18,57,57,47,47,49,48,51,17,33,21, +33,17,33,21,33,17,33,21,168,4,45,252,146,3,50,252,206,3,151,5,129,156,254, +60,154,254,21,156,0,0,1,0,168,0,0,4,145,5,129,0,9,0,105,185,0,2,255,192,182, +13,24,72,2,2,6,8,184,255,192,64,58,7,12,72,8,8,11,1,5,90,0,6,16,6,64,6,3, +7,6,48,11,1,4,95,239,1,1,15,1,63,1,111,1,127,1,159,1,175,1,207,1,223,1,8, +8,1,64,23,30,72,1,1,5,0,95,7,3,5,18,0,63,63,237,18,57,47,43,94,93,113,237, +1,93,47,94,93,237,50,17,51,47,43,18,57,47,43,49,48,1,17,33,21,33,17,35,17, +33,21,1,103,3,18,252,238,191,3,233,4,229,253,244,158,253,197,5,129,156,0, +1,0,103,255,236,5,160,5,150,0,45,0,185,64,130,134,43,1,106,43,1,66,37,82, +37,2,5,24,21,24,85,24,3,86,23,1,86,19,1,5,18,21,18,85,18,3,122,12,138,12, +2,89,12,105,12,2,106,3,1,106,2,1,73,37,89,37,2,53,29,1,123,13,139,13,2,64, +10,1,10,10,36,92,31,64,33,33,0,127,31,143,31,2,31,47,128,32,47,96,47,128, +47,3,21,91,175,0,191,0,2,32,0,1,15,0,1,0,33,95,240,34,1,34,34,5,26,95,41, +19,16,95,5,48,11,64,11,2,144,11,224,11,2,11,11,5,4,0,63,51,47,93,113,16,237, +63,237,17,57,47,93,237,1,47,93,93,93,237,93,26,16,204,93,17,57,47,26,16,237, +50,47,93,49,48,0,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,19,52,18,54, +36,51,50,30,2,23,7,46,3,35,34,14,2,21,20,30,2,51,50,62,2,55,53,33,53,33,17, +14,3,35,34,36,38,2,103,89,177,1,6,173,130,196,144,100,35,182,26,73,104,137, +88,128,189,124,61,66,130,193,127,83,140,113,86,29,254,91,2,85,47,127,158, +188,107,178,254,246,177,89,2,199,165,1,10,187,101,46,86,123,77,54,52,85,60, +33,80,148,208,127,127,211,153,85,28,45,55,28,254,160,254,26,48,87,66,38,109, +195,1,12,0,0,0,0,1,0,168,0,0,5,32,5,129,0,11,0,103,64,29,11,90,64,8,143,0, +159,0,175,0,223,0,4,0,13,128,64,13,1,64,13,192,13,208,13,224,13,4,13,184, +255,192,64,37,14,17,72,7,3,90,0,4,16,4,64,4,3,7,4,2,95,80,7,1,176,7,224,7, +2,15,7,1,8,7,7,9,5,3,4,0,18,0,63,50,63,51,57,47,94,93,93,113,237,1,47,94, +93,237,50,43,93,113,26,16,220,93,50,26,237,49,48,33,17,33,17,35,17,51,17, +33,17,51,17,4,97,253,6,191,191,2,250,191,2,141,253,115,5,129,253,172,2,84, +250,127,0,0,0,1,0,189,0,0,1,124,5,129,0,3,0,122,64,70,3,90,15,0,1,12,0,0, +1,61,16,0,32,0,208,0,3,96,0,112,0,2,0,0,16,0,64,0,80,0,176,0,5,7,0,175,5, +1,0,5,160,5,176,5,3,0,5,16,5,64,5,80,5,160,5,176,5,192,5,240,5,8,32,5,144, +5,240,5,3,5,184,255,192,179,56,61,72,5,184,255,192,179,45,48,72,5,184,255, +192,182,13,16,72,1,3,0,18,0,63,63,1,43,43,43,93,113,114,93,47,94,93,113,114, +94,93,94,93,237,49,48,51,17,51,17,189,191,5,129,250,127,0,0,0,1,0,32,255, +236,3,104,5,129,0,21,0,124,64,15,137,2,1,130,5,1,123,10,1,100,6,116,6,2,6, +184,255,224,64,66,14,17,72,0,14,32,14,2,128,14,144,14,224,14,240,14,4,14, +14,3,17,90,64,64,12,80,12,96,12,3,111,12,1,12,23,128,15,3,1,3,32,23,1,32, +23,64,23,80,23,96,23,4,14,95,15,3,9,95,0,64,4,1,4,4,0,19,0,63,50,47,93,16, +237,63,237,1,93,113,47,113,26,16,220,93,113,26,237,18,57,47,93,113,49,48, +0,43,1,93,93,93,0,93,5,34,38,39,55,30,3,51,50,54,53,17,33,53,33,17,20,14, +2,1,201,171,219,35,187,10,46,64,78,41,104,120,254,241,1,205,56,107,154,20, +178,192,31,65,93,60,28,143,138,3,69,156,252,35,101,162,115,62,0,1,0,168,0, +0,5,63,5,129,0,11,0,154,64,103,171,1,1,157,1,1,138,8,154,8,2,138,1,154,1, +170,1,3,102,2,1,131,7,147,7,2,100,7,1,157,0,173,0,2,107,0,123,0,139,0,3,89, +0,1,86,10,1,155,10,1,36,10,1,1,10,106,8,250,8,2,8,10,144,9,160,9,2,9,9,0, +11,16,0,11,1,11,11,13,7,2,3,90,0,4,16,4,64,4,3,7,4,7,10,1,2,4,4,8,5,3,0,4, +18,0,63,51,63,51,18,23,57,1,47,94,93,237,50,50,17,51,47,93,56,51,57,47,93, +57,51,113,17,51,49,48,0,93,93,1,93,93,93,93,0,93,93,93,1,93,93,0,93,93,33, +1,7,17,35,17,51,17,1,51,9,1,4,82,253,205,184,191,191,2,167,225,253,168,2, +168,2,168,140,253,228,5,129,253,62,2,194,253,156,252,227,0,0,0,0,1,0,168, +0,0,4,47,5,129,0,5,0,56,64,40,16,4,48,4,2,0,4,16,4,32,4,64,4,96,4,128,4,160, +4,240,4,8,4,3,90,0,0,16,0,64,0,3,7,0,1,3,3,95,0,18,0,63,237,63,1,47,94,93, +237,47,93,113,49,48,51,17,51,17,33,21,168,191,2,200,5,129,251,27,156,0,0, +0,0,1,0,168,0,0,6,2,5,129,0,44,2,44,64,12,152,41,1,151,31,1,12,16,18,24,72, +12,184,255,240,179,13,17,72,13,184,255,240,64,27,18,24,72,40,13,1,13,16,13, +17,72,42,32,33,37,72,42,32,18,28,72,42,32,9,17,72,30,184,255,224,179,33,37, +72,30,184,255,224,179,18,28,72,30,184,255,224,64,255,9,17,72,13,12,36,36, +27,44,92,42,36,0,52,0,2,212,0,1,139,0,155,0,2,4,0,1,8,0,46,139,46,1,116,46, +1,59,46,1,203,46,1,180,46,1,11,46,1,207,171,46,1,52,46,1,32,46,1,20,46,1, +0,46,1,244,46,1,208,46,1,196,46,1,176,46,1,116,46,132,46,164,46,3,96,46,1, +84,46,1,64,46,1,52,46,1,16,46,1,4,46,1,151,240,46,1,180,46,196,46,228,46, +3,160,46,1,116,46,148,46,2,80,46,1,68,46,1,48,46,1,4,46,36,46,2,244,46,1, +224,46,1,180,46,212,46,2,144,46,1,132,46,1,112,46,1,52,46,68,46,100,46,3, +32,46,1,20,46,1,244,46,1,208,46,1,116,46,132,46,164,46,196,46,4,96,46,1,52, +46,84,46,2,16,46,1,4,46,1,103,116,46,148,46,180,46,196,46,228,46,5,80,46, +1,4,46,36,46,68,46,3,20,46,52,46,68,46,100,46,132,46,180,46,212,46,244,46, +8,164,46,196,46,244,46,3,139,46,1,4,46,52,46,84,46,116,46,4,55,64,83,228, +46,1,203,46,1,36,46,68,46,116,46,148,46,180,46,5,11,46,1,212,46,244,46,2, +187,46,1,100,46,132,46,2,75,46,1,20,46,52,46,2,251,46,1,164,46,196,46,228, +46,3,128,46,1,2,64,46,80,46,112,46,3,63,46,1,0,46,32,46,2,30,27,92,0,28,64, +28,2,7,28,6,21,21,184,255,192,64,16,18,37,72,42,21,29,3,75,36,1,0,13,36,3, +28,18,0,63,23,51,93,63,51,51,43,17,51,1,47,94,93,237,50,93,93,93,95,93,93, +93,113,113,113,113,113,114,114,114,114,94,93,93,93,113,114,114,114,94,93, +93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,94,93, +93,93,113,113,113,16,220,94,93,93,93,113,50,237,18,57,61,47,51,51,49,48,43, +43,43,43,43,43,43,93,43,43,43,93,93,33,17,52,54,55,54,55,6,7,14,1,7,1,35, +1,46,3,39,38,39,22,23,30,1,21,17,35,17,51,1,30,3,23,62,3,55,1,51,17,5,86, +2,2,2,3,14,15,13,31,15,254,148,134,254,143,6,13,15,15,7,17,16,1,2,2,2,170, +251,1,119,7,20,18,15,3,3,16,21,20,8,1,112,245,3,172,51,106,44,51,48,51,50, +43,97,39,252,64,3,192,15,40,45,47,23,53,57,56,55,47,103,39,252,84,5,129,252, +47,20,63,66,59,16,16,60,66,62,20,3,209,250,127,0,0,0,0,1,0,168,0,0,5,32,5, +129,0,19,0,196,185,0,10,255,224,64,39,12,43,72,54,10,70,10,2,0,32,12,43,72, +41,0,57,0,73,0,3,11,16,29,33,72,11,32,18,28,72,150,11,166,11,2,41,11,1,1, +184,255,240,179,29,33,72,1,184,255,224,64,53,18,28,72,154,1,170,1,2,3,38, +1,1,19,92,0,68,16,84,16,148,16,3,224,16,1,2,0,16,48,16,64,16,112,16,192,16, +208,16,6,16,64,21,1,64,21,192,21,208,21,224,21,4,21,184,255,192,64,16,14, +17,72,10,7,92,0,8,16,8,64,8,3,7,8,1,184,255,192,64,16,29,43,72,17,1,9,3,11, +64,29,43,72,11,0,8,18,0,63,51,51,43,63,51,51,43,1,47,94,93,237,50,43,93,113, +47,93,95,93,113,51,237,49,48,0,93,95,93,43,43,93,93,43,43,1,93,43,93,43,33, +1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,4,58,253,14,2,3,2,3, +170,222,2,250,3,3,2,4,172,4,176,49,48,41,91,35,252,88,5,129,251,72,49,49, +42,99,45,3,156,250,127,0,0,0,0,2,0,97,255,236,5,215,5,150,0,19,0,39,0,108, +64,74,91,37,1,26,37,1,9,37,1,82,33,1,21,33,1,7,33,1,84,27,1,21,27,1,91,23, +1,25,23,1,102,17,1,104,12,1,0,91,64,15,20,1,20,41,128,32,41,128,41,2,30,91, +175,10,191,10,2,32,10,1,15,10,31,10,2,10,25,95,15,4,35,95,5,19,0,63,237,63, +237,1,47,93,93,93,237,93,26,16,220,113,26,237,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,215,95,180,254,252,165,174,254,250, +174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63,65, +127,189,123,132,191,123,59,2,199,165,254,242,192,104,109,195,1,12,159,165, +1,10,187,101,102,188,254,246,163,127,208,148,80,80,148,208,127,127,211,153, +85,86,153,212,0,2,0,168,0,0,4,234,5,129,0,14,0,23,0,117,64,83,169,2,1,147, +23,1,155,16,171,16,2,10,3,26,3,42,3,3,5,12,21,12,37,12,3,0,90,64,15,25,128, +64,25,1,64,25,1,20,7,90,0,8,16,8,64,8,3,8,6,95,31,20,47,20,79,20,95,20,127, +20,5,15,20,207,20,255,20,3,7,20,64,9,17,72,20,20,7,19,95,9,3,7,18,0,63,63, +237,18,57,47,43,94,93,113,237,1,47,93,237,50,93,113,26,16,220,26,237,49,48, +0,93,93,93,93,93,1,20,14,2,35,33,17,35,17,33,50,30,2,7,52,38,35,33,17,33, +50,54,4,234,61,121,182,121,254,98,191,2,81,125,186,124,62,192,164,164,254, +133,1,131,165,155,3,217,92,159,117,68,253,219,5,129,61,111,157,97,134,139, +253,212,146,0,0,0,2,0,97,254,125,5,215,5,150,0,36,0,56,0,162,64,113,108,20, +124,20,140,20,3,104,24,1,104,29,1,101,34,1,87,6,1,85,49,1,90,39,1,90,45,1, +108,19,124,19,140,19,3,26,19,90,19,2,26,40,90,40,2,21,44,85,44,2,26,54,90, +54,2,8,54,1,21,50,85,50,2,7,50,1,13,13,22,5,27,0,91,64,15,37,1,37,58,128, +47,91,175,27,191,27,2,32,27,1,15,27,31,27,2,27,32,58,128,58,2,42,95,32,4, +52,95,5,22,19,10,95,17,0,47,237,63,51,237,63,237,1,93,47,93,93,93,237,26, +16,220,113,26,237,17,57,57,50,47,49,48,93,93,93,93,93,93,0,93,93,93,93,93, +1,93,93,93,0,93,93,1,20,14,2,7,30,3,51,50,54,55,21,14,1,35,34,46,2,39,46, +2,2,53,52,18,54,36,51,50,4,22,18,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62, +2,5,215,77,145,211,134,21,53,68,83,51,28,64,23,38,91,49,86,128,97,70,27,158, +239,159,80,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127,63, +65,127,189,123,132,191,123,59,2,199,149,247,186,117,18,64,90,57,27,8,5,134, +9,13,51,95,138,87,8,115,193,1,3,152,165,1,10,187,101,102,188,254,246,163, +127,208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,0,0,2,0,168,0,0, +5,104,5,129,0,17,0,30,0,210,64,62,169,13,1,138,20,154,20,170,20,3,148,29, +1,117,29,133,29,2,174,0,1,157,0,1,124,0,140,0,2,74,0,90,0,106,0,3,3,160,1, +1,114,1,130,1,146,1,3,2,99,1,1,64,1,1,51,1,1,37,1,1,3,16,184,255,112,64,87, +17,73,112,16,128,16,144,16,3,84,16,100,16,2,66,16,1,2,35,16,51,16,2,1,16, +16,25,18,90,11,11,0,0,17,48,17,64,17,96,17,144,17,160,17,6,17,64,32,144,32, +160,32,3,25,3,90,0,4,16,4,64,4,3,7,4,16,2,95,47,25,95,25,111,25,143,25,4, +25,25,0,24,95,5,3,4,0,18,0,63,50,63,237,18,57,47,93,237,50,1,47,94,93,237, +50,93,47,93,51,57,47,237,18,57,17,51,49,48,93,95,93,93,93,43,95,93,93,93, +93,95,93,93,95,93,93,93,93,0,93,93,93,93,33,1,33,17,35,17,33,50,30,2,21,20, +14,2,7,1,3,52,46,2,35,33,17,33,50,62,2,4,140,254,146,254,73,191,2,151,120, +185,126,66,39,84,130,91,1,144,248,44,84,120,76,254,59,1,205,82,120,77,37, +2,73,253,183,5,129,55,104,150,94,67,130,108,78,16,253,161,3,236,64,94,63, +31,253,248,41,72,98,0,0,0,0,1,0,93,255,236,4,248,5,150,0,63,0,226,64,110, +150,62,1,68,62,1,166,59,1,134,54,1,132,49,1,151,40,1,169,33,1,11,33,27,33, +43,33,155,33,4,89,29,169,29,2,139,17,1,139,7,1,150,2,1,4,2,20,2,2,132,58, +1,96,54,1,105,21,1,118,17,1,42,90,41,41,0,90,64,176,19,1,19,65,128,9,90,8, +64,16,19,72,8,8,52,90,0,31,16,31,64,31,3,7,31,19,16,19,22,72,120,19,136,19, +152,19,3,59,19,1,52,184,255,240,64,47,19,22,72,119,52,135,52,151,52,3,58, +52,1,19,52,5,47,95,111,42,1,89,42,1,75,42,1,6,42,1,42,36,4,14,95,96,9,1,82, +9,1,68,9,1,9,5,19,0,63,51,93,93,93,237,63,51,93,93,93,93,237,18,57,57,93, +93,43,93,93,43,1,47,94,93,237,51,47,43,237,26,16,220,93,26,237,50,47,237, +49,48,0,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,20,14,2,35, +32,36,39,55,30,3,51,50,62,2,53,52,46,2,39,46,5,53,52,62,2,51,50,30,2,23,7, +46,3,35,34,14,2,21,20,30,2,23,30,5,4,248,69,144,219,150,254,249,254,218,40, +185,14,58,99,146,102,85,142,102,57,63,114,158,96,59,119,109,96,70,40,81,144, +196,114,131,186,128,77,23,188,14,53,86,123,83,98,133,81,35,63,108,142,80, +65,129,118,103,76,43,1,133,89,150,109,61,184,174,37,55,90,65,36,29,60,95, +66,69,86,56,38,22,13,31,43,58,81,107,70,100,143,92,42,41,82,121,80,33,51, +80,54,28,35,60,81,47,63,81,54,36,18,15,31,43,58,84,114,0,0,0,1,0,46,0,0,4, +180,5,129,0,7,1,212,64,255,9,9,1,201,9,217,9,249,9,3,187,9,1,73,9,89,9,121, +9,137,9,4,59,9,1,9,9,25,9,2,246,9,1,153,9,201,9,2,139,9,1,9,9,25,9,73,9,105, +9,4,199,217,9,233,9,2,203,9,1,182,9,1,41,9,89,9,105,9,137,9,153,9,5,27,9, +1,6,9,1,25,9,41,9,89,9,121,9,153,9,169,9,217,9,7,233,9,249,9,2,219,9,1,169, +9,1,150,9,1,57,9,105,9,2,45,9,1,1,11,9,1,151,107,9,123,9,139,9,171,9,187, +9,235,9,251,9,7,84,9,1,11,9,43,9,59,9,3,187,9,251,9,2,164,9,1,59,9,75,9,123, +9,3,36,9,1,139,9,155,9,187,9,203,9,251,9,5,127,9,1,2,79,9,95,9,2,48,9,1,15, +9,1,103,207,9,223,9,2,176,9,1,15,9,79,9,95,9,143,9,4,240,9,1,159,9,175,9, +207,9,223,9,4,112,9,1,95,9,1,64,9,1,31,9,1,31,9,63,9,95,9,111,9,159,9,223, +9,239,9,7,0,9,1,55,239,9,1,128,64,93,9,144,9,208,9,3,111,9,1,80,9,1,47,9, +1,0,9,1,208,9,1,175,9,1,144,9,1,111,9,127,9,2,16,9,32,9,64,9,80,9,4,255,9, +1,224,9,1,191,9,1,64,9,96,9,144,9,160,9,4,63,9,1,32,9,1,15,9,1,7,3,5,4,14, +1,90,2,64,2,7,14,112,7,160,7,176,7,3,32,7,128,7,2,7,184,255,192,64,15,23, +28,72,7,32,2,1,2,0,4,95,5,3,1,18,0,63,63,237,50,1,47,93,204,43,93,113,43, +1,26,24,16,77,253,228,50,95,94,93,93,93,93,93,93,93,113,113,113,113,113,114, +114,114,114,114,114,94,93,93,113,113,113,113,113,113,114,114,114,94,93,93, +93,95,93,93,113,113,113,113,114,114,114,94,93,95,93,93,93,93,93,93,113,114, +114,114,114,114,114,94,93,93,93,93,113,113,113,113,113,114,49,48,1,17,35, +17,33,53,33,21,2,208,190,254,28,4,134,4,229,251,27,4,229,156,156,0,0,0,0, +1,0,158,255,236,5,41,5,129,0,25,0,136,64,61,89,23,105,23,2,89,3,105,3,2,89, +2,105,2,2,69,16,1,69,10,1,21,90,64,64,18,80,18,160,18,3,48,18,144,18,240, +18,3,143,18,159,18,175,18,3,18,27,128,64,27,1,64,27,192,27,208,27,224,27, +4,27,184,255,192,64,36,14,17,72,8,90,79,5,95,5,111,5,3,143,5,159,5,2,207, +5,1,0,5,16,5,64,5,3,7,5,19,6,3,13,95,0,19,0,63,237,63,51,1,47,94,93,93,113, +114,237,43,93,113,26,16,220,93,113,114,26,237,49,48,0,93,93,93,93,93,5,34, +46,2,53,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,14,2,2,219,116,208,157, +92,191,57,102,139,83,82,146,110,63,190,93,160,215,20,62,131,201,138,3,129, +252,143,107,149,94,43,44,96,155,111,3,100,252,145,141,207,136,66,0,1,0,9, +0,0,5,77,5,129,0,16,0,235,64,181,74,14,90,14,106,14,3,69,4,85,4,101,4,3,140, +15,1,58,15,90,15,106,15,122,15,4,131,3,1,53,3,85,3,101,3,117,3,4,116,0,132, +0,2,9,0,1,140,1,1,123,1,1,6,1,1,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0, +37,0,53,0,3,6,0,1,230,0,246,0,2,1,0,9,9,2,26,15,42,15,58,15,3,3,8,15,1,232, +15,248,15,2,15,52,16,84,16,2,32,16,1,2,16,16,1,48,16,96,16,144,16,192,16, +240,16,5,16,21,3,37,3,53,3,3,6,3,1,230,3,246,3,2,3,175,2,191,2,2,2,32,18, +80,18,2,48,18,96,18,144,18,192,18,240,18,5,47,18,1,15,2,3,121,9,1,9,1,18, +0,63,51,93,63,51,1,93,93,113,47,93,51,93,113,113,47,93,113,95,113,113,51, +93,113,95,113,18,57,61,47,51,51,93,113,113,93,113,113,49,48,93,93,93,93,93, +93,93,93,93,93,93,33,35,1,51,1,30,1,23,22,23,54,55,62,1,55,1,51,3,14,198, +253,193,201,1,134,15,30,12,14,13,12,14,12,29,17,1,132,201,5,129,252,32,45, +89,35,41,39,37,41,35,88,48,3,224,0,0,1,0,9,0,0,7,134,5,129,0,46,4,87,64,73, +121,44,1,117,17,1,123,2,139,2,2,73,2,1,116,12,132,12,2,70,12,1,122,30,138, +30,2,73,30,89,30,105,30,3,117,31,133,31,2,71,31,87,31,103,31,3,142,45,1,91, +45,107,45,123,45,3,129,16,1,100,16,116,16,2,85,16,1,1,32,13,17,72,13,184, +255,224,64,255,13,17,72,131,0,1,117,0,1,68,0,84,0,100,0,3,54,0,1,140,14,1, +122,14,1,75,14,91,14,107,14,3,14,16,9,12,72,26,14,42,14,58,14,3,9,14,1,233, +14,249,14,2,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,14,13,22,26,30,42, +30,58,30,3,9,30,1,233,30,249,30,2,21,31,37,31,53,31,3,6,31,1,230,31,246,31, +2,31,30,7,26,1,42,1,58,1,3,9,1,1,233,1,249,1,2,21,0,37,0,53,0,3,6,0,1,230, +0,246,0,2,1,0,39,123,39,1,116,22,132,22,2,22,7,39,39,7,22,3,15,26,45,42,45, +58,45,3,3,8,45,1,232,45,248,45,2,45,219,46,1,207,46,1,187,46,1,175,46,1,155, +46,1,143,46,1,123,46,1,111,46,1,91,46,1,79,46,1,2,79,46,143,46,175,46,3,46, +64,25,28,72,32,46,48,46,2,15,46,1,9,46,5,16,1,229,16,245,16,2,182,16,198, +16,214,16,3,3,16,8,15,56,15,120,15,136,15,152,15,184,15,6,12,15,64,64,255, +25,38,72,15,119,48,151,48,215,48,3,54,48,70,48,86,48,3,23,48,39,48,2,6,48, +1,55,48,103,48,119,48,167,48,183,48,199,48,231,48,247,48,8,38,48,1,7,48,23, +48,2,201,199,48,215,48,231,48,3,120,48,152,48,168,48,184,48,4,105,48,1,40, +48,56,48,88,48,3,25,48,1,7,48,1,232,48,1,217,48,1,168,48,200,48,2,153,48, +1,138,48,1,88,48,104,48,2,73,48,1,55,48,1,8,48,24,48,2,231,48,1,200,48,1, +167,48,1,8,48,24,48,40,48,72,48,136,48,5,153,199,48,1,88,48,104,48,136,48, +152,48,168,48,5,73,48,1,40,48,1,9,48,25,48,2,216,48,232,48,2,203,48,1,154, +48,170,48,186,48,3,139,48,1,48,192,124,127,72,57,48,1,42,48,1,25,48,1,10, +48,1,249,48,1,234,48,1,217,48,1,202,48,1,184,48,1,137,48,153,48,169,48,3, +120,48,1,105,48,1,58,48,74,48,90,48,3,41,48,1,26,48,1,12,48,1,104,253,48, +1,236,48,1,221,48,1,204,48,1,64,255,189,48,1,171,48,1,156,48,1,139,48,1,124, +48,1,107,48,1,92,48,1,75,48,1,60,48,1,43,48,1,28,48,1,11,48,1,252,48,1,235, +48,1,220,48,1,203,48,1,188,48,1,171,48,1,156,48,1,0,141,48,1,127,48,1,109, +48,1,95,48,1,77,48,1,47,48,63,48,2,29,48,1,15,48,1,253,48,1,239,48,1,221, +48,1,207,48,1,189,48,1,175,48,1,157,48,1,143,48,1,109,48,125,48,2,91,48,1, +77,48,1,59,48,1,45,48,1,27,48,1,13,48,1,56,251,48,1,237,48,1,219,48,1,205, +48,1,187,48,1,173,48,1,155,48,1,141,48,1,123,48,1,109,48,1,75,48,91,48,2, +57,48,1,43,48,1,25,48,1,11,48,1,249,48,1,235,48,1,221,48,1,203,48,1,189,48, +1,171,48,1,157,48,1,139,48,1,125,48,1,107,48,1,93,48,1,75,48,1,61,48,1,1, +43,48,1,31,48,1,2,95,48,127,48,159,48,191,48,223,48,255,48,6,0,48,1,8,68, +7,84,7,2,7,30,45,3,15,3,39,64,15,22,123,22,139,22,2,22,32,9,14,72,22,1,14, +18,0,63,51,51,43,93,17,51,63,23,51,93,1,94,93,93,95,113,113,95,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,113, +113,113,113,113,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,93,93,93,113,113,113,113,43,113,113,113,113,114,114,114,114,114,94,93, +93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93, +93,93,113,113,113,113,47,43,94,93,51,95,93,93,113,47,94,93,93,43,93,95,113, +113,113,113,113,113,113,113,113,113,51,93,113,95,113,18,23,57,61,47,47,47, +93,93,17,51,51,93,113,113,93,113,113,17,51,51,93,113,113,93,113,113,17,51, +51,93,113,113,93,113,113,49,48,43,93,93,93,93,93,93,93,43,43,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,33,35,3,46,1,39,38,39,6,7,14,1,7,3,35,1, +51,19,30,1,23,22,23,54,55,62,3,55,19,51,19,30,3,23,22,23,50,62,2,55,19,51, +5,231,228,244,11,25,10,12,12,13,12,11,24,11,246,228,254,97,199,253,17,31, +11,13,11,15,16,7,14,15,15,6,245,183,245,6,15,15,14,7,16,15,1,16,24,29,15, +249,199,3,127,38,104,47,55,57,58,55,48,102,38,252,129,5,129,252,129,63,124, +49,58,52,69,67,28,62,60,55,23,3,109,252,147,23,55,59,62,28,67,70,69,104,121, +52,3,127,0,0,1,0,46,0,0,5,43,5,129,0,11,2,119,64,255,92,4,1,73,4,1,59,4,1, +38,11,1,75,0,91,0,2,41,0,57,0,2,68,2,84,2,2,38,2,54,2,2,9,3,25,3,41,3,3,81, +10,1,69,10,1,51,10,1,6,10,22,10,2,93,8,1,76,8,1,43,8,59,8,2,9,8,25,8,2,82, +6,1,67,6,1,3,38,6,54,6,2,7,6,23,6,2,12,219,13,1,196,13,1,171,13,1,144,13, +1,132,13,1,96,13,1,84,13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13, +1,160,13,1,148,13,1,112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,204, +224,13,1,212,13,1,176,13,1,164,13,1,128,13,1,116,13,1,80,13,1,68,13,1,32, +13,1,20,13,1,36,13,84,13,132,13,180,13,228,13,5,4,13,52,13,100,13,148,13, +196,13,244,13,6,156,52,13,100,13,148,13,196,13,244,13,5,11,13,1,27,13,75, +13,123,13,171,13,219,13,5,139,13,187,13,235,13,3,4,13,20,13,52,13,68,13,4, +106,84,13,100,13,132,13,148,64,156,13,180,13,196,13,228,13,244,13,8,59,13, +1,36,13,1,11,13,1,244,13,1,219,13,1,196,13,1,171,13,1,148,13,1,123,13,1,100, +13,1,48,13,1,36,13,1,0,13,1,244,13,1,208,13,1,196,13,1,160,13,1,148,13,1, +112,13,1,100,13,1,64,13,1,52,13,1,16,13,1,4,13,1,57,224,13,1,212,13,1,176, +13,1,164,13,1,128,13,1,20,13,68,13,116,13,3,36,13,84,13,132,13,180,13,228, +13,5,84,13,100,13,148,13,244,13,4,64,13,1,2,0,13,48,13,2,6,8,10,7,1,4,4,9, +5,9,5,9,3,0,11,16,192,11,240,11,2,11,184,255,192,64,16,26,30,72,175,11,1, +144,11,1,127,11,1,0,11,1,11,184,255,192,181,11,15,72,11,2,3,184,255,240,64, +41,16,3,32,3,2,224,3,240,3,2,31,3,175,3,191,3,207,3,4,3,114,7,1,52,7,68,7, +84,7,3,4,7,10,1,4,8,5,3,3,0,18,0,63,50,63,51,23,57,93,93,1,47,93,93,113,56, +51,47,43,93,93,93,93,43,93,56,51,18,57,57,47,47,18,23,57,50,51,93,95,93,93, +113,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93,93,113,113,113, +113,113,113,113,113,113,113,114,114,114,114,94,93,93,113,114,114,94,93,113, +114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,49,48,94,93,93,95,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,33,9,1,35,9,1,51,9,1,51,9,1, +4,88,254,89,254,80,211,2,24,254,17,211,1,136,1,125,211,254,30,2,11,2,104, +253,152,2,220,2,165,253,215,2,41,253,98,253,29,0,0,0,1,0,45,0,0,5,41,5,129, +0,8,2,83,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5,1,3,5,1,16,3,5,184,255,232, +64,255,12,15,72,5,4,14,2,1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8, +6,1,90,38,2,86,2,150,2,3,118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,10,169, +10,201,10,3,86,10,1,9,10,57,10,2,25,10,89,10,137,10,249,10,4,6,10,1,202,249, +10,1,230,10,1,9,10,25,10,185,10,201,10,4,198,10,1,89,10,121,10,169,10,3,54, +10,1,41,10,57,10,185,10,233,10,4,11,10,1,153,249,10,1,198,10,214,10,2,178, +10,1,164,10,1,150,10,1,130,10,1,116,10,1,86,10,102,10,2,66,10,1,36,10,52, +10,2,18,10,1,4,10,1,244,10,1,230,10,1,196,10,212,10,2,166,10,182,10,2,146, +10,1,132,10,1,118,10,1,98,10,1,84,10,1,54,10,70,10,2,36,10,1,22,10,1,4,10, +1,242,10,1,1,208,10,224,10,2,196,10,1,160,10,176,10,2,148,10,1,112,10,1,100, +10,1,64,10,1,20,10,36,10,52,10,3,0,10,1,105,228,10,244,10,2,208,10,64,182, +1,164,10,180,10,196,10,3,128,10,144,10,2,116,10,1,80,10,96,10,2,68,10,1,32, +10,1,4,10,20,10,2,244,10,1,224,10,1,196,10,212,10,2,176,10,1,84,10,100,10, +116,10,148,10,164,10,5,48,10,64,10,2,36,10,1,0,10,1,196,10,244,10,2,144,10, +1,4,10,20,10,36,10,68,10,84,10,116,10,132,10,7,57,224,10,1,132,10,164,10, +212,10,3,112,10,1,4,10,36,10,52,10,84,10,100,10,5,228,10,244,10,2,192,10, +1,180,10,1,144,10,1,4,10,20,10,52,10,84,10,132,10,5,212,10,228,10,2,187,10, +1,164,10,1,112,10,1,2,48,10,96,10,2,15,10,47,10,2,0,3,59,3,75,3,123,3,3,3, +1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,1,93,93,95,93,93,93,93,113,113,113, +113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113,113,114,114, +114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93,93,95,93,113,113,113, +113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,113,113,113,114,114,114,94,93,93,113,113,113,47,94,93, +93,93,113,253,57,206,94,93,93,50,43,1,24,16,77,230,50,49,48,43,95,94,93,93, +43,93,93,1,17,35,17,1,51,9,1,51,3,9,190,253,226,210,1,173,1,171,210,2,72, +253,184,2,72,3,57,253,97,2,159,0,0,0,0,1,0,65,0,0,4,163,5,129,0,9,0,122,64, +35,100,4,116,4,132,4,3,109,3,125,3,141,3,3,91,3,1,41,3,57,3,73,3,3,114,8, +130,8,2,84,8,100,8,2,8,184,255,240,64,9,10,13,72,9,3,16,7,1,7,184,255,192, +64,18,12,17,72,7,8,4,15,2,31,2,2,2,64,12,15,72,2,11,184,255,192,64,14,13, +17,72,7,3,4,95,5,3,2,8,95,1,18,0,63,237,50,63,237,50,50,1,43,47,43,93,51, +51,47,43,93,51,51,49,48,43,93,93,93,93,93,93,41,1,53,1,33,53,33,21,1,33,4, +163,251,158,3,90,252,239,3,234,252,166,3,137,143,4,86,156,139,251,166,0,0, +1,0,146,254,87,2,41,5,204,0,7,0,49,64,30,7,48,2,1,224,2,1,2,4,241,63,1,1, +143,1,191,1,2,32,1,1,1,4,245,1,0,5,245,0,27,0,63,237,63,237,1,47,93,93,113, +237,205,93,113,50,49,48,19,17,33,21,35,17,51,21,146,1,151,233,233,254,87, +7,117,129,249,141,129,0,1,0,0,255,236,2,57,5,204,0,3,0,71,64,40,120,1,136, +1,2,0,24,13,17,72,9,3,25,3,73,3,3,70,2,1,10,2,26,2,42,2,3,3,16,0,3,16,3,32, +3,128,3,4,3,1,184,255,240,183,143,1,1,1,1,0,0,19,0,63,63,1,47,93,56,205,93, +56,49,48,93,93,93,43,93,5,1,51,1,1,151,254,105,158,1,155,20,5,224,250,32, +0,0,0,0,1,0,16,254,87,1,167,5,204,0,7,0,49,64,31,4,63,0,1,239,0,1,0,7,241, +64,2,80,2,2,192,2,208,2,224,2,3,2,4,245,5,0,1,245,0,27,0,63,237,63,237,1, +47,93,113,253,205,93,113,50,49,48,19,53,51,17,35,53,33,17,16,233,233,1,151, +254,87,129,6,115,129,248,139,0,1,0,10,2,161,3,183,5,129,0,6,2,243,181,0,24, +18,22,72,2,184,255,232,179,18,22,72,5,184,255,232,64,47,18,22,72,118,5,134, +5,2,4,24,18,22,72,121,4,137,4,2,3,54,6,70,6,2,102,6,118,6,134,6,230,6,4,6, +6,22,6,38,6,70,6,86,6,102,6,6,6,184,255,192,179,48,65,72,6,184,255,192,64, +57,18,22,72,6,5,4,57,3,73,3,2,105,3,121,3,137,3,3,9,3,25,3,41,3,89,3,105, +3,5,9,3,64,18,22,72,3,6,1,22,1,134,1,3,57,38,1,54,1,70,1,246,1,4,230,1,1, +1,184,255,192,182,60,63,72,153,1,1,1,184,255,224,64,255,30,33,72,56,1,72, +1,2,39,1,1,22,1,1,183,1,199,1,2,6,1,70,1,86,1,102,1,150,1,166,1,6,9,1,6,8, +1,246,8,1,164,8,1,121,8,1,6,8,1,246,8,1,201,8,217,8,2,187,8,1,9,8,25,8,41, +8,169,8,4,201,201,8,217,8,2,54,8,118,8,134,8,150,8,4,153,8,233,8,2,102,8, +118,8,2,9,8,25,8,57,8,3,198,8,1,139,8,1,57,8,73,8,121,8,3,43,8,1,4,8,1,152, +228,8,244,8,2,208,8,1,162,8,178,8,194,8,3,132,8,148,8,2,82,8,98,8,114,8,3, +64,8,1,50,8,1,36,8,1,2,8,18,8,2,228,8,244,8,2,214,8,1,196,8,1,146,8,162,8, +178,8,3,116,8,132,8,2,102,8,1,50,8,66,8,82,8,3,20,8,36,8,2,6,8,1,242,8,1, +212,8,228,8,2,166,8,182,8,2,130,8,146,8,2,100,8,116,8,2,86,8,1,52,8,68,8, +2,32,8,1,4,8,20,8,2,104,230,8,246,8,2,192,8,1,146,8,162,8,64,24,178,8,3,116, +8,132,8,2,82,8,98,8,2,52,8,68,8,2,22,8,38,8,2,8,184,255,128,64,24,85,88,72, +182,8,198,8,2,132,8,148,8,164,8,3,102,8,118,8,2,68,8,1,8,184,255,192,182, +72,75,72,228,8,1,8,184,255,192,64,12,66,69,72,148,8,1,114,8,130,8,2,8,184, +255,128,64,120,59,62,72,18,8,34,8,2,1,0,8,1,56,240,8,1,212,8,228,8,2,176, +8,1,100,8,132,8,148,8,164,8,4,64,8,80,8,2,36,8,52,8,2,228,8,244,8,2,171,8, +187,8,2,116,8,132,8,148,8,3,75,8,1,52,8,1,11,8,1,235,8,251,8,2,208,8,1,196, +8,1,176,8,1,132,8,148,8,164,8,3,96,8,112,8,2,2,0,8,16,8,64,8,80,8,4,8,34, +1,1,3,1,19,1,2,1,4,3,3,3,0,0,47,50,47,63,51,93,93,1,94,93,95,93,93,93,93, +93,93,113,113,113,113,113,113,114,114,114,114,114,114,94,93,95,93,43,93,93, +43,93,43,113,113,113,113,43,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,94,93,93,93,93,93,113,113,113,114,114,94,93,93,93,93,113,113,113, +113,114,25,47,94,93,93,113,113,113,43,113,43,113,114,94,93,205,43,94,93,113, +114,51,51,205,43,43,93,113,114,49,48,95,93,43,93,43,43,43,9,2,35,1,51,1,3, +19,254,203,254,206,162,1,112,203,1,114,2,161,2,121,253,135,2,224,253,32,0, +0,0,0,1,255,225,254,105,4,138,254,235,0,3,0,35,64,23,16,2,96,2,128,2,160, +2,208,2,5,96,2,128,2,240,2,3,2,0,0,186,1,0,47,237,1,47,47,93,113,49,48,3, +53,33,21,31,4,169,254,105,130,130,0,1,0,106,4,177,2,18,5,228,0,5,0,47,64, +31,117,3,133,3,2,64,4,128,4,2,4,64,16,1,1,1,2,149,128,15,0,47,0,63,0,127, +0,239,0,5,0,0,47,93,26,237,1,47,93,26,205,93,49,48,93,9,1,53,51,19,21,1,180, +254,182,207,217,4,177,1,22,29,254,225,20,0,0,0,0,2,0,87,255,236,4,115,4,78, +0,50,0,65,0,161,64,50,121,61,137,61,2,121,12,137,12,2,2,40,9,13,72,10,5,26, +5,2,43,24,9,17,72,5,28,21,28,2,37,37,30,70,64,46,9,111,56,127,56,143,56,3, +56,67,128,20,71,21,184,255,192,64,20,21,28,72,21,21,63,71,31,3,1,3,48,67, +192,67,2,160,67,1,67,184,255,192,64,32,30,35,72,33,81,40,22,57,81,9,9,26, +51,95,20,1,47,20,143,20,2,20,20,15,80,26,16,46,51,80,0,22,0,63,237,50,63, +237,51,47,93,113,17,18,57,47,237,63,237,1,43,93,113,47,93,237,51,47,43,237, +26,16,220,93,50,50,26,237,50,47,49,48,93,43,93,43,0,93,93,5,34,38,53,52,62, +2,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,21,17,20,22,51,50,54,55,21, +14,1,35,34,46,2,39,35,14,3,39,50,62,2,61,1,7,14,3,21,20,22,1,158,163,164, +81,131,168,87,243,28,58,87,59,52,84,62,38,6,188,10,56,103,155,110,204,206, +42,59,15,30,14,34,67,38,51,73,46,24,3,6,29,69,92,117,35,86,129,85,42,197, +66,119,90,53,95,20,172,150,107,137,78,30,2,4,59,67,94,58,27,15,39,67,51,17, +64,107,78,43,187,177,254,46,80,81,4,3,112,8,8,27,55,81,54,52,84,59,32,135, +63,98,116,53,89,4,1,17,50,90,73,88,96,0,0,2,0,132,255,236,4,29,5,204,0,31, +0,51,0,146,64,9,105,49,121,49,2,121,35,1,31,184,255,224,64,24,7,10,72,134, +30,150,30,2,73,27,89,27,2,73,4,89,4,2,134,1,150,1,2,1,184,255,224,64,63,7, +10,72,0,71,64,160,32,1,32,53,128,42,5,19,70,0,18,16,18,48,18,240,18,4,8,18, +176,53,1,63,53,1,112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,37,80, +29,16,18,0,12,21,5,47,80,2,22,0,63,237,50,63,63,63,237,50,1,93,93,113,113, +114,114,47,94,93,237,50,50,26,16,220,93,26,237,49,48,43,93,93,93,93,43,93, +93,1,16,33,34,38,39,35,20,14,2,7,35,62,3,53,17,51,17,20,6,7,6,7,51,62,1,51, +50,18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,4,29,254,114,123,163,51, +2,3,3,3,1,174,1,2,2,1,180,1,1,1,1,4,50,165,122,205,193,189,28,62,96,69,71, +109,73,38,38,73,108,70,66,96,64,31,2,34,253,202,89,99,26,56,48,34,4,9,43, +60,72,39,4,237,254,89,30,55,21,25,22,104,90,254,236,254,226,112,160,103,48, +46,102,166,120,116,158,99,43,46,102,163,0,0,0,1,0,87,255,236,3,202,4,78,0, +39,0,117,64,81,121,16,1,121,23,1,99,37,1,99,3,1,32,70,31,31,8,70,160,9,1, +9,9,41,0,71,31,19,1,19,35,80,26,31,32,127,32,143,32,223,32,4,32,32,26,16, +32,8,112,8,128,8,208,8,224,8,5,0,8,16,8,96,8,112,8,128,8,192,8,208,8,7,8, +8,5,80,14,22,31,41,1,93,0,63,237,51,47,93,113,63,51,47,93,16,237,1,47,93, +237,17,51,125,47,113,24,237,51,47,237,49,48,93,93,93,93,1,20,30,2,51,50,54, +55,23,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,7,46,1,35,34,14,2,1,19,27, +64,105,77,96,129,15,182,9,60,103,148,97,127,178,111,50,36,65,88,103,114,58, +91,142,103,64,13,185,14,114,105,77,103,64,27,2,34,93,156,113,62,104,108,12, +67,124,94,57,86,151,205,120,109,167,125,85,51,23,50,87,118,68,14,90,106,51, +103,156,0,0,0,0,2,0,86,255,236,3,239,5,204,0,31,0,51,0,123,64,87,85,34,101, +34,2,90,50,106,50,2,57,1,73,1,2,54,10,70,10,2,9,4,25,4,121,4,137,4,4,6,7, +22,7,118,7,134,7,4,19,70,64,42,0,143,18,239,18,2,18,53,128,32,71,31,6,1,6, +112,53,144,53,2,31,53,1,255,53,1,192,53,224,53,2,25,21,18,0,11,47,80,8,16, +0,37,80,3,22,0,63,237,50,63,237,50,63,63,1,93,93,113,113,47,93,237,26,16, +220,93,50,50,26,237,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17,16,33,50, +22,23,51,52,46,1,52,53,17,51,17,20,30,2,23,35,46,3,53,1,20,30,2,51,50,62, +2,53,52,46,2,35,34,14,2,3,53,50,165,122,205,193,1,142,123,164,50,2,1,1,180, +1,2,2,1,172,2,3,3,2,253,218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64, +31,174,104,90,1,20,1,24,2,54,90,98,10,43,47,42,9,1,163,251,19,39,72,60,43, +9,10,37,48,53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102, +163,0,0,0,2,0,87,255,236,4,24,4,78,0,28,0,37,0,107,64,46,90,35,106,35,2,90, +30,106,30,2,85,3,101,3,2,8,73,9,9,27,71,64,31,29,1,144,29,1,29,39,128,37, +0,71,31,17,1,17,48,39,192,39,208,39,3,39,184,255,192,64,19,30,35,72,8,8,5, +0,80,37,37,5,32,80,22,16,5,80,14,22,0,63,237,63,237,18,57,47,237,17,57,47, +1,43,113,47,93,237,50,26,16,220,93,113,26,237,50,47,237,49,48,93,0,93,93, +1,20,30,2,51,50,54,55,23,14,3,35,34,2,17,52,62,2,51,50,30,2,29,1,39,46,1, +35,34,14,2,7,1,20,35,73,114,80,117,141,25,158,17,61,102,153,108,240,251,76, +132,176,100,136,183,111,47,186,15,144,135,45,99,84,58,4,1,247,85,143,103, +57,94,72,45,45,91,73,47,1,30,1,26,152,211,132,59,88,155,210,122,24,138,171, +157,29,74,127,98,0,0,0,1,0,29,0,0,2,60,5,202,0,27,0,161,64,11,3,10,19,10, +51,10,67,10,4,13,10,184,255,224,64,106,8,12,72,26,15,16,1,14,16,25,16,1,70, +5,0,2,1,18,2,31,29,47,29,79,29,95,29,127,29,143,29,159,29,7,15,29,63,29,127, +29,175,29,191,29,223,29,239,29,7,59,95,29,191,29,2,127,29,143,29,159,29,3, +29,64,86,100,72,29,64,39,44,72,32,29,48,29,96,29,3,175,29,223,29,239,29,3, +64,29,1,15,29,47,29,2,19,80,12,0,0,3,80,25,6,15,1,21,0,63,63,51,237,50,63, +237,1,93,93,93,113,43,43,113,114,94,93,113,47,94,93,51,237,50,50,47,94,93, +51,49,48,0,43,94,93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35, +34,14,2,29,1,51,21,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51, +29,11,211,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41,60,39, +97,131,0,2,0,86,254,87,3,239,4,75,0,49,0,69,0,217,64,72,122,49,138,49,2,118, +7,134,7,2,101,62,1,85,12,101,12,2,90,58,106,58,2,38,3,54,3,2,38,18,1,41,33, +1,9,23,25,23,121,23,137,23,4,6,29,22,29,118,29,134,29,4,9,47,70,64,50,34, +48,14,1,127,14,223,14,2,14,71,128,6,70,5,184,255,192,64,81,23,28,72,5,5,60, +71,15,26,1,10,26,32,71,64,71,2,207,71,1,0,71,32,71,144,71,176,71,4,80,223, +71,1,192,71,1,79,71,1,128,71,160,71,2,15,71,47,71,2,208,71,240,71,2,15,71, +1,8,41,15,34,55,80,31,16,15,65,80,21,22,9,80,53,6,1,38,6,1,6,0,27,0,63,50, +93,93,237,63,237,50,63,237,50,63,1,94,93,93,113,113,114,114,114,94,93,93, +113,47,94,93,237,51,47,43,237,26,16,220,93,113,50,50,26,237,49,48,0,94,93, +93,93,93,93,93,93,93,93,93,1,34,46,2,39,55,30,1,51,50,62,2,61,1,35,14,3,35, +34,46,2,53,52,62,2,51,50,22,23,51,52,62,2,55,51,14,3,21,17,20,6,19,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,2,36,93,144,102,64,14,181,18,123,100,61, +100,70,38,2,20,59,85,112,72,103,147,93,43,43,97,155,111,115,169,46,2,3,3, +4,2,171,1,2,2,1,223,44,49,80,103,54,69,99,65,31,31,64,98,68,54,103,82,50, +254,87,38,71,98,60,26,75,81,34,75,120,86,174,41,75,58,35,69,138,205,135,130, +208,145,77,105,97,25,62,55,40,3,9,43,60,73,39,252,197,227,229,3,198,113,161, +102,48,48,103,161,112,117,159,98,42,46,100,158,0,0,0,0,1,0,142,0,0,3,238, +5,204,0,33,0,109,185,0,8,255,192,64,36,7,11,72,11,70,64,80,12,1,159,12,255, +12,2,12,35,128,0,35,192,35,208,35,224,35,4,192,35,1,15,35,1,128,35,1,35,184, +255,192,64,32,19,23,72,28,24,70,192,25,1,0,25,16,25,48,25,224,25,240,25,5, +8,25,26,0,25,11,21,0,18,80,5,16,0,63,237,50,63,51,63,1,47,94,93,113,237,50, +43,93,113,113,114,26,16,220,93,113,26,237,49,48,43,1,62,3,51,50,30,2,21,17, +35,17,52,46,2,35,34,14,2,21,17,35,17,51,17,20,14,2,7,1,61,30,70,84,100,62, +104,133,77,29,181,17,48,88,70,64,103,73,40,180,180,2,3,2,1,3,129,55,77,50, +23,56,101,140,84,253,47,2,174,69,104,69,35,46,84,120,75,253,130,5,204,254, +126,33,66,56,39,7,0,0,0,2,0,137,0,0,1,61,5,204,0,3,0,7,0,115,64,13,3,7,70, +0,0,4,16,4,48,4,3,8,4,184,255,192,64,42,21,24,72,4,4,8,9,255,9,1,224,9,1, +223,9,1,176,9,192,9,2,159,9,1,112,9,128,9,2,31,9,1,0,9,1,240,9,1,223,9,1, +9,184,255,192,64,17,34,37,72,79,9,1,31,9,1,5,15,4,21,0,83,1,0,0,63,237,63, +63,1,93,113,43,113,113,114,114,114,114,114,114,114,114,17,18,57,47,43,94, +93,51,237,50,49,48,19,53,51,21,3,17,51,17,137,180,180,180,5,32,172,172,250, +224,4,58,251,198,0,0,0,0,2,255,206,254,87,1,61,5,204,0,3,0,23,1,51,64,151, +7,24,12,16,72,7,40,8,11,72,3,4,70,21,12,12,0,0,21,16,21,32,21,64,21,4,7,21, +21,24,25,144,25,1,63,25,1,0,25,16,25,2,219,25,64,210,213,72,208,25,224,25, +2,143,25,1,64,25,80,25,2,15,25,31,25,95,25,111,25,255,25,5,144,25,160,25, +224,25,240,25,4,79,25,1,0,25,1,160,63,25,175,25,191,25,207,25,4,239,25,1, +176,25,192,25,208,25,3,63,25,79,25,95,25,3,32,25,1,143,25,191,25,207,25,3, +0,25,1,111,239,25,1,208,25,1,63,25,143,25,2,111,25,143,25,159,25,175,25,255, +25,5,25,184,255,192,64,84,79,82,72,223,25,1,144,25,160,25,176,25,3,47,25, +63,25,79,25,3,0,25,1,61,25,64,53,56,72,112,25,128,25,144,25,176,25,4,15,25, +31,25,2,255,25,1,25,64,35,38,72,144,25,1,79,25,1,255,25,1,112,25,128,25,192, +25,208,25,224,25,5,31,25,1,22,15,16,80,9,27,0,83,1,0,0,63,237,63,237,63,1, +93,93,93,113,113,43,113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93, +93,113,113,113,113,114,94,93,93,93,113,114,114,114,43,94,93,93,93,17,18,57, +47,94,93,51,51,47,16,237,50,49,48,0,43,43,19,53,51,21,17,20,14,2,35,34,38, +39,53,30,1,51,50,62,2,53,17,51,137,180,21,54,93,72,34,65,28,13,36,13,38,49, +28,10,180,5,32,172,172,250,90,62,106,78,45,4,5,139,2,4,20,43,67,46,4,165, +0,0,1,0,138,0,0,4,3,5,204,0,11,0,251,64,84,124,2,1,122,8,1,118,7,1,86,9,102, +9,134,9,150,9,4,139,0,155,0,2,89,0,105,0,121,0,3,116,10,132,10,148,10,3,68, +10,1,1,10,10,11,42,8,1,3,8,9,16,116,9,1,9,9,0,11,16,84,11,116,11,148,11,3, +116,11,148,11,180,11,212,11,228,11,244,11,6,48,11,1,2,11,184,255,192,64,105, +7,10,72,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,31,13,63,13,2,31,13,63,13,95, +13,255,13,4,15,13,31,13,63,13,95,13,127,13,5,57,13,64,83,86,72,96,13,128, +13,160,13,192,13,208,13,5,223,13,1,0,13,96,13,128,13,160,13,4,0,13,16,13, +48,13,64,13,128,13,160,13,192,13,224,13,240,13,9,7,2,1,7,10,4,8,15,5,0,4, +21,0,21,0,63,63,63,63,23,57,1,94,93,113,113,114,43,94,93,113,114,47,94,93, +237,50,47,43,95,93,93,113,56,51,51,47,93,56,51,95,114,17,57,17,51,49,48,93, +93,93,93,93,0,93,1,93,0,93,33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132, +180,180,1,219,211,254,73,1,206,1,238,109,254,127,5,204,252,97,2,13,254,47, +253,151,0,0,0,1,0,138,0,0,1,62,5,204,0,3,0,111,64,52,3,70,192,0,1,208,0,1, +0,0,16,0,48,0,240,0,4,8,0,224,5,240,5,2,223,5,1,176,5,192,5,2,159,5,1,112, +5,128,5,2,15,5,31,5,2,240,5,1,223,5,1,5,184,255,192,64,27,34,37,72,79,5,1, +255,5,1,112,5,128,5,192,5,208,5,224,5,5,31,5,1,1,0,0,21,0,63,63,1,93,93,93, +113,43,113,113,114,114,114,114,114,114,47,94,93,113,114,237,49,48,51,17,51, +17,138,180,5,204,250,52,0,0,1,0,136,0,0,6,35,4,78,0,59,2,194,185,0,42,255, +224,179,8,11,72,32,184,255,224,64,255,8,11,72,34,59,70,0,0,13,46,70,217,47, +249,47,2,182,47,1,41,47,89,47,137,47,3,6,47,1,166,47,182,47,214,47,230,47, +4,137,47,1,118,47,1,89,47,1,6,47,22,47,70,47,3,7,47,25,12,70,198,13,1,6,13, +22,13,54,13,230,13,246,13,5,8,13,251,61,1,201,61,217,61,233,61,3,187,61,1, +153,61,1,139,61,1,105,61,121,61,2,91,61,1,73,61,1,43,61,59,61,2,249,61,1, +235,61,1,217,61,1,203,61,1,189,61,1,153,61,1,139,61,1,105,61,1,91,61,1,41, +61,57,61,2,27,61,1,9,61,1,202,235,61,251,61,2,105,61,137,61,153,61,185,61, +201,61,5,91,61,1,77,61,1,41,61,57,61,2,27,61,1,249,61,1,235,61,1,201,61,217, +61,2,187,61,1,153,61,1,139,61,1,125,61,1,1,43,61,75,61,91,61,107,61,4,31, +61,1,4,61,1,203,61,235,61,2,175,61,191,61,2,139,61,1,127,61,1,43,61,75,61, +91,61,107,61,4,31,61,1,11,61,1,154,255,61,1,235,61,64,255,1,223,61,1,187, +61,1,175,61,1,139,61,155,61,2,127,61,1,91,61,107,61,2,79,61,1,59,61,1,36, +61,1,11,61,1,235,61,1,223,61,1,187,61,1,175,61,1,155,61,1,127,61,143,61,2, +100,61,1,75,61,1,63,61,1,43,61,1,15,61,31,61,2,235,61,1,223,61,1,123,61,139, +61,171,61,187,61,4,111,61,1,59,61,1,31,61,1,11,61,1,106,187,61,203,61,235, +61,3,175,61,1,139,61,1,127,61,1,91,61,1,79,61,1,27,61,1,251,61,1,223,61,239, +61,2,187,61,203,61,2,175,61,1,100,61,148,61,2,27,61,43,61,75,61,3,4,61,1, +244,61,1,139,61,171,61,219,61,3,127,61,1,107,61,1,52,61,1,27,61,1,15,61,1, +57,187,61,219,61,251,61,3,160,61,1,116,61,148,61,2,43,61,75,61,91,61,3,31, +61,1,11,61,1,203,61,235,61,251,61,3,164,61,1,27,61,75,61,91,61,123,61,4,244, +61,1,208,61,1,2,96,61,144,61,160,61,192,61,4,79,61,1,48,61,1,47,61,1,0,64, +19,61,1,8,34,53,80,40,16,25,6,80,31,16,19,15,47,13,0,21,0,63,50,50,63,63, +237,50,63,237,50,1,94,93,93,93,93,93,95,93,93,113,113,113,114,114,114,114, +114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,113,113,113,95,113,113,113,113,113,113,113,114,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,47, +94,93,113,237,50,47,94,93,93,93,93,93,113,113,113,113,237,18,57,47,237,57, +49,48,0,43,43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21, +51,62,3,51,50,22,23,51,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,3,0,20,47,76,55,57,92,65,35,179,1,2,2,1,170,1,2,3,2,3,24,56,75,97,64,123, +143,28,3,24,60,80,100,64,82,119,76,36,178,20,47,76,55,57,92,65,35,2,174,79, +106,65,27,45,85,125,81,253,141,3,83,34,75,67,48,7,5,44,57,59,20,47,76,53, +29,98,107,47,76,53,29,44,92,145,100,253,47,2,174,79,106,65,27,43,84,126,83, +253,141,0,1,0,136,0,0,3,238,4,78,0,37,0,109,185,0,34,255,224,64,36,7,11,72, +37,70,64,80,0,1,159,0,255,0,2,0,39,128,0,39,192,39,208,39,224,39,4,192,39, +1,15,39,1,128,39,1,39,184,255,192,64,32,19,23,72,25,12,70,192,13,1,0,13,16, +13,48,13,224,13,240,13,5,8,13,25,6,80,31,16,19,15,13,0,21,0,63,50,63,63,237, +50,1,47,94,93,113,237,50,43,93,113,113,114,26,16,220,93,113,26,237,49,48, +43,33,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51, +50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26, +62,82,106,70,90,130,84,39,2,174,79,106,65,27,45,85,125,81,253,141,3,83,34, +75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,253,47,0,0,0,0,2,0,86, +255,236,4,29,4,78,0,14,0,34,0,116,64,59,121,32,137,32,2,116,28,132,28,2,118, +22,134,22,2,121,18,137,18,2,150,12,166,12,2,4,12,20,12,2,11,9,27,9,2,11,5, +27,5,2,4,2,20,2,2,7,0,71,64,144,15,1,15,36,128,48,36,1,36,184,255,192,64, +20,30,35,72,223,36,1,25,71,31,8,1,8,20,80,10,16,30,80,3,22,0,63,237,63,237, +1,47,93,237,93,43,113,26,16,220,93,26,237,49,48,94,93,93,93,93,93,93,93,93, +93,1,16,2,35,34,46,2,53,16,33,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51, +50,62,2,4,29,250,238,113,178,123,65,1,229,126,183,117,56,189,39,75,108,68, +69,111,78,41,44,77,105,62,69,112,78,42,2,30,254,228,254,234,68,140,211,143, +2,48,70,140,210,140,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0, +0,2,0,132,254,87,4,29,4,77,0,38,0,58,0,148,64,16,105,56,121,56,2,105,42,121, +42,2,134,36,150,36,2,36,184,255,224,64,19,7,10,72,73,31,89,31,2,73,7,89,7, +2,134,3,150,3,2,3,184,255,224,64,63,7,10,72,0,71,64,160,39,1,39,60,128,49, +28,15,70,0,16,16,16,48,16,240,16,4,8,16,176,60,1,63,60,1,112,60,144,60,2, +31,60,1,255,60,1,192,60,224,60,2,28,44,80,34,16,22,15,15,27,8,54,80,5,22, +0,63,237,50,63,63,63,237,50,1,93,93,113,113,114,114,47,94,93,237,50,50,26, +16,220,93,26,237,49,48,43,93,93,93,43,93,93,93,1,20,14,2,35,34,38,39,35,30, +3,21,17,35,17,52,46,2,39,51,30,3,21,51,62,3,51,50,30,2,7,52,46,2,35,34,14, +2,21,20,30,2,51,50,62,2,4,29,40,93,153,112,116,174,46,5,1,1,1,1,180,1,2,2, +1,174,1,3,3,3,4,25,64,82,101,63,112,153,93,40,189,24,59,98,74,60,106,79,46, +38,73,108,70,75,99,59,24,2,34,123,208,150,85,88,100,2,32,48,59,29,254,89, +5,6,39,72,59,42,9,3,36,51,58,26,52,73,47,21,80,145,205,129,100,156,108,56, +34,96,169,135,115,159,98,43,58,110,159,0,0,2,0,86,254,87,3,240,4,78,0,34, +0,54,0,165,64,119,85,47,101,47,2,90,43,106,43,2,57,32,73,32,2,54,9,70,9,2, +9,1,25,1,121,1,137,1,4,6,5,22,5,118,5,134,5,4,9,22,70,64,35,11,127,23,223, +23,2,23,56,128,45,71,15,3,1,10,3,32,56,64,56,2,207,56,1,0,56,32,56,144,56, +176,56,4,80,223,56,1,192,56,1,79,56,1,128,56,160,56,2,15,56,47,56,2,208,56, +240,56,2,15,56,1,8,22,27,17,16,11,40,80,6,16,29,50,80,0,22,0,63,237,50,63, +237,50,63,63,1,94,93,93,113,113,114,114,114,94,93,93,113,47,94,93,237,26, +16,220,93,50,50,26,237,49,48,0,94,93,93,93,93,93,93,5,34,2,17,16,18,51,50, +30,2,23,51,52,62,2,55,51,14,1,21,17,35,17,52,54,55,54,55,35,14,3,1,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,1,228,206,192,197,201,67,103,81,61,25, +2,3,3,4,2,173,2,5,180,1,1,1,1,2,26,63,82,103,1,16,41,75,107,66,69,98,61,29, +27,61,97,70,60,106,79,46,20,1,22,1,22,1,26,1,28,24,47,70,47,25,61,54,39,3, +17,144,134,251,54,1,183,26,56,25,28,29,51,75,49,23,2,62,118,160,96,41,51, +105,161,110,108,160,104,51,37,97,169,0,0,0,1,0,136,0,0,2,136,4,78,0,31,0, +62,64,40,16,21,48,21,2,21,21,33,12,31,70,192,0,1,0,0,16,0,48,0,224,0,240, +0,5,8,0,25,40,19,22,72,25,12,18,16,7,15,0,21,0,63,63,63,51,205,43,1,47,94, +93,113,237,50,17,51,47,93,49,48,51,17,52,46,2,39,51,30,3,21,51,62,3,51,50, +22,23,21,46,1,35,34,14,2,21,17,142,1,2,2,1,170,1,3,3,1,4,19,43,58,80,57,22, +40,11,18,48,30,62,87,55,26,3,62,34,71,66,58,23,23,59,62,57,20,62,91,59,29, +7,3,165,5,5,56,99,137,81,253,204,0,0,1,0,57,255,236,3,182,4,75,0,55,0,189, +64,85,116,46,132,46,2,111,21,127,21,143,21,3,107,22,1,37,54,1,42,27,1,21, +52,1,5,2,21,2,2,11,30,27,30,2,36,73,35,35,0,72,64,32,19,48,19,2,144,19,160, +19,176,19,3,19,57,128,11,73,10,64,25,30,72,10,10,44,72,79,29,95,29,2,32,29, +1,29,96,57,192,57,2,128,57,1,57,184,255,192,64,42,39,42,72,63,57,1,16,57, +1,19,44,5,41,80,32,0,36,1,144,36,240,36,2,36,36,32,16,14,80,5,96,11,112,11, +2,128,11,1,11,11,5,22,0,63,51,47,93,113,16,237,63,51,47,93,113,16,237,18, +57,57,1,93,93,43,93,113,47,93,113,237,51,47,43,237,26,16,220,93,113,26,237, +50,47,237,49,48,93,93,0,93,1,93,93,0,93,93,93,1,20,14,2,35,34,46,2,39,55, +30,1,51,50,62,2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,6,21, +20,30,2,23,30,5,3,182,59,112,163,105,94,151,114,77,18,159,23,144,128,58,97, +70,39,46,82,117,70,65,128,103,64,211,202,179,211,28,162,9,48,68,85,46,122, +116,43,77,108,65,43,90,85,75,56,33,1,43,76,119,81,43,29,64,105,76,31,87,81, +16,39,65,48,49,63,42,31,19,17,42,69,102,77,148,155,126,139,20,42,57,35,15, +74,75,44,57,39,29,16,11,25,35,47,66,88,0,0,0,0,1,0,31,255,240,2,42,5,44,0, +22,0,123,64,87,40,14,1,105,14,121,14,137,14,3,40,13,1,105,13,121,13,137,13, +3,139,4,1,4,32,9,13,72,108,4,124,4,156,4,172,4,4,4,32,9,12,72,111,22,127, +22,2,22,12,13,22,3,16,70,9,8,143,5,1,0,5,16,5,32,5,64,5,4,7,5,128,24,1,15, +6,80,12,63,10,1,10,9,15,19,80,3,22,0,63,237,63,205,93,51,237,50,1,93,47,94, +93,113,51,51,237,23,50,47,93,49,48,0,43,93,1,43,93,93,113,93,113,37,14,1, +35,34,53,17,35,53,51,55,51,21,51,21,35,17,20,22,51,50,54,55,2,42,41,85,56, +216,125,132,53,120,200,200,51,63,26,49,29,8,11,13,245,2,210,131,242,242,131, +253,85,78,63,8,6,0,0,0,0,1,0,133,255,236,3,235,4,58,0,37,0,121,64,69,150, +3,1,26,33,42,33,58,33,3,25,14,70,64,47,11,143,11,2,191,11,1,143,11,159,11, +255,11,3,11,39,128,1,70,223,36,239,36,2,0,36,16,36,48,36,240,36,4,8,36,176, +39,192,39,208,39,3,176,39,240,39,2,255,39,1,112,39,1,39,184,255,192,64,13, +19,23,72,25,6,80,31,22,19,21,12,0,15,0,63,50,63,63,237,50,1,43,93,93,113, +114,47,94,93,113,237,26,16,220,93,113,114,26,237,51,49,48,0,93,93,1,17,20, +30,2,51,50,62,2,53,17,51,17,20,30,2,23,35,46,3,53,35,14,3,35,34,46,2,53,17, +1,58,23,52,85,63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90, +130,84,39,4,58,253,82,79,106,65,27,45,85,125,81,2,115,252,173,34,75,67,48, +7,5,44,57,59,20,47,76,53,29,44,92,144,101,2,209,0,0,1,0,7,0,0,3,249,4,58, +0,16,2,91,64,55,57,1,73,1,2,153,1,1,54,0,70,0,2,134,0,150,0,2,58,15,74,15, +2,154,15,1,105,15,121,15,137,15,3,53,3,69,3,2,149,3,1,3,103,3,119,3,135,3, +3,14,16,13,17,72,4,184,255,240,64,62,13,17,72,1,0,9,9,2,15,16,16,43,16,123, +16,2,4,16,20,16,2,4,16,20,16,68,16,84,16,132,16,148,16,196,16,212,16,8,219, +16,1,68,16,84,16,132,16,148,16,196,16,5,27,16,1,4,16,1,8,16,3,2,184,255,240, +64,255,11,2,91,2,2,42,2,11,18,27,18,2,11,18,27,18,75,18,91,18,139,18,155, +18,203,18,219,18,8,255,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18, +1,68,18,84,18,2,32,18,1,4,18,20,18,2,199,224,18,1,196,18,212,18,2,160,18, +1,4,18,20,18,68,18,84,18,132,18,148,18,6,68,18,84,18,132,18,148,18,196,18, +212,18,6,27,18,1,4,18,1,219,18,1,196,18,1,155,18,1,132,18,1,91,18,1,68,18, +1,27,18,1,4,18,1,151,11,18,27,18,75,18,91,18,139,18,155,18,203,18,219,18, +8,155,18,203,18,219,18,3,132,18,1,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18, +2,224,18,1,196,18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,4,18,20,18,68, +18,84,18,4,103,4,18,20,18,68,18,84,18,132,18,148,18,196,18,212,18,8,219,18, +1,196,18,1,155,18,1,132,18,1,91,18,1,68,18,1,27,18,1,4,18,1,219,18,1,196, +18,1,11,18,27,18,75,18,64,99,91,18,139,18,155,18,6,55,75,18,91,18,139,18, +155,18,203,18,219,18,6,63,18,1,32,18,1,4,18,20,18,2,224,18,1,196,18,212,18, +2,160,18,1,132,18,148,18,2,96,18,1,68,18,84,18,2,32,18,1,4,18,20,18,2,196, +18,212,18,2,160,18,1,132,18,148,18,2,96,18,1,2,80,18,1,47,18,1,0,18,16,18, +2,7,15,2,15,9,1,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93,93,113,113,113, +113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113,113,113,113,113, +113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114,94,93,93,93,93,93, +93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93,93,93,93,113,114,47, +94,93,56,51,47,94,93,93,93,93,113,114,114,56,51,18,57,61,47,51,51,49,48,43, +43,93,95,93,113,93,93,113,93,113,93,113,33,35,1,51,19,30,3,23,62,3,55,19, +51,2,101,213,254,119,192,238,7,19,20,17,6,6,19,20,21,8,246,191,4,58,253,64, +22,63,68,63,21,21,63,66,63,22,2,194,0,0,0,0,1,255,253,0,0,5,204,4,58,0,42, +3,177,64,36,229,23,1,58,41,74,41,2,122,41,138,41,154,41,3,53,16,69,16,2,117, +16,133,16,149,16,3,54,29,70,29,2,54,29,1,29,184,255,240,64,22,13,17,72,57, +28,73,28,2,57,28,1,28,16,13,17,72,54,0,70,0,2,0,184,255,240,64,9,11,17,72, +54,13,70,13,2,13,184,255,240,64,51,11,17,72,57,1,73,1,2,1,16,11,17,72,57, +14,73,14,2,3,14,16,9,17,72,14,13,22,29,28,7,1,0,35,40,35,1,88,35,1,22,7,35, +35,7,22,3,15,41,42,16,42,184,255,192,64,73,47,50,72,73,42,1,52,42,1,38,42, +1,249,42,1,198,42,230,42,2,164,42,1,150,42,1,121,42,1,54,42,70,42,102,42, +3,25,42,1,244,42,1,182,42,230,42,2,132,42,148,42,2,102,42,118,42,2,57,42, +1,38,42,1,20,42,1,6,42,1,8,42,16,15,184,255,240,64,255,9,15,89,15,105,15, +121,15,4,10,15,198,44,230,44,246,44,3,164,44,1,150,44,1,121,44,1,102,44,1, +84,44,1,54,44,70,44,2,25,44,1,244,44,1,230,44,1,196,44,1,182,44,1,153,44, +1,134,44,1,116,44,1,102,44,1,57,44,1,20,44,36,44,2,6,44,1,202,249,44,1,150, +44,182,44,198,44,230,44,4,105,44,1,54,44,70,44,2,9,44,25,44,2,230,44,1,185, +44,1,86,44,102,44,134,44,3,57,44,1,43,44,1,20,44,1,6,44,1,228,44,1,214,44, +1,196,44,1,182,44,1,162,44,1,148,44,1,134,44,1,114,44,1,100,44,1,86,44,1, +52,44,68,44,2,34,44,1,20,44,1,6,44,1,153,246,44,1,194,44,210,44,2,180,44, +1,166,44,1,132,44,1,118,44,1,84,44,100,44,2,66,44,1,52,44,1,22,44,38,44,2, +4,44,1,226,44,242,44,2,212,44,1,198,44,1,164,44,1,146,44,1,132,44,1,102,44, +118,44,2,84,44,1,54,44,70,44,2,36,44,1,22,44,1,4,44,1,244,44,64,213,1,230, +44,1,196,44,1,178,44,1,164,44,1,102,44,134,44,150,44,3,68,44,84,44,2,54,44, +1,20,44,1,6,44,1,105,246,44,1,226,44,1,212,44,1,150,44,182,44,198,44,3,116, +44,132,44,2,54,44,70,44,102,44,3,36,44,1,6,44,22,44,2,244,44,1,182,44,230, +44,2,148,44,164,44,2,134,44,1,105,44,1,86,44,1,68,44,1,6,44,54,44,2,228,44, +1,214,44,1,196,44,1,166,44,182,44,2,137,44,1,114,44,1,1,96,44,1,4,44,36,44, +84,44,3,56,164,44,196,44,212,44,244,44,4,128,44,1,116,44,1,75,44,1,48,44, +1,20,44,36,44,2,251,44,1,196,44,1,160,44,1,148,44,1,123,44,1,52,44,68,44, +100,44,3,27,44,1,240,44,1,228,44,1,203,44,1,100,44,132,44,148,44,180,44,4, +63,44,1,2,0,44,16,44,2,8,7,184,255,224,64,40,14,17,72,66,7,1,52,7,1,34,7, +1,7,28,41,3,15,15,35,40,12,17,72,45,35,1,22,40,12,17,72,45,22,1,1,22,35,3, +14,21,0,63,23,51,93,43,93,43,63,23,51,93,93,93,43,1,94,93,95,93,93,93,93, +93,113,113,113,113,113,113,113,114,114,114,114,114,114,94,93,93,95,93,93, +93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114,114,114,94, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,47,94,93, +56,51,47,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,114,114,114, +43,56,51,18,23,57,61,47,47,47,113,114,17,51,51,17,51,51,17,51,51,49,48,43, +95,113,43,113,43,113,43,113,43,93,113,43,93,113,93,113,93,113,113,33,35,3, +46,1,39,38,39,6,7,14,1,7,3,35,1,51,19,30,1,23,22,23,54,55,62,1,55,19,51,19, +30,1,23,22,23,54,55,62,1,55,19,51,4,150,209,173,8,17,8,10,9,9,10,8,19,8,178, +208,254,209,178,183,7,14,7,7,8,8,9,8,16,6,196,193,189,7,16,7,8,8,8,8,7,15, +7,191,176,2,186,27,80,38,44,47,45,44,38,82,31,253,74,4,58,253,33,23,67,32, +37,39,38,36,31,64,21,2,231,253,25,26,66,29,34,35,38,36,31,67,26,2,223,0,0, +1,0,23,0,0,3,234,4,58,0,11,2,214,64,72,148,2,1,134,2,1,141,8,157,8,2,121, +8,1,130,6,146,6,2,118,6,1,141,0,157,0,2,121,0,1,55,10,119,10,2,28,10,1,122, +4,1,19,4,1,3,24,1,120,1,136,1,152,1,4,23,7,135,7,151,7,3,6,8,10,1,7,4,4,9, +9,16,5,184,255,240,64,59,5,9,5,9,3,0,11,16,41,11,57,11,2,4,11,20,11,2,214, +11,230,11,246,11,3,196,11,1,150,11,166,11,182,11,3,132,11,1,6,11,38,11,70, +11,102,11,134,11,150,11,166,11,198,11,230,11,9,8,11,184,255,192,181,24,31, +72,11,2,3,184,255,240,64,11,9,3,1,9,3,57,3,2,10,3,13,184,255,128,64,116,223, +233,72,118,13,1,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,230, +13,246,13,2,210,13,1,192,13,1,178,13,1,132,13,148,13,164,13,3,118,13,1,100, +13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13,1,199,246,13,1,228,13,1, +214,13,1,196,13,1,182,13,1,164,13,1,6,13,70,13,86,13,134,13,150,13,166,13, +198,13,214,13,230,13,9,150,13,198,13,2,13,184,255,192,64,187,183,192,72,132, +13,1,86,13,102,13,118,13,3,68,13,1,38,13,54,13,2,4,13,1,151,38,13,54,13,102, +13,118,13,166,13,182,13,198,13,230,13,246,13,9,230,13,1,132,13,1,118,13,1, +68,13,84,13,100,13,3,54,13,1,36,13,1,22,13,1,4,13,1,246,13,1,228,13,1,214, +13,1,196,13,1,182,13,1,164,13,1,118,13,134,13,150,13,3,100,13,1,6,13,22,13, +38,13,70,13,86,13,5,103,6,13,70,13,86,13,134,13,150,13,198,13,214,13,230, +13,8,153,13,217,13,2,100,13,1,86,13,1,68,13,1,54,13,1,36,13,1,22,13,1,4,13, +1,214,13,230,13,246,13,3,196,13,1,6,13,38,13,54,13,70,13,4,55,102,13,166, +13,182,13,230,13,246,13,5,13,184,255,192,64,54,61,66,72,57,13,1,34,13,1,1, +0,13,16,13,2,244,13,1,192,13,208,13,224,13,3,180,13,1,128,13,144,13,160,13, +3,116,13,1,96,13,1,84,13,1,64,13,1,52,13,1,32,13,1,13,184,255,192,64,34,18, +24,72,160,13,1,2,0,13,16,13,80,13,112,13,128,13,144,13,6,7,10,4,4,7,1,3,2, +8,6,15,0,2,21,0,63,51,63,51,18,23,57,17,1,51,94,93,95,93,43,113,113,113,113, +113,113,113,113,113,113,114,95,114,114,43,114,94,93,93,93,113,113,113,113, +113,113,113,113,114,94,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113, +113,113,114,94,93,93,93,93,93,43,93,113,114,114,114,114,114,114,94,93,93, +93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,43,47,94, +93,114,56,51,47,43,94,93,113,113,113,113,114,114,56,51,18,57,57,47,47,56, +56,18,23,57,50,51,49,48,0,93,93,1,95,93,93,93,93,93,93,93,93,93,93,93,93, +33,9,1,35,9,1,51,9,1,51,9,1,3,33,254,221,254,219,194,1,129,254,145,199,1, +14,1,12,201,254,145,1,134,1,188,254,68,2,44,2,14,254,91,1,165,253,244,253, +210,0,0,0,0,1,0,5,254,87,3,252,4,58,0,31,2,207,64,59,147,3,1,147,2,1,153, +16,1,150,0,1,141,16,157,16,2,141,0,157,0,2,122,29,138,29,154,29,3,105,29, +1,157,30,1,30,16,13,16,72,146,19,1,134,19,1,114,19,1,86,19,102,19,2,146,18, +1,3,18,184,255,240,64,36,13,16,72,16,0,24,8,24,8,24,17,30,31,16,153,31,1, +134,31,1,89,31,1,70,31,1,25,31,1,6,31,1,8,31,18,17,184,255,240,64,36,17,6, +33,1,6,33,38,33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230, +33,246,33,12,199,230,33,246,33,2,33,184,255,192,64,255,217,233,72,196,33, +1,166,33,182,33,2,132,33,1,6,33,38,33,54,33,70,33,102,33,118,33,6,6,33,38, +33,54,33,70,33,102,33,118,33,134,33,166,33,182,33,198,33,230,33,246,33,12, +6,33,22,33,38,33,70,33,86,33,102,33,134,33,166,33,198,33,230,33,246,33,11, +151,244,33,1,224,33,1,194,33,210,33,2,180,33,1,160,33,1,130,33,146,33,2,116, +33,1,96,33,1,66,33,82,33,2,52,33,1,32,33,1,2,33,18,33,2,228,33,244,33,2,194, +33,210,33,2,164,33,180,33,2,130,33,146,33,2,100,33,116,33,2,66,33,82,33,2, +36,33,52,33,2,2,33,18,33,2,228,33,244,33,2,194,33,210,33,2,164,33,180,33, +2,130,33,146,33,2,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2, +33,1,103,228,33,244,33,2,214,33,1,194,33,1,164,33,180,33,2,150,33,1,130,33, +1,100,33,116,33,2,86,33,1,66,33,1,36,33,52,33,2,22,33,1,2,33,1,228,33,244, +33,2,214,33,1,64,166,194,33,1,1,160,33,176,33,2,132,33,148,33,2,96,33,112, +33,2,68,33,84,33,2,32,33,48,33,2,4,33,20,33,2,224,33,240,33,2,196,33,212, +33,2,160,33,176,33,2,132,33,148,33,2,96,33,112,33,2,68,33,84,33,2,32,33,48, +33,2,4,33,20,33,2,55,224,33,1,196,33,212,33,2,160,33,1,132,33,148,33,2,96, +33,1,68,33,84,33,2,32,33,1,4,33,20,33,2,224,33,1,196,33,212,33,2,160,33,1, +132,33,148,33,2,96,33,1,2,0,33,32,33,48,33,80,33,4,80,33,128,33,144,33,192, +33,4,47,33,1,0,33,16,33,2,7,16,0,24,0,32,30,17,15,12,80,5,27,0,63,237,63, +51,17,51,51,17,51,1,94,93,93,93,113,95,113,113,113,113,113,114,114,114,114, +114,114,114,114,94,93,93,93,93,93,93,93,93,113,113,113,113,113,113,95,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93, +93,93,93,93,93,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114, +114,114,114,114,114,94,93,113,114,114,114,114,43,114,94,93,113,47,56,51,47, +94,93,93,93,93,93,93,56,51,18,57,57,61,47,24,47,17,51,51,49,48,43,95,93,93, +93,93,93,43,93,93,93,0,93,93,1,93,93,93,93,33,14,3,35,34,38,39,53,30,1,51, +50,54,63,1,1,51,19,30,3,23,62,3,55,19,51,2,92,38,79,98,120,78,34,58,32,19, +48,17,79,136,51,17,254,83,192,228,10,31,31,24,2,3,23,29,30,10,212,190,98, +157,111,59,4,7,135,3,3,118,129,43,4,53,253,170,27,90,90,72,9,11,65,80,82, +30,2,106,0,1,0,49,0,0,3,182,4,58,0,9,1,11,64,78,157,2,173,2,2,139,2,1,89, +2,105,2,2,146,7,162,7,2,116,7,132,7,2,70,7,86,7,102,7,3,40,8,1,3,8,2,123, +6,1,4,6,20,6,36,6,164,6,180,6,212,6,228,6,7,7,6,7,3,11,1,59,1,91,1,3,10,1, +64,39,55,72,1,64,17,20,72,1,11,184,255,192,64,40,92,100,72,192,11,1,180,11, +1,160,11,1,148,11,1,128,11,1,116,11,1,96,11,1,84,11,1,64,11,1,52,11,68,11, +100,11,132,11,4,11,184,255,192,64,32,73,82,72,32,11,1,20,11,1,0,11,1,63,68, +11,100,11,132,11,164,11,4,4,11,36,11,68,11,100,11,4,11,184,255,192,179,51, +62,72,11,184,255,192,64,18,31,39,72,224,11,1,2,0,11,32,11,80,11,112,11,4, +7,11,184,255,192,64,13,16,20,72,6,3,80,4,15,1,7,80,0,21,0,63,237,50,63,237, +50,1,43,94,93,95,93,43,43,113,114,94,93,93,93,43,93,113,113,113,113,113,113, +113,113,113,43,47,43,43,94,93,51,51,47,94,93,113,51,51,95,113,49,48,93,93, +93,93,93,93,51,53,1,33,53,33,21,1,33,21,49,2,149,253,147,3,56,253,106,2,187, +137,3,38,139,137,252,218,139,0,0,0,1,0,34,254,87,2,136,5,204,0,45,0,96,64, +65,3,32,9,12,72,19,32,9,13,72,23,45,33,28,40,240,17,11,31,5,63,5,2,143,5, +1,64,5,1,5,33,11,245,47,12,111,12,2,15,12,79,12,223,12,239,12,4,47,12,79, +12,111,12,3,12,12,0,24,245,21,0,43,245,0,27,0,63,237,63,237,18,57,47,93,113, +114,237,57,1,47,93,93,113,51,51,237,50,50,205,50,49,48,43,43,1,34,46,2,53, +17,52,46,2,39,53,62,3,53,17,52,54,59,1,21,35,34,6,21,17,20,14,2,7,21,30,3, +21,17,20,22,59,1,21,2,1,65,99,66,34,29,55,80,51,51,80,55,29,133,131,135,63, +91,77,30,52,71,41,43,71,51,29,77,91,63,254,87,41,76,108,68,1,105,63,88,56, +28,2,127,2,28,56,88,62,1,106,141,152,129,107,108,254,156,50,84,64,44,10,2, +10,44,65,84,51,254,155,106,109,129,0,1,0,183,254,78,1,93,5,204,0,3,1,207, +64,21,3,171,6,0,1,11,0,0,4,5,214,5,230,5,246,5,3,194,5,1,5,184,255,128,179, +226,229,72,5,184,255,192,64,10,222,225,72,2,5,18,5,2,218,5,184,255,128,179, +214,217,72,5,184,255,192,64,20,210,213,72,180,5,196,5,2,162,5,1,1,112,5,128, +5,144,5,3,5,184,255,192,64,20,199,202,72,0,5,1,240,5,1,212,5,228,5,2,176, +5,192,5,2,5,184,255,192,64,43,187,190,72,48,5,64,5,80,5,3,4,5,20,5,36,5,3, +240,5,1,196,5,212,5,228,5,3,128,5,144,5,160,5,3,4,5,20,5,36,5,3,164,5,184, +255,192,179,168,171,72,5,184,255,128,179,160,163,72,5,184,255,192,64,14,156, +159,72,112,5,128,5,144,5,3,228,5,1,5,184,255,192,64,11,145,148,72,176,5,192, +5,208,5,3,5,184,255,192,64,15,133,136,72,48,5,1,20,5,36,5,2,0,5,1,5,184,255, +192,64,15,122,125,72,128,5,1,4,5,20,5,36,5,3,110,5,184,255,192,64,10,114, +117,72,192,5,1,84,5,1,5,184,255,192,182,102,105,72,16,5,1,5,184,255,192,64, +9,91,94,72,80,5,96,5,2,5,184,255,192,64,15,79,82,72,203,5,219,5,2,160,5,176, +5,2,2,5,184,255,192,64,10,68,71,72,15,5,31,5,2,62,5,184,255,192,64,29,56, +61,72,207,5,1,96,5,112,5,160,5,176,5,4,31,5,1,0,5,1,160,5,224,5,240,5,3,5, +184,255,192,64,28,25,28,72,5,64,17,21,72,64,5,112,5,128,5,144,5,4,15,5,31, +5,47,5,3,7,1,0,0,0,47,63,1,94,93,93,43,43,113,114,114,114,114,43,94,93,43, +95,93,93,43,113,43,114,43,114,114,43,94,93,93,43,113,113,113,43,113,43,113, +114,43,43,43,94,93,93,93,93,113,113,43,113,113,113,114,43,114,95,114,114, +43,43,94,93,43,43,93,93,17,18,57,47,94,93,237,49,48,19,17,51,17,183,166,254, +78,7,126,248,130,0,0,0,0,1,0,34,254,87,2,135,5,204,0,45,0,98,185,0,40,255, +224,179,9,12,72,24,184,255,224,64,55,9,13,72,20,44,32,26,38,240,15,9,48,3, +1,192,3,208,3,2,3,9,32,245,47,31,111,31,2,15,31,79,31,223,31,239,31,4,47, +31,79,31,111,31,3,31,31,21,45,245,44,27,20,245,21,0,0,63,237,63,237,18,57, +47,93,113,114,237,57,1,47,93,113,51,51,253,50,50,205,50,49,48,43,43,19,50, +54,53,17,52,62,2,55,53,46,3,53,17,52,38,43,1,53,51,50,22,21,17,20,30,2,23, +21,14,3,21,17,20,14,2,43,1,53,94,91,79,28,51,71,43,42,70,52,29,79,91,60,132, +131,133,29,55,81,52,52,81,55,29,34,66,99,65,132,254,216,109,106,1,101,51, +84,65,44,10,2,10,44,64,84,50,1,100,108,107,129,152,141,254,150,62,88,56,28, +2,127,2,28,56,88,63,254,151,68,108,76,41,129,0,0,0,0,1,0,92,2,41,4,80,3,39, +0,32,0,154,64,26,90,3,138,3,2,25,2,41,2,57,2,3,30,48,10,16,72,13,31,1,25, +48,9,12,72,13,184,255,208,179,9,13,72,7,184,255,208,64,19,9,13,72,0,27,32, +27,112,27,3,27,32,10,1,10,24,173,64,10,184,255,192,180,38,60,72,10,0,184, +255,192,179,23,28,72,0,184,255,192,64,41,14,20,72,0,128,27,64,41,60,72,27, +5,173,31,14,79,14,159,14,3,111,14,127,14,159,14,175,14,207,14,239,14,255, +14,7,14,64,9,13,72,14,0,47,43,93,113,237,196,43,26,221,43,43,196,43,26,237, +1,47,93,47,93,49,48,0,43,43,43,93,43,93,93,1,34,38,39,38,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,76,69,145,73,129,88,38,65,60, +56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68,2,41, +44,26,45,12,23,32,21,143,38,46,13,20,26,13,8,15,14,8,50,42,149,23,30,19,8, +0,0,0,2,0,242,254,185,1,184,4,58,0,3,0,7,2,19,64,133,2,91,3,3,166,5,182,5, +2,5,150,105,6,185,6,2,70,6,86,6,2,57,6,1,6,64,23,27,72,182,6,198,6,2,73,6, +89,6,105,6,3,22,6,54,6,2,9,6,1,10,6,121,9,137,9,153,9,201,9,4,70,9,1,9,9, +57,9,2,249,9,1,182,9,1,105,9,121,9,169,9,3,38,9,1,9,9,1,204,217,9,233,9,2, +150,9,1,73,9,89,9,121,9,3,6,9,1,185,9,201,9,2,134,9,1,116,9,1,86,9,102,9, +2,68,9,1,22,9,38,9,54,9,3,9,184,255,192,64,14,168,171,72,180,9,1,134,9,150, +9,166,9,3,9,184,255,192,64,22,159,162,72,36,9,1,6,9,22,9,2,156,182,9,198, +9,214,9,246,9,4,9,184,255,64,64,14,147,150,72,102,9,1,150,9,166,9,182,9,3, +9,184,255,192,64,24,137,144,72,98,9,114,9,130,9,3,64,9,80,9,2,34,9,50,9,2, +16,9,1,9,184,255,64,182,117,124,72,128,9,1,9,184,255,64,64,10,110,115,72, +4,9,20,9,2,108,9,184,255,64,64,62,101,107,72,180,9,196,9,212,9,3,150,9,166, +9,2,132,9,1,118,9,1,82,9,98,9,2,36,9,52,9,68,9,3,6,9,22,9,2,246,9,1,194,9, +210,9,2,1,144,9,160,9,176,9,3,100,9,116,9,132,9,3,9,184,255,128,64,16,71, +75,72,212,9,228,9,244,9,3,160,9,176,9,2,9,184,255,192,64,61,59,64,72,16,9, +32,9,2,4,9,1,55,180,9,228,9,244,9,3,128,9,144,9,2,84,9,100,9,116,9,3,27,9, +1,0,9,1,240,9,1,196,9,212,9,228,9,3,84,9,100,9,164,9,212,9,228,9,244,9,6, +9,184,255,192,64,20,26,31,72,64,9,1,2,15,9,1,7,0,6,156,7,15,0,3,1,3,0,47, +93,63,253,206,1,94,93,95,93,43,93,113,113,114,114,114,114,114,94,93,93,43, +93,93,43,113,113,95,113,113,114,114,114,114,114,114,114,43,94,93,43,93,43, +113,113,113,113,43,113,114,43,114,94,93,93,43,93,93,43,113,113,113,113,113, +113,114,114,114,114,94,93,93,93,93,93,113,113,113,47,94,93,93,93,93,43,113, +113,113,237,113,51,47,237,49,48,1,51,19,35,19,21,35,53,1,10,148,24,196,198, +194,2,173,252,12,5,129,201,201,0,0,0,1,0,135,255,225,3,250,5,129,0,43,0,137, +64,31,88,14,104,14,2,87,20,103,20,2,26,28,1,21,6,1,6,3,1,25,10,22,0,11,1, +11,11,3,39,71,17,184,255,192,64,56,8,11,72,17,31,70,30,30,3,70,4,34,80,217, +31,1,124,31,140,31,2,25,31,1,31,22,96,25,112,25,2,160,25,1,25,23,3,12,213, +3,1,112,3,128,3,2,21,3,101,3,2,3,0,80,9,10,0,47,221,237,51,93,93,93,51,63, +221,93,113,50,50,93,93,93,237,1,47,237,51,47,237,47,43,237,18,57,47,113,51, +205,50,49,48,0,93,93,93,93,93,1,50,54,55,23,14,3,7,21,35,53,46,3,53,52,62, +2,55,53,51,21,30,3,23,7,46,1,35,34,14,2,21,20,30,2,2,84,96,129,15,182,8,51, +88,126,83,124,111,154,95,43,66,111,146,80,124,78,120,86,54,12,185,14,114, +105,77,103,64,27,27,64,105,1,21,104,108,12,62,116,92,62,8,168,168,10,93,149, +195,113,150,206,131,63,7,155,155,8,55,85,109,63,14,90,106,51,103,156,105, +93,156,113,62,0,0,1,0,58,0,0,4,80,5,150,0,50,0,210,64,83,70,23,1,54,2,70, +2,2,21,18,37,18,53,18,3,36,0,39,13,6,26,111,25,25,39,0,44,110,6,35,39,110, +14,95,10,1,10,10,0,79,6,95,6,111,6,3,6,50,111,0,0,32,0,2,0,0,32,0,48,0,80, +0,112,0,144,0,176,0,208,0,8,0,0,16,0,48,0,192,0,224,0,5,0,184,255,192,64, +64,14,18,72,0,38,11,81,35,15,14,31,14,175,14,3,15,14,63,14,111,14,127,14, +159,14,175,14,207,14,223,14,8,8,14,64,37,42,72,14,64,27,32,72,14,14,44,31, +115,26,20,7,7,44,116,22,50,118,50,134,50,3,50,6,24,0,63,51,93,237,50,63,51, +237,18,57,47,43,43,94,93,113,51,237,50,1,47,43,93,113,114,237,47,93,18,57, +47,113,51,237,50,16,237,17,18,57,47,237,17,51,17,18,57,49,48,0,93,1,93,0, +93,1,14,3,35,33,53,62,1,61,1,35,53,51,17,52,62,2,51,50,30,2,23,7,46,3,35, +34,6,21,17,33,21,33,21,20,14,2,7,33,50,62,2,55,4,80,9,57,89,115,67,253,70, +89,86,186,186,48,99,152,103,70,123,99,71,18,174,10,39,53,65,36,114,112,1, +152,254,104,22,44,63,40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160, +121,144,129,1,24,92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,254,224, +129,126,56,106,92,71,21,19,42,67,48,0,0,0,2,0,113,0,225,4,2,4,115,0,35,0, +55,0,153,64,119,74,29,90,29,106,29,3,44,29,60,29,2,74,25,90,25,106,25,3,44, +25,60,25,2,69,11,85,11,101,11,3,35,11,51,11,2,69,7,85,7,101,7,3,35,7,51,7, +2,74,34,90,34,106,34,3,45,34,61,34,2,69,20,85,20,101,20,3,35,20,51,20,2,69, +16,85,16,101,16,3,35,16,51,16,2,74,2,90,2,106,2,3,45,2,61,2,2,46,176,18,36, +176,207,0,223,0,2,0,0,1,0,47,57,1,41,176,27,51,176,9,0,47,237,220,237,1,93, +47,93,93,237,220,237,49,48,93,93,93,93,93,93,93,93,0,93,93,93,93,93,93,93, +93,19,52,54,55,39,55,23,62,1,51,50,22,23,55,23,7,30,1,21,20,6,7,23,7,39,14, +1,35,34,38,39,7,39,55,46,1,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,137, +41,37,100,104,99,54,127,73,71,126,54,97,104,96,37,43,44,38,100,102,101,54, +126,71,72,128,52,105,102,102,37,41,154,44,77,102,58,57,102,77,44,44,77,102, +57,58,102,77,44,2,172,71,127,54,100,103,101,39,43,42,38,97,105,96,54,127, +71,71,128,53,100,105,101,37,41,42,38,105,105,102,54,127,73,58,102,76,44,44, +76,102,58,58,102,76,45,45,76,102,0,1,255,254,0,0,4,118,5,129,0,22,0,185,64, +134,151,0,167,0,2,152,17,168,17,2,73,22,1,70,18,1,155,21,171,21,2,74,21,106, +21,122,21,138,21,4,148,19,164,19,2,69,19,101,19,117,19,133,19,4,19,15,18, +31,18,79,18,143,18,4,18,9,21,0,22,16,22,64,22,128,22,4,22,20,4,0,8,92,17, +13,0,9,16,9,64,9,128,9,4,7,9,3,15,81,16,7,11,81,4,47,12,159,12,175,12,3,12, +64,41,45,72,0,12,16,12,32,12,160,12,4,12,20,0,0,16,1,15,16,175,16,2,8,16, +16,8,21,18,3,8,18,0,63,63,51,18,57,47,94,93,113,51,51,222,93,43,113,50,237, +50,16,237,50,1,47,94,93,51,51,253,50,50,57,204,93,50,16,204,93,50,49,48,93, +93,93,93,93,93,93,93,1,33,21,33,21,33,21,33,17,35,17,33,53,33,55,33,53,33, +1,51,9,1,51,2,208,1,65,254,129,1,127,254,129,178,254,131,1,125,2,254,129, +1,64,254,91,199,1,115,1,119,199,2,197,125,154,127,254,209,1,47,127,154,125, +2,188,253,121,2,135,0,2,0,183,254,78,1,93,5,204,0,3,0,7,1,221,64,23,3,7,171, +0,6,4,1,11,4,4,8,9,214,9,230,9,246,9,3,194,9,1,9,184,255,128,179,226,229, +72,9,184,255,192,64,10,222,225,72,2,9,18,9,2,218,9,184,255,128,179,214,217, +72,9,184,255,192,64,20,210,213,72,180,9,196,9,2,162,9,1,1,112,9,128,9,144, +9,3,9,184,255,192,64,20,199,202,72,0,9,1,240,9,1,212,9,228,9,2,176,9,192, +9,2,9,184,255,192,64,43,187,190,72,48,9,64,9,80,9,3,4,9,20,9,36,9,3,240,9, +1,196,9,212,9,228,9,3,128,9,144,9,160,9,3,4,9,20,9,36,9,3,164,9,184,255,192, +179,168,171,72,9,184,255,128,179,160,163,72,9,184,255,192,64,14,156,159,72, +112,9,128,9,144,9,3,228,9,1,9,184,255,192,64,11,145,148,72,176,9,192,9,208, +9,3,9,184,255,192,64,15,133,136,72,48,9,1,20,9,36,9,2,0,9,1,9,184,255,192, +64,15,122,125,72,128,9,1,4,9,20,9,36,9,3,110,9,184,255,192,64,10,114,117, +72,192,9,1,84,9,1,9,184,255,192,182,102,105,72,16,9,1,9,184,255,192,64,9, +91,94,72,80,9,96,9,2,9,184,255,192,64,15,79,82,72,203,9,219,9,2,160,9,176, +9,2,2,9,184,255,192,64,10,68,71,72,15,9,31,9,2,62,9,184,255,192,64,29,56, +61,72,207,9,1,96,9,112,9,160,9,176,9,4,31,9,1,0,9,1,160,9,224,9,240,9,3,9, +184,255,192,64,33,25,28,72,9,64,17,21,72,64,9,112,9,128,9,144,9,4,15,9,31, +9,47,9,3,7,5,0,5,0,1,4,1,0,0,63,47,18,57,57,47,47,1,94,93,93,43,43,113,114, +114,114,114,43,94,93,43,95,93,93,43,113,43,114,43,114,114,43,94,93,93,43, +113,113,113,43,113,43,113,114,43,43,43,94,93,93,93,93,113,113,43,113,113, +113,114,43,114,95,114,114,43,43,94,93,43,43,93,93,17,18,57,47,94,93,51,237, +50,49,48,19,17,51,17,3,17,51,17,183,166,166,166,2,194,3,10,252,246,251,140, +3,11,252,245,0,0,0,0,2,0,115,255,84,4,0,5,204,0,77,0,97,1,79,64,144,117,47, +133,47,2,122,8,138,8,2,100,85,1,43,85,107,85,2,45,81,109,81,2,45,57,109,57, +125,57,141,57,4,85,96,117,96,133,96,3,83,62,115,62,131,62,3,83,90,115,90, +131,90,3,121,80,137,80,2,111,80,1,90,80,1,45,80,1,116,16,132,16,2,54,16,70, +16,2,42,73,1,37,42,1,37,45,1,43,3,1,25,3,1,5,31,21,31,2,5,36,21,36,2,11,76, +27,76,2,14,73,75,34,73,55,144,75,1,75,55,75,55,78,70,29,65,24,6,73,5,5,24, +73,160,78,1,0,78,32,78,64,78,144,78,4,78,184,255,192,179,29,33,72,78,184, +255,192,64,18,21,26,72,78,45,73,44,44,88,73,0,65,32,65,176,65,3,65,184,255, +192,64,68,34,38,72,65,217,55,1,203,55,1,188,55,1,152,55,1,245,3,1,230,3,1, +149,3,1,121,83,1,106,83,1,218,83,1,155,83,1,228,14,244,14,2,166,14,1,119, +14,135,14,2,104,14,1,14,83,93,55,4,0,50,81,45,39,11,81,6,0,0,0,63,50,237, +47,51,237,18,23,57,93,93,93,93,93,93,113,113,93,93,93,93,93,93,93,1,47,43, +93,237,51,47,237,47,43,43,93,113,237,50,16,237,17,18,57,57,17,57,57,47,47, +114,16,237,16,237,49,48,93,93,93,93,93,0,93,93,1,93,0,93,93,93,93,93,93,93, +93,93,93,93,93,1,93,93,93,1,50,30,2,23,7,46,3,35,34,6,21,20,30,2,23,30,3, +21,20,14,2,7,30,3,21,20,14,2,35,34,46,2,39,55,30,3,51,50,62,2,53,52,46,2, +39,46,3,53,52,62,2,55,46,3,53,52,54,1,52,46,2,39,14,3,21,20,30,2,23,62,3, +2,76,79,138,108,73,15,161,8,46,68,84,46,125,129,50,83,109,59,68,139,112,70, +28,55,82,54,49,79,55,30,58,112,164,107,93,154,117,79,19,161,12,54,78,100, +57,58,102,76,45,57,95,123,65,65,131,104,65,32,59,84,53,42,75,57,33,211,1, +225,53,88,113,61,58,89,60,31,49,82,108,60,54,93,68,39,5,204,30,63,98,69,20, +45,58,34,13,79,71,45,64,46,32,14,16,46,73,106,76,45,87,73,55,13,21,51,64, +81,51,73,117,83,44,27,64,104,77,31,55,67,37,13,18,40,65,47,54,72,51,36,16, +15,46,73,105,74,45,83,71,53,15,14,46,64,80,48,139,155,252,203,48,69,51,35, +14,3,33,52,69,39,46,66,48,34,15,1,24,47,70,0,0,0,0,2,0,45,4,195,2,90,5,123, +0,3,0,7,0,193,178,3,133,0,184,255,192,179,19,22,72,0,184,255,192,64,131,13, +16,72,0,7,133,4,64,19,22,72,4,64,14,17,72,4,1,5,145,0,59,4,1,45,4,1,11,4, +27,4,2,57,253,4,1,235,4,1,219,4,1,201,4,1,171,4,187,4,2,153,4,1,141,4,1,1, +4,128,44,48,72,27,4,43,4,2,15,4,1,235,4,251,4,2,191,4,207,4,223,4,3,171,4, +1,159,4,1,123,4,139,4,2,111,4,1,91,4,1,79,4,1,59,4,1,31,4,47,4,2,2,15,4,63, +4,175,4,191,4,4,4,64,22,25,72,4,64,14,17,72,4,0,47,43,43,93,95,113,113,113, +113,113,113,113,113,113,113,114,114,43,95,114,114,114,114,114,114,114,94, +93,93,93,51,237,50,1,47,43,43,237,220,43,43,237,49,48,1,53,51,21,33,53,51, +21,1,183,163,253,211,165,4,195,184,184,184,184,0,0,0,0,3,0,31,255,240,5,197, +5,150,0,25,0,49,0,91,0,245,64,111,138,81,1,10,73,26,73,42,73,3,10,69,26,69, +42,69,3,76,60,1,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,138, +90,154,90,2,53,81,69,81,2,58,61,1,133,52,149,52,2,54,46,70,46,2,54,41,70, +41,2,57,35,73,35,2,57,30,73,30,2,50,196,81,61,95,71,111,71,2,71,61,71,61, +14,0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,68, +15,23,72,26,38,195,111,14,127,14,2,14,60,55,201,66,87,201,76,82,76,15,66, +127,66,2,15,66,31,66,127,66,143,66,159,66,255,66,6,0,76,1,0,76,16,76,112, +76,128,76,144,76,240,76,6,66,76,66,76,7,33,200,21,4,43,200,7,19,0,63,237, +63,237,18,57,57,47,47,93,113,93,113,17,51,16,237,16,237,51,1,47,113,237,47, +43,93,113,237,17,57,57,47,47,93,17,51,237,49,48,0,93,93,93,93,93,93,93,93, +1,93,93,93,93,113,93,93,113,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18, +7,52,46,4,35,34,14,2,21,20,30,2,51,50,62,4,37,20,30,2,51,50,62,2,55,23,14, +3,35,34,46,2,53,52,62,2,51,50,30,2,23,7,46,3,35,34,14,2,5,197,52,94,131,161, +185,100,99,185,160,133,94,52,52,94,132,161,184,100,150,1,7,197,113,92,45, +82,116,140,161,87,130,228,171,99,99,171,228,130,87,161,140,116,82,45,252, +137,33,67,100,67,49,75,56,39,14,115,22,58,82,111,75,101,149,98,48,48,97,146, +98,75,112,80,55,18,114,12,38,55,72,47,69,99,64,30,2,195,100,185,161,131,94, +52,52,94,131,161,185,100,100,184,161,132,94,52,114,196,254,249,150,86,161, +139,115,82,45,99,171,228,130,131,229,171,98,45,81,115,140,161,89,72,120,86, +48,27,45,55,29,35,43,81,63,38,64,114,158,94,97,157,111,59,36,59,75,39,33, +26,50,38,23,46,83,118,0,2,0,26,2,139,2,253,5,152,0,50,0,65,0,203,64,21,45, +40,10,17,72,46,40,10,17,72,3,40,11,17,72,7,24,11,14,72,29,184,255,216,64, +16,9,17,72,23,51,1,39,39,32,226,47,11,212,56,1,56,184,255,192,64,18,19,22, +72,144,56,1,100,56,116,56,132,56,3,80,56,1,2,56,184,255,192,64,20,10,13,72, +56,20,227,21,21,63,227,5,64,22,38,72,5,192,67,1,67,184,255,192,64,51,13,18, +72,26,57,1,11,57,1,57,228,152,20,1,20,8,10,13,72,20,16,11,1,2,11,1,11,11, +26,35,7,51,1,51,228,0,42,42,0,0,32,0,80,0,3,0,0,17,228,26,222,0,63,237,51, +47,93,51,47,16,237,93,50,17,57,47,93,93,51,43,93,237,93,93,1,43,93,47,43, +237,51,47,237,47,43,95,93,93,93,43,113,51,51,237,50,47,0,93,49,48,1,43,43, +43,43,43,1,34,46,2,53,52,62,2,63,1,53,52,46,2,35,34,6,7,39,62,3,51,50,30, +2,21,17,20,22,51,50,54,55,21,14,1,35,34,46,2,39,35,14,1,39,50,62,2,61,1,7, +14,3,21,20,22,1,4,53,86,62,33,51,86,113,62,178,21,39,56,35,67,81,9,149,7, +43,75,108,71,68,109,77,42,28,35,12,22,9,19,42,22,41,57,38,20,2,4,38,132,51, +48,80,57,32,138,41,74,55,32,58,2,139,29,56,82,52,69,92,56,24,1,4,60,46,60, +35,14,59,76,10,47,82,62,35,29,60,95,66,254,204,58,50,5,3,104,5,8,22,39,51, +29,77,70,111,34,55,71,37,65,4,2,11,29,52,43,56,65,0,0,2,0,83,0,141,4,32,3, +172,0,8,0,17,0,113,64,84,106,12,122,12,138,12,3,106,9,122,9,138,9,3,106,3, +122,3,138,3,3,106,0,122,0,138,0,3,17,236,15,235,14,236,95,10,127,10,143,10, +3,64,10,96,10,2,31,10,1,10,7,236,6,235,5,236,176,1,1,95,1,1,32,1,96,1,128, +1,3,1,9,0,239,12,15,3,47,3,111,3,127,3,4,3,0,47,93,51,228,50,1,47,93,113, +113,237,237,237,47,93,93,113,237,237,237,49,48,93,93,93,93,37,1,53,1,51,21, +9,1,21,33,1,53,1,51,21,9,1,21,3,118,254,174,1,82,168,254,174,1,84,253,131, +254,176,1,80,167,254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,1, +109,63,1,115,31,254,140,254,145,29,0,1,0,100,0,180,4,71,2,242,0,5,0,51,64, +19,223,2,1,32,2,1,2,5,170,224,0,1,159,0,1,80,0,1,0,184,255,192,64,9,9,12, +72,0,2,173,0,3,179,0,63,204,237,1,47,43,93,93,93,237,47,93,93,49,48,37,17, +33,53,33,17,3,182,252,174,3,227,180,1,172,146,253,194,0,0,4,0,31,255,240, +5,197,5,150,0,25,0,49,0,63,0,72,0,240,183,4,61,20,61,36,61,3,58,184,255,224, +64,94,11,16,72,57,47,73,47,2,54,40,70,40,2,54,36,70,36,2,57,29,73,29,2,61, +32,9,13,72,54,46,70,46,2,54,41,70,41,2,57,35,73,35,2,57,30,73,30,2,6,69,22, +69,2,51,62,62,69,63,69,53,196,54,64,196,59,59,50,63,63,16,54,63,54,63,14, +0,195,0,26,16,26,48,26,64,26,4,16,26,32,26,64,26,3,26,184,255,192,64,60,15, +23,72,26,38,195,111,14,127,14,2,14,50,50,54,62,52,201,69,9,68,25,68,2,68, +201,55,15,54,31,54,127,54,3,223,55,1,0,55,16,55,112,55,3,54,69,55,55,69,54, +3,7,33,200,21,4,43,200,7,19,0,63,237,63,237,18,23,57,47,47,47,93,113,93,16, +237,93,16,237,50,17,51,47,1,47,113,237,47,43,93,113,237,17,57,57,47,47,56, +17,51,51,47,237,16,237,50,17,18,57,17,51,0,93,49,48,93,93,93,93,43,1,93,93, +93,93,43,93,1,20,14,4,35,34,46,4,53,52,62,4,51,50,4,22,18,7,52,46,4,35,34, +14,2,21,20,30,2,51,50,62,4,1,3,35,17,35,17,33,50,22,21,20,6,7,19,3,52,38, +43,1,17,51,50,54,5,197,52,94,131,161,185,100,99,185,160,133,94,52,52,94,132, +161,184,100,150,1,7,197,113,92,45,82,116,140,161,87,130,228,171,99,99,171, +228,130,87,161,140,116,82,45,254,82,199,161,127,1,51,142,151,104,85,221,159, +95,81,170,182,80,84,2,195,100,185,161,131,94,52,52,94,131,161,185,100,100, +184,161,132,94,52,114,196,254,249,150,86,161,139,115,82,45,99,171,228,130, +131,229,171,98,45,81,115,140,161,254,181,1,80,254,176,3,63,126,111,102,123, +19,254,162,2,80,69,72,254,211,85,0,0,1,255,239,5,172,4,124,6,10,0,3,0,14, +180,1,0,2,140,1,0,47,237,1,47,47,49,48,1,33,53,33,4,124,251,115,4,141,5,172, +94,0,0,0,0,2,0,122,3,92,2,184,5,150,0,19,0,39,0,66,185,0,17,255,232,179,9, +12,72,13,184,255,232,64,33,9,12,72,7,24,9,12,72,3,24,9,12,72,20,172,0,30, +172,0,10,16,10,32,10,3,10,35,175,5,25,175,15,4,0,63,237,220,237,1,47,93,237, +220,237,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7, +52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,184,45,78,105,59,59,104,78,46, +46,78,104,59,59,105,78,45,109,27,48,65,38,37,65,48,28,28,48,65,37,38,65,48, +27,4,121,59,104,77,45,45,77,104,59,60,104,77,44,44,77,104,60,37,66,49,28, +28,49,66,37,37,65,49,29,29,49,65,0,0,0,2,0,65,0,0,4,36,4,195,0,11,0,15,0, +85,64,53,13,222,4,1,140,4,1,4,2,14,209,11,1,131,11,1,11,9,1,170,6,32,2,1, +2,13,173,12,151,2,1,2,0,4,173,9,152,7,1,7,239,5,1,80,5,128,5,160,5,208,5, +4,5,0,47,93,93,51,93,51,237,50,50,93,47,237,1,47,93,51,253,50,222,93,93,196, +16,222,93,93,196,49,48,1,17,35,17,33,53,33,17,51,17,33,21,1,53,33,21,2,124, +147,254,88,1,168,147,1,168,252,29,3,227,2,168,254,117,1,139,145,1,138,254, +118,145,253,88,145,145,0,0,1,0,41,2,51,2,131,5,141,0,34,0,142,64,56,6,18, +1,6,17,1,6,12,1,106,31,122,31,138,31,3,89,15,105,15,2,106,14,1,73,14,89,14, +2,10,3,26,3,2,10,2,26,2,58,2,74,2,4,58,17,90,17,106,17,3,6,23,22,23,2,23, +184,255,224,64,40,9,15,72,33,25,225,32,8,1,32,8,96,8,160,8,224,8,4,8,14,224, +15,15,32,191,0,1,0,8,32,14,11,228,20,222,1,32,229,0,223,0,63,237,50,63,237, +51,18,57,1,47,93,51,51,47,237,47,93,113,237,50,49,48,43,0,93,93,1,93,93,0, +93,93,93,93,1,113,113,113,19,39,62,5,53,52,38,35,34,6,7,39,62,3,51,50,30, +2,21,20,14,4,7,33,21,43,2,27,88,100,103,82,52,71,74,68,88,8,133,6,46,76,107, +68,65,103,71,37,54,83,102,95,78,18,1,187,2,51,103,61,96,81,72,73,80,49,62, +75,73,68,8,51,87,64,37,33,60,86,54,62,100,86,75,73,74,42,113,0,0,1,0,27,2, +39,2,130,5,141,0,53,0,150,64,17,102,6,1,102,8,1,86,9,102,9,2,89,34,105,34, +2,42,184,255,232,64,80,11,15,72,2,32,9,13,72,48,45,21,21,15,8,28,225,45,45, +0,225,32,15,96,15,2,32,15,96,15,160,15,224,15,4,15,34,225,8,35,1,35,35,9, +225,191,8,1,8,64,24,37,72,8,49,21,228,22,22,12,105,34,1,72,34,88,34,2,34, +31,228,40,222,12,228,71,9,1,9,3,221,0,63,51,93,237,63,237,51,93,93,18,57, +47,237,57,1,47,43,93,237,51,47,113,237,47,93,113,237,50,47,237,17,18,57,47, +18,57,49,48,0,43,43,93,93,93,93,1,20,6,35,34,46,2,39,55,30,1,51,50,54,53, +52,46,2,43,1,53,51,50,62,2,53,52,38,35,34,6,7,39,62,3,51,50,30,2,21,20,6, +7,21,30,3,2,130,155,142,87,116,73,36,6,136,9,88,85,77,83,37,56,67,29,61,57, +29,61,50,32,74,71,68,84,6,135,7,50,79,102,59,69,104,70,35,86,90,52,75,48, +22,3,27,116,128,39,64,81,43,13,67,69,72,76,45,54,29,9,109,13,31,53,40,60, +69,70,65,12,58,86,57,28,33,59,79,46,75,110,20,2,5,37,54,69,0,0,1,0,72,4,177, +1,240,5,228,0,5,0,55,64,37,70,4,1,122,2,138,2,2,128,3,1,3,64,143,0,1,0,64, +9,13,72,0,2,149,128,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,26,237,1,47,43, +93,26,205,93,49,48,93,93,19,53,19,51,21,1,72,217,207,254,182,4,177,20,1,31, +29,254,234,0,1,0,140,254,87,4,109,4,58,0,39,0,136,64,74,29,32,9,17,72,138, +37,154,37,2,108,37,124,37,2,37,24,14,17,72,22,22,13,70,64,31,79,12,1,127, +12,143,12,159,12,3,12,64,32,35,72,12,64,20,23,72,0,12,1,12,41,128,39,2,70, +0,1,16,1,48,1,224,1,240,1,5,8,1,96,41,128,41,2,41,184,255,192,64,17,20,23, +72,31,8,80,35,22,19,80,26,22,12,1,15,0,27,0,63,63,51,63,237,63,237,50,1,43, +93,47,94,93,237,50,26,16,220,93,43,43,93,113,50,26,237,50,47,49,48,43,0,93, +93,1,43,19,17,51,17,20,30,2,51,50,54,53,17,51,17,20,30,2,51,50,54,55,21,14, +1,35,34,46,2,39,35,14,1,35,34,38,39,17,140,181,32,58,84,52,128,146,180,11, +20,29,18,11,32,11,26,51,36,54,71,44,20,2,3,52,147,100,67,109,31,254,87,5, +227,253,82,78,106,65,28,174,162,2,115,252,208,44,56,32,13,5,3,129,8,12,30, +52,71,41,95,99,41,38,254,28,0,0,0,0,1,0,80,254,248,3,245,5,129,0,19,0,61, +64,39,12,1,15,2,191,2,207,2,3,2,5,95,6,111,6,127,6,175,6,191,6,5,0,6,16,6, +48,6,3,6,7,7,1,0,4,17,3,6,1,0,47,51,63,205,50,18,57,47,1,47,93,93,205,220, +93,205,47,49,48,1,17,35,17,35,17,35,17,34,46,2,53,52,62,2,51,33,21,3,116, +112,217,113,80,133,96,53,50,95,138,87,2,51,5,27,249,221,6,35,249,221,3,190, +45,88,133,89,84,133,93,50,102,0,0,1,0,187,1,190,1,126,2,154,0,3,0,38,64,24, +3,150,0,0,16,0,176,0,3,7,0,0,155,15,1,31,1,2,1,64,15,38,72,1,0,47,43,93,237, +1,47,94,93,237,49,48,19,53,51,21,187,195,1,190,220,220,0,0,0,1,0,119,254, +78,1,227,0,0,0,27,0,126,64,16,24,32,20,23,72,25,32,20,23,72,70,26,86,26,2, +2,184,255,232,179,9,17,72,27,184,255,224,64,62,9,17,72,24,16,25,32,25,48, +25,3,25,131,23,22,22,8,16,131,47,0,1,31,0,1,15,0,111,0,2,8,0,239,8,1,8,19, +25,64,9,13,72,25,25,5,23,11,140,32,5,80,5,96,5,112,5,176,5,192,5,6,5,0,47, +93,237,47,18,57,47,43,205,1,47,93,221,94,93,113,114,237,18,57,47,51,237,93, +50,49,48,43,43,93,43,43,5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35, +42,1,7,55,51,7,30,1,1,227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14, +29,14,65,107,39,94,94,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,182,100, +3,81,0,0,1,0,80,2,51,2,125,5,129,0,10,0,75,64,44,32,5,48,5,2,96,9,1,9,9,8, +224,2,32,4,48,4,2,4,111,0,1,0,0,4,6,3,32,2,144,2,2,2,5,4,4,3,6,220,8,1,228, +0,223,0,63,237,50,63,51,51,47,51,1,47,93,23,51,47,93,47,0,93,1,16,237,50, +47,93,49,48,0,93,19,53,51,17,7,53,55,51,17,51,21,80,211,202,210,123,215,2, +51,107,2,108,138,120,137,253,29,107,0,0,0,0,2,0,27,2,139,2,211,5,152,0,15, +0,35,0,130,185,0,13,255,232,179,7,12,72,9,184,255,224,64,43,7,12,72,4,32, +7,12,72,2,32,7,12,72,0,227,4,16,36,16,52,16,100,16,4,148,16,180,16,196,16, +212,16,244,16,5,128,16,1,2,0,16,1,16,184,255,192,64,38,12,16,72,16,26,227, +6,64,22,33,72,6,239,37,1,112,37,128,37,2,47,37,1,31,228,0,3,32,3,80,3,3,3, +3,21,228,11,222,0,63,237,51,47,93,237,1,93,93,93,47,43,237,47,43,93,95,93, +93,113,237,49,48,0,43,43,43,43,1,20,6,35,34,38,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,211,176,175,168,177,43,87,131,88, +93,131,84,39,149,25,50,72,48,48,75,51,26,28,51,70,43,49,75,52,27,4,18,188, +203,201,190,91,145,101,53,53,100,145,92,83,110,65,27,27,66,110,82,84,110, +66,26,26,66,110,0,2,0,83,0,141,4,32,3,172,0,8,0,17,0,133,64,100,101,15,117, +15,133,15,3,101,9,117,9,133,9,3,101,6,117,6,133,6,3,101,0,117,0,133,0,3,13, +236,10,236,17,235,15,12,1,239,12,1,112,12,128,12,2,208,12,1,63,12,111,12, +127,12,3,0,12,1,12,4,236,1,236,8,235,112,3,128,3,176,3,3,176,3,208,3,2,63, +3,1,0,3,32,3,2,3,10,0,239,14,15,5,47,5,111,5,127,5,4,5,0,47,93,51,228,50, +1,47,93,93,93,113,253,237,237,47,93,93,93,113,113,114,253,237,237,49,48,93, +93,93,93,37,35,53,9,1,53,51,1,21,1,35,53,9,1,53,51,1,21,2,206,168,1,82,254, +176,166,1,82,252,221,170,1,82,254,176,168,1,79,141,29,1,111,1,116,31,254, +141,63,254,147,29,1,111,1,116,31,254,141,63,255,255,0,56,0,0,6,78,5,129,16, +38,0,121,232,0,16,39,2,20,2,249,0,0,17,7,2,141,3,184,253,207,0,31,64,18,1, +191,12,1,112,12,1,96,12,1,16,12,1,12,3,2,17,24,0,63,53,53,1,17,93,93,93,93, +53,0,0,0,255,255,0,56,0,0,6,117,5,129,16,38,0,121,232,0,16,39,2,20,2,249, +0,0,17,7,0,114,3,242,253,207,0,47,64,30,2,111,15,1,47,15,1,15,1,191,12,1, +112,12,1,96,12,1,16,12,1,12,51,64,11,11,72,2,15,24,0,63,53,1,43,17,93,93, +93,93,53,17,93,93,53,0,0,0,255,255,0,73,0,0,6,78,5,141,16,39,2,20,3,13,0, +0,16,39,2,141,3,184,253,207,17,6,0,115,46,0,0,33,64,20,0,112,0,1,96,0,1,16, +0,1,0,83,64,11,11,72,1,2,6,24,0,63,53,53,1,43,17,93,93,93,53,0,0,2,0,131, +254,164,4,86,4,58,0,37,0,41,0,159,64,112,121,4,137,4,2,122,35,138,35,2,122, +36,138,36,2,84,26,100,26,2,58,6,74,6,122,6,138,6,4,10,72,9,9,176,39,192,39, +2,39,150,40,40,0,28,70,95,27,127,27,2,27,64,29,60,72,27,64,23,27,72,32,27, +1,27,19,70,0,64,29,60,72,0,64,23,27,72,0,64,13,17,72,32,0,1,0,32,43,1,19, +33,9,40,156,41,15,67,27,1,27,24,95,47,33,63,33,2,111,33,207,33,2,33,0,47, +93,113,237,51,93,63,253,206,17,57,1,93,47,93,43,43,43,237,47,93,43,43,93, +237,18,57,47,237,113,51,47,237,49,48,93,0,93,1,93,0,93,1,93,55,52,62,6,55, +51,14,7,21,20,30,2,51,50,54,55,23,14,3,35,34,46,2,1,21,35,53,131,37,62,79, +82,79,63,39,1,175,2,39,62,78,80,77,60,37,42,77,109,67,140,164,14,184,11,67, +121,179,122,114,178,123,64,2,113,195,50,71,108,85,67,60,58,68,83,55,69,104, +80,63,57,57,70,88,59,59,92,63,32,140,122,12,84,149,112,65,56,103,147,4,100, +201,201,0,0,0,255,255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,148,1,78,0, +0,0,21,180,2,21,5,38,2,184,255,225,180,22,25,4,7,37,1,43,53,0,43,53,0,255, +255,0,4,0,0,5,82,6,240,18,38,0,36,0,0,17,7,2,149,1,219,0,0,0,19,64,11,2,21, +5,38,2,76,21,24,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,6,254,18, +38,0,36,0,0,17,7,2,150,1,96,0,0,0,19,64,11,2,22,5,38,2,0,27,21,4,7,37,1,43, +53,0,43,53,0,0,0,255,255,0,4,0,0,5,82,7,6,18,38,0,36,0,0,17,7,2,153,1,94, +0,0,0,19,64,11,2,21,5,38,2,2,30,44,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0, +4,0,0,5,82,6,178,18,38,0,36,0,0,17,7,2,152,1,108,0,0,0,23,64,13,3,2,21,5, +38,3,2,4,25,23,4,7,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,4,0,0,5,82,6, +251,18,38,0,36,0,0,17,7,1,76,1,137,0,136,0,22,64,12,3,2,56,3,3,2,3,31,21, +4,7,37,1,43,53,53,0,63,53,53,0,2,0,24,0,0,7,168,5,129,0,15,0,26,0,136,64, +86,116,25,1,114,2,1,86,2,102,2,2,115,3,131,3,2,85,3,101,3,2,127,5,143,5,2, +109,5,1,92,5,1,25,5,41,5,2,0,7,1,11,7,11,7,0,16,14,32,14,2,14,2,25,3,17,3, +4,17,9,13,90,26,5,0,2,95,25,25,5,4,12,95,9,9,13,16,8,95,5,3,4,18,13,95,0, +18,0,63,237,63,63,237,50,18,57,47,237,17,18,57,47,237,1,47,51,51,237,50,51, +47,51,17,18,57,57,47,93,18,57,57,47,47,113,49,48,93,93,93,93,93,93,93,93, +93,33,17,33,3,35,1,33,21,33,17,33,21,33,17,33,21,1,35,14,5,7,3,33,3,201,253, +220,198,199,2,174,4,185,253,9,2,187,253,69,3,32,252,33,151,1,16,22,27,24, +18,2,217,1,222,1,156,254,100,5,129,156,254,60,154,254,21,156,4,238,3,35,50, +58,51,38,5,254,51,0,0,255,255,0,104,254,78,5,121,5,150,18,38,0,38,0,0,17, +7,0,120,1,254,0,0,0,11,182,1,58,48,40,26,16,37,1,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,240,18,38,0,40,0,0,17,7,2,148,1,63,0,0,0,21,180,1,12,5,38,1,184, +255,170,180,13,16,0,10,37,1,43,53,0,43,53,0,255,255,0,168,0,0,4,254,6,240, +18,38,0,40,0,0,17,7,2,149,1,223,0,0,0,19,64,11,1,12,5,38,1,40,12,15,0,10, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40,0,0,17, +7,2,150,1,119,0,0,0,21,180,1,13,5,38,1,184,255,239,180,18,12,0,10,37,1,43, +53,0,43,53,0,255,255,0,168,0,0,4,254,6,178,18,38,0,40,0,0,17,7,2,152,1,121, +0,0,0,25,182,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10,37,1,43,53,53,0,43, +53,53,0,255,255,0,9,0,0,1,177,6,240,18,38,0,44,0,0,17,6,2,148,159,0,0,21, +180,1,4,5,38,1,184,255,193,180,5,8,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0, +142,0,0,2,54,6,240,18,38,0,44,0,0,17,6,2,149,70,0,0,19,64,11,1,4,5,38,1,69, +4,7,0,2,37,1,43,53,0,43,53,0,255,255,255,210,0,0,2,104,6,254,18,38,0,44,0, +0,17,6,2,150,210,0,0,19,64,11,1,5,5,38,1,0,10,4,0,2,37,1,43,53,0,43,53,0, +255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218,0,0,23,64,13,2,1, +4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,2,0,14,0,0,5,101,5,129, +0,16,0,33,0,112,64,69,117,10,1,91,32,139,32,2,91,31,139,31,2,90,20,138,20, +2,91,19,1,10,31,26,31,2,10,20,26,20,2,26,26,28,8,90,64,15,17,1,17,35,128, +24,28,90,14,16,16,1,14,27,16,95,24,127,0,1,0,0,2,28,95,14,18,23,95,2,3,0, +63,237,63,237,17,57,47,113,51,237,50,1,47,51,51,47,16,237,50,26,16,220,113, +26,237,18,57,47,49,48,93,93,93,0,93,1,93,93,0,93,19,51,17,33,50,4,22,18,21, +20,2,14,1,35,33,17,35,37,52,46,2,35,33,17,33,21,33,17,33,50,62,2,14,154,1, +210,163,1,19,198,111,106,184,251,145,253,241,154,4,151,82,148,206,123,254, +241,1,150,254,106,1,58,111,189,138,78,3,33,2,96,81,169,254,252,180,176,254, +243,181,93,2,135,72,143,203,130,61,254,57,154,254,18,72,142,212,0,255,255, +0,168,0,0,5,32,7,6,18,38,0,49,0,0,17,7,2,153,1,161,0,0,0,19,64,11,1,20,5, +38,1,12,29,43,8,18,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +240,18,38,0,50,0,0,17,7,2,148,1,182,0,0,0,21,180,2,40,5,38,2,184,255,216, +180,41,44,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255,236,5,215,6,240,18,38, +0,50,0,0,17,7,2,149,2,37,0,0,0,19,64,11,2,40,5,38,2,37,40,43,10,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6,254,18,38,0,50,0,0,17,7,2,150, +1,213,0,0,0,19,64,11,2,41,5,38,2,4,46,40,10,0,37,1,43,53,0,43,53,0,0,0,255, +255,0,97,255,236,5,215,7,6,18,38,0,50,0,0,17,7,2,153,1,193,0,0,0,21,180,2, +40,5,38,2,184,255,245,180,49,63,10,0,37,1,43,53,0,43,53,0,255,255,0,97,255, +236,5,215,6,178,18,38,0,50,0,0,17,7,2,152,1,215,0,0,0,25,182,3,2,40,5,38, +3,2,184,255,255,180,44,42,10,0,37,1,43,53,53,0,43,53,53,0,0,1,0,142,0,225, +4,31,4,115,0,11,0,129,185,0,5,255,232,179,18,22,72,3,184,255,232,64,14,18, +22,72,11,24,18,22,72,9,24,18,22,72,8,184,255,232,179,18,22,72,6,184,255,232, +64,14,18,22,72,2,24,18,22,72,0,24,18,22,72,7,184,255,232,64,14,18,22,72,1, +24,18,22,72,10,24,18,22,72,4,184,255,232,64,23,18,22,72,212,4,228,4,2,180, +4,196,4,212,4,3,32,4,1,4,0,7,1,7,0,25,47,113,1,47,93,93,113,49,48,0,43,43, +1,43,43,43,43,43,43,0,43,43,43,43,19,9,1,55,9,1,23,9,1,7,9,1,142,1,98,254, +160,104,1,94,1,94,105,254,162,1,96,102,254,159,254,156,1,74,1,98,1,96,103, +254,159,1,95,105,254,164,254,160,105,1,97,254,157,0,3,0,71,255,203,5,244, +5,186,0,27,0,39,0,51,0,196,64,141,89,44,1,8,37,1,84,33,1,5,26,21,26,101,26, +3,139,23,1,123,22,139,22,2,108,22,1,90,22,1,105,16,1,10,12,26,12,2,132,9, +1,116,8,132,8,2,99,8,1,85,8,1,27,50,91,50,2,114,43,130,43,2,84,43,1,20,38, +84,38,2,85,37,1,140,31,1,74,31,90,31,122,31,3,4,21,20,21,100,21,3,11,7,27, +7,107,7,3,32,44,40,0,91,64,15,28,1,28,53,128,32,53,1,40,91,175,14,191,14, +2,32,14,1,15,14,31,14,2,14,43,31,35,47,95,23,19,4,35,95,9,5,19,0,63,51,237, +63,51,237,17,57,57,1,47,93,93,93,237,93,26,16,220,113,26,237,18,57,57,49, +48,0,93,93,93,93,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,1,20,2,6,4,35,34,38,39,7,35,55,38,2,53,52,18,54,36,51,50,22,23,55,51,7, +22,18,7,52,38,39,1,30,1,51,50,62,2,37,20,22,23,1,46,1,35,34,14,2,5,215,95, +180,254,252,165,127,206,81,120,190,200,88,86,92,178,1,5,169,125,207,82,121, +192,201,85,87,195,49,49,253,59,59,150,93,132,191,123,59,252,15,50,51,2,195, +59,151,92,126,190,127,63,2,199,165,254,242,192,104,58,54,145,241,97,1,10, +160,165,1,10,187,101,56,54,146,242,94,254,253,160,112,184,72,252,171,44,47, +86,153,212,125,113,190,75,3,85,42,46,80,148,208,0,0,255,255,0,158,255,236, +5,41,6,240,18,38,0,56,0,0,17,7,2,148,1,141,0,0,0,21,180,1,26,5,38,1,184,255, +232,180,27,30,5,20,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,6,240, +18,38,0,56,0,0,17,7,2,149,1,237,0,0,0,19,64,11,1,26,5,38,1,37,26,29,5,20, +37,1,43,53,0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,254,18,38,0,56,0,0, +17,7,2,150,1,152,0,0,0,19,64,11,1,27,5,38,1,0,32,26,5,20,37,1,43,53,0,43, +53,0,0,0,255,255,0,158,255,236,5,41,6,178,18,38,0,56,0,0,17,7,2,152,1,158, +0,0,0,25,182,2,1,26,5,38,2,1,184,255,254,180,30,28,5,20,37,1,43,53,53,0,43, +53,53,0,255,255,0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,149,1,208,0,0,0, +19,64,11,1,9,5,38,1,65,9,12,4,8,37,1,43,53,0,43,53,0,0,0,0,2,0,168,0,0,4, +234,5,129,0,16,0,27,0,95,64,63,150,15,1,116,26,132,26,2,123,18,139,18,2,0, +90,16,17,48,17,144,17,3,255,17,1,0,17,16,17,32,17,64,17,4,17,22,11,7,90,0, +8,16,8,64,8,3,7,8,22,95,6,21,95,11,6,11,6,11,7,9,3,7,18,0,63,63,18,57,57, +47,47,16,237,16,237,1,47,94,93,237,50,50,47,93,93,113,237,49,48,0,93,93,93, +1,20,14,2,35,33,17,35,17,51,21,33,50,30,2,7,52,38,35,33,17,33,50,62,2,4,234, +59,121,182,123,254,98,191,191,1,146,125,186,124,62,192,164,164,254,133,1, +131,82,121,79,38,2,223,88,159,120,71,254,215,5,129,252,60,111,156,99,134, +149,253,192,44,79,107,0,0,0,0,1,0,142,255,236,4,143,5,204,0,67,0,214,64,150, +149,51,1,133,63,149,63,2,133,47,149,47,2,133,46,149,46,2,118,65,1,118,56, +1,83,26,131,26,147,26,3,92,39,108,39,124,39,3,107,22,1,58,22,1,145,52,1,21, +52,37,52,2,22,66,38,66,118,66,3,26,3,42,3,2,61,72,24,54,72,31,32,24,1,31, +31,1,9,24,31,31,24,9,3,43,0,72,64,48,17,160,17,2,160,17,176,17,2,17,69,128, +42,70,0,43,16,43,48,43,3,8,43,112,69,1,63,69,79,69,2,212,31,1,197,31,1,182, +31,1,219,17,1,202,17,1,185,17,1,31,17,5,36,80,49,0,43,21,14,80,5,22,0,63, +237,63,63,237,18,57,57,93,93,93,93,93,93,1,93,93,47,94,93,237,26,16,220,93, +113,26,237,18,23,57,47,47,47,93,93,16,237,16,237,49,48,0,93,1,93,93,93,93, +93,0,93,93,1,93,93,0,93,93,93,93,1,20,14,2,35,34,38,47,1,30,3,51,50,54,53, +52,46,4,53,52,62,4,53,52,46,2,35,34,14,2,21,17,35,17,52,62,2,51,50,30,2,21, +20,14,4,21,20,30,4,4,143,41,87,136,94,80,148,55,2,25,67,74,78,37,92,98,54, +81,95,81,54,33,49,58,49,33,33,63,90,57,68,107,73,39,180,63,120,174,110,102, +155,105,53,33,51,58,51,33,55,82,95,82,55,1,39,66,115,85,49,25,24,164,14,25, +19,11,86,79,56,77,62,57,73,98,73,51,73,58,48,52,63,43,37,62,45,26,35,77,122, +88,252,3,4,3,118,173,112,54,46,80,109,62,61,90,69,53,47,48,28,38,59,57,64, +85,114,0,0,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,67,0, +188,0,0,0,21,180,2,66,17,38,2,184,255,149,180,67,70,3,36,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,115,5,228,18,38,0,68,0,0,17,7,0,116,1,84,0,0, +0,19,64,11,2,66,17,38,2,11,66,69,3,36,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,115,5,211,18,38,0,68,0,0,17,7,1,71,0,218,0,0,0,21,180,2,67,17, +38,2,184,255,192,180,72,66,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236, +4,115,5,189,18,38,0,68,0,0,17,7,1,78,0,245,0,0,0,21,180,2,66,17,38,2,184, +255,224,180,75,89,3,36,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,115,5, +123,18,38,0,68,0,0,17,7,0,105,0,235,0,0,0,25,182,3,2,66,17,38,3,2,184,255, +202,180,70,68,3,36,37,1,43,53,53,0,43,53,53,0,255,255,0,87,255,236,4,115, +6,115,18,38,0,68,0,0,17,7,1,76,1,8,0,0,0,25,182,3,2,71,17,38,3,2,184,255, +200,180,76,66,3,36,37,1,43,53,53,0,43,53,53,0,0,3,0,66,255,236,6,194,4,78, +0,62,0,79,0,88,0,251,64,96,134,54,1,122,36,1,123,58,1,117,8,133,8,2,101,68, +117,68,133,68,3,124,86,1,106,86,1,126,81,1,106,81,1,101,4,117,4,2,41,47,1, +41,44,1,24,40,9,13,72,10,28,26,28,2,17,53,88,1,70,33,31,79,79,79,95,79,127, +79,4,79,79,80,25,9,73,10,10,61,71,64,31,80,47,80,63,80,3,144,80,1,80,90,128, +44,71,45,184,255,192,64,19,21,28,72,45,45,71,71,25,64,12,15,72,25,62,80,80, +80,6,53,184,255,184,64,43,17,73,53,83,80,56,16,63,81,33,33,74,50,143,44,1, +43,44,1,44,44,39,80,50,16,17,74,80,22,22,6,80,15,239,9,1,128,9,1,9,9,15,22, +0,63,51,47,93,93,16,237,63,237,50,63,237,51,47,93,93,17,18,57,47,237,63,237, +50,43,18,57,47,237,1,47,43,237,51,47,43,237,26,16,220,93,113,26,237,50,47, +237,17,18,57,47,93,51,237,50,57,57,49,48,93,43,0,93,93,1,93,0,93,93,93,93, +1,93,0,93,1,93,0,93,93,1,21,30,3,51,50,54,55,23,14,3,35,32,3,14,3,35,34,38, +53,52,62,4,63,1,53,52,46,2,35,34,14,2,7,39,62,3,51,50,22,23,62,1,51,50,30, +2,29,1,37,7,14,5,21,20,22,51,50,62,2,53,37,46,1,35,34,14,2,7,3,200,1,34,70, +109,78,117,141,25,158,17,61,102,153,108,254,191,102,29,74,102,137,93,167, +169,38,67,91,107,117,60,240,26,57,88,61,54,88,64,39,7,188,10,58,105,159,112, +128,172,49,63,177,106,136,183,111,47,252,80,195,40,81,76,66,49,28,100,93, +90,129,83,40,2,246,15,144,135,45,96,81,54,4,1,247,17,82,136,98,55,94,72,45, +45,91,73,47,1,1,51,93,71,42,172,150,71,108,78,51,32,13,1,4,59,67,94,58,27, +15,39,67,51,17,64,107,78,43,70,69,74,65,88,155,210,122,24,31,4,1,6,18,31, +51,73,51,87,97,63,98,116,53,196,171,157,29,74,127,98,255,255,0,87,254,78, +3,202,4,78,18,38,0,70,0,0,17,7,0,120,1,12,0,0,0,11,182,1,40,48,40,19,9,37, +1,43,53,0,0,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,67,0, +221,0,0,0,21,180,2,38,17,38,2,184,255,228,180,39,42,17,27,37,1,43,53,0,43, +53,0,255,255,0,87,255,236,4,24,5,228,18,38,0,72,0,0,17,7,0,116,1,112,0,0, +0,19,64,11,2,38,17,38,2,84,38,41,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0, +87,255,236,4,24,5,211,18,38,0,72,0,0,17,7,1,71,0,245,0,0,0,19,64,11,2,39, +17,38,2,8,44,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,24, +5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3,2,4,42, +40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,10,0,0,1,178,5,228,18,38, +0,241,0,0,17,6,0,67,160,0,0,21,180,1,4,17,38,1,184,255,194,180,5,8,0,2,37, +1,43,53,0,43,53,0,0,0,255,255,0,135,0,0,2,47,5,228,18,38,0,241,0,0,17,6,0, +116,63,0,0,19,64,11,1,4,17,38,1,63,4,7,0,2,37,1,43,53,0,43,53,0,255,255,255, +211,0,0,2,105,5,211,18,38,0,241,0,0,17,6,1,71,211,0,0,19,64,11,1,5,17,38, +1,2,10,4,0,2,37,1,43,53,0,43,53,0,255,255,0,8,0,0,2,53,5,123,18,38,0,241, +0,0,17,6,0,105,219,0,0,23,64,13,2,1,4,17,38,2,1,2,8,6,0,2,37,1,43,53,53,0, +43,53,53,0,0,2,0,86,255,236,4,39,5,234,0,39,0,57,0,190,64,94,100,51,1,100, +56,1,107,42,1,107,48,1,10,14,26,14,2,37,17,53,17,69,17,3,6,8,22,8,2,23,26, +29,3,50,15,28,31,28,2,28,28,50,35,71,40,64,19,16,13,3,40,17,64,14,19,72,22, +5,17,17,5,144,40,1,144,40,160,40,2,40,59,128,50,71,31,5,1,5,26,19,29,16,4, +17,27,27,22,45,80,13,80,10,1,10,184,255,192,64,28,7,10,72,82,17,1,36,17,52, +17,68,17,3,2,17,18,17,2,10,17,10,17,22,0,53,80,0,22,0,63,237,63,57,57,47, +47,93,93,93,43,93,51,237,17,51,47,18,23,57,1,47,93,237,26,16,204,93,113,17, +57,47,18,57,43,18,23,57,26,16,237,17,57,47,93,18,23,57,49,48,0,93,93,1,93, +0,93,93,93,93,5,34,46,2,53,52,62,2,51,50,22,23,46,1,39,5,53,55,46,1,39,51, +30,1,23,37,15,1,30,3,29,1,20,14,2,19,52,46,2,35,34,14,2,21,20,22,51,50,62, +2,2,54,125,181,118,56,52,116,186,133,71,117,43,43,115,76,254,211,218,56,120, +66,209,45,83,42,1,50,1,211,81,129,88,47,57,120,188,176,33,71,113,80,81,115, +73,33,144,145,81,118,75,36,20,73,132,185,111,107,182,134,75,32,27,86,176, +69,133,114,94,45,78,35,20,51,31,132,112,92,74,176,200,223,121,6,122,196,138, +74,1,245,94,137,90,44,45,92,137,91,190,178,44,90,139,0,255,255,0,140,0,0, +3,242,5,189,18,38,0,81,4,0,17,7,1,78,0,245,0,0,0,19,64,11,1,38,17,38,1,5, +47,61,19,36,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,228,18,38, +0,82,0,0,17,7,0,67,0,223,0,0,0,21,180,2,35,17,38,2,184,255,228,180,36,39, +8,0,37,1,43,53,0,43,53,0,255,255,0,86,255,236,4,29,5,228,18,38,0,82,0,0,17, +7,0,116,1,103,0,0,0,19,64,11,2,35,17,38,2,73,35,38,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,86,255,236,4,29,5,211,18,38,0,82,0,0,17,7,1,71,0,240,0,0, +0,19,64,11,2,36,17,38,2,1,41,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86, +255,236,4,29,5,189,18,38,0,82,0,0,17,7,1,78,0,247,0,0,0,19,64,11,2,35,17, +38,2,13,44,58,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,123, +18,38,0,82,0,0,17,7,0,105,0,250,0,0,0,23,64,13,3,2,35,17,38,3,2,4,39,37,8, +0,37,1,43,53,53,0,43,53,53,0,0,0,0,3,0,65,0,223,4,36,4,117,0,3,0,7,0,11,0, +75,64,48,3,11,171,0,8,8,4,128,6,160,6,2,95,6,1,32,6,1,6,63,4,95,4,111,4,3, +4,9,174,64,8,144,8,2,8,4,173,5,0,174,79,1,159,1,2,1,5,179,0,63,222,93,237, +16,253,222,93,237,1,47,93,47,93,93,93,18,57,47,51,237,50,49,48,1,53,51,21, +1,53,33,21,1,53,51,21,1,222,168,253,187,3,227,253,186,168,3,190,183,183,254, +162,146,146,254,127,183,183,0,0,3,0,44,255,218,4,180,4,92,0,22,0,34,0,45, +0,161,64,93,117,33,133,33,2,117,27,133,27,2,122,38,138,38,2,122,44,138,44, +2,150,16,1,66,16,1,77,5,1,68,21,1,75,10,1,27,38,35,0,71,64,15,23,207,23,2, +159,23,175,23,255,23,3,23,47,128,35,71,0,12,1,0,12,16,12,32,12,64,12,240, +12,5,7,12,144,47,160,47,240,47,3,224,47,1,223,47,1,0,47,32,47,2,47,184,255, +192,64,16,13,21,72,37,26,30,41,80,18,14,16,30,80,7,3,22,0,63,51,237,63,51, +237,17,57,57,1,43,93,93,93,113,47,94,93,113,237,26,16,220,93,113,26,237,18, +57,57,49,48,93,93,0,93,93,93,93,1,93,93,0,93,1,16,2,35,34,38,39,7,35,55,46, +1,53,16,33,50,22,23,55,51,7,30,1,7,52,38,39,1,30,1,51,50,62,2,37,20,23,1, +46,1,35,34,14,2,4,88,250,238,97,156,60,100,167,184,41,42,1,229,103,156,57, +91,167,173,42,39,189,12,11,254,29,38,105,62,69,112,78,42,253,179,24,1,226, +37,104,66,69,111,78,41,2,30,254,228,254,234,48,50,116,214,68,182,116,2,48, +46,45,105,201,69,185,119,68,109,44,253,206,49,39,39,98,166,126,130,85,2,49, +45,36,41,99,164,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0, +67,0,236,0,0,0,21,180,1,38,17,38,1,184,255,236,180,39,42,36,19,37,1,43,53, +0,43,53,0,255,255,0,139,255,236,3,241,5,228,18,38,0,88,6,0,17,7,0,116,1,87, +0,0,0,19,64,11,1,38,17,38,1,53,38,41,36,19,37,1,43,53,0,43,53,0,0,0,255,255, +0,139,255,236,3,241,5,211,18,38,0,88,6,0,17,7,1,71,0,239,0,0,0,21,180,1,39, +17,38,1,184,255,252,180,44,38,36,19,37,1,43,53,0,43,53,0,255,255,0,139,255, +236,3,241,5,123,18,38,0,88,6,0,17,7,0,105,0,237,0,0,0,25,182,2,1,38,17,38, +2,1,184,255,243,180,42,40,36,19,37,1,43,53,53,0,43,53,53,0,255,255,0,5,254, +87,3,252,5,228,18,38,0,92,0,0,17,7,0,116,1,27,0,0,0,19,64,11,1,32,17,38,1, +54,32,35,17,31,37,1,43,53,0,43,53,0,0,0,0,2,0,138,254,87,4,29,5,204,0,34, +0,54,0,109,64,76,102,52,118,52,2,105,38,121,38,2,73,25,89,25,2,70,10,86,10, +2,25,21,41,21,137,21,153,21,4,22,15,38,15,134,15,150,15,4,18,71,64,160,35, +1,35,56,128,45,7,33,70,0,34,16,34,48,34,240,34,4,8,34,33,27,26,50,80,23,22, +7,40,80,13,16,0,0,0,63,63,237,50,63,237,50,63,1,47,94,93,237,50,50,26,16, +220,93,26,237,49,48,0,93,93,93,93,93,93,19,51,17,20,6,7,6,7,51,62,3,51,50, +30,2,21,20,14,2,35,34,38,39,35,30,3,21,17,35,1,52,46,2,35,34,14,2,21,20,30, +2,51,50,62,2,138,180,1,1,1,1,6,25,64,82,101,63,112,153,93,40,40,93,153,112, +116,174,46,5,1,1,1,1,180,2,214,24,59,98,74,60,106,79,46,38,73,108,70,75,99, +59,24,5,204,254,89,30,55,21,25,22,52,73,47,21,80,145,205,125,123,208,150, +85,88,100,2,32,48,59,29,254,89,3,199,100,156,108,56,34,96,169,135,115,159, +98,43,58,110,159,255,255,0,5,254,87,3,252,5,123,18,38,0,92,0,0,17,7,0,105, +0,187,0,0,0,25,182,2,1,32,17,38,2,1,184,255,254,180,36,34,17,31,37,1,43,53, +53,0,43,53,53,0,255,255,0,4,0,0,5,82,6,161,18,38,0,36,0,0,17,7,1,73,1,104, +1,78,0,19,64,11,2,21,5,38,2,2,22,21,4,7,37,1,43,53,0,43,53,0,0,0,255,255, +0,87,255,236,4,115,5,83,18,38,0,68,0,0,17,7,1,73,0,233,0,0,0,21,180,2,66, +17,38,2,184,255,202,180,67,66,3,36,37,1,43,53,0,43,53,0,255,255,0,4,0,0,5, +82,6,243,18,38,0,36,0,0,17,7,2,155,1,121,0,0,0,19,64,11,2,21,5,38,2,3,26, +34,4,7,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,4,115,5,230,18,38,0, +68,0,0,17,7,1,74,1,7,0,0,0,21,180,2,66,17,38,2,184,255,204,180,71,83,3,36, +37,1,43,53,0,43,53,0,255,255,0,4,254,96,5,99,5,129,18,38,0,36,0,0,17,7,1, +77,3,181,0,11,0,13,185,0,2,255,207,180,33,33,7,7,37,43,53,0,255,255,0,87, +254,85,4,115,4,78,18,38,0,68,0,0,17,7,1,77,2,197,0,0,0,13,185,0,2,255,194, +180,78,78,36,36,37,43,53,0,255,255,0,104,255,236,5,121,6,240,18,38,0,38,0, +0,17,7,2,149,2,83,0,0,0,19,64,11,1,40,5,38,1,126,40,43,26,16,37,1,43,53,0, +43,53,0,0,0,255,255,0,87,255,236,3,202,5,228,18,38,0,70,0,0,17,7,0,116,1, +103,0,0,0,19,64,11,1,40,17,38,1,114,40,43,19,9,37,1,43,53,0,43,53,0,0,0,255, +255,0,104,255,236,5,121,6,254,18,38,0,38,0,0,17,7,2,150,1,204,0,0,0,19,64, +11,1,41,5,38,1,38,46,40,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236, +3,202,5,211,18,38,0,70,0,0,17,7,1,71,0,208,0,0,0,19,64,11,1,41,17,38,1,10, +46,40,19,9,37,1,43,53,0,43,53,0,0,0,255,255,0,104,255,236,5,121,6,241,18, +38,0,38,0,0,17,7,1,75,2,34,1,37,0,19,64,11,1,40,5,38,1,39,40,42,26,16,37, +1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,204,18,38,0,70,0,0,17, +7,1,75,1,44,0,0,0,11,182,1,17,40,42,19,9,37,1,43,53,0,0,0,255,255,0,104,255, +236,5,121,6,254,18,38,0,38,0,0,17,7,2,151,1,204,0,0,0,19,64,11,1,40,5,38, +1,38,42,48,26,16,37,1,43,53,0,43,53,0,0,0,255,255,0,87,255,236,3,202,5,211, +18,38,0,70,0,0,17,7,1,72,0,214,0,0,0,19,64,11,1,40,17,38,1,16,42,48,19,9, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,5,101,6,254,18,38,0,39,0,0,17, +7,2,151,1,102,0,0,0,21,180,2,26,5,38,2,184,255,171,180,28,34,6,0,37,1,43, +53,0,43,53,0,255,255,0,86,255,236,4,255,5,204,16,38,0,71,0,0,17,7,2,146,3, +186,0,75,0,18,64,10,2,61,0,2,83,61,61,19,19,37,1,43,53,0,63,53,255,255,0, +14,0,0,5,101,5,129,18,6,0,144,0,0,0,2,0,86,255,236,4,109,5,204,0,39,0,59, +0,146,64,86,85,42,101,42,2,90,58,106,58,2,57,1,73,1,2,54,10,70,10,2,9,4,25, +4,121,4,137,4,4,6,7,22,7,118,7,134,7,4,25,27,70,64,20,6,0,21,50,3,18,61,128, +40,71,31,6,1,6,63,61,1,143,61,1,33,21,27,19,81,24,15,20,1,239,20,255,20,2, +20,20,8,22,0,11,55,80,8,184,255,192,64,10,9,13,72,8,16,0,45,80,3,22,0,63, +237,50,63,43,237,50,63,18,57,47,93,113,51,237,50,63,1,93,114,47,93,237,26, +16,220,23,50,17,57,26,237,50,49,48,0,93,93,93,93,93,93,37,14,1,35,34,2,17, +16,33,50,22,23,51,52,46,1,52,61,1,33,53,33,53,51,21,51,21,35,17,20,30,2,23, +35,46,3,53,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,3,53,50,165,122,205, +193,1,142,123,164,50,2,1,1,254,212,1,44,180,132,132,1,2,2,1,172,2,3,3,2,253, +218,28,62,96,69,71,109,73,38,38,74,107,70,66,96,64,31,174,104,90,1,20,1,24, +2,54,90,98,10,43,47,42,9,141,131,147,147,131,252,41,39,72,60,43,9,10,37,48, +53,26,1,112,112,160,103,48,46,103,166,120,115,159,98,43,46,102,163,0,0,255, +255,0,168,0,0,4,254,6,161,18,38,0,40,0,0,17,7,1,73,1,122,1,78,0,21,180,1, +12,5,38,1,184,255,237,180,13,12,0,10,37,1,43,53,0,43,53,0,255,255,0,87,255, +236,4,24,5,83,18,38,0,72,0,0,17,7,1,73,0,245,0,0,0,19,64,11,2,38,17,38,2, +3,39,38,17,27,37,1,43,53,0,43,53,0,0,0,255,255,0,168,0,0,4,254,6,243,18,38, +0,40,0,0,17,7,2,155,1,137,0,0,0,21,180,1,12,5,38,1,184,255,235,180,17,25, +0,10,37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,230,18,38,0,72,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,38,17,38,2,2,43,55,17,27,37,1,43,53,0,43, +53,0,0,0,255,255,0,168,0,0,4,254,6,241,18,38,0,40,0,0,17,7,1,75,1,201,1,37, +0,21,180,1,12,5,38,1,184,255,236,180,12,14,0,10,37,1,43,53,0,43,53,0,255, +255,0,87,255,236,4,24,5,204,18,38,0,72,0,0,17,7,1,75,1,68,0,0,0,12,182,2, +2,38,40,17,27,37,1,43,53,0,0,0,255,255,0,168,254,85,4,254,5,129,18,38,0,40, +0,0,17,7,1,77,3,80,0,0,0,13,185,0,1,255,194,180,24,24,11,11,37,43,53,0,255, +255,0,87,254,85,4,24,4,78,18,38,0,72,0,0,17,7,1,77,1,125,0,0,0,13,185,0,2, +254,242,180,50,50,9,9,37,43,53,0,255,255,0,168,0,0,4,254,6,254,18,38,0,40, +0,0,17,7,2,151,1,111,0,0,0,21,180,1,12,5,38,1,184,255,231,180,14,20,0,10, +37,1,43,53,0,43,53,0,255,255,0,87,255,236,4,24,5,211,18,38,0,72,0,0,17,7, +1,72,0,234,0,0,0,21,180,2,38,17,38,2,184,255,254,180,40,46,17,27,37,1,43, +53,0,43,53,0,255,255,0,103,255,236,5,160,6,254,18,38,0,42,0,0,17,7,2,150, +1,219,0,0,0,19,64,11,1,47,5,38,1,34,52,46,0,35,37,1,43,53,0,43,53,0,0,0,255, +255,0,86,254,87,3,239,5,211,18,38,0,74,0,0,17,7,1,71,0,216,0,0,0,19,64,11, +2,71,17,38,2,0,76,70,26,41,37,1,43,53,0,43,53,0,0,0,255,255,0,103,255,236, +5,160,6,243,18,38,0,42,0,0,17,7,2,155,1,246,0,0,0,19,64,11,1,46,5,38,1,39, +51,59,0,35,37,1,43,53,0,43,53,0,0,0,255,255,0,86,254,87,3,239,5,230,18,38, +0,74,0,0,17,7,1,74,0,249,0,0,0,19,64,11,2,70,17,38,2,0,75,87,26,41,37,1,43, +53,0,43,53,0,0,0,255,255,0,103,255,236,5,160,6,241,18,38,0,42,0,0,17,7,1, +75,2,53,1,37,0,19,64,11,1,46,5,38,1,39,46,48,0,35,37,1,43,53,0,43,53,0,0, +0,255,255,0,86,254,87,3,239,5,204,18,38,0,74,0,0,17,7,1,75,1,45,0,0,0,11, +182,2,0,70,72,26,41,37,1,43,53,0,0,0,255,255,0,103,254,78,5,160,5,150,18, +38,0,42,0,0,17,7,2,140,2,78,0,0,0,11,182,1,46,50,46,0,35,37,1,43,53,0,0,0, +255,255,0,86,254,87,3,239,6,32,16,38,0,74,0,0,17,7,2,147,1,56,0,0,0,21,180, +2,79,17,38,2,184,255,252,180,70,74,26,41,37,1,43,53,0,43,53,0,255,255,0,168, +0,0,5,32,6,254,18,38,0,43,0,0,17,7,2,150,1,153,0,0,0,19,64,11,1,13,5,38,1, +0,18,12,4,10,37,1,43,53,0,43,53,0,0,0,255,255,0,142,0,0,3,238,7,62,18,38, +0,75,0,0,17,7,2,150,0,242,0,64,0,21,180,1,35,2,38,1,184,255,255,180,40,34, +25,10,37,1,43,53,0,43,53,0,0,2,0,14,0,0,5,185,5,129,0,19,0,23,0,166,64,72, +23,11,3,90,8,7,4,4,20,4,2,7,4,16,15,19,90,20,12,59,0,1,4,0,1,56,164,0,1,155, +0,1,68,0,1,244,0,1,235,0,1,68,0,148,0,2,224,0,1,2,0,0,48,0,112,0,208,0,4, +7,0,32,25,1,160,25,176,25,192,25,3,25,184,255,192,64,36,14,17,72,47,25,1, +22,18,6,95,15,11,80,7,96,7,2,7,2,95,64,23,1,160,23,208,23,2,23,23,13,9,3, +4,0,18,0,63,50,63,51,57,47,93,113,237,220,93,50,50,237,50,50,1,93,43,93,113, +47,94,93,95,93,113,113,113,114,114,114,94,93,93,51,51,237,50,50,47,94,93, +51,51,237,50,50,49,48,33,17,33,17,35,17,35,53,51,53,51,21,33,53,51,21,51, +21,35,17,3,53,33,21,4,102,253,1,191,154,154,191,2,255,186,153,153,186,253, +1,2,141,253,115,4,1,154,230,230,230,230,154,251,255,3,45,212,212,0,1,0,10, +0,0,3,238,5,204,0,41,0,150,185,0,7,255,232,64,66,9,13,72,0,7,16,7,2,7,33, +24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,32,36,24,70,29,28,192,25,1, +0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240,43, +2,255,43,1,112,43,1,43,184,255,192,64,19,19,23,72,35,27,81,32,28,28,5,30, +0,25,11,21,0,18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63, +18,57,47,51,237,50,1,43,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16, +220,93,113,26,237,18,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52, +46,2,35,34,14,2,21,17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61, +30,70,84,100,62,104,133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180, +1,44,254,212,2,3,2,1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69, +35,46,84,120,75,253,170,4,182,131,147,147,131,148,33,66,56,39,7,255,255,255, +184,0,0,2,133,7,6,18,38,0,44,0,0,17,6,2,153,207,0,0,19,64,11,1,4,5,38,1,2, +13,27,0,2,37,1,43,53,0,43,53,0,255,255,255,184,0,0,2,133,5,189,18,38,0,241, +0,0,17,6,1,78,207,0,0,19,64,11,1,4,17,38,1,2,13,27,0,2,37,1,43,53,0,43,53, +0,255,255,0,12,0,0,2,49,6,161,18,38,0,44,0,0,17,7,1,73,255,217,1,78,0,19, +64,11,1,4,5,38,1,2,5,4,0,2,37,1,43,53,0,43,53,0,0,0,255,255,0,12,0,0,2,49, +5,83,18,38,0,241,0,0,17,6,1,73,217,0,0,19,64,11,1,4,17,38,1,2,5,4,0,2,37, +1,43,53,0,43,53,0,255,255,255,210,0,0,2,108,6,243,18,38,0,44,0,0,17,6,2,155, +234,0,0,19,64,11,1,4,5,38,1,2,9,17,0,2,37,1,43,53,0,43,53,0,255,255,255,210, +0,0,2,108,5,230,18,38,0,241,0,0,17,6,1,74,245,0,0,19,64,11,1,4,17,38,1,3, +9,21,0,2,37,1,43,53,0,43,53,0,255,255,0,92,254,85,1,186,5,129,18,38,0,44, +0,0,17,6,1,77,12,0,0,10,182,1,0,16,16,3,3,37,43,53,0,0,255,255,0,31,254,85, +1,125,5,204,18,38,0,76,0,0,17,6,1,77,207,0,0,15,64,10,23,22,1,2,0,20,20,7, +7,37,43,53,93,0,255,255,0,189,0,0,1,124,6,241,18,38,0,44,0,0,17,7,1,75,0, +39,1,37,0,19,64,11,1,4,5,38,1,0,4,6,0,2,37,1,43,53,0,43,53,0,0,0,0,1,0,194, +0,0,1,118,4,58,0,3,1,137,64,24,3,70,4,0,36,0,2,9,0,0,4,5,52,5,1,0,5,16,5, +32,5,3,229,5,184,255,192,64,55,225,228,72,240,5,1,228,5,1,176,5,192,5,208, +5,3,132,5,148,5,164,5,3,64,5,1,52,5,1,0,5,16,5,32,5,3,212,5,228,5,244,5,3, +144,5,1,116,5,132,5,2,96,5,1,5,184,255,192,64,22,193,196,72,224,5,1,196,5, +212,5,2,176,5,1,20,5,36,5,52,5,3,5,184,255,192,183,182,185,72,0,5,1,175,5, +184,255,192,179,171,174,72,5,184,255,192,182,161,167,72,128,5,1,5,184,255, +192,64,38,150,156,72,208,5,1,100,5,116,5,164,5,180,5,196,5,5,32,5,1,4,5,20, +5,2,4,5,20,5,180,5,196,5,244,5,5,117,5,184,255,192,179,121,124,72,5,184,255, +192,179,110,113,72,5,184,255,192,64,24,99,102,72,224,5,1,180,5,196,5,212, +5,3,48,5,1,4,5,20,5,36,5,3,5,184,255,192,183,67,70,72,11,5,1,62,5,184,255, +192,64,9,56,59,72,203,5,219,5,2,5,184,255,192,64,42,45,48,72,27,5,43,5,2, +196,5,212,5,228,5,3,107,5,123,5,2,64,5,1,2,16,5,32,5,48,5,3,191,5,207,5,2, +32,5,64,5,2,5,184,255,192,64,13,13,16,72,15,5,31,5,2,7,1,15,0,21,0,63,63, +1,94,93,43,93,93,113,95,113,113,113,114,43,114,43,94,93,43,113,113,113,113, +43,43,43,94,93,113,113,113,113,43,114,43,43,94,93,43,93,93,93,93,43,113,113, +113,113,114,114,114,114,114,114,114,43,94,93,93,17,18,57,47,94,93,237,49, +48,51,17,51,17,194,180,4,58,251,198,0,0,0,255,255,0,170,255,236,5,73,5,129, +16,38,0,44,237,0,16,7,0,45,1,225,0,0,255,255,0,137,254,87,3,3,5,204,16,38, +0,76,0,0,17,7,0,77,1,198,0,0,0,30,64,18,3,2,111,8,1,48,8,1,16,8,1,8,1,0,16, +0,1,0,17,93,53,53,17,93,93,93,53,53,255,255,0,32,255,236,3,205,6,254,18,38, +0,45,0,0,17,7,2,150,1,55,0,0,0,19,64,11,1,23,5,38,1,190,28,22,3,16,37,1,43, +53,0,43,53,0,0,0,0,2,255,153,254,87,2,47,5,211,0,19,0,29,1,148,64,25,150, +29,166,29,2,152,28,168,28,2,3,18,24,12,16,72,18,40,8,11,72,164,21,1,21,184, +255,192,64,49,11,15,72,21,251,26,1,59,26,1,26,64,12,15,72,36,26,1,26,15,70, +12,3,3,4,12,20,12,36,12,68,12,4,7,12,12,31,30,144,31,1,2,0,31,16,31,2,219, +31,184,255,192,64,9,223,227,72,31,64,210,213,72,31,184,255,192,64,51,205, +209,72,143,31,1,64,31,80,31,2,95,31,111,31,239,31,255,31,4,32,31,48,31,64, +31,3,144,31,160,31,224,31,240,31,4,79,31,1,0,31,1,160,175,31,191,31,207,31, +3,31,184,255,192,64,57,147,150,72,239,31,1,176,31,192,31,208,31,3,95,31,1, +32,31,1,31,31,47,31,63,31,143,31,191,31,207,31,6,0,31,1,111,239,31,1,208, +31,1,63,31,1,111,31,143,31,159,31,175,31,255,31,5,31,184,255,192,64,101,79, +82,72,223,31,1,144,31,160,31,176,31,3,47,31,63,31,79,31,3,0,31,1,61,31,64, +53,56,72,112,31,128,31,144,31,176,31,4,15,31,31,31,2,255,31,1,31,64,35,38, +72,144,31,1,79,31,1,255,31,1,112,31,128,31,192,31,208,31,224,31,5,31,31,1, +24,142,64,28,148,26,128,22,22,15,26,47,26,63,26,127,26,239,26,5,26,13,15, +7,80,0,27,0,63,237,63,47,93,51,47,26,16,253,26,237,1,93,93,93,113,113,43, +113,114,114,43,94,93,93,93,93,43,113,114,114,114,94,93,93,113,113,113,113, +43,114,94,93,93,93,113,113,114,114,43,43,43,94,93,95,93,17,18,57,47,94,93, +51,47,16,237,47,93,43,93,113,204,43,93,49,48,0,43,43,1,95,93,93,19,34,38, +39,53,30,1,51,50,62,2,53,17,51,17,20,14,2,1,21,35,39,35,7,35,53,19,51,77, +34,65,28,13,36,13,38,49,28,10,180,21,54,93,1,154,105,219,2,232,104,234,204, +254,87,4,5,139,2,4,20,43,67,46,4,165,251,64,62,106,78,45,6,110,20,169,169, +20,1,14,0,255,255,0,168,254,78,5,63,5,129,18,38,0,46,0,0,17,7,2,140,1,221, +0,0,0,14,185,0,1,255,205,180,16,12,4,11,37,1,43,53,255,255,0,138,254,78,4, +3,5,204,18,38,0,78,0,0,17,7,2,140,1,78,0,0,0,14,185,0,1,255,235,180,16,12, +4,11,37,1,43,53,0,1,0,138,0,0,4,3,4,58,0,11,0,166,64,72,123,1,1,116,7,1,86, +9,102,9,2,123,0,139,0,155,0,3,89,0,105,0,2,67,10,1,58,2,1,42,9,1,155,8,1, +122,8,138,8,2,44,8,1,1,10,8,10,9,16,112,9,128,9,144,9,3,9,9,0,11,16,80,11, +1,144,11,208,11,240,11,3,11,184,255,192,64,40,7,11,72,11,7,3,70,0,4,16,4, +48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2,1,7,10,4,8,8,5,15,4,0,21, +0,63,50,63,51,17,23,57,1,93,93,47,94,93,237,50,47,43,93,113,56,51,57,47,93, +56,57,51,17,51,49,48,93,93,93,93,0,93,1,93,93,93,93,0,93,1,93,33,1,7,17,35, +17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73,1,206,1,238,108, +254,126,4,58,253,243,2,13,254,47,253,151,0,0,0,255,255,0,168,0,0,4,47,6,240, +18,38,0,47,0,0,17,7,2,149,0,173,0,0,0,21,180,1,6,5,38,1,184,255,94,180,6, +9,0,4,37,1,43,53,0,43,53,0,255,255,0,91,0,0,2,3,7,62,18,38,0,79,0,0,17,6, +2,149,19,78,0,19,64,11,1,4,2,38,1,75,4,7,0,2,37,1,43,53,0,43,53,0,255,255, +0,168,254,78,4,47,5,129,18,38,0,47,0,0,17,7,2,140,1,133,0,0,0,14,185,0,1, +255,253,180,10,6,0,4,37,1,43,53,255,255,0,126,254,78,1,71,5,204,18,38,0,79, +0,0,17,6,2,140,255,0,0,14,185,0,1,255,255,180,8,4,0,2,37,1,43,53,0,0,255, +255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,2,146,2,21,0,0,0,18,64,10,1, +15,3,1,138,10,6,0,4,37,1,43,53,0,63,53,255,255,0,138,0,0,2,105,5,204,16,38, +0,79,0,0,17,7,2,146,1,36,0,75,0,65,64,16,16,64,29,29,72,16,64,22,22,72,16, +64,18,18,72,16,184,255,192,179,17,17,72,16,184,255,192,64,12,16,16,72,16, +64,11,11,72,1,13,0,1,184,1,32,180,8,4,0,2,37,1,43,53,0,63,53,1,43,43,43,43, +43,43,0,255,255,0,168,0,0,4,47,5,129,18,38,0,47,0,0,17,7,1,75,1,213,253,143, +0,11,182,1,95,6,8,0,4,37,1,43,53,0,0,0,255,255,0,138,0,0,2,146,5,204,16,38, +0,79,0,0,17,7,1,75,1,66,253,143,0,14,185,0,1,1,84,180,4,6,0,2,37,1,43,53, +0,1,0,20,0,0,4,47,5,129,0,13,0,119,64,49,121,0,137,0,2,100,8,116,8,132,8, +3,86,8,1,134,8,1,86,7,1,134,7,1,12,2,90,9,5,16,3,1,0,3,32,3,64,3,96,3,128, +3,208,3,240,3,7,3,12,184,255,224,179,19,22,72,9,184,255,224,64,24,19,22,72, +6,1,9,12,4,16,7,1,7,0,13,1,13,13,5,10,3,2,95,5,18,0,63,237,63,18,57,47,93, +205,93,23,57,43,43,1,47,93,113,47,51,237,50,49,48,113,114,113,114,0,93,93, +1,5,17,33,21,33,17,7,53,55,17,51,17,37,2,104,254,255,2,200,252,121,148,148, +191,1,1,3,29,149,254,20,156,2,26,85,158,85,2,201,253,165,148,0,1,0,16,0,0, +1,186,5,204,0,11,0,102,64,42,39,3,1,39,2,1,8,7,11,70,4,2,0,0,16,0,32,0,64, +0,4,7,0,0,12,13,255,13,1,112,13,128,13,192,13,208,13,4,31,13,1,4,184,255, +224,64,23,18,22,72,10,32,18,22,72,1,10,4,7,4,2,79,8,1,8,8,5,0,0,21,0,63,63, +57,47,93,205,23,57,43,43,1,93,93,93,17,18,57,47,94,93,51,51,237,50,50,49, +48,113,113,51,17,7,53,55,17,51,17,55,21,7,17,138,122,122,180,124,124,2,30, +68,158,68,3,16,253,88,72,159,71,253,122,255,255,0,168,0,0,5,32,6,240,18,38, +0,49,0,0,17,7,2,149,2,17,0,0,0,19,64,11,1,20,5,38,1,73,20,23,8,18,37,1,43, +53,0,43,53,0,0,0,255,255,0,140,0,0,3,242,5,228,18,38,0,81,4,0,17,7,0,116, +1,132,0,0,0,19,64,11,1,38,17,38,1,97,38,41,19,36,37,1,43,53,0,43,53,0,0,0, +255,255,0,168,254,78,5,32,5,129,18,38,0,49,0,0,17,7,2,140,1,252,0,0,0,14, +185,0,1,255,252,180,24,20,8,18,37,1,43,53,255,255,0,140,254,78,3,242,4,78, +18,38,0,81,4,0,17,7,2,140,1,91,0,0,0,11,182,1,0,42,38,19,36,37,1,43,53,0, +0,0,255,255,0,168,0,0,5,32,6,254,18,38,0,49,0,0,17,7,2,151,1,147,0,0,0,21, +180,1,20,5,38,1,184,255,250,180,22,28,8,18,37,1,43,53,0,43,53,0,255,255,0, +140,0,0,3,242,5,211,18,38,0,81,4,0,17,7,1,72,0,242,0,0,0,21,180,1,38,17,38, +1,184,255,254,180,40,46,19,36,37,1,43,53,0,43,53,0,255,255,255,254,0,0,4, +80,5,129,16,38,0,81,98,0,16,7,2,3,255,127,0,0,0,1,0,165,255,236,5,52,5,149, +0,55,0,162,64,16,154,53,1,149,7,165,7,2,131,41,147,41,163,41,3,48,184,255, +232,179,12,15,72,47,184,255,216,64,91,12,15,72,42,54,58,54,154,54,170,54, +4,6,143,5,159,5,175,5,3,5,5,51,39,26,90,0,27,16,27,64,27,3,27,51,90,0,14, +64,14,80,14,112,14,160,14,176,14,6,48,14,80,14,144,14,240,14,4,224,14,1,143, +14,159,14,175,14,3,0,14,48,14,2,7,14,39,20,95,45,4,33,3,26,18,9,95,0,6,6, +0,19,0,63,50,47,16,237,63,63,63,237,50,1,47,94,93,93,93,113,114,237,47,93, +237,50,17,57,47,93,51,49,48,0,93,43,1,43,0,93,93,93,5,34,46,2,39,55,30,1, +51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,173,56,96,79,63,24,127,37,100,59,64,78,41, +13,39,81,127,87,94,163,121,70,191,1,1,1,1,184,1,3,2,1,4,34,103,130,153,86, +124,177,112,53,30,86,152,20,24,40,54,30,115,45,65,58,107,153,95,1,66,108, +154,98,46,62,105,139,77,252,133,4,68,37,92,90,76,22,22,63,69,69,28,61,101, +70,39,64,133,204,139,254,165,130,208,146,78,0,0,0,0,1,0,140,254,87,3,242, +4,78,0,53,0,135,64,18,121,52,137,52,2,90,52,106,52,2,43,52,59,52,75,52,3, +46,184,255,232,64,74,9,12,72,3,46,19,46,2,3,3,24,49,70,64,160,12,1,96,12, +208,12,2,31,12,1,175,12,1,12,55,128,37,24,70,160,25,176,25,2,0,25,192,25, +208,25,3,0,25,16,25,32,25,64,25,224,25,240,25,6,7,25,37,18,80,43,16,31,15, +24,21,7,80,0,27,0,63,237,63,63,63,237,50,1,47,94,93,113,114,237,50,26,16, +220,93,113,113,114,26,237,17,57,47,49,48,93,43,0,93,93,93,1,34,38,39,53,30, +1,51,50,62,2,53,17,52,46,2,35,34,14,2,21,17,35,17,52,46,2,39,51,30,3,21,51, +62,3,51,50,30,2,21,17,20,14,2,3,1,34,65,28,13,36,13,38,49,28,10,23,52,85, +63,64,103,73,40,180,1,2,2,1,170,1,2,3,2,3,26,62,82,106,70,90,130,84,39,22, +54,93,254,87,4,5,139,2,4,20,43,67,46,3,25,79,106,65,27,45,85,125,81,253,141, +3,83,34,75,67,48,7,5,44,57,59,20,47,76,53,29,44,92,145,100,252,169,62,106, +78,45,0,0,0,255,255,0,97,255,236,5,215,6,161,18,38,0,50,0,0,17,7,1,73,1,214, +1,78,0,19,64,11,2,40,5,38,2,0,41,40,10,0,37,1,43,53,0,43,53,0,0,0,255,255, +0,86,255,236,4,29,5,83,18,38,0,82,0,0,17,7,1,73,0,244,0,0,0,19,64,11,2,35, +17,38,2,0,36,35,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,97,255,236,5,215,6, +243,18,38,0,50,0,0,17,7,2,155,1,231,0,0,0,19,64,11,2,40,5,38,2,0,45,53,10, +0,37,1,43,53,0,43,53,0,0,0,255,255,0,86,255,236,4,29,5,230,18,38,0,82,0,0, +17,7,1,74,1,16,0,0,0,19,64,11,2,35,17,38,2,0,40,52,8,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,97,255,236,5,215,6,241,18,38,0,50,0,0,17,7,2,154,1,226,0, +0,0,23,64,13,3,2,40,5,38,3,2,93,40,49,10,0,37,1,43,53,53,0,43,53,53,0,0,0, +255,255,0,86,255,236,4,34,5,228,18,38,0,82,0,0,17,7,1,79,1,9,0,0,0,23,64, +13,3,2,35,17,38,3,2,103,35,44,8,0,37,1,43,53,53,0,43,53,53,0,0,0,0,2,0,97, +255,246,7,166,5,140,0,30,0,49,0,170,64,119,137,13,1,102,13,1,105,12,1,86, +48,1,89,42,1,84,8,132,8,2,4,47,20,47,84,47,3,11,43,27,43,91,43,3,0,20,24, +28,90,34,0,26,32,26,48,26,3,26,22,26,22,29,15,34,47,34,79,34,3,63,34,95,34, +127,34,159,34,207,34,239,34,6,34,64,31,38,72,34,16,29,32,29,2,29,45,91,32, +10,1,15,10,31,10,2,10,127,51,1,27,95,24,24,21,29,95,30,18,22,95,21,3,40,95, +15,4,31,95,5,19,0,63,237,63,237,63,237,63,237,17,57,47,237,1,93,47,93,93, +237,47,93,47,43,93,113,18,57,57,47,47,93,16,237,50,57,57,49,48,0,93,93,93, +93,93,1,93,0,93,93,33,14,3,35,34,36,38,2,53,52,18,54,36,51,50,30,2,23,33, +21,33,17,33,21,33,17,33,21,37,50,54,55,17,46,2,34,35,34,14,2,21,20,30,2,3, +231,20,51,57,57,25,169,254,253,175,89,94,178,1,2,164,26,58,57,52,19,3,146, +252,221,2,231,253,25,3,76,251,111,32,76,26,11,32,37,37,15,125,187,125,63, +64,126,186,3,3,3,1,106,191,1,9,159,165,1,7,183,98,2,3,4,2,156,254,60,154, +254,21,156,145,2,2,4,87,1,2,1,74,142,206,131,129,209,148,80,0,3,0,86,255, +236,7,50,4,78,0,39,0,59,0,68,0,190,64,131,132,7,1,102,7,118,7,2,97,2,1,85, +2,1,90,66,106,66,2,108,61,1,90,61,1,69,58,85,58,101,58,3,69,52,85,52,101, +52,3,74,48,90,48,106,48,3,74,42,90,42,106,42,3,8,73,9,9,38,71,64,31,60,47, +60,63,60,3,144,60,1,60,70,128,17,30,68,0,71,144,40,1,32,40,1,40,50,71,25, +0,80,68,68,5,63,80,33,16,116,30,132,30,2,123,17,139,17,2,30,17,20,45,80,28, +16,55,80,20,22,5,80,14,239,8,1,128,8,1,8,8,14,22,0,63,51,47,93,93,16,237, +63,237,63,237,18,57,57,93,93,63,237,18,57,47,237,1,47,237,47,93,114,237,50, +57,57,26,16,220,93,113,26,237,50,47,237,49,48,0,93,93,93,93,93,93,93,93,93, +93,93,1,20,30,2,51,50,54,55,23,14,3,35,34,38,39,14,1,35,34,46,2,53,16,18, +51,32,23,62,1,51,50,30,2,29,1,37,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2, +37,46,1,35,34,14,2,7,4,46,35,73,114,80,117,141,25,158,17,61,102,153,108,137, +198,61,63,201,137,113,181,127,68,253,242,1,25,117,67,200,119,136,183,111, +47,252,63,42,77,110,68,69,114,81,45,47,81,108,62,69,114,81,44,3,7,15,144, +135,45,99,84,58,4,1,247,85,143,103,57,94,72,45,45,91,73,47,91,92,93,90,68, +140,211,143,1,23,1,25,177,94,83,88,155,210,122,24,39,126,164,98,39,41,99, +164,123,126,165,98,40,39,98,166,225,171,157,29,74,127,98,255,255,0,168,0, +0,5,104,6,240,18,38,0,53,0,0,17,7,2,149,1,225,0,0,0,21,180,2,31,5,38,2,184, +255,245,180,31,34,4,17,37,1,43,53,0,43,53,0,255,255,0,136,0,0,2,166,5,228, +18,38,0,85,0,0,17,7,0,116,0,182,0,0,0,19,64,11,1,32,17,38,1,74,32,35,6,21, +37,1,43,53,0,43,53,0,0,0,255,255,0,168,254,78,5,104,5,129,18,38,0,53,0,0, +17,7,2,140,2,5,0,0,0,14,185,0,2,255,225,180,35,31,4,17,37,1,43,53,255,255, +0,129,254,78,2,136,4,78,18,38,0,85,0,0,17,6,2,140,2,0,0,14,185,0,1,255,94, +180,36,32,6,21,37,1,43,53,0,0,255,255,0,168,0,0,5,104,6,254,18,38,0,53,0, +0,17,7,2,151,1,102,0,0,0,21,180,2,31,5,38,2,184,255,169,180,33,39,4,17,37, +1,43,53,0,43,53,0,255,255,0,56,0,0,2,206,5,211,18,38,0,85,0,0,17,6,1,72,56, +0,0,21,180,1,32,17,38,1,184,255,251,180,34,40,6,21,37,1,43,53,0,43,53,0,0, +0,255,255,0,93,255,236,4,248,7,45,18,38,0,54,0,0,17,7,0,116,1,234,1,73,0, +19,64,11,1,64,5,38,1,91,64,67,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,228,18,38,0,86,0,0,17,7,0,116,1,57,0,0,0,19,64,11,1,56,17,38, +1,93,56,59,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,93,255,236,4,248,7,26, +18,38,0,54,0,0,17,7,1,71,1,114,1,71,0,19,64,11,1,65,5,38,1,18,70,64,8,0,37, +1,43,53,0,43,53,0,0,0,255,255,0,57,255,236,3,182,5,211,18,38,0,86,0,0,17, +7,1,71,0,172,0,0,0,19,64,11,1,57,17,38,1,0,62,56,10,0,37,1,43,53,0,43,53, +0,0,0,255,255,0,93,254,78,4,248,5,150,18,38,0,54,0,0,17,7,0,120,1,166,0,0, +0,11,182,1,40,72,64,8,0,37,1,43,53,0,0,0,255,255,0,57,254,78,3,182,4,75,18, +38,0,86,0,0,17,7,0,120,0,218,0,0,0,11,182,1,15,64,56,10,0,37,1,43,53,0,0, +0,255,255,0,93,255,236,4,248,6,254,18,38,0,54,0,0,17,7,2,151,1,115,0,0,0, +19,64,11,1,64,5,38,1,19,66,72,8,0,37,1,43,53,0,43,53,0,0,0,255,255,0,57,255, +236,3,182,5,211,18,38,0,86,0,0,17,7,1,72,0,173,0,0,0,19,64,11,1,56,17,38, +1,0,58,64,10,0,37,1,43,53,0,43,53,0,0,0,255,255,0,46,254,78,4,180,5,129,18, +38,0,55,0,0,17,7,2,140,1,139,0,0,0,14,185,0,1,255,254,180,12,8,4,6,37,1,43, +53,255,255,0,31,254,78,2,42,5,44,16,38,0,87,0,0,17,6,2,140,115,0,2,233,64, +255,35,64,232,232,72,35,64,231,231,72,35,64,228,228,72,35,64,227,227,72,35, +64,226,226,72,35,64,221,221,72,35,64,217,217,72,35,64,216,216,72,35,64,215, +215,72,35,64,214,214,72,35,64,213,213,72,35,64,210,210,72,35,64,206,206,72, +35,64,205,205,72,35,64,203,203,72,35,64,202,202,72,35,64,199,199,72,35,64, +196,196,72,35,64,195,195,72,35,64,194,194,72,35,64,192,192,72,35,64,191,191, +72,35,64,190,190,72,35,64,185,185,72,35,64,184,184,72,35,64,181,181,72,35, +64,180,180,72,35,64,179,179,72,35,64,178,178,72,35,64,174,174,72,35,64,173, +173,72,35,64,170,170,72,35,64,169,169,72,35,64,168,168,72,35,64,167,167,72, +35,64,163,163,72,35,64,162,162,72,35,64,160,160,72,35,64,159,159,72,35,64, +158,158,72,35,64,157,157,72,35,64,156,156,72,35,64,152,152,72,35,64,149,149, +72,35,64,148,148,72,35,64,147,147,72,35,64,146,146,72,35,64,145,145,72,35, +64,144,144,72,35,64,142,142,72,35,64,141,141,72,64,221,35,64,138,138,72,35, +64,137,137,72,35,64,136,136,72,35,64,134,134,72,35,64,133,133,72,35,64,131, +131,72,35,64,130,130,72,35,64,127,127,72,35,64,126,126,72,35,64,125,125,72, +35,64,124,124,72,35,64,123,123,72,35,64,122,122,72,35,64,121,121,72,35,64, +120,120,72,35,64,116,116,72,35,64,115,115,72,35,64,113,113,72,35,64,112,112, +72,35,64,111,111,72,35,64,110,110,72,35,64,109,109,72,35,64,106,106,72,35, +64,105,105,72,35,64,104,104,72,35,64,102,102,72,35,64,101,101,72,35,64,100, +100,72,35,64,99,99,72,35,64,98,98,72,35,64,95,95,72,35,64,94,94,72,35,64, +93,93,72,35,64,91,91,72,35,64,90,90,72,35,64,89,89,72,35,128,88,88,72,35, +64,87,87,72,35,64,84,84,72,35,64,83,83,72,35,64,80,80,72,35,64,79,79,72,35, +64,78,78,72,35,64,77,77,72,35,184,255,192,179,74,74,72,35,184,255,192,179, +71,71,72,35,184,255,192,179,63,63,72,35,184,255,192,64,9,60,60,72,35,64,52, +52,72,35,184,255,192,179,50,50,72,35,184,255,192,179,49,49,72,35,184,255, +192,64,9,45,45,72,35,64,41,41,72,35,184,255,192,179,39,39,72,35,184,255,192, +64,9,38,38,72,35,64,30,30,72,35,184,255,192,179,28,28,72,35,184,255,192,64, +9,27,27,72,35,64,19,19,72,35,184,255,192,179,17,17,72,35,184,255,192,179, +13,13,72,35,184,255,192,64,15,9,9,72,35,64,8,8,72,1,50,27,23,7,0,37,1,43, +53,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0,0,255,255,0,46,0,0,4,180, +6,254,18,38,0,55,0,0,17,7,2,151,1,33,0,0,0,21,180,1,8,5,38,1,184,255,251, +180,10,16,4,6,37,1,43,53,0,43,53,0,255,255,0,31,255,240,3,17,5,204,16,38, +0,87,0,0,17,7,2,146,1,204,0,75,0,17,177,1,1,184,1,136,180,27,23,7,0,37,1, +43,53,0,53,0,0,1,0,46,0,0,4,180,5,129,0,15,0,101,64,62,0,17,16,17,32,17,3, +9,3,2,5,15,14,6,12,5,14,9,6,127,12,175,12,191,12,3,47,12,143,12,2,12,64,23, +28,72,12,1,5,90,10,16,6,32,6,2,6,0,12,95,13,4,8,95,1,9,9,5,13,3,5,18,0,63, +63,18,57,47,51,237,50,16,237,50,1,47,93,51,253,50,204,43,93,113,17,57,43, +1,24,16,77,228,17,57,95,94,93,49,48,1,17,33,21,33,17,35,17,33,53,33,17,33, +53,33,21,2,208,1,25,254,231,190,254,233,1,23,254,28,4,134,4,229,254,60,154, +253,121,2,135,154,1,196,156,156,0,1,0,31,255,240,2,42,5,44,0,30,0,140,64, +91,40,30,1,40,29,1,40,26,1,40,25,1,12,32,9,15,72,156,12,172,12,2,12,40,9, +14,72,20,15,15,13,29,25,111,7,127,7,2,7,24,28,7,3,1,70,21,17,143,13,1,0,13, +16,13,32,13,3,7,13,128,32,1,47,32,1,27,19,80,20,0,15,80,28,127,16,191,16, +207,16,3,16,16,4,24,22,20,15,4,80,11,22,0,63,237,63,206,51,18,57,47,93,51, +237,50,16,237,50,1,93,93,47,94,93,113,51,51,237,23,50,47,93,51,51,17,51,17, +51,49,48,0,43,93,1,43,113,113,113,113,1,21,20,22,51,50,54,55,21,14,1,35,34, +53,17,35,53,51,17,35,53,51,55,51,21,51,21,35,17,51,21,1,80,51,63,26,49,29, +41,85,56,216,125,125,125,132,53,120,200,200,200,2,4,248,78,63,8,6,133,11, +13,245,1,31,131,1,48,131,242,242,131,254,208,131,255,255,0,158,255,236,5, +41,7,6,18,38,0,56,0,0,17,7,2,153,1,148,0,0,0,19,64,11,1,26,5,38,1,0,35,49, +5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5,189,18,38,0,88, +0,0,17,7,1,78,0,246,0,0,0,19,64,11,1,38,17,38,1,13,47,61,36,19,37,1,43,53, +0,43,53,0,0,0,255,255,0,158,255,236,5,41,6,156,18,38,0,56,0,0,17,7,1,73,1, +159,1,73,0,19,64,11,1,26,5,38,1,1,27,26,5,20,37,1,43,53,0,43,53,0,0,0,255, +255,0,133,255,236,3,235,5,83,18,38,0,88,0,0,17,7,1,73,0,240,0,0,0,21,180, +1,38,17,38,1,184,255,254,180,39,38,36,19,37,1,43,53,0,43,53,0,255,255,0,158, +255,236,5,41,6,243,18,38,0,56,0,0,17,7,2,155,1,174,0,0,0,19,64,11,1,26,5, +38,1,0,31,39,5,20,37,1,43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,235,5, +230,18,38,0,88,0,0,17,7,1,74,1,11,0,0,0,21,180,1,38,17,38,1,184,255,253,180, +43,55,36,19,37,1,43,53,0,43,53,0,255,255,0,158,255,236,5,41,7,62,18,38,0, +56,0,0,17,7,1,76,1,191,0,203,0,23,64,13,2,1,31,5,38,2,1,0,36,26,5,20,37,1, +43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,235,6,115,18,38,0,88,0, +0,17,7,1,76,1,20,0,0,0,23,64,13,2,1,43,17,38,2,1,1,48,38,36,19,37,1,43,53, +53,0,43,53,53,0,0,0,255,255,0,158,255,236,5,41,6,241,18,38,0,56,0,0,17,7, +2,154,1,157,0,0,0,23,64,13,2,1,26,5,38,2,1,81,26,35,5,20,37,1,43,53,53,0, +43,53,53,0,0,0,255,255,0,133,255,236,4,30,5,228,18,38,0,88,0,0,17,7,1,79, +1,5,0,0,0,23,64,13,2,1,38,17,38,2,1,100,38,47,36,19,37,1,43,53,53,0,43,53, +53,0,0,0,255,255,0,158,254,85,5,41,5,129,16,38,0,56,0,0,17,7,1,77,2,32,0, +0,0,40,185,0,1,254,103,181,39,39,21,21,37,51,184,255,192,179,21,21,72,51, +184,255,192,179,20,20,72,51,184,255,192,178,19,19,72,43,43,43,43,53,0,0,255, +255,0,133,254,85,4,5,4,58,18,38,0,88,0,0,17,7,1,77,2,87,0,0,0,13,185,0,1, +255,226,180,50,50,14,14,37,43,53,0,255,255,0,9,0,0,7,134,6,254,18,38,0,58, +0,0,17,7,2,150,2,121,0,0,0,21,180,1,48,5,38,1,184,255,253,180,53,47,15,46, +37,1,43,53,0,43,53,0,255,255,255,253,0,0,5,204,5,211,18,38,0,90,0,0,17,7, +1,71,1,148,0,0,0,21,180,1,44,17,38,1,184,255,251,180,49,43,15,42,37,1,43, +53,0,43,53,0,255,255,0,45,0,0,5,41,6,254,18,38,0,60,0,0,17,7,2,150,1,91,0, +0,0,21,180,1,10,5,38,1,184,255,251,180,15,9,4,8,37,1,43,53,0,43,53,0,255, +255,0,5,254,87,3,252,5,211,18,38,0,92,0,0,17,7,1,71,0,182,0,0,0,19,64,11, +1,33,17,38,1,0,38,32,17,31,37,1,43,53,0,43,53,0,0,0,255,255,0,45,0,0,5,41, +6,178,18,38,0,60,0,0,17,7,2,152,1,104,0,0,0,23,64,13,2,1,9,5,38,2,1,0,13, +11,4,8,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,65,0,0,4,163,6,240,18,38, +0,61,0,0,17,7,2,149,1,160,0,0,0,19,64,11,1,10,5,38,1,74,10,13,1,0,37,1,43, +53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,228,18,38,0,93,0,0,17,7,0,116,1, +53,0,0,0,19,64,11,1,10,17,38,1,93,10,13,0,8,37,1,43,53,0,43,53,0,0,0,255, +255,0,65,0,0,4,163,6,241,18,38,0,61,0,0,17,7,1,75,1,124,1,37,0,19,64,11,1, +10,5,38,1,0,10,12,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182,5,204, +18,38,0,93,0,0,17,7,1,75,0,253,0,0,0,12,182,1,0,10,12,0,8,37,1,43,53,0,0, +0,255,255,0,65,0,0,4,163,6,254,18,38,0,61,0,0,17,7,2,151,1,56,0,0,0,19,64, +11,1,10,5,38,1,17,12,18,1,0,37,1,43,53,0,43,53,0,0,0,255,255,0,49,0,0,3,182, +5,211,18,38,0,93,0,0,17,7,1,72,0,156,0,0,0,21,180,1,10,17,38,1,184,255,244, +180,12,18,0,8,37,1,43,53,0,43,53,0,0,1,0,138,0,0,2,17,5,202,0,19,0,125,185, +0,5,255,216,179,13,17,72,5,184,255,224,64,56,8,12,72,111,10,1,10,10,0,70, +0,1,16,1,48,1,240,1,4,8,1,255,21,1,224,21,1,223,21,1,176,21,192,21,2,159, +21,1,112,21,128,21,2,31,21,1,0,21,1,240,21,1,223,21,1,21,184,255,192,64,18, +34,37,72,79,21,1,112,21,1,31,21,1,14,80,7,0,0,21,0,63,63,237,1,93,93,113, +43,113,113,114,114,114,114,114,114,114,114,47,94,93,237,50,47,93,49,48,0, +43,43,33,35,17,52,62,2,51,50,22,23,21,46,1,35,34,14,2,21,1,62,180,22,59,102, +81,32,69,26,17,45,18,40,51,29,11,4,180,59,101,75,43,6,6,137,3,5,22,41,60, +39,0,0,0,0,1,0,192,254,78,3,195,5,174,0,27,0,148,64,107,133,6,1,122,18,138, +18,2,139,15,1,89,15,105,15,121,15,3,131,13,1,85,13,101,13,117,13,3,54,13, +1,38,7,1,38,8,1,34,22,50,22,114,22,130,22,4,21,17,37,17,53,17,3,27,212,8, +228,8,244,8,3,80,8,144,8,2,38,8,54,8,70,8,3,8,10,27,3,13,13,17,19,3,8,95, +14,159,14,2,14,12,16,80,9,17,17,13,3,81,15,24,127,24,175,24,3,24,13,0,47, +47,93,237,18,57,47,51,237,50,1,47,113,51,23,51,17,23,51,113,113,113,47,49, +48,93,0,93,1,93,93,93,93,93,93,93,93,93,1,46,1,35,34,14,2,15,1,51,7,35,3, +35,19,35,55,51,55,62,3,51,50,22,23,3,164,17,62,31,31,46,33,24,9,26,211,25, +213,254,180,254,152,27,151,29,12,40,71,109,81,32,82,35,5,32,5,10,19,40,64, +45,137,131,250,211,5,45,131,152,59,102,76,43,10,10,0,0,0,4,0,4,0,0,5,82,7, +62,0,26,0,39,0,61,0,67,1,36,64,18,122,64,138,64,2,102,5,118,5,134,5,3,86, +6,102,6,2,25,184,255,232,64,183,9,17,72,19,24,9,17,72,12,16,14,17,72,10,12, +1,12,38,9,10,32,8,39,32,7,32,40,130,0,68,66,132,66,2,66,62,50,130,17,175, +62,191,62,207,62,3,15,17,47,17,2,144,17,1,0,0,32,0,2,15,0,159,0,2,0,62,17, +17,62,0,3,6,11,5,32,32,10,7,139,7,1,90,7,106,7,122,7,3,7,16,6,32,6,48,6,3, +32,6,1,6,6,69,80,69,176,69,2,48,69,96,69,144,69,192,69,240,69,5,47,69,1,132, +10,1,85,10,101,10,117,10,3,10,11,62,62,45,141,112,22,128,22,2,22,22,57,127, +64,159,64,175,64,191,64,4,64,64,9,13,72,64,8,9,39,38,38,10,5,12,32,3,128, +57,1,63,57,1,0,57,1,57,7,7,10,0,47,51,47,47,93,93,93,23,51,18,57,47,51,205, +50,47,43,93,18,57,47,93,237,51,47,1,47,51,93,93,93,93,113,17,51,47,93,113, +51,93,93,17,18,57,17,51,17,18,23,57,47,47,47,93,113,93,113,93,16,237,16,205, +93,16,237,16,135,192,192,135,192,192,1,51,49,48,93,43,43,43,93,93,93,1,20, +6,7,6,7,1,35,3,33,3,35,1,38,39,46,1,53,52,62,2,51,50,30,2,3,46,3,39,14,3, +7,3,33,3,52,46,2,35,34,14,2,21,20,30,1,23,22,23,51,50,62,2,3,53,55,51,21, +5,3,158,38,33,16,18,2,29,195,161,253,126,162,198,2,36,21,18,33,38,38,66,88, +50,50,88,66,38,158,16,29,22,15,1,2,14,23,29,15,180,2,15,131,21,36,49,28,29, +49,36,21,21,36,24,21,24,9,28,49,36,21,247,217,207,254,202,5,112,45,79,30, +15,11,251,68,1,115,254,141,4,185,12,17,30,79,45,45,79,59,34,34,59,79,253, +254,36,74,60,41,4,4,41,62,73,36,254,95,3,119,25,44,33,19,19,33,44,25,26,44, +35,10,8,1,19,35,44,1,35,16,181,23,174,0,255,255,0,87,255,236,4,115,7,62,18, +38,0,68,0,0,16,39,1,76,1,20,255,85,17,7,0,116,1,99,1,90,0,35,64,14,3,2,101, +16,38,4,26,106,109,3,36,37,3,2,184,255,212,180,76,66,3,36,37,1,43,53,53,43, +53,0,43,53,53,0,0,0,255,255,0,24,0,0,7,168,6,240,18,38,0,134,0,0,17,7,2,149, +3,228,0,0,0,21,180,2,27,5,38,2,184,1,32,180,27,30,4,14,37,1,43,53,0,43,53, +0,255,255,0,66,255,236,6,194,5,228,18,38,0,166,0,0,17,7,0,116,2,175,0,0,0, +19,64,11,3,89,17,38,3,73,89,92,25,61,37,1,43,53,0,43,53,0,0,0,255,255,0,71, +255,203,5,244,6,240,18,38,0,152,0,0,17,7,2,149,2,75,0,0,0,19,64,11,3,52,5, +38,3,73,52,55,10,24,37,1,43,53,0,43,53,0,0,0,255,255,0,44,255,218,4,180,5, +228,18,38,0,184,0,0,17,7,0,116,1,178,0,0,0,19,64,11,3,46,17,38,3,94,46,49, +8,19,37,1,43,53,0,43,53,0,0,0,0,1,0,0,4,177,2,150,5,211,0,9,0,66,64,14,118, +9,134,9,2,120,8,136,8,2,128,0,1,0,184,255,192,64,27,11,15,72,0,191,6,1,6, +4,142,64,8,148,128,6,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93,51,26,253,26, +237,1,47,93,204,43,93,49,48,93,93,1,21,35,39,35,7,35,53,19,51,2,150,105,219, +2,232,104,234,204,4,197,20,169,169,20,1,14,0,0,1,0,0,4,177,2,150,5,211,0, +9,0,66,64,14,118,0,134,0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,27,11,15, +72,8,64,191,2,1,2,7,3,148,128,6,142,15,1,47,1,63,1,127,1,239,1,5,1,0,47,93, +237,26,237,50,1,47,93,26,204,43,93,49,48,93,93,1,35,3,53,51,23,51,55,51,21, +1,182,204,234,104,232,2,219,105,4,177,1,14,20,169,169,20,0,0,1,0,51,4,212, +2,88,5,83,0,3,0,81,64,59,4,1,1,228,1,244,1,2,1,164,0,1,91,0,107,0,2,52,0, +68,0,2,0,2,32,18,25,72,2,142,1,64,28,33,72,47,1,1,2,15,1,63,1,175,1,191,1, +4,1,64,22,26,72,1,64,14,17,72,1,0,47,43,43,93,95,113,43,237,43,1,47,93,93, +93,47,93,113,49,48,1,33,53,33,2,88,253,219,2,37,4,212,127,0,1,255,221,4,177, +2,119,5,230,0,21,0,73,64,51,133,14,1,133,8,1,31,17,79,17,127,17,175,17,223, +17,5,239,17,1,17,64,5,64,29,60,72,5,16,80,5,96,5,2,5,149,128,11,143,15,0, +47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,237,113,50,1,47,43,26,204,93,113, +49,48,0,93,93,1,34,46,2,39,51,30,3,51,50,62,2,55,51,14,3,1,41,74,116,84,50, +8,117,8,39,56,72,42,42,71,56,38,8,117,9,50,83,116,4,177,51,85,112,61,43,59, +36,15,16,36,59,42,61,112,85,51,0,1,0,156,5,32,1,80,5,204,0,3,0,23,64,12,3, +134,0,64,14,17,72,0,0,83,1,0,0,63,237,1,47,43,237,49,48,19,53,51,21,156,180, +5,32,172,172,0,0,2,0,51,4,144,2,23,6,115,0,19,0,39,0,89,185,0,18,255,232, +64,14,9,14,72,12,24,9,14,72,8,24,9,14,72,2,184,255,232,64,42,9,14,72,20,130, +64,0,192,30,130,95,10,1,10,25,141,15,15,31,15,2,15,35,141,15,5,47,5,63,5, +79,5,127,5,159,5,191,5,239,5,8,5,0,47,93,237,220,93,237,1,47,93,237,26,220, +26,237,49,48,43,43,43,43,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,7,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,2,23,38,66,88,50,50,88,66,38,38,66, +88,50,50,88,66,38,108,21,36,49,28,29,49,36,21,21,36,49,29,28,49,36,21,5,130, +50,88,66,38,38,66,88,50,50,88,65,38,38,65,88,50,28,49,36,21,21,36,49,28,29, +49,38,21,21,38,49,0,0,0,0,1,0,80,254,85,1,174,0,0,0,23,0,76,64,55,14,24,9, +13,72,9,24,9,13,72,5,32,9,17,72,12,17,132,15,0,31,0,2,95,0,191,0,2,0,6,11, +64,7,10,72,11,20,141,16,3,1,32,3,80,3,96,3,112,3,176,3,192,3,6,3,0,47,93, +113,237,47,43,1,47,205,93,113,237,50,49,48,43,43,43,1,14,1,35,34,38,53,52, +62,2,55,51,14,3,21,20,22,51,50,54,55,1,174,28,71,40,105,106,34,48,53,20,133, +25,52,43,27,49,45,29,58,28,254,112,12,15,102,85,47,79,61,42,11,14,45,59,70, +39,42,48,13,11,0,1,255,233,4,177,2,182,5,189,0,27,2,77,185,0,26,255,232,64, +182,9,17,72,12,24,9,17,72,41,29,1,25,29,41,29,57,29,89,29,105,29,5,29,64, +229,232,72,29,64,217,220,72,11,29,1,208,169,29,185,29,201,29,3,155,29,1,9, +29,57,29,2,185,29,201,29,217,29,3,29,64,195,198,72,155,29,171,29,2,137,29, +1,123,29,1,73,29,1,137,29,185,29,2,29,64,171,175,72,6,29,54,29,2,158,153, +29,1,125,29,141,29,2,111,29,1,45,29,61,29,77,29,3,27,29,1,13,29,1,237,29, +253,29,2,29,128,136,139,72,137,29,153,29,2,91,29,107,29,123,29,3,29,192,127, +130,72,9,29,1,249,29,1,235,29,1,201,29,217,29,2,171,29,187,29,2,153,29,1, +22,29,38,29,102,29,118,29,134,29,5,4,29,1,110,29,184,255,64,64,96,101,109, +72,148,29,1,112,29,128,29,2,82,29,98,29,2,64,29,1,18,29,34,29,50,29,3,4,29, +1,228,29,244,29,2,214,29,1,196,29,1,176,29,1,162,29,1,128,29,144,29,2,82, +29,98,29,114,29,3,36,29,52,29,68,29,3,6,29,22,29,2,246,29,1,210,29,226,29, +2,192,29,1,146,29,162,29,178,29,3,100,29,116,29,132,29,3,29,184,255,192,64, +9,60,64,72,2,29,1,59,1,29,184,255,128,64,57,53,58,72,164,29,180,29,2,144, +29,1,100,29,116,29,132,29,3,48,29,64,29,80,29,3,4,29,20,29,36,29,3,208,29, +224,29,2,164,29,180,29,196,29,3,112,29,128,29,2,148,29,164,29,228,29,3,29, +184,255,192,64,19,26,31,72,128,29,1,84,29,100,29,116,29,3,29,64,7,10,72,23, +184,255,128,64,9,36,39,72,148,23,164,23,2,23,184,255,128,64,23,30,33,72,68, +23,1,48,23,1,2,0,23,16,23,32,23,3,208,23,224,23,2,23,184,255,192,64,43,13, +19,72,15,23,1,23,9,22,22,5,143,64,15,14,31,14,2,255,14,1,14,64,16,19,72,14, +128,19,143,8,15,0,47,0,63,0,127,0,239,0,5,0,0,47,93,50,237,26,221,43,93,113, +26,237,51,47,1,47,204,93,43,93,113,95,113,113,43,113,43,43,93,93,43,93,113, +113,113,114,114,114,114,114,43,95,94,93,43,93,93,93,93,93,113,113,113,113, +113,113,113,113,113,114,114,114,114,114,114,43,94,93,93,93,93,93,93,93,113, +43,113,113,43,113,114,114,114,114,114,114,94,93,43,93,113,113,113,113,43, +113,114,114,114,94,93,43,43,93,113,49,48,43,43,1,34,46,2,35,34,6,7,35,62, +3,51,50,30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45, +74,59,44,84,78,69,30,54,55,8,92,5,20,43,74,4,177,37,45,37,62,57,45,95,78, +50,37,45,37,63,56,44,95,78,51,0,0,0,2,0,22,4,177,3,25,5,228,0,5,0,11,0,111, +64,82,164,10,1,102,10,1,154,8,170,8,2,98,4,162,4,2,98,3,1,154,2,170,2,2,10, +159,6,1,15,6,31,6,127,6,223,6,4,7,6,4,64,63,0,79,0,143,0,175,0,191,0,207, +0,6,0,64,30,41,72,0,64,23,26,72,0,8,2,149,128,6,15,0,47,0,63,0,127,0,239, +0,5,0,0,47,93,50,26,237,50,1,47,43,43,93,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,93,19,53,19,51,21,1,51,53,19,51,21,1,22,217,207,254,182,253,217, +207,254,182,4,177,20,1,31,29,254,234,20,1,31,29,254,234,0,0,1,0,205,4,194, +1,225,6,7,0,5,0,64,64,43,2,16,12,17,72,41,2,1,10,5,26,5,42,5,3,3,43,3,1,3, +64,0,2,128,132,0,148,0,2,112,0,1,2,16,0,32,0,64,0,96,0,4,0,0,47,93,95,93, +93,26,205,1,47,26,205,93,49,48,95,93,93,43,19,53,19,51,21,3,205,69,207,201, +4,194,33,1,36,37,254,224,0,3,0,29,4,176,2,139,6,65,0,5,0,9,0,13,0,83,64,53, +2,16,11,17,72,10,5,26,5,42,5,3,47,4,1,4,47,1,1,1,1,6,192,13,208,13,2,13,10, +192,9,208,9,2,9,6,11,7,144,6,2,0,0,10,192,6,1,15,6,63,6,2,6,0,47,93,93,51, +51,47,205,16,237,50,1,47,205,93,47,205,93,18,57,47,113,205,93,49,48,93,43, +19,53,19,51,21,3,37,53,51,21,33,53,51,21,250,69,187,181,254,216,150,1,66, +150,4,176,33,1,112,37,254,148,31,172,172,172,172,0,0,255,255,0,4,0,0,5,82, +5,131,16,38,0,36,0,0,17,7,1,80,255,108,255,124,0,94,179,2,0,24,1,184,255, +10,181,24,24,5,5,37,28,184,255,192,179,36,36,72,28,184,255,192,179,30,30, +72,28,184,255,192,179,24,24,72,28,184,255,192,179,21,21,72,28,184,255,192, +179,18,18,72,28,184,255,192,179,15,15,72,28,184,255,192,64,11,12,12,72,28, +64,11,11,72,2,23,3,0,63,53,1,43,43,43,43,43,43,43,43,43,93,53,0,1,0,187,1, +190,1,126,2,154,0,3,2,10,179,3,134,0,5,184,255,128,64,12,229,233,72,6,5,22, +5,2,246,5,1,5,184,255,128,64,33,222,225,72,150,5,166,5,2,116,5,132,5,2,86, +5,102,5,2,68,5,1,38,5,54,5,2,2,5,18,5,2,211,5,184,255,128,64,22,207,210,72, +198,5,214,5,2,180,5,1,150,5,166,5,2,116,5,132,5,2,5,184,255,192,64,36,195, +199,72,4,5,20,5,2,214,5,230,5,246,5,3,194,5,1,148,5,164,5,180,5,3,118,5,134, +5,2,84,5,100,5,2,5,184,255,192,64,34,174,181,72,164,5,180,5,196,5,3,70,5, +86,5,118,5,134,5,150,5,5,52,5,1,38,5,1,4,5,20,5,2,161,5,184,255,192,179,157, +160,72,5,184,255,192,64,37,152,155,72,100,5,116,5,2,54,5,70,5,86,5,3,36,5, +1,6,5,22,5,2,244,5,1,214,5,230,5,2,178,5,194,5,2,5,184,255,128,64,28,135, +138,72,86,5,102,5,2,36,5,52,5,68,5,3,2,5,18,5,2,212,5,228,5,244,5,3,5,184, +255,192,64,23,119,124,72,82,5,98,5,2,1,32,5,48,5,64,5,3,4,5,20,5,2,112,5, +184,255,128,64,9,103,111,72,68,5,84,5,2,5,184,255,192,179,99,102,72,5,184, +255,128,179,92,95,72,5,184,255,192,179,87,91,72,5,184,255,128,64,21,81,86, +72,36,5,52,5,68,5,3,228,5,1,176,5,192,5,208,5,3,5,184,255,192,64,16,67,70, +72,48,5,1,36,5,1,0,5,16,5,2,60,5,184,255,192,64,12,56,59,72,187,5,1,128,5, +144,5,2,5,184,255,192,64,41,45,48,72,11,5,1,208,5,224,5,2,164,5,180,5,196, +5,3,32,5,48,5,2,2,0,5,16,5,2,240,5,1,159,5,175,5,2,0,5,1,5,184,255,192,181, +13,17,72,0,155,1,0,47,237,1,43,93,93,93,113,95,113,113,113,114,43,114,114, +43,94,93,93,93,43,93,93,113,43,43,43,43,114,43,94,93,93,95,93,43,93,113,113, +113,43,113,113,113,114,114,114,114,43,43,94,93,93,93,93,93,43,113,113,113, +113,113,114,43,114,114,114,114,43,94,93,93,93,93,93,93,43,93,113,43,47,237, +49,48,19,53,51,21,187,195,1,190,220,220,0,0,255,255,255,245,0,0,5,238,5,131, +16,39,0,40,0,240,0,0,17,7,1,80,255,40,255,124,0,49,64,10,1,14,3,1,16,15,1, +0,15,1,184,255,113,64,19,15,15,1,1,37,0,208,0,1,191,0,1,47,0,1,47,0,1,0,16, +93,93,93,93,53,43,93,93,53,0,63,53,0,0,0,255,255,255,242,0,0,6,13,5,131,16, +39,0,43,0,237,0,0,17,7,1,80,255,37,255,124,0,95,185,0,19,255,192,179,21,21, +72,19,184,255,192,179,20,20,72,19,184,255,192,179,19,19,72,19,184,255,192, +179,17,17,72,19,184,255,192,64,13,14,14,72,1,14,3,1,16,15,1,0,15,1,184,255, +113,64,19,15,15,5,5,37,0,207,0,1,191,0,1,111,0,1,47,0,1,0,16,93,93,93,93, +53,43,93,93,53,0,63,53,1,43,43,43,43,43,0,255,255,255,232,0,0,2,85,5,131, +16,39,0,44,0,217,0,0,17,7,1,80,255,27,255,124,0,92,185,0,11,255,192,179,17, +17,72,11,184,255,192,64,23,12,12,72,11,64,11,11,72,11,64,9,9,72,1,6,3,1,16, +7,1,0,7,1,184,255,102,64,28,7,7,1,1,37,0,128,0,1,127,0,1,111,0,1,95,0,1,79, +0,1,47,0,1,47,0,1,0,16,93,93,93,93,93,93,93,53,43,93,93,53,0,63,53,1,43,43, +43,43,255,255,255,187,255,236,5,211,5,150,16,38,0,50,252,0,17,7,1,80,254, +238,255,124,0,39,64,10,2,42,3,2,192,40,1,0,40,1,184,255,94,64,11,40,40,10, +10,37,1,0,47,0,1,0,16,93,53,53,43,93,93,53,0,63,53,0,0,0,255,255,0,65,0,0, +6,171,5,131,16,39,0,60,1,130,0,0,17,7,1,80,255,116,255,124,5,192,64,21,16, +64,233,233,72,16,64,229,229,72,16,64,227,227,72,16,64,226,226,72,16,184,255, +192,179,224,224,72,16,184,255,192,64,19,222,222,72,16,64,220,220,72,16,64, +219,219,72,16,64,216,216,72,16,184,255,192,179,215,215,72,16,184,255,192, +64,19,211,211,72,16,64,207,207,72,16,64,206,206,72,16,64,205,205,72,16,184, +255,192,179,204,204,72,16,184,255,192,64,19,202,202,72,16,64,199,199,72,16, +64,186,186,72,16,64,184,184,72,16,184,255,192,179,183,183,72,16,184,255,192, +64,14,182,182,72,16,64,179,179,72,16,64,177,177,72,16,184,255,192,64,19,172, +172,72,16,64,166,166,72,16,64,164,164,72,16,64,163,163,72,16,184,255,192, +64,24,161,161,72,16,64,156,156,72,16,128,153,153,72,16,64,152,152,72,16,64, +151,151,72,16,184,255,192,179,149,149,72,16,184,255,128,179,148,148,72,16, +184,255,128,179,147,147,72,16,184,255,192,179,146,146,72,16,184,255,128,179, +145,145,72,16,184,255,192,179,144,144,72,16,184,255,128,179,141,141,72,16, +184,255,128,179,140,140,72,16,184,255,192,179,139,139,72,16,184,255,128,179, +138,138,72,16,184,255,192,179,137,137,72,16,184,255,192,179,136,136,72,16, +184,255,192,179,135,135,72,16,184,255,128,179,134,134,72,16,184,255,192,179, +133,133,72,16,184,255,128,179,131,131,72,16,184,255,192,179,130,130,72,16, +184,255,0,179,129,129,72,16,184,255,0,179,128,128,72,16,184,254,192,179,127, +127,72,16,184,255,0,179,126,126,72,16,184,255,0,179,125,125,72,16,184,255, +64,179,124,124,72,16,184,255,64,179,123,123,72,16,184,255,64,179,122,122, +72,16,184,255,0,179,121,121,72,16,184,254,192,179,120,120,72,16,184,255,0, +179,119,119,72,16,184,255,0,179,118,118,72,16,184,255,64,179,117,117,72,16, +184,255,0,179,116,116,72,16,184,255,64,179,115,115,72,16,184,255,0,179,114, +114,72,16,184,255,64,179,113,113,72,16,184,255,64,179,112,112,72,16,184,255, +64,179,111,111,72,16,184,255,128,179,110,110,72,16,184,255,64,179,109,109, +72,16,184,255,128,179,108,108,72,16,184,255,0,179,107,107,72,16,184,255,64, +179,106,106,72,16,184,255,0,179,105,105,72,16,184,255,64,179,104,104,72,16, +184,255,64,179,103,103,72,16,184,255,64,179,102,102,72,16,184,255,128,179, +101,101,72,16,184,255,64,179,100,100,72,16,184,255,64,179,99,99,72,16,184, +255,0,179,98,98,72,16,184,255,64,179,97,97,72,16,184,255,64,179,96,96,72, +16,184,255,64,179,95,95,72,16,184,255,64,179,94,94,72,16,184,255,64,179,93, +93,72,16,184,255,128,179,92,92,72,16,184,255,64,179,91,91,72,16,184,255,128, +179,90,90,72,16,184,255,64,179,89,89,72,16,184,255,128,179,88,88,72,16,184, +255,64,179,87,87,72,16,184,255,64,179,86,86,72,16,184,255,64,179,85,85,72, +16,184,255,64,179,84,84,72,16,184,255,64,179,83,83,72,16,184,255,128,179, +82,82,72,16,184,255,192,179,81,81,72,16,184,255,128,179,80,80,72,16,184,255, +128,179,79,79,72,16,184,255,64,179,78,78,72,16,184,255,64,179,77,77,72,16, +184,255,64,179,76,76,72,16,184,255,128,179,75,75,72,16,184,255,128,179,74, +74,72,16,184,255,128,179,73,73,72,16,184,255,64,179,72,72,72,16,184,255,128, +179,71,71,72,16,184,255,192,179,70,70,72,16,184,255,128,179,69,69,72,16,184, +255,192,179,68,68,72,16,184,255,192,179,67,67,72,16,184,255,128,179,66,66, +72,16,184,255,64,179,65,65,72,16,184,255,128,179,64,64,72,16,184,255,128, +179,63,63,72,16,184,255,128,179,62,62,72,16,184,255,192,179,61,61,72,16,184, +255,192,179,60,60,72,16,184,255,192,179,59,59,72,16,184,255,128,179,58,58, +72,16,184,255,128,179,57,57,72,16,184,255,128,179,56,56,72,16,184,255,128, +179,55,55,72,16,184,255,128,179,54,54,72,16,184,255,192,179,53,53,72,16,184, +255,192,179,52,52,72,16,184,255,128,179,51,51,72,16,184,255,192,179,50,50, +72,16,184,255,128,179,49,49,72,16,184,255,128,179,48,48,72,16,184,255,128, +179,47,47,72,16,184,255,192,179,46,46,72,16,184,255,128,179,45,45,72,16,184, +255,128,179,44,44,72,16,184,255,128,179,43,43,72,16,184,255,192,179,42,42, +72,16,184,255,192,179,41,41,72,16,184,255,192,179,40,40,72,16,184,255,192, +179,39,39,72,16,184,255,128,179,38,38,72,16,184,255,128,179,37,37,72,16,184, +255,128,179,36,36,72,16,184,255,192,179,35,35,72,16,184,255,128,179,34,34, +72,16,184,255,192,179,33,33,72,16,184,255,192,179,32,32,72,16,184,255,192, +179,31,31,72,16,184,255,192,179,30,30,72,16,184,255,192,179,29,29,72,16,184, +255,192,179,28,28,72,16,184,255,192,179,27,27,72,16,184,255,192,179,26,26, +72,16,184,255,192,179,25,25,72,16,184,255,192,179,24,24,72,16,184,255,128, +179,23,23,72,16,184,255,192,179,22,22,72,16,184,255,192,179,21,21,72,16,184, +255,192,179,17,17,72,16,184,255,128,179,16,16,72,16,184,255,192,179,15,15, +72,16,184,255,192,179,14,14,72,16,184,255,192,64,30,12,12,72,16,64,11,11, +72,1,11,3,1,128,12,1,112,12,1,96,12,1,64,12,1,16,12,1,0,12,1,184,255,166, +64,13,12,12,4,4,37,0,176,0,1,0,0,1,0,16,93,93,53,43,93,93,93,93,93,93,53, +0,63,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,187,0,0, +5,173,5,150,16,38,1,114,10,0,17,7,1,80,254,238,255,124,0,68,64,15,65,64,19, +19,72,1,60,3,1,144,58,1,16,58,1,184,255,62,64,28,58,58,53,53,37,0,159,0,1, +95,0,1,31,0,1,223,0,1,175,0,1,159,0,1,31,0,1,0,16,93,93,93,93,113,113,113, +53,43,93,93,53,0,63,53,1,43,0,0,255,255,255,176,0,0,2,30,6,65,16,38,1,130, +0,0,17,6,1,81,147,0,2,60,64,11,29,64,227,227,72,29,64,226,226,72,29,184,255, +192,179,223,223,72,29,184,255,192,179,220,220,72,29,184,255,192,64,19,219, +219,72,29,64,213,213,72,29,64,212,212,72,29,64,211,211,72,29,184,255,192, +179,207,207,72,29,184,255,192,179,206,206,72,29,184,255,192,64,19,205,205, +72,29,64,200,200,72,29,64,199,199,72,29,64,198,198,72,29,184,255,192,64,14, +192,192,72,29,64,182,182,72,29,64,177,177,72,29,184,255,192,179,175,175,72, +29,184,255,192,64,19,174,174,72,29,64,168,168,72,29,64,167,167,72,29,64,164, +164,72,29,184,255,192,179,161,161,72,29,184,255,192,64,19,160,160,72,29,64, +155,155,72,29,64,154,154,72,29,64,153,153,72,29,184,255,192,179,152,152,72, +29,184,255,192,64,19,151,151,72,29,64,141,141,72,29,64,132,132,72,29,64,131, +131,72,29,184,255,192,64,9,129,129,72,29,64,119,119,72,29,184,255,192,64, +14,115,115,72,29,64,110,110,72,29,64,109,109,72,29,184,255,192,64,19,106, +106,72,29,64,101,101,72,29,64,100,100,72,29,64,96,96,72,29,184,255,192,179, +94,94,72,29,184,255,192,64,19,93,93,72,29,64,87,87,72,29,64,86,86,72,29,64, +85,85,72,29,184,255,192,179,84,84,72,29,184,255,192,64,9,79,79,72,29,64,74, +74,72,29,184,255,192,64,24,61,61,72,29,64,56,56,72,29,64,55,55,72,29,64,54, +54,72,29,64,51,51,72,29,184,255,192,179,50,50,72,29,184,255,192,179,49,49, +72,29,184,255,192,64,19,48,48,72,29,64,42,42,72,29,64,41,41,72,29,64,40,40, +72,29,184,255,192,179,36,36,72,29,184,255,192,179,35,35,72,29,184,255,192, +64,19,34,34,72,29,64,29,29,72,29,64,24,24,72,29,64,23,23,72,29,184,255,192, +179,21,21,72,29,184,255,192,179,17,17,72,29,184,255,192,64,14,16,16,72,29, +64,9,9,72,29,64,8,8,72,29,184,255,192,64,12,7,7,72,3,2,1,14,17,38,3,2,1,184, +255,220,180,20,26,5,13,37,1,43,53,53,53,0,43,53,53,53,1,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,0,4,0,0,5,82,5,129, +18,6,0,36,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,0,1,0,168,0,1,4, +47,5,130,0,5,0,56,64,40,3,90,0,4,16,4,64,4,3,4,16,0,48,0,80,0,3,0,0,16,0, +32,0,64,0,96,0,128,0,160,0,7,7,0,2,95,5,3,3,18,0,63,63,237,1,47,94,93,113, +47,93,237,49,48,1,21,33,17,35,17,4,47,253,56,191,5,130,156,251,27,5,129,0, +2,0,61,0,0,5,26,5,129,0,5,0,18,0,176,64,26,106,7,122,7,138,7,3,101,17,117, +17,133,17,3,89,8,1,86,16,1,6,24,13,17,72,18,184,255,232,64,64,13,17,72,132, +2,1,70,2,102,2,118,2,3,139,1,1,73,1,105,1,121,1,3,2,1,12,12,0,6,95,3,1,16, +3,1,15,3,1,175,3,207,3,223,3,255,3,4,79,3,127,3,2,48,3,1,31,3,1,3,18,128, +0,1,0,184,255,192,64,29,21,30,72,0,48,20,1,47,20,1,0,3,6,3,18,95,5,18,12, +32,19,22,72,153,12,1,12,1,3,0,63,51,93,43,63,237,23,50,1,93,93,47,43,93,51, +47,93,93,93,93,113,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93,43,43,93, +93,93,93,49,48,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,62,2,5,217,1,254,251, +35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12,141, +156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,255,255,0,168,0,0,4,254,5,129, +18,6,0,40,0,0,255,255,0,65,0,0,4,163,5,129,18,6,0,61,0,0,255,255,0,168,0, +0,5,32,5,129,18,6,0,43,0,0,0,3,0,97,255,236,5,215,5,150,0,19,0,39,0,43,0, +179,64,130,105,12,1,102,17,1,89,22,1,86,32,1,86,28,1,26,23,90,23,2,21,27, +85,27,2,9,42,1,6,43,1,10,37,26,37,90,37,3,5,33,21,33,85,33,3,9,43,42,30,0, +91,15,20,1,59,207,20,239,20,2,0,20,1,239,20,255,20,2,176,20,1,111,20,1,48, +20,1,31,20,1,0,20,16,20,32,20,64,20,80,20,160,20,6,7,20,30,91,175,10,191, +10,2,32,10,1,15,10,31,10,2,10,43,95,40,40,35,25,95,15,4,35,95,5,19,128,45, +1,32,45,1,93,93,0,63,237,63,237,18,57,47,237,1,47,93,93,93,237,47,94,93,113, +113,113,113,113,114,114,94,93,237,18,57,57,49,48,94,93,93,93,93,93,93,93, +93,93,93,93,1,20,2,6,4,35,34,36,38,2,53,52,18,54,36,51,50,4,22,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,37,33,21,33,5,215,95,180,254,252,165,174, +254,250,174,88,92,178,1,5,169,168,1,5,177,92,195,65,127,188,123,126,190,127, +63,65,127,189,123,132,191,123,59,252,226,2,75,253,181,2,199,165,254,242,192, +104,109,195,1,12,159,165,1,10,187,101,102,188,254,246,163,127,208,148,80, +80,148,208,127,127,211,153,85,86,153,212,208,160,0,0,0,255,255,0,189,0,0, +1,124,5,129,18,6,0,44,0,0,255,255,0,168,0,0,5,63,5,129,18,6,0,46,0,0,0,1, +0,10,0,1,5,78,5,130,0,16,0,202,64,11,116,16,132,16,2,123,15,139,15,2,13,184, +255,232,182,14,17,72,54,13,1,12,184,255,240,64,127,13,17,72,2,16,13,17,72, +1,24,14,17,72,57,1,1,111,18,1,48,18,1,47,18,1,0,18,1,21,16,37,16,53,16,3, +6,16,1,230,16,246,16,2,16,26,15,42,15,58,15,3,9,15,1,233,15,249,15,2,15,7, +7,21,13,37,13,53,13,3,6,13,1,230,13,246,13,2,13,175,14,191,14,2,14,26,1,42, +1,58,1,3,9,1,1,233,1,249,1,2,1,16,0,32,0,48,0,3,111,0,1,0,0,48,0,2,0,118, +7,134,7,2,7,15,3,14,0,18,0,63,50,63,51,93,1,47,93,93,113,50,93,113,113,47, +93,51,93,113,113,57,61,47,51,93,113,113,51,93,113,113,93,93,93,93,49,48,93, +43,43,43,93,43,93,93,37,35,1,46,1,39,38,39,6,7,14,1,7,1,35,1,51,5,78,201, +254,124,17,29,12,14,12,13,14,12,30,15,254,122,201,2,63,198,1,3,224,47,89, +35,41,37,39,41,35,89,45,252,32,5,129,0,255,255,0,168,0,0,6,2,5,129,18,6,0, +48,0,0,255,255,0,168,0,0,5,32,5,129,18,6,0,49,0,0,0,3,0,90,0,0,4,217,5,129, +0,3,0,7,0,11,0,75,64,49,82,3,1,10,9,5,3,95,6,1,15,6,31,6,175,6,191,6,4,6, +2,16,5,48,5,2,32,5,64,5,112,5,160,5,4,5,10,95,11,11,0,7,95,6,18,3,95,0,3, +0,63,237,63,237,17,57,47,237,1,47,93,113,51,47,93,113,51,18,57,57,49,48,113, +19,33,21,33,1,21,33,53,1,21,33,53,125,4,57,251,199,4,92,251,129,3,228,252, +183,5,129,156,251,183,156,156,2,133,154,154,0,0,0,255,255,0,97,255,236,5, +215,5,150,18,6,0,50,0,0,0,1,0,168,0,0,5,32,5,129,0,7,0,79,64,40,3,90,0,4, +16,4,64,4,3,7,4,7,90,64,111,0,127,0,143,0,191,0,4,0,0,9,128,32,9,1,32,9,160, +9,176,9,192,9,4,9,184,255,192,64,10,14,17,72,2,95,5,3,4,0,18,0,63,50,63,237, +1,43,93,113,26,16,204,47,93,26,237,47,94,93,237,49,48,33,17,33,17,35,17,33, +17,4,97,253,6,191,4,120,4,224,251,32,5,129,250,127,255,255,0,168,0,0,4,234, +5,129,18,6,0,51,0,0,0,1,0,108,0,0,4,161,5,129,0,12,0,188,64,135,169,3,1,105, +9,1,116,9,132,9,164,9,3,148,8,164,8,2,87,8,103,8,2,145,7,1,84,7,100,7,2,146, +10,162,10,2,116,10,132,10,2,70,10,86,10,102,10,3,57,3,185,3,2,249,3,1,103, +3,1,168,8,1,103,8,1,8,100,2,1,39,2,1,175,6,1,2,6,2,6,1,208,11,1,0,11,16,11, +48,11,80,11,96,11,128,11,6,7,11,70,7,1,11,7,1,7,3,3,10,175,1,191,1,2,32,1, +1,15,1,1,1,3,7,95,9,2,8,3,0,4,3,1,10,95,0,18,0,63,237,50,63,18,23,57,237, +50,1,47,93,93,93,51,51,47,51,113,113,47,94,93,93,18,57,57,47,47,93,113,113, +51,113,113,113,113,114,49,48,93,93,93,93,93,93,93,93,113,93,51,53,9,1,53, +33,21,33,1,21,1,33,21,108,2,26,253,247,3,231,252,240,1,202,254,22,3,109,162, +2,67,1,251,161,156,254,67,124,253,240,156,0,255,255,0,46,0,0,4,180,5,129, +18,6,0,55,0,0,255,255,0,45,0,0,5,41,5,129,18,6,0,60,0,0,0,3,0,117,255,245, +5,238,5,139,0,29,0,40,0,51,0,180,185,0,28,255,240,179,12,15,72,17,184,255, +240,179,12,15,72,27,184,255,240,179,12,15,72,18,184,255,240,64,72,12,15,72, +41,90,11,15,123,15,171,15,3,15,8,30,90,4,0,116,0,164,0,3,0,35,24,7,90,47, +21,4,8,1,20,8,36,8,68,8,116,8,164,8,244,8,6,8,20,53,68,53,2,0,53,1,132,53, +164,53,196,53,244,53,4,112,53,1,2,96,53,1,53,184,255,192,64,24,10,13,72,35, +46,96,10,6,10,34,49,96,20,24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57, +47,47,17,51,16,237,50,17,51,16,237,50,1,43,93,95,93,93,113,113,47,93,113, +51,51,253,50,50,220,93,237,16,220,93,237,49,48,0,43,43,43,43,1,20,14,2,43, +1,21,35,53,35,34,46,2,53,52,62,2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17, +51,50,62,2,37,20,30,2,59,1,17,35,34,6,5,238,64,131,197,133,83,185,83,133, +197,131,64,67,133,201,135,72,185,71,135,202,133,67,192,185,183,48,56,92,136, +89,43,252,7,43,89,136,92,56,52,182,182,2,224,105,188,143,84,227,227,84,143, +188,105,113,185,131,72,182,182,72,131,185,117,187,180,253,22,53,98,140,88, +88,140,98,53,2,234,180,255,255,0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,145, +0,0,6,30,5,129,0,35,0,203,64,127,90,31,106,31,2,85,30,101,30,2,90,4,106,4, +2,90,5,106,5,2,74,22,1,69,13,1,3,25,90,100,28,1,132,28,148,28,2,28,19,35, +90,0,10,90,107,7,1,139,7,155,7,2,7,16,219,0,1,4,0,100,0,132,0,3,219,0,1,4, +0,52,0,68,0,100,0,132,0,148,0,180,0,196,0,8,7,0,4,37,36,37,52,37,68,37,132, +37,196,37,212,37,7,228,37,244,37,2,160,37,1,132,37,148,37,2,96,37,112,37, +2,84,37,1,64,37,1,2,37,184,255,192,64,18,9,12,72,34,2,96,19,239,15,1,15,15, +26,17,8,3,0,18,0,63,63,51,51,57,47,93,51,237,50,1,43,95,93,93,93,93,93,93, +113,47,94,93,93,113,113,51,220,93,113,237,16,253,50,220,93,113,237,49,48, +95,93,93,93,0,93,1,93,0,93,33,17,35,34,46,2,53,17,51,17,20,30,2,59,1,17,51, +17,51,50,62,2,53,17,51,17,20,14,2,43,1,17,2,251,83,133,201,134,67,191,47, +93,139,92,56,185,56,95,140,91,45,191,68,134,201,132,83,1,171,84,142,189,104, +1,207,254,45,80,137,100,57,3,73,252,183,57,100,137,80,1,211,254,49,104,189, +142,84,254,85,0,0,0,1,0,87,0,0,5,163,5,150,0,57,0,225,64,91,101,36,1,101, +22,1,157,49,1,143,49,1,49,16,11,15,72,157,9,1,143,9,1,9,16,11,15,72,116,3, +132,3,2,54,3,1,54,2,118,2,2,54,56,118,56,2,116,55,132,55,2,54,55,1,42,26, +1,42,32,1,41,53,48,40,10,18,96,40,112,40,144,40,3,111,18,127,18,159,18,3, +40,18,40,18,24,34,91,80,53,1,53,184,255,192,64,69,27,30,72,191,53,207,53, +2,48,53,1,53,17,5,91,31,24,79,24,2,224,24,1,15,24,31,24,95,24,207,24,223, +24,5,160,24,1,111,24,159,24,2,0,24,32,24,48,24,3,8,24,95,59,1,10,15,19,39, +48,5,42,95,18,41,18,29,95,0,4,0,63,237,63,51,237,23,50,1,93,47,94,93,93,93, +113,113,114,253,196,47,93,93,43,114,237,17,57,57,47,47,93,93,17,51,17,51, +16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,1,50,30,2, +21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46,2,35,34,14,2,21,20,30, +2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,2,253,151,241,168,90,59,109, +157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116,169,108,109,170,116, +61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109,59,90,168,241,5,150, +86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51,126,143,159,85,116,181, +124,65,65,124,181,116,85,159,143,126,51,224,156,4,2,3,2,54,138,167,191,106, +147,234,162,86,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2,152,218, +0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,3,0,45, +0,0,5,41,6,178,0,8,0,12,0,16,2,114,64,20,30,7,1,12,7,1,7,24,12,15,72,17,5, +1,3,5,1,16,3,5,184,255,232,64,255,12,15,72,12,133,9,16,133,64,13,5,4,14,2, +1,8,14,7,105,8,169,8,2,6,8,22,8,54,8,70,8,4,14,8,6,1,90,38,2,86,2,150,2,3, +118,2,230,2,2,57,2,73,2,2,6,2,1,16,2,153,18,169,18,201,18,3,86,18,1,9,18, +57,18,2,25,18,89,18,137,18,249,18,4,6,18,1,202,249,18,1,230,18,1,9,18,25, +18,185,18,201,18,4,198,18,1,89,18,121,18,169,18,3,54,18,1,41,18,57,18,185, +18,233,18,4,11,18,1,153,249,18,1,198,18,214,18,2,178,18,1,164,18,1,150,18, +1,130,18,1,116,18,1,86,18,102,18,2,66,18,1,36,18,52,18,2,18,18,1,4,18,1,244, +18,1,230,18,1,196,18,212,18,2,166,18,182,18,2,146,18,1,132,18,1,118,18,1, +98,18,1,84,18,1,54,18,70,18,2,36,18,1,22,18,1,4,18,1,242,18,1,1,208,18,224, +18,2,196,18,1,160,18,176,18,2,148,18,1,112,18,1,100,18,1,64,18,1,20,18,36, +18,52,18,3,0,18,1,105,64,202,228,18,244,18,2,208,18,1,164,18,180,18,196,18, +3,128,18,144,18,2,116,18,1,80,18,96,18,2,68,18,1,32,18,1,4,18,20,18,2,244, +18,1,224,18,1,196,18,212,18,2,176,18,1,84,18,100,18,116,18,148,18,164,18, +5,48,18,64,18,2,36,18,1,0,18,1,196,18,244,18,2,144,18,1,4,18,20,18,36,18, +68,18,84,18,116,18,132,18,7,57,224,18,1,132,18,164,18,212,18,3,112,18,1,4, +18,36,18,52,18,84,18,100,18,5,228,18,244,18,2,192,18,1,180,18,1,144,18,1, +4,18,20,18,52,18,84,18,132,18,5,212,18,228,18,2,187,18,1,164,18,1,112,18, +1,2,48,18,96,18,2,15,18,47,18,2,10,14,145,9,95,13,1,13,64,9,12,72,13,0,3, +59,3,75,3,123,3,3,3,1,8,4,3,1,18,0,63,63,51,18,57,93,17,51,47,43,93,51,237, +50,1,93,93,95,93,93,93,93,113,113,113,113,113,114,114,114,114,94,93,93,93, +113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,95,93,113,113,113,113,113,113,113,113,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,114,114,94,93,93,113,113, +113,114,114,114,94,93,93,113,113,113,47,94,93,93,93,113,253,57,206,94,93, +93,50,43,1,24,16,77,230,50,47,26,237,220,237,49,48,43,95,94,93,93,43,93,93, +1,17,35,19,1,51,9,1,51,37,53,51,21,33,53,51,21,3,9,190,2,253,224,205,1,178, +1,176,205,253,249,163,253,211,165,2,72,253,184,2,72,3,57,253,97,2,159,121, +184,184,184,184,255,255,0,86,255,236,4,101,6,7,18,38,1,122,0,0,17,7,1,80, +1,33,0,0,0,19,64,11,2,60,17,38,2,26,60,63,8,23,37,1,43,53,0,43,53,0,0,0,255, +255,0,70,255,236,3,106,6,7,18,38,1,126,0,0,17,7,1,80,0,202,0,0,0,19,64,11, +1,58,17,38,1,73,58,61,16,6,37,1,43,53,0,43,53,0,0,0,255,255,0,106,254,88, +3,238,6,7,18,38,1,128,0,0,17,7,1,80,1,57,0,0,0,19,64,11,1,36,17,38,1,100, +36,39,17,34,37,1,43,53,0,43,53,0,0,0,255,255,0,137,0,0,1,178,6,7,18,38,1, +130,0,0,17,6,1,80,209,0,0,27,64,17,1,14,17,38,1,16,14,1,0,14,1,29,14,17,5, +13,37,1,43,93,93,53,0,43,53,0,255,255,0,133,255,236,3,254,6,65,18,38,1,142, +0,0,17,7,1,81,0,222,0,0,0,30,64,9,3,2,1,32,17,38,3,2,1,184,255,241,180,38, +44,10,0,37,1,43,53,53,53,0,43,53,53,53,0,2,0,86,255,236,4,101,4,78,0,39,0, +59,1,15,64,196,122,48,138,48,2,121,52,137,52,2,101,43,1,90,58,106,58,2,54, +14,70,14,2,29,31,45,31,2,29,38,45,38,2,47,37,1,29,37,1,75,36,107,36,2,47, +36,63,36,2,29,36,1,139,35,1,47,35,1,29,35,1,47,34,1,29,34,1,47,22,1,27,22, +1,47,21,1,27,21,1,75,20,107,20,2,47,20,1,27,20,1,45,19,1,27,19,1,121,6,137, +6,2,11,6,27,6,2,34,48,18,22,72,34,33,22,48,18,22,72,22,23,26,33,42,33,2,73, +23,1,26,23,42,23,2,33,23,159,28,175,28,191,28,3,28,64,29,33,72,28,64,0,16, +22,34,4,144,50,160,50,176,50,3,127,50,1,32,50,64,50,2,50,61,128,40,71,8,16, +61,1,0,50,28,16,4,23,33,21,23,15,55,80,11,16,45,80,5,22,0,63,237,63,237,63, +63,18,23,57,1,93,47,237,26,16,220,93,93,93,23,50,26,205,43,93,50,50,93,93, +93,17,51,43,17,51,43,49,48,0,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,93,93,93,93,93,93,93,0,93,1,93,0,93,1,93,37,14,3,35,34,2,17,16,18, +51,50,30,2,23,51,62,3,55,51,14,3,7,30,3,23,35,46,3,39,1,20,30,2,51,50,62, +2,55,46,3,35,34,14,2,3,75,26,65,87,111,70,205,193,217,209,69,112,86,63,20, +2,4,14,19,23,13,188,22,46,39,30,5,3,23,31,36,18,183,11,21,16,13,3,253,196, +28,59,93,66,54,100,82,61,14,12,45,71,102,70,66,96,64,31,237,56,94,69,38,1, +20,1,24,1,28,1,26,39,69,93,54,21,56,63,65,30,47,128,139,139,58,103,175,144, +110,39,28,66,65,58,20,1,49,112,160,103,48,52,107,160,108,86,154,115,68,46, +102,163,0,2,0,142,254,87,4,73,5,204,0,32,0,62,0,185,64,68,149,20,1,154,16, +1,123,7,139,7,2,122,60,138,60,2,106,3,122,3,138,3,3,102,31,118,31,2,74,50, +90,50,106,50,3,21,2,37,2,101,2,117,2,133,2,5,147,21,1,21,21,37,21,2,28,48, +23,72,52,48,48,64,48,2,96,48,1,48,184,255,192,64,58,20,23,72,48,52,48,52, +14,0,72,64,48,43,64,43,160,43,3,160,43,176,43,192,43,3,43,64,128,33,13,70, +0,14,16,14,48,14,3,8,14,28,48,80,49,49,38,57,80,18,0,13,27,33,38,80,9,5,22, +0,63,51,237,50,63,63,237,18,57,47,237,57,1,47,94,93,237,50,26,16,220,93,113, +26,237,18,57,57,47,47,43,93,113,16,237,17,57,49,48,93,93,93,93,93,0,93,93, +93,1,93,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35,17,52,54,51,50,30,2,21, +20,14,2,7,30,3,1,30,3,51,50,62,2,53,52,46,2,35,53,62,1,53,52,46,2,35,34,14, +2,21,4,73,53,111,173,120,102,160,56,6,3,3,180,228,226,99,152,102,53,35,61, +81,46,57,114,91,56,252,249,28,71,81,87,43,72,110,73,38,38,81,128,89,127,113, +27,57,87,60,70,104,68,34,1,149,89,154,116,66,55,39,57,92,53,254,215,5,172, +237,220,47,90,130,82,73,111,82,56,18,11,55,93,137,254,218,19,34,25,14,41, +76,106,66,65,110,81,45,142,27,139,122,44,77,57,32,35,77,122,88,0,0,0,0,1, +0,7,254,88,3,249,4,58,0,24,0,237,64,59,59,22,75,22,2,41,22,1,59,21,75,21, +2,26,21,42,21,2,9,21,1,42,12,58,12,74,12,3,25,12,1,77,13,1,13,16,13,16,72, +66,2,1,54,2,1,34,2,1,6,2,22,2,2,13,2,1,1,17,1,184,255,240,64,76,13,16,72, +24,15,7,7,13,14,16,15,14,47,14,2,57,31,14,63,14,95,14,127,14,159,14,191,14, +223,14,255,14,8,63,14,127,14,159,14,191,14,223,14,255,14,6,0,14,32,14,2,224, +14,1,191,14,1,160,14,1,95,14,159,14,2,0,14,16,14,64,14,3,8,14,1,0,184,255, +240,64,17,127,0,1,0,64,26,1,0,26,48,26,96,26,144,26,4,26,184,255,192,64,14, +21,26,72,7,15,24,3,25,20,27,13,13,0,15,0,63,50,47,63,17,23,51,1,43,93,113, +47,93,56,50,47,94,93,93,93,93,93,113,113,114,94,93,56,51,57,61,47,51,51,49, +48,43,94,93,94,93,93,93,93,43,93,93,93,93,93,93,93,93,19,51,19,30,3,23,62, +3,55,19,51,1,14,3,7,35,62,1,55,7,192,245,7,21,20,17,4,5,18,21,22,8,239,191, +254,122,17,31,27,23,7,191,17,48,24,4,58,253,93,22,63,67,63,22,21,62,67,63, +22,2,165,251,251,45,111,124,132,65,131,213,91,0,0,0,2,0,86,255,236,4,29,5, +204,0,19,0,50,0,156,64,81,115,28,131,28,2,106,28,1,118,46,134,46,2,106,46, +1,90,2,106,2,2,90,17,106,17,2,85,13,101,13,2,114,26,130,26,2,38,26,1,128, +25,1,114,25,1,51,25,67,25,2,50,50,31,71,0,64,25,46,5,47,47,41,31,0,1,144, +0,1,0,52,128,10,71,31,41,1,41,47,20,80,5,184,255,224,64,22,23,28,72,5,24, +18,22,72,111,5,1,90,5,1,5,46,48,0,15,80,36,22,0,63,237,63,57,57,93,93,43, +43,237,50,1,47,93,237,26,16,204,93,113,17,57,47,57,57,51,26,16,237,50,47, +49,48,93,93,93,93,93,93,93,93,93,93,93,93,1,52,46,2,39,14,3,21,20,30,2,51, +50,62,2,1,34,46,2,39,1,30,3,21,20,14,2,35,34,46,2,53,52,62,2,55,1,53,33,21, +3,96,49,69,76,26,73,134,102,60,35,73,111,77,81,112,69,31,254,255,13,42,45, +41,13,1,60,54,102,79,49,64,123,180,115,114,180,125,66,73,127,169,96,254,193, +2,221,1,215,85,145,115,86,27,26,81,114,146,91,76,131,96,55,54,95,131,3,191, +2,3,2,1,254,188,55,116,134,159,97,110,182,131,72,68,127,183,115,112,176,135, +97,33,1,83,119,132,0,1,0,70,255,236,3,106,4,78,0,57,0,179,64,49,140,37,1, +133,3,1,53,36,69,36,2,55,34,1,42,8,1,37,5,1,14,24,9,12,72,10,29,26,29,42, +29,3,42,70,21,48,27,48,27,48,16,35,35,6,64,37,48,72,6,184,255,192,179,14, +17,72,6,184,255,192,64,66,8,11,72,6,59,53,71,31,16,63,16,79,16,95,16,4,16, +64,37,43,72,16,128,59,1,31,59,95,59,2,21,48,80,15,47,31,47,79,47,95,47,175, +47,223,47,239,47,7,191,47,207,47,2,47,47,0,39,80,36,32,16,0,80,5,11,22,0, +63,51,237,63,51,237,18,57,47,93,113,237,57,1,93,113,47,43,93,237,16,198,43, +43,43,50,47,17,57,57,47,47,18,57,237,49,48,93,43,0,93,1,93,0,93,93,93,93, +37,50,62,2,55,23,14,3,35,34,46,2,53,52,62,2,55,53,46,3,53,52,62,2,51,50,22, +23,7,46,1,35,34,6,21,20,30,2,51,21,34,14,2,21,20,30,2,1,200,54,96,79,63,21, +105,32,84,106,130,78,96,141,92,45,42,72,96,54,51,85,61,34,50,95,136,87,118, +191,67,128,47,125,75,91,96,55,97,131,75,72,139,109,66,29,52,74,114,31,48, +56,26,100,39,71,53,32,46,84,116,69,58,95,69,42,5,2,6,40,64,86,51,62,106,77, +44,86,99,88,71,68,85,74,57,70,37,12,135,11,40,80,69,45,69,46,24,0,0,0,1,0, +86,254,159,3,96,5,204,0,56,0,209,64,117,169,38,1,156,29,172,29,2,149,55,165, +55,2,173,39,1,124,39,140,39,156,39,3,117,8,1,115,2,1,100,36,132,36,148,36, +164,36,4,139,24,155,24,171,24,3,57,24,1,44,31,156,31,172,31,3,44,30,60,30, +76,30,3,100,54,132,54,164,54,3,38,54,86,54,2,240,47,1,47,47,21,0,71,33,40, +50,50,10,31,21,79,21,2,191,21,1,21,64,29,33,72,0,21,16,21,32,21,64,21,4,7, +21,50,47,80,5,26,0,184,255,240,64,31,19,22,72,135,0,151,0,2,218,33,1,169, +33,185,33,201,33,3,136,33,152,33,2,26,33,0,3,15,48,0,15,0,47,63,18,23,57, +93,93,93,93,43,17,51,237,50,1,47,94,93,43,93,113,205,50,47,51,47,237,18,57, +47,113,49,48,93,93,93,93,0,93,93,1,93,0,93,93,1,93,93,93,0,93,1,93,1,20,30, +2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,55,53,14,3,35, +33,53,33,21,14,5,1,21,43,74,100,57,54,111,90,58,18,26,29,10,126,9,19,16,11, +36,66,94,57,42,89,82,73,54,31,49,85,113,127,135,64,12,34,36,34,11,254,167, +2,130,62,131,123,108,81,47,1,123,64,79,49,31,15,15,34,57,88,68,34,68,62,51, +17,56,12,33,38,39,19,34,45,33,25,13,10,23,36,50,74,100,67,83,176,176,175, +166,155,68,4,1,1,1,1,131,127,70,157,166,172,171,166,0,0,0,0,1,0,106,254,88, +3,238,4,78,0,35,0,100,185,0,32,255,232,64,46,9,12,72,35,70,64,80,0,1,159, +0,255,0,2,0,37,128,23,12,70,192,13,1,0,13,16,13,48,13,224,13,240,13,5,8,13, +240,37,1,255,37,1,112,37,1,37,184,255,192,64,14,19,23,72,35,27,23,6,80,29, +16,17,15,12,21,0,63,63,63,237,50,63,1,43,93,93,113,47,94,93,113,237,50,26, +16,220,93,113,26,237,49,48,43,1,17,52,46,2,35,34,14,2,21,17,35,17,52,38,39, +51,30,3,21,51,62,3,51,50,30,2,21,17,3,57,23,52,85,63,64,103,73,40,180,22, +14,170,9,14,10,5,3,26,62,82,106,70,90,130,84,39,254,88,4,86,79,106,65,27, +45,85,125,81,253,141,3,83,68,121,42,21,48,49,47,20,47,76,53,29,44,92,145, +100,251,135,0,0,0,0,3,0,106,255,236,4,9,5,203,0,15,0,26,0,37,0,194,64,108, +153,19,169,19,2,150,24,166,24,2,138,2,1,133,5,1,138,14,1,133,10,1,124,36, +140,36,2,115,29,131,29,2,85,29,101,29,2,124,18,140,18,2,74,18,90,18,106,18, +3,115,25,131,25,2,69,25,85,25,101,25,3,6,13,22,13,2,6,10,1,9,5,1,9,2,1,7, +33,0,71,64,15,21,31,21,127,21,143,21,239,21,255,21,6,21,64,45,48,72,21,39, +128,32,22,71,32,8,1,8,184,255,192,183,29,35,72,8,48,39,1,39,184,255,192,64, +19,30,35,72,223,39,1,22,80,32,32,16,27,80,11,0,16,80,3,22,0,63,237,63,237, +18,57,47,237,1,93,43,113,47,43,93,237,50,26,16,220,43,113,26,237,51,49,48, +0,94,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,1,16,2,35,34,46, +1,2,53,16,18,51,50,30,1,18,1,50,62,2,55,33,30,3,19,34,14,2,7,33,46,3,4,9, +240,228,108,171,118,62,233,232,121,175,112,54,254,42,62,100,73,42,3,253,221, +3,44,71,94,66,62,99,72,42,3,2,35,3,40,69,97,2,221,254,131,254,140,92,186, +1,27,192,1,117,1,121,93,188,254,231,252,216,52,128,216,164,164,215,129,52, +4,217,51,126,212,161,161,212,126,51,0,0,0,1,0,137,0,0,1,141,4,58,0,13,1,13, +64,210,13,8,70,207,5,223,5,2,0,5,32,5,208,5,3,9,5,5,14,15,95,15,111,15,2, +32,15,1,224,15,240,15,2,111,15,127,15,143,15,3,0,15,16,15,32,15,3,205,207, +15,223,15,239,15,3,96,15,1,127,15,207,15,2,64,15,80,15,2,175,15,223,15,239, +15,3,96,15,112,15,2,15,15,31,15,2,154,255,15,1,208,15,224,15,2,63,15,1,159, +15,175,15,2,112,15,1,223,15,1,144,15,1,63,15,79,15,2,0,15,1,106,159,15,223, +15,239,15,3,96,15,112,15,2,15,15,1,239,15,255,15,2,128,15,208,15,2,63,15, +1,96,15,1,15,15,31,15,2,55,207,15,255,15,2,144,15,160,15,176,15,3,31,15,47, +15,63,15,3,176,15,192,15,208,15,3,15,15,31,15,111,15,3,144,15,160,15,224, +15,3,31,15,63,15,2,0,15,1,7,6,15,0,21,0,63,63,1,94,93,93,93,113,113,114,114, +114,94,93,93,113,113,113,114,114,114,94,93,93,93,93,113,113,114,114,114,94, +93,93,93,113,113,114,114,94,93,93,93,113,113,17,18,57,47,94,93,113,237,50, +49,48,51,46,3,53,17,51,17,20,30,2,23,199,15,24,15,8,180,11,21,30,18,16,53, +64,70,33,3,78,252,169,32,64,60,52,19,0,0,0,1,0,138,0,0,4,3,4,58,0,11,0,158, +64,114,148,9,164,9,2,102,9,118,9,134,9,3,172,0,1,139,0,155,0,2,105,0,121, +0,2,86,10,150,10,166,10,3,151,10,167,10,2,84,10,1,70,7,134,7,2,1,10,247,8, +1,8,10,9,16,9,9,0,11,16,0,11,160,11,2,0,11,16,11,32,11,64,11,160,11,224,11, +6,7,11,7,3,70,0,4,16,4,48,4,240,4,4,8,4,128,13,192,13,224,13,3,63,13,1,2, +1,7,10,4,8,5,15,4,0,21,0,63,50,63,51,23,57,1,93,93,47,94,93,237,50,47,94, +93,113,56,51,57,47,56,57,51,113,17,51,49,48,0,93,93,93,1,93,93,93,93,93,93, +33,1,7,17,35,17,51,17,1,51,9,1,3,48,254,146,132,180,180,1,219,211,254,73, +1,206,1,238,109,254,127,4,58,253,243,2,13,254,47,253,151,0,0,0,0,1,0,14,0, +0,3,238,5,204,0,33,1,60,64,101,149,15,1,157,23,1,138,2,1,137,1,1,137,25,153, +25,2,140,21,156,21,2,115,0,131,0,147,0,3,140,20,156,20,2,106,20,122,20,2, +146,32,1,132,32,1,101,32,117,32,2,3,102,26,118,26,150,26,3,141,26,157,26, +2,2,126,26,1,108,26,1,3,84,18,1,148,31,1,101,31,117,31,133,31,3,86,31,1,146, +29,1,2,128,29,1,84,29,1,144,28,1,28,184,255,224,64,59,13,16,72,146,27,1,84, +27,100,27,116,27,3,93,0,109,0,2,149,17,1,73,17,1,150,18,1,138,18,1,101,18, +117,18,2,38,18,86,18,2,42,3,58,3,74,3,122,3,138,3,5,26,0,20,10,10,19,32,33, +184,255,240,64,69,33,20,19,16,31,19,63,19,2,31,19,63,19,95,19,127,19,159, +19,191,19,223,19,255,19,8,223,19,255,19,2,192,19,1,95,19,159,19,2,0,19,16, +19,64,19,3,8,19,0,35,48,35,96,35,160,35,176,35,5,26,0,13,33,19,21,6,80,13, +0,0,63,237,63,51,18,57,57,1,93,47,94,93,93,93,93,113,114,56,51,47,56,51,18, +57,47,18,57,57,49,48,93,93,93,93,93,93,93,0,93,1,93,93,43,93,93,93,95,93, +93,93,93,0,93,95,93,93,95,93,1,93,95,93,93,93,93,93,93,93,93,93,93,93,0,93, +1,39,46,3,35,34,6,7,39,62,1,51,50,30,2,23,1,35,3,46,3,39,14,3,7,1,35,1,207, +36,27,42,45,57,40,11,32,6,35,25,72,32,55,87,73,67,36,1,171,190,207,8,18,18, +16,5,7,22,25,24,8,254,255,187,3,197,99,73,105,67,31,7,3,130,9,15,36,81,131, +95,251,139,2,65,22,56,59,56,21,21,60,62,55,18,253,193,0,0,0,1,0,138,254,119, +4,6,4,58,0,41,0,108,64,55,13,40,14,17,72,90,8,106,8,2,35,70,5,15,34,95,34, +2,159,34,175,34,255,34,3,0,34,16,34,32,34,3,7,34,43,23,19,70,0,20,16,20,48, +20,240,20,4,8,20,96,43,128,43,2,43,184,255,192,64,15,20,23,72,41,21,34,21, +15,19,5,28,80,14,11,22,0,63,51,237,50,47,63,51,63,1,43,93,47,94,93,237,50, +16,220,94,93,93,113,50,237,49,48,0,93,1,43,33,46,3,53,35,14,3,35,34,38,39, +35,30,1,21,17,35,17,51,17,20,30,2,51,50,62,2,53,17,51,17,20,30,2,23,3,94, +1,3,3,3,4,26,56,69,86,57,82,120,32,4,3,1,182,182,25,59,98,74,67,100,67,33, +181,1,2,2,1,6,46,59,59,20,51,79,53,27,64,58,32,63,27,254,139,5,195,253,124, +69,116,85,47,52,91,126,75,2,105,252,175,34,76,67,49,7,0,0,1,0,0,0,0,3,178, +4,58,0,18,2,35,64,79,130,17,146,17,162,17,3,153,6,169,6,2,131,8,147,8,163, +8,3,3,87,8,103,8,119,8,3,6,5,9,32,14,17,72,9,9,7,15,16,16,0,70,64,91,12,107, +12,123,12,3,91,12,219,12,235,12,3,180,12,196,12,2,11,12,27,12,59,12,91,12, +107,12,5,7,12,20,128,8,7,184,255,240,64,255,7,11,20,27,20,2,11,20,27,20,75, +20,91,20,139,20,155,20,203,20,219,20,8,255,20,1,196,20,212,20,2,160,20,1, +132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4,20,20,20,2,199,224,20,1,196, +20,212,20,2,160,20,1,4,20,20,20,68,20,84,20,132,20,148,20,6,68,20,84,20,132, +20,148,20,196,20,212,20,6,27,20,1,4,20,1,219,20,1,196,20,1,155,20,1,132,20, +1,91,20,1,68,20,1,27,20,1,4,20,1,151,11,20,27,20,75,20,91,20,139,20,155,20, +203,20,219,20,8,155,20,203,20,219,20,3,132,20,1,96,20,1,68,20,84,20,2,32, +20,1,4,20,20,20,2,224,20,1,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20, +1,4,20,20,20,68,20,84,20,4,103,4,20,20,20,68,20,84,20,132,20,148,20,196,20, +212,20,8,219,20,1,196,20,1,155,20,1,132,20,1,91,20,1,68,20,1,27,20,1,4,20, +1,219,20,1,196,20,1,11,20,27,20,75,20,91,20,139,20,155,20,64,93,6,55,75,20, +91,20,139,20,155,20,203,20,219,20,6,63,20,1,32,20,1,4,20,20,20,2,224,20,1, +196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,68,20,84,20,2,32,20,1,4, +20,20,20,2,196,20,212,20,2,160,20,1,132,20,148,20,2,96,20,1,2,80,20,1,47, +20,1,0,20,16,20,2,7,15,7,15,9,6,21,0,63,51,63,51,1,94,93,93,93,95,93,93,93, +93,113,113,113,113,113,113,113,113,114,114,114,114,94,93,93,93,113,113,113, +113,113,113,113,113,114,94,93,93,93,93,93,93,113,113,113,113,113,113,114, +94,93,93,93,93,93,93,93,93,113,113,113,114,114,114,114,94,93,93,93,93,93, +93,93,93,113,114,47,56,51,26,16,220,94,93,93,113,114,26,237,50,17,51,17,57, +61,47,43,51,51,49,48,93,95,93,93,93,1,20,14,2,7,35,1,51,1,54,18,53,52,38, +39,51,30,1,3,178,63,106,140,77,170,254,122,189,1,55,142,124,29,20,177,24, +28,3,78,99,218,221,214,94,4,58,252,96,185,1,86,156,81,119,45,45,113,0,0,0, +1,0,86,254,159,3,106,5,204,0,74,1,0,64,125,122,71,138,71,2,101,33,117,33, +133,33,3,105,39,1,85,50,1,83,44,1,57,2,1,110,66,126,66,142,66,3,26,66,42, +66,2,12,29,28,29,44,29,3,13,40,9,12,72,12,73,28,73,44,73,108,73,124,73,140, +73,6,5,11,95,37,1,79,37,1,112,37,128,37,2,37,17,95,26,1,111,26,1,26,37,26, +52,63,31,70,11,32,11,1,23,11,23,11,0,31,63,63,63,79,63,111,63,127,63,143, +63,175,63,191,63,207,63,9,159,63,175,63,255,63,3,63,184,255,192,64,17,7,11, +72,63,42,71,31,0,1,0,5,37,80,31,11,24,42,184,255,240,64,32,19,22,72,151,42, +1,0,16,19,22,72,152,0,1,52,0,42,3,57,32,36,1,36,36,24,57,26,17,23,80,24,0, +0,63,237,50,50,47,18,57,47,93,18,23,57,93,43,93,43,18,57,57,237,57,1,47,93, +237,47,43,93,113,18,57,57,47,47,93,16,237,16,205,50,50,47,93,114,51,47,93, +113,114,18,57,49,48,93,43,93,0,93,93,1,93,0,93,93,93,1,93,0,93,19,52,62,2, +55,53,46,3,53,52,62,2,55,53,14,3,43,1,53,33,21,14,3,21,20,30,2,23,21,14,3, +21,20,30,2,23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,86,51,110,175, +125,68,118,87,51,50,79,97,47,12,68,80,76,18,74,2,122,77,144,112,68,60,99, +130,69,100,175,131,76,43,74,100,57,54,114,94,61,18,26,29,10,126,9,19,16,11, +39,70,97,57,42,89,82,73,54,31,1,98,76,147,124,90,19,2,5,39,68,96,62,64,93, +64,40,10,8,1,2,3,2,131,125,9,34,59,90,67,63,81,49,24,6,131,13,54,89,127,84, +64,79,49,31,15,15,34,57,88,68,34,68,62,51,17,56,12,33,38,39,19,34,45,33,25, +13,10,23,36,50,74,100,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +79,255,236,5,43,4,58,0,48,0,115,64,35,53,12,117,12,133,12,3,3,40,7,17,72, +3,40,7,17,72,46,80,32,96,32,2,46,32,35,70,64,111,5,1,80,5,1,5,184,255,192, +64,38,8,11,72,5,50,128,15,50,47,50,2,13,7,72,79,25,95,25,111,25,207,25,4, +25,14,20,34,7,20,80,31,15,14,21,40,80,0,22,0,63,237,63,63,237,50,50,1,47, +50,50,93,237,50,93,26,16,220,43,93,113,26,237,50,50,93,47,49,48,43,0,43,1, +93,5,34,46,2,53,17,33,21,20,14,2,7,35,62,3,61,1,34,14,2,7,53,62,3,51,33,21, +35,17,20,30,2,51,50,62,2,55,21,14,1,4,102,59,82,52,24,254,110,16,27,36,19, +188,19,39,32,20,39,79,69,53,12,12,43,51,54,23,4,37,234,13,24,35,22,7,23,25, +23,8,31,69,20,28,59,94,66,2,212,72,131,251,228,195,74,76,197,226,247,125, +80,7,10,13,7,139,6,11,8,4,131,253,83,44,56,32,13,2,2,3,1,129,8,12,0,2,0,132, +254,87,4,59,4,79,0,26,0,47,0,129,64,64,122,25,1,101,20,117,20,2,106,19,122, +19,2,106,45,122,45,2,75,8,91,8,107,8,3,125,30,1,107,30,1,74,30,90,30,2,0, +71,64,160,27,1,27,49,128,38,15,70,223,16,1,0,16,16,16,48,16,3,8,16,48,49, +1,49,184,255,192,64,21,30,35,72,223,49,1,96,49,128,49,2,32,80,22,16,15,27, +43,80,5,22,0,63,237,63,63,237,1,93,93,43,113,47,94,93,113,237,50,26,16,220, +93,26,237,49,48,93,93,93,0,93,1,93,93,0,93,1,93,1,20,14,2,35,34,46,2,39,35, +30,1,21,17,35,17,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,17,30,3,51,50, +62,2,4,59,63,115,161,98,62,98,80,66,28,4,2,2,180,60,116,169,110,103,181,134, +78,193,44,83,116,72,69,100,64,30,28,72,80,87,44,67,100,67,33,2,4,118,197, +142,79,20,37,53,33,30,61,32,254,87,3,238,119,193,136,74,79,150,219,131,104, +166,115,61,53,101,146,93,254,195,35,55,37,20,58,107,152,0,0,1,0,86,254,159, +3,156,4,78,0,57,0,209,64,38,137,55,1,139,54,1,143,53,1,123,53,1,106,50,1, +96,2,1,52,15,68,15,84,15,3,82,10,98,10,130,10,3,51,10,67,10,2,3,184,255,224, +64,52,12,17,72,3,24,11,14,72,26,31,106,31,122,31,138,31,4,139,30,1,10,37, +26,37,2,7,71,31,40,1,40,52,17,79,28,1,143,28,159,28,223,28,3,28,64,24,27, +72,96,28,1,28,184,255,192,183,7,12,72,28,48,59,1,59,184,255,192,64,19,30, +35,72,223,59,1,12,33,40,16,19,22,72,136,40,152,40,2,7,184,255,240,64,19,19, +22,72,135,7,151,7,2,33,7,40,3,22,53,0,80,47,16,22,0,47,63,237,51,18,23,57, +93,43,93,43,17,51,1,93,43,113,47,43,93,43,93,113,205,50,47,93,237,49,48,93, +93,0,93,43,1,43,0,93,93,93,1,93,0,93,1,93,93,0,93,93,1,34,14,4,21,20,30,2, +23,30,3,21,20,14,2,7,39,62,3,53,52,46,2,39,46,5,53,52,62,4,51,50,30,2,23, +7,46,3,2,70,54,88,67,49,32,15,32,76,124,92,53,114,95,61,18,26,29,10,126,9, +19,16,11,35,68,97,63,66,113,94,72,50,26,20,46,75,110,148,97,68,99,73,54,22, +116,18,42,49,57,3,193,49,80,104,108,106,42,68,96,72,57,30,17,37,59,89,68, +34,68,62,51,17,56,12,33,38,39,19,30,44,36,31,17,18,40,51,68,93,122,81,47, +130,140,136,108,66,21,34,44,23,119,19,36,28,17,0,2,0,86,255,236,4,209,4,58, +0,28,0,47,0,132,64,94,133,12,1,122,13,138,13,2,131,46,1,101,46,117,46,2,100, +42,116,42,132,42,3,124,33,140,33,2,90,33,106,33,2,143,38,1,108,38,124,38, +2,74,38,90,38,2,15,17,31,17,111,17,127,17,4,7,17,0,71,64,15,29,143,29,191, +29,3,0,29,32,29,64,29,3,29,49,128,40,71,31,10,143,10,2,10,23,35,80,15,15, +43,80,5,22,0,63,237,63,237,50,1,47,93,237,26,16,220,93,113,26,237,196,94, +93,49,48,0,93,93,93,1,93,93,93,0,93,93,93,1,93,1,20,14,2,35,34,46,2,53,52, +62,2,51,33,21,35,34,46,2,39,21,30,3,7,52,46,2,39,35,34,14,2,21,20,22,51,50, +62,2,4,48,61,123,183,123,123,186,124,63,86,153,213,126,2,57,165,9,35,43,44, +17,28,55,43,26,189,20,34,45,25,89,83,143,107,61,151,147,78,117,76,38,1,235, +112,188,135,76,74,139,202,129,144,210,138,66,131,1,2,2,1,4,42,99,115,131, +78,74,132,116,99,42,50,105,160,110,207,206,52,97,139,0,1,0,29,255,236,3,24, +4,58,0,35,0,99,64,50,35,13,131,13,2,31,32,12,17,72,13,31,29,31,45,31,3,26, +13,26,127,5,143,5,2,5,15,70,0,34,32,34,2,34,34,36,37,79,37,1,208,37,1,159, +37,1,16,37,1,37,184,255,192,64,12,14,17,72,20,80,29,22,14,35,80,11,15,0,63, +237,50,63,237,1,43,93,93,93,113,17,18,57,47,93,253,204,93,51,51,47,49,48, +0,93,43,1,93,1,34,14,2,7,53,62,3,51,33,21,33,17,20,30,2,51,50,62,2,55,21, +14,1,35,34,46,2,53,17,1,25,39,79,69,53,12,12,43,51,54,23,2,68,254,208,13, +24,35,22,7,23,25,23,8,31,69,43,59,82,52,24,3,183,7,10,13,7,139,6,11,8,4,131, +253,83,44,56,32,13,2,2,3,1,129,8,12,28,59,94,66,2,212,0,0,0,1,0,133,255,236, +3,254,4,58,0,31,0,113,64,62,134,3,1,133,15,149,15,2,106,18,122,18,2,86,28, +1,25,8,41,8,2,27,0,71,64,15,21,1,47,21,159,21,2,160,21,1,21,33,128,13,70, +0,10,16,10,48,10,240,10,4,8,10,240,33,1,255,33,1,112,33,1,33,184,255,192, +64,13,20,23,72,31,33,1,26,11,15,16,80,5,22,0,63,237,63,51,1,93,43,93,93,113, +47,94,93,237,26,16,220,93,113,114,26,237,50,49,48,93,93,93,93,93,1,20,14, +2,35,34,46,2,53,17,51,17,20,22,51,50,62,2,53,52,46,2,39,51,30,3,3,254,53, +113,176,123,109,160,104,51,181,117,134,73,104,65,30,20,33,40,21,188,18,40, +32,21,2,59,137,218,154,82,50,107,166,116,2,151,253,99,146,148,50,108,170, +120,68,147,139,120,41,40,113,134,149,0,2,0,85,254,87,4,218,4,82,0,35,0,45, +0,130,64,21,101,34,1,101,33,117,33,133,33,3,74,21,90,21,2,69,21,85,21,2,45, +184,255,192,179,11,14,72,25,184,255,224,64,54,11,14,72,11,29,27,29,2,64,19, +80,19,2,19,19,24,71,13,7,36,71,224,0,1,0,43,6,72,27,0,7,64,7,2,7,64,47,1, +19,80,18,18,39,80,31,16,43,27,80,5,8,22,6,27,0,63,63,51,237,50,63,237,51, +47,237,1,113,47,93,51,253,50,220,113,237,16,220,237,50,47,93,49,48,93,0,43, +43,1,93,0,93,1,93,93,1,20,14,2,7,17,35,17,46,3,53,52,62,2,55,23,14,3,21,20, +22,23,17,52,54,51,50,30,2,7,52,38,35,34,6,21,17,62,1,4,218,74,132,184,110, +170,114,181,125,67,49,103,159,109,21,69,96,60,27,147,151,154,158,84,133,92, +49,189,87,80,68,76,162,149,2,53,151,215,140,71,6,254,105,1,151,5,72,138,207, +141,102,188,150,103,18,136,15,77,114,143,80,213,201,8,2,68,193,212,76,141, +199,121,193,211,129,140,253,185,7,218,0,0,0,1,0,21,254,88,4,27,4,80,0,27, +1,26,64,51,169,25,1,153,3,1,138,6,154,6,2,174,23,1,123,23,139,23,155,23,3, +84,21,1,173,27,1,140,27,156,27,2,123,27,1,90,27,106,27,2,41,27,57,27,2,26, +16,9,17,72,2,184,255,240,64,99,9,17,72,162,1,1,131,1,147,1,2,116,1,1,69,1, +85,1,101,1,3,38,1,54,1,2,166,25,1,153,25,1,39,25,55,25,71,25,3,3,101,19,117, +19,2,86,19,1,39,19,55,19,2,25,22,0,3,4,2,26,23,24,24,27,26,16,27,26,59,26, +91,26,123,26,155,26,187,26,219,26,7,219,26,251,26,2,4,26,20,26,68,26,3,7, +26,13,13,1,2,184,255,240,183,2,36,29,1,11,29,1,22,184,255,208,64,41,14,17, +72,70,22,1,53,22,1,139,0,1,125,0,1,2,75,0,91,0,107,0,3,63,0,1,0,25,3,22,4, +1,23,15,9,80,16,16,27,1,27,0,63,51,63,237,63,18,23,57,93,93,95,93,93,93,93, +43,1,93,93,47,56,51,51,47,47,94,93,93,113,56,51,51,47,51,17,18,23,57,49,48, +93,93,93,95,93,93,93,93,93,93,93,93,43,43,93,93,93,93,93,93,93,93,93,93,0, +93,37,1,35,1,3,46,3,35,34,6,7,39,62,1,51,50,30,2,23,19,1,51,9,1,35,2,30,254, +179,188,1,184,170,27,44,40,42,25,11,32,7,34,24,62,32,48,70,60,59,36,142,1, +8,187,254,144,1,150,190,239,253,105,3,57,1,87,54,82,55,28,7,3,131,9,11,27, +62,102,75,254,217,2,27,253,71,252,215,0,0,1,0,135,254,87,5,44,5,60,0,31,0, +128,64,90,121,18,1,18,16,7,10,72,121,19,137,19,153,19,3,121,11,1,11,16,7, +10,72,121,10,137,10,153,10,3,24,70,21,15,5,70,8,0,14,72,29,0,15,16,15,160, +15,208,15,4,8,15,128,33,176,33,224,33,3,111,33,1,32,33,1,255,33,1,80,33,128, +33,144,33,192,33,4,30,30,6,22,15,0,29,80,13,16,22,14,27,0,63,63,51,237,50, +63,51,51,47,1,93,93,113,113,113,47,94,93,51,253,50,220,237,16,220,237,49, +48,0,93,43,93,93,43,93,37,62,3,53,17,51,17,20,14,2,7,17,35,17,46,3,53,17, +51,17,20,30,2,23,17,51,3,46,87,124,80,37,182,59,124,193,134,170,134,192,124, +59,181,38,79,124,87,170,119,1,31,73,121,91,2,134,253,124,122,172,110,53,1, +254,107,1,149,1,53,110,172,122,2,132,253,122,90,121,73,32,1,4,197,0,0,0,0, +1,0,83,255,236,5,235,4,79,0,63,0,176,64,83,153,33,169,33,2,153,26,169,26, +2,119,16,1,122,58,138,58,2,10,37,26,37,42,37,154,37,170,37,5,10,22,26,22, +42,22,154,22,170,22,5,29,0,73,61,61,40,8,46,13,46,13,51,19,71,64,128,8,176, +8,2,15,8,1,7,8,65,128,51,71,63,40,1,40,0,65,1,48,65,1,240,65,1,65,184,255, +192,64,32,30,35,72,175,65,223,65,2,0,65,32,65,64,65,3,30,35,62,62,14,3,56, +80,24,35,22,46,13,80,45,14,16,0,63,51,237,50,63,51,237,50,17,57,47,18,57, +1,93,93,43,93,113,114,47,93,237,26,16,220,94,93,93,26,237,18,57,57,47,47, +17,18,57,47,237,57,49,48,0,93,93,1,93,93,0,93,93,1,20,22,51,50,62,2,53,52, +46,2,39,55,30,3,21,20,14,2,35,34,46,2,39,35,14,3,35,34,46,2,53,52,62,2,55, +23,14,3,21,20,30,2,51,50,62,2,61,1,51,3,115,114,102,65,87,53,22,29,61,97, +67,23,109,159,103,49,53,101,148,95,68,104,77,52,16,4,16,52,77,105,67,95,148, +101,53,49,103,159,109,23,68,96,62,28,22,52,86,65,51,82,57,30,166,1,193,157, +173,56,102,145,90,82,150,121,84,15,139,18,112,161,194,101,128,200,137,72, +36,68,99,64,64,99,68,36,72,137,200,128,101,194,161,112,18,139,15,84,121,150, +82,90,145,102,56,45,84,123,78,252,0,0,0,255,255,255,205,0,0,1,250,5,123,18, +38,1,130,0,0,17,6,0,105,160,0,0,25,182,2,1,14,17,38,2,1,184,255,217,180,18, +16,5,13,37,1,43,53,53,0,43,53,53,0,0,0,255,255,0,133,255,236,3,254,5,123, +18,38,1,142,0,0,17,7,0,105,0,242,0,0,0,25,182,2,1,32,17,38,2,1,184,255,244, +180,36,34,10,0,37,1,43,53,53,0,43,53,53,0,255,255,0,86,255,236,4,29,6,7,18, +38,0,82,0,0,17,7,1,80,1,41,0,0,0,19,64,11,2,35,17,38,2,70,35,38,8,0,37,1, +43,53,0,43,53,0,0,0,255,255,0,133,255,236,3,254,6,7,18,38,1,142,0,0,17,7, +1,80,0,252,0,0,0,19,64,11,1,32,17,38,1,17,32,35,10,0,37,1,43,53,0,43,53,0, +0,0,255,255,0,83,255,236,5,235,6,7,18,38,1,146,0,0,17,7,1,80,1,255,0,0,0, +19,64,11,1,64,17,38,1,55,64,67,40,19,37,1,43,53,0,43,53,0,0,0,255,255,0,168, +0,0,4,254,6,178,16,38,0,40,0,0,17,7,2,152,1,121,0,0,0,153,185,0,21,255,192, +179,233,233,72,21,184,255,192,179,230,230,72,21,184,255,192,179,227,227,72, +21,184,255,192,179,224,224,72,21,184,255,192,179,221,221,72,21,184,255,192, +179,218,218,72,21,184,255,192,179,215,215,72,21,184,255,192,179,212,212,72, +21,184,255,192,179,209,209,72,21,184,255,192,179,206,206,72,21,184,255,192, +179,203,203,72,21,184,255,192,179,200,200,72,21,184,255,192,179,197,197,72, +21,184,255,192,64,10,11,11,72,2,1,12,5,38,2,1,184,255,234,180,16,14,0,10, +37,1,43,53,53,0,43,53,53,1,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0, +1,0,46,255,236,6,79,5,129,0,45,0,133,64,13,155,31,171,31,2,101,37,117,37, +133,37,3,2,184,255,224,64,71,13,17,72,18,16,12,15,72,42,13,58,13,2,36,7,52, +7,2,20,20,10,42,1,39,90,45,175,40,1,0,40,1,40,10,90,0,29,16,29,176,29,224, +29,4,7,29,0,42,95,43,38,33,95,1,6,6,40,43,3,40,18,26,95,15,63,21,1,21,21, +15,19,0,63,51,47,93,16,237,63,63,18,57,47,51,237,50,16,237,50,1,47,94,93, +237,47,93,93,204,253,50,204,18,57,47,49,48,0,93,93,43,43,93,93,1,17,62,3, +51,50,22,29,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,61,1,52,38,35,34,14, +2,7,17,35,17,33,53,33,21,2,208,33,109,127,130,53,226,217,41,86,133,92,53, +88,75,64,29,111,18,41,48,56,33,84,80,129,144,51,123,120,105,33,190,254,28, +4,134,4,229,254,160,7,20,19,13,187,188,214,93,145,100,53,17,32,46,28,123, +16,33,26,17,101,111,219,119,122,10,15,17,8,253,12,4,229,156,156,0,255,255, +0,168,0,1,4,47,6,240,16,38,1,93,0,0,17,7,2,149,1,113,0,0,0,19,64,11,1,6,5, +38,1,33,6,9,4,0,37,1,43,53,0,43,53,0,0,0,0,1,0,104,255,236,5,121,5,150,0, +42,0,218,64,156,156,17,172,17,2,156,15,172,15,2,156,39,172,39,2,138,39,1, +156,41,172,41,2,138,41,1,137,31,1,117,11,1,117,10,165,10,2,166,26,1,73,26, +137,26,2,70,32,134,32,2,37,10,53,10,2,42,3,58,3,2,3,68,44,1,7,7,19,5,8,91, +116,29,132,29,2,203,29,219,29,2,68,29,1,43,29,1,29,37,235,19,1,100,19,116, +19,164,19,212,19,4,64,19,1,2,0,19,48,19,2,7,19,8,95,127,5,175,5,2,5,5,13, +34,79,38,1,38,38,0,95,34,4,13,95,24,16,18,32,18,2,48,18,64,18,112,18,128, +18,192,18,208,18,6,18,18,24,19,0,63,51,47,93,113,16,237,63,237,51,47,93,17, +18,57,47,113,237,1,47,94,93,95,93,93,113,51,47,93,93,93,113,237,50,17,57, +47,93,49,48,0,95,93,93,93,93,93,1,93,0,93,1,93,93,93,93,93,93,93,1,34,14, +2,7,33,21,33,30,3,51,50,62,2,55,23,14,3,35,34,36,38,2,53,52,18,54,36,51,50, +4,23,7,46,3,3,24,111,173,124,73,10,2,142,253,114,9,77,128,176,109,90,141, +108,79,27,156,40,108,148,191,123,171,254,255,173,86,91,175,1,0,164,225,1, +46,71,181,20,68,102,137,4,250,68,126,178,110,154,112,185,132,72,50,82,105, +55,77,79,136,100,57,109,195,1,12,159,165,1,10,187,101,176,173,60,50,91,70, +42,0,0,255,255,0,93,255,236,4,248,5,150,18,6,0,54,0,0,255,255,0,189,0,0,1, +124,5,129,18,6,0,44,0,0,255,255,0,7,0,0,2,52,6,178,18,38,0,44,0,0,17,6,2, +152,218,0,0,23,64,13,2,1,4,5,38,2,1,1,8,6,0,2,37,1,43,53,53,0,43,53,53,0, +255,255,0,32,255,236,3,104,5,129,18,6,0,45,0,0,0,2,0,18,255,240,8,11,5,129, +0,38,0,47,0,215,64,98,57,29,1,166,8,1,167,11,1,162,10,1,133,10,149,10,2,58, +10,1,154,15,170,15,2,141,13,157,13,173,13,3,121,13,1,116,47,132,47,148,47, +3,123,40,139,40,155,40,3,101,11,1,141,14,157,14,173,14,3,14,32,10,14,72,43, +30,123,30,139,30,155,30,4,42,31,122,31,2,0,90,48,39,1,0,39,16,39,2,7,39,20, +13,36,13,52,13,3,13,184,255,248,64,14,22,25,72,73,8,1,20,8,36,8,52,8,3,8, +184,255,248,64,39,22,25,72,9,31,73,31,2,8,13,31,3,175,20,191,20,2,20,33,44, +90,6,43,95,33,33,6,8,95,31,3,23,95,16,19,44,95,6,18,0,63,237,63,237,63,237, +18,57,47,237,1,47,237,50,47,93,23,51,113,43,113,113,43,113,47,94,93,113,237, +49,48,93,93,0,43,93,1,93,0,93,93,93,93,93,1,93,93,93,93,93,93,1,20,14,2,35, +33,17,33,3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,33,50,30,2, +7,52,38,35,33,17,33,50,54,8,11,61,121,182,121,253,183,254,96,49,22,43,49, +60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,3,2,1,126,125,186, +124,62,192,164,164,254,153,1,111,164,156,1,157,87,150,112,64,4,225,254,144, +172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161,1,254,253,172, +58,105,147,92,121,129,254,2,136,0,0,0,2,0,168,0,0,7,171,5,129,0,22,0,31,0, +110,64,25,116,31,132,31,148,31,3,123,24,139,24,155,24,3,38,20,54,20,2,0,90, +176,23,1,23,184,255,192,64,43,7,11,72,23,13,9,90,0,10,16,10,64,10,3,7,10, +17,28,90,14,0,6,1,8,6,27,95,17,17,8,95,13,13,10,15,11,3,10,18,28,95,6,18, +0,63,237,63,63,51,18,57,47,237,51,47,237,1,47,94,93,51,237,50,47,94,93,237, +50,47,43,93,237,49,48,0,93,93,93,1,20,14,2,35,33,17,33,17,35,17,51,17,33, +17,51,17,33,50,30,2,7,52,38,35,33,17,33,50,54,7,171,61,121,182,121,253,223, +253,194,191,191,2,62,191,1,86,125,186,124,62,192,164,164,254,193,1,71,164, +156,1,157,87,150,112,64,2,141,253,115,5,129,253,172,2,84,253,172,58,105,147, +92,121,129,254,2,136,0,0,0,0,1,0,46,0,0,6,47,5,129,0,27,0,131,64,13,155,2, +171,2,2,101,8,117,8,133,8,3,19,184,255,224,64,76,13,17,72,37,24,53,24,69, +24,3,18,13,10,90,16,175,11,1,0,11,48,11,2,11,27,90,0,0,48,0,192,0,208,0,4, +7,0,176,29,192,29,208,29,3,176,29,240,29,2,255,29,1,16,29,112,29,160,29,176, +29,4,9,4,95,18,23,23,0,17,13,95,14,3,11,0,18,0,63,50,63,237,50,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,237,47,93,93,204,253,204,51,49,48,0,93,43, +93,93,33,17,52,38,35,34,14,2,7,17,35,17,33,53,33,21,33,17,62,3,51,50,22,21, +17,5,113,128,133,53,116,110,98,35,190,254,28,4,179,253,239,36,98,112,118, +56,229,214,2,63,122,109,10,15,18,7,253,12,4,229,156,156,254,160,8,20,18,13, +187,178,253,173,0,0,0,255,255,0,168,0,0,4,157,6,240,18,38,1,176,0,0,17,7, +2,149,1,172,0,0,0,19,64,11,1,23,5,38,1,37,23,26,0,13,37,1,43,53,0,43,53,0, +0,0,255,255,0,55,255,236,5,31,7,58,18,38,1,185,0,0,17,7,2,145,1,94,1,74,0, +19,64,11,1,26,5,38,1,7,31,39,21,25,37,1,43,53,0,43,53,0,0,0,0,1,0,168,254, +104,5,24,5,129,0,11,0,94,64,64,11,92,0,0,2,9,90,127,6,1,0,6,48,6,64,6,3,143, +6,159,6,207,6,3,0,6,64,6,2,6,5,90,0,2,16,2,64,2,3,7,2,16,13,1,32,13,128,13, +224,13,3,15,13,1,7,7,3,3,10,5,95,2,18,0,0,47,63,237,51,63,51,47,1,93,93,113, +47,94,93,237,47,93,93,113,113,237,18,57,47,237,49,48,1,17,33,17,51,17,33, +17,51,17,33,17,2,134,254,34,191,2,247,186,254,34,254,104,1,152,5,129,251, +31,4,225,250,127,254,104,255,255,0,4,0,0,5,82,5,129,18,6,0,36,0,0,0,2,0,168, +0,0,4,214,5,129,0,16,0,25,0,142,64,70,116,25,132,25,148,25,3,123,18,139,18, +155,18,3,153,14,1,38,14,1,9,9,0,90,223,17,1,80,17,128,17,2,31,17,1,255,17, +1,192,17,1,159,17,1,0,17,16,17,32,17,64,17,4,17,11,22,90,0,6,16,6,64,6,3, +7,6,48,27,1,27,184,255,192,64,27,30,35,72,223,27,1,21,95,64,11,1,160,11,208, +11,2,11,11,6,10,95,7,3,22,95,6,18,0,63,237,63,237,18,57,47,93,113,237,1,93, +43,113,47,94,93,237,50,47,93,93,93,93,113,113,113,237,50,47,49,48,0,93,93, +93,93,1,20,14,2,35,33,17,33,21,33,17,33,50,30,2,7,52,38,35,33,17,33,50,54, +4,214,61,121,182,121,253,183,3,158,253,33,1,126,125,186,124,62,192,164,164, +254,153,1,111,164,156,1,157,87,150,112,64,5,129,156,254,72,58,105,147,92, +121,129,254,2,136,0,0,0,255,255,0,168,0,0,4,234,5,129,18,6,0,37,0,0,255,255, +0,168,0,1,4,47,5,130,16,6,1,93,0,0,0,2,0,15,254,104,5,69,5,129,0,16,0,25, +0,194,64,95,150,10,1,150,20,1,150,15,1,144,19,1,134,19,1,115,22,131,22,2, +3,147,24,1,2,128,24,1,114,24,1,102,24,1,85,11,101,11,2,90,14,106,14,2,97, +23,145,23,2,83,23,1,53,23,69,23,2,2,92,3,3,0,90,191,17,207,17,2,160,17,1, +31,17,95,17,127,17,143,17,159,17,5,0,17,1,8,17,20,25,36,25,52,25,3,25,184, +255,248,64,11,22,25,72,20,19,36,19,52,19,3,19,184,255,248,64,28,22,25,72, +9,15,19,25,4,6,92,7,15,27,47,27,2,19,95,15,3,8,0,25,95,5,18,7,2,0,47,51,63, +237,50,50,63,237,1,93,47,237,23,51,43,113,43,113,47,94,93,93,93,93,237,50, +47,237,49,48,93,93,93,93,93,93,93,93,95,93,95,93,93,93,93,93,93,37,51,17, +35,17,33,17,35,17,51,62,3,55,19,33,3,17,33,3,14,3,7,4,150,175,180,252,50, +180,144,41,66,55,44,18,67,2,212,186,254,137,49,18,40,46,54,32,160,253,200, +1,152,254,104,2,56,51,138,181,228,141,1,254,251,31,4,65,254,144,134,221,178, +137,51,255,255,0,168,0,0,4,254,5,129,18,6,0,40,0,0,0,1,0,28,0,0,7,71,5,129, +0,41,1,72,64,41,133,8,1,117,31,133,31,2,117,14,1,99,24,1,108,25,124,25,140, +25,3,108,26,124,26,140,26,3,101,13,117,13,133,13,3,33,40,14,17,72,6,184,255, +216,64,35,14,17,72,58,24,74,24,2,41,24,1,53,15,69,15,117,15,3,3,39,15,1,27, +48,14,17,72,40,27,56,27,72,27,3,12,184,255,208,64,11,14,17,72,39,12,55,12, +71,12,3,31,184,255,224,179,14,17,72,31,184,255,240,64,73,10,13,72,8,32,14, +17,72,8,16,10,13,72,34,31,27,31,28,28,32,21,40,90,41,5,8,12,8,41,11,11,7, +18,52,41,1,116,41,196,41,228,41,3,41,33,32,16,32,64,29,32,72,228,32,1,155, +32,171,32,2,68,32,116,32,2,11,32,43,32,2,32,6,7,184,255,240,64,51,171,7,187, +7,2,7,68,43,116,43,132,43,228,43,4,47,43,1,2,15,43,1,31,8,34,5,8,5,39,0,96, +21,127,18,175,18,2,47,18,1,18,18,6,27,19,11,3,41,33,6,18,0,63,51,51,63,51, +51,18,57,47,93,113,51,237,50,57,57,17,51,17,51,1,93,95,93,93,47,93,56,51, +47,93,93,93,93,43,56,51,47,93,113,51,18,57,47,18,57,51,17,51,16,237,50,17, +57,47,57,51,17,51,49,48,43,43,43,43,93,43,93,43,93,95,93,93,93,43,43,93,93, +93,0,93,1,93,0,93,93,1,34,46,2,39,1,35,1,38,39,1,51,19,30,3,51,17,51,17,50, +62,2,55,19,51,1,6,7,1,35,1,14,3,35,17,35,3,82,17,45,48,46,17,254,85,222,1, +253,48,131,254,229,200,205,66,90,76,81,57,191,57,81,76,90,66,205,200,254, +229,131,48,1,253,222,254,85,17,46,48,45,17,191,2,133,6,11,13,8,253,85,3,7, +35,189,1,154,254,207,99,123,68,24,2,107,253,149,24,68,123,99,1,49,254,102, +189,35,252,249,2,171,8,13,11,6,253,123,0,1,0,67,255,236,4,112,5,149,0,60, +1,7,64,51,138,33,1,134,7,1,124,28,140,28,2,3,112,21,1,112,20,1,2,96,20,1, +101,8,117,8,133,8,3,132,34,1,101,34,117,34,2,124,13,1,90,13,106,13,2,59,23, +75,23,2,33,184,255,232,64,122,11,16,72,5,43,1,3,51,20,25,90,46,64,25,37,72, +46,46,56,90,16,139,36,155,36,171,36,3,127,20,1,2,95,20,111,20,2,36,20,36, +20,5,112,16,1,79,16,111,16,2,255,16,1,160,16,1,127,16,1,0,16,16,16,48,16, +3,16,175,5,191,5,2,5,64,32,45,72,5,64,13,16,72,5,51,20,95,127,21,175,21,2, +21,21,11,41,35,64,13,16,72,35,35,30,95,41,4,11,95,0,32,6,48,6,112,6,128,6, +4,208,6,1,6,184,255,192,182,13,17,72,6,6,0,19,0,63,50,47,43,93,113,16,237, +63,237,51,47,43,17,18,57,47,113,237,57,1,47,43,43,93,47,93,93,93,93,113,113, +18,57,57,47,47,93,95,93,113,16,237,50,47,43,237,18,57,49,48,0,95,93,1,43, +93,93,93,93,93,93,93,95,93,93,95,93,93,0,93,5,34,46,2,39,55,30,3,51,50,62, +2,53,52,38,43,1,53,51,50,54,53,52,46,2,35,34,14,2,7,39,62,3,51,50,30,2,21, +20,14,2,7,30,3,21,20,14,2,2,109,118,176,130,94,36,165,24,66,91,121,80,77, +122,85,45,192,202,71,71,181,173,39,72,104,65,77,114,83,56,19,178,33,96,132, +168,105,108,172,120,64,40,73,104,63,67,117,87,51,69,132,192,20,50,91,128, +79,77,55,98,75,44,37,69,100,64,133,118,148,119,123,55,86,59,30,40,68,90,49, +61,82,127,87,45,53,96,136,83,68,107,80,55,15,10,50,82,115,73,95,156,113,62, +0,1,0,168,0,0,5,24,5,129,0,19,0,123,64,17,172,18,1,138,18,154,18,2,147,8, +163,8,2,133,8,1,19,184,255,232,64,65,9,17,72,9,24,9,17,72,11,92,41,9,1,9, +64,12,80,12,144,12,3,224,12,1,143,12,159,12,175,12,3,0,12,48,12,2,12,166, +19,1,19,2,92,0,1,16,1,2,7,1,15,21,47,21,2,9,18,9,1,3,12,12,8,0,18,0,63,50, +50,47,63,51,51,47,1,93,47,94,93,237,50,113,47,93,93,93,113,51,113,237,49, +48,43,43,0,93,93,93,93,51,17,51,17,20,6,7,6,7,1,51,17,35,17,52,54,55,54,55, +1,168,172,2,2,2,2,2,238,222,170,1,2,1,2,253,26,5,129,252,100,51,98,39,46, +40,4,174,250,127,3,168,39,89,38,44,44,251,90,0,255,255,0,168,0,0,5,24,7,58, +18,38,1,174,0,0,17,7,2,145,1,146,1,74,0,19,64,11,1,20,5,38,1,6,25,33,0,10, +37,1,43,53,0,43,53,0,0,0,0,1,0,168,0,0,4,157,5,129,0,22,0,151,64,104,84,12, +116,12,132,12,3,84,15,1,139,8,1,122,8,1,89,8,105,8,2,140,14,1,14,24,13,16, +72,58,5,1,100,12,116,12,132,12,3,80,12,1,53,12,69,12,2,15,12,8,12,9,16,32, +9,96,9,128,9,3,9,9,13,2,21,90,32,22,1,22,14,13,16,15,13,127,13,207,13,239, +13,4,47,13,1,13,47,24,1,15,12,20,96,47,2,1,2,2,22,13,18,8,0,3,0,63,50,63, +51,57,47,93,237,50,57,1,93,47,93,113,56,51,47,93,237,50,17,57,47,93,56,57, +51,17,51,49,48,93,93,93,93,43,93,93,93,93,93,0,93,19,51,17,50,62,2,55,19, +51,1,6,7,1,35,1,14,3,35,17,35,168,191,57,81,76,90,66,205,200,254,229,131, +48,1,253,222,254,85,17,46,48,45,17,191,5,129,253,149,24,68,123,99,1,49,254, +102,189,35,252,249,2,171,8,13,11,6,253,123,0,0,0,0,1,0,18,255,240,4,153,5, +129,0,27,0,176,64,35,150,1,1,147,3,1,117,3,133,3,2,85,4,149,4,2,145,7,1,115, +7,131,7,2,85,7,101,7,2,129,6,145,6,2,6,184,255,216,64,46,12,15,72,37,6,53, +6,2,26,2,1,26,23,106,23,122,23,138,23,4,26,90,32,27,64,27,2,224,27,1,95,27, +1,0,27,1,8,27,20,6,36,6,52,6,3,6,184,255,248,64,14,22,25,72,73,1,1,20,1,36, +1,52,1,3,1,184,255,248,64,26,22,25,72,9,24,73,24,2,1,6,24,3,12,128,29,1,27, +18,1,95,24,3,16,95,9,19,0,63,237,63,237,63,1,93,47,23,51,113,43,113,113,43, +113,47,94,93,93,93,113,237,49,48,93,93,93,43,93,93,93,93,93,93,93,93,1,33, +3,6,2,14,3,35,34,38,39,53,30,1,51,50,62,4,55,19,33,17,35,3,223,254,94,49, +22,43,49,60,78,102,66,25,47,14,11,35,10,30,52,45,42,39,40,21,67,2,255,186, +4,225,254,144,172,254,245,199,137,85,37,5,5,152,4,3,23,62,107,169,238,161, +1,254,250,127,255,255,0,168,0,0,6,2,5,129,18,6,0,48,0,0,255,255,0,168,0,0, +5,32,5,129,18,6,0,43,0,0,255,255,0,97,255,236,5,215,5,150,18,6,0,50,0,0,255, +255,0,166,0,0,5,30,5,129,17,6,1,106,254,0,0,88,185,0,9,255,192,179,27,27, +72,9,184,255,192,179,21,21,72,9,184,255,192,179,20,20,72,9,184,255,192,179, +19,19,72,9,184,255,192,179,17,17,72,9,184,255,192,179,16,16,72,9,184,255, +192,179,15,15,72,9,184,255,192,179,14,14,72,9,184,255,192,183,11,11,72,9, +64,9,9,72,43,43,43,43,43,43,43,43,43,43,0,0,255,255,0,168,0,0,4,234,5,129, +18,6,0,51,0,0,255,255,0,104,255,236,5,121,5,150,18,6,0,38,0,0,255,255,0,46, +0,0,4,180,5,129,18,6,0,55,0,0,0,1,0,55,255,236,5,31,5,129,0,25,0,181,64,111, +217,24,1,139,24,1,90,24,106,24,122,24,3,41,24,1,85,23,101,23,133,23,3,70, +23,1,214,22,1,131,22,1,100,22,116,22,2,86,22,1,121,18,1,128,2,1,5,2,21,2, +2,132,1,1,131,0,1,84,0,100,0,2,70,0,1,198,23,214,23,2,113,23,129,23,2,86, +23,102,23,2,143,3,1,58,3,74,3,2,20,23,24,32,25,144,25,2,25,16,25,22,10,63, +21,79,21,111,21,127,21,4,21,184,255,240,64,14,21,23,20,21,5,24,24,21,3,11, +14,95,5,19,0,63,237,50,63,51,47,17,18,57,57,1,47,56,93,50,50,47,56,93,51, +57,57,49,48,0,93,93,93,93,93,1,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,93,1,14,3,35,34,46,2,39,55,30,1,51,50,62,2,63,1,1,51,9,1,51,2,222,47, +81,90,109,75,32,66,64,58,23,81,35,83,48,37,58,53,57,38,49,253,195,218,1,193, +1,128,205,1,62,88,128,82,40,10,18,26,16,144,22,37,21,52,90,68,89,3,186,252, +240,3,16,0,0,3,0,118,255,245,5,159,5,139,0,29,0,40,0,51,0,143,64,92,70,28, +86,28,102,28,3,73,17,89,17,105,17,3,59,51,1,59,31,1,53,43,1,38,43,1,53,39, +1,38,39,1,41,90,15,8,30,90,0,35,24,7,90,46,21,224,8,1,79,8,1,32,8,1,8,32, +53,1,112,53,208,53,224,53,3,79,53,1,16,53,1,36,47,96,10,6,10,34,49,96,20, +24,20,10,20,10,20,7,22,3,7,18,0,63,63,18,57,57,47,47,17,51,16,237,50,17,51, +16,237,50,1,93,93,93,113,47,93,93,93,51,51,253,50,50,220,237,16,220,237,49, +48,0,93,93,93,93,93,93,1,93,93,1,20,14,2,43,1,21,35,53,35,34,46,2,53,52,62, +2,59,1,53,51,21,51,50,30,2,7,52,38,43,1,17,51,50,62,2,37,20,30,2,59,1,17, +35,34,6,5,159,64,131,197,133,40,191,40,133,197,131,64,67,133,201,135,29,191, +28,135,202,133,67,192,185,183,5,13,92,136,89,43,252,87,43,89,136,92,13,9, +182,182,2,224,105,188,143,84,227,227,84,143,188,105,113,185,131,72,182,182, +72,131,185,117,187,180,253,22,53,98,140,88,88,140,98,53,2,234,180,0,255,255, +0,46,0,0,5,43,5,129,18,6,0,59,0,0,0,1,0,168,254,104,5,197,5,129,0,11,0,74, +64,47,1,92,2,2,11,90,0,8,1,175,8,1,0,8,64,8,112,8,3,8,7,90,0,4,16,4,64,4, +3,7,4,32,13,224,13,2,9,9,5,3,11,11,7,95,4,18,2,0,47,63,237,50,47,63,51,47, +1,93,47,94,93,237,47,93,93,113,237,50,47,237,49,48,37,17,35,17,33,17,51,17, +33,17,51,17,5,197,180,251,151,191,2,245,186,160,253,200,1,152,5,129,251,31, +4,225,251,31,0,0,0,1,0,160,0,0,4,174,5,129,0,25,0,134,64,70,164,14,1,20,40, +13,17,72,1,32,13,17,72,42,7,58,7,74,7,3,23,90,25,144,22,1,143,22,1,48,22, +64,22,2,207,22,1,112,22,1,111,22,1,16,22,64,22,2,22,12,90,207,11,1,0,11,16, +11,64,11,3,7,11,32,27,1,32,27,1,27,184,255,192,64,19,14,17,72,0,5,95,21,47, +16,1,16,16,11,24,18,22,22,11,3,0,63,51,47,63,18,57,47,93,51,237,50,1,43,93, +113,47,94,93,93,237,47,93,93,93,93,113,113,113,51,237,49,48,0,93,43,43,93, +1,14,3,35,34,46,2,53,17,51,17,20,22,51,50,62,2,55,17,51,17,35,3,240,36,94, +107,115,56,114,166,108,52,190,130,134,53,110,104,92,35,190,190,1,252,8,20, +18,12,47,92,137,89,2,82,253,194,123,108,10,15,17,7,2,244,250,127,0,0,1,0, +168,0,0,6,173,5,129,0,11,0,114,64,76,7,90,4,4,0,11,90,36,8,1,11,8,1,228,8, +1,219,8,1,148,8,1,123,8,1,4,8,20,8,100,8,3,8,3,90,4,0,68,0,228,0,3,7,0,235, +13,1,196,13,1,187,13,1,132,13,1,112,13,1,2,64,13,1,15,13,1,9,5,1,3,7,7,3, +95,0,18,0,63,237,50,47,63,51,51,1,93,93,95,93,93,93,93,93,47,94,93,237,47, +93,93,93,93,93,113,113,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,168,191,1,233,186,1,233,186,5,129,251,31,4,225,251,31,4,225,250, +127,0,1,0,168,254,104,7,47,5,129,0,15,0,125,64,84,132,17,148,17,180,17,3, +123,17,1,84,17,1,1,92,2,2,15,90,12,11,90,8,8,4,11,12,59,12,75,12,91,12,123, +12,139,12,155,12,203,12,8,219,12,251,12,2,207,12,1,2,159,12,1,128,12,1,111, +12,1,0,12,1,8,12,7,90,32,4,1,4,13,9,5,3,15,15,11,11,7,95,4,18,2,0,47,63,237, +50,47,50,47,63,51,51,1,47,93,237,47,94,93,93,93,93,95,93,93,113,18,57,47, +237,16,237,50,47,237,93,93,93,49,48,37,17,35,17,33,17,51,17,33,17,51,17,33, +17,51,17,7,47,180,250,45,191,1,211,186,1,210,186,160,253,200,1,152,5,129, +251,31,4,225,251,31,4,225,251,31,0,2,0,46,0,0,5,235,5,129,0,16,0,25,0,100, +64,68,116,25,132,25,148,25,3,123,18,139,18,155,18,3,153,3,1,38,3,1,64,27, +1,6,90,47,17,127,17,2,176,17,1,159,17,1,0,17,16,17,32,17,64,17,4,7,17,14, +0,22,90,32,12,1,12,21,95,0,0,12,14,95,15,3,22,95,12,18,0,63,237,63,237,18, +57,47,237,1,47,93,253,50,204,47,94,93,93,93,113,237,93,49,48,0,93,93,93,93, +1,33,50,30,2,21,20,14,2,35,33,17,33,53,33,1,52,38,35,33,17,33,50,54,2,184, +1,66,125,186,124,62,61,121,182,121,253,243,254,53,2,138,2,115,164,164,254, +213,1,51,164,156,3,45,58,105,147,90,87,150,112,64,4,229,156,252,26,121,129, +254,2,136,0,3,0,168,0,0,6,109,5,129,0,14,0,23,0,27,0,140,64,76,116,23,132, +23,148,23,3,123,16,139,16,155,16,3,153,12,1,38,12,1,27,90,159,24,207,24,223, +24,3,16,24,64,24,80,24,112,24,4,24,0,90,0,15,1,224,15,1,159,15,1,0,15,16, +15,32,15,64,15,4,15,9,20,90,0,6,16,6,64,6,3,7,6,128,29,1,29,184,255,192,64, +19,11,14,72,19,95,9,9,6,7,25,25,7,3,24,24,20,95,6,18,0,63,237,51,47,63,51, +47,17,18,57,47,237,1,43,93,47,94,93,237,50,47,93,93,93,113,237,47,93,93,237, +49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50,30,2,7,52,38,35,33,17, +33,50,54,1,17,51,17,4,214,61,121,182,121,253,183,191,1,126,125,186,124,62, +192,164,164,254,153,1,111,164,156,1,152,191,1,157,87,150,112,64,5,129,253, +172,58,105,147,92,121,129,254,2,136,254,225,5,129,250,127,0,2,0,168,0,0,4, +214,5,129,0,14,0,23,0,107,64,76,116,23,132,23,148,23,3,123,16,139,16,155, +16,3,153,12,1,38,12,1,0,90,31,15,1,160,15,176,15,2,159,15,1,0,15,16,15,32, +15,64,15,96,15,5,15,9,20,90,0,6,16,6,2,7,6,175,25,1,64,25,128,25,144,25,3, +19,95,9,9,6,7,3,20,95,6,18,0,63,237,63,18,57,47,237,1,93,93,47,94,93,237, +50,47,93,93,93,113,237,49,48,0,93,93,93,93,1,20,14,2,35,33,17,51,17,33,50, +30,2,7,52,38,35,33,17,33,50,54,4,214,61,121,182,121,253,183,191,1,126,125, +186,124,62,192,164,164,254,153,1,111,165,155,1,157,87,150,112,64,5,129,253, +172,58,105,147,96,121,131,254,4,131,0,1,0,105,255,236,5,121,5,150,0,42,0, +206,64,81,115,26,131,26,2,115,28,131,28,2,101,28,1,115,4,131,4,2,101,4,1, +115,2,131,2,2,101,2,1,101,12,1,101,11,1,135,17,1,106,17,1,90,33,138,33,2, +10,32,26,32,90,32,3,10,40,26,40,2,36,36,24,38,14,91,32,35,112,35,2,144,35, +176,35,2,127,35,1,64,35,1,35,184,255,192,64,63,7,10,72,35,6,80,24,96,24,2, +175,24,191,24,2,32,24,1,24,35,95,127,38,175,38,2,38,38,9,30,95,19,16,25,32, +25,2,48,25,64,25,112,25,128,25,192,25,208,25,6,25,25,19,19,79,5,1,5,5,0,95, +9,4,0,63,237,51,47,93,63,51,47,93,113,16,237,17,57,47,113,237,1,47,93,93, +113,51,47,43,93,93,93,113,237,51,18,57,47,49,48,0,93,1,93,93,0,93,93,93,1, +93,93,93,93,93,93,93,93,1,34,14,2,7,39,54,36,51,50,4,22,18,21,20,2,6,4,35, +34,46,2,39,55,30,3,51,50,62,2,55,33,53,33,46,3,2,201,88,137,102,69,19,181, +71,1,46,225,164,1,0,175,91,86,172,254,255,171,118,189,149,113,41,156,27,81, +109,140,87,109,176,128,77,9,253,114,2,142,10,73,124,173,4,250,42,70,91,50, +60,173,176,101,187,254,246,165,159,254,244,195,109,54,99,136,83,78,55,105, +83,50,72,132,185,112,154,110,178,126,68,0,0,2,0,168,255,236,7,179,5,150,0, +26,0,46,0,168,64,63,165,7,1,133,24,1,138,20,1,121,29,1,118,35,1,118,39,1, +74,19,138,19,2,58,30,122,30,2,53,34,117,34,2,42,44,58,44,122,44,3,37,40,53, +40,117,40,3,160,48,1,0,91,144,27,160,27,2,160,27,176,27,2,27,184,255,192, +64,54,7,11,72,27,16,12,90,0,13,16,13,64,13,3,7,13,37,91,17,48,10,112,10,2, +10,32,95,22,4,11,95,80,16,1,176,16,224,16,2,15,16,1,8,16,16,13,14,3,13,18, +42,95,5,19,0,63,237,63,63,18,57,47,94,93,93,113,237,63,237,1,47,93,51,237, +47,94,93,237,50,47,43,93,113,237,93,49,48,93,93,93,93,93,93,93,93,93,93,93, +1,20,2,14,1,35,34,46,2,39,33,17,35,17,51,17,33,62,3,51,50,30,1,18,7,52,46, +2,35,34,14,2,21,20,30,2,51,50,62,2,7,179,90,170,245,155,156,239,165,90,7, +254,217,191,191,1,42,13,99,166,232,146,159,245,167,87,195,60,117,173,113, +116,175,117,58,60,117,173,114,121,176,114,54,2,199,165,254,242,192,104,99, +179,247,148,253,115,5,129,253,172,142,229,160,86,102,188,254,246,163,127, +208,148,80,80,148,208,127,127,211,153,85,86,153,212,0,2,0,96,0,0,5,32,5,129, +0,17,0,30,0,239,64,22,156,29,172,29,2,138,29,1,147,20,1,117,20,133,20,2,67, +17,83,17,2,17,184,255,216,64,25,33,36,72,130,17,146,17,162,17,3,100,17,116, +17,2,86,17,1,67,16,83,16,2,3,16,184,255,216,64,117,33,36,72,172,16,1,155, +16,1,125,16,141,16,2,2,94,16,110,16,2,73,16,1,44,16,60,16,2,3,175,1,1,2,1, +104,14,16,72,94,1,110,1,2,73,1,1,44,1,60,1,2,16,1,1,6,24,24,14,18,90,6,6, +0,13,90,224,14,1,143,14,159,14,175,14,207,14,4,0,14,64,14,2,7,14,17,32,0, +1,15,0,31,0,2,0,1,15,95,47,24,95,24,111,24,143,24,4,24,24,0,26,95,11,3,14, +14,0,18,0,63,50,47,63,237,18,57,47,93,237,50,1,47,93,93,51,47,94,93,93,93, +237,18,57,47,237,17,51,17,18,57,17,51,49,48,93,93,93,43,95,93,95,93,93,93, +95,93,93,93,43,95,113,93,93,93,43,113,0,93,93,93,93,51,1,46,3,53,52,62,2, +51,33,17,35,17,33,1,19,20,30,2,51,33,17,33,34,14,2,96,1,144,91,130,84,39, +66,126,185,120,2,151,191,254,73,254,146,28,37,77,119,83,1,205,254,59,76,120, +84,44,2,95,16,78,108,130,67,94,150,104,55,250,127,2,73,253,183,3,236,57,98, +72,41,2,8,31,63,94,255,255,0,87,255,236,4,115,4,78,18,6,0,68,0,0,0,2,0,120, +255,236,4,63,5,222,0,19,0,56,0,158,64,69,137,44,1,122,45,138,45,2,102,21, +118,21,134,21,3,84,18,1,84,12,1,91,2,1,90,35,122,35,138,35,3,90,47,106,47, +138,47,3,123,46,139,46,2,73,46,105,46,2,42,42,23,71,64,208,0,1,144,0,1,0, +58,128,48,58,1,128,58,1,58,184,255,192,64,12,30,35,72,52,10,71,0,31,32,31, +2,31,184,255,192,64,23,26,35,72,31,52,5,80,20,20,42,48,41,1,64,41,240,41, +2,41,15,80,26,22,0,63,237,47,93,113,51,57,47,237,50,1,47,43,93,237,57,43, +93,113,26,16,220,93,113,26,237,50,47,49,48,0,93,93,93,93,93,93,93,93,93,93, +1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,3,50,18,17,16,2,35,34,46,2,53, +52,18,62,1,55,62,3,55,21,14,1,7,14,5,7,62,3,3,130,39,73,104,65,69,114,81, +44,44,77,105,62,69,112,78,42,243,222,210,250,238,113,178,123,65,58,128,206, +147,57,100,91,86,43,86,161,91,78,124,94,67,44,23,2,19,67,97,126,1,246,114, +151,91,37,39,92,150,112,114,150,89,36,36,88,151,2,127,254,251,254,250,254, +247,254,253,70,156,250,180,192,1,22,193,115,28,11,17,14,12,6,161,11,23,17, +14,33,50,73,108,149,101,55,97,72,41,0,0,0,0,3,0,142,0,0,3,231,4,58,0,23,0, +36,0,47,0,149,64,12,42,19,1,37,2,1,26,18,42,18,2,3,184,255,232,64,33,9,12, +72,139,10,155,10,2,10,38,44,71,5,5,24,16,71,64,47,30,159,30,2,160,30,1,30, +49,128,64,49,1,49,184,255,192,64,50,30,35,72,31,49,63,49,239,49,3,38,24,70, +192,22,1,0,22,16,22,48,22,224,22,240,22,5,8,22,10,36,81,143,38,159,38,175, +38,3,38,38,24,37,80,23,15,24,80,22,21,0,63,237,63,237,18,57,47,113,237,57, +1,47,94,93,113,237,50,93,43,113,26,16,220,93,113,26,237,17,57,47,237,18,57, +93,49,48,0,43,93,93,93,1,50,30,2,21,20,14,2,7,21,30,3,21,20,14,2,35,33,17, +19,51,50,62,2,53,52,46,2,43,1,25,1,51,50,62,2,53,52,38,35,2,52,76,144,112, +68,35,60,82,46,54,95,69,40,61,109,151,91,254,67,180,236,69,95,59,27,28,63, +100,71,224,216,68,91,55,23,102,121,4,58,24,62,104,81,53,81,58,37,9,7,7,35, +61,90,61,78,117,78,39,4,58,252,75,20,44,67,47,50,70,44,20,1,194,254,192,19, +39,61,43,82,76,0,1,0,142,0,0,2,175,4,58,0,5,0,54,64,35,0,64,18,39,72,48,0, +1,0,0,7,3,70,192,4,1,0,4,16,4,48,4,224,4,240,4,5,8,4,2,80,5,15,3,21,0,63, +63,237,1,47,94,93,113,237,17,51,47,93,43,49,48,1,21,33,17,35,17,2,175,254, +147,180,4,58,131,252,73,4,58,0,0,0,2,0,20,254,104,4,136,4,58,0,7,0,23,0,159, +64,65,134,3,1,32,3,1,102,1,1,34,5,114,5,130,5,3,34,20,1,34,17,1,137,18,1, +34,18,1,25,19,121,19,2,102,2,118,2,2,34,2,1,25,2,1,34,16,1,4,16,1,98,4,1, +4,4,36,4,68,4,84,4,4,8,73,9,184,255,192,64,42,18,25,72,9,9,22,70,64,111,7, +127,7,143,7,3,32,7,64,7,2,7,25,128,20,15,12,73,6,1,13,1,80,20,15,22,6,14, +80,11,21,13,8,0,47,51,63,237,50,50,63,237,1,47,51,51,237,51,51,26,16,220, +93,93,26,237,50,47,43,237,49,48,93,93,93,93,93,93,93,93,93,93,93,93,93,93, +93,93,1,33,6,2,14,1,7,33,1,35,17,33,17,35,17,51,62,2,18,55,33,17,51,3,66, +254,206,24,49,48,48,22,1,241,1,70,163,252,210,163,119,30,58,58,57,28,2,132, +146,3,183,177,254,249,194,136,50,253,229,1,152,254,104,2,27,50,143,220,1, +59,223,252,73,255,255,0,87,255,236,4,24,4,78,18,6,0,72,0,0,0,1,0,7,0,0,5, +83,4,58,0,39,1,97,64,88,165,23,1,165,14,1,171,34,1,164,3,1,172,24,1,154,24, +1,163,13,1,149,13,1,90,6,106,6,122,6,3,85,31,101,31,117,31,3,74,33,154,33, +170,33,3,69,4,149,4,165,4,3,42,28,58,28,2,37,9,53,9,2,34,31,170,26,1,26,31, +27,16,27,27,32,20,38,70,39,165,11,1,11,10,3,6,6,39,10,184,255,240,64,49,10, +10,17,39,39,5,33,32,16,15,32,1,255,32,1,160,32,1,159,32,1,80,32,1,63,32,1, +32,32,1,207,32,1,128,32,144,32,2,95,32,1,32,32,48,32,2,32,4,5,184,255,240, +64,64,31,5,47,5,2,127,5,159,5,2,63,5,159,5,223,5,255,5,4,5,15,41,1,255,41, +1,160,41,1,111,41,159,41,2,80,41,1,63,41,1,32,41,1,207,41,1,128,41,144,41, +2,79,41,95,41,2,48,41,1,31,6,34,3,6,184,255,240,64,37,11,17,72,6,3,37,0,80, +20,15,17,31,17,79,17,95,17,4,15,17,31,17,79,17,3,7,17,17,4,26,18,10,15,39, +33,4,21,0,63,51,51,63,51,51,18,57,47,94,93,113,51,237,50,57,57,43,17,51,17, +51,1,93,93,93,93,113,113,113,113,113,113,114,47,93,113,114,56,51,47,93,93, +93,93,113,113,113,113,113,113,114,56,51,18,57,47,51,57,47,56,18,57,17,51, +17,51,93,16,237,50,17,57,47,56,57,51,93,17,51,49,48,93,93,93,93,93,93,93, +93,93,93,93,93,0,93,93,1,34,38,39,1,35,1,46,1,39,3,51,23,30,3,51,17,51,17, +50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,2,83,26,65,19,254,234,200,1, +97,17,66,45,216,188,148,48,65,52,48,30,180,30,48,52,65,48,148,188,216,45, +66,17,1,97,200,254,234,19,65,26,180,1,221,12,8,254,15,2,80,14,85,66,1,69, +239,77,92,50,16,1,218,254,38,16,50,92,77,239,254,187,66,85,14,253,176,1,241, +8,12,254,35,0,0,0,1,0,49,255,236,3,94,4,78,0,55,0,175,64,28,5,53,21,53,2, +5,38,21,38,37,38,3,131,45,1,45,15,21,70,40,40,51,71,10,29,73,64,30,184,255, +192,64,86,30,36,72,143,15,1,30,15,30,15,3,144,10,1,144,10,160,10,2,31,10, +1,10,57,128,16,57,1,4,73,3,64,12,20,72,3,45,15,80,143,16,159,16,175,16,3, +16,16,35,7,0,29,1,144,29,224,29,240,29,3,29,29,24,80,35,16,7,80,0,96,4,112, +4,128,4,3,239,4,1,32,4,1,4,4,0,22,0,63,50,47,93,93,113,16,237,63,237,51,47, +93,113,17,18,57,47,113,237,57,1,47,43,237,93,26,16,204,93,93,113,17,57,57, +47,47,93,43,26,237,16,237,50,47,237,18,57,113,49,48,93,93,5,34,38,39,55,30, +1,51,50,54,53,52,46,2,35,53,50,62,2,53,52,38,35,34,14,2,7,39,62,3,51,50,30, +2,21,20,14,2,7,21,30,3,21,20,14,2,1,202,167,197,45,159,25,126,103,96,113, +55,92,120,64,64,114,86,49,99,93,35,70,60,42,7,162,12,62,97,128,78,85,138, +98,53,44,71,88,45,56,100,75,43,49,101,152,20,125,129,44,78,86,94,91,59,78, +45,18,137,15,38,67,52,74,86,14,33,55,42,20,68,98,63,29,42,76,104,63,57,88, +61,36,4,2,6,41,67,93,58,69,119,87,49,0,0,0,0,1,0,142,0,0,3,234,4,58,0,19, +0,186,64,25,9,17,1,233,17,249,17,2,4,15,1,228,15,244,15,2,11,5,1,235,5,251, +5,2,16,184,255,192,64,107,29,60,72,153,16,1,6,64,29,60,72,119,6,151,6,2,6, +7,1,230,7,246,7,2,156,7,1,105,7,137,7,2,31,17,47,17,79,17,3,9,72,64,7,64, +10,1,80,10,1,159,10,255,10,2,10,21,128,0,21,192,21,208,21,224,21,4,192,21, +1,128,21,144,21,176,21,192,21,208,21,5,17,1,72,192,18,1,0,18,16,18,48,18, +224,18,240,18,5,8,18,16,7,19,15,10,6,18,21,0,63,51,51,63,51,51,1,47,94,93, +113,237,50,93,113,114,26,16,220,93,113,114,50,26,237,49,48,0,93,1,93,93,113, +114,0,93,43,93,43,113,114,113,114,1,113,114,1,17,20,14,2,7,1,51,17,35,17, +52,62,2,55,1,35,17,1,60,3,3,3,1,1,243,197,172,2,3,3,2,254,6,192,4,58,253, +176,23,77,82,74,21,3,101,251,198,2,148,19,57,60,57,20,252,151,4,58,0,255, +255,0,142,0,0,3,234,5,240,18,38,1,206,0,0,17,7,2,145,0,234,0,0,0,19,64,11, +1,20,17,38,1,2,25,33,18,8,37,1,43,53,0,43,53,0,0,0,0,1,0,138,0,0,3,138,4, +58,0,21,0,202,64,17,117,16,133,16,149,16,3,57,15,121,15,137,15,153,15,4,13, +184,255,208,64,123,12,17,72,133,11,149,11,2,120,5,1,133,13,149,13,2,47,23, +79,23,2,73,16,1,56,16,1,16,13,121,8,137,8,153,8,3,8,71,13,1,54,13,1,13,9, +16,9,9,14,2,20,70,0,21,16,21,48,21,240,21,4,21,57,15,73,15,2,15,32,14,1,32, +14,144,14,2,144,14,1,79,14,1,48,14,1,47,14,1,16,14,1,14,16,14,13,19,80,15, +2,63,2,79,2,3,15,2,63,2,255,2,3,8,2,2,14,21,21,14,21,8,8,0,15,0,63,50,47, +63,51,47,17,57,47,94,93,113,237,50,1,47,56,93,93,93,93,93,113,114,51,113, +47,93,237,50,17,57,47,56,57,113,113,51,93,17,51,113,113,93,49,48,0,93,1,93, +93,43,93,93,19,51,17,50,62,2,63,1,51,3,14,1,7,1,35,1,14,1,35,17,35,138,180, +30,48,52,65,48,148,188,216,45,66,17,1,97,200,254,234,19,65,26,180,4,58,254, +38,16,50,92,77,239,254,187,66,85,14,253,176,1,241,8,12,254,35,0,0,0,0,1,0, +11,255,236,4,29,4,58,0,25,0,186,64,42,26,21,1,130,7,1,116,7,1,85,7,101,7, +2,130,6,1,117,6,1,22,6,38,6,102,6,3,114,5,130,5,2,100,5,1,86,5,1,134,4,1, +4,184,255,240,64,61,12,15,72,26,3,1,116,2,1,7,24,12,17,72,25,70,64,127,0, +143,0,239,0,3,0,27,128,176,27,192,27,208,27,3,176,27,240,27,2,64,27,96,27, +112,27,160,27,176,27,192,27,6,131,23,1,23,54,6,1,6,2,184,255,240,64,26,24, +28,72,215,2,231,2,2,128,2,1,2,143,12,1,12,2,80,23,15,16,80,9,22,0,21,0,63, +63,237,63,237,1,47,93,51,93,93,43,51,113,51,93,93,113,114,26,16,220,93,26, +237,49,48,0,43,1,93,93,43,93,93,93,93,93,93,93,93,93,93,93,33,17,33,6,2,14, +3,35,34,38,39,53,30,1,51,50,62,3,18,55,33,17,3,104,254,137,25,42,44,51,71, +94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2,206,3,183,184,254,225,216, +149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,251,198,0,0,1,0,142,0,0,4,243, +4,58,0,28,1,3,64,21,137,18,153,18,2,134,12,150,12,2,107,17,123,17,2,100,13, +116,13,2,1,184,255,224,64,122,29,60,72,138,1,154,1,2,57,1,1,0,32,29,60,72, +133,0,149,0,2,54,0,86,0,2,143,19,159,19,2,93,19,109,19,125,19,3,59,19,75, +19,2,25,19,41,19,2,128,11,144,11,2,82,11,98,11,114,11,3,52,11,68,11,2,22, +11,38,11,2,1,0,15,15,8,21,72,64,19,80,22,1,159,22,255,22,2,22,30,128,144, +30,192,30,208,30,3,79,30,1,11,8,72,192,9,1,0,9,16,9,48,9,224,9,240,9,5,8, +9,28,2,2,184,255,192,64,22,29,60,72,2,32,19,22,72,84,2,1,19,2,10,15,22,15, +64,29,60,72,15,184,255,224,64,18,19,22,72,47,15,63,15,79,15,127,15,143,15, +5,15,1,9,21,0,63,51,51,93,43,43,51,63,51,51,93,43,43,17,51,1,47,94,93,113, +237,50,93,93,26,16,220,93,113,50,26,237,18,57,61,47,51,51,49,48,93,93,93, +93,93,93,93,93,93,93,43,93,93,43,93,93,93,93,33,35,1,30,3,21,17,35,17,33, +19,30,1,23,62,1,55,19,33,17,35,17,52,62,2,55,3,19,153,254,188,1,3,1,1,174, +1,24,220,23,37,8,10,35,23,220,1,13,173,1,3,2,2,3,183,26,60,61,57,23,253,44, +4,58,253,107,63,151,72,72,151,63,2,149,251,198,2,212,22,60,64,60,23,0,1,0, +142,0,0,3,221,4,58,0,11,0,139,64,48,5,70,64,2,15,6,79,6,2,57,47,6,111,6,143, +6,255,6,4,191,6,1,143,6,159,6,255,6,3,6,13,128,0,13,192,13,208,13,224,13, +4,192,13,1,128,13,1,13,184,255,192,64,49,19,23,72,1,9,70,192,10,1,0,10,16, +10,48,10,224,10,240,10,5,10,8,80,176,1,192,1,2,159,1,175,1,191,1,3,15,1,63, +1,2,8,1,1,10,5,21,3,0,15,0,63,50,63,51,57,47,94,93,113,114,237,1,47,93,113, +237,50,43,93,113,114,26,16,220,93,113,114,94,93,50,26,237,49,48,1,17,33,17, +51,17,35,17,33,17,35,17,1,66,1,231,180,180,254,25,180,4,58,254,54,1,202,251, +198,1,237,254,19,4,58,255,255,0,86,255,236,4,29,4,78,18,6,0,82,0,0,0,1,0, +142,0,0,3,199,4,58,0,7,0,109,64,80,1,70,64,15,2,79,2,2,57,47,2,111,2,143, +2,255,2,4,191,2,1,143,2,159,2,255,2,3,2,9,128,0,9,192,9,208,9,224,9,4,192, +9,1,128,9,176,9,192,9,208,9,4,47,9,1,5,70,192,6,1,0,6,16,6,48,6,224,6,240, +6,5,8,6,4,80,7,15,6,1,21,0,63,51,63,237,1,47,94,93,113,237,93,93,113,114, +26,16,220,93,113,114,94,93,26,237,49,48,1,17,35,17,33,17,35,17,3,199,180, +254,47,180,4,58,251,198,3,183,252,73,4,58,0,255,255,0,132,254,87,4,29,4,77, +18,6,0,83,0,0,255,255,0,87,255,236,3,202,4,78,18,6,0,70,0,0,0,1,0,35,0,0, +3,135,4,58,0,7,0,72,64,43,7,14,4,2,5,14,223,2,1,2,4,70,0,5,16,5,2,8,5,5,8, +9,160,9,1,95,9,1,48,9,64,9,2,47,9,1,4,21,3,7,80,0,15,0,63,237,50,63,1,93, +93,93,93,17,18,57,47,94,93,237,204,93,43,1,24,16,77,228,49,48,19,33,21,33, +17,35,17,33,35,3,100,254,168,180,254,168,4,58,131,252,73,3,183,0,0,0,255, +255,0,5,254,87,3,252,4,58,18,6,0,92,0,0,0,3,0,86,254,87,6,62,5,204,0,53,0, +74,0,95,0,229,64,13,141,93,157,93,173,93,3,78,24,14,17,72,72,184,255,232, +179,14,17,72,57,184,255,232,182,14,17,72,109,82,1,51,184,255,224,64,75,7, +10,72,15,26,31,26,47,26,3,24,32,7,10,72,0,3,16,3,32,3,3,7,4,54,71,64,25,14, +13,0,14,14,75,71,36,0,68,0,148,0,164,0,4,0,85,39,13,72,65,38,4,14,1,4,14, +36,14,68,14,100,14,132,14,180,14,228,14,7,7,14,52,97,1,97,184,255,192,64, +52,30,35,72,219,97,1,84,97,100,97,132,97,148,97,4,64,97,1,2,32,97,48,97,2, +31,97,1,0,97,1,38,0,31,45,80,3,70,80,49,28,16,8,18,91,3,59,80,5,22,22,13, +27,0,63,63,51,237,23,50,63,51,237,23,50,63,1,93,93,93,95,93,93,93,43,113, +47,94,93,113,51,51,237,50,50,220,93,237,43,1,24,16,77,244,26,237,49,48,95, +94,93,43,93,0,43,93,1,43,43,43,93,1,20,14,2,35,34,38,39,35,30,1,21,17,35, +17,52,54,55,35,14,1,35,34,2,17,16,18,51,50,22,23,51,52,46,2,53,17,51,17,20, +14,2,21,51,62,1,51,50,30,2,5,20,30,2,51,50,62,2,55,53,52,46,2,35,34,14,2, +5,52,46,2,35,34,14,2,29,1,30,3,51,50,62,2,6,62,38,86,140,101,105,158,42,6, +2,3,170,2,3,5,46,149,111,186,179,185,180,112,149,45,5,2,2,1,170,1,1,1,5,46, +144,114,101,140,86,38,250,213,26,56,85,60,60,94,65,34,2,34,64,94,61,57,86, +57,29,4,110,23,52,88,64,53,92,70,40,1,35,65,92,60,65,88,53,23,2,34,123,208, +150,85,88,100,35,77,58,254,89,1,167,54,82,40,104,90,1,19,1,25,1,28,1,26,90, +98,10,41,46,42,12,1,163,254,92,11,43,47,43,12,104,89,80,145,205,129,112,160, +103,48,43,98,157,113,24,115,159,98,43,46,102,163,116,100,156,108,56,34,96, +169,135,23,108,150,93,41,58,110,159,0,0,0,255,255,0,23,0,0,3,234,4,58,18, +6,0,91,0,0,0,1,0,142,254,104,4,102,4,58,0,11,0,91,178,7,73,8,184,255,192, +64,54,18,21,72,8,8,5,70,64,223,2,1,207,2,223,2,2,2,64,25,28,72,0,2,48,2,2, +2,13,128,111,13,1,1,70,0,10,16,10,48,10,240,10,4,8,10,5,1,80,10,21,8,3,0, +15,0,63,50,47,63,237,50,1,47,94,93,237,93,26,16,220,93,43,93,113,26,237,50, +47,43,237,49,48,1,17,33,17,51,17,51,17,35,17,33,17,1,66,1,221,180,147,163, +252,203,4,58,252,73,3,183,252,73,253,229,1,152,4,58,0,1,0,122,0,0,3,156,4, +58,0,25,0,92,64,37,108,15,124,15,140,15,3,22,32,7,10,72,21,24,7,12,72,12, +70,64,9,175,13,1,127,13,143,13,239,13,3,13,27,128,1,70,24,184,255,192,64, +20,9,12,72,24,14,19,80,9,15,6,31,6,2,6,6,12,21,10,0,15,0,63,50,63,57,47,93, +51,237,50,1,47,43,237,26,16,220,93,113,50,26,237,49,48,43,43,0,93,1,17,20, +30,2,51,50,54,55,17,51,17,35,17,14,3,35,34,46,2,53,17,1,46,16,39,64,47,70, +132,74,180,180,38,81,87,93,51,66,101,69,36,4,58,254,110,34,59,44,25,26,21, +2,5,251,198,1,205,15,31,24,16,41,76,110,69,1,155,0,0,0,1,0,142,0,0,5,221, +4,58,0,11,0,116,64,52,7,70,4,4,0,11,70,64,4,8,52,8,2,36,8,132,8,212,8,228, +8,4,11,8,1,139,8,251,8,2,8,13,128,251,13,1,180,13,212,13,2,128,13,1,2,112, +13,1,95,13,1,13,184,255,192,64,23,9,12,72,3,70,0,0,16,0,48,0,3,8,0,9,5,1, +15,7,3,80,0,21,0,63,237,50,63,51,51,1,47,94,93,237,43,93,93,95,93,93,93,26, +16,220,93,113,113,114,26,237,18,57,47,237,49,48,51,17,51,17,33,17,51,17,33, +17,51,17,142,180,1,154,180,1,153,180,4,58,252,73,3,183,252,73,3,183,251,198, +0,0,0,1,0,142,254,104,6,102,4,58,0,15,0,141,64,96,13,73,244,14,1,14,14,11, +70,8,7,70,64,4,4,0,107,8,1,4,8,1,84,8,228,8,2,59,8,1,107,8,123,8,139,8,251, +8,4,84,8,1,8,17,128,251,17,1,212,17,1,128,17,176,17,2,2,96,17,112,17,2,95, +17,1,32,17,48,17,64,17,3,3,70,0,0,16,0,48,0,240,0,4,8,0,14,9,5,1,15,11,7, +3,80,0,21,0,63,237,50,50,63,51,51,47,1,47,94,93,237,93,93,93,95,93,93,93, +26,16,204,93,93,113,113,114,114,17,57,47,26,237,16,237,50,47,93,237,49,48, +51,17,51,17,33,17,51,17,33,17,51,17,51,17,35,17,142,180,1,149,180,1,148,180, +147,163,4,58,252,73,3,183,252,73,3,183,252,73,253,229,1,152,0,0,0,0,2,0,45, +0,0,4,172,4,58,0,14,0,25,0,113,185,0,5,255,224,179,7,10,72,2,184,255,224, +64,16,7,11,72,3,71,64,176,21,1,21,27,128,80,27,1,27,184,255,192,64,45,30, +35,72,255,27,1,14,11,15,70,32,9,1,32,9,1,9,25,81,175,14,191,14,207,14,3,15, +14,31,14,79,14,3,7,14,14,9,11,80,12,15,15,81,9,21,0,63,237,63,237,18,57,47, +94,93,113,237,1,47,93,113,253,204,51,93,43,113,26,16,220,93,26,237,49,48, +43,43,1,50,22,21,20,14,2,35,33,17,33,53,33,25,1,51,50,62,2,53,52,38,43,1, +3,13,205,210,52,104,155,103,254,103,254,184,1,252,202,69,96,59,26,116,133, +203,2,112,147,159,74,118,82,44,3,183,131,254,54,254,15,25,49,71,46,94,87, +0,3,0,142,0,0,5,50,4,58,0,12,0,23,0,27,0,105,185,0,5,255,224,179,7,10,72, +2,184,255,224,64,58,7,10,72,3,71,19,19,9,27,70,64,159,24,175,24,2,24,29,128, +12,13,70,16,9,32,9,64,9,3,9,23,81,175,12,191,12,207,12,3,15,12,31,12,79,12, +3,7,12,12,9,25,10,15,24,13,81,9,21,0,63,237,51,63,51,18,57,47,94,93,113,237, +1,47,93,237,50,26,16,220,93,26,237,18,57,47,237,49,48,43,43,1,50,22,21,20, +14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,1,17,51,17,2,38,205,210,52, +104,155,103,254,103,180,202,69,96,59,26,116,133,203,3,60,180,2,112,147,159, +74,118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,254,13,4,58,251,198,0,0, +0,0,2,0,142,0,0,3,215,4,58,0,12,0,23,0,132,185,0,5,255,224,179,7,10,72,2, +184,255,224,64,86,7,10,72,3,71,64,176,19,1,19,25,128,47,25,1,47,25,175,25, +2,63,25,95,25,127,25,159,25,191,25,207,25,223,25,255,25,8,25,64,35,39,72, +12,13,70,0,9,208,9,2,16,9,32,9,64,9,240,9,4,9,23,81,175,12,191,12,207,12, +3,15,12,31,12,79,12,3,7,12,12,9,10,15,13,81,9,21,0,63,237,63,18,57,47,94, +93,113,237,1,47,93,113,237,50,43,93,113,114,26,16,220,93,26,237,49,48,43, +43,1,50,22,21,20,14,2,35,33,17,51,25,1,51,50,62,2,53,52,38,43,1,2,56,205, +210,52,104,155,103,254,85,180,220,69,96,59,26,116,133,221,2,112,147,159,74, +118,82,44,4,58,254,54,254,15,25,49,71,46,94,87,0,0,0,0,1,0,55,255,236,3,190, +4,78,0,40,0,170,64,87,118,34,1,22,29,1,118,28,1,107,15,1,107,6,1,16,10,32, +10,2,10,10,0,31,71,64,12,31,9,1,144,9,1,9,42,128,20,70,21,21,1,70,31,0,1, +223,0,1,0,64,12,18,72,0,10,80,143,11,159,11,175,11,3,11,11,26,4,80,36,0,1, +16,1,32,1,96,1,112,1,128,1,192,1,208,1,8,1,184,255,192,64,29,27,34,72,1,1, +36,22,31,20,47,20,127,20,143,20,223,20,5,20,64,29,32,72,20,20,17,80,26,16, +0,63,237,51,47,43,93,63,51,47,43,93,16,237,17,57,47,113,237,1,47,43,113,114, +237,51,47,237,26,16,220,93,113,50,26,237,18,57,47,93,49,48,93,93,93,93,93, +19,55,30,1,51,50,62,2,55,33,53,33,46,3,35,34,6,7,39,62,3,51,50,30,2,21,20, +14,2,35,34,46,2,55,182,16,133,100,73,103,68,34,5,254,99,1,157,4,34,67,103, +73,109,118,15,185,13,66,105,145,93,90,170,134,81,51,114,182,130,99,151,106, +61,1,59,12,108,104,53,97,135,82,131,90,133,88,44,105,91,14,68,116,84,48,53, +128,216,163,120,205,151,86,54,92,122,0,0,0,0,2,0,142,255,236,5,170,4,78,0, +19,0,39,0,128,64,85,121,37,137,37,2,116,33,132,33,2,118,27,134,27,2,121,23, +137,23,2,150,18,166,18,2,30,71,15,15,8,31,8,2,7,8,8,11,0,71,64,160,20,1,20, +41,128,14,10,70,192,11,1,0,11,16,11,48,11,224,11,240,11,5,8,11,25,80,17,16, +9,80,47,14,1,14,14,11,12,15,11,21,35,80,3,22,0,63,237,63,63,18,57,47,93,237, +63,237,1,47,94,93,113,237,50,26,16,220,93,26,237,18,57,47,94,93,51,237,49, +48,0,93,1,93,93,93,93,1,16,2,35,34,46,2,39,35,17,35,17,51,17,51,18,33,50, +18,3,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,5,170,235,223,102,161,115,65, +5,222,180,180,223,33,1,164,237,215,189,35,67,97,61,63,99,70,37,39,70,94,56, +62,100,70,38,2,30,254,228,254,234,62,128,192,131,254,19,4,58,254,54,1,222, +254,232,254,232,126,164,98,39,41,99,164,123,126,165,98,40,39,98,166,0,0,2, +0,17,0,0,3,199,4,58,0,13,0,22,0,143,64,68,117,1,133,1,2,3,32,11,17,72,0,32, +40,43,72,223,0,239,0,2,0,32,29,37,72,52,0,1,43,0,1,41,4,1,4,48,7,10,72,7, +32,7,11,72,18,71,0,3,3,12,6,6,2,22,11,70,64,175,12,1,239,12,1,12,24,128,1, +2,184,255,240,64,22,91,2,107,2,2,2,3,0,81,47,21,1,21,21,1,15,81,9,15,12,1, +21,0,63,51,63,237,18,57,47,93,237,50,1,47,93,56,51,26,16,220,93,113,26,237, +51,18,57,47,18,57,17,51,237,49,48,43,0,43,93,1,93,113,43,113,43,43,93,9,1, +35,1,46,1,53,52,54,51,33,17,35,25,1,35,34,6,21,20,22,59,1,2,23,254,197,203, +1,88,131,118,216,207,1,176,180,234,130,120,107,124,253,1,202,254,54,1,215, +27,163,122,149,150,251,198,1,202,1,241,92,93,94,93,0,255,255,0,87,255,236, +4,24,5,123,18,38,0,72,0,0,17,7,0,105,0,248,0,0,0,23,64,13,3,2,38,17,38,3, +2,4,42,40,17,27,37,1,43,53,53,0,43,53,53,0,0,0,0,1,0,10,254,87,3,238,5,204, +0,57,0,162,64,9,170,49,1,31,32,9,15,72,24,184,255,232,64,86,9,13,72,0,24, +16,24,2,7,36,36,57,28,70,64,80,45,1,159,45,1,45,59,128,10,7,57,70,4,3,192, +0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176,59,192,59,208,59,3,176,59,240,59, +2,255,59,1,112,59,160,59,176,59,3,57,21,40,80,33,27,15,51,80,22,10,2,81,7, +3,3,5,22,184,255,192,182,7,13,72,22,15,5,0,0,63,63,43,18,57,47,51,237,50, +16,237,50,63,237,63,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220, +93,113,26,237,17,57,47,49,48,0,94,93,43,43,1,93,51,17,35,53,51,53,51,21,33, +21,33,21,20,14,2,7,51,62,3,51,50,30,2,21,17,20,14,2,35,34,38,39,53,30,1,51, +50,62,2,53,17,52,46,2,35,34,14,2,21,17,142,132,132,180,1,44,254,212,2,3,2, +1,3,30,70,84,100,62,104,133,77,29,21,54,93,72,34,65,28,13,36,13,38,49,27, +10,17,48,88,70,64,103,73,40,4,182,131,147,147,131,148,33,66,56,39,7,55,77, +50,23,56,101,140,84,252,209,62,106,78,45,4,5,139,2,4,20,43,67,46,2,241,69, +104,69,35,46,84,120,75,253,170,0,0,0,255,255,0,142,0,0,2,200,5,228,18,38, +1,201,0,0,17,7,0,116,0,216,0,0,0,19,64,11,1,6,17,38,1,85,6,9,4,0,37,1,43, +53,0,43,53,0,0,0,0,1,0,87,255,236,3,222,4,78,0,40,0,171,64,113,116,30,1,116, +21,1,137,8,1,137,2,1,47,42,1,63,26,1,26,26,27,36,16,70,15,15,35,70,0,36,32, +36,2,0,36,64,36,96,36,128,36,160,36,192,36,224,36,7,8,36,24,27,71,31,5,1, +5,27,80,143,24,159,24,175,24,3,24,24,32,19,80,10,31,16,47,16,127,16,143,16, +223,16,5,16,64,29,32,72,16,16,10,16,32,80,0,0,35,16,35,32,35,96,35,112,35, +128,35,192,35,208,35,8,35,184,255,192,182,27,34,72,35,35,0,22,0,63,50,47, +43,93,16,237,63,51,47,43,93,16,237,18,57,47,113,237,1,47,93,237,50,47,94, +93,113,237,51,47,237,17,18,57,47,93,93,49,48,93,93,93,93,5,34,46,2,53,52, +62,2,51,50,30,2,23,7,46,1,35,34,14,2,7,33,21,33,30,3,51,50,54,55,23,14,3, +2,52,130,182,114,51,81,134,170,90,93,145,105,66,13,185,15,118,109,73,103, +67,34,4,1,156,254,99,4,35,68,103,74,100,133,16,182,9,61,106,151,20,86,151, +205,120,163,216,128,53,48,84,116,68,14,91,105,44,88,133,90,131,82,135,97, +53,103,109,12,67,122,92,54,0,255,255,0,57,255,236,3,182,4,75,18,6,0,86,0, +0,255,255,0,137,0,0,1,61,5,204,16,38,0,241,199,0,17,6,1,75,237,0,0,212,181, +9,64,56,56,72,9,184,255,192,64,9,55,55,72,9,64,54,54,72,9,184,255,192,179, +53,53,72,9,184,255,192,64,9,52,52,72,9,64,50,50,72,9,184,255,192,179,49,49, +72,9,184,255,192,64,9,48,48,72,9,64,42,42,72,9,184,255,192,179,41,41,72,9, +184,255,192,64,9,40,40,72,9,64,38,38,72,9,184,255,192,179,37,37,72,9,184, +255,192,179,36,36,72,9,184,255,192,179,35,35,72,9,184,255,192,64,16,34,34, +72,9,64,29,29,72,9,64,10,10,72,1,0,0,184,255,192,179,49,49,72,0,184,255,192, +64,9,40,41,72,0,64,25,27,72,0,184,255,192,182,18,18,72,128,0,1,0,184,255, +192,64,11,8,8,72,0,1,0,4,7,1,2,37,1,43,53,17,43,93,43,43,43,43,53,53,1,43, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,255,255,255,248,0,0,2, +37,5,123,18,38,0,241,0,0,17,6,0,105,203,0,0,25,182,2,1,4,17,38,2,1,184,255, +243,180,8,6,0,2,37,1,43,53,53,0,43,53,53,0,0,0,255,255,255,206,254,87,1,61, +5,204,18,6,0,77,0,0,0,2,0,11,255,236,6,236,4,58,0,34,0,45,1,42,64,82,163, +16,1,148,16,1,117,16,133,16,2,106,14,1,57,14,1,14,16,18,22,72,131,14,147, +14,163,14,3,117,14,1,106,13,1,57,13,1,13,16,18,22,72,163,13,1,87,13,103,13, +119,13,3,16,24,12,17,72,109,15,1,15,32,18,22,72,162,15,1,117,15,133,15,149, +15,3,54,15,70,15,2,5,184,255,224,179,7,10,72,2,184,255,224,64,18,7,11,72, +34,35,70,64,9,1,9,9,22,3,71,176,41,1,41,184,255,192,64,9,8,11,72,41,47,80, +47,1,47,184,255,192,64,93,30,35,72,255,47,1,48,47,1,109,11,1,31,11,63,11, +2,255,11,1,233,11,1,187,11,203,11,219,11,3,163,11,1,149,11,1,31,32,63,32, +2,255,32,1,106,32,1,41,32,1,163,32,1,53,32,1,11,15,32,3,22,45,81,175,34,191, +34,207,34,3,15,34,31,34,79,34,3,7,34,34,9,11,80,32,15,25,80,18,22,35,81,9, +21,0,63,237,63,237,63,237,18,57,47,94,93,113,237,1,47,23,51,93,93,113,113, +93,113,93,93,93,93,93,113,113,93,93,43,113,16,220,43,93,237,18,57,47,93,237, +50,49,48,43,43,93,93,93,43,113,0,43,1,93,93,43,113,113,93,93,43,113,113,93, +93,93,1,50,22,21,20,14,2,35,33,17,33,6,2,14,3,35,34,38,39,53,30,1,51,50,62, +3,18,55,33,25,1,51,50,62,2,53,52,38,43,1,5,77,205,210,52,104,155,103,254, +62,254,101,25,42,44,51,71,94,65,29,48,17,11,38,19,35,51,40,33,34,38,25,2, +242,242,69,96,59,26,116,133,243,2,112,147,159,74,118,82,44,3,183,184,254, +225,216,149,93,42,8,5,129,4,5,42,94,149,216,1,29,183,254,54,254,15,25,49, +71,46,94,87,0,0,2,0,142,0,0,6,44,4,58,0,20,0,31,0,133,185,0,7,255,224,179, +7,10,72,4,184,255,224,64,23,7,11,72,1,21,70,19,11,11,15,5,71,64,176,27,1, +27,33,128,80,33,1,33,184,255,192,64,50,30,35,72,255,33,1,18,14,70,16,15,32, +15,64,15,3,15,31,81,1,1,13,80,175,18,191,18,207,18,3,15,18,31,18,79,18,3, +7,18,18,0,15,21,21,81,11,21,16,0,15,0,63,50,63,237,63,18,57,47,94,93,113, +237,51,47,237,1,47,93,237,50,93,43,113,26,16,220,93,26,237,18,57,47,51,237, +50,49,48,43,43,1,17,51,50,22,21,20,14,2,35,33,17,33,17,35,17,51,17,33,17, +19,51,50,62,2,53,52,38,43,1,3,169,228,205,210,52,104,155,103,254,102,254, +78,180,180,1,178,181,202,69,96,59,26,116,133,203,4,58,254,54,147,159,74,118, +82,44,1,237,254,19,4,58,254,54,1,202,252,69,25,49,71,46,94,87,0,0,0,0,1,0, +10,0,0,3,238,5,204,0,41,0,144,185,0,7,255,232,64,85,9,13,72,0,7,16,7,2,7, +33,24,11,70,64,80,12,1,159,12,255,12,2,12,43,128,35,32,24,70,29,28,192,25, +1,0,25,16,25,48,25,224,25,240,25,5,8,25,176,43,192,43,208,43,3,176,43,240, +43,2,255,43,1,112,43,160,43,176,43,3,35,27,81,32,28,28,5,30,0,25,11,21,0, +18,80,5,184,255,192,180,9,13,72,5,15,0,63,43,237,50,63,51,63,18,57,47,51, +237,50,1,93,93,113,114,47,94,93,113,51,51,237,50,50,26,16,220,93,113,26,237, +17,57,49,48,0,94,93,43,1,62,3,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21, +17,35,17,35,53,51,53,51,21,33,21,33,21,20,14,2,7,1,61,30,70,84,100,62,104, +133,77,29,181,17,48,88,70,64,103,73,40,180,132,132,180,1,44,254,212,2,3,2, +1,3,89,55,77,50,23,56,101,140,84,253,87,2,134,69,104,69,35,46,84,120,75,253, +170,4,182,131,147,147,131,148,33,66,56,39,7,0,0,255,255,0,138,0,0,3,138,5, +228,18,38,1,208,0,0,17,7,0,116,1,63,0,0,0,19,64,11,1,22,17,38,1,81,22,25, +0,14,37,1,43,53,0,43,53,0,0,0,255,255,0,5,254,87,3,252,5,240,18,38,0,92,0, +0,17,7,2,145,0,183,0,0,0,19,64,11,1,32,17,38,1,10,37,45,17,31,37,1,43,53, +0,43,53,0,0,0,0,1,0,142,254,104,3,221,4,58,0,11,0,125,64,89,9,73,15,10,79, +10,2,38,10,10,0,7,70,64,15,4,79,4,2,57,47,4,111,4,143,4,255,4,4,191,4,1,143, +4,159,4,255,4,3,4,13,128,3,70,192,0,1,0,0,16,0,48,0,224,0,240,0,5,8,0,176, +13,192,13,208,13,3,176,13,240,13,2,112,13,160,13,176,13,192,13,4,9,5,1,15, +8,3,80,0,0,47,237,51,63,51,47,1,93,113,114,47,94,93,113,237,26,16,220,93, +113,114,94,93,26,237,18,57,47,94,93,237,49,48,51,17,51,17,33,17,51,17,33, +17,35,17,142,180,1,231,180,254,170,163,4,58,252,73,3,183,251,198,254,104, +1,152,0,0,1,0,168,0,1,3,186,7,28,0,7,0,55,64,37,5,90,0,6,16,6,64,6,3,6,3, +70,255,0,1,0,0,16,0,64,0,128,0,176,0,208,0,6,7,0,4,95,1,7,3,5,18,0,63,63, +51,237,1,47,94,93,93,237,47,93,237,49,48,1,17,51,17,33,17,35,17,3,6,180,253, +173,191,5,129,1,155,253,201,251,28,5,128,0,0,0,0,1,0,142,0,0,3,10,5,204,0, +7,0,56,64,36,6,73,16,3,48,3,2,3,3,9,0,70,192,1,1,0,1,16,1,48,1,224,1,240, +1,5,8,1,4,0,7,80,2,15,0,21,0,63,63,237,63,1,47,94,93,113,237,17,51,47,93, +237,49,48,33,35,17,33,17,51,17,33,1,66,180,1,217,163,254,56,4,58,1,146,253, +235,255,255,0,9,0,0,7,134,6,240,18,38,0,58,0,0,17,7,2,148,2,65,0,0,0,21,180, +1,47,5,38,1,184,255,184,180,48,51,15,46,37,1,43,53,0,43,53,0,255,255,255, +253,0,0,5,204,5,228,18,38,0,90,0,0,17,7,0,67,1,72,0,0,0,21,180,1,43,17,38, +1,184,255,162,180,44,47,15,42,37,1,43,53,0,43,53,0,255,255,0,9,0,0,7,134, +6,240,18,38,0,58,0,0,17,7,2,149,2,247,0,0,0,19,64,11,1,47,5,38,1,75,47,50, +15,46,37,1,43,53,0,43,53,0,0,0,255,255,255,253,0,0,5,204,5,228,18,38,0,90, +0,0,17,7,0,116,2,38,0,0,0,19,64,11,1,43,17,38,1,93,43,46,15,42,37,1,43,53, +0,43,53,0,0,0,255,255,0,9,0,0,7,134,6,178,18,38,0,58,0,0,17,7,2,152,2,134, +0,0,0,23,64,13,2,1,47,5,38,2,1,2,51,49,15,46,37,1,43,53,53,0,43,53,53,0,0, +0,255,255,255,253,0,0,5,204,5,123,18,38,0,90,0,0,17,7,0,105,1,161,0,0,0,23, +64,13,2,1,43,17,38,2,1,0,47,45,15,42,37,1,43,53,53,0,43,53,53,0,0,0,255,255, +0,45,0,0,5,41,6,240,18,38,0,60,0,0,17,7,2,148,1,34,0,0,0,21,180,1,9,5,38, +1,184,255,181,180,10,13,4,8,37,1,43,53,0,43,53,0,255,255,0,5,254,87,3,252, +5,228,18,38,0,92,0,0,17,6,0,67,105,0,0,21,180,1,32,17,38,1,184,255,167,180, +33,36,17,31,37,1,43,53,0,43,53,0,0,0,0,1,0,0,1,195,4,114,2,76,0,3,0,43,64, +30,2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38, +43,72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,4,114,1,195,137,137, +0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30,2,0,0,186,15,1,31,1,63,1,79,1,4,47, +1,63,1,111,1,175,1,223,1,5,1,64,38,43,72,1,0,47,43,93,113,237,1,47,47,49, +48,17,53,33,21,8,0,1,195,137,137,0,0,1,0,0,1,195,8,0,2,76,0,3,0,43,64,30, +2,0,0,186,15,1,31,1,63,1,79,1,4,47,1,63,1,111,1,175,1,223,1,5,1,64,38,43, +72,1,0,47,43,93,113,237,1,47,47,49,48,17,53,33,21,8,0,1,195,137,137,0,255, +255,255,225,254,78,4,138,255,169,16,38,0,66,0,229,16,7,0,66,0,0,0,190,0,1, +0,127,3,184,1,72,5,129,0,12,0,47,64,16,4,32,11,17,72,7,64,11,17,72,7,12,150, +10,151,0,184,255,192,64,10,8,11,72,0,10,156,0,169,7,3,0,63,244,237,1,47,43, +237,237,50,43,49,48,43,19,53,52,62,2,55,51,14,1,21,51,21,127,10,20,30,20, +121,45,50,89,3,184,146,52,86,75,66,32,65,132,65,195,0,0,0,1,0,127,3,184,1, +72,5,129,0,12,0,52,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255,192, +180,11,17,72,6,11,184,255,192,64,10,8,11,72,11,10,156,5,169,11,3,0,63,228, +237,1,47,43,51,43,253,237,49,48,43,1,20,14,2,7,35,62,1,53,35,53,51,1,72,9, +20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,63,197,0,1,0,127,254, +250,1,72,0,195,0,12,0,51,185,0,3,255,224,183,11,17,72,9,151,0,150,6,184,255, +192,180,11,17,72,6,11,184,255,192,64,9,8,11,72,11,5,169,11,156,10,0,47,253, +228,1,47,43,51,43,253,237,49,48,43,37,20,14,2,7,35,62,1,53,35,53,51,1,72, +9,20,29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,0,0,0,1,0,126, +3,184,1,71,5,129,0,12,0,47,64,16,8,32,11,17,72,5,64,11,17,72,5,1,150,2,151, +11,184,255,192,64,10,8,11,72,11,5,169,2,156,12,3,0,63,237,228,1,47,43,237, +237,50,43,49,48,43,1,21,35,20,22,23,35,46,3,61,1,1,65,88,49,45,123,20,29, +20,9,5,129,197,63,132,65,32,66,75,86,53,145,0,0,0,2,0,75,3,184,2,95,5,129, +0,12,0,25,0,89,64,58,17,32,11,17,72,4,32,11,17,72,20,64,11,17,72,20,25,150, +13,7,64,11,17,72,7,12,150,10,151,128,0,1,15,0,31,0,2,8,0,23,151,13,159,27, +175,27,2,10,23,156,13,0,0,13,169,6,20,3,0,63,51,228,50,47,16,237,50,1,93, +47,237,220,94,93,93,237,237,50,43,16,237,50,43,49,48,43,43,1,53,52,62,2,55, +51,14,1,21,51,21,33,53,52,62,2,55,51,14,1,21,51,21,1,151,10,19,29,20,122, +45,49,88,253,242,10,20,30,20,121,45,50,89,3,184,146,52,86,75,66,32,65,132, +65,195,146,52,86,75,66,32,65,132,65,195,0,0,2,0,75,3,184,2,95,5,129,0,12, +0,25,0,107,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22, +151,13,150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31, +11,2,8,11,19,184,255,192,64,24,11,17,72,19,63,24,1,24,159,27,175,27,2,10, +23,156,24,5,5,18,169,11,24,3,0,63,51,228,50,47,16,237,50,1,93,47,93,51,43, +220,94,93,93,50,43,253,237,16,253,237,49,48,43,43,1,20,14,2,7,35,62,1,53, +35,53,51,5,20,14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194, +254,181,9,20,29,20,123,45,49,88,195,4,240,53,86,75,66,32,65,132,65,195,145, +53,86,75,66,32,65,132,65,195,0,0,0,2,0,75,254,250,2,95,0,195,0,12,0,25,0, +104,185,0,16,255,224,179,11,17,72,3,184,255,224,64,13,11,17,72,22,151,13, +150,24,9,151,0,150,6,184,255,192,64,15,11,17,72,6,128,11,1,15,11,31,11,2, +8,11,19,184,255,192,64,21,11,17,72,19,24,159,27,175,27,2,5,5,18,169,24,11, +11,24,156,10,23,0,47,51,237,50,47,16,228,50,47,1,93,47,51,43,220,94,93,93, +50,43,253,237,16,253,237,49,48,43,43,37,20,14,2,7,35,62,1,53,35,53,51,5,20, +14,2,7,35,62,1,53,35,53,51,2,95,10,19,30,20,121,45,49,88,194,254,181,9,20, +29,20,123,45,49,88,195,51,53,87,75,66,32,65,132,65,195,144,53,87,75,66,32, +65,132,65,195,0,0,0,1,0,138,255,118,3,234,5,204,0,11,0,64,64,37,11,192,0, +8,9,8,0,188,3,7,7,6,4,192,47,3,111,3,175,3,3,32,3,1,3,11,193,10,194,7,4,193, +5,194,7,0,1,0,47,63,246,237,16,244,237,1,47,93,113,237,51,51,47,16,237,50, +50,47,16,237,49,48,1,3,35,3,5,53,5,3,51,3,37,21,2,137,22,115,22,254,160,1, +96,28,215,28,1,97,3,232,251,142,4,114,27,164,29,1,120,254,136,29,164,0,0, +1,0,136,255,115,3,233,5,204,0,21,0,86,64,50,12,8,189,9,15,5,6,11,14,15,5, +9,190,19,1,189,0,20,17,0,16,3,4,16,3,32,0,1,0,19,193,18,194,15,12,193,13, +194,15,8,193,7,194,4,1,193,2,194,4,0,0,63,246,237,16,244,237,47,246,237,16, +244,237,1,47,93,23,51,47,17,51,51,16,237,50,237,23,50,47,16,237,50,49,48, +1,5,53,5,3,51,3,37,21,37,3,19,37,21,37,19,35,19,5,53,5,19,1,241,254,152,1, +104,16,175,16,1,105,254,151,26,26,1,104,254,152,16,175,16,254,151,1,105,26, +3,232,27,164,29,1,120,254,136,29,164,27,254,182,254,185,27,164,29,254,136, +1,120,29,164,27,1,71,0,0,0,0,1,0,81,1,145,2,124,3,188,0,19,0,73,185,0,17, +255,232,179,9,12,72,13,184,255,232,64,39,9,12,72,7,24,9,12,72,3,24,9,12,72, +128,0,1,15,0,63,0,2,0,191,10,1,10,143,5,1,0,5,48,5,2,5,15,15,1,15,0,47,93, +205,93,93,1,47,93,205,93,93,49,48,0,43,43,43,43,1,20,14,2,35,34,46,2,53,52, +62,2,51,50,30,2,2,124,45,76,102,58,57,99,75,43,43,75,99,57,58,102,76,45,2, +170,58,102,77,44,44,77,102,58,57,100,74,43,43,74,100,0,0,0,3,1,22,0,0,6,234, +0,219,0,3,0,7,0,11,0,86,64,61,7,150,4,4,0,11,150,0,8,48,8,96,8,128,8,144, +8,160,8,208,8,240,8,8,0,8,48,8,64,8,96,8,144,8,192,8,208,8,240,8,8,8,8,3, +150,47,0,191,0,2,16,0,1,0,5,1,9,155,4,0,8,0,47,51,51,237,50,50,1,47,93,93, +237,47,94,93,113,237,18,57,47,237,49,48,33,53,51,21,33,53,51,21,33,53,51, +21,6,40,194,252,183,192,252,181,195,219,219,219,219,219,219,0,0,7,0,55,255, +245,7,200,5,141,0,3,0,23,0,43,0,63,0,83,0,103,0,123,3,217,64,12,118,0,134, +0,2,121,2,137,2,2,3,102,184,255,224,64,14,8,12,72,96,24,8,12,72,92,24,8,12, +72,86,184,255,224,179,8,12,72,62,184,255,232,64,14,8,12,72,56,24,8,12,72, +52,24,8,12,72,46,184,255,224,179,8,12,72,22,184,255,224,64,14,8,12,72,16, +24,8,12,72,12,24,8,12,72,6,184,255,224,64,13,8,12,72,74,180,59,181,49,0,1, +2,3,1,184,255,240,64,131,3,16,118,3,1,9,1,25,1,121,1,3,9,1,3,1,3,19,49,180, +102,64,1,38,64,182,64,198,64,214,64,4,64,64,19,114,180,99,181,89,180,105, +104,1,22,104,38,104,2,201,104,249,104,2,139,104,1,118,104,1,89,104,1,70,104, +1,41,104,1,27,104,1,233,104,1,150,104,198,104,2,121,104,1,107,104,1,86,104, +1,57,104,1,6,104,22,104,38,104,3,10,104,24,180,9,181,34,180,9,19,25,19,41, +19,73,19,89,19,121,19,137,19,153,19,8,34,19,64,45,49,72,19,184,255,192,64, +255,19,23,72,19,217,125,1,198,125,1,169,125,1,155,125,1,121,125,1,107,125, +1,93,125,1,73,125,1,59,125,1,45,125,1,9,125,25,125,2,251,125,1,237,125,1, +217,125,1,203,125,1,189,125,1,155,125,1,125,125,141,125,2,105,125,1,91,125, +1,77,125,1,54,125,1,41,125,1,11,125,27,125,2,204,233,125,249,125,2,214,125, +1,187,125,1,173,125,1,137,125,153,125,2,123,125,1,102,125,1,75,125,1,61,125, +1,9,125,1,219,125,251,125,2,205,125,1,153,125,169,125,2,107,125,139,125,2, +93,125,1,57,125,1,43,125,1,29,125,1,9,125,1,237,125,253,125,2,185,125,201, +125,217,125,3,123,125,171,125,2,89,125,1,11,125,59,125,75,125,3,155,249,125, +1,235,125,1,214,125,1,187,125,1,153,125,1,123,125,139,125,2,102,125,1,59, +125,75,125,2,9,125,25,125,2,246,125,1,217,125,1,205,125,1,169,125,185,125, +2,155,125,1,105,125,121,125,2,93,125,1,57,125,73,125,2,43,125,1,22,125,1, +249,125,1,237,125,1,201,125,64,249,1,187,125,1,153,125,1,123,125,1,102,125, +1,73,125,1,54,125,1,9,125,25,125,2,105,249,125,1,235,125,1,221,125,1,169, +125,1,150,125,1,121,125,1,107,125,1,73,125,1,59,125,1,25,125,1,11,125,1,253, +125,1,217,125,1,203,125,1,169,125,1,155,125,1,141,125,1,121,125,1,91,125, +107,125,2,57,125,1,27,125,43,125,2,249,125,1,235,125,1,169,125,201,125,2, +150,125,1,121,125,1,107,125,1,57,125,1,38,125,1,9,125,1,56,249,125,1,230, +125,1,201,125,1,182,125,1,153,125,1,139,125,1,89,125,1,70,125,1,41,125,1, +27,125,1,249,125,1,235,125,1,201,125,1,187,125,1,173,125,1,1,148,125,1,123, +125,1,100,125,1,75,125,1,63,125,1,27,125,1,15,125,1,228,125,1,203,125,1,176, +125,1,2,160,125,1,143,125,1,112,125,1,95,125,1,64,125,1,31,125,1,0,125,1, +8,109,182,84,183,119,182,94,19,69,182,44,183,79,182,54,19,39,182,14,183,29, +182,4,4,2,3,0,18,0,63,63,63,237,244,237,63,237,244,237,63,237,244,237,1,94, +93,93,93,93,93,93,93,95,93,93,93,113,113,113,113,113,113,113,95,113,113,113, +113,113,114,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,93,93,93, +93,113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114, +114,114,114,94,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113, +113,113,113,114,114,114,114,114,114,114,114,114,94,93,93,93,93,93,113,113, +113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,114,114,94,93, +93,93,93,93,93,93,93,93,93,93,93,93,113,113,113,113,113,113,113,113,113,113, +113,47,43,43,94,93,237,244,237,47,94,93,93,93,93,93,93,93,113,113,113,113, +113,113,113,114,114,253,244,237,18,57,47,93,113,237,17,57,57,47,47,94,93, +93,56,56,17,51,17,51,16,244,237,49,48,0,43,43,43,43,43,43,43,43,43,43,43, +43,1,95,93,93,33,35,1,51,37,50,30,2,21,20,14,2,35,34,46,2,53,52,62,2,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2,35,34,46,2,53, +52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,50,30,2,21,20,14,2, +35,34,46,2,53,52,62,2,19,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,48,155, +3,154,157,252,152,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19, +37,55,35,38,58,39,19,20,39,56,37,34,54,39,21,2,30,60,107,80,46,46,81,108, +62,63,108,80,46,46,81,110,210,19,37,55,35,38,58,39,19,20,39,56,37,34,54,39, +21,1,253,60,107,80,46,46,81,108,62,63,108,80,46,46,81,110,210,19,37,55,35, +38,58,39,19,20,39,56,37,34,54,39,21,5,129,12,33,83,139,106,102,140,86,38, +37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71,97,59,26,26, +59,97,254,239,33,83,139,106,102,140,86,38,37,86,140,103,106,139,83,33,254, +151,73,98,58,24,24,59,97,73,71,97,59,26,26,59,97,1,176,33,83,139,106,102, +140,86,38,37,86,140,103,106,139,83,33,254,151,73,98,58,24,24,59,97,73,71, +97,59,26,26,59,97,0,0,0,0,1,0,85,3,122,1,89,5,129,0,3,0,40,64,25,3,16,10, +13,72,1,16,10,13,72,1,150,31,2,47,2,2,2,48,0,1,0,0,1,3,0,63,205,1,47,93,221, +93,237,49,48,43,43,27,1,51,3,85,64,196,158,3,122,2,7,253,249,255,255,0,85, +3,122,2,175,5,129,16,38,2,14,0,0,17,7,2,14,1,86,0,0,0,9,180,1,96,4,1,4,17, +93,53,0,0,1,0,88,0,141,2,81,3,172,0,8,0,72,64,55,106,3,122,3,138,3,3,106, +0,122,0,138,0,3,7,236,6,235,5,236,31,1,79,1,95,1,127,1,143,1,5,48,1,64,1, +96,1,112,1,160,1,5,1,0,239,15,3,47,3,111,3,127,3,4,3,0,47,93,228,1,47,93, +113,237,237,237,49,48,93,93,37,1,53,1,51,21,9,1,21,1,168,254,176,1,80,167, +254,177,1,81,141,1,109,63,1,115,31,254,140,254,145,29,0,0,0,1,0,89,0,141, +2,82,3,172,0,8,0,66,64,48,101,6,117,6,133,6,3,101,0,117,0,133,0,3,4,236,1, +236,8,235,112,3,128,3,176,3,3,208,3,1,111,3,127,3,2,3,0,239,15,6,47,6,111, +6,127,6,4,6,0,47,93,228,1,47,93,93,113,253,237,237,49,48,93,93,37,35,53,9, +1,53,51,1,21,1,1,168,1,82,254,176,166,1,81,141,29,1,111,1,116,31,254,141, +63,0,0,0,255,255,0,185,0,0,3,71,5,129,16,38,0,4,0,0,17,7,0,4,1,200,0,0,0, +22,64,12,3,2,47,8,1,8,1,0,47,0,1,0,17,93,53,53,17,93,53,53,0,1,255,192,5, +223,2,235,6,84,0,3,0,13,179,1,0,2,1,0,47,205,1,47,47,49,48,1,33,53,33,2,235, +252,213,3,43,5,223,117,0,1,254,96,0,0,2,98,5,129,0,3,0,45,182,3,16,111,3, +1,3,1,184,255,240,64,18,239,1,1,1,64,13,18,72,1,64,8,11,72,1,2,3,0,18,0,63, +63,1,47,43,43,93,56,47,93,56,49,48,33,35,1,51,254,244,148,3,113,145,5,129, +0,0,1,0,101,2,7,2,131,4,157,0,33,0,111,185,0,30,255,216,64,30,9,17,72,23, +10,224,36,11,1,11,33,224,36,0,212,0,228,0,3,0,23,6,228,11,139,0,251,0,2,0, +184,255,192,64,38,10,13,72,4,0,1,0,29,17,17,75,29,91,29,2,29,64,21,25,72, +29,64,16,19,72,47,29,63,29,2,27,29,1,15,29,1,2,29,0,47,95,93,93,93,43,43, +93,51,47,16,204,93,43,93,50,237,50,1,47,93,237,47,93,237,50,49,48,0,43,1, +17,52,46,2,35,34,6,21,17,35,17,52,46,2,53,51,20,30,2,21,51,62,3,51,50,22, +21,17,2,2,13,29,47,35,72,85,128,1,1,2,119,2,2,2,2,15,38,49,64,42,110,97,2, +7,1,142,46,61,37,16,100,94,254,148,1,255,20,46,40,29,4,3,27,34,35,12,28,46, +32,17,108,121,254,79,0,0,0,1,0,4,0,0,4,46,5,129,0,17,0,106,64,69,7,3,7,3, +10,0,16,32,16,2,16,16,48,16,80,16,112,16,144,16,224,16,6,16,5,1,9,92,14,12, +10,8,12,81,5,31,13,1,0,13,1,13,4,95,15,1,31,1,63,1,79,1,4,63,1,1,15,1,1,8, +1,1,9,0,95,15,3,9,18,0,63,63,237,18,57,47,94,93,93,113,237,220,93,113,50, +237,50,1,47,51,51,237,50,50,47,93,113,18,57,57,47,47,49,48,1,17,33,21,33, +21,33,21,33,17,35,17,35,53,51,17,33,21,1,103,2,175,253,81,1,146,254,110,180, +175,175,3,123,4,230,254,36,157,213,129,254,233,1,23,129,3,233,155,0,1,0,58, +0,0,4,80,5,150,0,58,0,221,64,81,133,58,149,58,2,21,22,37,22,53,22,3,40,44, +0,48,17,13,6,30,111,29,29,0,52,110,6,43,39,48,110,18,14,10,10,0,79,6,95,6, +111,6,3,6,58,111,0,0,32,0,2,0,0,32,0,48,0,80,0,112,0,144,0,176,0,208,0,8, +0,0,16,0,48,0,192,0,224,0,5,8,0,184,255,192,64,70,14,18,72,0,42,16,81,17, +46,12,81,43,175,13,1,13,64,42,45,72,0,13,16,13,32,13,3,13,39,111,17,1,47, +17,95,17,111,17,143,17,159,17,223,17,239,17,7,17,17,52,35,115,41,30,1,30, +24,7,7,52,116,37,58,1,23,58,1,58,6,24,0,63,51,93,93,237,50,63,51,93,237,18, +57,47,93,113,51,222,93,43,93,50,237,50,16,237,50,1,47,43,94,93,113,114,237, +47,93,18,57,47,51,51,237,50,50,16,237,17,57,47,237,17,51,51,17,18,57,57,49, +48,0,93,93,1,14,3,35,33,53,62,1,61,1,35,53,51,53,35,53,51,53,52,62,2,51,50, +30,2,23,7,46,3,35,34,6,29,1,33,21,33,21,33,21,33,21,20,14,2,7,33,50,62,2, +55,4,80,9,57,89,115,67,253,70,89,86,186,186,186,186,48,99,152,103,70,123, +99,71,18,174,10,39,53,65,36,114,112,1,152,254,104,1,152,254,104,22,44,63, +40,1,227,38,67,53,37,8,1,55,80,117,77,37,154,46,160,121,25,129,140,129,130, +92,147,102,55,29,58,86,57,57,31,52,36,20,115,125,138,129,140,129,7,56,106, +92,71,21,19,42,67,48,0,0,0,0,4,0,158,255,236,8,103,5,129,0,14,0,23,0,47,0, +98,1,193,64,71,134,2,1,117,91,133,91,2,91,73,107,73,139,73,3,143,68,1,109, +68,1,91,68,1,105,82,1,105,80,1,125,22,1,91,22,107,22,2,125,17,141,17,2,91, +17,107,17,2,84,57,100,57,2,54,57,70,57,2,37,97,53,97,69,97,3,76,32,9,14,72, +49,184,255,224,64,94,9,14,72,29,32,12,17,72,13,29,29,29,45,29,3,82,73,81, +81,48,72,65,0,70,15,24,39,75,37,41,72,30,34,32,30,57,73,15,56,1,102,56,1, +56,56,89,72,75,95,15,1,63,75,95,75,239,75,3,75,64,27,39,72,239,30,1,31,30, +95,30,127,30,3,15,30,75,75,30,15,3,8,64,65,80,65,96,65,3,127,65,143,65,2, +65,184,255,192,64,16,7,12,72,65,20,7,70,0,8,16,8,32,8,3,8,100,184,255,192, +179,91,95,72,100,184,255,192,179,80,88,72,100,184,255,192,179,70,74,72,100, +184,255,192,179,59,62,72,100,184,255,192,179,48,53,72,100,184,255,192,64, +11,27,31,72,79,100,95,100,111,100,3,100,184,255,192,179,7,10,72,89,184,255, +248,64,71,19,22,72,65,8,19,22,72,89,65,78,60,80,57,51,22,44,80,27,22,6,95, +20,87,80,121,82,1,72,82,88,82,104,82,3,82,78,40,32,80,33,78,37,33,35,35,33, +127,33,143,33,2,175,20,1,20,64,9,17,72,20,33,20,33,8,19,95,9,3,8,18,0,63, +63,237,18,57,57,47,47,43,93,93,17,51,47,17,51,51,16,237,50,47,51,93,93,237, +16,237,63,237,63,51,237,18,57,57,43,43,1,43,93,43,43,43,43,43,43,47,93,237, +50,47,43,93,113,18,23,57,47,47,47,93,113,43,93,93,16,237,51,47,93,113,237, +17,51,51,16,237,50,17,57,57,16,237,16,237,50,47,237,49,48,93,43,43,43,93, +0,93,93,1,93,93,93,93,0,93,93,93,93,93,1,93,0,93,1,93,1,20,14,2,43,1,17,35, +17,33,50,30,2,7,52,38,43,1,17,51,50,54,1,14,1,35,34,38,53,17,35,53,51,55, +51,21,51,21,35,17,20,22,51,50,54,55,37,20,6,35,34,46,2,39,55,30,1,51,50,62, +2,53,52,46,2,39,46,3,53,52,54,51,50,22,23,7,46,3,35,34,21,20,30,2,23,30,3, +3,186,61,121,182,121,130,181,1,43,125,186,124,62,182,164,164,105,113,165, +155,2,123,35,74,48,105,93,104,111,53,110,157,157,41,55,23,40,26,2,232,183, +170,75,121,92,61,15,159,17,99,88,40,68,49,27,34,62,87,52,49,96,77,47,168, +161,141,165,22,161,6,31,45,54,30,155,32,57,80,48,48,100,82,52,3,217,92,159, +117,68,253,219,5,129,61,111,157,97,134,139,253,212,146,252,186,11,13,123, +122,1,197,131,242,242,131,254,98,78,73,8,6,98,120,129,24,54,88,64,26,61,58, +10,25,40,30,30,41,29,23,13,12,32,53,79,59,112,119,105,116,17,28,38,24,10, +85,25,36,28,22,11,11,31,54,87,0,1,0,16,255,236,4,86,5,150,0,61,0,232,185, +0,2,255,235,64,68,15,73,106,38,1,58,43,74,43,122,43,138,43,4,36,59,52,59, +68,59,116,59,132,59,5,46,55,55,4,57,45,51,110,20,24,15,14,26,15,3,20,37,110, +36,36,3,110,64,4,96,4,128,4,160,4,176,4,5,0,4,144,4,176,4,208,4,4,4,184,255, +192,64,94,24,27,72,4,48,24,81,25,57,15,81,54,15,16,31,16,127,16,143,16,159, +16,5,16,64,39,47,72,0,16,16,16,128,16,3,16,45,47,25,63,25,127,25,3,47,25, +63,25,175,25,207,25,4,47,25,175,25,2,25,25,0,40,115,216,37,1,124,37,140,37, +2,26,37,42,37,2,37,31,7,0,115,115,3,131,3,2,21,3,37,3,2,3,9,25,0,63,51,93, +93,237,63,51,93,93,93,237,18,57,47,93,113,114,51,220,93,43,113,50,237,50, +16,237,50,1,47,43,93,113,237,51,47,237,47,23,51,47,196,16,237,50,50,17,57, +47,196,49,48,0,93,93,93,43,37,50,54,55,23,14,3,35,34,46,2,39,35,55,51,46, +1,53,52,54,55,35,55,51,62,3,51,50,30,2,23,7,46,1,35,34,14,2,7,33,7,33,14, +1,21,20,22,23,33,7,33,30,3,2,179,100,120,14,185,13,63,103,147,97,120,177, +121,69,13,171,40,120,1,2,2,1,160,40,129,15,73,123,173,115,97,147,103,63,13, +185,14,121,106,68,106,79,50,11,1,190,40,254,99,2,1,2,2,1,196,40,254,108,9, +42,77,114,126,100,91,14,68,118,87,50,77,139,192,114,129,8,46,24,27,53,6,127, +122,189,130,67,50,87,118,68,14,91,100,39,87,137,99,127,16,47,23,22,37,19, +129,81,138,100,57,0,0,0,0,4,0,69,255,244,6,208,5,140,0,19,0,23,0,43,0,79, +0,192,64,14,118,20,134,20,2,121,22,137,22,2,133,47,1,66,184,255,232,64,9, +8,11,72,60,24,8,11,72,17,184,255,232,179,8,11,72,13,184,255,232,64,29,8,11, +72,7,24,8,11,72,3,24,8,11,72,22,23,20,21,74,180,73,73,52,180,53,178,63,23, +16,21,184,255,240,64,62,21,23,21,23,0,44,180,63,64,10,14,72,63,34,180,10, +178,0,180,0,24,16,24,32,24,80,24,96,24,208,24,224,24,240,24,8,24,38,52,1, +52,49,182,58,184,77,182,74,68,4,23,3,20,18,29,182,15,184,39,182,5,19,0,63, +237,244,237,63,63,63,51,237,244,237,51,93,1,47,93,253,244,237,47,43,237,18, +57,57,47,47,56,56,16,244,237,51,47,237,17,51,17,51,49,48,0,43,43,43,43,43, +43,1,93,93,93,1,20,14,2,35,34,46,2,53,52,62,2,51,50,30,2,1,35,1,51,19,52, +46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,20,30,2,51,50,54,55,23,14,3,35,34, +46,2,53,52,62,2,51,50,30,2,23,7,46,1,35,34,6,6,208,51,87,116,66,66,115,85, +49,48,86,117,68,66,115,85,50,251,59,155,3,154,157,149,22,43,63,40,42,64,44, +22,23,43,63,41,39,63,44,24,250,155,20,47,75,54,69,94,11,141,6,45,77,111,72, +94,132,82,38,59,97,124,65,68,106,76,48,9,143,10,83,75,108,87,1,178,125,171, +105,45,45,104,171,126,133,174,103,41,41,103,174,253,201,5,129,252,49,99,131, +78,32,33,78,131,98,95,128,79,34,34,79,128,2,124,75,124,90,50,82,87,9,54,99, +76,45,69,121,164,96,130,173,103,42,40,70,94,55,11,72,85,164,0,2,0,19,255, +236,2,126,5,149,0,39,0,55,0,185,64,9,138,32,1,53,40,14,17,72,26,184,255,232, +179,8,16,72,22,184,255,232,64,67,8,16,72,8,32,8,16,72,6,32,11,16,72,5,27, +21,27,2,5,21,21,21,2,3,4,4,29,16,40,32,40,2,96,40,112,40,128,40,192,40,4, +15,40,1,40,40,4,51,20,51,2,8,51,159,35,1,35,18,14,192,10,208,10,224,10,3, +10,184,255,192,179,34,38,72,10,184,255,192,64,26,7,11,72,10,79,57,1,18,51, +45,15,11,34,24,14,14,7,45,24,3,3,7,24,7,0,7,0,47,205,63,18,57,47,16,205,17, +57,47,18,57,57,205,17,57,57,1,93,47,43,43,93,198,51,205,93,50,0,94,93,1,51, +47,93,93,113,205,50,47,51,49,48,0,93,93,43,43,43,43,1,43,93,37,50,54,55,51, +14,1,35,34,38,61,1,14,1,7,53,62,1,55,17,52,62,2,51,50,30,2,21,20,14,2,7,21, +20,30,2,19,52,46,2,35,34,14,2,21,17,62,3,1,177,51,68,17,69,20,120,109,111, +127,32,66,34,35,66,31,25,59,98,72,52,79,53,27,44,79,110,66,19,32,42,115,14, +27,40,26,32,39,22,8,49,77,54,28,78,104,109,154,157,159,155,175,17,28,13,73, +14,29,16,2,75,59,108,83,49,42,78,111,69,99,180,152,118,38,244,57,83,54,26, +4,20,52,85,61,33,36,61,81,46,254,5,33,104,131,151,0,0,0,0,4,0,188,0,0,8,46, +5,129,0,19,0,35,0,55,0,59,0,244,64,124,141,0,1,0,24,13,16,72,61,0,1,25,0, +1,132,10,1,114,10,1,69,10,85,10,101,10,3,22,10,38,10,2,5,33,21,33,37,33,3, +4,29,20,29,2,11,24,27,24,2,11,22,27,22,2,47,61,1,58,20,73,36,19,73,16,0,16, +57,46,73,26,144,16,160,16,192,16,3,31,26,1,16,26,16,26,8,144,36,160,36,176, +36,3,47,36,1,0,36,1,36,10,1,7,73,48,8,64,8,80,8,3,0,8,16,8,32,8,144,8,4,8, +41,31,15,1,184,255,192,179,29,36,72,1,184,255,192,64,15,18,21,72,1,17,9,3, +51,23,192,57,208,57,2,57,184,255,192,64,21,35,44,72,57,56,11,64,29,36,72, +11,64,18,21,72,0,11,56,3,8,18,0,63,23,51,43,43,47,221,43,93,222,205,63,51, +51,43,43,63,205,1,47,93,113,237,50,50,47,93,93,93,18,57,57,47,47,93,93,16, +237,51,17,51,16,237,16,237,50,93,49,48,0,93,93,93,93,1,93,93,93,93,93,93, +43,93,33,1,22,23,30,1,21,17,35,17,51,1,38,39,46,1,53,17,51,17,1,20,6,35,34, +38,53,52,62,2,51,50,30,2,7,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,1,53, +33,21,4,38,253,48,1,2,1,2,160,202,2,216,2,2,2,2,162,3,54,176,175,168,177, +43,87,131,88,93,131,84,39,159,24,47,69,45,46,71,48,25,26,48,67,41,46,72,50, +25,254,16,2,123,4,166,44,44,38,89,39,252,88,5,129,251,82,40,46,39,98,51,3, +156,250,127,2,178,188,203,201,190,91,145,101,53,53,100,145,92,81,107,64,26, +27,64,107,80,82,108,63,26,26,63,108,253,160,146,146,0,0,0,0,2,0,188,2,122, +7,25,5,129,0,39,0,47,0,148,64,9,9,24,19,23,72,136,9,1,8,184,255,232,64,16, +19,23,72,89,8,105,8,121,8,3,37,24,13,17,72,24,184,255,240,64,73,12,17,72, +44,41,196,42,24,21,196,64,22,224,22,2,22,22,0,64,47,1,47,0,42,16,42,64,42, +80,42,4,42,39,196,37,111,0,175,0,207,0,223,0,239,0,5,0,40,44,202,0,9,22,29, +4,0,42,32,42,80,42,128,42,4,42,2,15,23,37,15,3,45,3,0,63,23,51,17,51,204, +93,23,50,237,50,1,47,93,51,237,47,93,204,93,18,57,47,93,237,50,16,253,204, +49,48,43,43,93,43,93,43,1,17,53,6,7,14,1,7,3,35,3,46,1,39,38,39,6,21,6,20, +21,17,35,17,51,19,30,1,31,1,54,55,62,3,53,19,51,17,1,17,35,17,35,53,33,21, +6,155,5,4,4,5,2,230,108,163,2,24,14,17,20,1,1,128,190,223,2,5,2,6,20,16,7, +13,11,7,168,184,251,40,134,255,2,138,2,122,1,169,194,11,11,9,18,5,253,203, +1,157,5,64,38,44,55,10,10,8,18,6,253,201,3,7,253,205,4,13,7,18,51,41,18,34, +28,18,2,1,157,252,249,2,152,253,104,2,152,111,111,0,0,0,0,1,0,108,0,0,5,184, +5,150,0,57,0,221,64,95,101,36,1,101,22,1,157,49,1,143,49,1,49,16,11,15,72, +157,9,1,143,9,1,9,16,11,15,72,116,3,132,3,2,54,3,1,54,2,118,2,2,54,56,118, +56,2,116,55,132,55,2,54,55,1,42,26,1,42,32,1,41,53,48,40,10,18,32,40,96,40, +112,40,144,40,4,47,18,111,18,127,18,159,18,4,40,18,40,18,24,34,91,16,53,1, +53,184,255,192,64,65,23,29,72,191,53,207,53,2,0,53,48,53,2,53,17,5,91,31, +24,63,24,79,24,143,24,191,24,207,24,223,24,7,111,24,127,24,159,24,239,24, +255,24,5,0,24,48,24,2,8,24,10,15,19,39,48,5,42,95,18,41,18,29,95,0,4,0,63, +237,63,51,237,23,50,1,47,94,93,93,113,253,196,47,93,93,43,114,237,17,57,57, +47,47,93,93,17,51,17,51,16,196,49,48,0,93,93,93,93,93,93,93,93,43,93,93,43, +93,93,93,93,1,50,30,2,21,20,14,2,7,54,55,62,1,59,1,21,33,53,62,3,53,52,46, +2,35,34,14,2,21,20,30,2,23,21,33,53,51,50,22,23,22,23,46,3,53,52,62,2,3,18, +151,241,168,90,59,109,157,99,42,39,33,71,23,244,253,179,96,139,89,42,61,116, +169,108,109,170,116,61,42,89,139,96,253,179,244,23,71,33,39,42,99,157,109, +59,90,168,241,5,150,86,162,234,147,106,191,167,138,54,2,3,2,4,156,224,51, +126,143,159,85,116,181,124,65,65,124,181,116,85,159,143,126,51,224,156,4, +2,3,2,54,138,167,191,106,147,234,162,86,0,0,0,2,0,88,255,222,4,124,4,72,0, +32,0,45,0,82,64,50,90,13,1,28,15,64,160,33,176,33,2,95,33,1,80,33,96,33,112, +33,3,33,47,128,32,47,1,45,208,17,1,17,5,16,45,45,22,39,10,16,22,21,27,1,6, +27,1,27,0,22,0,63,50,93,93,205,63,205,18,57,47,205,1,47,205,93,50,93,26,16, +220,93,113,113,26,205,50,49,48,93,5,34,46,2,53,52,62,2,51,50,30,2,21,33,17, +30,3,51,50,62,2,55,23,14,3,19,17,46,3,35,34,14,2,7,17,2,107,130,198,134,69, +95,152,189,95,112,194,142,81,252,197,22,64,78,88,46,75,116,93,76,35,72,36, +84,109,143,203,19,59,77,92,53,51,87,74,60,24,34,93,157,204,111,147,213,139, +66,79,146,210,130,254,156,24,45,35,20,31,60,87,56,42,57,100,76,44,2,138,1, +21,20,42,34,22,19,32,42,24,254,234,0,0,0,255,255,0,80,255,246,6,78,5,129, +16,38,0,121,0,0,16,39,2,20,2,249,0,0,17,7,2,144,3,204,253,206,0,63,64,40, +4,3,2,111,15,1,47,15,1,15,1,191,12,1,128,12,1,112,12,1,96,12,1,64,12,1,16, +12,1,12,98,64,11,11,72,4,3,2,60,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93, +53,17,93,93,53,53,53,0,0,0,255,255,0,61,255,246,6,78,5,141,16,39,2,20,2,249, +0,0,16,39,2,144,3,204,253,206,17,6,0,115,34,0,0,63,64,40,1,3,2,111,49,1,47, +49,1,49,0,191,1,1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,141,64,11,11,72, +1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53, +0,0,0,255,255,0,93,255,246,6,78,5,129,16,39,2,20,2,249,0,0,16,39,2,144,3, +204,253,206,17,6,2,142,40,0,0,63,64,40,1,3,2,111,49,1,47,49,1,49,0,191,1, +1,128,1,1,112,1,1,96,1,1,64,1,1,16,1,1,1,126,64,11,11,72,1,3,2,49,24,0,63, +53,53,53,1,43,17,93,93,93,93,93,93,53,17,93,93,53,53,53,0,0,0,255,255,0,145, +255,246,6,78,5,129,16,39,2,20,2,189,0,0,16,39,2,144,3,204,253,206,17,6,2, +143,102,0,0,47,64,28,1,3,2,111,49,1,47,49,1,49,0,191,1,1,128,1,1,1,102,64, +11,11,72,1,3,2,49,24,0,63,53,53,53,1,43,17,93,93,53,17,93,93,53,53,53,0,0, +0,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3,128,16,7,17,16,0,47, +205,1,47,205,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51,14, +1,7,33,21,2,129,29,59,31,72,58,130,82,82,130,58,72,31,59,29,3,221,1,41,34, +98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1,16,255,195,2,240,4,127, +0,17,0,26,64,10,15,64,0,0,15,12,3,17,128,7,0,47,26,205,204,50,57,57,1,47, +26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,35,1,213,34,98, +65,68,112,42,36,42,112,68,65,98,34,86,3,160,29,59,31,72,58,130,82,82,130, +58,72,31,59,29,252,35,0,1,1,162,0,100,6,94,2,68,0,17,0,24,64,9,0,15,12,3, +128,7,17,16,17,0,47,205,1,47,221,26,204,50,57,57,49,48,1,46,1,39,51,30,1, +23,21,14,1,7,35,62,1,55,33,53,5,127,29,59,31,72,58,130,82,82,130,58,72,31, +59,29,252,35,1,127,34,98,65,68,112,42,36,42,112,68,65,98,34,86,0,0,0,1,1, +16,255,195,2,240,4,127,0,17,0,26,64,10,17,64,16,15,0,3,12,128,8,16,0,47,221, +26,204,50,57,57,1,47,26,205,49,48,37,62,1,55,21,14,1,7,35,46,1,39,53,30,1, +23,17,51,2,43,34,98,65,68,112,42,36,42,112,68,65,98,34,86,162,29,59,31,72, +58,130,82,82,130,58,72,31,59,29,3,221,0,0,1,1,162,0,100,6,94,2,68,0,31,0, +36,64,15,16,31,28,19,128,23,64,15,0,3,12,128,8,0,15,0,47,205,1,47,26,204, +50,57,57,26,221,26,204,50,57,57,49,48,1,30,1,23,35,46,1,39,53,62,1,55,51, +14,1,7,33,46,1,39,51,30,1,23,21,14,1,7,35,62,1,55,2,129,29,59,31,72,58,130, +82,82,130,58,72,31,59,29,2,254,29,59,31,72,58,130,82,82,130,58,72,31,59,29, +1,41,34,98,65,68,112,42,36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112, +68,65,98,34,0,0,0,1,1,16,255,195,2,240,4,127,0,31,0,38,64,16,15,64,0,31,16, +19,28,128,24,64,0,15,12,3,128,7,0,47,26,204,50,57,57,26,221,26,204,50,57, +57,1,47,26,205,49,48,1,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,213,34,98,65,68,112,42,36,42,112,68,65, +98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,3,160,29,59,31,72,58,130,82, +82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82,130,58,72,31,59,29,0, +2,1,16,255,72,2,240,4,127,0,3,0,35,0,40,64,17,1,19,0,4,35,20,23,32,28,3,0, +28,4,19,16,7,11,0,47,204,50,57,57,221,222,205,16,204,50,57,57,1,47,51,205, +50,49,48,5,33,21,33,19,14,1,7,53,62,1,55,51,30,1,23,21,46,1,39,17,62,1,55, +21,14,1,7,35,46,1,39,53,30,1,23,1,16,1,224,254,32,197,34,98,65,68,112,42, +36,42,112,68,65,98,34,34,98,65,68,112,42,36,42,112,68,65,98,34,104,80,4,88, +29,59,31,72,58,130,82,82,130,58,72,31,59,29,253,2,29,59,31,72,58,130,82,82, +130,58,72,31,59,29,0,0,2,0,56,255,229,3,186,5,197,0,47,0,69,0,222,64,93,156, +19,172,19,2,154,6,170,6,2,122,33,138,33,2,68,24,14,17,72,85,20,101,20,149, +20,165,20,4,140,7,1,74,7,90,7,122,7,3,74,56,90,56,2,67,56,11,15,72,58,67, +1,42,12,58,12,74,12,3,37,45,53,45,149,45,165,45,4,32,39,48,39,2,39,39,15, +169,48,249,48,2,40,48,1,48,28,0,70,64,96,31,1,31,184,255,192,64,64,18,21, +72,15,31,1,31,64,12,17,72,31,71,128,60,71,63,15,1,15,64,12,17,72,15,79,71, +1,39,34,80,43,53,81,27,0,22,64,22,128,22,192,22,4,7,22,22,47,43,111,43,223, +43,3,15,43,191,43,2,43,65,80,10,22,0,63,237,47,93,113,57,47,94,93,51,237, +16,237,50,1,93,47,43,93,237,26,16,220,43,93,43,113,26,237,51,51,113,113,18, +57,47,93,49,48,0,93,1,93,93,43,0,93,1,93,93,0,93,1,43,93,93,93,1,20,14,2, +7,14,3,35,34,46,2,53,52,62,4,51,50,30,2,23,51,62,1,53,52,38,35,34,14,2,7, +55,62,1,51,50,30,2,3,46,3,35,34,14,4,21,20,30,2,51,50,62,2,3,186,7,13,18, +11,31,96,130,162,97,93,127,78,35,22,47,73,102,132,83,42,77,64,50,16,4,1,3, +130,129,28,59,58,55,22,36,42,116,67,113,154,94,41,211,8,36,51,64,36,53,86, +67,49,32,15,21,42,65,44,66,108,83,56,3,170,46,104,106,106,48,128,206,144, +77,63,107,138,75,60,143,144,134,104,63,26,48,67,42,25,58,34,196,209,11,19, +28,17,147,23,39,88,149,195,254,147,42,74,55,32,51,84,110,116,116,48,53,91, +67,38,99,161,205,0,0,0,2,0,4,0,0,4,225,5,129,0,5,0,18,0,244,64,27,74,7,90, +7,106,7,3,69,17,85,17,101,17,3,3,56,8,1,55,16,1,6,24,14,17,72,18,184,255, +232,64,157,14,17,72,102,2,1,39,2,71,2,87,2,3,105,1,1,40,1,72,1,88,1,3,2,1, +12,12,0,6,59,3,1,20,3,1,244,3,1,107,3,155,3,187,3,235,3,4,52,3,84,3,2,0,3, +1,11,2,3,18,15,0,31,0,47,0,3,18,0,15,20,47,20,127,20,3,175,20,191,20,223, +20,255,20,4,32,20,112,20,144,20,3,15,20,63,20,143,20,3,58,175,20,207,20,223, +20,255,20,4,64,20,96,20,144,20,3,15,20,95,20,2,143,20,159,20,191,20,223,20, +4,0,20,32,20,80,20,112,20,4,0,3,6,3,18,95,5,18,12,32,19,22,72,153,12,1,12, +1,3,0,63,51,93,43,63,237,23,50,1,93,93,113,114,114,94,93,113,113,114,47,94, +93,51,47,95,94,93,93,93,93,113,113,51,18,57,61,47,51,51,49,48,93,93,93,93, +43,43,93,93,95,93,93,55,1,51,1,21,33,37,1,46,3,39,14,3,7,1,5,2,5,217,1,254, +251,35,4,21,254,174,16,29,22,15,1,2,14,23,28,16,254,173,141,4,244,251,12, +141,156,3,94,40,82,69,48,8,8,49,70,82,40,252,164,0,1,0,235,254,78,5,172,5, +129,0,7,0,54,64,36,3,90,79,4,175,4,191,4,207,4,4,4,7,90,32,0,1,15,0,1,0,0, +32,0,192,0,208,0,4,0,2,95,5,3,4,0,0,47,50,63,237,1,47,93,113,113,237,47,93, +237,49,48,1,17,33,17,35,17,33,17,4,244,252,182,191,4,193,254,78,6,145,249, +111,7,51,248,205,0,0,0,0,1,0,154,254,78,5,48,5,129,0,11,0,170,64,9,134,8, +150,8,2,163,9,1,9,184,255,192,64,26,13,16,72,163,7,1,2,144,7,1,114,7,130, +7,2,100,7,1,53,7,69,7,85,7,3,3,184,255,240,64,74,9,17,72,41,1,57,1,2,1,16, +12,17,72,8,143,6,159,6,175,6,3,2,72,17,73,15,2,127,2,2,2,6,2,6,0,207,10,1, +0,10,64,10,2,10,7,3,9,3,9,207,0,1,0,0,64,0,2,7,0,32,13,1,3,7,95,2,8,0,4,3, +1,9,95,0,0,47,237,57,63,18,57,57,237,57,1,93,47,94,93,93,51,51,47,47,51,47, +93,93,18,57,57,47,47,93,43,93,51,49,48,0,43,93,43,1,93,93,93,93,95,93,43, +93,93,19,53,9,1,53,33,21,33,9,1,33,21,154,2,123,253,149,4,66,252,178,2,72, +253,168,3,162,254,78,109,3,48,3,44,106,152,253,4,252,249,152,0,0,0,0,1,0, +101,2,96,4,72,2,242,0,3,0,32,64,20,0,2,32,2,80,2,112,2,4,2,16,0,32,0,2,0, +0,173,1,179,0,63,237,1,47,93,47,93,49,48,19,53,33,21,101,3,227,2,96,146,146, +0,0,0,0,1,0,51,255,242,4,98,6,84,0,8,0,185,185,0,0,255,232,64,135,14,17,72, +9,1,57,1,73,1,3,9,1,0,4,6,1,6,6,8,16,111,8,143,8,175,8,207,8,239,8,5,15,8, +47,8,79,8,111,8,143,8,5,8,95,2,1,2,2,15,3,47,3,79,3,111,3,4,11,3,175,10,1, +48,10,80,10,112,10,144,10,4,111,10,143,10,2,16,10,48,10,2,240,10,1,15,10, +47,10,79,10,3,57,239,10,1,176,10,208,10,2,143,10,175,10,207,10,239,10,4,112, +10,1,47,10,79,10,111,10,143,10,175,10,5,2,175,31,5,1,5,5,1,7,179,6,1,0,47, +51,63,18,57,47,93,237,1,93,113,113,114,114,94,93,93,113,113,114,114,47,94, +93,51,47,93,47,93,113,56,57,61,47,93,51,51,49,48,94,93,43,5,35,1,35,53,33, +19,1,51,2,110,106,254,229,182,1,14,242,1,174,129,14,3,24,117,253,78,5,135, +0,3,0,87,0,203,5,93,3,215,0,35,0,51,0,67,0,114,64,75,137,50,1,53,67,69,67, +2,10,15,1,10,3,1,5,33,1,5,21,1,39,26,8,52,4,18,0,0,47,32,47,64,47,112,47, +4,47,60,18,36,224,55,1,55,23,42,239,65,1,65,8,39,52,26,4,5,63,13,1,13,64, +18,21,72,0,13,80,13,2,13,31,15,23,1,23,0,47,93,51,220,93,43,113,50,23,57, +205,93,50,16,205,93,50,1,47,205,47,93,205,17,23,57,49,48,0,93,93,93,93,93, +1,93,1,20,14,2,35,34,38,39,14,3,35,34,46,2,53,52,62,2,51,50,22,23,62,3,51, +50,30,2,37,34,6,7,30,1,51,50,62,2,53,52,46,2,5,46,1,35,34,14,2,21,20,30,2, +51,50,54,5,93,44,82,115,70,97,168,70,32,75,84,90,46,69,115,83,46,44,82,116, +71,94,168,67,31,75,84,94,51,69,114,81,45,254,179,70,119,56,51,119,77,43,71, +51,27,29,51,71,254,93,51,119,78,43,70,49,27,25,48,71,47,70,120,2,78,78,141, +106,62,133,149,63,102,72,39,55,100,143,89,81,142,104,60,135,148,62,102,73, +40,55,101,143,168,126,130,128,128,40,70,94,54,54,92,69,39,250,128,128,40, +70,94,54,51,93,69,41,126,0,0,0,1,1,152,0,0,6,96,4,199,0,5,0,13,179,2,5,2, +5,0,47,205,1,47,205,49,48,1,51,17,33,21,33,1,152,94,4,106,251,56,4,199,251, +151,94,0,0,0,0,1,1,22,255,254,4,170,4,8,0,25,0,35,64,18,75,22,91,22,2,75, +16,91,16,2,25,0,12,13,13,0,19,6,0,47,205,47,51,1,47,205,47,205,49,48,0,93, +93,5,17,52,62,2,51,50,30,2,21,17,35,17,52,46,2,35,34,14,2,21,17,1,22,68,122, +167,98,99,169,123,70,103,53,95,130,78,78,130,94,52,2,2,0,116,192,138,76,76, +138,192,116,254,0,2,2,98,155,108,57,56,108,156,100,254,0,0,0,1,255,158,254, +78,2,148,5,227,0,35,2,3,64,30,10,34,26,34,42,34,3,5,16,21,16,37,16,3,9,3, +218,37,1,201,37,1,154,37,170,37,186,37,3,37,184,1,0,64,162,225,228,72,76, +37,1,0,47,37,63,37,2,9,37,1,220,37,64,211,217,72,37,64,205,209,72,134,37, +1,25,37,41,37,57,37,3,11,37,1,251,37,1,233,37,1,37,64,188,191,72,107,37,123, +37,139,37,3,93,37,1,75,37,1,41,37,57,37,2,27,37,1,9,37,1,249,37,1,37,128, +170,177,72,109,37,1,37,128,164,168,72,9,37,1,163,37,128,156,162,72,189,37, +1,121,37,153,37,169,37,3,75,37,91,37,107,37,3,37,192,140,147,72,155,37,171, +37,187,37,3,125,37,141,37,2,107,37,1,93,37,1,38,37,54,37,70,37,3,228,37,1, +214,37,1,180,37,196,37,2,6,37,1,112,37,184,255,192,64,110,119,122,72,37,64, +101,107,72,219,37,1,118,37,166,37,2,9,37,25,37,41,37,3,233,37,1,37,64,79, +82,72,37,128,74,78,72,25,37,41,37,2,11,37,1,251,37,1,217,37,233,37,2,171, +37,187,37,203,37,3,153,37,1,37,128,60,63,72,41,37,57,37,73,37,3,11,37,27, +37,2,55,233,37,249,37,2,187,37,203,37,219,37,3,141,37,157,37,173,37,3,123, +37,1,109,37,1,1,95,37,1,37,184,255,128,179,39,43,72,37,184,255,192,64,13, +34,38,72,144,37,160,37,2,2,16,37,1,37,184,255,192,64,46,28,31,72,223,37,1, +96,37,112,37,160,37,176,37,192,37,5,15,37,31,37,47,37,3,7,32,22,144,22,2, +22,22,31,70,12,47,4,159,4,2,4,4,32,12,1,12,184,255,192,64,15,16,19,72,12, +25,80,64,18,128,18,2,18,7,80,0,0,47,237,47,93,237,1,47,43,93,51,47,93,16, +237,50,47,93,94,93,93,93,43,113,95,113,43,43,114,95,114,114,114,114,114,94, +93,93,43,93,93,93,93,113,113,43,43,113,114,114,114,43,43,94,93,93,93,93,113, +113,113,113,113,43,114,114,114,43,94,93,43,93,43,93,113,113,113,113,113,113, +43,113,113,114,114,114,43,43,94,93,93,95,93,43,93,93,93,49,48,0,95,94,93, +93,19,34,38,39,53,30,1,51,50,62,2,53,3,52,62,2,51,50,22,23,21,46,1,35,34, +14,2,21,17,20,14,2,36,36,75,23,20,62,35,51,66,39,16,2,50,90,125,75,34,75, +22,18,61,36,51,66,39,16,50,89,124,254,78,11,8,147,8,16,37,64,84,48,4,188, +94,134,86,40,9,9,148,10,17,40,65,84,44,251,66,94,134,86,41,0,0,0,2,0,56,1, +80,4,44,3,244,0,33,0,67,1,31,64,26,36,16,12,16,72,2,16,12,16,72,65,24,11, +17,72,66,48,9,17,72,61,48,9,17,72,42,184,255,208,179,9,17,72,48,184,255,208, +64,19,9,17,72,31,24,9,17,72,32,48,9,17,72,26,48,9,17,72,13,184,255,232,179, +13,17,72,14,184,255,208,179,9,13,72,8,184,255,208,179,14,17,72,8,184,255, +208,64,41,9,12,72,63,16,28,48,28,80,28,3,0,28,16,28,64,28,96,28,128,28,160, +28,240,28,7,28,45,11,64,12,17,72,11,47,69,1,59,173,64,45,184,255,192,180, +35,60,72,45,34,184,255,192,179,23,28,72,34,184,255,192,64,27,16,20,72,34, +128,62,64,41,60,72,62,40,173,143,49,1,32,49,48,49,2,49,15,25,173,64,11,184, +255,192,180,39,60,72,11,0,184,255,192,179,23,28,72,0,184,255,192,64,29,16, +20,72,0,128,28,64,41,60,72,28,6,173,15,15,207,15,2,15,64,23,28,72,15,64,11, +19,72,15,0,47,43,43,93,237,196,43,26,221,43,43,196,43,26,237,16,220,93,93, +237,196,43,26,221,43,43,196,43,26,237,1,93,47,43,51,47,93,113,51,49,48,0, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,1,34,38,39,46,1,35,34,14,2,7,53, +62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,34,38,39,46,1,35,34,14,2,7, +53,62,1,51,50,30,2,23,30,3,51,50,54,55,21,14,3,3,40,69,145,73,65,107,45,38, +65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51,23,69,123,52,32,59,61,68, +40,69,145,73,65,107,45,38,65,60,56,29,50,132,81,40,80,77,75,37,21,50,51,51, +23,69,123,52,32,59,61,68,2,246,43,26,22,23,12,22,33,21,144,37,47,13,21,27, +13,8,15,14,8,51,43,149,23,30,19,8,254,90,44,26,23,24,12,23,32,21,141,38,46, +13,20,26,13,8,15,14,8,50,42,147,23,32,19,8,0,1,0,65,0,55,4,36,5,16,0,19,0, +162,64,108,53,2,1,58,11,1,60,12,1,42,12,1,3,3,6,7,10,11,2,11,0,17,16,13,12, +1,12,12,11,1,2,4,9,19,100,14,116,14,2,80,14,1,2,48,14,1,0,14,16,14,32,14, +96,14,4,14,4,111,9,127,9,2,95,9,111,9,2,9,16,7,8,173,9,0,1,2,3,4,4,173,17, +6,31,5,47,5,95,5,111,5,223,5,5,5,10,11,12,13,4,80,9,208,9,2,15,9,1,9,0,47, +93,93,23,51,222,93,50,50,237,23,50,16,237,50,50,1,47,93,113,51,47,93,113, +95,113,113,51,18,23,57,16,135,192,192,192,192,16,135,192,192,192,192,49,48, +1,95,93,93,93,93,1,3,35,19,35,53,33,19,33,53,33,19,51,3,33,21,33,3,33,21, +1,192,152,145,151,237,1,55,190,254,11,2,61,154,143,152,1,21,254,162,191,2, +29,1,88,254,223,1,33,148,1,108,148,1,36,254,220,148,254,148,148,0,0,0,0,3, +0,100,0,244,4,71,4,80,0,3,0,7,0,11,0,49,64,27,11,7,2,8,4,0,8,173,9,9,1,5, +173,63,4,1,4,0,173,15,1,31,1,63,1,3,1,0,47,93,237,47,93,237,17,57,47,237, +1,47,51,51,47,51,51,49,48,19,53,33,21,1,53,33,21,1,53,33,21,100,3,227,252, +29,3,227,252,29,3,227,3,188,148,148,253,56,148,148,1,100,148,148,0,0,0,2, +0,63,0,0,4,36,4,207,0,6,0,10,0,123,185,0,5,255,216,64,17,18,22,72,3,40,18, +22,72,0,40,18,22,72,137,0,1,1,184,255,216,64,63,18,22,72,134,1,1,10,48,2, +80,2,2,0,2,16,2,32,2,64,2,96,2,128,2,160,2,7,2,7,7,0,64,12,15,72,0,8,173, +7,79,6,95,6,143,6,3,6,64,2,80,2,128,2,3,2,1,0,80,4,128,4,2,4,0,25,47,93,51, +51,205,93,205,93,24,47,237,1,47,43,51,47,47,93,113,51,49,48,0,93,43,93,43, +43,43,19,53,1,21,9,1,21,5,53,33,21,65,3,227,252,166,3,90,252,27,3,227,2,119, +205,1,139,154,254,168,254,168,153,236,145,145,0,0,2,0,65,0,0,4,36,4,207,0, +6,0,10,0,121,185,0,1,255,216,64,17,18,22,72,3,40,18,22,72,6,40,18,22,72,137, +6,1,5,184,255,216,64,62,18,22,72,134,5,1,9,48,6,80,6,2,0,6,16,6,32,6,64,6, +96,6,128,6,160,6,7,6,7,0,64,12,15,72,0,8,173,7,6,5,64,4,80,4,128,4,3,4,79, +0,95,0,143,0,3,0,80,2,128,2,2,2,0,25,47,93,205,93,205,93,51,51,24,47,237, +1,47,43,51,47,93,113,51,49,48,0,93,43,93,43,43,43,55,53,9,1,53,1,21,1,53, +33,21,65,3,90,252,166,3,227,252,29,3,227,236,153,1,88,1,88,154,254,117,205, +253,137,145,145,0,0,0,0,2,0,157,0,0,4,55,4,129,0,4,0,9,0,35,64,18,105,9,121, +9,2,105,7,121,7,2,6,4,5,0,2,8,5,0,0,47,205,47,205,1,47,205,221,205,49,48, +0,93,93,51,17,9,1,17,37,33,17,9,1,157,1,205,1,205,252,182,2,250,254,131,254, +131,2,123,2,6,253,250,253,133,82,2,6,1,170,254,86,0,0,0,0,1,0,100,0,180,4, +71,2,242,0,5,0,19,183,5,170,0,2,0,4,173,1,0,47,237,47,1,47,47,237,49,48,55, +17,33,21,33,17,100,3,227,252,174,180,2,62,146,254,84,0,0,0,1,2,34,253,154, +3,210,6,170,0,23,0,29,182,4,32,8,11,72,9,0,184,1,0,180,1,19,12,6,1,0,47,47, +205,205,1,47,237,204,49,48,43,1,35,17,52,55,54,51,50,22,21,20,6,35,34,39, +46,1,39,38,35,34,7,6,21,2,181,147,84,82,128,63,75,51,37,30,13,8,26,20,33, +16,36,9,6,253,154,7,86,196,123,123,63,48,40,52,10,4,24,22,39,39,35,105,0, +0,0,1,1,5,253,154,2,181,6,170,0,28,0,32,185,0,4,255,224,180,8,11,72,12,2, +184,1,0,180,28,24,17,7,0,0,47,47,205,205,1,47,253,204,49,48,43,1,51,17,20, +7,14,1,35,34,46,2,53,52,62,2,51,50,23,30,1,23,22,51,50,55,54,53,2,34,147, +90,40,103,62,30,50,37,20,14,23,31,18,33,26,5,21,15,31,16,37,8,7,6,170,248, +168,205,125,56,54,16,29,39,24,20,34,24,14,16,2,23,20,37,41,31,106,0,0,0,1, +255,246,2,37,5,181,2,182,0,3,0,22,180,3,5,0,4,0,184,1,2,177,1,252,0,63,237, +17,1,51,17,51,49,48,3,53,33,21,10,5,191,2,37,145,145,0,0,1,1,216,253,147, +2,105,7,72,0,3,0,24,187,0,2,1,0,0,3,1,6,180,4,3,254,0,250,0,63,63,1,16,246, +237,49,48,1,51,17,35,1,216,145,145,7,72,246,75,0,0,0,1,2,141,253,147,5,181, +2,182,0,5,0,34,178,2,7,3,186,1,0,0,0,1,6,179,6,5,254,3,184,1,2,177,0,252, +0,63,237,63,1,16,246,237,17,51,49,48,1,33,21,33,17,35,2,141,3,40,253,105, +145,2,182,145,251,110,0,0,0,1,255,246,253,147,3,30,2,182,0,5,0,34,187,0,2, +1,0,0,5,1,6,181,6,0,6,4,254,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16,246, +237,49,48,3,53,33,17,35,17,10,3,40,145,2,37,145,250,221,4,146,0,0,0,0,1,2, +141,2,37,5,181,7,72,0,5,0,34,178,4,7,2,189,1,0,0,5,1,6,0,6,0,5,1,2,179,2, +252,0,250,0,63,63,237,1,16,246,237,17,51,49,48,1,51,17,33,21,33,2,141,145, +2,151,252,216,7,72,251,110,145,0,0,0,1,255,246,2,37,3,30,7,72,0,5,0,34,187, +0,5,1,0,0,2,1,6,181,6,0,6,3,250,5,184,1,2,177,2,252,0,63,237,63,17,1,51,16, +244,237,49,48,3,53,33,17,51,17,10,2,151,145,2,37,145,4,146,250,221,0,0,0, +0,1,2,141,253,147,5,181,7,72,0,7,0,39,179,4,9,5,1,186,1,0,0,0,1,6,179,8,7, +254,5,184,1,2,179,2,252,0,250,0,63,63,237,63,1,16,246,237,50,17,51,49,48, +1,51,17,33,21,33,17,35,2,141,145,2,151,253,105,145,7,72,251,110,145,251,110, +0,1,255,246,253,147,3,30,7,72,0,7,0,39,177,7,4,186,1,0,0,2,1,6,183,8,0,8, +6,254,3,250,7,184,1,2,177,2,252,0,63,237,63,63,17,1,51,16,244,237,51,49,48, +3,53,33,17,51,17,35,17,10,2,151,145,145,2,37,145,4,146,246,75,4,146,0,0,1, +255,246,253,147,5,181,2,182,0,7,0,40,178,3,9,4,186,1,0,0,7,1,6,182,8,0,8, +6,254,4,0,184,1,2,177,1,252,0,63,237,50,63,17,1,51,16,246,237,17,51,49,48, +3,53,33,21,33,17,35,17,10,5,191,253,105,145,2,37,145,145,251,110,4,146,0, +1,255,246,2,37,5,181,7,72,0,7,0,40,178,7,9,5,186,1,0,0,2,1,6,182,8,0,8,3, +250,5,0,184,1,2,177,1,252,0,63,237,51,63,17,1,51,16,244,237,17,51,49,48,3, +53,33,17,51,17,33,21,10,2,151,145,2,151,2,37,145,4,146,251,110,145,0,1,255, +246,253,147,5,181,7,72,0,11,0,51,179,7,13,5,8,187,1,0,0,2,0,11,1,6,64,9,12, +0,12,10,254,3,250,8,11,184,1,2,178,5,2,252,0,63,51,237,50,63,63,17,1,51,16, +246,50,237,50,17,51,49,48,3,53,33,17,51,17,33,21,33,17,35,17,10,2,151,145, +2,151,253,105,145,2,37,145,4,146,251,110,145,251,110,4,146,0,0,0,2,255,246, +1,113,5,181,3,106,0,3,0,7,0,37,183,3,7,7,9,0,4,8,4,184,1,2,178,5,253,0,184, +1,2,177,1,251,0,63,237,63,237,17,1,51,50,17,51,17,51,49,48,3,53,33,21,1,53, +33,21,10,5,191,250,65,5,191,2,217,145,145,254,152,145,145,0,2,1,217,253,147, +3,210,7,72,0,3,0,7,0,42,65,9,0,5,1,0,0,4,1,7,0,8,0,1,1,0,0,0,1,4,182,8,7, +3,254,4,0,250,0,63,50,63,51,1,16,246,237,16,244,237,49,48,1,51,17,35,1,51, +17,35,1,217,145,145,1,104,145,145,7,72,246,75,9,181,246,75,0,0,0,1,2,141, +253,147,5,181,3,106,0,9,0,49,181,2,6,6,11,7,3,186,1,0,0,0,1,6,179,10,9,254, +7,184,1,2,178,4,253,3,184,1,2,177,0,251,0,63,237,63,237,63,1,16,246,237,50, +17,51,17,51,49,48,1,33,21,33,21,33,21,33,17,35,2,141,3,40,253,105,2,151,253, +105,145,3,106,145,215,145,252,34,0,0,1,1,217,253,147,5,181,2,182,0,9,0,51, +178,1,11,6,191,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,178,10,2,6,184,1,2,180,9, +252,4,8,254,0,63,51,63,237,50,1,16,244,237,16,246,237,17,51,49,48,1,21,33, +17,35,17,35,17,35,17,5,181,254,29,145,215,145,2,182,145,251,110,4,146,251, +110,5,35,0,0,0,0,2,1,217,253,147,5,181,3,106,0,5,0,11,0,63,180,2,8,8,13,9, +65,11,1,0,0,6,1,7,0,12,0,3,1,0,0,0,1,4,0,12,0,9,1,2,181,6,253,11,5,254,3, +184,1,2,177,0,251,0,63,237,63,51,63,237,1,16,246,237,16,244,237,17,51,17, +51,49,48,1,33,21,33,17,35,1,33,21,33,17,35,1,217,3,220,252,181,145,1,104, +2,116,254,29,145,3,106,145,250,186,4,111,145,252,34,0,0,1,255,246,253,147, +3,30,3,106,0,9,0,49,177,9,6,186,1,0,0,3,1,6,183,10,4,0,0,10,8,254,3,184,1, +2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63,17,1,51,17,51,16,244,237, +51,49,48,3,53,33,53,33,53,33,17,35,17,10,2,151,253,105,3,40,145,1,113,145, +215,145,250,41,3,222,0,0,0,1,255,246,253,147,3,210,2,182,0,9,0,52,65,9,0, +6,1,0,0,9,1,4,0,10,0,2,1,0,0,5,1,7,183,10,0,10,4,8,254,6,0,184,1,2,177,1, +252,0,63,237,50,63,51,17,1,51,16,244,237,16,246,237,49,48,3,53,33,17,35,17, +35,17,35,17,10,3,220,145,215,145,2,37,145,250,221,4,146,251,110,4,146,0,0, +0,0,2,255,246,253,147,3,210,3,106,0,5,0,11,0,63,180,4,9,9,12,11,65,11,1,0, +0,8,1,4,0,12,0,0,1,0,0,3,1,7,0,12,0,9,1,2,181,10,253,2,7,254,4,184,1,2,177, +5,251,0,63,237,63,51,63,237,1,16,244,237,16,246,237,17,51,17,51,49,48,1,17, +35,17,33,53,1,35,17,33,53,33,3,210,145,252,181,2,116,145,254,29,2,116,3,106, +250,41,5,70,145,250,41,3,222,145,0,0,1,2,141,1,113,5,181,7,72,0,9,0,49,181, +4,8,8,11,2,6,189,1,0,0,9,1,6,0,10,0,9,1,2,178,6,253,5,184,1,2,179,2,251,0, +250,0,63,63,237,63,237,1,16,246,237,50,17,51,17,51,49,48,1,51,17,33,21,33, +21,33,21,33,2,141,145,2,151,253,105,2,151,252,216,7,72,252,34,145,215,145, +0,0,1,1,217,2,37,5,181,7,72,0,9,0,52,178,4,11,2,65,11,1,0,0,9,1,7,0,10,0, +8,1,0,0,5,1,4,0,10,0,5,1,2,181,2,8,252,0,6,250,0,63,51,63,51,237,1,16,246, +237,16,244,237,17,51,49,48,1,51,17,33,21,33,17,51,17,51,3,65,145,1,227,252, +36,145,215,7,72,251,110,145,5,35,251,110,0,0,0,2,1,217,1,113,5,181,7,72,0, +5,0,11,0,63,180,10,4,4,13,8,65,11,1,0,0,11,1,7,0,12,0,2,1,0,0,5,1,4,0,12, +0,11,1,2,178,8,251,5,184,1,2,180,2,253,6,0,250,0,63,50,63,237,63,237,1,16, +246,237,16,244,237,17,51,17,51,49,48,1,51,17,33,21,33,1,51,17,33,21,33,1, +217,145,3,75,252,36,1,104,145,1,227,253,140,7,72,250,186,145,5,215,252,34, +145,0,0,1,255,246,1,113,3,30,7,72,0,9,0,50,188,0,9,1,0,0,6,0,2,1,6,183,10, +4,0,0,10,7,250,3,184,1,2,178,6,251,9,184,1,2,177,2,253,0,63,237,63,237,63, +17,1,51,17,51,16,244,50,237,49,48,3,53,33,53,33,53,33,17,51,17,10,2,151,253, +105,2,151,145,1,113,145,215,145,3,222,250,41,0,0,1,255,246,2,37,3,210,7,72, +0,9,0,52,65,9,0,0,1,0,0,7,1,7,0,10,0,6,1,0,0,3,1,4,183,10,1,10,8,4,250,6, +1,184,1,2,177,2,252,0,63,237,51,63,51,17,1,51,16,244,237,16,244,237,49,48, +1,33,53,33,17,51,17,51,17,51,3,210,252,36,1,227,145,215,145,2,37,145,4,146, +251,110,4,146,0,0,0,2,255,246,1,113,3,210,7,72,0,5,0,11,0,63,65,9,0,8,1,0, +0,11,1,4,0,12,0,0,1,0,0,3,1,7,181,12,9,1,1,12,9,184,1,2,181,10,251,4,6,250, +1,184,1,2,177,2,253,0,63,237,63,51,63,237,17,1,51,17,51,16,244,237,16,244, +237,49,48,1,33,53,33,17,51,33,51,17,33,53,33,3,210,252,36,3,75,145,254,7, +145,253,140,1,227,1,113,145,5,70,251,145,145,0,0,0,0,1,2,141,253,147,5,181, +7,72,0,11,0,54,182,4,8,8,13,6,2,10,186,1,0,0,11,1,6,179,12,11,254,9,184,1, +2,178,6,253,5,184,1,2,179,2,251,0,250,0,63,63,237,63,237,63,1,16,246,237, +50,50,17,51,17,51,49,48,1,51,17,33,21,33,21,33,21,33,17,35,2,141,145,2,151, +253,105,2,151,253,105,145,7,72,252,34,145,215,145,252,34,0,0,0,0,2,1,217, +253,147,5,181,7,72,0,7,0,11,0,56,178,4,13,10,186,1,0,0,11,1,4,178,12,2,6, +186,1,0,0,7,1,7,183,12,7,11,254,0,8,250,5,184,1,2,177,2,252,0,63,237,63,51, +63,51,1,16,244,237,50,16,246,237,17,51,49,48,1,51,17,33,21,33,17,35,1,51, +17,35,3,65,145,1,227,254,29,145,254,152,145,145,7,72,251,110,145,251,110, +9,181,246,75,0,0,3,1,217,253,147,5,181,7,72,0,3,0,9,0,15,0,73,181,14,6,6, +17,12,8,65,12,1,0,0,15,0,9,1,7,0,16,0,0,1,0,0,1,1,4,0,16,0,15,1,2,178,12, +251,7,184,1,2,183,4,253,10,2,250,9,1,254,0,63,51,63,51,63,237,63,237,1,16, +246,237,16,244,50,237,50,17,51,17,51,49,48,1,35,17,51,19,33,21,33,17,35,17, +51,17,33,21,33,2,106,145,145,215,2,116,254,29,145,145,1,227,253,140,253,147, +9,181,250,186,145,252,34,9,181,252,34,145,0,1,255,246,253,147,3,30,7,72,0, +11,0,56,185,0,9,1,0,178,6,2,10,184,1,6,64,10,12,4,0,0,12,10,254,7,250,3,184, +1,2,178,6,251,11,184,1,2,177,2,253,0,63,237,63,237,63,63,17,1,51,17,51,16, +246,50,50,237,49,48,3,53,33,53,33,53,33,17,51,17,35,17,10,2,151,253,105,2, +151,145,145,1,113,145,215,145,3,222,246,75,3,222,0,0,0,2,255,246,253,147, +3,210,7,72,0,7,0,11,0,59,65,10,0,10,1,0,0,11,1,7,0,12,0,5,1,0,0,2,0,6,1,4, +64,10,12,0,12,11,6,254,8,3,250,7,184,1,2,177,2,252,0,63,237,63,51,63,51,17, +1,51,16,246,50,237,16,244,237,49,48,3,53,33,17,51,17,35,17,1,51,17,35,10, +1,227,145,145,1,104,145,145,2,37,145,4,146,246,75,4,146,5,35,246,75,0,0,0, +0,3,255,246,253,147,3,210,7,72,0,3,0,9,0,15,0,73,181,7,13,13,16,6,10,65,12, +1,0,0,9,0,11,1,4,0,16,0,2,1,0,0,3,1,7,0,16,0,12,1,2,181,15,253,3,11,254,6, +184,1,2,180,9,251,0,4,250,0,63,51,63,237,63,51,63,237,1,16,244,237,16,246, +50,237,50,17,51,17,51,49,48,1,51,17,35,1,51,17,33,53,33,19,35,17,33,53,33, +3,65,145,145,254,152,145,253,140,1,227,145,145,254,29,2,116,7,72,246,75,9, +181,251,145,145,250,41,3,222,145,0,0,0,2,255,246,253,147,5,181,3,106,0,7, +0,11,0,57,180,11,3,3,13,4,186,1,0,0,7,1,6,181,12,8,0,0,12,8,184,1,2,181,9, +251,6,254,4,0,184,1,2,177,1,253,0,63,237,50,63,63,237,17,1,51,17,51,16,246, +237,17,51,17,51,49,48,3,53,33,21,33,17,35,17,1,53,33,21,10,5,191,253,105, +145,253,105,5,191,1,113,145,145,252,34,3,222,1,104,145,145,0,0,1,255,246, +253,147,5,181,2,182,0,11,0,58,178,3,13,8,191,1,0,0,11,1,4,0,12,0,4,1,0,0, +7,1,7,64,9,12,0,12,6,10,254,8,4,0,184,1,2,177,1,252,0,63,237,50,50,63,51, +17,1,51,16,244,237,16,246,237,17,51,49,48,3,53,33,21,33,17,35,17,35,17,35, +17,10,5,191,254,29,145,215,145,2,37,145,145,251,110,4,146,251,110,4,146,0, +3,255,246,253,147,5,181,3,106,0,5,0,11,0,15,0,74,180,13,8,8,17,9,186,1,0, +0,6,1,7,181,16,14,3,3,16,5,189,1,0,0,2,1,4,0,16,0,14,1,2,179,15,251,9,3,184, +1,2,181,6,4,253,11,1,254,0,63,51,63,51,237,50,63,237,1,16,246,237,17,51,17, +51,16,244,237,17,51,17,51,49,48,1,35,17,33,53,33,51,33,21,33,17,35,1,21,33, +53,2,106,145,254,29,2,116,215,2,116,254,29,145,2,116,250,65,253,147,3,222, +145,145,252,34,5,215,145,145,0,0,0,0,2,255,246,1,113,5,181,7,72,0,7,0,11, +0,58,64,9,7,11,11,13,0,8,8,12,5,189,1,0,0,2,1,6,0,12,0,8,1,2,181,9,253,3, +250,5,0,184,1,2,177,1,251,0,63,237,51,63,63,237,1,16,244,237,17,51,17,51, +17,51,17,51,49,48,3,53,33,17,51,17,33,21,1,53,33,21,10,2,151,145,2,151,250, +65,5,191,2,217,145,3,222,252,34,145,254,152,145,145,0,1,255,246,2,37,5,181, +7,72,0,11,0,58,178,11,13,9,191,1,0,0,6,1,7,0,12,0,5,1,0,0,2,1,4,64,9,12,0, +12,7,3,250,9,5,0,184,1,2,177,1,252,0,63,237,51,51,63,51,17,1,51,16,244,237, +16,244,237,17,51,49,48,3,53,33,17,51,17,51,17,51,17,33,21,10,1,227,145,215, +145,1,227,2,37,145,4,146,251,110,4,146,251,110,145,0,3,255,246,1,113,5,181, +7,72,0,5,0,11,0,15,0,76,64,9,4,15,15,17,9,12,12,16,8,65,11,1,0,0,11,1,4,0, +16,0,2,1,0,0,5,1,7,0,16,0,12,1,2,179,13,253,5,9,184,1,2,181,2,10,251,0,6, +250,0,63,51,63,51,237,50,63,237,1,16,244,237,16,244,237,17,51,17,51,17,51, +17,51,49,48,1,51,17,33,21,33,1,51,17,33,53,33,1,53,33,21,3,65,145,1,227,253, +140,254,152,145,253,140,1,227,254,29,5,191,7,72,252,34,145,4,111,251,145, +145,254,7,145,145,0,0,0,1,255,246,253,147,5,181,7,72,0,19,0,76,182,11,15, +15,21,13,9,16,184,1,0,178,6,2,19,184,1,6,64,11,20,4,0,0,20,18,254,7,250,12, +4,184,1,2,180,9,5,251,16,0,184,1,2,178,13,1,253,0,63,51,237,50,63,51,237, +50,63,63,17,1,51,17,51,16,246,50,50,237,50,50,17,51,17,51,49,48,3,53,33,53, +33,53,33,17,51,17,33,21,33,21,33,21,33,17,35,17,10,2,151,253,105,2,151,145, +2,151,253,105,2,151,253,105,145,1,113,145,215,145,3,222,252,34,145,215,145, +252,34,3,222,0,0,1,255,246,253,147,5,181,7,72,0,19,0,77,179,4,21,18,9,187, +1,0,0,15,0,12,1,4,178,20,2,5,187,1,0,0,19,0,8,1,7,64,9,20,13,20,0,16,250, +9,5,13,184,1,2,182,18,2,14,252,7,11,254,0,63,51,63,51,51,237,50,50,63,51, +17,1,51,16,244,50,237,50,16,246,50,237,50,17,51,49,48,1,51,17,33,21,33,17, +35,17,35,17,35,17,33,53,33,17,51,17,51,3,65,145,1,227,254,29,145,215,145, +254,29,1,227,145,215,7,72,251,110,145,251,110,4,146,251,110,4,146,145,4,146, +251,110,0,0,0,0,4,255,246,253,147,5,181,7,72,0,5,0,11,0,17,0,23,0,93,181, +4,14,14,25,2,15,187,1,0,0,5,0,12,1,7,182,24,21,9,9,24,20,11,187,1,0,0,23, +0,8,1,4,178,24,5,21,184,1,2,183,2,22,251,0,18,250,15,9,184,1,2,181,12,10, +253,17,7,254,0,63,51,63,51,237,50,63,51,63,51,237,50,1,16,246,50,237,50,17, +51,17,51,16,244,50,237,50,17,51,17,51,49,48,1,51,17,33,21,33,3,35,17,33,53, +33,51,33,21,33,17,35,1,51,17,33,53,33,3,65,145,1,227,253,140,215,145,254, +29,2,116,215,2,116,254,29,145,254,152,145,253,140,1,227,7,72,252,34,145,250, +186,3,222,145,145,252,34,9,181,251,145,145,0,0,0,0,1,0,0,2,109,5,171,7,72, +0,3,0,18,182,0,5,1,4,2,250,1,0,47,63,17,1,51,17,51,49,48,1,33,17,33,5,171, +250,85,5,171,2,109,4,219,0,0,0,1,0,0,253,147,5,171,2,109,0,3,0,18,182,0,5, +1,4,2,1,254,0,63,47,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253, +147,4,218,0,0,0,1,0,0,253,147,5,171,7,72,0,3,0,19,183,0,5,1,4,2,250,1,254, +0,63,63,17,1,51,17,51,49,48,1,33,17,33,5,171,250,85,5,171,253,147,9,181,0, +0,1,0,0,253,147,2,214,7,72,0,3,0,17,182,1,4,0,2,250,1,254,0,63,63,1,47,17, +51,49,48,1,33,17,33,2,214,253,42,2,214,253,147,9,181,0,0,0,0,1,2,213,253, +147,5,171,7,72,0,3,0,17,182,0,5,1,2,250,1,254,0,63,63,1,47,17,51,49,48,1, +33,17,33,5,171,253,42,2,214,253,147,9,181,0,0,0,0,42,0,103,253,245,5,171, +6,163,0,3,0,7,0,11,0,15,0,19,0,23,0,27,0,31,0,35,0,39,0,43,0,47,0,51,0,55, +0,59,0,63,0,67,0,71,0,75,0,79,0,83,0,87,0,91,0,95,0,99,0,103,0,107,0,111, +0,115,0,119,0,123,0,127,0,131,0,135,0,139,0,143,0,147,0,151,0,155,0,159,0, +163,0,167,2,49,181,161,157,153,149,145,165,184,1,1,182,164,109,85,69,45,13, +121,184,1,1,64,13,120,108,84,68,44,12,120,101,77,53,29,5,137,184,1,1,64,13, +136,100,76,52,28,4,136,113,89,65,41,17,125,184,1,1,64,13,124,112,88,64,40, +16,124,97,81,57,25,9,141,184,1,1,64,13,140,96,80,56,24,8,140,117,93,61,37, +21,129,184,1,1,64,33,128,116,92,60,36,20,128,120,136,124,140,128,128,140, +124,136,120,5,132,160,156,152,148,144,164,164,169,105,73,49,33,1,133,184, +1,1,64,15,104,72,48,32,0,10,132,1,8,3,132,167,143,139,135,184,1,3,180,132, +163,103,99,107,184,1,3,183,104,160,100,96,104,95,91,87,184,1,3,183,84,92, +88,84,159,83,79,75,184,1,3,183,72,156,80,76,72,67,63,71,184,1,3,183,68,64, +60,68,155,59,55,51,184,1,3,183,48,152,56,52,48,43,39,47,184,1,3,183,44,40, +36,44,151,31,27,35,184,1,3,183,32,148,28,24,32,23,19,15,184,1,3,183,12,20, +16,12,147,11,7,3,184,1,3,183,0,144,8,4,0,131,127,123,184,1,3,64,60,120,128, +124,120,22,84,1,27,72,1,25,68,1,27,48,1,27,44,1,20,32,1,104,84,72,68,48,44, +32,12,0,120,120,0,12,32,44,48,68,72,84,104,10,108,164,140,136,27,132,59,132, +2,15,132,1,2,132,119,115,111,184,1,3,178,116,112,108,0,47,51,51,237,50,50, +47,95,93,93,51,51,51,18,23,57,47,47,47,47,47,47,47,47,47,47,93,93,93,93,93, +93,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50, +50,17,51,51,16,237,50,50,17,51,51,51,16,237,50,50,50,17,51,51,16,237,50,50, +17,51,51,51,16,237,50,50,50,16,237,50,50,50,1,47,95,94,93,51,51,51,51,51, +237,50,50,50,50,50,17,51,47,51,51,51,51,51,18,23,57,47,47,47,47,47,17,51, +51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50,50,50, +17,51,51,51,51,51,16,237,50,50,50,50,50,17,51,51,51,51,51,16,237,50,50,50, +50,50,17,51,51,51,51,51,16,237,50,50,50,50,50,16,237,50,50,50,50,50,49,48, +19,51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7, +51,21,35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51, +21,35,37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,7,51,21, +35,37,51,21,35,37,51,21,35,5,51,21,35,37,51,21,35,37,51,21,35,7,51,21,35, +37,51,21,35,37,51,21,35,23,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,37, +51,21,35,37,51,21,35,1,51,21,35,37,51,21,35,37,51,21,35,1,51,21,35,17,51, +21,35,17,51,21,35,17,51,21,35,17,51,21,35,17,51,21,35,103,104,104,1,158,104, +104,1,160,103,103,253,145,104,104,1,159,104,104,1,159,104,104,207,103,103, +254,96,104,104,254,98,104,104,4,13,104,104,254,97,104,104,254,97,104,104, +207,104,104,1,158,104,104,1,160,103,103,207,104,104,254,97,104,104,254,97, +104,104,207,104,104,1,158,104,104,1,160,103,103,253,145,104,104,1,159,104, +104,1,159,104,104,207,103,103,254,96,104,104,254,98,104,104,207,104,104,1, +159,104,104,1,159,104,104,252,194,104,104,1,159,104,104,1,159,104,104,251, +243,104,104,1,158,104,104,1,160,103,103,1,158,104,104,104,104,104,104,104, +104,104,104,104,104,5,34,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96, +96,99,96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,97,97,97,97,97, +98,94,94,94,94,94,98,97,97,97,97,97,96,96,96,96,96,96,7,237,98,98,98,98,98, +1,35,96,96,96,96,96,254,223,98,254,223,96,254,221,96,254,221,97,254,222,97, +7,238,96,0,0,0,0,84,0,0,253,245,5,171,6,163,0,3,0,7,0,11,0,15,0,19,0,23,0, +27,0,31,0,35,0,39,0,43,0,47,0,51,0,55,0,59,0,63,0,67,0,71,0,75,0,79,0,83, +0,87,0,91,0,95,0,99,0,103,0,107,0,111,0,115,0,119,0,123,0,127,0,131,0,135, +0,139,0,143,0,147,0,151,0,155,0,159,0,163,0,167,0,171,0,175,0,179,0,183,0, +187,0,191,0,195,0,199,0,203,0,207,0,211,0,215,0,219,0,223,0,227,0,231,0,235, +0,239,0,243,0,247,0,251,0,255,1,3,1,7,1,11,1,15,1,19,1,23,1,27,1,31,1,35, +1,39,1,43,1,47,1,51,1,55,1,59,1,63,1,67,1,71,1,75,1,79,0,0,19,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,55,51,21,35,55, +51,21,35,55,51,21,35,55,51,21,35,55,51,21,35,5,51,21,35,37,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,37,51,21,35,5,51,21,35,39,51,21,35,39,51,21, +35,39,51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,55,51,21,35,23,51,21,35,39,51,21,35,39,51,21,35,39, +51,21,35,39,51,21,35,39,51,21,35,7,51,21,35,55,51,21,35,55,51,21,35,55,51, +21,35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21, +35,55,51,21,35,55,51,21,35,1,51,21,35,55,51,21,35,55,51,21,35,55,51,21,35, +55,51,21,35,55,51,21,35,19,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23, +51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,23,51,21,35,7,51,21,35,17,51,21, +35,19,51,21,35,103,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,207,103,103,207,103,103,207,104,104,208,104,104, +208,103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104, +207,104,104,251,140,103,103,1,158,103,103,207,104,104,208,104,104,208,103, +103,252,194,103,103,3,165,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104, +104,208,103,103,103,104,104,207,104,104,208,104,104,208,104,104,207,104,104, +207,104,104,103,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,251,243,103,103,207,103,103,207,103,103,207,104,104,208,104,104,208, +103,103,252,90,104,104,207,104,104,207,104,104,208,104,104,208,104,104,207, +104,104,207,104,104,103,103,103,103,104,104,103,103,103,103,104,104,103,103, +103,103,104,104,103,103,103,103,104,104,103,103,103,103,103,103,104,104,5, +34,98,98,98,98,98,98,98,98,98,98,98,97,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,96, +96,96,96,96,96,96,96,96,96,96,99,96,96,96,96,96,96,96,96,96,96,96,96,97,97, +97,97,97,97,97,97,97,97,97,98,94,94,94,94,94,94,94,94,94,94,94,98,97,97,97, +97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,96,96,96,7,237,98,98,98, +98,98,98,98,98,98,98,98,1,35,96,96,96,96,96,96,96,96,96,96,96,254,223,98, +97,96,96,96,99,96,96,96,99,96,96,97,98,94,98,97,96,96,7,237,98,1,35,96,0, +0,67,0,0,253,147,5,213,6,163,0,73,0,77,0,81,0,85,0,89,0,93,0,97,0,101,0,105, +0,109,0,113,0,117,0,121,0,125,0,129,0,133,0,137,0,141,0,145,0,149,0,153,0, +157,0,161,0,165,0,169,0,173,0,177,0,181,0,185,0,189,0,193,0,197,0,201,0,205, +0,209,0,213,0,217,0,221,0,225,0,229,0,233,0,237,0,241,0,245,0,249,0,253,1, +1,1,5,1,9,1,13,1,17,1,21,1,25,1,29,1,33,1,37,1,41,1,45,1,49,1,53,1,57,1,61, +1,65,1,69,1,73,1,77,1,81,0,0,1,33,17,51,53,35,17,51,53,35,17,51,53,35,17, +51,53,35,17,51,53,35,17,51,53,51,21,51,53,51,21,51,53,51,21,51,53,51,21,51, +53,51,21,51,53,51,21,51,53,51,21,35,21,51,17,35,21,51,17,35,21,51,17,35,21, +51,17,35,21,51,17,35,21,51,1,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53, +23,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,7,21,51,53,51,21,51,53,51, +21,51,53,51,21,51,53,5,35,21,51,55,21,51,53,51,21,51,53,51,21,51,53,5,21, +51,53,33,21,51,53,7,53,35,21,37,21,51,53,19,53,35,21,35,53,35,21,35,53,35, +21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51,21,51,53,19,53,35,21, +35,53,35,21,35,53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,51,21,51,53,51, +21,51,53,19,35,21,51,39,35,21,51,39,35,21,51,39,35,21,51,1,35,21,51,39,35, +21,51,39,35,21,51,39,35,21,51,1,21,51,53,51,21,51,53,23,35,21,51,39,35,21, +51,7,21,51,53,51,21,51,53,7,35,21,51,55,21,51,53,5,21,51,53,23,53,35,21,23, +53,35,21,35,53,35,21,7,21,51,53,51,21,51,53,19,53,35,21,35,53,35,21,7,21, +51,53,51,21,51,53,19,35,21,51,39,35,21,51,19,35,21,51,39,35,21,51,5,213,250, +43,106,106,106,106,106,106,106,106,106,106,106,107,106,107,106,107,107,107, +107,107,106,107,106,107,107,107,107,107,107,107,107,107,107,107,107,107,250, +149,107,106,107,106,107,107,107,107,107,107,214,107,107,214,106,106,213,106, +106,213,107,106,107,106,107,107,107,253,234,106,106,107,106,107,107,107,107, +252,170,107,1,63,107,213,107,1,171,107,107,107,107,107,107,106,107,106,107, +107,106,107,106,107,107,107,107,107,107,107,107,106,107,106,107,107,106,107, +106,107,107,107,107,107,107,214,107,107,214,106,106,213,106,106,2,22,107, +107,214,107,107,213,107,107,213,107,107,2,235,107,106,107,106,106,106,213, +106,106,213,107,106,107,107,106,106,107,106,254,86,107,213,107,213,106,107, +106,107,107,106,107,106,106,107,106,107,107,106,107,106,106,106,213,106,106, +107,107,107,213,107,107,253,147,1,34,97,1,34,97,1,35,96,1,33,98,1,33,98,1, +33,96,96,96,96,96,96,96,96,96,96,96,96,96,193,98,254,223,96,254,221,96,254, +221,96,254,221,94,254,221,96,6,106,96,96,96,96,96,96,96,96,192,98,98,98,98, +98,98,98,97,96,96,96,96,96,96,96,96,192,96,96,96,96,96,96,96,96,195,96,96, +96,96,96,96,96,96,96,96,254,223,97,97,97,97,97,97,97,97,98,94,94,94,94,94, +94,94,94,254,223,97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,6,205, +98,98,98,98,98,98,98,1,34,98,98,98,98,98,98,98,254,223,96,96,96,96,192,98, +98,98,97,96,96,96,96,192,96,96,96,96,195,96,96,96,96,96,193,97,97,97,97,98, +94,94,94,94,254,223,97,97,97,97,96,96,96,96,96,6,205,98,98,98,1,34,98,98, +98,0,0,0,0,1,0,123,0,117,4,90,4,84,0,3,0,0,19,33,17,33,123,3,223,252,33,4, +84,252,33,0,0,2,0,6,0,0,4,207,4,201,0,3,0,7,0,21,183,7,1,4,0,4,0,5,3,0,47, +205,221,205,1,47,205,221,205,49,48,19,33,17,33,19,17,33,17,6,4,201,251,55, +76,4,49,4,201,251,55,4,125,251,207,4,49,0,0,1,0,109,1,127,2,105,3,123,0,3, +0,26,64,13,3,48,2,1,15,2,31,2,2,8,2,1,2,0,47,205,1,47,94,93,93,205,49,48, +1,33,17,33,2,105,254,4,1,252,1,127,1,252,0,0,0,2,0,109,1,127,2,105,3,123, +0,3,0,7,0,34,64,17,5,3,6,48,2,1,15,2,31,2,2,8,2,7,1,6,2,0,47,205,221,205, +1,47,94,93,93,205,221,205,49,48,1,33,17,33,3,17,33,17,2,105,254,4,1,252,76, +254,156,1,127,1,252,254,80,1,98,254,158,0,0,0,0,1,0,0,0,0,8,0,2,104,0,3,0, +0,17,33,17,33,8,0,248,0,2,104,253,152,0,0,0,1,1,158,0,0,6,76,4,174,0,2,0, +0,33,9,1,1,158,2,88,2,86,4,174,251,82,0,0,1,1,145,255,229,6,90,4,172,0,2, +0,0,9,2,1,145,4,201,251,55,4,172,253,158,253,155,0,1,1,158,255,229,6,76,4, +147,0,2,0,0,9,2,6,76,253,170,253,168,4,147,251,82,4,174,0,1,1,145,255,229, +6,90,4,172,0,2,0,0,1,17,1,6,90,251,55,4,172,251,57,2,101,0,0,2,0,8,0,0,3, +238,5,160,0,5,0,9,0,37,64,20,134,7,1,9,0,5,16,5,2,5,7,31,2,1,2,6,3,4,8,1, +0,47,51,63,51,1,47,93,51,47,93,51,49,48,93,33,35,9,1,51,9,4,2,35,82,254,55, +1,201,82,1,203,254,14,254,158,1,98,1,96,2,207,2,209,253,49,2,53,253,203,253, +194,2,62,0,2,0,167,0,162,4,46,4,41,0,19,0,39,0,46,64,28,68,37,84,37,2,75, +33,91,33,2,75,27,91,27,2,68,23,84,23,2,30,10,20,0,25,15,35,5,0,47,205,220, +205,1,47,205,220,205,49,48,93,93,93,93,19,52,62,2,51,50,30,2,21,20,14,2,35, +34,46,2,55,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2,167,70,122,164,94,94, +165,123,71,71,123,165,94,94,164,122,70,86,57,98,133,76,76,134,99,58,58,99, +134,76,76,133,98,57,2,100,94,165,123,71,71,123,165,94,94,164,122,70,70,122, +164,94,76,132,99,57,57,99,132,76,76,134,99,58,58,99,134,0,0,0,0,1,0,178,0, +137,4,35,3,250,0,23,0,17,182,8,16,12,15,0,1,0,0,47,93,205,1,47,205,49,48, +1,50,23,30,1,23,30,1,21,20,7,6,35,34,39,38,53,52,54,55,62,1,55,54,2,106,110, +107,53,82,29,29,31,129,129,183,182,129,129,30,29,29,83,52,108,3,250,57,28, +82,52,54,110,57,183,129,129,129,129,183,58,109,54,52,82,28,57,0,0,0,2,0,41, +0,0,4,172,4,131,0,3,0,23,0,21,183,14,2,4,1,19,1,9,0,0,47,205,221,205,1,47, +205,221,205,49,48,51,17,33,17,1,20,30,2,51,50,62,2,53,52,46,2,35,34,14,2, +41,4,131,252,4,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69,4, +131,251,125,2,65,91,160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0, +3,0,41,0,0,4,172,4,131,0,3,0,23,0,43,0,34,64,14,4,24,1,14,34,2,1,19,29,0, +9,39,1,0,0,47,221,221,206,16,221,206,1,47,221,221,206,16,221,206,49,48,51, +17,33,17,1,52,62,2,51,50,30,2,21,20,14,2,35,34,46,2,39,20,30,2,51,50,62,2, +53,52,46,2,35,34,14,2,41,4,131,252,81,58,99,133,75,75,133,99,58,58,99,133, +75,75,133,99,58,77,69,120,160,91,91,161,120,69,69,120,161,91,91,160,120,69, +4,131,251,125,2,65,75,133,99,58,58,99,133,75,75,133,99,58,58,99,133,75,91, +160,120,69,69,120,160,91,91,161,120,69,69,120,161,0,0,2,0,115,1,133,2,99, +3,117,0,18,0,34,0,21,183,19,0,27,11,31,6,23,15,0,47,205,220,205,1,47,205, +220,205,49,48,1,20,6,7,14,1,35,34,39,46,1,53,52,55,54,51,50,23,22,7,52,39, +38,35,34,7,6,21,20,23,22,51,50,55,54,2,99,37,37,37,86,51,101,75,35,37,72, +74,102,103,71,74,76,51,51,70,70,51,51,51,49,72,72,49,51,2,125,53,86,37,35, +37,72,37,86,53,102,72,74,74,71,103,70,51,51,51,51,70,69,54,49,49,54,0,0,0, +5,1,177,255,229,6,121,4,172,0,17,0,33,0,45,0,57,0,68,0,147,64,93,20,32,36, +32,116,32,3,20,28,36,28,116,28,3,27,24,43,24,123,24,3,27,20,43,20,123,20, +3,68,34,40,63,52,46,40,46,40,46,8,18,31,0,1,0,26,8,49,37,43,55,43,62,58,104, +58,1,89,58,1,71,58,1,25,58,1,58,60,65,15,43,95,43,111,43,3,8,65,64,9,14,72, +43,65,43,65,4,22,15,13,1,13,30,4,0,47,205,220,93,205,18,57,57,47,47,43,94, +93,16,205,51,93,93,93,93,17,51,17,51,16,205,50,1,47,205,220,93,205,18,57, +57,47,47,16,205,51,16,205,51,49,48,0,93,93,93,93,1,20,7,6,35,34,39,38,53, +52,54,55,54,51,50,23,30,1,7,52,39,38,35,34,7,6,21,20,23,22,51,50,55,54,1, +20,6,35,34,38,53,52,54,51,50,22,5,20,6,35,34,38,53,52,54,51,50,22,1,22,51, +50,55,23,6,35,34,38,39,6,121,180,179,253,253,179,180,90,90,178,254,254,178, +90,90,90,153,151,218,218,151,153,153,152,217,217,152,153,253,90,46,32,32, +45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,234,76,147,145,76,62,98, +185,94,141,48,2,72,254,178,179,179,178,254,128,215,91,178,178,91,215,128, +217,153,154,154,153,217,216,153,154,154,153,1,87,32,46,46,32,32,45,45,32, +32,46,46,32,32,45,45,254,191,137,137,35,186,95,91,0,0,4,1,209,255,229,6,153, +4,172,0,17,0,29,0,41,0,52,0,96,64,55,42,18,24,47,36,30,24,30,24,30,0,8,39, +27,21,33,21,48,52,104,52,1,89,52,1,75,52,1,61,52,1,52,50,45,15,21,31,21,95, +21,111,21,4,8,79,45,95,45,2,21,45,21,45,13,4,0,47,204,57,57,47,47,93,94,93, +16,206,51,93,93,93,93,17,51,17,51,16,206,50,1,47,205,57,57,47,47,16,206,51, +16,206,51,49,48,1,20,7,6,35,34,39,38,53,52,54,55,54,51,50,23,30,1,5,52,38, +35,34,6,21,20,22,51,50,54,37,52,38,35,34,6,21,20,22,51,50,54,1,30,1,51,50, +55,39,6,35,34,39,6,153,180,179,253,253,179,180,90,90,178,254,254,178,90,90, +253,0,46,32,32,45,45,32,32,46,1,211,44,32,32,47,47,32,32,44,253,174,48,141, +94,185,98,62,76,145,147,76,2,72,254,178,179,179,178,254,128,215,91,178,178, +91,215,1,32,45,45,32,32,46,46,32,32,45,45,32,32,46,46,254,220,91,95,186,35, +137,137,0,2,1,70,255,115,6,14,4,59,0,51,0,70,0,139,185,0,47,255,240,64,13, +11,14,72,52,46,1,52,36,1,119,35,1,35,184,255,240,64,77,11,14,72,21,16,11, +14,72,59,20,1,59,9,1,8,16,11,14,72,59,47,1,52,35,1,52,21,1,59,8,1,66,143, +13,223,13,2,112,13,1,63,13,1,32,13,1,13,57,43,62,128,31,208,31,224,31,3,127, +31,1,48,31,1,47,31,1,31,52,15,51,63,51,79,51,3,8,51,0,47,94,93,205,220,93, +93,93,93,205,1,47,205,220,93,93,93,93,205,49,48,0,93,93,93,93,1,43,93,93, +43,43,93,93,93,43,1,51,21,30,3,23,55,23,7,30,1,23,51,21,35,14,1,7,23,7,39, +14,1,7,14,1,7,21,35,53,46,1,39,7,39,55,46,1,39,35,53,51,54,55,39,55,23,62, +1,55,23,34,6,7,6,21,20,23,30,1,51,50,55,54,53,52,39,46,1,3,137,66,32,57,54, +53,29,186,45,184,45,44,3,215,215,8,44,40,184,49,182,31,55,23,24,58,34,66, +63,110,48,188,43,182,40,46,8,215,215,12,80,180,40,189,57,112,54,31,69,117, +48,98,98,48,117,69,139,96,99,99,49,117,4,59,217,3,12,21,32,22,182,45,184, +59,113,57,62,60,110,51,188,43,182,23,32,11,9,12,5,217,217,9,46,35,180,45, +184,51,111,63,62,128,95,184,49,182,40,44,6,61,50,48,100,136,137,98,50,47, +97,97,138,137,99,48,50,0,0,0,2,1,218,0,80,4,38,4,129,0,28,0,47,0,98,64,62, +22,18,25,0,0,5,15,43,1,239,43,255,43,2,43,15,14,1,14,0,34,1,224,34,240,34, +2,34,5,22,25,19,0,28,16,28,80,28,3,28,0,39,1,240,39,1,39,18,0,0,128,0,2,8, +0,29,64,37,40,72,29,10,0,47,205,43,220,94,93,50,205,113,114,47,93,51,205, +50,1,47,205,113,114,220,93,205,113,114,17,57,47,51,205,50,49,48,1,46,1,39, +38,53,52,55,62,1,51,50,23,22,21,20,7,6,7,21,33,21,33,17,35,17,33,53,33,19, +34,7,14,1,21,20,22,23,22,51,50,55,54,53,52,38,39,38,2,220,55,90,35,71,83, +44,101,60,118,83,86,72,72,106,1,0,255,0,74,254,254,1,2,35,83,62,29,31,31, +29,62,83,87,59,61,30,29,62,2,66,8,46,42,80,108,122,83,43,43,86,83,122,109, +81,82,12,166,70,254,250,1,6,70,2,145,59,31,71,44,43,71,31,62,62,61,84,44, +71,31,59,0,2,1,81,0,250,4,175,4,129,0,65,0,81,0,70,64,40,49,65,59,15,78,1, +78,63,32,1,32,15,51,1,51,0,70,1,70,59,65,49,63,74,0,55,128,55,2,55,66,144, +20,1,20,15,63,1,8,63,0,47,94,93,204,93,205,220,93,205,18,57,57,1,47,205,114, +220,93,204,93,205,114,18,57,57,49,48,1,46,1,39,46,1,39,46,1,53,52,55,62,1, +51,50,22,23,30,1,51,50,54,55,54,51,50,21,20,7,14,1,21,20,22,23,30,1,21,20, +6,7,6,35,34,39,46,1,39,7,22,21,20,7,6,35,34,39,38,53,52,55,54,51,50,23,7, +34,7,6,21,20,23,22,51,50,55,54,53,52,39,38,3,255,17,54,37,28,40,14,5,3,6, +3,6,5,5,15,13,32,63,32,46,64,19,36,13,16,6,9,7,4,8,2,2,2,2,9,5,21,20,22,31, +11,237,84,86,87,118,118,87,84,84,85,122,71,83,154,90,62,61,61,64,88,89,60, +62,62,60,4,0,5,18,14,11,24,14,3,10,5,8,9,2,2,2,2,8,9,7,6,12,14,9,18,34,79, +45,31,64,34,11,16,5,5,7,3,6,39,42,82,42,238,81,109,125,86,88,84,84,117,117, +87,86,43,32,62,61,88,91,61,61,61,62,90,87,62,62,0,0,1,0,59,0,0,4,5,4,207, +0,47,0,40,64,25,38,32,10,48,10,96,10,112,10,4,10,14,34,64,8,11,72,34,23,79, +0,95,0,2,0,0,47,93,47,47,43,51,1,47,93,47,49,48,1,30,1,23,30,1,23,22,23,22, +21,20,7,6,35,34,39,22,23,30,1,31,1,33,55,50,55,62,3,39,14,1,35,34,39,38,53, +52,55,62,1,55,62,1,55,54,2,32,14,40,26,28,95,69,141,35,37,63,66,88,157,99, +3,36,38,163,137,8,252,232,6,125,86,43,66,44,20,1,45,132,83,90,66,63,30,23, +78,57,69,110,38,56,4,207,54,95,44,43,105,63,126,66,67,70,95,63,66,191,147, +87,86,99,9,37,37,49,25,69,91,119,75,96,95,66,63,91,74,59,42,85,47,59,113, +57,83,0,0,0,0,1,0,60,0,0,5,4,4,199,0,75,0,47,64,24,57,77,63,23,1,23,52,61, +67,13,47,30,4,18,31,18,1,27,18,27,18,1,41,1,0,47,47,18,57,57,47,47,93,18, +23,57,50,51,1,47,93,16,206,49,48,41,1,55,62,1,55,62,1,55,54,53,52,38,53,6, +7,14,1,35,34,38,39,38,53,52,55,54,51,50,22,23,46,1,39,46,1,53,52,55,62,1, +51,50,23,22,21,20,7,54,55,62,1,51,50,22,23,22,21,20,7,6,35,34,38,39,46,1, +39,30,1,23,30,1,23,22,23,4,70,252,182,8,84,108,27,41,64,26,52,2,58,90,43, +88,45,59,97,41,79,73,73,93,31,80,51,20,27,8,5,6,78,40,97,60,116,80,80,69, +84,16,14,30,17,51,86,36,73,80,80,112,62,132,50,17,43,26,3,23,23,22,67,46, +61,159,35,17,33,17,25,75,50,100,109,8,22,17,121,59,28,30,42,38,83,116,115, +79,80,25,26,34,52,19,17,38,20,115,78,38,40,80,78,109,86,98,40,3,5,3,37,41, +76,116,118,83,80,60,51,19,61,45,81,125,46,45,76,31,39,30,0,1,0,102,255,233, +4,90,4,121,0,39,0,38,64,23,18,2,1,4,2,1,8,29,41,16,12,64,12,80,12,112,12, +128,12,5,12,16,0,0,47,47,1,47,93,16,206,49,48,94,93,93,5,46,1,39,46,1,39, +46,1,39,46,1,53,52,55,54,51,50,23,30,1,23,62,1,51,50,22,23,22,21,20,7,14, +1,7,14,1,7,14,1,2,98,14,42,26,28,103,76,56,69,14,43,37,68,70,102,98,78,28, +47,17,34,142,88,50,85,35,70,41,20,78,60,75,108,32,31,44,23,56,101,48,50,147, +102,76,93,22,65,106,56,103,71,70,72,28,80,54,119,117,36,34,70,94,86,88,45, +119,75,96,152,55,54,110,0,0,0,0,1,0,66,255,231,3,210,4,199,0,26,0,18,183, +48,12,1,12,75,21,1,21,0,25,47,93,1,47,93,49,48,1,30,1,23,30,1,23,14,1,7,14, +1,7,46,1,39,46,1,39,46,1,39,62,1,55,62,1,2,7,45,113,69,69,116,47,39,120,83, +69,106,40,13,35,22,38,98,60,14,94,81,50,128,80,59,96,4,199,78,165,93,93,141, +53,40,150,111,93,159,72,25,58,32,57,135,80,20,119,99,59,160,107,77,148,0, +0,1,0,196,0,29,3,59,4,129,0,33,0,48,64,25,2,19,33,13,64,79,6,95,6,111,6,3, +6,128,27,33,18,10,10,47,0,1,0,31,24,0,47,205,204,93,57,47,57,1,47,205,26, +220,93,26,205,16,205,50,49,48,1,51,21,23,30,1,21,20,6,7,35,62,1,53,52,38, +39,38,39,17,20,6,7,6,35,34,38,53,52,55,54,51,50,23,1,233,76,153,51,58,48, +46,47,29,28,28,29,57,64,37,37,72,108,57,58,60,63,80,44,46,4,129,100,193,69, +163,85,78,134,59,65,124,59,60,99,40,81,9,254,6,63,98,38,75,54,46,73,60,60, +19,0,2,1,16,255,213,4,239,4,135,0,34,0,38,0,108,64,61,35,32,64,18,26,128, +36,15,64,111,0,1,0,128,15,9,1,9,9,0,26,1,26,17,35,86,35,1,67,35,1,35,16,36, +54,36,1,37,36,1,20,36,1,3,36,1,8,36,34,38,33,88,33,1,33,37,34,30,23,13,6, +0,47,205,47,205,47,51,51,93,17,51,17,51,94,93,93,93,93,17,51,51,93,93,17, +51,1,47,93,51,47,93,26,221,93,26,205,50,26,16,221,26,205,51,49,48,1,20,6, +7,14,1,35,34,38,53,52,55,54,51,50,23,17,5,17,20,6,7,6,35,34,38,53,52,55,54, +51,50,23,17,37,1,37,53,5,4,239,36,38,37,88,51,57,57,57,62,81,48,42,253,218, +37,35,74,106,57,58,59,60,84,45,45,2,186,253,144,2,38,253,218,1,68,63,101, +35,37,39,54,47,76,57,59,18,1,192,149,254,118,62,98,38,74,53,45,76,57,60,19, +2,240,178,254,103,149,117,152,0,0,0,3,0,29,0,0,3,118,5,204,0,27,0,31,0,35, +0,100,179,67,10,1,10,184,255,224,64,59,8,12,72,31,35,70,28,47,32,143,32,207, +32,3,31,32,79,32,111,32,143,32,4,32,79,16,95,16,2,16,16,1,70,144,2,1,111, +2,1,2,34,15,31,83,30,0,19,80,12,0,0,4,80,25,5,15,32,1,21,0,63,51,63,51,237, +50,63,237,63,237,63,1,47,93,93,237,50,47,93,47,93,113,51,237,50,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,53,51,21,3,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18, +40,51,29,11,211,134,180,180,180,3,183,252,73,3,183,131,122,59,101,75,43,6, +6,137,3,5,22,41,60,39,97,131,1,105,172,172,250,224,4,58,251,198,0,0,0,0,2, +0,29,0,0,3,119,5,204,0,27,0,31,0,90,179,67,10,1,10,184,255,224,64,53,8,12, +72,31,70,47,28,143,28,207,28,3,31,28,79,28,111,28,143,28,4,28,79,16,95,16, +2,16,16,1,70,144,2,1,111,2,1,2,30,0,19,80,12,0,0,4,80,25,5,15,28,1,21,0,63, +51,63,51,237,50,63,237,63,1,47,93,93,237,50,47,93,47,93,113,237,49,48,0,43, +93,1,17,35,17,35,53,51,53,52,62,2,51,50,22,23,21,46,1,35,34,14,2,29,1,51, +21,19,17,51,17,1,105,180,152,152,22,59,102,81,32,69,26,17,45,18,40,51,29, +11,211,135,180,3,183,252,73,3,183,131,122,59,101,75,43,6,6,137,3,5,22,41, +60,39,97,131,252,73,5,204,250,52,0,0,1,0,119,254,78,1,227,255,170,0,28,0, +75,185,0,2,255,232,179,9,17,72,27,184,255,224,64,40,9,17,72,22,22,8,16,131, +15,0,1,95,0,1,0,8,19,140,63,23,79,23,2,23,11,140,0,5,16,5,32,5,80,5,96,5, +112,5,6,5,0,47,93,237,47,93,237,1,47,221,93,113,237,18,57,47,49,48,43,43, +5,20,14,2,35,34,38,39,53,22,51,50,62,2,53,52,38,35,42,1,7,55,51,50,30,2,1, +227,30,65,104,75,20,45,25,49,37,41,56,35,15,61,72,14,29,14,31,62,52,84,60, +32,253,41,67,48,25,1,3,98,6,12,21,30,18,37,40,2,96,18,41,63,0,0,0,255,255, +0,243,1,190,1,182,2,154,17,6,0,119,56,0,0,18,64,11,0,127,0,1,111,0,1,95,0, +1,0,17,93,93,93,53,0,1,0,127,254,78,1,72,255,158,0,10,0,75,185,0,5,255,192, +179,9,17,72,2,184,255,192,64,28,9,17,72,7,151,0,150,4,9,8,146,16,3,32,3,2, +0,3,96,3,160,3,176,3,192,3,5,3,184,255,192,64,10,30,33,72,3,0,9,16,9,2,9, +0,47,93,204,43,93,113,237,1,47,51,253,237,49,48,43,43,5,20,6,7,35,62,1,53, +35,53,51,1,72,44,40,117,45,49,88,195,193,87,107,47,48,86,46,156,0,0,0,0,2, +0,14,2,51,2,150,5,129,0,10,0,23,0,108,64,74,86,10,1,86,9,1,121,6,137,6,2, +17,175,5,191,5,2,5,64,29,60,72,5,64,24,27,72,5,8,1,224,18,6,16,2,1,48,2,1, +64,2,144,2,2,2,0,4,229,8,5,95,17,111,17,127,17,3,15,17,31,17,127,17,143,17, +4,17,17,1,11,6,220,1,223,0,63,63,51,18,57,47,93,113,51,51,237,50,1,47,93, +113,114,51,51,237,50,47,43,43,93,51,49,48,93,114,114,1,21,35,53,33,53,1,51, +17,51,21,3,14,3,7,3,33,17,60,2,54,2,39,131,254,106,1,130,151,111,240,7,22, +24,22,7,199,1,23,1,2,229,178,178,111,2,45,253,213,113,2,23,13,37,39,35,11, +254,225,1,33,14,38,38,34,0,0,0,0,1,0,53,2,40,2,124,5,129,0,38,0,134,64,37, +37,36,53,36,69,36,3,3,24,9,13,72,19,34,1,4,34,1,3,31,30,25,224,139,27,1,6, +27,10,192,26,208,26,224,26,3,26,184,255,192,64,53,16,19,72,26,29,0,225,32, +19,96,19,2,32,19,96,19,160,19,224,19,4,19,22,228,34,34,16,30,229,27,220,68, +11,84,11,100,11,3,53,11,1,6,11,22,11,38,11,3,11,16,228,5,221,0,63,237,50, +93,93,93,63,237,18,57,47,237,1,47,93,113,237,50,47,43,93,51,51,95,113,237, +50,50,0,95,93,93,49,48,43,93,1,20,14,2,35,34,46,2,39,55,30,3,51,50,54,53, +52,38,35,34,6,7,35,19,33,21,33,7,62,1,51,50,30,2,2,124,38,73,108,70,66,101, +74,44,9,133,5,24,39,54,36,71,86,81,75,51,77,23,129,33,1,250,254,114,19,29, +91,54,67,103,69,36,3,67,65,104,74,40,33,59,81,48,15,27,47,36,21,85,93,81, +85,37,23,1,212,113,245,26,33,39,71,102,0,0,0,1,0,43,2,52,2,120,5,129,0,14, +0,54,64,33,5,224,6,6,0,175,12,191,12,2,12,11,96,0,1,191,0,207,0,255,0,3,96, +0,1,0,0,12,229,13,220,5,223,0,63,63,237,50,1,47,93,93,113,51,47,93,17,57, +47,237,49,48,1,14,3,21,35,52,62,2,55,33,53,33,2,120,64,106,77,43,133,47,80, +107,60,254,52,2,77,5,28,97,176,176,187,108,102,188,179,175,88,113,0,3,0,45, +2,40,2,130,5,142,0,19,0,39,0,81,0,138,185,0,68,255,232,179,11,15,72,64,184, +255,232,64,82,11,15,72,47,24,9,13,72,43,24,9,13,72,5,15,21,15,2,76,55,71, +10,226,72,61,1,61,61,30,226,224,50,1,191,50,1,50,0,226,70,71,1,71,71,40,226, +32,20,96,20,2,32,20,96,20,160,20,224,20,4,20,76,56,25,228,15,15,35,26,5,1, +11,5,1,5,228,66,222,35,228,45,221,0,63,237,63,237,93,93,18,57,47,237,57,57, +1,47,93,113,237,50,47,113,237,47,93,93,237,51,47,113,237,18,57,57,0,93,49, +48,43,43,43,43,1,52,46,2,35,34,14,2,21,20,30,2,51,50,62,2,19,52,46,2,35,34, +14,2,21,20,30,2,51,50,62,2,55,20,14,2,35,34,46,2,53,52,62,2,55,53,46,3,53, +52,62,2,51,50,30,2,21,20,14,2,7,21,30,3,1,223,12,31,53,41,39,53,31,13,9,29, +54,45,48,54,27,7,21,13,35,61,49,45,59,36,15,15,36,61,46,46,61,34,14,142,35, +73,113,77,77,113,74,35,29,47,61,32,36,55,38,20,35,70,104,68,72,105,69,33, +20,38,56,36,36,63,46,26,4,169,28,48,34,19,19,34,48,28,23,47,39,25,25,39,48, +254,155,28,52,40,24,24,41,53,28,35,59,42,23,23,42,60,22,54,91,66,37,37,66, +90,54,46,72,52,32,5,3,8,37,52,64,35,45,79,59,34,35,60,79,44,35,63,52,37,7, +3,6,31,52,72,0,1,255,229,4,176,2,195,5,240,0,17,0,62,64,41,117,11,133,11, +2,117,7,133,7,2,12,73,15,13,191,13,239,13,3,13,6,73,64,5,12,5,128,9,142,15, +0,47,0,63,0,127,0,239,0,5,0,0,47,93,237,26,205,50,1,47,26,237,220,93,237, +49,48,0,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,84,111,141,81,32, +2,164,6,104,93,93,104,6,164,2,32,81,141,4,176,57,91,115,57,103,96,96,103, +57,115,91,57,0,1,0,124,4,28,1,69,5,129,0,10,0,36,64,21,7,151,0,150,4,9,8, +146,80,3,96,3,2,160,3,176,3,2,3,9,3,0,63,204,93,113,237,1,47,51,253,237,49, +48,1,20,6,7,35,62,1,53,35,53,51,1,69,44,40,117,45,49,88,195,5,23,87,117,47, +48,96,46,167,0,0,1,0,130,4,187,1,75,6,32,0,10,0,47,64,30,4,9,150,7,151,10, +7,146,95,3,111,3,2,175,3,191,3,2,3,80,10,1,15,10,63,10,127,10,3,10,0,47,93, +113,205,93,113,237,1,47,237,237,50,49,48,19,52,54,55,51,14,1,21,51,21,35, +130,44,40,117,45,49,88,195,5,37,87,117,47,48,96,46,167,0,0,0,0,1,0,106,5, +250,2,18,6,240,0,5,0,48,64,30,117,3,133,3,2,128,4,1,64,4,1,4,64,1,2,64,16, +20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43,1,47,26,205,93,93, +49,48,93,1,37,53,51,23,21,1,160,254,202,207,217,5,250,217,29,226,20,0,1,0, +72,5,250,1,240,6,240,0,5,0,52,64,34,122,2,138,2,2,64,3,128,3,2,3,64,79,0, +143,0,2,0,2,64,16,20,72,2,128,95,0,1,0,64,9,12,72,0,0,47,43,93,26,205,43, +1,47,93,26,205,93,49,48,93,19,53,55,51,21,5,72,217,207,254,202,5,250,20,226, +29,217,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,9,134,9,2,120,8,136, +8,2,128,0,1,0,184,255,192,64,25,11,15,72,0,6,4,142,64,8,64,16,19,72,8,128, +6,95,1,1,1,64,9,12,72,1,0,47,43,93,51,26,221,43,26,237,1,47,204,43,93,49, +48,93,93,1,21,35,39,35,7,35,53,55,51,2,150,105,219,2,232,104,234,204,6,14, +20,139,139,20,240,0,0,0,0,1,0,0,5,250,2,150,6,254,0,9,0,65,64,14,118,0,134, +0,2,120,1,136,1,2,128,8,1,8,184,255,192,64,25,11,15,72,8,64,2,7,3,64,16,19, +72,3,128,6,142,95,1,1,1,64,9,12,72,1,0,47,43,93,237,26,205,43,50,1,47,26, +204,43,93,49,48,93,93,1,35,39,53,51,23,51,55,51,21,1,182,204,234,104,232, +2,219,105,5,250,239,21,139,139,21,0,0,0,0,2,0,45,5,250,2,90,6,178,0,3,0,7, +0,35,64,19,3,133,0,7,133,4,1,5,145,0,95,4,1,4,64,9,12,72,4,0,47,43,93,51, +237,50,1,47,237,220,237,49,48,1,53,51,21,33,53,51,21,1,183,163,253,211,165, +5,250,184,184,184,184,0,0,1,255,233,5,250,2,182,7,6,0,27,0,68,181,89,2,105, +2,2,26,184,255,232,64,34,9,15,72,12,24,9,15,72,64,23,1,15,23,1,23,9,22,5, +143,64,14,128,19,143,8,95,0,1,0,64,9,12,72,0,0,47,43,93,50,237,26,221,26, +237,51,1,47,204,93,93,49,48,43,43,0,93,1,34,46,2,35,34,6,7,35,62,3,51,50, +30,2,51,50,54,55,51,14,3,1,236,42,84,78,71,31,55,54,9,91,5,20,45,74,59,44, +84,78,69,30,54,55,8,92,5,20,43,74,5,250,37,45,37,62,57,45,95,78,50,37,45, +37,63,56,44,95,78,51,0,0,0,0,2,0,32,5,250,3,15,6,241,0,5,0,11,0,88,64,60, +154,8,170,8,2,154,2,170,2,2,102,10,1,98,4,1,98,3,1,10,159,7,1,15,7,31,7,127, +7,223,7,4,7,7,4,64,0,64,9,31,72,0,8,2,64,16,20,72,2,128,6,95,0,1,0,64,9,12, +72,0,0,47,43,93,50,26,205,43,50,1,47,43,26,205,220,94,93,113,205,49,48,93, +93,93,93,93,19,53,55,51,21,5,51,53,55,51,21,5,32,197,207,254,202,253,197, +207,254,202,5,250,20,227,29,218,20,227,29,218,0,1,255,232,5,250,2,130,6,243, +0,17,0,55,64,32,4,11,1,4,7,1,17,15,19,1,100,13,64,5,12,5,64,16,20,72,5,128, +9,95,0,1,0,64,9,12,72,0,0,47,43,93,205,26,205,43,50,1,47,26,204,94,93,49, +48,0,94,93,93,1,34,46,2,39,51,30,1,51,50,54,55,51,14,3,1,52,74,116,84,50, +8,117,17,109,91,91,107,17,117,9,50,83,116,5,250,41,69,90,49,53,60,61,52,49, +90,69,41,0,0,0,0,0,0,1,0,0,21,86,0,1,3,140,12,0,0,9,9,72,0,3,0,36,255,143, +0,3,0,55,255,219,0,3,0,60,255,219,0,3,1,82,255,143,0,3,1,91,255,143,0,3,1, +94,255,143,0,3,1,101,255,143,0,3,1,109,255,219,0,3,1,110,255,219,0,3,1,116, +255,219,0,20,0,20,255,104,0,36,0,3,255,143,0,36,0,55,255,104,0,36,0,57,255, +104,0,36,0,58,255,180,0,36,0,60,255,104,0,36,0,89,255,219,0,36,0,90,255,219, +0,36,0,92,255,219,0,36,2,3,255,104,0,41,0,15,255,29,0,41,0,17,255,29,0,41, +0,36,255,143,0,47,0,3,255,180,0,47,0,55,255,104,0,47,0,57,255,104,0,47,0, +58,255,104,0,47,0,60,255,104,0,47,0,92,255,180,0,47,2,3,255,143,0,51,0,3, +255,219,0,51,0,15,254,248,0,51,0,17,254,248,0,51,0,36,255,104,0,53,0,55,255, +219,0,53,0,57,255,219,0,53,0,58,255,219,0,53,0,60,255,219,0,55,0,3,255,219, +0,55,0,15,255,29,0,55,0,16,255,143,0,55,0,17,255,29,0,55,0,29,255,29,0,55, +0,30,255,29,0,55,0,36,255,104,0,55,0,50,255,219,0,55,0,68,255,29,0,55,0,70, +255,29,0,55,0,72,255,29,0,55,0,76,255,180,0,55,0,82,255,29,0,55,0,85,255, +180,0,55,0,86,255,29,0,55,0,88,255,180,0,55,0,90,255,143,0,55,0,92,255,143, +0,57,0,15,255,68,0,57,0,16,255,143,0,57,0,17,255,68,0,57,0,29,255,180,0,57, +0,30,255,180,0,57,0,36,255,104,0,57,0,68,255,104,0,57,0,72,255,143,0,57,0, +76,255,219,0,57,0,82,255,143,0,57,0,85,255,180,0,57,0,88,255,180,0,57,0,92, +255,180,0,58,0,15,255,143,0,58,0,16,255,219,0,58,0,17,255,143,0,58,0,29,255, +219,0,58,0,30,255,219,0,58,0,36,255,180,0,58,0,68,255,180,0,58,0,72,255,219, +0,58,0,82,255,219,0,58,0,85,255,219,0,58,0,88,255,219,0,58,0,92,255,238,0, +60,0,3,255,219,0,60,0,15,254,248,0,60,0,16,255,68,0,60,0,17,254,248,0,60, +0,29,255,143,0,60,0,30,255,123,0,60,0,36,255,104,0,60,0,68,255,104,0,60,0, +72,255,68,0,60,0,76,255,180,0,60,0,82,255,68,0,60,0,83,255,104,0,60,0,84, +255,68,0,60,0,88,255,143,0,60,0,89,255,143,0,73,0,73,255,219,0,73,2,3,0,37, +0,85,0,15,255,143,0,85,0,17,255,143,0,85,2,3,0,76,0,89,0,15,255,104,0,89, +0,17,255,104,0,90,0,15,255,143,0,90,0,17,255,143,0,92,0,15,255,104,0,92,0, +17,255,104,1,82,1,98,255,213,1,82,1,105,255,213,1,82,1,109,255,104,1,82,1, +110,255,104,1,82,1,111,255,197,1,82,1,116,255,104,1,82,1,124,255,219,1,82, +1,134,255,219,1,82,1,144,255,219,1,87,1,110,255,190,1,88,1,90,0,170,1,88, +1,91,255,104,1,88,1,94,255,104,1,88,1,98,255,141,1,88,1,101,255,104,1,88, +1,105,255,141,1,88,1,111,255,141,1,88,1,114,255,158,1,88,1,119,255,104,1, +88,1,120,255,180,1,88,1,122,255,70,1,88,1,128,255,104,1,88,1,130,255,180, +1,88,1,131,255,104,1,88,1,133,255,104,1,88,1,136,255,70,1,88,1,140,255,70, +1,88,1,143,255,70,1,88,1,147,0,98,1,88,1,149,255,70,1,89,1,110,255,209,1, +89,1,116,255,209,1,91,0,3,255,143,1,91,1,98,255,213,1,91,1,105,255,213,1, +91,1,109,255,104,1,91,1,110,255,104,1,91,1,111,255,197,1,91,1,116,255,104, +1,91,1,124,255,219,1,91,1,134,255,219,1,91,1,144,255,219,1,91,2,3,255,104, +1,93,0,15,255,31,1,93,0,17,255,31,1,93,1,90,0,164,1,93,1,91,255,68,1,93,1, +94,255,68,1,93,1,101,255,68,1,93,1,130,255,168,1,93,1,147,0,88,1,94,0,3,255, +143,1,94,1,98,255,213,1,94,1,105,255,213,1,94,1,109,255,137,1,94,1,110,255, +104,1,94,1,116,255,104,1,98,1,91,255,219,1,98,1,94,255,219,1,98,1,101,255, +219,1,98,1,110,255,190,1,98,1,116,255,190,1,100,1,98,255,193,1,100,1,105, +255,193,1,100,1,111,255,143,1,100,1,117,255,231,1,100,1,122,255,231,1,100, +1,125,255,231,1,100,1,127,255,231,1,100,1,129,255,231,1,100,1,135,255,231, +1,100,1,136,255,231,1,100,1,140,255,231,1,100,1,143,255,231,1,100,1,146,255, +231,1,100,1,149,255,231,1,100,1,151,255,231,1,101,0,3,255,143,1,101,1,98, +255,213,1,101,1,105,255,213,1,101,1,109,255,104,1,101,1,110,255,104,1,101, +1,116,255,104,1,105,1,91,255,219,1,105,1,94,255,213,1,105,1,101,255,219,1, +105,1,110,255,190,1,105,1,116,255,190,1,107,0,3,255,219,1,107,0,15,254,250, +1,107,0,17,254,250,1,107,1,91,255,104,1,107,1,94,255,104,1,107,1,101,255, +104,1,108,1,137,255,158,1,108,1,141,255,158,1,109,0,3,255,219,1,109,0,15, +255,31,1,109,0,17,255,31,1,109,0,29,255,31,1,109,0,30,255,31,1,109,1,90,0, +188,1,109,1,91,255,104,1,109,1,94,255,104,1,109,1,98,255,219,1,109,1,101, +255,104,1,109,1,105,255,219,1,109,1,111,255,219,1,109,1,114,255,219,1,109, +1,117,255,31,1,109,1,118,255,31,1,109,1,121,255,78,1,109,1,122,255,31,1,109, +1,124,255,78,1,109,1,126,255,31,1,109,1,128,255,106,1,109,1,130,255,180,1, +109,1,133,255,106,1,109,1,134,255,143,1,109,1,136,255,31,1,109,1,140,255, +31,1,109,1,142,255,80,1,109,1,143,255,31,1,109,1,144,255,143,1,109,1,145, +255,106,1,109,1,147,0,188,1,109,1,148,255,78,1,109,1,149,255,31,1,109,1,150, +255,78,1,110,0,3,255,219,1,110,0,15,254,250,1,110,0,16,255,70,1,110,0,17, +254,250,1,110,0,29,255,143,1,110,0,30,255,143,1,110,1,90,0,188,1,110,1,91, +255,104,1,110,1,94,255,104,1,110,1,98,255,141,1,110,1,101,255,104,1,110,1, +105,255,141,1,110,1,111,255,141,1,110,1,114,255,158,1,110,1,119,255,104,1, +110,1,120,255,180,1,110,1,122,255,70,1,110,1,124,255,158,1,110,1,128,255, +104,1,110,1,130,255,180,1,110,1,131,255,104,1,110,1,133,255,104,1,110,1,136, +255,70,1,110,1,140,255,70,1,110,1,143,255,70,1,110,1,147,0,121,1,110,1,149, +255,70,1,111,1,91,255,197,1,111,1,110,255,190,1,111,1,116,255,190,1,113,1, +117,255,178,1,113,1,122,255,178,1,113,1,125,255,178,1,113,1,129,255,217,1, +113,1,136,255,178,1,113,1,140,255,178,1,113,1,143,255,178,1,113,1,146,255, +178,1,113,1,149,255,178,1,113,1,151,255,178,1,114,1,110,255,209,1,114,1,116, +255,209,1,116,0,3,255,219,1,116,1,90,0,170,1,116,1,91,255,104,1,116,1,94, +255,104,1,116,1,98,255,141,1,116,1,101,255,104,1,116,1,105,255,141,1,116, +1,111,255,141,1,116,1,114,255,158,1,116,1,119,255,104,1,116,1,120,255,180, +1,116,1,122,255,70,1,116,1,128,255,104,1,116,1,130,255,180,1,116,1,131,255, +104,1,116,1,133,255,104,1,116,1,136,255,70,1,116,1,140,255,70,1,116,1,143, +255,70,1,116,1,147,0,98,1,116,1,149,255,70,1,125,1,132,255,217,1,125,1,137, +255,227,1,125,1,141,255,227,1,125,1,144,255,201,1,127,1,117,255,119,1,127, +1,119,255,219,1,127,1,122,255,119,1,127,1,124,255,170,1,127,1,125,255,180, +1,127,1,128,255,219,1,127,1,129,255,158,1,127,1,130,255,219,1,127,1,131,255, +219,1,127,1,134,255,170,1,127,1,136,255,119,1,127,1,137,255,170,1,127,1,140, +255,119,1,127,1,141,255,170,1,127,1,143,255,119,1,127,1,146,255,119,1,127, +1,149,255,119,1,127,1,151,255,119,1,129,1,132,255,217,1,131,1,117,255,231, +1,131,1,122,255,231,1,131,1,125,255,231,1,131,1,127,255,231,1,131,1,129,255, +231,1,131,1,135,255,231,1,131,1,136,255,231,1,131,1,139,255,231,1,131,1,140, +255,231,1,131,1,143,255,231,1,131,1,146,255,231,1,131,1,149,255,231,1,131, +1,151,255,231,1,132,1,117,255,225,1,132,1,122,255,225,1,132,1,125,255,225, +1,132,1,135,255,225,1,132,1,136,255,225,1,132,1,139,255,209,1,132,1,140,255, +225,1,132,1,142,255,207,1,132,1,143,255,219,1,132,1,146,255,225,1,132,1,149, +255,225,1,132,1,150,255,207,1,132,1,151,255,225,1,135,1,117,255,201,1,135, +1,122,255,201,1,135,1,125,255,201,1,135,1,127,255,201,1,135,1,135,255,201, +1,135,1,136,255,201,1,135,1,139,255,201,1,135,1,140,255,201,1,135,1,143,255, +201,1,135,1,149,255,201,1,136,1,132,255,217,1,136,1,137,255,227,1,136,1,141, +255,227,1,136,1,144,255,201,1,137,1,117,255,227,1,137,1,122,255,227,1,137, +1,127,255,227,1,137,1,136,255,227,1,137,1,139,255,227,1,137,1,140,255,227, +1,137,1,143,255,227,1,137,1,146,255,227,1,137,1,151,255,227,1,138,1,132,255, +217,1,138,1,137,255,227,1,138,1,141,255,227,1,141,1,117,255,227,1,141,1,122, +255,227,1,141,1,125,255,227,1,141,1,127,255,227,1,141,1,136,255,227,1,141, +1,139,255,227,1,141,1,140,255,227,1,141,1,143,255,227,1,141,1,146,255,227, +1,141,1,151,255,227,1,143,1,132,255,217,1,143,1,137,255,227,1,143,1,141,255, +227,1,143,1,144,255,201,1,144,1,117,255,201,1,144,1,122,255,201,1,144,1,125, +255,201,1,144,1,127,255,201,1,144,1,136,255,201,1,144,1,139,255,201,1,144, +1,140,255,201,1,144,1,143,255,201,1,144,1,146,255,201,1,144,1,149,255,201, +1,144,1,151,255,201,1,146,1,132,255,217,1,146,1,137,255,227,1,146,1,141,255, +227,1,146,1,144,255,201,1,149,1,132,255,217,1,149,1,137,255,227,1,149,1,141, +255,227,1,149,1,144,255,201,1,151,1,132,255,217,1,151,1,137,255,227,1,151, +1,141,255,227,1,151,1,144,255,201,1,154,0,15,255,6,1,154,0,17,255,6,1,154, +0,108,255,119,1,154,0,123,255,119,1,154,1,255,255,211,1,160,2,3,255,96,1, +161,2,3,255,119,1,166,1,170,0,68,1,166,1,173,255,233,1,166,1,177,0,45,1,166, +1,180,255,211,1,166,1,181,255,233,1,166,1,183,255,211,1,166,1,184,255,96, +1,166,1,185,255,166,1,166,1,186,255,188,1,166,1,189,255,96,1,166,1,195,255, +211,1,166,1,198,0,23,1,166,1,216,255,211,1,166,1,217,255,233,1,166,1,218, +0,23,1,166,1,227,0,45,1,166,2,3,255,141,1,167,1,166,255,211,1,167,1,173,255, +233,1,167,1,180,255,233,1,167,1,183,255,233,1,167,1,184,255,164,1,167,1,185, +255,209,1,167,1,186,255,233,1,167,1,187,255,211,1,167,1,189,255,164,1,167, +1,192,255,188,1,167,1,195,255,233,1,167,1,197,255,233,1,167,1,209,255,233, +1,167,1,217,255,211,1,168,1,166,255,188,1,168,1,170,255,211,1,168,1,172,255, +211,1,168,1,173,255,188,1,168,1,177,255,233,1,168,1,180,255,188,1,168,1,183, +255,188,1,168,1,184,255,119,1,168,1,185,255,188,1,168,1,186,255,188,1,168, +1,187,255,166,1,168,1,189,255,164,1,168,1,192,255,141,1,168,1,197,255,188, +1,168,1,202,255,233,1,168,1,210,255,233,1,168,1,216,255,188,1,168,1,217,255, +233,1,168,1,219,255,233,1,168,1,221,255,188,1,168,1,229,255,233,1,169,0,15, +255,6,1,169,0,17,255,6,1,169,0,108,255,119,1,169,0,123,255,119,1,169,1,166, +255,119,1,169,1,170,255,119,1,169,1,173,255,211,1,169,1,177,255,141,1,169, +1,178,255,209,1,169,1,180,255,141,1,169,1,183,255,164,1,169,1,197,255,188, +1,169,1,198,255,141,1,169,1,200,255,141,1,169,1,202,255,119,1,169,1,203,255, +119,1,169,1,206,255,141,1,169,1,209,255,141,1,169,1,210,255,141,1,169,1,211, +255,141,1,169,1,212,255,119,1,169,1,214,255,141,1,169,1,217,255,119,1,169, +1,225,255,141,1,169,1,226,255,141,1,169,1,228,255,141,1,169,1,229,255,119, +1,169,1,255,255,211,1,170,1,185,0,23,1,170,1,186,255,211,1,170,1,189,255, +186,1,170,1,205,0,68,1,170,1,212,0,23,1,170,1,217,0,45,1,171,1,173,255,211, +1,171,1,215,255,233,1,172,1,173,255,233,1,172,1,180,255,211,1,172,1,183,255, +233,1,172,1,184,0,23,1,172,1,185,0,45,1,172,1,192,0,45,1,172,1,198,0,23,1, +172,1,203,255,231,1,172,1,212,255,233,1,172,1,217,255,233,1,173,1,177,255, +233,1,173,1,180,255,233,1,173,1,183,255,233,1,173,1,184,255,211,1,173,1,185, +255,233,1,173,1,186,255,233,1,173,1,189,255,211,1,173,1,197,255,233,1,176, +1,173,255,233,1,176,1,180,255,233,1,176,1,183,255,233,1,176,1,185,0,23,1, +176,1,186,255,186,1,177,1,186,255,233,1,177,1,199,0,23,1,177,1,217,0,23,1, +178,1,186,255,233,1,178,1,189,255,233,1,178,1,198,0,23,1,178,1,203,0,23,1, +178,1,212,0,23,1,178,1,215,0,23,1,178,1,217,0,23,1,178,1,221,255,233,1,178, +1,227,0,23,1,180,1,166,255,211,1,180,1,170,255,211,1,180,1,172,255,211,1, +180,1,177,255,233,1,180,1,185,255,211,1,180,1,187,255,164,1,180,1,189,255, +211,1,180,1,197,255,211,1,180,1,202,255,211,1,180,1,209,255,233,1,180,1,219, +255,233,1,182,0,15,254,125,1,182,0,17,254,125,1,182,0,29,255,211,1,182,0, +30,255,211,1,182,0,123,255,141,1,182,1,166,255,119,1,182,1,170,255,119,1, +182,1,172,255,233,1,182,1,173,255,211,1,182,1,177,255,141,1,182,1,178,255, +233,1,182,1,180,255,211,1,182,1,183,255,233,1,182,1,184,255,164,1,182,1,185, +255,211,1,182,1,186,255,233,1,182,1,187,255,164,1,182,1,197,255,211,1,182, +1,198,255,188,1,182,1,202,255,96,1,182,1,203,255,166,1,182,1,212,255,166, +1,182,1,227,255,211,1,182,1,229,255,188,1,183,1,166,255,211,1,183,1,170,255, +211,1,183,1,173,255,233,1,183,1,177,255,188,1,183,1,178,255,233,1,183,1,180, +255,211,1,183,1,184,255,188,1,183,1,185,255,188,1,183,1,187,255,141,1,183, +1,189,255,188,1,183,1,192,255,186,1,183,1,195,255,233,1,183,1,198,0,23,1, +183,1,204,0,45,1,183,1,221,255,233,1,184,0,15,255,29,1,184,0,17,255,29,1, +184,0,108,255,166,1,184,0,123,255,166,1,184,1,166,255,188,1,184,1,170,255, +188,1,184,1,172,0,23,1,184,1,173,255,233,1,184,1,177,255,211,1,184,1,180, +255,164,1,184,1,186,255,188,1,184,1,197,255,211,1,184,1,198,255,164,1,184, +1,200,255,166,1,184,1,203,255,141,1,184,1,206,255,166,1,184,1,208,255,166, +1,184,1,209,255,164,1,184,1,210,255,166,1,184,1,212,255,96,1,184,1,213,255, +166,1,184,1,214,255,141,1,184,1,215,255,141,1,184,1,217,255,141,1,184,1,219, +255,166,1,184,1,223,255,166,1,184,1,225,255,166,1,184,1,226,255,166,1,184, +1,228,255,166,1,184,1,229,255,141,1,184,1,255,255,211,1,185,0,15,254,240, +1,185,0,17,254,240,1,185,0,29,255,211,1,185,0,30,255,211,1,185,0,108,255, +166,1,185,0,123,255,164,1,185,1,166,255,119,1,185,1,170,255,164,1,185,1,173, +255,211,1,185,1,177,255,188,1,185,1,180,255,188,1,185,1,186,255,188,1,185, +1,195,255,211,1,185,1,197,255,211,1,185,1,199,255,211,1,185,1,200,255,141, +1,185,1,201,255,164,1,185,1,202,255,96,1,185,1,203,255,119,1,185,1,204,255, +188,1,185,1,205,255,141,1,185,1,206,255,164,1,185,1,207,255,188,1,185,1,208, +255,164,1,185,1,209,255,119,1,185,1,210,255,164,1,185,1,211,255,164,1,185, +1,212,255,119,1,185,1,213,255,164,1,185,1,214,255,164,1,185,1,215,255,119, +1,185,1,219,255,164,1,185,1,220,255,164,1,185,1,222,255,164,1,185,1,223,255, +164,1,185,1,228,255,164,1,185,1,229,255,119,1,185,1,255,255,233,1,186,1,166, +255,211,1,186,1,170,255,188,1,186,1,177,255,188,1,186,1,184,255,141,1,186, +1,185,255,164,1,186,1,189,255,211,1,186,1,197,255,186,1,186,1,209,255,188, +1,187,1,173,255,211,1,187,1,180,255,188,1,187,1,183,255,188,1,187,1,186,255, +188,1,187,1,195,255,186,1,187,1,212,255,233,1,187,1,217,255,211,1,188,1,180, +255,211,1,188,1,198,0,45,1,191,1,198,0,23,1,191,1,217,0,45,1,192,1,197,255, +188,1,192,2,3,255,119,1,194,1,166,255,211,1,194,1,170,255,211,1,194,1,172, +255,188,1,194,1,173,255,233,1,194,1,177,255,186,1,194,1,178,255,211,1,194, +1,180,255,211,1,194,1,183,255,211,1,194,1,184,255,51,1,194,1,187,255,164, +1,194,1,189,255,96,1,194,1,195,255,233,1,194,1,197,255,164,1,194,2,3,255, +96,1,195,1,170,255,188,1,195,1,172,255,231,1,195,1,173,255,233,1,195,1,177, +255,188,1,195,1,187,255,186,1,195,1,197,255,211,1,195,1,202,255,188,1,195, +1,204,0,23,1,195,1,209,255,188,1,195,1,210,255,233,1,195,1,229,255,233,1, +196,1,166,255,188,1,196,1,170,255,166,1,196,1,172,255,211,1,196,1,177,255, +164,1,196,1,180,255,233,1,196,1,183,255,233,1,196,1,184,255,141,1,196,1,187, +255,164,1,196,1,189,255,188,1,196,1,202,255,164,1,196,1,209,255,164,1,196, +1,210,255,233,1,198,1,205,255,233,1,198,1,216,255,211,1,198,1,217,255,233, +1,198,1,221,255,211,1,199,1,198,255,209,1,199,1,202,255,164,1,199,1,203,255, +233,1,199,1,204,255,233,1,199,1,205,255,211,1,199,1,209,255,164,1,199,1,210, +255,211,1,199,1,215,255,233,1,199,1,217,255,211,1,199,1,218,255,233,1,199, +1,219,255,188,1,199,1,221,255,188,1,199,1,224,255,188,1,199,1,227,255,233, +1,199,1,229,255,211,1,200,1,198,255,233,1,200,1,199,255,233,1,200,1,202,255, +233,1,200,1,203,255,233,1,200,1,204,255,233,1,200,1,205,255,233,1,200,1,209, +255,209,1,200,1,210,255,233,1,200,1,212,255,233,1,200,1,215,255,233,1,200, +1,216,255,211,1,200,1,217,255,211,1,200,1,218,255,233,1,200,1,221,255,164, +1,200,1,224,255,188,1,200,1,229,255,233,1,201,0,15,255,6,1,201,0,17,255,6, +1,201,1,198,255,211,1,201,1,202,255,164,1,201,1,203,255,211,1,201,1,205,255, +233,1,201,1,209,255,211,1,201,1,212,255,211,1,201,1,215,255,211,1,201,1,229, +255,233,1,202,1,224,255,211,1,202,1,227,0,23,1,203,1,199,255,233,1,203,1, +202,255,211,1,203,1,204,255,233,1,203,1,205,255,211,1,203,1,209,255,188,1, +203,1,216,255,188,1,203,1,217,255,233,1,203,1,219,255,211,1,203,1,221,255, +188,1,204,1,199,0,23,1,204,1,217,0,23,1,204,1,221,255,233,1,204,1,224,0,45, +1,205,1,199,255,233,1,205,1,202,255,211,1,205,1,203,255,233,1,205,1,205,255, +233,1,205,1,209,255,233,1,205,1,212,255,233,1,205,1,215,255,233,1,205,1,217, +255,233,1,205,1,218,255,233,1,205,1,221,255,188,1,205,1,224,255,211,1,208, +1,198,0,45,1,208,1,199,0,45,1,208,1,203,0,23,1,208,1,205,0,23,1,208,1,209, +0,23,1,208,1,212,0,23,1,208,1,215,0,23,1,208,1,216,0,23,1,208,1,217,0,23, +1,208,1,227,0,23,1,209,1,212,0,23,1,209,1,221,255,211,1,210,1,199,255,233, +1,210,1,205,255,233,1,210,1,217,0,23,1,212,1,202,255,211,1,212,1,204,255, +233,1,212,1,205,255,233,1,212,1,209,255,211,1,212,1,216,255,211,1,212,1,217, +255,233,1,212,1,219,255,233,1,212,1,221,255,211,1,214,1,202,255,209,1,214, +1,205,255,233,1,214,1,209,255,186,1,214,1,216,255,211,1,214,1,217,255,233, +1,214,1,219,255,233,1,214,1,221,255,211,1,214,1,229,255,233,1,215,1,204,0, +23,1,215,1,212,0,23,1,215,1,221,255,233,1,215,1,227,0,23,1,216,0,15,255,29, +1,216,0,17,255,29,1,216,1,198,255,233,1,216,1,202,255,188,1,216,1,203,255, +233,1,216,1,204,0,68,1,216,1,209,255,211,1,216,1,212,255,233,1,216,1,215, +255,233,1,216,1,217,0,23,1,217,0,15,255,51,1,217,0,17,255,51,1,217,0,123, +0,23,1,217,1,198,255,233,1,217,1,199,0,23,1,217,1,202,255,188,1,217,1,203, +255,233,1,217,1,204,0,23,1,217,1,209,255,211,1,217,1,210,255,233,1,217,1, +212,255,231,1,217,1,214,255,233,1,217,1,215,255,233,1,217,1,218,255,233,1, +217,1,227,255,233,1,217,1,229,255,233,1,218,1,199,255,233,1,218,1,202,255, +211,1,218,1,209,255,211,1,218,1,216,255,211,1,218,1,217,255,233,1,218,1,221, +255,211,1,218,1,229,255,233,1,219,1,198,255,233,1,219,1,199,255,233,1,219, +1,203,255,233,1,219,1,205,255,233,1,219,1,212,255,233,1,219,1,215,255,233, +1,219,1,216,255,233,1,219,1,218,255,233,1,219,1,221,255,211,1,220,1,203,255, +233,1,220,1,205,255,233,1,220,1,212,255,233,1,220,1,215,255,233,1,223,1,203, +255,233,1,223,1,212,255,233,1,223,1,217,0,23,1,226,1,216,255,96,1,226,1,221, +255,119,1,227,1,202,255,211,1,227,1,203,0,23,1,227,1,205,255,233,1,227,1, +209,255,211,1,227,1,212,0,23,1,227,1,216,255,211,1,227,1,219,255,233,1,227, +1,229,255,233,1,228,1,202,255,211,1,228,1,204,255,233,1,228,1,209,255,211, +1,228,1,210,255,233,1,228,1,216,255,211,1,228,1,219,255,233,1,228,1,221,255, +211,1,242,0,15,255,51,1,242,0,17,255,51,1,244,0,15,255,6,1,244,0,17,255,6, +1,244,0,29,255,211,1,244,0,30,255,211,1,244,0,108,255,96,1,244,0,123,255, +96,1,244,1,255,255,211,2,2,2,2,255,219,2,3,0,3,255,180,2,3,0,86,255,219,2, +3,2,3,255,219,2,8,1,153,255,96,2,8,1,162,255,96,2,8,1,184,255,96,2,8,1,189, +255,188,2,8,1,192,255,188,0,0,0,0,0,28,1,86,0,1,0,0,0,0,0,0,0,64,0,130,0, +1,0,0,0,0,0,1,0,15,0,227,0,1,0,0,0,0,0,2,0,7,1,3,0,1,0,0,0,0,0,3,0,26,1,65, +0,1,0,0,0,0,0,4,0,15,1,124,0,1,0,0,0,0,0,5,0,12,1,166,0,1,0,0,0,0,0,6,0,14, +1,209,0,1,0,0,0,0,0,7,0,122,2,214,0,1,0,0,0,0,0,8,0,20,3,123,0,1,0,0,0,0, +0,9,0,14,3,174,0,1,0,0,0,0,0,11,0,28,3,247,0,1,0,0,0,0,0,12,0,46,4,114,0, +1,0,0,0,0,0,13,0,127,5,161,0,1,0,0,0,0,0,14,0,43,6,121,0,3,0,1,4,9,0,0,0, +128,0,0,0,3,0,1,4,9,0,1,0,30,0,195,0,3,0,1,4,9,0,2,0,14,0,243,0,3,0,1,4,9, +0,3,0,52,1,11,0,3,0,1,4,9,0,4,0,30,1,92,0,3,0,1,4,9,0,5,0,24,1,140,0,3,0, +1,4,9,0,6,0,28,1,179,0,3,0,1,4,9,0,7,0,244,1,224,0,3,0,1,4,9,0,8,0,40,3,81, +0,3,0,1,4,9,0,9,0,28,3,144,0,3,0,1,4,9,0,11,0,56,3,189,0,3,0,1,4,9,0,12,0, +92,4,20,0,3,0,1,4,9,0,13,0,254,4,161,0,3,0,1,4,9,0,14,0,86,6,33,0,68,0,105, +0,103,0,105,0,116,0,105,0,122,0,101,0,100,0,32,0,100,0,97,0,116,0,97,0,32, +0,169,0,32,0,50,0,48,0,48,0,55,0,32,0,65,0,115,0,99,0,101,0,110,0,100,0,101, +0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105,0,111,0,110, +0,46,0,32,0,65,0,108,0,108,0,32,0,114,0,105,0,103,0,104,0,116,0,115,0,32, +0,114,0,101,0,115,0,101,0,114,0,118,0,101,0,100,0,46,0,0,68,105,103,105,116, +105,122,101,100,32,100,97,116,97,32,169,32,50,48,48,55,32,65,115,99,101,110, +100,101,114,32,67,111,114,112,111,114,97,116,105,111,110,46,32,65,108,108, +32,114,105,103,104,116,115,32,114,101,115,101,114,118,101,100,46,0,0,76,0, +105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0, +115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115,0,0,82,0,101, +0,103,0,117,0,108,0,97,0,114,0,0,82,101,103,117,108,97,114,0,0,65,0,115,0, +99,0,101,0,110,0,100,0,101,0,114,0,32,0,45,0,32,0,76,0,105,0,98,0,101,0,114, +0,97,0,116,0,105,0,111,0,110,0,32,0,83,0,97,0,110,0,115,0,0,65,115,99,101, +110,100,101,114,32,45,32,76,105,98,101,114,97,116,105,111,110,32,83,97,110, +115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,32,0,83, +0,97,0,110,0,115,0,0,76,105,98,101,114,97,116,105,111,110,32,83,97,110,115, +0,0,86,0,101,0,114,0,115,0,105,0,111,0,110,0,32,0,49,0,46,0,48,0,50,0,0,86, +101,114,115,105,111,110,32,49,46,48,50,0,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,83,0,97,0,110,0,115,0,0,76,105,98,101,114,97,116, +105,111,110,83,97,110,115,0,0,76,0,105,0,98,0,101,0,114,0,97,0,116,0,105, +0,111,0,110,0,32,0,105,0,115,0,32,0,97,0,32,0,116,0,114,0,97,0,100,0,101, +0,109,0,97,0,114,0,107,0,32,0,111,0,102,0,32,0,82,0,101,0,100,0,32,0,72,0, +97,0,116,0,44,0,32,0,73,0,110,0,99,0,46,0,32,0,114,0,101,0,103,0,105,0,115, +0,116,0,101,0,114,0,101,0,100,0,32,0,105,0,110,0,32,0,85,0,46,0,83,0,46,0, +32,0,80,0,97,0,116,0,101,0,110,0,116,0,32,0,97,0,110,0,100,0,32,0,84,0,114, +0,97,0,100,0,101,0,109,0,97,0,114,0,107,0,32,0,79,0,102,0,102,0,105,0,99, +0,101,0,32,0,97,0,110,0,100,0,32,0,99,0,101,0,114,0,116,0,97,0,105,0,110, +0,32,0,111,0,116,0,104,0,101,0,114,0,32,0,106,0,117,0,114,0,105,0,115,0,100, +0,105,0,99,0,116,0,105,0,111,0,110,0,115,0,46,0,0,76,105,98,101,114,97,116, +105,111,110,32,105,115,32,97,32,116,114,97,100,101,109,97,114,107,32,111, +102,32,82,101,100,32,72,97,116,44,32,73,110,99,46,32,114,101,103,105,115, +116,101,114,101,100,32,105,110,32,85,46,83,46,32,80,97,116,101,110,116,32, +97,110,100,32,84,114,97,100,101,109,97,114,107,32,79,102,102,105,99,101,32, +97,110,100,32,99,101,114,116,97,105,110,32,111,116,104,101,114,32,106,117, +114,105,115,100,105,99,116,105,111,110,115,46,0,0,65,0,115,0,99,0,101,0,110, +0,100,0,101,0,114,0,32,0,67,0,111,0,114,0,112,0,111,0,114,0,97,0,116,0,105, +0,111,0,110,0,0,65,115,99,101,110,100,101,114,32,67,111,114,112,111,114,97, +116,105,111,110,0,0,83,0,116,0,101,0,118,0,101,0,32,0,77,0,97,0,116,0,116, +0,101,0,115,0,111,0,110,0,0,83,116,101,118,101,32,77,97,116,116,101,115,111, +110,0,0,104,0,116,0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97, +0,115,0,99,0,101,0,110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99, +0,111,0,109,0,47,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,0,0,104,0,116,0,116,0,112, +0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0,110,0,100,0, +101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0,116,0,121,0, +112,0,101,0,100,0,101,0,115,0,105,0,103,0,110,0,101,0,114,0,115,0,46,0,104, +0,116,0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101, +110,100,101,114,99,111,114,112,46,99,111,109,47,116,121,112,101,100,101,115, +105,103,110,101,114,115,46,104,116,109,108,0,0,85,0,115,0,101,0,32,0,111, +0,102,0,32,0,116,0,104,0,105,0,115,0,32,0,76,0,105,0,98,0,101,0,114,0,97, +0,116,0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102, +0,116,0,119,0,97,0,114,0,101,0,32,0,105,0,115,0,32,0,115,0,117,0,98,0,106, +0,101,0,99,0,116,0,32,0,116,0,111,0,32,0,116,0,104,0,101,0,32,0,108,0,105, +0,99,0,101,0,110,0,115,0,101,0,32,0,97,0,103,0,114,0,101,0,101,0,109,0,101, +0,110,0,116,0,32,0,117,0,110,0,100,0,101,0,114,0,32,0,119,0,104,0,105,0,99, +0,104,0,32,0,121,0,111,0,117,0,32,0,97,0,99,0,99,0,101,0,112,0,116,0,101, +0,100,0,32,0,116,0,104,0,101,0,32,0,76,0,105,0,98,0,101,0,114,0,97,0,116, +0,105,0,111,0,110,0,32,0,102,0,111,0,110,0,116,0,32,0,115,0,111,0,102,0,116, +0,119,0,97,0,114,0,101,0,46,0,0,85,115,101,32,111,102,32,116,104,105,115, +32,76,105,98,101,114,97,116,105,111,110,32,102,111,110,116,32,115,111,102, +116,119,97,114,101,32,105,115,32,115,117,98,106,101,99,116,32,116,111,32, +116,104,101,32,108,105,99,101,110,115,101,32,97,103,114,101,101,109,101,110, +116,32,117,110,100,101,114,32,119,104,105,99,104,32,121,111,117,32,97,99, +99,101,112,116,101,100,32,116,104,101,32,76,105,98,101,114,97,116,105,111, +110,32,102,111,110,116,32,115,111,102,116,119,97,114,101,46,0,0,104,0,116, +0,116,0,112,0,58,0,47,0,47,0,119,0,119,0,119,0,46,0,97,0,115,0,99,0,101,0, +110,0,100,0,101,0,114,0,99,0,111,0,114,0,112,0,46,0,99,0,111,0,109,0,47,0, +108,0,105,0,98,0,101,0,114,0,97,0,116,0,105,0,111,0,110,0,46,0,104,0,116, +0,109,0,108,0,0,104,116,116,112,58,47,47,119,119,119,46,97,115,99,101,110, +100,101,114,99,111,114,112,46,99,111,109,47,108,105,98,101,114,97,116,105, +111,110,46,104,116,109,108,0,0,0,2,0,0,0,0,0,0,255,39,0,150,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,2,156,0,0,0,1,0,2,1,2,0,4,0,5,0,6,0,7,0,8,0,9,0, +10,0,11,0,12,0,13,0,14,0,15,1,3,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0, +25,0,26,0,27,0,28,0,29,1,4,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0, +40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54, +0,55,0,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,65,0,66,0,67,0,68,0,69, +0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,84, +0,85,0,86,0,87,0,88,0,89,0,90,0,91,0,92,0,93,0,94,0,95,0,96,0,97,0,163,0, +132,0,133,0,189,0,150,0,232,0,134,0,142,0,139,0,157,0,169,0,164,0,138,0,218, +0,131,0,147,1,5,1,6,0,141,1,7,0,136,1,8,0,222,1,9,0,158,0,170,0,245,0,244, +0,246,0,162,0,173,0,201,0,199,0,174,0,98,0,99,0,144,0,100,0,203,0,101,0,200, +0,202,0,207,0,204,0,205,0,206,0,233,0,102,0,211,0,208,0,209,0,175,0,103,0, +240,0,145,0,214,0,212,0,213,0,104,0,235,0,237,0,137,0,106,0,105,0,107,0,109, +0,108,0,110,0,160,0,111,0,113,0,112,0,114,0,115,0,117,0,116,0,118,0,119,0, +234,0,120,0,122,0,121,0,123,0,125,0,124,0,184,0,161,0,127,0,126,0,128,0,129, +0,236,0,238,0,186,1,10,1,11,1,12,1,13,1,14,1,15,0,253,0,254,1,16,1,17,1,18, +1,19,0,255,1,0,1,20,1,21,1,22,1,1,1,23,1,24,1,25,1,26,1,27,1,28,1,29,1,30, +1,31,1,32,1,33,1,34,0,248,0,249,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,42,1, +43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,0,250,0,215,1,51,1,52,1,53,1,54,1,55, +1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,0,226,0,227,1,66,1,67,1, +68,1,69,1,70,1,71,1,72,1,73,1,74,1,75,1,76,1,77,1,78,1,79,1,80,0,176,0,177, +1,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,0,251,0,252,0,228,0,229, +1,91,1,92,1,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104, +1,105,1,106,1,107,1,108,1,109,1,110,1,111,1,112,0,187,1,113,1,114,1,115,1, +116,0,230,0,231,1,117,0,166,1,118,1,119,1,120,1,121,1,122,1,123,0,216,0,225, +1,124,0,219,0,220,0,221,0,224,0,217,0,223,1,125,1,126,1,127,1,128,1,129,1, +130,1,131,1,132,1,133,1,134,1,135,1,136,1,137,1,138,0,168,1,139,1,140,1,141, +1,142,1,143,1,144,1,145,1,146,1,147,1,148,1,149,1,150,1,151,1,152,1,153,1, +154,1,155,1,156,1,157,0,159,1,158,1,159,1,160,1,161,1,162,1,163,1,164,1,165, +1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1,174,1,175,0,151,1,176,1, +177,1,178,0,155,1,179,1,180,1,181,1,182,1,183,1,184,1,185,1,186,1,187,1,188, +1,189,1,190,1,191,1,192,1,193,1,194,1,195,1,196,1,197,1,198,1,199,1,200,1, +201,1,202,1,203,1,204,1,205,1,206,1,207,1,208,1,209,1,210,1,211,1,212,1,213, +1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,221,1,222,1,223,1,224,1,225,1, +226,1,227,1,228,1,229,1,230,1,231,1,232,1,233,1,234,1,235,1,236,1,237,1,238, +1,239,1,240,1,241,1,242,1,243,1,244,1,245,1,246,1,247,1,248,1,249,1,250,1, +251,1,252,1,253,1,254,1,255,2,0,2,1,2,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,2,10, +2,11,2,12,2,13,2,14,2,15,2,16,2,17,2,18,2,19,2,20,2,21,2,22,2,23,2,24,2,25, +2,26,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,0,178,0, +179,2,39,2,40,0,182,0,183,0,196,2,41,0,180,0,181,0,197,0,130,0,194,0,135, +0,171,0,198,2,42,2,43,0,190,0,191,2,44,2,45,2,46,2,47,0,247,2,48,2,49,2,50, +2,51,2,52,2,53,0,140,2,54,2,55,2,56,2,57,2,58,2,59,2,60,2,61,2,62,2,63,2, +64,2,65,2,66,0,152,2,67,0,154,0,153,0,239,0,165,0,146,2,68,2,69,0,156,0,167, +0,143,2,70,0,148,0,149,2,71,2,72,2,73,2,74,2,75,2,76,2,77,2,78,2,79,2,80, +2,81,2,82,2,83,2,84,2,85,2,86,2,87,2,88,2,89,2,90,2,91,2,92,2,93,2,94,2,95, +2,96,2,97,2,98,2,99,2,100,2,101,2,102,2,103,2,104,2,105,2,106,2,107,2,108, +2,109,2,110,2,111,2,112,2,113,2,114,2,115,2,116,2,117,2,118,2,119,2,120,2, +121,2,122,2,123,2,124,2,125,2,126,2,127,2,128,2,129,2,130,2,131,0,185,2,132, +2,133,2,134,2,135,2,136,2,137,2,138,2,139,2,140,2,141,2,142,2,143,2,144,2, +145,2,146,2,147,2,148,2,149,2,150,2,151,2,152,2,153,2,154,2,155,2,156,2,157, +2,158,2,159,2,160,2,161,2,162,2,163,2,164,2,165,2,166,2,167,7,117,110,105, +48,48,65,48,7,117,110,105,48,48,65,68,7,117,110,105,48,51,55,69,7,117,110, +105,48,48,66,50,7,117,110,105,48,48,66,51,7,117,110,105,48,48,66,53,7,117, +110,105,50,50,49,57,7,117,110,105,48,48,66,57,7,65,109,97,99,114,111,110, +7,97,109,97,99,114,111,110,6,65,98,114,101,118,101,6,97,98,114,101,118,101, +7,65,111,103,111,110,101,107,7,97,111,103,111,110,101,107,11,67,99,105,114, +99,117,109,102,108,101,120,11,99,99,105,114,99,117,109,102,108,101,120,10, +67,100,111,116,97,99,99,101,110,116,10,99,100,111,116,97,99,99,101,110,116, +6,68,99,97,114,111,110,6,100,99,97,114,111,110,6,68,99,114,111,97,116,7,69, +109,97,99,114,111,110,7,101,109,97,99,114,111,110,6,69,98,114,101,118,101, +6,101,98,114,101,118,101,10,69,100,111,116,97,99,99,101,110,116,10,101,100, +111,116,97,99,99,101,110,116,7,69,111,103,111,110,101,107,7,101,111,103,111, +110,101,107,6,69,99,97,114,111,110,6,101,99,97,114,111,110,11,71,99,105,114, +99,117,109,102,108,101,120,11,103,99,105,114,99,117,109,102,108,101,120,10, +71,100,111,116,97,99,99,101,110,116,10,103,100,111,116,97,99,99,101,110,116, +12,71,99,111,109,109,97,97,99,99,101,110,116,12,103,99,111,109,109,97,97, +99,99,101,110,116,11,72,99,105,114,99,117,109,102,108,101,120,11,104,99,105, +114,99,117,109,102,108,101,120,4,72,98,97,114,4,104,98,97,114,6,73,116,105, +108,100,101,6,105,116,105,108,100,101,7,73,109,97,99,114,111,110,7,105,109, +97,99,114,111,110,6,73,98,114,101,118,101,6,105,98,114,101,118,101,7,73,111, +103,111,110,101,107,7,105,111,103,111,110,101,107,2,73,74,2,105,106,11,74, +99,105,114,99,117,109,102,108,101,120,11,106,99,105,114,99,117,109,102,108, +101,120,12,75,99,111,109,109,97,97,99,99,101,110,116,12,107,99,111,109,109, +97,97,99,99,101,110,116,12,107,103,114,101,101,110,108,97,110,100,105,99, +6,76,97,99,117,116,101,6,108,97,99,117,116,101,12,76,99,111,109,109,97,97, +99,99,101,110,116,12,108,99,111,109,109,97,97,99,99,101,110,116,6,76,99,97, +114,111,110,6,108,99,97,114,111,110,4,76,100,111,116,4,108,100,111,116,6, +78,97,99,117,116,101,6,110,97,99,117,116,101,12,78,99,111,109,109,97,97,99, +99,101,110,116,12,110,99,111,109,109,97,97,99,99,101,110,116,6,78,99,97,114, +111,110,6,110,99,97,114,111,110,11,110,97,112,111,115,116,114,111,112,104, +101,3,69,110,103,3,101,110,103,7,79,109,97,99,114,111,110,7,111,109,97,99, +114,111,110,6,79,98,114,101,118,101,6,111,98,114,101,118,101,13,79,104,117, +110,103,97,114,117,109,108,97,117,116,13,111,104,117,110,103,97,114,117,109, +108,97,117,116,6,82,97,99,117,116,101,6,114,97,99,117,116,101,12,82,99,111, +109,109,97,97,99,99,101,110,116,12,114,99,111,109,109,97,97,99,99,101,110, +116,6,82,99,97,114,111,110,6,114,99,97,114,111,110,6,83,97,99,117,116,101, +6,115,97,99,117,116,101,11,83,99,105,114,99,117,109,102,108,101,120,11,115, +99,105,114,99,117,109,102,108,101,120,12,84,99,111,109,109,97,97,99,99,101, +110,116,12,116,99,111,109,109,97,97,99,99,101,110,116,6,84,99,97,114,111, +110,6,116,99,97,114,111,110,4,84,98,97,114,4,116,98,97,114,6,85,116,105,108, +100,101,6,117,116,105,108,100,101,7,85,109,97,99,114,111,110,7,117,109,97, +99,114,111,110,6,85,98,114,101,118,101,6,117,98,114,101,118,101,5,85,114, +105,110,103,5,117,114,105,110,103,13,85,104,117,110,103,97,114,117,109,108, +97,117,116,13,117,104,117,110,103,97,114,117,109,108,97,117,116,7,85,111, +103,111,110,101,107,7,117,111,103,111,110,101,107,11,87,99,105,114,99,117, +109,102,108,101,120,11,119,99,105,114,99,117,109,102,108,101,120,11,89,99, +105,114,99,117,109,102,108,101,120,11,121,99,105,114,99,117,109,102,108,101, +120,6,90,97,99,117,116,101,6,122,97,99,117,116,101,10,90,100,111,116,97,99, +99,101,110,116,10,122,100,111,116,97,99,99,101,110,116,5,108,111,110,103, +115,10,65,114,105,110,103,97,99,117,116,101,10,97,114,105,110,103,97,99,117, +116,101,7,65,69,97,99,117,116,101,7,97,101,97,99,117,116,101,11,79,115,108, +97,115,104,97,99,117,116,101,11,111,115,108,97,115,104,97,99,117,116,101, +7,117,110,105,48,50,67,57,5,116,111,110,111,115,13,100,105,101,114,101,115, +105,115,116,111,110,111,115,10,65,108,112,104,97,116,111,110,111,115,9,97, +110,111,116,101,108,101,105,97,12,69,112,115,105,108,111,110,116,111,110, +111,115,8,69,116,97,116,111,110,111,115,9,73,111,116,97,116,111,110,111,115, +12,79,109,105,99,114,111,110,116,111,110,111,115,12,85,112,115,105,108,111, +110,116,111,110,111,115,10,79,109,101,103,97,116,111,110,111,115,17,105,111, +116,97,100,105,101,114,101,115,105,115,116,111,110,111,115,5,65,108,112,104, +97,4,66,101,116,97,5,71,97,109,109,97,7,69,112,115,105,108,111,110,4,90,101, +116,97,3,69,116,97,5,84,104,101,116,97,4,73,111,116,97,5,75,97,112,112,97, +6,76,97,109,98,100,97,2,77,117,2,78,117,2,88,105,7,79,109,105,99,114,111, +110,2,80,105,3,82,104,111,5,83,105,103,109,97,3,84,97,117,7,85,112,115,105, +108,111,110,3,80,104,105,3,67,104,105,3,80,115,105,12,73,111,116,97,100,105, +101,114,101,115,105,115,15,85,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,10,97,108,112,104,97,116,111,110,111,115,12,101,112,115,105,108, +111,110,116,111,110,111,115,8,101,116,97,116,111,110,111,115,9,105,111,116, +97,116,111,110,111,115,20,117,112,115,105,108,111,110,100,105,101,114,101, +115,105,115,116,111,110,111,115,5,97,108,112,104,97,4,98,101,116,97,5,103, +97,109,109,97,5,100,101,108,116,97,7,101,112,115,105,108,111,110,4,122,101, +116,97,3,101,116,97,5,116,104,101,116,97,4,105,111,116,97,5,107,97,112,112, +97,6,108,97,109,98,100,97,2,110,117,2,120,105,7,111,109,105,99,114,111,110, +3,114,104,111,6,115,105,103,109,97,49,5,115,105,103,109,97,3,116,97,117,7, +117,112,115,105,108,111,110,3,112,104,105,3,99,104,105,3,112,115,105,5,111, +109,101,103,97,12,105,111,116,97,100,105,101,114,101,115,105,115,15,117,112, +115,105,108,111,110,100,105,101,114,101,115,105,115,12,111,109,105,99,114, +111,110,116,111,110,111,115,12,117,112,115,105,108,111,110,116,111,110,111, +115,10,111,109,101,103,97,116,111,110,111,115,9,97,102,105,105,49,48,48,50, +51,9,97,102,105,105,49,48,48,53,49,9,97,102,105,105,49,48,48,53,50,9,97,102, +105,105,49,48,48,53,51,9,97,102,105,105,49,48,48,53,52,9,97,102,105,105,49, +48,48,53,53,9,97,102,105,105,49,48,48,53,54,9,97,102,105,105,49,48,48,53, +55,9,97,102,105,105,49,48,48,53,56,9,97,102,105,105,49,48,48,53,57,9,97,102, +105,105,49,48,48,54,48,9,97,102,105,105,49,48,48,54,49,9,97,102,105,105,49, +48,48,54,50,9,97,102,105,105,49,48,49,52,53,9,97,102,105,105,49,48,48,49, +55,9,97,102,105,105,49,48,48,49,56,9,97,102,105,105,49,48,48,49,57,9,97,102, +105,105,49,48,48,50,48,9,97,102,105,105,49,48,48,50,49,9,97,102,105,105,49, +48,48,50,50,9,97,102,105,105,49,48,48,50,52,9,97,102,105,105,49,48,48,50, +53,9,97,102,105,105,49,48,48,50,54,9,97,102,105,105,49,48,48,50,55,9,97,102, +105,105,49,48,48,50,56,9,97,102,105,105,49,48,48,50,57,9,97,102,105,105,49, +48,48,51,48,9,97,102,105,105,49,48,48,51,49,9,97,102,105,105,49,48,48,51, +50,9,97,102,105,105,49,48,48,51,51,9,97,102,105,105,49,48,48,51,52,9,97,102, +105,105,49,48,48,51,53,9,97,102,105,105,49,48,48,51,54,9,97,102,105,105,49, +48,48,51,55,9,97,102,105,105,49,48,48,51,56,9,97,102,105,105,49,48,48,51, +57,9,97,102,105,105,49,48,48,52,48,9,97,102,105,105,49,48,48,52,49,9,97,102, +105,105,49,48,48,52,50,9,97,102,105,105,49,48,48,52,51,9,97,102,105,105,49, +48,48,52,52,9,97,102,105,105,49,48,48,52,53,9,97,102,105,105,49,48,48,52, +54,9,97,102,105,105,49,48,48,52,55,9,97,102,105,105,49,48,48,52,56,9,97,102, +105,105,49,48,48,52,57,9,97,102,105,105,49,48,48,54,53,9,97,102,105,105,49, +48,48,54,54,9,97,102,105,105,49,48,48,54,55,9,97,102,105,105,49,48,48,54, +56,9,97,102,105,105,49,48,48,54,57,9,97,102,105,105,49,48,48,55,48,9,97,102, +105,105,49,48,48,55,50,9,97,102,105,105,49,48,48,55,51,9,97,102,105,105,49, +48,48,55,52,9,97,102,105,105,49,48,48,55,53,9,97,102,105,105,49,48,48,55, +54,9,97,102,105,105,49,48,48,55,55,9,97,102,105,105,49,48,48,55,56,9,97,102, +105,105,49,48,48,55,57,9,97,102,105,105,49,48,48,56,48,9,97,102,105,105,49, +48,48,56,49,9,97,102,105,105,49,48,48,56,50,9,97,102,105,105,49,48,48,56, +51,9,97,102,105,105,49,48,48,56,52,9,97,102,105,105,49,48,48,56,53,9,97,102, +105,105,49,48,48,56,54,9,97,102,105,105,49,48,48,56,55,9,97,102,105,105,49, +48,48,56,56,9,97,102,105,105,49,48,48,56,57,9,97,102,105,105,49,48,48,57, +48,9,97,102,105,105,49,48,48,57,49,9,97,102,105,105,49,48,48,57,50,9,97,102, +105,105,49,48,48,57,51,9,97,102,105,105,49,48,48,57,52,9,97,102,105,105,49, +48,48,57,53,9,97,102,105,105,49,48,48,57,54,9,97,102,105,105,49,48,48,57, +55,9,97,102,105,105,49,48,48,55,49,9,97,102,105,105,49,48,48,57,57,9,97,102, +105,105,49,48,49,48,48,9,97,102,105,105,49,48,49,48,49,9,97,102,105,105,49, +48,49,48,50,9,97,102,105,105,49,48,49,48,51,9,97,102,105,105,49,48,49,48, +52,9,97,102,105,105,49,48,49,48,53,9,97,102,105,105,49,48,49,48,54,9,97,102, +105,105,49,48,49,48,55,9,97,102,105,105,49,48,49,48,56,9,97,102,105,105,49, +48,49,48,57,9,97,102,105,105,49,48,49,49,48,9,97,102,105,105,49,48,49,57, +51,9,97,102,105,105,49,48,48,53,48,9,97,102,105,105,49,48,48,57,56,6,87,103, +114,97,118,101,6,119,103,114,97,118,101,6,87,97,99,117,116,101,6,119,97,99, +117,116,101,9,87,100,105,101,114,101,115,105,115,9,119,100,105,101,114,101, +115,105,115,6,89,103,114,97,118,101,6,121,103,114,97,118,101,9,97,102,105, +105,48,48,50,48,56,13,117,110,100,101,114,115,99,111,114,101,100,98,108,13, +113,117,111,116,101,114,101,118,101,114,115,101,100,6,109,105,110,117,116, +101,6,115,101,99,111,110,100,9,101,120,99,108,97,109,100,98,108,7,117,110, +105,50,48,51,69,7,117,110,105,50,50,49,53,7,117,110,105,50,48,55,70,4,108, +105,114,97,6,112,101,115,101,116,97,4,69,117,114,111,9,97,102,105,105,54, +49,50,52,56,9,97,102,105,105,54,49,50,56,57,9,97,102,105,105,54,49,51,53, +50,7,117,110,105,50,49,50,54,9,101,115,116,105,109,97,116,101,100,9,111,110, +101,101,105,103,104,116,104,12,116,104,114,101,101,101,105,103,104,116,104, +115,11,102,105,118,101,101,105,103,104,116,104,115,12,115,101,118,101,110, +101,105,103,104,116,104,115,9,97,114,114,111,119,108,101,102,116,7,97,114, +114,111,119,117,112,10,97,114,114,111,119,114,105,103,104,116,9,97,114,114, +111,119,100,111,119,110,9,97,114,114,111,119,98,111,116,104,9,97,114,114, +111,119,117,112,100,110,12,97,114,114,111,119,117,112,100,110,98,115,101, +7,117,110,105,50,50,48,54,10,111,114,116,104,111,103,111,110,97,108,12,105, +110,116,101,114,115,101,99,116,105,111,110,11,101,113,117,105,118,97,108, +101,110,99,101,5,104,111,117,115,101,13,114,101,118,108,111,103,105,99,97, +108,110,111,116,10,105,110,116,101,103,114,97,108,116,112,10,105,110,116, +101,103,114,97,108,98,116,8,83,70,49,48,48,48,48,48,8,83,70,49,49,48,48,48, +48,8,83,70,48,49,48,48,48,48,8,83,70,48,51,48,48,48,48,8,83,70,48,50,48,48, +48,48,8,83,70,48,52,48,48,48,48,8,83,70,48,56,48,48,48,48,8,83,70,48,57,48, +48,48,48,8,83,70,48,54,48,48,48,48,8,83,70,48,55,48,48,48,48,8,83,70,48,53, +48,48,48,48,8,83,70,52,51,48,48,48,48,8,83,70,50,52,48,48,48,48,8,83,70,53, +49,48,48,48,48,8,83,70,53,50,48,48,48,48,8,83,70,51,57,48,48,48,48,8,83,70, +50,50,48,48,48,48,8,83,70,50,49,48,48,48,48,8,83,70,50,53,48,48,48,48,8,83, +70,53,48,48,48,48,48,8,83,70,52,57,48,48,48,48,8,83,70,51,56,48,48,48,48, +8,83,70,50,56,48,48,48,48,8,83,70,50,55,48,48,48,48,8,83,70,50,54,48,48,48, +48,8,83,70,51,54,48,48,48,48,8,83,70,51,55,48,48,48,48,8,83,70,52,50,48,48, +48,48,8,83,70,49,57,48,48,48,48,8,83,70,50,48,48,48,48,48,8,83,70,50,51,48, +48,48,48,8,83,70,52,55,48,48,48,48,8,83,70,52,56,48,48,48,48,8,83,70,52,49, +48,48,48,48,8,83,70,52,53,48,48,48,48,8,83,70,52,54,48,48,48,48,8,83,70,52, +48,48,48,48,48,8,83,70,53,52,48,48,48,48,8,83,70,53,51,48,48,48,48,8,83,70, +52,52,48,48,48,48,7,117,112,98,108,111,99,107,7,100,110,98,108,111,99,107, +5,98,108,111,99,107,7,108,102,98,108,111,99,107,7,114,116,98,108,111,99,107, +7,108,116,115,104,97,100,101,5,115,104,97,100,101,7,100,107,115,104,97,100, +101,9,102,105,108,108,101,100,98,111,120,6,72,50,50,48,55,51,6,72,49,56,53, +52,51,6,72,49,56,53,53,49,10,102,105,108,108,101,100,114,101,99,116,7,116, +114,105,97,103,117,112,7,116,114,105,97,103,114,116,7,116,114,105,97,103, +100,110,7,116,114,105,97,103,108,102,6,99,105,114,99,108,101,6,72,49,56,53, +51,51,9,105,110,118,98,117,108,108,101,116,9,105,110,118,99,105,114,99,108, +101,10,111,112,101,110,98,117,108,108,101,116,9,115,109,105,108,101,102,97, +99,101,12,105,110,118,115,109,105,108,101,102,97,99,101,3,115,117,110,6,102, +101,109,97,108,101,4,109,97,108,101,5,115,112,97,100,101,4,99,108,117,98, +5,104,101,97,114,116,7,100,105,97,109,111,110,100,11,109,117,115,105,99,97, +108,110,111,116,101,14,109,117,115,105,99,97,108,110,111,116,101,100,98,108, +7,117,110,105,70,66,48,49,7,117,110,105,70,66,48,50,7,117,110,105,70,48,48, +53,6,109,105,100,100,111,116,7,117,110,105,70,48,48,52,7,117,110,105,50,48, +55,52,7,117,110,105,50,48,55,53,7,117,110,105,50,48,55,55,7,117,110,105,50, +48,55,56,8,103,108,121,112,104,53,55,49,8,103,108,121,112,104,53,55,50,8, +103,108,121,112,104,53,55,51,8,103,108,121,112,104,53,55,52,8,103,108,121, +112,104,53,55,53,8,103,108,121,112,104,53,55,54,8,103,108,121,112,104,53, +55,55,8,103,108,121,112,104,53,55,56,8,103,108,121,112,104,53,55,57,8,103, +108,121,112,104,53,56,48,8,103,108,121,112,104,53,56,49,0,0,0,0,0,0,3,0,8, +0,2,0,17,0,1,255,255,0,3,0,1,0,0,0,14,0,0,0,24,0,0,0,0,0,2,0,1,0,1,2,155, +0,1,0,4,0,0,0,2,0,0,0,1,0,0,0,10,0,76,0,78,0,4,68,70,76,84,0,26,99,121,114, +108,0,36,103,114,101,107,0,46,108,97,116,110,0,56,0,4,0,0,0,0,255,255,0,0, +0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0,4,0,0,0,0,255,255,0,0,0, +0,0,0,0,1,0,0,0,10,0,84,0,98,0,4,68,70,76,84,0,26,99,121,114,108,0,38,103, +114,101,107,0,50,108,97,116,110,0,62,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0, +0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0,0,0,4,0,0,0,0,255,255,0,1,0, +0,0,1,107,101,114,110,0,8,0,0,0,1,0,0,0,1,0,4,0,2,0,0,0,1,0,8,0,1,15,112, +0,4,0,0,0,105,0,220,1,6,1,12,1,50,1,64,1,94,1,112,1,130,1,204,2,2,2,52,2, +114,2,124,2,138,2,148,2,138,2,158,2,196,2,202,3,28,3,38,3,84,3,118,3,144, +3,166,3,228,3,254,4,20,4,46,4,56,4,190,5,44,5,58,3,28,5,100,5,186,5,204,6, +22,6,28,6,82,6,136,5,186,6,178,6,216,6,230,5,186,7,16,5,186,5,186,5,186,7, +62,7,84,7,90,7,96,7,166,7,224,8,54,8,168,8,194,8,204,8,246,9,24,9,46,9,60, +9,98,9,144,9,242,10,48,10,174,11,72,11,106,11,136,11,146,11,156,11,166,11, +224,12,14,12,64,12,82,12,144,12,210,12,252,13,6,13,44,13,62,13,108,13,150, +13,160,13,174,13,208,13,242,14,4,14,46,14,112,14,142,14,180,14,198,14,212, +14,222,15,0,15,30,15,40,15,70,15,76,15,90,0,10,0,36,255,143,0,55,255,219, +0,60,255,219,1,82,255,143,1,91,255,143,1,94,255,143,1,101,255,143,1,109,255, +219,1,110,255,219,1,116,255,219,0,1,0,20,255,104,0,9,0,3,255,143,0,55,255, +104,0,57,255,104,0,58,255,180,0,60,255,104,0,89,255,219,0,90,255,219,0,92, +255,219,2,3,255,104,0,3,0,15,255,29,0,17,255,29,0,36,255,143,0,7,0,3,255, +180,0,55,255,104,0,57,255,104,0,58,255,104,0,60,255,104,0,92,255,180,2,3, +255,143,0,4,0,3,255,219,0,15,254,248,0,17,254,248,0,36,255,104,0,4,0,55,255, +219,0,57,255,219,0,58,255,219,0,60,255,219,0,18,0,3,255,219,0,15,255,29,0, +16,255,143,0,17,255,29,0,29,255,29,0,30,255,29,0,36,255,104,0,50,255,219, +0,68,255,29,0,70,255,29,0,72,255,29,0,76,255,180,0,82,255,29,0,85,255,180, +0,86,255,29,0,88,255,180,0,90,255,143,0,92,255,143,0,13,0,15,255,68,0,16, +255,143,0,17,255,68,0,29,255,180,0,30,255,180,0,36,255,104,0,68,255,104,0, +72,255,143,0,76,255,219,0,82,255,143,0,85,255,180,0,88,255,180,0,92,255,180, +0,12,0,15,255,143,0,16,255,219,0,17,255,143,0,29,255,219,0,30,255,219,0,36, +255,180,0,68,255,180,0,72,255,219,0,82,255,219,0,85,255,219,0,88,255,219, +0,92,255,238,0,15,0,3,255,219,0,15,254,248,0,16,255,68,0,17,254,248,0,29, +255,143,0,30,255,123,0,36,255,104,0,68,255,104,0,72,255,68,0,76,255,180,0, +82,255,68,0,83,255,104,0,84,255,68,0,88,255,143,0,89,255,143,0,2,0,73,255, +219,2,3,0,37,0,3,0,15,255,143,0,17,255,143,2,3,0,76,0,2,0,15,255,104,0,17, +255,104,0,2,0,15,255,143,0,17,255,143,0,9,1,98,255,213,1,105,255,213,1,109, +255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124,255,219,1,134,255, +219,1,144,255,219,0,1,1,110,255,190,0,20,1,90,0,170,1,91,255,104,1,94,255, +104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255,158, +1,119,255,104,1,120,255,180,1,122,255,70,1,128,255,104,1,130,255,180,1,131, +255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1, +149,255,70,0,2,1,110,255,209,1,116,255,209,0,11,0,3,255,143,1,98,255,213, +1,105,255,213,1,109,255,104,1,110,255,104,1,111,255,197,1,116,255,104,1,124, +255,219,1,134,255,219,1,144,255,219,2,3,255,104,0,8,0,15,255,31,0,17,255, +31,1,90,0,164,1,91,255,68,1,94,255,68,1,101,255,68,1,130,255,168,1,147,0, +88,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,137,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,219,1,101,255,219,1,110,255,190,1, +116,255,190,0,15,1,98,255,193,1,105,255,193,1,111,255,143,1,117,255,231,1, +122,255,231,1,125,255,231,1,127,255,231,1,129,255,231,1,135,255,231,1,136, +255,231,1,140,255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255, +231,0,6,0,3,255,143,1,98,255,213,1,105,255,213,1,109,255,104,1,110,255,104, +1,116,255,104,0,5,1,91,255,219,1,94,255,213,1,101,255,219,1,110,255,190,1, +116,255,190,0,6,0,3,255,219,0,15,254,250,0,17,254,250,1,91,255,104,1,94,255, +104,1,101,255,104,0,2,1,137,255,158,1,141,255,158,0,33,0,3,255,219,0,15,255, +31,0,17,255,31,0,29,255,31,0,30,255,31,1,90,0,188,1,91,255,104,1,94,255,104, +1,98,255,219,1,101,255,104,1,105,255,219,1,111,255,219,1,114,255,219,1,117, +255,31,1,118,255,31,1,121,255,78,1,122,255,31,1,124,255,78,1,126,255,31,1, +128,255,106,1,130,255,180,1,133,255,106,1,134,255,143,1,136,255,31,1,140, +255,31,1,142,255,80,1,143,255,31,1,144,255,143,1,145,255,106,1,147,0,188, +1,148,255,78,1,149,255,31,1,150,255,78,0,27,0,3,255,219,0,15,254,250,0,16, +255,70,0,17,254,250,0,29,255,143,0,30,255,143,1,90,0,188,1,91,255,104,1,94, +255,104,1,98,255,141,1,101,255,104,1,105,255,141,1,111,255,141,1,114,255, +158,1,119,255,104,1,120,255,180,1,122,255,70,1,124,255,158,1,128,255,104, +1,130,255,180,1,131,255,104,1,133,255,104,1,136,255,70,1,140,255,70,1,143, +255,70,1,147,0,121,1,149,255,70,0,3,1,91,255,197,1,110,255,190,1,116,255, +190,0,10,1,117,255,178,1,122,255,178,1,125,255,178,1,129,255,217,1,136,255, +178,1,140,255,178,1,143,255,178,1,146,255,178,1,149,255,178,1,151,255,178, +0,21,0,3,255,219,1,90,0,170,1,91,255,104,1,94,255,104,1,98,255,141,1,101, +255,104,1,105,255,141,1,111,255,141,1,114,255,158,1,119,255,104,1,120,255, +180,1,122,255,70,1,128,255,104,1,130,255,180,1,131,255,104,1,133,255,104, +1,136,255,70,1,140,255,70,1,143,255,70,1,147,0,98,1,149,255,70,0,4,1,132, +255,217,1,137,255,227,1,141,255,227,1,144,255,201,0,18,1,117,255,119,1,119, +255,219,1,122,255,119,1,124,255,170,1,125,255,180,1,128,255,219,1,129,255, +158,1,130,255,219,1,131,255,219,1,134,255,170,1,136,255,119,1,137,255,170, +1,140,255,119,1,141,255,170,1,143,255,119,1,146,255,119,1,149,255,119,1,151, +255,119,0,1,1,132,255,217,0,13,1,117,255,231,1,122,255,231,1,125,255,231, +1,127,255,231,1,129,255,231,1,135,255,231,1,136,255,231,1,139,255,231,1,140, +255,231,1,143,255,231,1,146,255,231,1,149,255,231,1,151,255,231,0,13,1,117, +255,225,1,122,255,225,1,125,255,225,1,135,255,225,1,136,255,225,1,139,255, +209,1,140,255,225,1,142,255,207,1,143,255,219,1,146,255,225,1,149,255,225, +1,150,255,207,1,151,255,225,0,10,1,117,255,201,1,122,255,201,1,125,255,201, +1,127,255,201,1,135,255,201,1,136,255,201,1,139,255,201,1,140,255,201,1,143, +255,201,1,149,255,201,0,9,1,117,255,227,1,122,255,227,1,127,255,227,1,136, +255,227,1,139,255,227,1,140,255,227,1,143,255,227,1,146,255,227,1,151,255, +227,0,3,1,132,255,217,1,137,255,227,1,141,255,227,0,10,1,117,255,227,1,122, +255,227,1,125,255,227,1,127,255,227,1,136,255,227,1,139,255,227,1,140,255, +227,1,143,255,227,1,146,255,227,1,151,255,227,0,11,1,117,255,201,1,122,255, +201,1,125,255,201,1,127,255,201,1,136,255,201,1,139,255,201,1,140,255,201, +1,143,255,201,1,146,255,201,1,149,255,201,1,151,255,201,0,5,0,15,255,6,0, +17,255,6,0,108,255,119,0,123,255,119,1,255,255,211,0,1,2,3,255,96,0,1,2,3, +255,119,0,17,1,170,0,68,1,173,255,233,1,177,0,45,1,180,255,211,1,181,255, +233,1,183,255,211,1,184,255,96,1,185,255,166,1,186,255,188,1,189,255,96,1, +195,255,211,1,198,0,23,1,216,255,211,1,217,255,233,1,218,0,23,1,227,0,45, +2,3,255,141,0,14,1,166,255,211,1,173,255,233,1,180,255,233,1,183,255,233, +1,184,255,164,1,185,255,209,1,186,255,233,1,187,255,211,1,189,255,164,1,192, +255,188,1,195,255,233,1,197,255,233,1,209,255,233,1,217,255,211,0,21,1,166, +255,188,1,170,255,211,1,172,255,211,1,173,255,188,1,177,255,233,1,180,255, +188,1,183,255,188,1,184,255,119,1,185,255,188,1,186,255,188,1,187,255,166, +1,189,255,164,1,192,255,141,1,197,255,188,1,202,255,233,1,210,255,233,1,216, +255,188,1,217,255,233,1,219,255,233,1,221,255,188,1,229,255,233,0,28,0,15, +255,6,0,17,255,6,0,108,255,119,0,123,255,119,1,166,255,119,1,170,255,119, +1,173,255,211,1,177,255,141,1,178,255,209,1,180,255,141,1,183,255,164,1,197, +255,188,1,198,255,141,1,200,255,141,1,202,255,119,1,203,255,119,1,206,255, +141,1,209,255,141,1,210,255,141,1,211,255,141,1,212,255,119,1,214,255,141, +1,217,255,119,1,225,255,141,1,226,255,141,1,228,255,141,1,229,255,119,1,255, +255,211,0,6,1,185,0,23,1,186,255,211,1,189,255,186,1,205,0,68,1,212,0,23, +1,217,0,45,0,2,1,173,255,211,1,215,255,233,0,10,1,173,255,233,1,180,255,211, +1,183,255,233,1,184,0,23,1,185,0,45,1,192,0,45,1,198,0,23,1,203,255,231,1, +212,255,233,1,217,255,233,0,8,1,177,255,233,1,180,255,233,1,183,255,233,1, +184,255,211,1,185,255,233,1,186,255,233,1,189,255,211,1,197,255,233,0,5,1, +173,255,233,1,180,255,233,1,183,255,233,1,185,0,23,1,186,255,186,0,3,1,186, +255,233,1,199,0,23,1,217,0,23,0,9,1,186,255,233,1,189,255,233,1,198,0,23, +1,203,0,23,1,212,0,23,1,215,0,23,1,217,0,23,1,221,255,233,1,227,0,23,0,11, +1,166,255,211,1,170,255,211,1,172,255,211,1,177,255,233,1,185,255,211,1,187, +255,164,1,189,255,211,1,197,255,211,1,202,255,211,1,209,255,233,1,219,255, +233,0,24,0,15,254,125,0,17,254,125,0,29,255,211,0,30,255,211,0,123,255,141, +1,166,255,119,1,170,255,119,1,172,255,233,1,173,255,211,1,177,255,141,1,178, +255,233,1,180,255,211,1,183,255,233,1,184,255,164,1,185,255,211,1,186,255, +233,1,187,255,164,1,197,255,211,1,198,255,188,1,202,255,96,1,203,255,166, +1,212,255,166,1,227,255,211,1,229,255,188,0,15,1,166,255,211,1,170,255,211, +1,173,255,233,1,177,255,188,1,178,255,233,1,180,255,211,1,184,255,188,1,185, +255,188,1,187,255,141,1,189,255,188,1,192,255,186,1,195,255,233,1,198,0,23, +1,204,0,45,1,221,255,233,0,31,0,15,255,29,0,17,255,29,0,108,255,166,0,123, +255,166,1,166,255,188,1,170,255,188,1,172,0,23,1,173,255,233,1,177,255,211, +1,180,255,164,1,186,255,188,1,197,255,211,1,198,255,164,1,200,255,166,1,203, +255,141,1,206,255,166,1,208,255,166,1,209,255,164,1,210,255,166,1,212,255, +96,1,213,255,166,1,214,255,141,1,215,255,141,1,217,255,141,1,219,255,166, +1,223,255,166,1,225,255,166,1,226,255,166,1,228,255,166,1,229,255,141,1,255, +255,211,0,38,0,15,254,240,0,17,254,240,0,29,255,211,0,30,255,211,0,108,255, +166,0,123,255,164,1,166,255,119,1,170,255,164,1,173,255,211,1,177,255,188, +1,180,255,188,1,186,255,188,1,195,255,211,1,197,255,211,1,199,255,211,1,200, +255,141,1,201,255,164,1,202,255,96,1,203,255,119,1,204,255,188,1,205,255, +141,1,206,255,164,1,207,255,188,1,208,255,164,1,209,255,119,1,210,255,164, +1,211,255,164,1,212,255,119,1,213,255,164,1,214,255,164,1,215,255,119,1,219, +255,164,1,220,255,164,1,222,255,164,1,223,255,164,1,228,255,164,1,229,255, +119,1,255,255,233,0,8,1,166,255,211,1,170,255,188,1,177,255,188,1,184,255, +141,1,185,255,164,1,189,255,211,1,197,255,186,1,209,255,188,0,7,1,173,255, +211,1,180,255,188,1,183,255,188,1,186,255,188,1,195,255,186,1,212,255,233, +1,217,255,211,0,2,1,180,255,211,1,198,0,45,0,2,1,198,0,23,1,217,0,45,0,2, +1,197,255,188,2,3,255,119,0,14,1,166,255,211,1,170,255,211,1,172,255,188, +1,173,255,233,1,177,255,186,1,178,255,211,1,180,255,211,1,183,255,211,1,184, +255,51,1,187,255,164,1,189,255,96,1,195,255,233,1,197,255,164,2,3,255,96, +0,11,1,170,255,188,1,172,255,231,1,173,255,233,1,177,255,188,1,187,255,186, +1,197,255,211,1,202,255,188,1,204,0,23,1,209,255,188,1,210,255,233,1,229, +255,233,0,12,1,166,255,188,1,170,255,166,1,172,255,211,1,177,255,164,1,180, +255,233,1,183,255,233,1,184,255,141,1,187,255,164,1,189,255,188,1,202,255, +164,1,209,255,164,1,210,255,233,0,4,1,205,255,233,1,216,255,211,1,217,255, +233,1,221,255,211,0,15,1,198,255,209,1,202,255,164,1,203,255,233,1,204,255, +233,1,205,255,211,1,209,255,164,1,210,255,211,1,215,255,233,1,217,255,211, +1,218,255,233,1,219,255,188,1,221,255,188,1,224,255,188,1,227,255,233,1,229, +255,211,0,16,1,198,255,233,1,199,255,233,1,202,255,233,1,203,255,233,1,204, +255,233,1,205,255,233,1,209,255,209,1,210,255,233,1,212,255,233,1,215,255, +233,1,216,255,211,1,217,255,211,1,218,255,233,1,221,255,164,1,224,255,188, +1,229,255,233,0,10,0,15,255,6,0,17,255,6,1,198,255,211,1,202,255,164,1,203, +255,211,1,205,255,233,1,209,255,211,1,212,255,211,1,215,255,211,1,229,255, +233,0,2,1,224,255,211,1,227,0,23,0,9,1,199,255,233,1,202,255,211,1,204,255, +233,1,205,255,211,1,209,255,188,1,216,255,188,1,217,255,233,1,219,255,211, +1,221,255,188,0,4,1,199,0,23,1,217,0,23,1,221,255,233,1,224,0,45,0,11,1,199, +255,233,1,202,255,211,1,203,255,233,1,205,255,233,1,209,255,233,1,212,255, +233,1,215,255,233,1,217,255,233,1,218,255,233,1,221,255,188,1,224,255,211, +0,10,1,198,0,45,1,199,0,45,1,203,0,23,1,205,0,23,1,209,0,23,1,212,0,23,1, +215,0,23,1,216,0,23,1,217,0,23,1,227,0,23,0,2,1,212,0,23,1,221,255,211,0, +3,1,199,255,233,1,205,255,233,1,217,0,23,0,8,1,202,255,211,1,204,255,233, +1,205,255,233,1,209,255,211,1,216,255,211,1,217,255,233,1,219,255,233,1,221, +255,211,0,8,1,202,255,209,1,205,255,233,1,209,255,186,1,216,255,211,1,217, +255,233,1,219,255,233,1,221,255,211,1,229,255,233,0,4,1,204,0,23,1,212,0, +23,1,221,255,233,1,227,0,23,0,10,0,15,255,29,0,17,255,29,1,198,255,233,1, +202,255,188,1,203,255,233,1,204,0,68,1,209,255,211,1,212,255,233,1,215,255, +233,1,217,0,23,0,16,0,15,255,51,0,17,255,51,0,123,0,23,1,198,255,233,1,199, +0,23,1,202,255,188,1,203,255,233,1,204,0,23,1,209,255,211,1,210,255,233,1, +212,255,231,1,214,255,233,1,215,255,233,1,218,255,233,1,227,255,233,1,229, +255,233,0,7,1,199,255,233,1,202,255,211,1,209,255,211,1,216,255,211,1,217, +255,233,1,221,255,211,1,229,255,233,0,9,1,198,255,233,1,199,255,233,1,203, +255,233,1,205,255,233,1,212,255,233,1,215,255,233,1,216,255,233,1,218,255, +233,1,221,255,211,0,4,1,203,255,233,1,205,255,233,1,212,255,233,1,215,255, +233,0,3,1,203,255,233,1,212,255,233,1,217,0,23,0,2,1,216,255,96,1,221,255, +119,0,8,1,202,255,211,1,203,0,23,1,205,255,233,1,209,255,211,1,212,0,23,1, +216,255,211,1,219,255,233,1,229,255,233,0,7,1,202,255,211,1,204,255,233,1, +209,255,211,1,210,255,233,1,216,255,211,1,219,255,233,1,221,255,211,0,2,0, +15,255,51,0,17,255,51,0,7,0,15,255,6,0,17,255,6,0,29,255,211,0,30,255,211, +0,108,255,96,0,123,255,96,1,255,255,211,0,1,2,2,255,219,0,3,0,3,255,180,0, +86,255,219,2,3,255,219,0,5,1,153,255,96,1,162,255,96,1,184,255,96,1,189,255, +188,1,192,255,188,0,1,0,105,0,3,0,20,0,36,0,41,0,47,0,51,0,53,0,55,0,57,0, +58,0,60,0,73,0,85,0,89,0,90,0,92,1,82,1,87,1,88,1,89,1,91,1,93,1,94,1,98, +1,100,1,101,1,105,1,107,1,108,1,109,1,110,1,111,1,113,1,114,1,116,1,125,1, +127,1,129,1,131,1,132,1,135,1,136,1,137,1,138,1,141,1,143,1,144,1,146,1,149, +1,151,1,154,1,160,1,161,1,166,1,167,1,168,1,169,1,170,1,171,1,172,1,173,1, +176,1,177,1,178,1,180,1,182,1,183,1,184,1,185,1,186,1,187,1,188,1,191,1,192, +1,194,1,195,1,196,1,198,1,199,1,200,1,201,1,202,1,203,1,204,1,205,1,208,1, +209,1,210,1,212,1,214,1,215,1,216,1,217,1,218,1,219,1,220,1,223,1,226,1,227, +1,228,1,242,1,244,2,2,2,3,2,8,0,0,0,1,0,0,0,0,199,254,176,223,0,0,0,0,191, +26,255,128,0,0,0,0,196,4,48,20,}; +#endif diff --git a/contrib/media/updf/include/GPL_stuff.h b/contrib/media/updf/include/GPL_stuff.h new file mode 100644 index 0000000000..47e4ef16e8 --- /dev/null +++ b/contrib/media/updf/include/GPL_stuff.h @@ -0,0 +1,23 @@ +#ifndef __GPL_stuff_h__ +#define __GPL_stuff_h__ + +#define GPL_base_text \ +"Yacas is Free Software--Free as in Freedom--so you can redistribute Yacas or\n" \ +"modify it under certain conditions. Yacas comes with ABSOLUTELY NO WARRANTY.\n" \ +"See the GNU General Public License (GPL) for the full conditions.\n" + +#define Yacas_Web_info \ +"See http://yacas.sf.net for more information and documentation on Yacas.\n" + +#define Yacas_help_info \ +"Type ?license or ?licence to see the GPL; type ?warranty for warranty info.\n" + +// This is the full text for systems where the online help (?blah) is available +#define GPL_blurb GPL_base_text Yacas_help_info Yacas_Web_info "\n" + +// This is for systems where online help (?blah) is normally not available +#define GPL_blurb_nohelp GPL_base_text Yacas_Web_info "\n" + + + +#endif diff --git a/contrib/media/updf/include/algorithm b/contrib/media/updf/include/algorithm new file mode 100644 index 0000000000..4fdd0c62b7 --- /dev/null +++ b/contrib/media/updf/include/algorithm @@ -0,0 +1,17 @@ +#ifndef _ALGORITHM_INCLUDED +#define _ALGORITHM_INCLUDED +#include +#include +namespace std +{ + static bool (*__cmpfn)(const void* elem1, const void* elem2); + static int __compare(const void* elem1, const void* elem2) + {return __cmpfn(elem1,elem2)?-1:1;} + template + void sort(T* first, T* last, Pred pr) + { + __cmpfn=(bool(*)(const void*,const void*))pr; + qsort(first,last-first,sizeof(*first),&__compare); + } +} +#endif diff --git a/contrib/media/updf/include/all.h b/contrib/media/updf/include/all.h new file mode 100644 index 0000000000..4d4a79e3b5 --- /dev/null +++ b/contrib/media/updf/include/all.h @@ -0,0 +1,40 @@ + +/// =========================================================== + +#include "kolibri.h" +#include "stdlib.h" +#include "string.h" + +#include "globals.h" +#include "prototypes.h" + +#include "console.c" + +#include "cmd_about.c" +#include "cmd_help.c" +#include "cmd_ver.c" +#include "cmd_pwd.c" +#include "cmd_ls.c" +#include "cmd_ps.c" +#include "cmd_kill.c" +#include "cmd_echo.c" +#include "cmd_date.c" +#include "cmd_exit.c" +#include "cmd_cd.c" +#include "cmd_free.c" +#include "cmd_reboot.c" +#include "cmd_mkdir.c" +#include "cmd_rmdir.c" +#include "cmd_rm.c" +#include "cmd_touch.c" +#include "cmd_alias.c" +#include "cmd_more.c" +#include "cmd_clear.c" + +#include "module_command.c" +#include "module_program.c" +#include "module_script.c" +#include "module_executable.c" +#include "module_alias.c" + +/// =========================================================== diff --git a/contrib/media/updf/include/ansidecl.h b/contrib/media/updf/include/ansidecl.h new file mode 100644 index 0000000000..4ef6db80b7 --- /dev/null +++ b/contrib/media/updf/include/ansidecl.h @@ -0,0 +1,251 @@ +/* ANSI and traditional C compatability macros + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* ANSI and traditional C compatibility macros + + ANSI C is assumed if __STDC__ is #defined. + + Macro ANSI C definition Traditional C definition + ----- ---- - ---------- ----------- - ---------- + PTR `void *' `char *' + LONG_DOUBLE `long double' `double' + VOLATILE `volatile' `' + SIGNED `signed' `' + PTRCONST `void *const' `char *' + ANSI_PROTOTYPES 1 not defined + + CONST is also defined, but is obsolete. Just use const. + + obsolete -- DEFUN (name, arglist, args) + + Defines function NAME. + + ARGLIST lists the arguments, separated by commas and enclosed in + parentheses. ARGLIST becomes the argument list in traditional C. + + ARGS list the arguments with their types. It becomes a prototype in + ANSI C, and the type declarations in traditional C. Arguments should + be separated with `AND'. For functions with a variable number of + arguments, the last thing listed should be `DOTS'. + + obsolete -- DEFUN_VOID (name) + + Defines a function NAME, which takes no arguments. + + obsolete -- EXFUN (name, (prototype)) -- obsolete. + + Replaced by PARAMS. Do not use; will disappear someday soon. + Was used in external function declarations. + In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in + parentheses). In traditional C it is `NAME()'. + For a function that takes no arguments, PROTOTYPE should be `(void)'. + + obsolete -- PROTO (type, name, (prototype) -- obsolete. + + This one has also been replaced by PARAMS. Do not use. + + PARAMS ((args)) + + We could use the EXFUN macro to handle prototype declarations, but + the name is misleading and the result is ugly. So we just define a + simple macro to handle the parameter lists, as in: + + static int foo PARAMS ((int, char)); + + This produces: `static int foo();' or `static int foo (int, char);' + + EXFUN would have done it like this: + + static int EXFUN (foo, (int, char)); + + but the function is not external...and it's hard to visually parse + the function name out of the mess. EXFUN should be considered + obsolete; new code should be written to use PARAMS. + + DOTS is also obsolete. + + Examples: + + extern int printf PARAMS ((const char *format, ...)); +*/ + +#ifndef _ANSIDECL_H + +#define _ANSIDECL_H 1 + + +/* Every source file includes this file, + so they will all get the switch for lint. */ +/* LINTLIBRARY */ + + +#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) +/* All known AIX compilers implement these things (but don't always + define __STDC__). The RISC/OS MIPS compiler defines these things + in SVR4 mode, but does not define __STDC__. */ + +#define PTR void * +#define PTRCONST void *CONST +#define LONG_DOUBLE long double + +#ifndef IN_GCC +#define AND , +#define NOARGS void +#define VOLATILE volatile +#define SIGNED signed +#endif /* ! IN_GCC */ + +#define PARAMS(paramlist) paramlist +#define ANSI_PROTOTYPES 1 + +#define VPARAMS(ARGS) ARGS +#define VA_START(va_list,var) va_start(va_list,var) + +/* These are obsolete. Do not use. */ +#ifndef IN_GCC +#define CONST const +#define DOTS , ... +#define PROTO(type, name, arglist) type name arglist +#define EXFUN(name, proto) name proto +#define DEFUN(name, arglist, args) name(args) +#define DEFUN_VOID(name) name(void) +#endif /* ! IN_GCC */ + +#else /* Not ANSI C. */ + +#define PTR char * +#define PTRCONST PTR +#define LONG_DOUBLE double + +#ifndef IN_GCC +#define AND ; +#define NOARGS +#define VOLATILE +#define SIGNED +#endif /* !IN_GCC */ + +#ifndef const /* some systems define it in header files for non-ansi mode */ +#define const +#endif + +#define PARAMS(paramlist) () + +#define VPARAMS(ARGS) (va_alist) va_dcl +#define VA_START(va_list,var) va_start(va_list) + +/* These are obsolete. Do not use. */ +#ifndef IN_GCC +#define CONST +#define DOTS +#define PROTO(type, name, arglist) type name () +#define EXFUN(name, proto) name() +#define DEFUN(name, arglist, args) name arglist args; +#define DEFUN_VOID(name) name() +#endif /* ! IN_GCC */ + +#endif /* ANSI C. */ + +/* Using MACRO(x,y) in cpp #if conditionals does not work with some + older preprocessors. Thus we can't define something like this: + +#define HAVE_GCC_VERSION(MAJOR, MINOR) \ + (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) + +and then test "#if HAVE_GCC_VERSION(2,7)". + +So instead we use the macro below and test it against specific values. */ + +/* This macro simplifies testing whether we are using gcc, and if it + is of a particular minimum version. (Both major & minor numbers are + significant.) This macro will evaluate to 0 if we are not using + gcc at all. */ +#ifndef GCC_VERSION +#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) +#endif /* GCC_VERSION */ + +/* Define macros for some gcc attributes. This permits us to use the + macros freely, and know that they will come into play for the + version of gcc in which they are supported. */ + +#if (GCC_VERSION < 2007) +# define __attribute__(x) +#endif + +/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ +#ifndef ATTRIBUTE_MALLOC +# if (GCC_VERSION >= 2096) +# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define ATTRIBUTE_MALLOC +# endif /* GNUC >= 2.96 */ +#endif /* ATTRIBUTE_MALLOC */ + +/* Attributes on labels were valid as of gcc 2.93. */ +#ifndef ATTRIBUTE_UNUSED_LABEL +# if (GCC_VERSION >= 2093) +# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED +# else +# define ATTRIBUTE_UNUSED_LABEL +# endif /* GNUC >= 2.93 */ +#endif /* ATTRIBUTE_UNUSED_LABEL */ + +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif /* ATTRIBUTE_UNUSED */ + +#ifndef ATTRIBUTE_NORETURN +#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif /* ATTRIBUTE_NORETURN */ + +#ifndef ATTRIBUTE_PRINTF +#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) +#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) +#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) +#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) +#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5) +#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) +#endif /* ATTRIBUTE_PRINTF */ + +/* We use __extension__ in some places to suppress -pedantic warnings + about GCC extensions. This feature didn't work properly before + gcc 2.8. */ +#if GCC_VERSION < 2008 +#define __extension__ +#endif + +/* Bootstrap support: Autoconf will possibly define the `inline' or + `const' keywords as macros, however this is only valid for the + stage1 compiler. If we detect a modern version of gcc, + unconditionally reset the values. This makes sure the right thing + happens in stage2 and later. We need to do this very early; + i.e. before any header files that might use these keywords. + Otherwise conflicts might occur. */ + +#if (GCC_VERSION >= 2007) +# ifdef __STDC__ +# undef const +# endif +# undef inline +# define inline __inline__ /* __inline__ prevents -pedantic warnings */ +# ifndef HAVE_LONG_DOUBLE +# define HAVE_LONG_DOUBLE 1 +# endif +#endif /* GCC >= 2.7 */ + +#endif /* ansidecl.h */ diff --git a/contrib/media/updf/include/anumber.h b/contrib/media/updf/include/anumber.h new file mode 100644 index 0000000000..5f574b274e --- /dev/null +++ b/contrib/media/updf/include/anumber.h @@ -0,0 +1,102 @@ + +#ifndef __anumber_h__ +#define __anumber_h__ + +#include "grower.h" +#include "yacasbase.h" +#include "lispassert.h" +#include "lispstring.h" + + + +/* Quantities derived from the platform-dependent types for doing + * arithmetic. + */ + +#define WordBits (8*sizeof(PlatWord)) +#define WordBase (((PlatDoubleWord)1)< +{ +public: + ANumberOps() {} + inline int granularity() const { return 2; } +}; + + +/* Class ANumber represents an arbitrary precision number. it is + * basically an array of PlatWord objects, with the first element + * being the least significant. iExp <= 0 for integers. + */ +class ANumber : public CArrayGrower +{ +public: + typedef CArrayGrower ASuper; +public: + ANumber(const LispChar * aString,LispInt aPrecision,LispInt aBase=10); + ANumber(LispInt aPrecision); + ANumber(PlatWord *aArray, LispInt aSize, LispInt aPrecision); + //TODO the properties of this object are set in the member initialization list, but then immediately overwritten by the CopyFrom. We can make this slightly cleaner by only initializing once. + inline ANumber(ANumber& aOther) : ASuper(),iExp(0),iNegative(LispFalse),iPrecision(0),iTensExp(0) + { + CopyFrom(aOther); + } + ~ANumber(); + void CopyFrom(const ANumber& aOther); + LispBoolean ExactlyEqual(const ANumber& aOther); + void SetTo(const LispChar * aString,LispInt aBase=10); + inline void SetPrecision(LispInt aPrecision) {iPrecision = aPrecision;} + void ChangePrecision(LispInt aPrecision); + void RoundBits(void); + void DropTrailZeroes(); + +public: + LispInt iExp; + LispInt iNegative; + LispInt iPrecision; + LispInt iTensExp; +}; + +inline LispBoolean IsPositive(ANumber& a) { return !a.iNegative; } +inline LispBoolean IsNegative(ANumber& a) { return a.iNegative; } +inline LispBoolean IsEven(ANumber& a) { return ((a[0]&1) == 0); } +inline LispBoolean IsOdd(ANumber& a) { return ((a[0]&1) == 1); } +inline LispInt Precision(ANumber& a) { return !a.iPrecision; } + +LispBoolean BaseLessThan(ANumber& a1, ANumber& a2); +void BaseDivide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2); + +void IntegerDivide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2); + +LispBoolean Significant(ANumber& a); + +LispInt WordDigits(LispInt aPrecision, LispInt aBase); + +// Operations on ANumber. +void Negate(ANumber& aNumber); +void ANumberToString(LispString& aResult, ANumber& aNumber, LispInt aBase, LispBoolean aForceFloat=0); +void Add(ANumber& aResult, ANumber& a1, ANumber& a2); +void Subtract(ANumber& aResult, ANumber& a1, ANumber& a2); +void Multiply(ANumber& aResult, ANumber& a1, ANumber& a2); +void Divide(ANumber& aQuotient, ANumber& aRemainder, ANumber& a1, ANumber& a2); +LispBoolean GreaterThan(ANumber& a1, ANumber& a2); +LispBoolean LessThan(ANumber& a1, ANumber& a2); +void BaseShiftRight(ANumber& a, LispInt aNrBits); +void BaseShiftLeft(ANumber& a, LispInt aNrBits); +void BaseGcd(ANumber& aResult, ANumber& a1, ANumber& a2); +void Sqrt(ANumber& aResult, ANumber& N); + +void PrintNumber(char* prefix,ANumber& aNumber); + +#define CORRECT_DIVISION +void NormalizeFloat(ANumber& a2, LispInt digitsNeeded); + + +#include "anumber.inl" + + +#endif + diff --git a/contrib/media/updf/include/ar.h b/contrib/media/updf/include/ar.h new file mode 100644 index 0000000000..038d01e9c7 --- /dev/null +++ b/contrib/media/updf/include/ar.h @@ -0,0 +1,20 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef _AR_H_ +#define _AR_H_ + +#define ARMAG "!\n" +#define SARMAG 8 + +#define ARFMAG "`\n" + +struct ar_hdr { + char ar_name[16]; + char ar_date[12]; + char ar_uid[6]; + char ar_gid[6]; + char ar_mode[8]; + char ar_size[10]; + char ar_fmag[2]; +}; + +#endif diff --git a/contrib/media/updf/include/archiver.h b/contrib/media/updf/include/archiver.h new file mode 100644 index 0000000000..7e2b3bf418 --- /dev/null +++ b/contrib/media/updf/include/archiver.h @@ -0,0 +1,16 @@ + +#ifndef __archiver_h__ +#define __archiver_h__ + +#include "yacasbase.h" +#include "compressedfiles.h" + +class CCompressedArchive : public YacasBase +{ +public: + CCompressedArchive(unsigned char * aBuffer, LispInt aFullSize, LispInt aCompressed); + CompressedFiles iFiles; +}; + +#endif // __archiver_h__ + diff --git a/contrib/media/updf/include/arggetter.h b/contrib/media/updf/include/arggetter.h new file mode 100644 index 0000000000..0efa7a1724 --- /dev/null +++ b/contrib/media/updf/include/arggetter.h @@ -0,0 +1,47 @@ + +#ifndef __arggetter_h__ +#define __arggetter_h__ + +#include "yacasbase.h" + + + +/// Get an argument that should be a (long) integer +LispString * GetIntegerArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +/// Get a string (atom) +LispString * GetStringArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +/// Get the atomic string of the argument +LispString * GetAtomArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +/// Get an argument that should be a short integer +LispInt GetShortIntegerArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +/// Get a list argument +void GetListArgument(LispPtr& aResult, LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +/// Get a void* pointer to a struct encapsulated in a generic class +void* GetVoidStruct(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr, LispChar * aTypeString); + + +#define ListArgument(_list,_argnr) LispPtr _list; GetListArgument(_list, aEnvironment,aStackTop,_argnr) +#define IntegerArgument(_i,_argnr) LispString * _i = GetIntegerArgument(aEnvironment,aStackTop,_argnr) +#define ShortIntegerArgument(_i,_argnr) LispInt _i = GetShortIntegerArgument(aEnvironment,aStackTop,_argnr) +#define InpStringArgument(_i,_argnr) LispChar * _i = GetStringArgument(aEnvironment,aStackTop,_argnr)->c_str() + +#define DoubleFloatArgument(_i,_argnr) double _i = GetDoubleFloatArgument(aEnvironment,aStackTop,_argnr) +#define VoidStructArgument(_typ,_i,_argnr,_name) _typ _i = (_typ)GetVoidStruct(aEnvironment,aStackTop,_argnr,_name) + + +void ReturnShortInteger(LispEnvironment& aEnvironment, + LispPtr& aResult, LispInt r); +void SetShortIntegerConstant(LispEnvironment& aEnvironment, + LispChar * aName, + LispInt aValue); +double GetDoubleFloatArgument(LispEnvironment& aEnvironment, LispInt aStackTop, LispInt iArgNr); +void ReturnDoubleFloat(LispEnvironment& aEnvironment,LispPtr& aResult, double r); +void ReturnVoidStruct(LispEnvironment& aEnvironment, + LispPtr& aResult, + LispChar * aName, + void* aData, + void (*aFree)(void*)); + + +#endif + diff --git a/contrib/media/updf/include/arpa/ftp.h b/contrib/media/updf/include/arpa/ftp.h new file mode 100644 index 0000000000..7d39a3e7a9 --- /dev/null +++ b/contrib/media/updf/include/arpa/ftp.h @@ -0,0 +1,109 @@ +/* + * Copyright (c) 1983, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)ftp.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _ARPA_FTP_H +#define _ARPA_FTP_H + +/* Definitions for FTP; see RFC-765. */ + +/* + * Reply codes. + */ +#define PRELIM 1 /* positive preliminary */ +#define COMPLETE 2 /* positive completion */ +#define CONTINUE 3 /* positive intermediate */ +#define TRANSIENT 4 /* transient negative completion */ +#define ERROR 5 /* permanent negative completion */ + +/* + * Type codes + */ +#define TYPE_A 1 /* ASCII */ +#define TYPE_E 2 /* EBCDIC */ +#define TYPE_I 3 /* image */ +#define TYPE_L 4 /* local byte size */ + +#ifdef FTP_NAMES +char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; +#endif + +/* + * Form codes + */ +#define FORM_N 1 /* non-print */ +#define FORM_T 2 /* telnet format effectors */ +#define FORM_C 3 /* carriage control (ASA) */ +#ifdef FTP_NAMES +char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; +#endif + +/* + * Structure codes + */ +#define STRU_F 1 /* file (no record structure) */ +#define STRU_R 2 /* record structure */ +#define STRU_P 3 /* page structure */ +#ifdef FTP_NAMES +char *strunames[] = {"0", "File", "Record", "Page" }; +#endif + +/* + * Mode types + */ +#define MODE_S 1 /* stream */ +#define MODE_B 2 /* block */ +#define MODE_C 3 /* compressed */ +#ifdef FTP_NAMES +char *modenames[] = {"0", "Stream", "Block", "Compressed" }; +#endif + +/* + * Record Tokens + */ +#define REC_ESC '\377' /* Record-mode Escape */ +#define REC_EOR '\001' /* Record-mode End-of-Record */ +#define REC_EOF '\002' /* Record-mode End-of-File */ + +/* + * Block Header + */ +#define BLK_EOR 0x80 /* Block is End-of-Record */ +#define BLK_EOF 0x40 /* Block is End-of-File */ +#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */ +#define BLK_RESTART 0x10 /* Block is Restart Marker */ + +#define BLK_BYTECOUNT 2 /* Bytes in this block */ + +#endif /* !_ARPA_FTP_H */ diff --git a/contrib/media/updf/include/arpa/inet.h b/contrib/media/updf/include/arpa/inet.h new file mode 100644 index 0000000000..bb5e53edb4 --- /dev/null +++ b/contrib/media/updf/include/arpa/inet.h @@ -0,0 +1,24 @@ +#ifndef _ARPA_INET_H +#define _ARPA_INET_H + +#include +#include +#include + +__BEGIN_DECLS + +int inet_aton(const char* cp, struct in_addr* inp) ; +unsigned long int inet_addr(const char* cp) ; +unsigned long int inet_network(const char* cp) ; +char* inet_ntoa(struct in_addr in) ; +char* inet_ntoa_r(struct in_addr in,char* buf) ; +struct in_addr inet_makeaddr(int net, int host) ; +unsigned long int inet_lnaof(struct in_addr in) ; +unsigned long int inet_netof(struct in_addr in) ; + +int inet_pton (int AF, const char* CP, void* BUF) ; +const char* inet_ntop (int AF, const void* CP, char* BUF, size_t LEN) ; + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/arpa/nameser.h b/contrib/media/updf/include/arpa/nameser.h new file mode 100644 index 0000000000..ed2563b59e --- /dev/null +++ b/contrib/media/updf/include/arpa/nameser.h @@ -0,0 +1,258 @@ +#ifndef _ARPA_NAMESER_H +#define _ARPA_NAMESER_H + +#include +#include + +__BEGIN_DECLS + +#define NS_PACKETSZ 512 /* maximum packet size */ +#define NS_MAXDNAME 1025 /* maximum domain name */ +#define NS_MAXCDNAME 255 /* maximum compressed domain name */ +#define NS_MAXLABEL 63 /* maximum length of domain label */ +#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ +#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */ +#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */ +#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */ +#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */ +#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */ +#define NS_INADDRSZ 4 /* IPv4 T_A */ +#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */ +#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */ +#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */ + +/* + * Currently defined type values for resources and queries. + */ +typedef enum __ns_type { + ns_t_invalid = 0, /* Cookie. */ + ns_t_a = 1, /* Host address. */ + ns_t_ns = 2, /* Authoritative server. */ + ns_t_md = 3, /* Mail destination. */ + ns_t_mf = 4, /* Mail forwarder. */ + ns_t_cname = 5, /* Canonical name. */ + ns_t_soa = 6, /* Start of authority zone. */ + ns_t_mb = 7, /* Mailbox domain name. */ + ns_t_mg = 8, /* Mail group member. */ + ns_t_mr = 9, /* Mail rename name. */ + ns_t_null = 10, /* Null resource record. */ + ns_t_wks = 11, /* Well known service. */ + ns_t_ptr = 12, /* Domain name pointer. */ + ns_t_hinfo = 13, /* Host information. */ + ns_t_minfo = 14, /* Mailbox information. */ + ns_t_mx = 15, /* Mail routing information. */ + ns_t_txt = 16, /* Text strings. */ + ns_t_rp = 17, /* Responsible person. */ + ns_t_afsdb = 18, /* AFS cell database. */ + ns_t_x25 = 19, /* X_25 calling address. */ + ns_t_isdn = 20, /* ISDN calling address. */ + ns_t_rt = 21, /* Router. */ + ns_t_nsap = 22, /* NSAP address. */ + ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ + ns_t_sig = 24, /* Security signature. */ + ns_t_key = 25, /* Security key. */ + ns_t_px = 26, /* X.400 mail mapping. */ + ns_t_gpos = 27, /* Geographical position (withdrawn). */ + ns_t_aaaa = 28, /* Ip6 Address. */ + ns_t_loc = 29, /* Location Information. */ + ns_t_nxt = 30, /* Next domain (security). */ + ns_t_eid = 31, /* Endpoint identifier. */ + ns_t_nimloc = 32, /* Nimrod Locator. */ + ns_t_srv = 33, /* Server Selection. */ + ns_t_atma = 34, /* ATM Address */ + ns_t_naptr = 35, /* Naming Authority PoinTeR */ + ns_t_kx = 36, /* Key Exchange */ + ns_t_cert = 37, /* Certification record */ + ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ + ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ + ns_t_sink = 40, /* Kitchen sink (experimentatl) */ + ns_t_opt = 41, /* EDNS0 option (meta-RR) */ + ns_t_tsig = 250, /* Transaction signature. */ + ns_t_ixfr = 251, /* Incremental zone transfer. */ + ns_t_axfr = 252, /* Transfer zone of authority. */ + ns_t_mailb = 253, /* Transfer mailbox records. */ + ns_t_maila = 254, /* Transfer mail agent records. */ + ns_t_any = 255, /* Wildcard match. */ + ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ + ns_t_max = 65536 +} ns_type; + +/* + * Values for class field + */ +typedef enum __ns_class { + ns_c_invalid = 0, /* Cookie. */ + ns_c_in = 1, /* Internet. */ + ns_c_2 = 2, /* unallocated/unsupported. */ + ns_c_chaos = 3, /* MIT Chaos-net. */ + ns_c_hs = 4, /* MIT Hesiod. */ + /* Query class values which do not appear in resource records */ + ns_c_none = 254, /* for prereq. sections in update requests */ + ns_c_any = 255, /* Wildcard match. */ + ns_c_max = 65536 +} ns_class; + +/* + * Currently defined opcodes. + */ +typedef enum __ns_opcode { + ns_o_query = 0, /* Standard query. */ + ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */ + ns_o_status = 2, /* Name server status query (unsupported). */ + /* Opcode 3 is undefined/reserved. */ + ns_o_notify = 4, /* Zone change notification. */ + ns_o_update = 5, /* Zone update message. */ + ns_o_max = 6 +} ns_opcode; + +/* + * Currently defined response codes. + */ +typedef enum __ns_rcode { + ns_r_noerror = 0, /* No error occurred. */ + ns_r_formerr = 1, /* Format error. */ + ns_r_servfail = 2, /* Server failure. */ + ns_r_nxdomain = 3, /* Name error. */ + ns_r_notimpl = 4, /* Unimplemented. */ + ns_r_refused = 5, /* Operation refused. */ + /* these are for BIND_UPDATE */ + ns_r_yxdomain = 6, /* Name exists */ + ns_r_yxrrset = 7, /* RRset exists */ + ns_r_nxrrset = 8, /* RRset does not exist */ + ns_r_notauth = 9, /* Not authoritative for zone */ + ns_r_notzone = 10, /* Zone of record different from zone section */ + ns_r_max = 11, + /* The following are TSIG extended errors */ + ns_r_badsig = 16, + ns_r_badkey = 17, + ns_r_badtime = 18 +} ns_rcode; + +typedef struct { + unsigned id :16; /* query identification number */ +#if BYTE_ORDER == BIG_ENDIAN + /* fields in third byte */ + unsigned qr: 1; /* response flag */ + unsigned opcode: 4; /* purpose of message */ + unsigned aa: 1; /* authoritive answer */ + unsigned tc: 1; /* truncated message */ + unsigned rd: 1; /* recursion desired */ + /* fields in fourth byte */ + unsigned ra: 1; /* recursion available */ + unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ + unsigned ad: 1; /* authentic data from named */ + unsigned cd: 1; /* checking disabled by resolver */ + unsigned rcode :4; /* response code */ +#endif +#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN + /* fields in third byte */ + unsigned rd :1; /* recursion desired */ + unsigned tc :1; /* truncated message */ + unsigned aa :1; /* authoritive answer */ + unsigned opcode :4; /* purpose of message */ + unsigned qr :1; /* response flag */ + /* fields in fourth byte */ + unsigned rcode :4; /* response code */ + unsigned cd: 1; /* checking disabled by resolver */ + unsigned ad: 1; /* authentic data from named */ + unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ + unsigned ra :1; /* recursion available */ +#endif + /* remaining bytes */ + unsigned qdcount :16; /* number of question entries */ + unsigned ancount :16; /* number of answer entries */ + unsigned nscount :16; /* number of authority entries */ + unsigned arcount :16; /* number of resource entries */ +} HEADER; + +#define PACKETSZ NS_PACKETSZ +#define MAXDNAME NS_MAXDNAME +#define MAXCDNAME NS_MAXCDNAME +#define MAXLABEL NS_MAXLABEL +#define HFIXEDSZ NS_HFIXEDSZ +#define QFIXEDSZ NS_QFIXEDSZ +#define RRFIXEDSZ NS_RRFIXEDSZ +#define INT32SZ NS_INT32SZ +#define INT16SZ NS_INT16SZ +#define INADDRSZ NS_INADDRSZ +#define IN6ADDRSZ NS_IN6ADDRSZ +#define INDIR_MASK NS_CMPRSFLGS +#define NAMESERVER_PORT NS_DEFAULTPORT + +#define S_ZONE ns_s_zn +#define S_PREREQ ns_s_pr +#define S_UPDATE ns_s_ud +#define S_ADDT ns_s_ar + +#define QUERY ns_o_query +#define IQUERY ns_o_iquery +#define STATUS ns_o_status +#define NS_NOTIFY_OP ns_o_notify +#define NS_UPDATE_OP ns_o_update + +#define NOERROR ns_r_noerror +#define FORMERR ns_r_formerr +#define SERVFAIL ns_r_servfail +#define NXDOMAIN ns_r_nxdomain +#define NOTIMP ns_r_notimpl +#define REFUSED ns_r_refused +#define YXDOMAIN ns_r_yxdomain +#define YXRRSET ns_r_yxrrset +#define NXRRSET ns_r_nxrrset +#define NOTAUTH ns_r_notauth +#define NOTZONE ns_r_notzone + +#define DELETE ns_uop_delete +#define ADD ns_uop_add + +#define T_A ns_t_a +#define T_NS ns_t_ns +#define T_MD ns_t_md +#define T_MF ns_t_mf +#define T_CNAME ns_t_cname +#define T_SOA ns_t_soa +#define T_MB ns_t_mb +#define T_MG ns_t_mg +#define T_MR ns_t_mr +#define T_NULL ns_t_null +#define T_WKS ns_t_wks +#define T_PTR ns_t_ptr +#define T_HINFO ns_t_hinfo +#define T_MINFO ns_t_minfo +#define T_MX ns_t_mx +#define T_TXT ns_t_txt +#define T_RP ns_t_rp +#define T_AFSDB ns_t_afsdb +#define T_X25 ns_t_x25 +#define T_ISDN ns_t_isdn +#define T_RT ns_t_rt +#define T_NSAP ns_t_nsap +#define T_NSAP_PTR ns_t_nsap_ptr +#define T_SIG ns_t_sig +#define T_KEY ns_t_key +#define T_PX ns_t_px +#define T_GPOS ns_t_gpos +#define T_AAAA ns_t_aaaa +#define T_LOC ns_t_loc +#define T_NXT ns_t_nxt +#define T_EID ns_t_eid +#define T_NIMLOC ns_t_nimloc +#define T_SRV ns_t_srv +#define T_ATMA ns_t_atma +#define T_NAPTR ns_t_naptr +#define T_TSIG ns_t_tsig +#define T_IXFR ns_t_ixfr +#define T_AXFR ns_t_axfr +#define T_MAILB ns_t_mailb +#define T_MAILA ns_t_maila +#define T_ANY ns_t_any + +#define C_IN ns_c_in +#define C_CHAOS ns_c_chaos +#define C_HS ns_c_hs +#define C_NONE ns_c_none +#define C_ANY ns_c_any + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/arpa/telnet.h b/contrib/media/updf/include/arpa/telnet.h new file mode 100644 index 0000000000..25085b89ac --- /dev/null +++ b/contrib/media/updf/include/arpa/telnet.h @@ -0,0 +1,319 @@ +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)telnet.h 8.2 (Berkeley) 12/15/93 + */ + +#ifndef _ARPA_TELNET_H +#define _ARPA_TELNET_H + +/* + * Definitions for the TELNET protocol. + */ +#define IAC 255 /* interpret as command: */ +#define DONT 254 /* you are not to use option */ +#define DO 253 /* please, you use option */ +#define WONT 252 /* I won't use option */ +#define WILL 251 /* I will use option */ +#define SB 250 /* interpret as subnegotiation */ +#define GA 249 /* you may reverse the line */ +#define EL 248 /* erase the current line */ +#define EC 247 /* erase the current character */ +#define AYT 246 /* are you there */ +#define AO 245 /* abort output--but let prog finish */ +#define IP 244 /* interrupt process--permanently */ +#define BREAK 243 /* break */ +#define DM 242 /* data mark--for connect. cleaning */ +#define NOP 241 /* nop */ +#define SE 240 /* end sub negotiation */ +#define EOR 239 /* end of record (transparent mode) */ +#define ABORT 238 /* Abort process */ +#define SUSP 237 /* Suspend process */ +#define xEOF 236 /* End of file: EOF is already used... */ + +#define SYNCH 242 /* for telfunc calls */ + +#ifdef TELCMDS +char *telcmds[] = { + "EOF", "SUSP", "ABORT", "EOR", + "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", + "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0, +}; +#else +extern char *telcmds[]; +#endif + +#define TELCMD_FIRST xEOF +#define TELCMD_LAST IAC +#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ + (unsigned int)(x) >= TELCMD_FIRST) +#define TELCMD(x) telcmds[(x)-TELCMD_FIRST] + +/* telnet options */ +#define TELOPT_BINARY 0 /* 8-bit data path */ +#define TELOPT_ECHO 1 /* echo */ +#define TELOPT_RCP 2 /* prepare to reconnect */ +#define TELOPT_SGA 3 /* suppress go ahead */ +#define TELOPT_NAMS 4 /* approximate message size */ +#define TELOPT_STATUS 5 /* give status */ +#define TELOPT_TM 6 /* timing mark */ +#define TELOPT_RCTE 7 /* remote controlled transmission and echo */ +#define TELOPT_NAOL 8 /* negotiate about output line width */ +#define TELOPT_NAOP 9 /* negotiate about output page size */ +#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ +#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ +#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ +#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ +#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ +#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ +#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ +#define TELOPT_XASCII 17 /* extended ascic character set */ +#define TELOPT_LOGOUT 18 /* force logout */ +#define TELOPT_BM 19 /* byte macro */ +#define TELOPT_DET 20 /* data entry terminal */ +#define TELOPT_SUPDUP 21 /* supdup protocol */ +#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ +#define TELOPT_SNDLOC 23 /* send location */ +#define TELOPT_TTYPE 24 /* terminal type */ +#define TELOPT_EOR 25 /* end or record */ +#define TELOPT_TUID 26 /* TACACS user identification */ +#define TELOPT_OUTMRK 27 /* output marking */ +#define TELOPT_TTYLOC 28 /* terminal location number */ +#define TELOPT_3270REGIME 29 /* 3270 regime */ +#define TELOPT_X3PAD 30 /* X.3 PAD */ +#define TELOPT_NAWS 31 /* window size */ +#define TELOPT_TSPEED 32 /* terminal speed */ +#define TELOPT_LFLOW 33 /* remote flow control */ +#define TELOPT_LINEMODE 34 /* Linemode option */ +#define TELOPT_XDISPLOC 35 /* X Display Location */ +#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */ +#define TELOPT_AUTHENTICATION 37/* Authenticate */ +#define TELOPT_ENCRYPT 38 /* Encryption option */ +#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ +#define TELOPT_EXOPL 255 /* extended-options-list */ + + +#define NTELOPTS (1+TELOPT_NEW_ENVIRON) +#ifdef TELOPTS +char *telopts[NTELOPTS+1] = { + "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", + "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", + "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", + "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", + "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", + "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", + "TACACS UID", "OUTPUT MARKING", "TTYLOC", + "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", + "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", + "ENCRYPT", "NEW-ENVIRON", + 0, +}; +#define TELOPT_FIRST TELOPT_BINARY +#define TELOPT_LAST TELOPT_NEW_ENVIRON +#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) +#define TELOPT(x) telopts[(x)-TELOPT_FIRST] +#endif + +/* sub-option qualifiers */ +#define TELQUAL_IS 0 /* option is... */ +#define TELQUAL_SEND 1 /* send option */ +#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ +#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ +#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ + +#define LFLOW_OFF 0 /* Disable remote flow control */ +#define LFLOW_ON 1 /* Enable remote flow control */ +#define LFLOW_RESTART_ANY 2 /* Restart output on any char */ +#define LFLOW_RESTART_XON 3 /* Restart output only on XON */ + +/* + * LINEMODE suboptions + */ + +#define LM_MODE 1 +#define LM_FORWARDMASK 2 +#define LM_SLC 3 + +#define MODE_EDIT 0x01 +#define MODE_TRAPSIG 0x02 +#define MODE_ACK 0x04 +#define MODE_SOFT_TAB 0x08 +#define MODE_LIT_ECHO 0x10 + +#define MODE_MASK 0x1f + +/* Not part of protocol, but needed to simplify things... */ +#define MODE_FLOW 0x0100 +#define MODE_ECHO 0x0200 +#define MODE_INBIN 0x0400 +#define MODE_OUTBIN 0x0800 +#define MODE_FORCE 0x1000 + +#define SLC_SYNCH 1 +#define SLC_BRK 2 +#define SLC_IP 3 +#define SLC_AO 4 +#define SLC_AYT 5 +#define SLC_EOR 6 +#define SLC_ABORT 7 +#define SLC_EOF 8 +#define SLC_SUSP 9 +#define SLC_EC 10 +#define SLC_EL 11 +#define SLC_EW 12 +#define SLC_RP 13 +#define SLC_LNEXT 14 +#define SLC_XON 15 +#define SLC_XOFF 16 +#define SLC_FORW1 17 +#define SLC_FORW2 18 + +#define NSLC 18 + +/* + * For backwards compatability, we define SLC_NAMES to be the + * list of names if SLC_NAMES is not defined. + */ +#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ + "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ + "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0, +#ifdef SLC_NAMES +char *slc_names[] = { + SLC_NAMELIST +}; +#else +extern char *slc_names[]; +#define SLC_NAMES SLC_NAMELIST +#endif + +#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) +#define SLC_NAME(x) slc_names[x] + +#define SLC_NOSUPPORT 0 +#define SLC_CANTCHANGE 1 +#define SLC_VARIABLE 2 +#define SLC_DEFAULT 3 +#define SLC_LEVELBITS 0x03 + +#define SLC_FUNC 0 +#define SLC_FLAGS 1 +#define SLC_VALUE 2 + +#define SLC_ACK 0x80 +#define SLC_FLUSHIN 0x40 +#define SLC_FLUSHOUT 0x20 + +#define OLD_ENV_VAR 1 +#define OLD_ENV_VALUE 0 +#define NEW_ENV_VAR 0 +#define NEW_ENV_VALUE 1 +#define ENV_ESC 2 +#define ENV_USERVAR 3 + +/* + * AUTHENTICATION suboptions + */ + +/* + * Who is authenticating who ... + */ +#define AUTH_WHO_CLIENT 0 /* Client authenticating server */ +#define AUTH_WHO_SERVER 1 /* Server authenticating client */ +#define AUTH_WHO_MASK 1 + +/* + * amount of authentication done + */ +#define AUTH_HOW_ONE_WAY 0 +#define AUTH_HOW_MUTUAL 2 +#define AUTH_HOW_MASK 2 + +#define AUTHTYPE_NULL 0 +#define AUTHTYPE_KERBEROS_V4 1 +#define AUTHTYPE_KERBEROS_V5 2 +#define AUTHTYPE_SPX 3 +#define AUTHTYPE_MINK 4 +#define AUTHTYPE_CNT 5 + +#define AUTHTYPE_TEST 99 + +#ifdef AUTH_NAMES +char *authtype_names[] = { + "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0, +}; +#else +extern char *authtype_names[]; +#endif + +#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) +#define AUTHTYPE_NAME(x) authtype_names[x] + +/* + * ENCRYPTion suboptions + */ +#define ENCRYPT_IS 0 /* I pick encryption type ... */ +#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ +#define ENCRYPT_REPLY 2 /* Initial setup response */ +#define ENCRYPT_START 3 /* Am starting to send encrypted */ +#define ENCRYPT_END 4 /* Am ending encrypted */ +#define ENCRYPT_REQSTART 5 /* Request you start encrypting */ +#define ENCRYPT_REQEND 6 /* Request you send encrypting */ +#define ENCRYPT_ENC_KEYID 7 +#define ENCRYPT_DEC_KEYID 8 +#define ENCRYPT_CNT 9 + +#define ENCTYPE_ANY 0 +#define ENCTYPE_DES_CFB64 1 +#define ENCTYPE_DES_OFB64 2 +#define ENCTYPE_CNT 3 + +#ifdef ENCRYPT_NAMES +char *encrypt_names[] = { + "IS", "SUPPORT", "REPLY", "START", "END", + "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", + 0, +}; +char *enctype_names[] = { + "ANY", "DES_CFB64", "DES_OFB64", 0, +}; +#else +extern char *encrypt_names[]; +extern char *enctype_names[]; +#endif + + +#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) +#define ENCRYPT_NAME(x) encrypt_names[x] + +#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) +#define ENCTYPE_NAME(x) enctype_names[x] +#endif /* _ARPA_TELNET_H */ diff --git a/contrib/media/updf/include/arpa/tftp.h b/contrib/media/updf/include/arpa/tftp.h new file mode 100644 index 0000000000..fb542ac328 --- /dev/null +++ b/contrib/media/updf/include/arpa/tftp.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)tftp.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _ARPA_TFTP_H +#define _ARPA_TFTP_H + +/* + * Trivial File Transfer Protocol (IEN-133) + */ +#define SEGSIZE 512 /* data segment size */ + +/* + * Packet types. + */ +#define RRQ 01 /* read request */ +#define WRQ 02 /* write request */ +#define DATA 03 /* data packet */ +#define ACK 04 /* acknowledgement */ +#define ERROR 05 /* error code */ + +struct tftphdr { + short th_opcode; /* packet type */ + union { + short tu_block; /* block # */ + short tu_code; /* error code */ + char tu_stuff[1]; /* request packet stuff */ + } th_u; + char th_data[1]; /* data or error string */ +}; + +#define th_block th_u.tu_block +#define th_code th_u.tu_code +#define th_stuff th_u.tu_stuff +#define th_msg th_data + +/* + * Error codes. + */ +#define EUNDEF 0 /* not defined */ +#define ENOTFOUND 1 /* file not found */ +#define EACCESS 2 /* access violation */ +#define ENOSPACE 3 /* disk full or allocation exceeded */ +#define EBADOP 4 /* illegal TFTP operation */ +#define EBADID 5 /* unknown transfer ID */ +#define EEXISTS 6 /* file already exists */ +#define ENOUSER 7 /* no such user */ + +#endif /* _ARPA_TFTP_H */ diff --git a/contrib/media/updf/include/arrayclass.h b/contrib/media/updf/include/arrayclass.h new file mode 100644 index 0000000000..e58c13a612 --- /dev/null +++ b/contrib/media/updf/include/arrayclass.h @@ -0,0 +1,27 @@ + +#ifndef __arrayclass_h__ +#define __arrayclass_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "genericobject.h" + +class ArrayClass : public GenericClass +{ +public: //required + ArrayClass(LispInt aSize,LispObject* aInitialItem); + virtual ~ArrayClass(); + virtual LispChar * Send(LispArgList& aArgList); + virtual LispChar * TypeName(); +public: //array-specific + inline LispInt Size(); + inline LispObject* GetElement(LispInt aItem); // TODO: 1-based, ... + inline void SetElement(LispInt aItem,LispObject* aObject); + +private: + LispPtrArray iArray; +}; + +#include "arrayclass.inl" +#endif + diff --git a/contrib/media/updf/include/asm/byteorder.h b/contrib/media/updf/include/asm/byteorder.h new file mode 100644 index 0000000000..4fc49a6cef --- /dev/null +++ b/contrib/media/updf/include/asm/byteorder.h @@ -0,0 +1,43 @@ +#ifndef _I386_BYTEORDER_H +#define _I386_BYTEORDER_H + +#include +#include __DEV_CONFIG_H + +#ifdef __GNUC__ + +static __inline__ __const__ __u32 ___arch__swab32(__u32 x) +{ +#ifdef CONFIG_X86_BSWAP + __asm__("bswap %0" : "=r" (x) : "0" (x)); +#else + __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ + "rorl $16,%0\n\t" /* swap words */ + "xchgb %b0,%h0" /* swap higher bytes */ + :"=q" (x) + : "0" (x)); +#endif + return x; +} + +static __inline__ __const__ __u16 ___arch__swab16(__u16 x) +{ + __asm__("xchgb %b0,%h0" /* swap bytes */ \ + : "=q" (x) \ + : "0" (x)); \ + return x; +} + +#define __arch__swab32(x) ___arch__swab32(x) +#define __arch__swab16(x) ___arch__swab16(x) + +#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) +# define __BYTEORDER_HAS_U64__ +# define __SWAB_64_THRU_32__ +#endif + +#endif /* __GNUC__ */ + +#include + +#endif /* _I386_BYTEORDER_H */ diff --git a/contrib/media/updf/include/asm/types.h b/contrib/media/updf/include/asm/types.h new file mode 100644 index 0000000000..718d7c96f0 --- /dev/null +++ b/contrib/media/updf/include/asm/types.h @@ -0,0 +1,4 @@ +#ifndef _I386_TYPES_H +#define _I386_TYPES_H + +#endif diff --git a/contrib/media/updf/include/assert.h b/contrib/media/updf/include/assert.h new file mode 100644 index 0000000000..f855632f97 --- /dev/null +++ b/contrib/media/updf/include/assert.h @@ -0,0 +1,31 @@ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#undef assert +#undef unimpl + +#define assert(test) ((void)((test)||(__dj_assert(#test,__FILE__,__LINE__),0))) +#define unimpl() __dj_unimp("Called unimplemented function in file \"" __FILE__ "\"\n") + +#ifndef __dj_include_assert_h_ +#define __dj_include_assert_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _MSC_VER +void __declspec(noreturn) __dj_assert(const char *,const char *,int); +void __declspec(noreturn) __dj_unimp(const char *fn); +#else +void __dj_assert(const char *,const char *,int) __attribute__((__noreturn__)); +void __dj_unimp(const char *fn) __attribute__((__noreturn__)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_assert_h_ */ + +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ diff --git a/contrib/media/updf/include/backward/algo.h b/contrib/media/updf/include/backward/algo.h new file mode 100644 index 0000000000..20a2dd2d38 --- /dev/null +++ b/contrib/media/updf/include/backward/algo.h @@ -0,0 +1,112 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_ALGO_H +#define _CPP_BACKWARD_ALGO_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include "tempbuf.h" +#include "iterator.h" +#include +#include + +// Names from +using std::for_each; +using std::find; +using std::find_if; +using std::adjacent_find; +using std::count; +using std::count_if; +using std::search; +using std::search_n; +using std::swap_ranges; +using std::transform; +using std::replace; +using std::replace_if; +using std::replace_copy; +using std::replace_copy_if; +using std::generate; +using std::generate_n; +using std::remove; +using std::remove_if; +using std::remove_copy; +using std::remove_copy_if; +using std::unique; +using std::unique_copy; +using std::reverse; +using std::reverse_copy; +using std::rotate; +using std::rotate_copy; +using std::random_shuffle; +using std::random_sample; +using std::random_sample_n; +using std::partition; +using std::stable_partition; +using std::sort; +using std::stable_sort; +using std::partial_sort; +using std::partial_sort_copy; +using std::nth_element; +using std::lower_bound; +using std::upper_bound; +using std::equal_range; +using std::binary_search; +using std::merge; +using std::inplace_merge; +using std::includes; +using std::set_union; +using std::set_intersection; +using std::set_difference; +using std::set_symmetric_difference; +using std::min_element; +using std::max_element; +using std::next_permutation; +using std::prev_permutation; +using std::find_first_of; +using std::find_end; +using std::is_sorted; +using std::is_heap; + +// Names from stl_heap.h +using std::push_heap; +using std::pop_heap; +using std::make_heap; +using std::sort_heap; + +// Names from stl_numeric.h +using std::accumulate; +using std::inner_product; +using std::partial_sum; +using std::adjacent_difference; +using std::power; +using std::iota; + +#endif /* _CPP_BACKWARD_ALGO_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/algobase.h b/contrib/media/updf/include/backward/algobase.h new file mode 100644 index 0000000000..f9adcc036a --- /dev/null +++ b/contrib/media/updf/include/backward/algobase.h @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_ALGOBASE_H +#define _CPP_BACKWARD_ALGOBASE_H 1 + +#include "backward_warning.h" +#include "pair.h" +#include "iterator.h" +#include +#include + +// Names from stl_algobase.h +using std::iter_swap; +using std::swap; +using std::min; +using std::max; +using std::copy; +using std::copy_backward; +using std::copy_n; +using std::fill; +using std::fill_n; +using std::mismatch; +using std::equal; +using std::lexicographical_compare; +using std::lexicographical_compare_3way; + +// Names from stl_uninitialized.h +using std::uninitialized_copy; +using std::uninitialized_copy_n; +using std::uninitialized_fill; +using std::uninitialized_fill_n; + +#endif /* _CPP_BACKWARD_ALGOBASE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/alloc.h b/contrib/media/updf/include/backward/alloc.h new file mode 100644 index 0000000000..54a6fb17a4 --- /dev/null +++ b/contrib/media/updf/include/backward/alloc.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 1996-1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_ALLOC_H +#define _CPP_BACKWARD_ALLOC_H 1 + +#include "backward_warning.h" +#include +#include + +using std::__malloc_alloc_template; +using std::malloc_alloc; +using std::simple_alloc; +using std::debug_alloc; +#ifndef __USE_MALLOC +using std::__default_alloc_template; +#endif +using std::alloc; +using std::single_client_alloc; +using std::allocator; + +#endif /* _CPP_BACKWARD_ALLOC_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/backward_warning.h b/contrib/media/updf/include/backward/backward_warning.h new file mode 100644 index 0000000000..991541553d --- /dev/null +++ b/contrib/media/updf/include/backward/backward_warning.h @@ -0,0 +1,38 @@ +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_BACKWARD_WARNING_H +#define _CPP_BACKWARD_BACKWARD_WARNING_H 1 + +#ifdef __DEPRECATED +#warning This file includes at least one deprecated or antiquated header. \ + Please use the header instead of header for 'C++' includes \ + and use the header instead of header for 'C' includes. \ + To disable this warning use -Wno-deprecated. +#endif + +#endif diff --git a/contrib/media/updf/include/backward/bvector.h b/contrib/media/updf/include/backward/bvector.h new file mode 100644 index 0000000000..8a1ab0d393 --- /dev/null +++ b/contrib/media/updf/include/backward/bvector.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __SGI_STL_BVECTOR_H +#define __SGI_STL_BVECTOR_H + + +#include "backward_warning.h" +#include + +using std::bit_vector; + +#endif /* __SGI_STL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: + + diff --git a/contrib/media/updf/include/backward/complex.h b/contrib/media/updf/include/backward/complex.h new file mode 100644 index 0000000000..c7e1d1c1be --- /dev/null +++ b/contrib/media/updf/include/backward/complex.h @@ -0,0 +1,43 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_COMPLEX_H +#define _CPP_BACKWARD_COMPLEX_H 1 + +#include "backward_warning.h" +#include + +using std::complex; +typedef complex float_complex; +typedef complex double_complex; +typedef complex long_double_complex; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/defalloc.h b/contrib/media/updf/include/backward/defalloc.h new file mode 100644 index 0000000000..5f4428f9e0 --- /dev/null +++ b/contrib/media/updf/include/backward/defalloc.h @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +// Inclusion of this file is DEPRECATED. This is the original HP +// default allocator. It is provided only for backward compatibility. +// This file WILL BE REMOVED in a future release. +// +// DO NOT USE THIS FILE unless you have an old container implementation +// that requires an allocator with the HP-style interface. +// +// Standard-conforming allocators have a very different interface. The +// standard default allocator is declared in the header . + +#ifndef _CPP_BACKWARD_DEFALLOC_H +#define _CPP_BACKWARD_DEFALLOC_H 1 + +#include "backward_warning.h" +#include "new.h" +#include +#include +#include +#include "iostream.h" +#include "algobase.h" + + +template +inline _Tp* allocate(ptrdiff_t __size, _Tp*) { + set_new_handler(0); + _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp)))); + if (__tmp == 0) { + cerr << "out of memory" << endl; + exit(1); + } + return __tmp; +} + + +template +inline void deallocate(_Tp* __buffer) { + ::operator delete(__buffer); +} + +template +class allocator { +public: + typedef _Tp value_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + pointer allocate(size_type __n) { + return ::allocate((difference_type)__n, (pointer)0); + } + void deallocate(pointer __p) { ::deallocate(__p); } + pointer address(reference __x) { return (pointer)&__x; } + const_pointer const_address(const_reference __x) { + return (const_pointer)&__x; + } + size_type init_page_size() { + return max(size_type(1), size_type(4096/sizeof(_Tp))); + } + size_type max_size() const { + return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp))); + } +}; + +class allocator { +public: + typedef void* pointer; +}; + + + +#endif /* _CPP_BACKWARD_DEFALLOC_H */ diff --git a/contrib/media/updf/include/backward/deque.h b/contrib/media/updf/include/backward/deque.h new file mode 100644 index 0000000000..81284518e5 --- /dev/null +++ b/contrib/media/updf/include/backward/deque.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_DEQUE_H +#define _CPP_BACKWARD_DEQUE_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include "alloc.h" +#include + +using std::deque; + +#endif /* _CPP_BACKWARD_DEQUE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/fstream.h b/contrib/media/updf/include/backward/fstream.h new file mode 100644 index 0000000000..4f03e4c6c8 --- /dev/null +++ b/contrib/media/updf/include/backward/fstream.h @@ -0,0 +1,52 @@ +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_FSTREAM_H +#define _CPP_BACKWARD_FSTREAM_H 1 + +#include "backward_warning.h" +#include + +using std::filebuf; +using std::ifstream; +using std::ofstream; +using std::fstream; +using std::streampos; + +#ifdef _GLIBCPP_USE_WCHAR_T +using std::wfilebuf; +using std::wifstream; +using std::wofstream; +using std::wfstream; +using std::wstreampos; +#endif + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/function.h b/contrib/media/updf/include/backward/function.h new file mode 100644 index 0000000000..a49c36ba1c --- /dev/null +++ b/contrib/media/updf/include/backward/function.h @@ -0,0 +1,98 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_FUNCTION_H +#define _CPP_BACKWARD_FUNCTION_H 1 + +#include "backward_warning.h" +#include +#include +#include + +// Names from stl_function.h +using std::unary_function; +using std::binary_function; +using std::plus; +using std::minus; +using std::multiplies; +using std::divides; +using std::identity_element; +using std::modulus; +using std::negate; +using std::equal_to; +using std::not_equal_to; +using std::greater; +using std::less; +using std::greater_equal; +using std::less_equal; +using std::logical_and; +using std::logical_or; +using std::logical_not; +using std::unary_negate; +using std::binary_negate; +using std::not1; +using std::not2; +using std::binder1st; +using std::binder2nd; +using std::bind1st; +using std::bind2nd; +using std::unary_compose; +using std::binary_compose; +using std::compose1; +using std::compose2; +using std::pointer_to_unary_function; +using std::pointer_to_binary_function; +using std::ptr_fun; +using std::identity; +using std::select1st; +using std::select2nd; +using std::project1st; +using std::project2nd; +using std::constant_void_fun; +using std::constant_unary_fun; +using std::constant_binary_fun; +using std::constant0; +using std::constant1; +using std::constant2; +using std::subtractive_rng; +using std::mem_fun_t; +using std::const_mem_fun_t; +using std::mem_fun_ref_t; +using std::const_mem_fun_ref_t; +using std::mem_fun1_t; +using std::const_mem_fun1_t; +using std::mem_fun1_ref_t; +using std::const_mem_fun1_ref_t; +using std::mem_fun; +using std::mem_fun_ref; +using std::mem_fun1; +using std::mem_fun1_ref; + +#endif /* _CPP_BACKWARD_FUNCTION_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/hash_map.h b/contrib/media/updf/include/backward/hash_map.h new file mode 100644 index 0000000000..b5d0da2d53 --- /dev/null +++ b/contrib/media/updf/include/backward/hash_map.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_BACKWARD_HASH_MAP_H +#define _CPP_BACKWARD_HASH_MAP_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include + +using std::hash; +using std::hashtable; +using std::hash_map; +using std::hash_multimap; + +#endif /* _CPP_BACKWARD_HASH_MAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/hash_set.h b/contrib/media/updf/include/backward/hash_set.h new file mode 100644 index 0000000000..b09ba41d06 --- /dev/null +++ b/contrib/media/updf/include/backward/hash_set.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_BACKWARD_HASH_SET_H +#define _CPP_BACKWARD_HASH_SET_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include + +using std::hash; +using std::hashtable; +using std::hash_set; +using std::hash_multiset; + +#endif /* _CPP_BACKWARD_HASH_SET_H */ + diff --git a/contrib/media/updf/include/backward/hashtable.h b/contrib/media/updf/include/backward/hashtable.h new file mode 100644 index 0000000000..d5d138efa5 --- /dev/null +++ b/contrib/media/updf/include/backward/hashtable.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BACKWARD_HASHTABLE_H +#define _CPP_BACKWARD_HASHTABLE_H 1 + +#include "backward_warning.h" +#include +#include "algo.h" +#include "alloc.h" +#include "vector.h" + +using std::hash; +using std::hashtable; + +#endif /* _CPP_BACKWARD_HASHTABLE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/heap.h b/contrib/media/updf/include/backward/heap.h new file mode 100644 index 0000000000..eb0161b3ec --- /dev/null +++ b/contrib/media/updf/include/backward/heap.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_HEAP_H +#define _CPP_BACKWARD_HEAP_H 1 + +#include "backward_warning.h" +#include +#include + +using std::push_heap; +using std::pop_heap; +using std::make_heap; +using std::sort_heap; + +#endif /* _CPP_BACKWARD_HEAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/iomanip.h b/contrib/media/updf/include/backward/iomanip.h new file mode 100644 index 0000000000..dad183edde --- /dev/null +++ b/contrib/media/updf/include/backward/iomanip.h @@ -0,0 +1,70 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_IOMANIP_H +#define _CPP_BACKWARD_IOMANIP_H 1 + +#include "backward_warning.h" +#include "iostream.h" +#include + +// These are from as per [27.4]. +using std::boolalpha; +using std::noboolalpha; +using std::showbase; +using std::noshowbase; +using std::showpoint; +using std::noshowpoint; +using std::showpos; +using std::noshowpos; +using std::skipws; +using std::noskipws; +using std::uppercase; +using std::nouppercase; +using std::internal; +using std::left; +using std::right; +using std::dec; +using std::hex; +using std::oct; +using std::fixed; +using std::scientific; + +// These are from as per [27.6]. Manipulators from +// and (e.g., endl) are made available via . +using std::resetiosflags; +using std::setiosflags; +using std::setbase; +using std::setfill; +using std::setprecision; +using std::setw; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/iostream.h b/contrib/media/updf/include/backward/iostream.h new file mode 100644 index 0000000000..0d258af143 --- /dev/null +++ b/contrib/media/updf/include/backward/iostream.h @@ -0,0 +1,60 @@ +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_IOSTREAM_H +#define _CPP_BACKWARD_IOSTREAM_H 1 + +#include "backward_warning.h" +#include + +using std::iostream; +using std::ostream; +using std::istream; +using std::ios; +using std::streambuf; + +using std::cout; +using std::cin; +using std::cerr; +using std::clog; +#ifdef _GLIBCPP_USE_WCHAR_T +using std::wcout; +using std::wcin; +using std::wcerr; +using std::wclog; +#endif + +using std::ws; +using std::endl; +using std::ends; +using std::flush; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/istream.h b/contrib/media/updf/include/backward/istream.h new file mode 100644 index 0000000000..059e7742e2 --- /dev/null +++ b/contrib/media/updf/include/backward/istream.h @@ -0,0 +1,43 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_ISTREAM_H +#define _CPP_BACKWARD_ISTREAM_H 1 + +#include "backward_warning.h" +#include "iostream.h" + +#endif + +// Local Variables: +// mode:C++ +// End: + + + + + diff --git a/contrib/media/updf/include/backward/iterator.h b/contrib/media/updf/include/backward/iterator.h new file mode 100644 index 0000000000..eea2c01c96 --- /dev/null +++ b/contrib/media/updf/include/backward/iterator.h @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_ITERATOR_H +#define _CPP_BACKWARD_ITERATOR_H 1 + +#include "backward_warning.h" +#include "function.h" +#include +#include "iostream.h" +#include "iterator.h" + +#include +#include + +// Names from stl_iterator.h +using std::input_iterator_tag; +using std::output_iterator_tag; +using std::forward_iterator_tag; +using std::bidirectional_iterator_tag; +using std::random_access_iterator_tag; + +#if 0 +using std::iterator; +#endif +using std::input_iterator; +using std::output_iterator; +using std::forward_iterator; +using std::bidirectional_iterator; +using std::random_access_iterator; + +using std::iterator_traits; + +using std::iterator_category; +using std::distance_type; +using std::value_type; + +using std::distance; +using std::advance; + +using std::insert_iterator; +using std::front_insert_iterator; +using std::back_insert_iterator; +using std::inserter; +using std::front_inserter; +using std::back_inserter; + +using std::reverse_iterator; +using std::reverse_bidirectional_iterator; + +using std::istream_iterator; +using std::ostream_iterator; + +// Names from stl_construct.h +using std::construct; +using std::destroy; + +// Names from stl_raw_storage_iter.h +using std::raw_storage_iterator; + +#endif /* _CPP_BACKWARD_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/list.h b/contrib/media/updf/include/backward/list.h new file mode 100644 index 0000000000..27d3cd3c0f --- /dev/null +++ b/contrib/media/updf/include/backward/list.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_LIST_H +#define _CPP_BACKWARD_LIST_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include "alloc.h" +#include + +using std::list; + +#endif /* _CPP_BACKWARD_LIST_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/map.h b/contrib/media/updf/include/backward/map.h new file mode 100644 index 0000000000..911f59e51e --- /dev/null +++ b/contrib/media/updf/include/backward/map.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_MAP_H +#define _CPP_BACKWARD_MAP_H 1 + +#include "backward_warning.h" +#include "tree.h" +#include + +using std::map; + +#endif /* _CPP_BACKWARD_MAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/multimap.h b/contrib/media/updf/include/backward/multimap.h new file mode 100644 index 0000000000..1ecbb8152c --- /dev/null +++ b/contrib/media/updf/include/backward/multimap.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_MULTIMAP_H +#define _CPP_BACKWARD_MULTIMAP_H 1 + +#include "backward_warning.h" +#include "tree.h" +#include + +using std::multimap; + +#endif /* _CPP_BACKWARD_MULTIMAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/multiset.h b/contrib/media/updf/include/backward/multiset.h new file mode 100644 index 0000000000..19a2f4cb0a --- /dev/null +++ b/contrib/media/updf/include/backward/multiset.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_MULTISET_H +#define _CPP_BACKWARD_MULTISET_H 1 + +#include "backward_warning.h" +#include "tree.h" +#include + +using std::multiset; + +#endif /* _CPP_BACKWARD_MULTISET_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/new.h b/contrib/media/updf/include/backward/new.h new file mode 100644 index 0000000000..8e4c5c9399 --- /dev/null +++ b/contrib/media/updf/include/backward/new.h @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. +// Copyright (C) 2000 Free Software Foundation + +// This file is part of GNU CC. +// +// GNU CC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// GNU CC 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 GNU CC; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_NEW_H +#define _CPP_BACKWARD_NEW_H 1 + +#include "backward_warning.h" +#include + +using std::bad_alloc; +using std::nothrow_t; +using std::nothrow; +using std::new_handler; +using std::set_new_handler; + +#endif diff --git a/contrib/media/updf/include/backward/ostream.h b/contrib/media/updf/include/backward/ostream.h new file mode 100644 index 0000000000..4c74756192 --- /dev/null +++ b/contrib/media/updf/include/backward/ostream.h @@ -0,0 +1,38 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_OSTREAM_H +#define _CPP_BACKWARD_OSTREAM_H 1 + +#include "backward_warning.h" +#include "iostream.h" + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/pair.h b/contrib/media/updf/include/backward/pair.h new file mode 100644 index 0000000000..b0ce3cc5a3 --- /dev/null +++ b/contrib/media/updf/include/backward/pair.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_PAIR_H +#define _CPP_BACKWARD_PAIR_H 1 + +#include "backward_warning.h" +#include +#include + +using std::pair; +using std::make_pair; + +#endif /* _CPP_BACKWARD_PAIR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/queue.h b/contrib/media/updf/include/backward/queue.h new file mode 100644 index 0000000000..6eaf246a18 --- /dev/null +++ b/contrib/media/updf/include/backward/queue.h @@ -0,0 +1,41 @@ +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_QUEUE_H +#define _CPP_BACKWARD_QUEUE_H 1 + +#include "backward_warning.h" +#include + +using std::queue; +using std::priority_queue; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/rope.h b/contrib/media/updf/include/backward/rope.h new file mode 100644 index 0000000000..abbef9efd6 --- /dev/null +++ b/contrib/media/updf/include/backward/rope.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_ROPE_H +#define _CPP_BACKWARD_ROPE_H 1 + +#include "backward_warning.h" +#include "hashtable.h" +#include + +using std::char_producer; +using std::sequence_buffer; +using std::rope; +using std::crope; +using std::wrope; + +#endif /* _CPP_BACKWARD_ROPE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/set.h b/contrib/media/updf/include/backward/set.h new file mode 100644 index 0000000000..68d3c4cb93 --- /dev/null +++ b/contrib/media/updf/include/backward/set.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_SET_H +#define _CPP_BACKWARD_SET_H 1 + +#include "backward_warning.h" +#include "tree.h" +#include + +using std::set; + +#endif /* _CPP_BACKWARD_SET_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/slist.h b/contrib/media/updf/include/backward/slist.h new file mode 100644 index 0000000000..b643740ba7 --- /dev/null +++ b/contrib/media/updf/include/backward/slist.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_BACKWARD_SLIST_H +#define _CPP_BACKWARD_SLIST_H 1 + +#include "backward_warning.h" +#include + +using std::slist; + +#endif /* _CPP_BACKWARD_SLIST_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/stack.h b/contrib/media/updf/include/backward/stack.h new file mode 100644 index 0000000000..48342365b5 --- /dev/null +++ b/contrib/media/updf/include/backward/stack.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_STACK_H +#define _CPP_BACKWARD_STACK_H 1 + +#include "backward_warning.h" +#include "vector.h" +#include "deque.h" +#include "heap.h" +#include "queue.h" +#include + +using std::stack; + +#endif /* _CPP_BACKWARD_STACK_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/stream.h b/contrib/media/updf/include/backward/stream.h new file mode 100644 index 0000000000..21a851decd --- /dev/null +++ b/contrib/media/updf/include/backward/stream.h @@ -0,0 +1,38 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_STREAM_H +#define _CPP_BACKWARD_STREAM_H 1 + +#include "backward_warning.h" +#include "iostream.h" + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/streambuf.h b/contrib/media/updf/include/backward/streambuf.h new file mode 100644 index 0000000000..3965816dc4 --- /dev/null +++ b/contrib/media/updf/include/backward/streambuf.h @@ -0,0 +1,40 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_STREAMBUF_H +#define _CPP_BACKWARD_STREAMBUF_H 1 + +#include "backward_warning.h" +#include + +using std::streambuf; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/strstream b/contrib/media/updf/include/backward/strstream new file mode 100644 index 0000000000..ed9a6b8441 --- /dev/null +++ b/contrib/media/updf/include/backward/strstream @@ -0,0 +1,159 @@ +/* + * Copyright (c) 1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +// WARNING: The classes defined in this header are DEPRECATED. This +// header is defined in section D.7.1 of the C++ standard, and it +// MAY BE REMOVED in a future standard revision. You should use the +// header instead. + +#ifndef __SGI_STL_STRSTREAM +#define __SGI_STL_STRSTREAM + +#include "backward_warning.h" +#include +#include +#include +#include +#include + +namespace std +{ + +//---------------------------------------------------------------------- +// Class strstreambuf, a streambuf class that manages an array of char. +// Note that this class is not a template. + +class strstreambuf : public basic_streambuf > +{ +public: // Types. + typedef char_traits _Traits; + typedef basic_streambuf _Base; + +public: // Constructor, destructor + explicit strstreambuf(streamsize __initial_capacity = 0); + strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*)); + + strstreambuf(char* __get, streamsize __n, char* __put = 0); + strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0); + strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0); + + strstreambuf(const char* __get, streamsize __n); + strstreambuf(const signed char* __get, streamsize __n); + strstreambuf(const unsigned char* __get, streamsize __n); + + virtual ~strstreambuf(); + +public: // strstreambuf operations. + void freeze(bool = true); + char* str(); + int pcount() const; + +protected: // Overridden virtual member functions. + virtual int_type overflow(int_type __c = _Traits::eof()); + virtual int_type pbackfail(int_type __c = _Traits::eof()); + virtual int_type underflow(); + virtual _Base* setbuf(char* __buf, streamsize __n); + virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir, + ios_base::openmode __mode + = ios_base::in | ios_base::out); + virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode + = ios_base::in | ios_base::out); + +private: // Helper functions. + // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun. + char* _M_alloc(size_t); + void _M_free(char*); + + // Helper function used in constructors. + void _M_setup(char* __get, char* __put, streamsize __n); + +private: // Data members. + void* (*_M_alloc_fun)(size_t); + void (*_M_free_fun)(void*); + + bool _M_dynamic : 1; + bool _M_frozen : 1; + bool _M_constant : 1; +}; + +//---------------------------------------------------------------------- +// Class istrstream, an istream that manages a strstreambuf. + +class istrstream : public basic_istream +{ +public: + explicit istrstream(char*); + explicit istrstream(const char*); + istrstream(char* , streamsize); + istrstream(const char*, streamsize); + virtual ~istrstream(); + + strstreambuf* rdbuf() const; + char* str(); + +private: + strstreambuf _M_buf; +}; + +//---------------------------------------------------------------------- +// Class ostrstream + +class ostrstream : public basic_ostream +{ +public: + ostrstream(); + ostrstream(char*, int, ios_base::openmode = ios_base::out); + virtual ~ostrstream(); + + strstreambuf* rdbuf() const; + void freeze(bool = true); + char* str(); + int pcount() const; + +private: + strstreambuf _M_buf; +}; + +//---------------------------------------------------------------------- +// Class strstream + +class strstream : public basic_iostream +{ +public: + typedef char char_type; + typedef char_traits::int_type int_type; + typedef char_traits::pos_type pos_type; + typedef char_traits::off_type off_type; + + strstream(); + strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out); + virtual ~strstream(); + + strstreambuf* rdbuf() const; + void freeze(bool = true); + int pcount() const; + char* str(); + +private: + strstreambuf _M_buf; +}; + +} // namespace std + +#endif /* __SGI_STL_STRSTREAM */ + +// Local Variables: +// mode:C++ +// End: + + diff --git a/contrib/media/updf/include/backward/strstream.h b/contrib/media/updf/include/backward/strstream.h new file mode 100644 index 0000000000..82802d2f86 --- /dev/null +++ b/contrib/media/updf/include/backward/strstream.h @@ -0,0 +1,41 @@ +// -*- C++ -*- forwarding header. +// Copyright (C) 2000 Free Software Foundation + +// This file is part of GNU CC. +// +// GNU CC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// GNU CC 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 GNU CC; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BACKWARD_STRSTREAM_H +#define _CPP_BACKWARD_STRSTREAM_H 1 + +#include "strstream" + +using std::strstreambuf; +using std::istrstream; +using std::ostrstream; +using std::strstream; + +#endif + diff --git a/contrib/media/updf/include/backward/tempbuf.h b/contrib/media/updf/include/backward/tempbuf.h new file mode 100644 index 0000000000..afb81bf64d --- /dev/null +++ b/contrib/media/updf/include/backward/tempbuf.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_TEMPBUF_H +#define _CPP_BACKWARD_TEMPBUF_H 1 + +#include "backward_warning.h" +#include "pair.h" +#include "iterator.h" +#include +#include +#include +#include +#include +#include +#include + +using std::get_temporary_buffer; +using std::return_temporary_buffer; +using std::temporary_buffer; + +#endif /* _CPP_BACKWARD_TEMPBUF_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/tree.h b/contrib/media/updf/include/backward/tree.h new file mode 100644 index 0000000000..9c732236f1 --- /dev/null +++ b/contrib/media/updf/include/backward/tree.h @@ -0,0 +1,27 @@ + +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_EXT_TREE +#define _CPP_EXT_TREE 1 + +#include "backward_warning.h" +#include + +using std::rb_tree; + +#endif +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/backward/vector.h b/contrib/media/updf/include/backward/vector.h new file mode 100644 index 0000000000..cea51ebc19 --- /dev/null +++ b/contrib/media/updf/include/backward/vector.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BACKWARD_VECTOR_H +#define _CPP_BACKWARD_VECTOR_H 1 + +#include "backward_warning.h" +#include "algobase.h" +#include "alloc.h" +#include + +using std::vector; + +#endif /* _CPP_BACKWARD_VECTOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bfd.h b/contrib/media/updf/include/bfd.h new file mode 100644 index 0000000000..c29faa01ea --- /dev/null +++ b/contrib/media/updf/include/bfd.h @@ -0,0 +1,3612 @@ +/* Main header file for the bfd library -- portable access to object files. + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 + Free Software Foundation, Inc. + Contributed by Cygnus Support. + +** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them; +** instead, change bfd-in.h or the other BFD source files processed to +** generate these files. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* bfd.h -- The only header file required by users of the bfd library + +The bfd.h file is generated from bfd-in.h and various .c files; if you +change it, your changes will probably be lost. + +All the prototypes and definitions following the comment "THE FOLLOWING +IS EXTRACTED FROM THE SOURCE" are extracted from the source files for +BFD. If you change it, someone oneday will extract it from the source +again, and your changes will be lost. To save yourself from this bind, +change the definitions in the source in the bfd directory. Type "make +docs" and then "make headers" in that directory, and magically this file +will change to reflect your changes. + +If you don't have the tools to perform the extraction, then you are +safe from someone on your system trampling over your header files. +You should still maintain the equivalence between the source and this +file though; every change you make to the .c file should be reflected +here. */ + +#ifndef __BFD_H_SEEN__ +#define __BFD_H_SEEN__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ansidecl.h" + +/* These two lines get substitutions done by commands in Makefile.in. */ +#define BFD_VERSION "2.11.90.0.8" +#define BFD_ARCH_SIZE 32 +#define BFD_HOST_64BIT_LONG 0 +#if 0 +#define BFD_HOST_64_BIT +#define BFD_HOST_U_64_BIT +#endif + +#if BFD_ARCH_SIZE >= 64 +#define BFD64 +#endif + +#ifndef INLINE +#if __GNUC__ >= 2 +#define INLINE __inline__ +#else +#define INLINE +#endif +#endif + +/* forward declaration */ +typedef struct _bfd bfd; + +/* To squelch erroneous compiler warnings ("illegal pointer + combination") from the SVR3 compiler, we would like to typedef + boolean to int (it doesn't like functions which return boolean. + Making sure they are never implicitly declared to return int + doesn't seem to help). But this file is not configured based on + the host. */ +/* General rules: functions which are boolean return true on success + and false on failure (unless they're a predicate). -- bfd.doc */ +/* I'm sure this is going to break something and someone is going to + force me to change it. */ +/* typedef enum boolean {false, true} boolean; */ +/* Yup, SVR4 has a "typedef enum boolean" in -fnf */ +/* It gets worse if the host also defines a true/false enum... -sts */ +/* And even worse if your compiler has built-in boolean types... -law */ +#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)) +#define TRUE_FALSE_ALREADY_DEFINED +#endif +#ifdef MPW +/* Pre-emptive strike - get the file with the enum. */ +#include +#define TRUE_FALSE_ALREADY_DEFINED +#endif /* MPW */ +#ifndef TRUE_FALSE_ALREADY_DEFINED +typedef enum bfd_boolean {false, true} boolean; +#define BFD_TRUE_FALSE +#else +/* Use enum names that will appear nowhere else. */ +typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean; +#endif + +/* A pointer to a position in a file. */ +/* FIXME: This should be using off_t from . + For now, try to avoid breaking stuff by not including here. + This will break on systems with 64-bit file offsets (e.g. 4.4BSD). + Probably the best long-term answer is to avoid using file_ptr AND off_t + in this header file, and to handle this in the BFD implementation + rather than in its interface. */ +/* typedef off_t file_ptr; */ +typedef long int file_ptr; + +/* Support for different sizes of target format ints and addresses. + If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be + set to 1 above. Otherwise, if gcc is being used, this code will + use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be + defined above. */ + +#ifndef BFD_HOST_64_BIT +# if BFD_HOST_64BIT_LONG +# define BFD_HOST_64_BIT long +# define BFD_HOST_U_64_BIT unsigned long +# else +# ifdef __GNUC__ +# if __GNUC__ >= 2 +# define BFD_HOST_64_BIT long long +# define BFD_HOST_U_64_BIT unsigned long long +# endif /* __GNUC__ >= 2 */ +# endif /* ! defined (__GNUC__) */ +# endif /* ! BFD_HOST_64BIT_LONG */ +#endif /* ! defined (BFD_HOST_64_BIT) */ + +#ifdef BFD64 + +#ifndef BFD_HOST_64_BIT + #error No 64 bit integer type available +#endif /* ! defined (BFD_HOST_64_BIT) */ + +typedef BFD_HOST_U_64_BIT bfd_vma; +typedef BFD_HOST_64_BIT bfd_signed_vma; +typedef BFD_HOST_U_64_BIT bfd_size_type; +typedef BFD_HOST_U_64_BIT symvalue; + +#ifndef fprintf_vma +#if BFD_HOST_64BIT_LONG +#define sprintf_vma(s,x) sprintf (s, "%016lx", x) +#define fprintf_vma(f,x) fprintf (f, "%016lx", x) +#else +#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff))) +#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) +#define fprintf_vma(s,x) \ + fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x)) +#define sprintf_vma(s,x) \ + sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x)) +#endif +#endif + +#else /* not BFD64 */ + +/* Represent a target address. Also used as a generic unsigned type + which is guaranteed to be big enough to hold any arithmetic types + we need to deal with. */ +typedef unsigned long bfd_vma; + +/* A generic signed type which is guaranteed to be big enough to hold any + arithmetic types we need to deal with. Can be assumed to be compatible + with bfd_vma in the same way that signed and unsigned ints are compatible + (as parameters, in assignment, etc). */ +typedef long bfd_signed_vma; + +typedef unsigned long symvalue; +typedef unsigned long bfd_size_type; + +/* Print a bfd_vma x on stream s. */ +#define fprintf_vma(s,x) fprintf (s, "%08lx", x) +#define sprintf_vma(s,x) sprintf (s, "%08lx", x) + +#endif /* not BFD64 */ + +#define printf_vma(x) fprintf_vma(stdout,x) + +typedef unsigned int flagword; /* 32 bits of flags */ +typedef unsigned char bfd_byte; + +/** File formats */ + +typedef enum bfd_format { + bfd_unknown = 0, /* file format is unknown */ + bfd_object, /* linker/assember/compiler output */ + bfd_archive, /* object archive file */ + bfd_core, /* core dump */ + bfd_type_end} /* marks the end; don't use it! */ + bfd_format; + +/* Values that may appear in the flags field of a BFD. These also + appear in the object_flags field of the bfd_target structure, where + they indicate the set of flags used by that backend (not all flags + are meaningful for all object file formats) (FIXME: at the moment, + the object_flags values have mostly just been copied from backend + to another, and are not necessarily correct). */ + +/* No flags. */ +#define BFD_NO_FLAGS 0x00 + +/* BFD contains relocation entries. */ +#define HAS_RELOC 0x01 + +/* BFD is directly executable. */ +#define EXEC_P 0x02 + +/* BFD has line number information (basically used for F_LNNO in a + COFF header). */ +#define HAS_LINENO 0x04 + +/* BFD has debugging information. */ +#define HAS_DEBUG 0x08 + +/* BFD has symbols. */ +#define HAS_SYMS 0x10 + +/* BFD has local symbols (basically used for F_LSYMS in a COFF + header). */ +#define HAS_LOCALS 0x20 + +/* BFD is a dynamic object. */ +#define DYNAMIC 0x40 + +/* Text section is write protected (if D_PAGED is not set, this is + like an a.out NMAGIC file) (the linker sets this by default, but + clears it for -r or -N). */ +#define WP_TEXT 0x80 + +/* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the + linker sets this by default, but clears it for -r or -n or -N). */ +#define D_PAGED 0x100 + +/* BFD is relaxable (this means that bfd_relax_section may be able to + do something) (sometimes bfd_relax_section can do something even if + this is not set). */ +#define BFD_IS_RELAXABLE 0x200 + +/* This may be set before writing out a BFD to request using a + traditional format. For example, this is used to request that when + writing out an a.out object the symbols not be hashed to eliminate + duplicates. */ +#define BFD_TRADITIONAL_FORMAT 0x400 + +/* This flag indicates that the BFD contents are actually cached in + memory. If this is set, iostream points to a bfd_in_memory struct. */ +#define BFD_IN_MEMORY 0x800 + +/* symbols and relocation */ + +/* A count of carsyms (canonical archive symbols). */ +typedef unsigned long symindex; + +/* How to perform a relocation. */ +typedef const struct reloc_howto_struct reloc_howto_type; + +#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) + +/* General purpose part of a symbol X; + target specific parts are in libcoff.h, libaout.h, etc. */ + +#define bfd_get_section(x) ((x)->section) +#define bfd_get_output_section(x) ((x)->section->output_section) +#define bfd_set_section(x,y) ((x)->section) = (y) +#define bfd_asymbol_base(x) ((x)->section->vma) +#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) +#define bfd_asymbol_name(x) ((x)->name) +/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ +#define bfd_asymbol_bfd(x) ((x)->the_bfd) +#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour) + +/* A canonical archive symbol. */ +/* This is a type pun with struct ranlib on purpose! */ +typedef struct carsym { + char *name; + file_ptr file_offset; /* look here to find the file */ +} carsym; /* to make these you call a carsymogen */ + +/* Used in generating armaps (archive tables of contents). + Perhaps just a forward definition would do? */ +struct orl { /* output ranlib */ + char **name; /* symbol name */ + file_ptr pos; /* bfd* or file position */ + int namidx; /* index into string table */ +}; + +/* Linenumber stuff */ +typedef struct lineno_cache_entry { + unsigned int line_number; /* Linenumber from start of function*/ + union { + struct symbol_cache_entry *sym; /* Function name */ + unsigned long offset; /* Offset into section */ + } u; +} alent; + +/* object and core file sections */ + +#define align_power(addr, align) \ + ( ((addr) + ((1<<(align))-1)) & (-1 << (align))) + +typedef struct sec *sec_ptr; + +#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) +#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) +#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) +#define bfd_section_name(bfd, ptr) ((ptr)->name) +#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) +#define bfd_section_vma(bfd, ptr) ((ptr)->vma) +#define bfd_section_lma(bfd, ptr) ((ptr)->lma) +#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) +#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0) +#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata) + +#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) + +#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma= (val)), ((ptr)->user_set_vma = (boolean)true), true) +#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) +#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) + +typedef struct stat stat_type; + +typedef enum bfd_print_symbol +{ + bfd_print_symbol_name, + bfd_print_symbol_more, + bfd_print_symbol_all +} bfd_print_symbol_type; + +/* Information about a symbol that nm needs. */ + +typedef struct _symbol_info +{ + symvalue value; + char type; + CONST char *name; /* Symbol name. */ + unsigned char stab_type; /* Stab type. */ + char stab_other; /* Stab other. */ + short stab_desc; /* Stab desc. */ + CONST char *stab_name; /* String for stab type. */ +} symbol_info; + +/* Get the name of a stabs type code. */ + +extern const char *bfd_get_stab_name PARAMS ((int)); + +/* Hash table routines. There is no way to free up a hash table. */ + +/* An element in the hash table. Most uses will actually use a larger + structure, and an instance of this will be the first field. */ + +struct bfd_hash_entry +{ + /* Next entry for this hash code. */ + struct bfd_hash_entry *next; + /* String being hashed. */ + const char *string; + /* Hash code. This is the full hash code, not the index into the + table. */ + unsigned long hash; +}; + +/* A hash table. */ + +struct bfd_hash_table +{ + /* The hash array. */ + struct bfd_hash_entry **table; + /* The number of slots in the hash table. */ + unsigned int size; + /* A function used to create new elements in the hash table. The + first entry is itself a pointer to an element. When this + function is first invoked, this pointer will be NULL. However, + having the pointer permits a hierarchy of method functions to be + built each of which calls the function in the superclass. Thus + each function should be written to allocate a new block of memory + only if the argument is NULL. */ + struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *, + struct bfd_hash_table *, + const char *)); + /* An objalloc for this hash table. This is a struct objalloc *, + but we use PTR to avoid requiring the inclusion of objalloc.h. */ + PTR memory; +}; + +/* Initialize a hash table. */ +extern boolean bfd_hash_table_init + PARAMS ((struct bfd_hash_table *, + struct bfd_hash_entry *(*) (struct bfd_hash_entry *, + struct bfd_hash_table *, + const char *))); + +/* Initialize a hash table specifying a size. */ +extern boolean bfd_hash_table_init_n + PARAMS ((struct bfd_hash_table *, + struct bfd_hash_entry *(*) (struct bfd_hash_entry *, + struct bfd_hash_table *, + const char *), + unsigned int size)); + +/* Free up a hash table. */ +extern void bfd_hash_table_free PARAMS ((struct bfd_hash_table *)); + +/* Look up a string in a hash table. If CREATE is true, a new entry + will be created for this string if one does not already exist. The + COPY argument must be true if this routine should copy the string + into newly allocated memory when adding an entry. */ +extern struct bfd_hash_entry *bfd_hash_lookup + PARAMS ((struct bfd_hash_table *, const char *, boolean create, + boolean copy)); + +/* Replace an entry in a hash table. */ +extern void bfd_hash_replace + PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old, + struct bfd_hash_entry *nw)); + +/* Base method for creating a hash table entry. */ +extern struct bfd_hash_entry *bfd_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, + const char *)); + +/* Grab some space for a hash table entry. */ +extern PTR bfd_hash_allocate PARAMS ((struct bfd_hash_table *, + unsigned int)); + +/* Traverse a hash table in a random order, calling a function on each + element. If the function returns false, the traversal stops. The + INFO argument is passed to the function. */ +extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *, + boolean (*) (struct bfd_hash_entry *, + PTR), + PTR info)); + +/* Semi-portable string concatenation in cpp. + The CAT4 hack is to avoid a problem with some strict ANSI C preprocessors. + The problem is, "32_" is not a valid preprocessing token, and we don't + want extra underscores (e.g., "nlm_32_"). The XCAT2 macro will cause the + inner CAT macros to be evaluated first, producing still-valid pp-tokens. + Then the final concatenation can be done. (Sigh.) */ +#ifndef CAT +#ifdef SABER +#define CAT(a,b) a##b +#define CAT3(a,b,c) a##b##c +#define CAT4(a,b,c,d) a##b##c##d +#else +#if defined(__STDC__) || defined(ALMOST_STDC) +#define CAT(a,b) a##b +#define CAT3(a,b,c) a##b##c +#define XCAT2(a,b) CAT(a,b) +#define CAT4(a,b,c,d) XCAT2(CAT(a,b),CAT(c,d)) +#else +#define CAT(a,b) a/**/b +#define CAT3(a,b,c) a/**/b/**/c +#define CAT4(a,b,c,d) a/**/b/**/c/**/d +#endif +#endif +#endif + +#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table + +/* User program access to BFD facilities */ + +/* Direct I/O routines, for programs which know more about the object + file than BFD does. Use higher level routines if possible. */ + +extern bfd_size_type bfd_read + PARAMS ((PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd)); +extern bfd_size_type bfd_write + PARAMS ((const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd)); +extern int bfd_seek PARAMS ((bfd *abfd, file_ptr fp, int direction)); +extern long bfd_tell PARAMS ((bfd *abfd)); +extern int bfd_flush PARAMS ((bfd *abfd)); +extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); + +/* Cast from const char * to char * so that caller can assign to + a char * without a warning. */ +#define bfd_get_filename(abfd) ((char *) (abfd)->filename) +#define bfd_get_cacheable(abfd) ((abfd)->cacheable) +#define bfd_get_format(abfd) ((abfd)->format) +#define bfd_get_target(abfd) ((abfd)->xvec->name) +#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) +#define bfd_family_coff(abfd) \ + (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ + bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) +#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) +#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) +#define bfd_header_big_endian(abfd) \ + ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) +#define bfd_header_little_endian(abfd) \ + ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) +#define bfd_get_file_flags(abfd) ((abfd)->flags) +#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) +#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) +#define bfd_my_archive(abfd) ((abfd)->my_archive) +#define bfd_has_map(abfd) ((abfd)->has_armap) + +#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) +#define bfd_usrdata(abfd) ((abfd)->usrdata) + +#define bfd_get_start_address(abfd) ((abfd)->start_address) +#define bfd_get_symcount(abfd) ((abfd)->symcount) +#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) +#define bfd_count_sections(abfd) ((abfd)->section_count) + +#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) + +#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) + +extern boolean bfd_cache_close PARAMS ((bfd *abfd)); +/* NB: This declaration should match the autogenerated one in libbfd.h. */ + +extern boolean bfd_record_phdr + PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, + boolean, boolean, unsigned int, struct sec **)); + +/* Byte swapping routines. */ + +bfd_vma bfd_getb64 PARAMS ((const unsigned char *)); +bfd_vma bfd_getl64 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getb_signed_64 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getl_signed_64 PARAMS ((const unsigned char *)); +bfd_vma bfd_getb32 PARAMS ((const unsigned char *)); +bfd_vma bfd_getl32 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getb_signed_32 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getl_signed_32 PARAMS ((const unsigned char *)); +bfd_vma bfd_getb16 PARAMS ((const unsigned char *)); +bfd_vma bfd_getl16 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getb_signed_16 PARAMS ((const unsigned char *)); +bfd_signed_vma bfd_getl_signed_16 PARAMS ((const unsigned char *)); +void bfd_putb64 PARAMS ((bfd_vma, unsigned char *)); +void bfd_putl64 PARAMS ((bfd_vma, unsigned char *)); +void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); +void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); +void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); +void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); + +/* Byte swapping routines which take size and endiannes as arguments. */ + +bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); +void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); + +/* Externally visible ECOFF routines. */ + +#if defined(__STDC__) || defined(ALMOST_STDC) +struct ecoff_debug_info; +struct ecoff_debug_swap; +struct ecoff_extr; +struct symbol_cache_entry; +struct bfd_link_info; +struct bfd_link_hash_entry; +struct bfd_elf_version_tree; +#endif +extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd)); +extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value)); +extern boolean bfd_ecoff_set_regmasks + PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask, + unsigned long *cprmask)); +extern PTR bfd_ecoff_debug_init + PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug, + const struct ecoff_debug_swap *output_swap, + struct bfd_link_info *)); +extern void bfd_ecoff_debug_free + PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, + const struct ecoff_debug_swap *output_swap, + struct bfd_link_info *)); +extern boolean bfd_ecoff_debug_accumulate + PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, + const struct ecoff_debug_swap *output_swap, + bfd *input_bfd, struct ecoff_debug_info *input_debug, + const struct ecoff_debug_swap *input_swap, + struct bfd_link_info *)); +extern boolean bfd_ecoff_debug_accumulate_other + PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, + const struct ecoff_debug_swap *output_swap, bfd *input_bfd, + struct bfd_link_info *)); +extern boolean bfd_ecoff_debug_externals + PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, + const struct ecoff_debug_swap *swap, + boolean relocateable, + boolean (*get_extr) (struct symbol_cache_entry *, + struct ecoff_extr *), + void (*set_index) (struct symbol_cache_entry *, + bfd_size_type))); +extern boolean bfd_ecoff_debug_one_external + PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, + const struct ecoff_debug_swap *swap, + const char *name, struct ecoff_extr *esym)); +extern bfd_size_type bfd_ecoff_debug_size + PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, + const struct ecoff_debug_swap *swap)); +extern boolean bfd_ecoff_write_debug + PARAMS ((bfd *abfd, struct ecoff_debug_info *debug, + const struct ecoff_debug_swap *swap, file_ptr where)); +extern boolean bfd_ecoff_write_accumulated_debug + PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug, + const struct ecoff_debug_swap *swap, + struct bfd_link_info *info, file_ptr where)); +extern boolean bfd_mips_ecoff_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + +/* Externally visible ELF routines. */ + +struct bfd_link_needed_list +{ + struct bfd_link_needed_list *next; + bfd *by; + const char *name; +}; + +extern boolean bfd_elf32_record_link_assignment + PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); +extern boolean bfd_elf64_record_link_assignment + PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean)); +extern struct bfd_link_needed_list *bfd_elf_get_needed_list + PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_elf_get_bfd_needed_list + PARAMS ((bfd *, struct bfd_link_needed_list **)); +extern boolean bfd_elf32_size_dynamic_sections + PARAMS ((bfd *, const char *, const char *, boolean, const char *, + const char * const *, struct bfd_link_info *, struct sec **, + struct bfd_elf_version_tree *)); +extern boolean bfd_elf64_size_dynamic_sections + PARAMS ((bfd *, const char *, const char *, boolean, const char *, + const char * const *, struct bfd_link_info *, struct sec **, + struct bfd_elf_version_tree *)); +extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); +extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); +extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); +extern struct bfd_link_needed_list *bfd_elf_get_runpath_list + PARAMS ((bfd *, struct bfd_link_info *)); + +/* Return an upper bound on the number of bytes required to store a + copy of ABFD's program header table entries. Return -1 if an error + occurs; bfd_get_error will return an appropriate code. */ +extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd)); + +/* Copy ABFD's program header table entries to *PHDRS. The entries + will be stored as an array of Elf_Internal_Phdr structures, as + defined in include/elf/internal.h. To find out how large the + buffer needs to be, call bfd_get_elf_phdr_upper_bound. + + Return the number of program header table entries read, or -1 if an + error occurs; bfd_get_error will return an appropriate code. */ +extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); + +/* Return the arch_size field of an elf bfd, or -1 if not elf. */ +extern int bfd_get_arch_size PARAMS ((bfd *)); + +/* Return true if address "naturally" sign extends, or -1 if not elf. */ +extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); + +extern boolean bfd_m68k_elf32_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + +/* SunOS shared library support routines for the linker. */ + +extern struct bfd_link_needed_list *bfd_sunos_get_needed_list + PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_sunos_record_link_assignment + PARAMS ((bfd *, struct bfd_link_info *, const char *)); +extern boolean bfd_sunos_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **, + struct sec **)); + +/* Linux shared library support routines for the linker. */ + +extern boolean bfd_i386linux_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_m68klinux_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_sparclinux_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); + +/* mmap hacks */ + +struct _bfd_window_internal; +typedef struct _bfd_window_internal bfd_window_internal; + +typedef struct _bfd_window { + /* What the user asked for. */ + PTR data; + bfd_size_type size; + /* The actual window used by BFD. Small user-requested read-only + regions sharing a page may share a single window into the object + file. Read-write versions shouldn't until I've fixed things to + keep track of which portions have been claimed by the + application; don't want to give the same region back when the + application wants two writable copies! */ + struct _bfd_window_internal *i; +} bfd_window; + +extern void bfd_init_window PARAMS ((bfd_window *)); +extern void bfd_free_window PARAMS ((bfd_window *)); +extern boolean bfd_get_file_window + PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean)); + +/* XCOFF support routines for the linker. */ + +extern boolean bfd_xcoff_link_record_set + PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, + bfd_size_type)); +extern boolean bfd_xcoff_import_symbol + PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, + bfd_vma, const char *, const char *, const char *)); +extern boolean bfd_xcoff_export_symbol + PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, + boolean)); +extern boolean bfd_xcoff_link_count_reloc + PARAMS ((bfd *, struct bfd_link_info *, const char *)); +extern boolean bfd_xcoff_record_link_assignment + PARAMS ((bfd *, struct bfd_link_info *, const char *)); +extern boolean bfd_xcoff_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *, + unsigned long, unsigned long, unsigned long, boolean, + int, boolean, boolean, struct sec **)); + +/* Externally visible COFF routines. */ + +#if defined(__STDC__) || defined(ALMOST_STDC) +struct internal_syment; +union internal_auxent; +#endif + +extern boolean bfd_coff_get_syment + PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *)); + +extern boolean bfd_coff_get_auxent + PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *)); + +extern boolean bfd_coff_set_symbol_class + PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); + +extern boolean bfd_m68k_coff_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + +/* ARM Interworking support. Called from linker. */ +extern boolean bfd_arm_allocate_interworking_sections + PARAMS ((struct bfd_link_info *)); + +extern boolean bfd_arm_process_before_allocation + PARAMS ((bfd *, struct bfd_link_info *, int)); + +extern boolean bfd_arm_get_bfd_for_interworking + PARAMS ((bfd *, struct bfd_link_info *)); + +/* PE ARM Interworking support. Called from linker. */ +extern boolean bfd_arm_pe_allocate_interworking_sections + PARAMS ((struct bfd_link_info *)); + +extern boolean bfd_arm_pe_process_before_allocation + PARAMS ((bfd *, struct bfd_link_info *, int)); + +extern boolean bfd_arm_pe_get_bfd_for_interworking + PARAMS ((bfd *, struct bfd_link_info *)); + +/* ELF ARM Interworking support. Called from linker. */ +extern boolean bfd_elf32_arm_allocate_interworking_sections + PARAMS ((struct bfd_link_info *)); + +extern boolean bfd_elf32_arm_process_before_allocation + PARAMS ((bfd *, struct bfd_link_info *, int)); + +extern boolean bfd_elf32_arm_get_bfd_for_interworking + PARAMS ((bfd *, struct bfd_link_info *)); + +/* TI COFF load page support. */ +extern void bfd_ticoff_set_section_load_page + PARAMS ((struct sec *, int)); + +extern int bfd_ticoff_get_section_load_page + PARAMS ((struct sec *)); + +/* And more from the source. */ +void +bfd_init PARAMS ((void)); + +bfd * +bfd_openr PARAMS ((CONST char *filename, CONST char *target)); + +bfd * +bfd_fdopenr PARAMS ((CONST char *filename, CONST char *target, int fd)); + +bfd * +bfd_openstreamr PARAMS ((const char *, const char *, PTR)); + +bfd * +bfd_openw PARAMS ((CONST char *filename, CONST char *target)); + +boolean +bfd_close PARAMS ((bfd *abfd)); + +boolean +bfd_close_all_done PARAMS ((bfd *)); + +bfd * +bfd_create PARAMS ((CONST char *filename, bfd *templ)); + +boolean +bfd_make_writable PARAMS ((bfd *abfd)); + +boolean +bfd_make_readable PARAMS ((bfd *abfd)); + + +/* Byte swapping macros for user section data. */ + +#define bfd_put_8(abfd, val, ptr) \ + ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) +#define bfd_put_signed_8 \ + bfd_put_8 +#define bfd_get_8(abfd, ptr) \ + (*(unsigned char *) (ptr)) +#define bfd_get_signed_8(abfd, ptr) \ + ((*(unsigned char *) (ptr) ^ 0x80) - 0x80) + +#define bfd_put_16(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) +#define bfd_put_signed_16 \ + bfd_put_16 +#define bfd_get_16(abfd, ptr) \ + BFD_SEND(abfd, bfd_getx16, (ptr)) +#define bfd_get_signed_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) + +#define bfd_put_32(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_putx32, ((val),(ptr))) +#define bfd_put_signed_32 \ + bfd_put_32 +#define bfd_get_32(abfd, ptr) \ + BFD_SEND(abfd, bfd_getx32, (ptr)) +#define bfd_get_signed_32(abfd, ptr) \ + BFD_SEND(abfd, bfd_getx_signed_32, (ptr)) + +#define bfd_put_64(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_putx64, ((val), (ptr))) +#define bfd_put_signed_64 \ + bfd_put_64 +#define bfd_get_64(abfd, ptr) \ + BFD_SEND(abfd, bfd_getx64, (ptr)) +#define bfd_get_signed_64(abfd, ptr) \ + BFD_SEND(abfd, bfd_getx_signed_64, (ptr)) + +#define bfd_get(bits, abfd, ptr) \ + ((bits) == 8 ? bfd_get_8 (abfd, ptr) \ + : (bits) == 16 ? bfd_get_16 (abfd, ptr) \ + : (bits) == 32 ? bfd_get_32 (abfd, ptr) \ + : (bits) == 64 ? bfd_get_64 (abfd, ptr) \ + : (abort (), (bfd_vma) - 1)) + +#define bfd_put(bits, abfd, val, ptr) \ + ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ + : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ + : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ + : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ + : (abort (), (void) 0)) + + +/* Byte swapping macros for file header data. */ + +#define bfd_h_put_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) +#define bfd_h_put_signed_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) +#define bfd_h_get_8(abfd, ptr) \ + bfd_get_8 (abfd, ptr) +#define bfd_h_get_signed_8(abfd, ptr) \ + bfd_get_signed_8 (abfd, ptr) + +#define bfd_h_put_16(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_h_putx16,(val,ptr)) +#define bfd_h_put_signed_16 \ + bfd_h_put_16 +#define bfd_h_get_16(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx16,(ptr)) +#define bfd_h_get_signed_16(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr)) + +#define bfd_h_put_32(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_h_putx32,(val,ptr)) +#define bfd_h_put_signed_32 \ + bfd_h_put_32 +#define bfd_h_get_32(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx32,(ptr)) +#define bfd_h_get_signed_32(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr)) + +#define bfd_h_put_64(abfd, val, ptr) \ + BFD_SEND(abfd, bfd_h_putx64,(val, ptr)) +#define bfd_h_put_signed_64 \ + bfd_h_put_64 +#define bfd_h_get_64(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx64,(ptr)) +#define bfd_h_get_signed_64(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) + +/* This structure is used for a comdat section, as in PE. A comdat + section is associated with a particular symbol. When the linker + sees a comdat section, it keeps only one of the sections with a + given name and associated with a given symbol. */ + +struct bfd_comdat_info +{ + /* The name of the symbol associated with a comdat section. */ + const char *name; + + /* The local symbol table index of the symbol associated with a + comdat section. This is only meaningful to the object file format + specific code; it is not an index into the list returned by + bfd_canonicalize_symtab. */ + long symbol; +}; + +typedef struct sec +{ + /* The name of the section; the name isn't a copy, the pointer is + the same as that passed to bfd_make_section. */ + + const char *name; + + /* A unique sequence number. */ + + int id; + + /* Which section is it; 0..nth. */ + + int index; + + /* The next section in the list belonging to the BFD, or NULL. */ + + struct sec *next; + + /* The field flags contains attributes of the section. Some + flags are read in from the object file, and some are + synthesized from other information. */ + + flagword flags; + +#define SEC_NO_FLAGS 0x000 + + /* Tells the OS to allocate space for this section when loading. + This is clear for a section containing debug information only. */ +#define SEC_ALLOC 0x001 + + /* Tells the OS to load the section from the file when loading. + This is clear for a .bss section. */ +#define SEC_LOAD 0x002 + + /* The section contains data still to be relocated, so there is + some relocation information too. */ +#define SEC_RELOC 0x004 + +#if 0 /* Obsolete ? */ +#define SEC_BALIGN 0x008 +#endif + + /* A signal to the OS that the section contains read only data. */ +#define SEC_READONLY 0x010 + + /* The section contains code only. */ +#define SEC_CODE 0x020 + + /* The section contains data only. */ +#define SEC_DATA 0x040 + + /* The section will reside in ROM. */ +#define SEC_ROM 0x080 + + /* The section contains constructor information. This section + type is used by the linker to create lists of constructors and + destructors used by <>. When a back end sees a symbol + which should be used in a constructor list, it creates a new + section for the type of name (e.g., <<__CTOR_LIST__>>), attaches + the symbol to it, and builds a relocation. To build the lists + of constructors, all the linker has to do is catenate all the + sections called <<__CTOR_LIST__>> and relocate the data + contained within - exactly the operations it would peform on + standard data. */ +#define SEC_CONSTRUCTOR 0x100 + + /* The section is a constructor, and should be placed at the + end of the text, data, or bss section(?). */ +#define SEC_CONSTRUCTOR_TEXT 0x1100 +#define SEC_CONSTRUCTOR_DATA 0x2100 +#define SEC_CONSTRUCTOR_BSS 0x3100 + + /* The section has contents - a data section could be + <> | <>; a debug section could be + <> */ +#define SEC_HAS_CONTENTS 0x200 + + /* An instruction to the linker to not output the section + even if it has information which would normally be written. */ +#define SEC_NEVER_LOAD 0x400 + + /* The section is a COFF shared library section. This flag is + only for the linker. If this type of section appears in + the input file, the linker must copy it to the output file + without changing the vma or size. FIXME: Although this + was originally intended to be general, it really is COFF + specific (and the flag was renamed to indicate this). It + might be cleaner to have some more general mechanism to + allow the back end to control what the linker does with + sections. */ +#define SEC_COFF_SHARED_LIBRARY 0x800 + + /* The section has GOT references. This flag is only for the + linker, and is currently only used by the elf32-hppa back end. + It will be set if global offset table references were detected + in this section, which indicate to the linker that the section + contains PIC code, and must be handled specially when doing a + static link. */ +#define SEC_HAS_GOT_REF 0x4000 + + /* The section contains common symbols (symbols may be defined + multiple times, the value of a symbol is the amount of + space it requires, and the largest symbol value is the one + used). Most targets have exactly one of these (which we + translate to bfd_com_section_ptr), but ECOFF has two. */ +#define SEC_IS_COMMON 0x8000 + + /* The section contains only debugging information. For + example, this is set for ELF .debug and .stab sections. + strip tests this flag to see if a section can be + discarded. */ +#define SEC_DEBUGGING 0x10000 + + /* The contents of this section are held in memory pointed to + by the contents field. This is checked by bfd_get_section_contents, + and the data is retrieved from memory if appropriate. */ +#define SEC_IN_MEMORY 0x20000 + + /* The contents of this section are to be excluded by the + linker for executable and shared objects unless those + objects are to be further relocated. */ +#define SEC_EXCLUDE 0x40000 + + /* The contents of this section are to be sorted by the + based on the address specified in the associated symbol + table. */ +#define SEC_SORT_ENTRIES 0x80000 + + /* When linking, duplicate sections of the same name should be + discarded, rather than being combined into a single section as + is usually done. This is similar to how common symbols are + handled. See SEC_LINK_DUPLICATES below. */ +#define SEC_LINK_ONCE 0x100000 + + /* If SEC_LINK_ONCE is set, this bitfield describes how the linker + should handle duplicate sections. */ +#define SEC_LINK_DUPLICATES 0x600000 + + /* This value for SEC_LINK_DUPLICATES means that duplicate + sections with the same name should simply be discarded. */ +#define SEC_LINK_DUPLICATES_DISCARD 0x0 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if there are any duplicate sections, although + it should still only link one copy. */ +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections are a different size. */ +#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections contain different + contents. */ +#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 + + /* This section was created by the linker as part of dynamic + relocation or other arcane processing. It is skipped when + going through the first-pass output, trusting that someone + else up the line will take care of it later. */ +#define SEC_LINKER_CREATED 0x800000 + + /* This section should not be subject to garbage collection. */ +#define SEC_KEEP 0x1000000 + + /* This section contains "short" data, and should be placed + "near" the GP. */ +#define SEC_SMALL_DATA 0x2000000 + + /* This section contains data which may be shared with other + executables or shared objects. */ +#define SEC_SHARED 0x4000000 + + /* When a section with this flag is being linked, then if the size of + the input section is less than a page, it should not cross a page + boundary. If the size of the input section is one page or more, it + should be aligned on a page boundary. */ +#define SEC_BLOCK 0x8000000 + + /* Conditionally link this section; do not link if there are no + references found to any symbol in the section. */ +#define SEC_CLINK 0x10000000 + + /* Attempt to merge identical entities in the section. + Entity size is given in the entsize field. */ +#define SEC_MERGE 0x20000000 + + /* If given with SEC_MERGE, entities to merge are zero terminated + strings where entsize specifies character size instead of fixed + size entries. */ +#define SEC_STRINGS 0x40000000 + + /* End of section flags. */ + + /* Some internal packed boolean fields. */ + + /* See the vma field. */ + unsigned int user_set_vma : 1; + + /* Whether relocations have been processed. */ + unsigned int reloc_done : 1; + + /* A mark flag used by some of the linker backends. */ + unsigned int linker_mark : 1; + + /* A mark flag used by some linker backends for garbage collection. */ + unsigned int gc_mark : 1; + + /* Used by the ELF code to mark sections which have been allocated to segments. */ + unsigned int segment_mark : 1; + + /* End of internal packed boolean fields. */ + + /* The virtual memory address of the section - where it will be + at run time. The symbols are relocated against this. The + user_set_vma flag is maintained by bfd; if it's not set, the + backend can assign addresses (for example, in <>, where + the default address for <<.data>> is dependent on the specific + target and various flags). */ + + bfd_vma vma; + + /* The load address of the section - where it would be in a + rom image; really only used for writing section header + information. */ + + bfd_vma lma; + + /* The size of the section in octets, as it will be output. + Contains a value even if the section has no contents (e.g., the + size of <<.bss>>). This will be filled in after relocation. */ + + bfd_size_type _cooked_size; + + /* The original size on disk of the section, in octets. Normally this + value is the same as the size, but if some relaxing has + been done, then this value will be bigger. */ + + bfd_size_type _raw_size; + + /* If this section is going to be output, then this value is the + offset in *bytes* into the output section of the first byte in the + input section (byte ==> smallest addressable unit on the + target). In most cases, if this was going to start at the + 100th octet (8-bit quantity) in the output section, this value + would be 100. However, if the target byte size is 16 bits + (bfd_octets_per_byte is "2"), this value would be 50. */ + + bfd_vma output_offset; + + /* The output section through which to map on output. */ + + struct sec *output_section; + + /* The alignment requirement of the section, as an exponent of 2 - + e.g., 3 aligns to 2^3 (or 8). */ + + unsigned int alignment_power; + + /* If an input section, a pointer to a vector of relocation + records for the data in this section. */ + + struct reloc_cache_entry *relocation; + + /* If an output section, a pointer to a vector of pointers to + relocation records for the data in this section. */ + + struct reloc_cache_entry **orelocation; + + /* The number of relocation records in one of the above */ + + unsigned reloc_count; + + /* Information below is back end specific - and not always used + or updated. */ + + /* File position of section data. */ + + file_ptr filepos; + + /* File position of relocation info. */ + + file_ptr rel_filepos; + + /* File position of line data. */ + + file_ptr line_filepos; + + /* Pointer to data for applications. */ + + PTR userdata; + + /* If the SEC_IN_MEMORY flag is set, this points to the actual + contents. */ + unsigned char *contents; + + /* Attached line number information. */ + + alent *lineno; + + /* Number of line number records. */ + + unsigned int lineno_count; + + /* Entity size for merging purposes. */ + + unsigned int entsize; + + /* Optional information about a COMDAT entry; NULL if not COMDAT. */ + + struct bfd_comdat_info *comdat; + + /* Points to the kept section if this section is a link-once section, + and is discarded. */ + struct sec *kept_section; + + /* When a section is being output, this value changes as more + linenumbers are written out. */ + + file_ptr moving_line_filepos; + + /* What the section number is in the target world. */ + + int target_index; + + PTR used_by_bfd; + + /* If this is a constructor section then here is a list of the + relocations created to relocate items within it. */ + + struct relent_chain *constructor_chain; + + /* The BFD which owns the section. */ + + bfd *owner; + + /* A symbol which points at this section only */ + struct symbol_cache_entry *symbol; + struct symbol_cache_entry **symbol_ptr_ptr; + + struct bfd_link_order *link_order_head; + struct bfd_link_order *link_order_tail; +} asection ; + +/* These sections are global, and are managed by BFD. The application + and target back end are not permitted to change the values in + these sections. New code should use the section_ptr macros rather + than referring directly to the const sections. The const sections + may eventually vanish. */ +#define BFD_ABS_SECTION_NAME "*ABS*" +#define BFD_UND_SECTION_NAME "*UND*" +#define BFD_COM_SECTION_NAME "*COM*" +#define BFD_IND_SECTION_NAME "*IND*" + +/* the absolute section */ +extern const asection bfd_abs_section; +#define bfd_abs_section_ptr ((asection *) &bfd_abs_section) +#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) +/* Pointer to the undefined section */ +extern const asection bfd_und_section; +#define bfd_und_section_ptr ((asection *) &bfd_und_section) +#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) +/* Pointer to the common section */ +extern const asection bfd_com_section; +#define bfd_com_section_ptr ((asection *) &bfd_com_section) +/* Pointer to the indirect section */ +extern const asection bfd_ind_section; +#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) +#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) + +extern const struct symbol_cache_entry * const bfd_abs_symbol; +extern const struct symbol_cache_entry * const bfd_com_symbol; +extern const struct symbol_cache_entry * const bfd_und_symbol; +extern const struct symbol_cache_entry * const bfd_ind_symbol; +#define bfd_get_section_size_before_reloc(section) \ + ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \ + : (section)->_raw_size) +#define bfd_get_section_size_after_reloc(section) \ + ((section)->reloc_done ? (section)->_cooked_size \ + : (abort (), (bfd_size_type) 1)) +asection * +bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name)); + +char * +bfd_get_unique_section_name PARAMS ((bfd *abfd, + const char *templat, + int *count)); + +asection * +bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name)); + +asection * +bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name)); + +asection * +bfd_make_section PARAMS ((bfd *, const char *name)); + +boolean +bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags)); + +void +bfd_map_over_sections PARAMS ((bfd *abfd, + void (*func) (bfd *abfd, + asection *sect, + PTR obj), + PTR obj)); + +boolean +bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val)); + +boolean +bfd_set_section_contents PARAMS ((bfd *abfd, + asection *section, + PTR data, + file_ptr offset, + bfd_size_type count)); + +boolean +bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, PTR location, + file_ptr offset, bfd_size_type count)); + +boolean +bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec)); + +#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) +void +_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section)); + +enum bfd_architecture +{ + bfd_arch_unknown, /* File arch not known */ + bfd_arch_obscure, /* Arch known, not one of these */ + bfd_arch_m68k, /* Motorola 68xxx */ +#define bfd_mach_m68000 1 +#define bfd_mach_m68008 2 +#define bfd_mach_m68010 3 +#define bfd_mach_m68020 4 +#define bfd_mach_m68030 5 +#define bfd_mach_m68040 6 +#define bfd_mach_m68060 7 +#define bfd_mach_cpu32 8 +#define bfd_mach_mcf5200 9 +#define bfd_mach_mcf5206e 10 +#define bfd_mach_mcf5307 11 +#define bfd_mach_mcf5407 12 + bfd_arch_vax, /* DEC Vax */ + bfd_arch_i960, /* Intel 960 */ + /* The order of the following is important. + lower number indicates a machine type that + only accepts a subset of the instructions + available to machines with higher numbers. + The exception is the "ca", which is + incompatible with all other machines except + "core". */ + +#define bfd_mach_i960_core 1 +#define bfd_mach_i960_ka_sa 2 +#define bfd_mach_i960_kb_sb 3 +#define bfd_mach_i960_mc 4 +#define bfd_mach_i960_xa 5 +#define bfd_mach_i960_ca 6 +#define bfd_mach_i960_jx 7 +#define bfd_mach_i960_hx 8 + + bfd_arch_a29k, /* AMD 29000 */ + bfd_arch_sparc, /* SPARC */ +#define bfd_mach_sparc 1 +/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ +#define bfd_mach_sparc_sparclet 2 +#define bfd_mach_sparc_sparclite 3 +#define bfd_mach_sparc_v8plus 4 +#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_sparclite_le 6 +#define bfd_mach_sparc_v9 7 +#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */ +#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */ +/* Nonzero if MACH has the v9 instruction set. */ +#define bfd_mach_sparc_v9_p(mach) \ + ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ + && (mach) != bfd_mach_sparc_sparclite_le) + bfd_arch_mips, /* MIPS Rxxxx */ +#define bfd_mach_mips3000 3000 +#define bfd_mach_mips3900 3900 +#define bfd_mach_mips4000 4000 +#define bfd_mach_mips4010 4010 +#define bfd_mach_mips4100 4100 +#define bfd_mach_mips4111 4111 +#define bfd_mach_mips4300 4300 +#define bfd_mach_mips4400 4400 +#define bfd_mach_mips4600 4600 +#define bfd_mach_mips4650 4650 +#define bfd_mach_mips5000 5000 +#define bfd_mach_mips6000 6000 +#define bfd_mach_mips8000 8000 +#define bfd_mach_mips10000 10000 +#define bfd_mach_mips16 16 +#define bfd_mach_mips32 32 +#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */ +#define bfd_mach_mips5 5 +#define bfd_mach_mips64 64 +#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ + bfd_arch_i386, /* Intel 386 */ +#define bfd_mach_i386_i386 0 +#define bfd_mach_i386_i8086 1 +#define bfd_mach_i386_i386_intel_syntax 2 +#define bfd_mach_x86_64 3 +#define bfd_mach_x86_64_intel_syntax 4 + bfd_arch_we32k, /* AT&T WE32xxx */ + bfd_arch_tahoe, /* CCI/Harris Tahoe */ + bfd_arch_i860, /* Intel 860 */ + bfd_arch_i370, /* IBM 360/370 Mainframes */ + bfd_arch_romp, /* IBM ROMP PC/RT */ + bfd_arch_alliant, /* Alliant */ + bfd_arch_convex, /* Convex */ + bfd_arch_m88k, /* Motorola 88xxx */ + bfd_arch_pyramid, /* Pyramid Technology */ + bfd_arch_h8300, /* Hitachi H8/300 */ +#define bfd_mach_h8300 1 +#define bfd_mach_h8300h 2 +#define bfd_mach_h8300s 3 + bfd_arch_pdp11, /* DEC PDP-11 */ + bfd_arch_powerpc, /* PowerPC */ +#define bfd_mach_ppc 0 +#define bfd_mach_ppc_403 403 +#define bfd_mach_ppc_403gc 4030 +#define bfd_mach_ppc_505 505 +#define bfd_mach_ppc_601 601 +#define bfd_mach_ppc_602 602 +#define bfd_mach_ppc_603 603 +#define bfd_mach_ppc_ec603e 6031 +#define bfd_mach_ppc_604 604 +#define bfd_mach_ppc_620 620 +#define bfd_mach_ppc_630 630 +#define bfd_mach_ppc_750 750 +#define bfd_mach_ppc_860 860 +#define bfd_mach_ppc_a35 35 +#define bfd_mach_ppc_rs64ii 642 +#define bfd_mach_ppc_rs64iii 643 +#define bfd_mach_ppc_7400 7400 + bfd_arch_rs6000, /* IBM RS/6000 */ +#define bfd_mach_rs6k 0 +#define bfd_mach_rs6k_rs1 6001 +#define bfd_mach_rs6k_rsc 6003 +#define bfd_mach_rs6k_rs2 6002 + bfd_arch_hppa, /* HP PA RISC */ + bfd_arch_d10v, /* Mitsubishi D10V */ +#define bfd_mach_d10v 0 +#define bfd_mach_d10v_ts2 2 +#define bfd_mach_d10v_ts3 3 + bfd_arch_d30v, /* Mitsubishi D30V */ + bfd_arch_m68hc11, /* Motorola 68HC11 */ + bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_z8k, /* Zilog Z8000 */ +#define bfd_mach_z8001 1 +#define bfd_mach_z8002 2 + bfd_arch_h8500, /* Hitachi H8/500 */ + bfd_arch_sh, /* Hitachi SH */ +#define bfd_mach_sh 0 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 + bfd_arch_alpha, /* Dec Alpha */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 + bfd_arch_arm, /* Advanced Risc Machines ARM */ +#define bfd_mach_arm_2 1 +#define bfd_mach_arm_2a 2 +#define bfd_mach_arm_3 3 +#define bfd_mach_arm_3M 4 +#define bfd_mach_arm_4 5 +#define bfd_mach_arm_4T 6 +#define bfd_mach_arm_5 7 +#define bfd_mach_arm_5T 8 +#define bfd_mach_arm_5TE 9 +#define bfd_mach_arm_XScale 10 + bfd_arch_ns32k, /* National Semiconductors ns32000 */ + bfd_arch_w65, /* WDC 65816 */ + bfd_arch_tic30, /* Texas Instruments TMS320C30 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ + bfd_arch_tic80, /* TI TMS320c80 (MVP) */ + bfd_arch_v850, /* NEC V850 */ +#define bfd_mach_v850 0 +#define bfd_mach_v850e 'E' +#define bfd_mach_v850ea 'A' + bfd_arch_arc, /* ARC Cores */ +#define bfd_mach_arc_5 0 +#define bfd_mach_arc_6 1 +#define bfd_mach_arc_7 2 +#define bfd_mach_arc_8 3 + bfd_arch_m32r, /* Mitsubishi M32R/D */ +#define bfd_mach_m32r 0 /* backwards compatibility */ +#define bfd_mach_m32rx 'x' + bfd_arch_mn10200, /* Matsushita MN10200 */ + bfd_arch_mn10300, /* Matsushita MN10300 */ +#define bfd_mach_mn10300 300 +#define bfd_mach_am33 330 + bfd_arch_fr30, +#define bfd_mach_fr30 0x46523330 + bfd_arch_mcore, + bfd_arch_ia64, /* HP/Intel ia64 */ +#define bfd_mach_ia64_elf64 0 +#define bfd_mach_ia64_elf32 1 + bfd_arch_pj, + bfd_arch_avr, /* Atmel AVR microcontrollers */ +#define bfd_mach_avr1 1 +#define bfd_mach_avr2 2 +#define bfd_mach_avr3 3 +#define bfd_mach_avr4 4 +#define bfd_mach_avr5 5 + bfd_arch_cris, /* Axis CRIS */ + bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_s390_esa 0 +#define bfd_mach_s390_esame 1 + bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_last + }; + +typedef struct bfd_arch_info +{ + int bits_per_word; + int bits_per_address; + int bits_per_byte; + enum bfd_architecture arch; + unsigned long mach; + const char *arch_name; + const char *printable_name; + unsigned int section_align_power; + /* True if this is the default machine for the architecture. */ + boolean the_default; + const struct bfd_arch_info * (*compatible) + PARAMS ((const struct bfd_arch_info *a, + const struct bfd_arch_info *b)); + + boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *)); + + const struct bfd_arch_info *next; +} bfd_arch_info_type; +const char * +bfd_printable_name PARAMS ((bfd *abfd)); + +const bfd_arch_info_type * +bfd_scan_arch PARAMS ((const char *string)); + +const char ** +bfd_arch_list PARAMS ((void)); + +const bfd_arch_info_type * +bfd_arch_get_compatible PARAMS (( + const bfd *abfd, + const bfd *bbfd)); + +void +bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg)); + +enum bfd_architecture +bfd_get_arch PARAMS ((bfd *abfd)); + +unsigned long +bfd_get_mach PARAMS ((bfd *abfd)); + +unsigned int +bfd_arch_bits_per_byte PARAMS ((bfd *abfd)); + +unsigned int +bfd_arch_bits_per_address PARAMS ((bfd *abfd)); + +const bfd_arch_info_type * +bfd_get_arch_info PARAMS ((bfd *abfd)); + +const bfd_arch_info_type * +bfd_lookup_arch PARAMS ((enum bfd_architecture + arch, + unsigned long machine)); + +const char * +bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine)); + +unsigned int +bfd_octets_per_byte PARAMS ((bfd *abfd)); + +unsigned int +bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, + unsigned long machine)); + +typedef enum bfd_reloc_status +{ + /* No errors detected */ + bfd_reloc_ok, + + /* The relocation was performed, but there was an overflow. */ + bfd_reloc_overflow, + + /* The address to relocate was not within the section supplied. */ + bfd_reloc_outofrange, + + /* Used by special functions */ + bfd_reloc_continue, + + /* Unsupported relocation size requested. */ + bfd_reloc_notsupported, + + /* Unused */ + bfd_reloc_other, + + /* The symbol to relocate against was undefined. */ + bfd_reloc_undefined, + + /* The relocation was performed, but may not be ok - presently + generated only when linking i960 coff files with i960 b.out + symbols. If this type is returned, the error_message argument + to bfd_perform_relocation will be set. */ + bfd_reloc_dangerous + } + bfd_reloc_status_type; + + +typedef struct reloc_cache_entry +{ + /* A pointer into the canonical table of pointers */ + struct symbol_cache_entry **sym_ptr_ptr; + + /* offset in section */ + bfd_size_type address; + + /* addend for relocation value */ + bfd_vma addend; + + /* Pointer to how to perform the required relocation */ + reloc_howto_type *howto; + +} arelent; +enum complain_overflow +{ + /* Do not complain on overflow. */ + complain_overflow_dont, + + /* Complain if the bitfield overflows, whether it is considered + as signed or unsigned. */ + complain_overflow_bitfield, + + /* Complain if the value overflows when considered as signed + number. */ + complain_overflow_signed, + + /* Complain if the value overflows when considered as an + unsigned number. */ + complain_overflow_unsigned +}; + +struct reloc_howto_struct +{ + /* The type field has mainly a documentary use - the back end can + do what it wants with it, though normally the back end's + external idea of what a reloc number is stored + in this field. For example, a PC relative word relocation + in a coff environment has the type 023 - because that's + what the outside world calls a R_PCRWORD reloc. */ + unsigned int type; + + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift; + + /* The size of the item to be relocated. This is *not* a + power-of-two measure. To get the number of bytes operated + on by a type of relocation, use bfd_get_reloc_size. */ + int size; + + /* The number of bits in the item to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize; + + /* Notes that the relocation is relative to the location in the + data section of the addend. The relocation function will + subtract from the relocation value the address of the location + being relocated. */ + boolean pc_relative; + + /* The bit position of the reloc value in the destination. + The relocated value is left shifted by this amount. */ + unsigned int bitpos; + + /* What type of overflow error should be checked for when + relocating. */ + enum complain_overflow complain_on_overflow; + + /* If this field is non null, then the supplied function is + called rather than the normal function. This allows really + strange relocation methods to be accomodated (e.g., i960 callj + instructions). */ + bfd_reloc_status_type (*special_function) + PARAMS ((bfd *abfd, + arelent *reloc_entry, + struct symbol_cache_entry *symbol, + PTR data, + asection *input_section, + bfd *output_bfd, + char **error_message)); + + /* The textual name of the relocation type. */ + char *name; + + /* Some formats record a relocation addend in the section contents + rather than with the relocation. For ELF formats this is the + distinction between USE_REL and USE_RELA (though the code checks + for USE_REL == 1/0). The value of this field is TRUE if the + addend is recorded with the section contents; when performing a + partial link (ld -r) the section contents (the data) will be + modified. The value of this field is FALSE if addends are + recorded with the relocation (in arelent.addend); when performing + a partial link the relocation will be modified. + All relocations for all ELF USE_RELA targets should set this field + to FALSE (values of TRUE should be looked on with suspicion). + However, the converse is not true: not all relocations of all ELF + USE_REL targets set this field to TRUE. Why this is so is peculiar + to each particular target. For relocs that aren't used in partial + links (e.g. GOT stuff) it doesn't matter what this is set to. */ + boolean partial_inplace; + + /* The src_mask selects which parts of the read in data + are to be used in the relocation sum. E.g., if this was an 8 bit + byte of data which we read and relocated, this would be + 0x000000ff. When we have relocs which have an addend, such as + sun4 extended relocs, the value in the offset part of a + relocating field is garbage so we never use it. In this case + the mask would be 0x00000000. */ + bfd_vma src_mask; + + /* The dst_mask selects which parts of the instruction are replaced + into the instruction. In most cases src_mask == dst_mask, + except in the above special case, where dst_mask would be + 0x000000ff, and src_mask would be 0x00000000. */ + bfd_vma dst_mask; + + /* When some formats create PC relative instructions, they leave + the value of the pc of the place being relocated in the offset + slot of the instruction, so that a PC relative relocation can + be made just by adding in an ordinary offset (e.g., sun3 a.out). + Some formats leave the displacement part of an instruction + empty (e.g., m88k bcs); this flag signals the fact.*/ + boolean pcrel_offset; + +}; +#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ + {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC} +#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN) + +#define EMPTY_HOWTO(C) \ + HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false) + +#define HOWTO_PREPARE(relocation, symbol) \ + { \ + if (symbol != (asymbol *)NULL) { \ + if (bfd_is_com_section (symbol->section)) { \ + relocation = 0; \ + } \ + else { \ + relocation = symbol->value; \ + } \ + } \ +} +unsigned int +bfd_get_reloc_size PARAMS ((reloc_howto_type *)); + +typedef struct relent_chain { + arelent relent; + struct relent_chain *next; +} arelent_chain; +bfd_reloc_status_type +bfd_check_overflow PARAMS ((enum complain_overflow how, + unsigned int bitsize, + unsigned int rightshift, + unsigned int addrsize, + bfd_vma relocation)); + +bfd_reloc_status_type +bfd_perform_relocation PARAMS ((bfd *abfd, + arelent *reloc_entry, + PTR data, + asection *input_section, + bfd *output_bfd, + char **error_message)); + +bfd_reloc_status_type +bfd_install_relocation PARAMS ((bfd *abfd, + arelent *reloc_entry, + PTR data, bfd_vma data_start, + asection *input_section, + char **error_message)); + +enum bfd_reloc_code_real { + _dummy_first_bfd_reloc_code_real, + + +/* Basic absolute relocations of N bits. */ + BFD_RELOC_64, + BFD_RELOC_32, + BFD_RELOC_26, + BFD_RELOC_24, + BFD_RELOC_16, + BFD_RELOC_14, + BFD_RELOC_8, + +/* PC-relative relocations. Sometimes these are relative to the address +of the relocation itself; sometimes they are relative to the start of +the section containing the relocation. It depends on the specific target. + +The 24-bit relocation is used in some Intel 960 configurations. */ + BFD_RELOC_64_PCREL, + BFD_RELOC_32_PCREL, + BFD_RELOC_24_PCREL, + BFD_RELOC_16_PCREL, + BFD_RELOC_12_PCREL, + BFD_RELOC_8_PCREL, + +/* For ELF. */ + BFD_RELOC_32_GOT_PCREL, + BFD_RELOC_16_GOT_PCREL, + BFD_RELOC_8_GOT_PCREL, + BFD_RELOC_32_GOTOFF, + BFD_RELOC_16_GOTOFF, + BFD_RELOC_LO16_GOTOFF, + BFD_RELOC_HI16_GOTOFF, + BFD_RELOC_HI16_S_GOTOFF, + BFD_RELOC_8_GOTOFF, + BFD_RELOC_32_PLT_PCREL, + BFD_RELOC_24_PLT_PCREL, + BFD_RELOC_16_PLT_PCREL, + BFD_RELOC_8_PLT_PCREL, + BFD_RELOC_32_PLTOFF, + BFD_RELOC_16_PLTOFF, + BFD_RELOC_LO16_PLTOFF, + BFD_RELOC_HI16_PLTOFF, + BFD_RELOC_HI16_S_PLTOFF, + BFD_RELOC_8_PLTOFF, + +/* Relocations used by 68K ELF. */ + BFD_RELOC_68K_GLOB_DAT, + BFD_RELOC_68K_JMP_SLOT, + BFD_RELOC_68K_RELATIVE, + +/* Linkage-table relative. */ + BFD_RELOC_32_BASEREL, + BFD_RELOC_16_BASEREL, + BFD_RELOC_LO16_BASEREL, + BFD_RELOC_HI16_BASEREL, + BFD_RELOC_HI16_S_BASEREL, + BFD_RELOC_8_BASEREL, + BFD_RELOC_RVA, + +/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */ + BFD_RELOC_8_FFnn, + +/* These PC-relative relocations are stored as word displacements -- +i.e., byte displacements shifted right two bits. The 30-bit word +displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the +SPARC. (SPARC tools generally refer to this as <>.) The +signed 16-bit displacement is used on the MIPS, and the 23-bit +displacement is used on the Alpha. */ + BFD_RELOC_32_PCREL_S2, + BFD_RELOC_16_PCREL_S2, + BFD_RELOC_23_PCREL_S2, + +/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of +the target word. These are used on the SPARC. */ + BFD_RELOC_HI22, + BFD_RELOC_LO10, + +/* For systems that allocate a Global Pointer register, these are +displacements off that register. These relocation types are +handled specially, because the value the register will have is +decided relatively late. */ + BFD_RELOC_GPREL16, + BFD_RELOC_GPREL32, + +/* Reloc types used for i960/b.out. */ + BFD_RELOC_I960_CALLJ, + +/* SPARC ELF relocations. There is probably some overlap with other +relocation types already defined. */ + BFD_RELOC_NONE, + BFD_RELOC_SPARC_WDISP22, + BFD_RELOC_SPARC22, + BFD_RELOC_SPARC13, + BFD_RELOC_SPARC_GOT10, + BFD_RELOC_SPARC_GOT13, + BFD_RELOC_SPARC_GOT22, + BFD_RELOC_SPARC_PC10, + BFD_RELOC_SPARC_PC22, + BFD_RELOC_SPARC_WPLT30, + BFD_RELOC_SPARC_COPY, + BFD_RELOC_SPARC_GLOB_DAT, + BFD_RELOC_SPARC_JMP_SLOT, + BFD_RELOC_SPARC_RELATIVE, + BFD_RELOC_SPARC_UA32, + +/* I think these are specific to SPARC a.out (e.g., Sun 4). */ + BFD_RELOC_SPARC_BASE13, + BFD_RELOC_SPARC_BASE22, + +/* SPARC64 relocations */ +#define BFD_RELOC_SPARC_64 BFD_RELOC_64 + BFD_RELOC_SPARC_10, + BFD_RELOC_SPARC_11, + BFD_RELOC_SPARC_OLO10, + BFD_RELOC_SPARC_HH22, + BFD_RELOC_SPARC_HM10, + BFD_RELOC_SPARC_LM22, + BFD_RELOC_SPARC_PC_HH22, + BFD_RELOC_SPARC_PC_HM10, + BFD_RELOC_SPARC_PC_LM22, + BFD_RELOC_SPARC_WDISP16, + BFD_RELOC_SPARC_WDISP19, + BFD_RELOC_SPARC_7, + BFD_RELOC_SPARC_6, + BFD_RELOC_SPARC_5, +#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL + BFD_RELOC_SPARC_PLT64, + BFD_RELOC_SPARC_HIX22, + BFD_RELOC_SPARC_LOX10, + BFD_RELOC_SPARC_H44, + BFD_RELOC_SPARC_M44, + BFD_RELOC_SPARC_L44, + BFD_RELOC_SPARC_REGISTER, + +/* SPARC little endian relocation */ + BFD_RELOC_SPARC_REV32, + +/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or +"addend" in some special way. +For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when +writing; when reading, it will be the absolute section symbol. The +addend is the displacement in bytes of the "lda" instruction from +the "ldah" instruction (which is at the address of this reloc). */ + BFD_RELOC_ALPHA_GPDISP_HI16, + +/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as +with GPDISP_HI16 relocs. The addend is ignored when writing the +relocations out, and is filled in with the file's GP value on +reading, for convenience. */ + BFD_RELOC_ALPHA_GPDISP_LO16, + +/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 +relocation except that there is no accompanying GPDISP_LO16 +relocation. */ + BFD_RELOC_ALPHA_GPDISP, + +/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; +the assembler turns it into a LDQ instruction to load the address of +the symbol, and then fills in a register in the real instruction. + +The LITERAL reloc, at the LDQ instruction, refers to the .lita +section symbol. The addend is ignored when writing, but is filled +in with the file's GP value on reading, for convenience, as with the +GPDISP_LO16 reloc. + +The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16. +It should refer to the symbol to be referenced, as with 16_GOTOFF, +but it generates output not based on the position within the .got +section, but relative to the GP value chosen for the file during the +final link stage. + +The LITUSE reloc, on the instruction using the loaded address, gives +information to the linker that it might be able to use to optimize +away some literal section references. The symbol is ignored (read +as the absolute section symbol), and the "addend" indicates the type +of instruction using the register: +1 - "memory" fmt insn +2 - byte-manipulation (byte offset reg) +3 - jsr (target of branch) + +The GNU linker currently doesn't do any of this optimizing. */ + BFD_RELOC_ALPHA_LITERAL, + BFD_RELOC_ALPHA_ELF_LITERAL, + BFD_RELOC_ALPHA_LITUSE, + +/* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to +process the explicit !!sequence relocations, and are mapped +into the normal relocations at the end of processing. */ + BFD_RELOC_ALPHA_USER_LITERAL, + BFD_RELOC_ALPHA_USER_LITUSE_BASE, + BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF, + BFD_RELOC_ALPHA_USER_LITUSE_JSR, + BFD_RELOC_ALPHA_USER_GPDISP, + BFD_RELOC_ALPHA_USER_GPRELHIGH, + BFD_RELOC_ALPHA_USER_GPRELLOW, + +/* The HINT relocation indicates a value that should be filled into the +"hint" field of a jmp/jsr/ret instruction, for possible branch- +prediction logic which may be provided on some processors. */ + BFD_RELOC_ALPHA_HINT, + +/* The LINKAGE relocation outputs a linkage pair in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_LINKAGE, + +/* The CODEADDR relocation outputs a STO_CA in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_CODEADDR, + +/* Bits 27..2 of the relocation address shifted right 2 bits; +simple reloc otherwise. */ + BFD_RELOC_MIPS_JMP, + +/* The MIPS16 jump instruction. */ + BFD_RELOC_MIPS16_JMP, + +/* MIPS16 GP relative reloc. */ + BFD_RELOC_MIPS16_GPREL, + +/* High 16 bits of 32-bit value; simple reloc. */ + BFD_RELOC_HI16, + +/* High 16 bits of 32-bit value but the low 16 bits will be sign +extended and added to form the final result. If the low 16 +bits form a negative number, we need to add one to the high value +to compensate for the borrow when the low bits are added. */ + BFD_RELOC_HI16_S, + +/* Low 16 bits. */ + BFD_RELOC_LO16, + +/* Like BFD_RELOC_HI16_S, but PC relative. */ + BFD_RELOC_PCREL_HI16_S, + +/* Like BFD_RELOC_LO16, but PC relative. */ + BFD_RELOC_PCREL_LO16, + +/* Relocation relative to the global pointer. */ +#define BFD_RELOC_MIPS_GPREL BFD_RELOC_GPREL16 + +/* Relocation against a MIPS literal section. */ + BFD_RELOC_MIPS_LITERAL, + +/* MIPS ELF relocations. */ + BFD_RELOC_MIPS_GOT16, + BFD_RELOC_MIPS_CALL16, +#define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32 + BFD_RELOC_MIPS_GOT_HI16, + BFD_RELOC_MIPS_GOT_LO16, + BFD_RELOC_MIPS_CALL_HI16, + BFD_RELOC_MIPS_CALL_LO16, + BFD_RELOC_MIPS_SUB, + BFD_RELOC_MIPS_GOT_PAGE, + BFD_RELOC_MIPS_GOT_OFST, + BFD_RELOC_MIPS_GOT_DISP, + + +/* i386/elf relocations */ + BFD_RELOC_386_GOT32, + BFD_RELOC_386_PLT32, + BFD_RELOC_386_COPY, + BFD_RELOC_386_GLOB_DAT, + BFD_RELOC_386_JUMP_SLOT, + BFD_RELOC_386_RELATIVE, + BFD_RELOC_386_GOTOFF, + BFD_RELOC_386_GOTPC, + +/* x86-64/elf relocations */ + BFD_RELOC_X86_64_GOT32, + BFD_RELOC_X86_64_PLT32, + BFD_RELOC_X86_64_COPY, + BFD_RELOC_X86_64_GLOB_DAT, + BFD_RELOC_X86_64_JUMP_SLOT, + BFD_RELOC_X86_64_RELATIVE, + BFD_RELOC_X86_64_GOTPCREL, + BFD_RELOC_X86_64_32S, + +/* ns32k relocations */ + BFD_RELOC_NS32K_IMM_8, + BFD_RELOC_NS32K_IMM_16, + BFD_RELOC_NS32K_IMM_32, + BFD_RELOC_NS32K_IMM_8_PCREL, + BFD_RELOC_NS32K_IMM_16_PCREL, + BFD_RELOC_NS32K_IMM_32_PCREL, + BFD_RELOC_NS32K_DISP_8, + BFD_RELOC_NS32K_DISP_16, + BFD_RELOC_NS32K_DISP_32, + BFD_RELOC_NS32K_DISP_8_PCREL, + BFD_RELOC_NS32K_DISP_16_PCREL, + BFD_RELOC_NS32K_DISP_32_PCREL, + +/* PDP11 relocations */ + BFD_RELOC_PDP11_DISP_8_PCREL, + BFD_RELOC_PDP11_DISP_6_PCREL, + +/* Picojava relocs. Not all of these appear in object files. */ + BFD_RELOC_PJ_CODE_HI16, + BFD_RELOC_PJ_CODE_LO16, + BFD_RELOC_PJ_CODE_DIR16, + BFD_RELOC_PJ_CODE_DIR32, + BFD_RELOC_PJ_CODE_REL16, + BFD_RELOC_PJ_CODE_REL32, + +/* Power(rs6000) and PowerPC relocations. */ + BFD_RELOC_PPC_B26, + BFD_RELOC_PPC_BA26, + BFD_RELOC_PPC_TOC16, + BFD_RELOC_PPC_B16, + BFD_RELOC_PPC_B16_BRTAKEN, + BFD_RELOC_PPC_B16_BRNTAKEN, + BFD_RELOC_PPC_BA16, + BFD_RELOC_PPC_BA16_BRTAKEN, + BFD_RELOC_PPC_BA16_BRNTAKEN, + BFD_RELOC_PPC_COPY, + BFD_RELOC_PPC_GLOB_DAT, + BFD_RELOC_PPC_JMP_SLOT, + BFD_RELOC_PPC_RELATIVE, + BFD_RELOC_PPC_LOCAL24PC, + BFD_RELOC_PPC_EMB_NADDR32, + BFD_RELOC_PPC_EMB_NADDR16, + BFD_RELOC_PPC_EMB_NADDR16_LO, + BFD_RELOC_PPC_EMB_NADDR16_HI, + BFD_RELOC_PPC_EMB_NADDR16_HA, + BFD_RELOC_PPC_EMB_SDAI16, + BFD_RELOC_PPC_EMB_SDA2I16, + BFD_RELOC_PPC_EMB_SDA2REL, + BFD_RELOC_PPC_EMB_SDA21, + BFD_RELOC_PPC_EMB_MRKREF, + BFD_RELOC_PPC_EMB_RELSEC16, + BFD_RELOC_PPC_EMB_RELST_LO, + BFD_RELOC_PPC_EMB_RELST_HI, + BFD_RELOC_PPC_EMB_RELST_HA, + BFD_RELOC_PPC_EMB_BIT_FLD, + BFD_RELOC_PPC_EMB_RELSDA, + +/* IBM 370/390 relocations */ + BFD_RELOC_I370_D12, + +/* The type of reloc used to build a contructor table - at the moment +probably a 32 bit wide absolute relocation, but the target can choose. +It generally does map to one of the other relocation types. */ + BFD_RELOC_CTOR, + +/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are +not stored in the instruction. */ + BFD_RELOC_ARM_PCREL_BRANCH, + +/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_ARM_PCREL_BLX, + +/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_THUMB_PCREL_BLX, + +/* These relocs are only used within the ARM assembler. They are not +(at present) written to any object files. */ + BFD_RELOC_ARM_IMMEDIATE, + BFD_RELOC_ARM_ADRL_IMMEDIATE, + BFD_RELOC_ARM_OFFSET_IMM, + BFD_RELOC_ARM_SHIFT_IMM, + BFD_RELOC_ARM_SWI, + BFD_RELOC_ARM_MULTI, + BFD_RELOC_ARM_CP_OFF_IMM, + BFD_RELOC_ARM_ADR_IMM, + BFD_RELOC_ARM_LDR_IMM, + BFD_RELOC_ARM_LITERAL, + BFD_RELOC_ARM_IN_POOL, + BFD_RELOC_ARM_OFFSET_IMM8, + BFD_RELOC_ARM_HWLITERAL, + BFD_RELOC_ARM_THUMB_ADD, + BFD_RELOC_ARM_THUMB_IMM, + BFD_RELOC_ARM_THUMB_SHIFT, + BFD_RELOC_ARM_THUMB_OFFSET, + BFD_RELOC_ARM_GOT12, + BFD_RELOC_ARM_GOT32, + BFD_RELOC_ARM_JUMP_SLOT, + BFD_RELOC_ARM_COPY, + BFD_RELOC_ARM_GLOB_DAT, + BFD_RELOC_ARM_PLT32, + BFD_RELOC_ARM_RELATIVE, + BFD_RELOC_ARM_GOTOFF, + BFD_RELOC_ARM_GOTPC, + +/* Hitachi SH relocs. Not all of these appear in object files. */ + BFD_RELOC_SH_PCDISP8BY2, + BFD_RELOC_SH_PCDISP12BY2, + BFD_RELOC_SH_IMM4, + BFD_RELOC_SH_IMM4BY2, + BFD_RELOC_SH_IMM4BY4, + BFD_RELOC_SH_IMM8, + BFD_RELOC_SH_IMM8BY2, + BFD_RELOC_SH_IMM8BY4, + BFD_RELOC_SH_PCRELIMM8BY2, + BFD_RELOC_SH_PCRELIMM8BY4, + BFD_RELOC_SH_SWITCH16, + BFD_RELOC_SH_SWITCH32, + BFD_RELOC_SH_USES, + BFD_RELOC_SH_COUNT, + BFD_RELOC_SH_ALIGN, + BFD_RELOC_SH_CODE, + BFD_RELOC_SH_DATA, + BFD_RELOC_SH_LABEL, + BFD_RELOC_SH_LOOP_START, + BFD_RELOC_SH_LOOP_END, + BFD_RELOC_SH_COPY, + BFD_RELOC_SH_GLOB_DAT, + BFD_RELOC_SH_JMP_SLOT, + BFD_RELOC_SH_RELATIVE, + BFD_RELOC_SH_GOTPC, + +/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must +be zero and is not stored in the instruction. */ + BFD_RELOC_THUMB_PCREL_BRANCH9, + BFD_RELOC_THUMB_PCREL_BRANCH12, + BFD_RELOC_THUMB_PCREL_BRANCH23, + +/* ARC Cores relocs. +ARC 22 bit pc-relative branch. The lowest two bits must be zero and are +not stored in the instruction. The high 20 bits are installed in bits 26 +through 7 of the instruction. */ + BFD_RELOC_ARC_B22_PCREL, + +/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not +stored in the instruction. The high 24 bits are installed in bits 23 +through 0. */ + BFD_RELOC_ARC_B26, + +/* Mitsubishi D10V relocs. +This is a 10-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_10_PCREL_R, + +/* Mitsubishi D10V relocs. +This is a 10-bit reloc with the right 2 bits +assumed to be 0. This is the same as the previous reloc +except it is in the left container, i.e., +shifted left 15 bits. */ + BFD_RELOC_D10V_10_PCREL_L, + +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18, + +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18_PCREL, + +/* Mitsubishi D30V relocs. +This is a 6-bit absolute reloc. */ + BFD_RELOC_D30V_6, + +/* This is a 6-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_9_PCREL, + +/* This is a 6-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_9_PCREL_R, + +/* This is a 12-bit absolute reloc with the +right 3 bitsassumed to be 0. */ + BFD_RELOC_D30V_15, + +/* This is a 12-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_15_PCREL, + +/* This is a 12-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_15_PCREL_R, + +/* This is an 18-bit absolute reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21, + +/* This is an 18-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21_PCREL, + +/* This is an 18-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_21_PCREL_R, + +/* This is a 32-bit absolute reloc. */ + BFD_RELOC_D30V_32, + +/* This is a 32-bit pc-relative reloc. */ + BFD_RELOC_D30V_32_PCREL, + +/* Mitsubishi M32R relocs. +This is a 24 bit absolute address. */ + BFD_RELOC_M32R_24, + +/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_10_PCREL, + +/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_18_PCREL, + +/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_26_PCREL, + +/* This is a 16-bit reloc containing the high 16 bits of an address +used when the lower 16 bits are treated as unsigned. */ + BFD_RELOC_M32R_HI16_ULO, + +/* This is a 16-bit reloc containing the high 16 bits of an address +used when the lower 16 bits are treated as signed. */ + BFD_RELOC_M32R_HI16_SLO, + +/* This is a 16-bit reloc containing the lower 16 bits of an address. */ + BFD_RELOC_M32R_LO16, + +/* This is a 16-bit reloc containing the small data area offset for use in +add3, load, and store instructions. */ + BFD_RELOC_M32R_SDA16, + +/* This is a 9-bit reloc */ + BFD_RELOC_V850_9_PCREL, + +/* This is a 22-bit reloc */ + BFD_RELOC_V850_22_PCREL, + +/* This is a 16 bit offset from the short data area pointer. */ + BFD_RELOC_V850_SDA_16_16_OFFSET, + +/* This is a 16 bit offset (of which only 15 bits are used) from the +short data area pointer. */ + BFD_RELOC_V850_SDA_15_16_OFFSET, + +/* This is a 16 bit offset from the zero data area pointer. */ + BFD_RELOC_V850_ZDA_16_16_OFFSET, + +/* This is a 16 bit offset (of which only 15 bits are used) from the +zero data area pointer. */ + BFD_RELOC_V850_ZDA_15_16_OFFSET, + +/* This is an 8 bit offset (of which only 6 bits are used) from the +tiny data area pointer. */ + BFD_RELOC_V850_TDA_6_8_OFFSET, + +/* This is an 8bit offset (of which only 7 bits are used) from the tiny +data area pointer. */ + BFD_RELOC_V850_TDA_7_8_OFFSET, + +/* This is a 7 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_7_7_OFFSET, + +/* This is a 16 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_16_16_OFFSET, + +/* This is a 5 bit offset (of which only 4 bits are used) from the tiny +data area pointer. */ + BFD_RELOC_V850_TDA_4_5_OFFSET, + +/* This is a 4 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_4_4_OFFSET, + +/* This is a 16 bit offset from the short data area pointer, with the +bits placed non-contigously in the instruction. */ + BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, + +/* This is a 16 bit offset from the zero data area pointer, with the +bits placed non-contigously in the instruction. */ + BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, + +/* This is a 6 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_6_7_OFFSET, + +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_16_16_OFFSET, + + +/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the +instruction. */ + BFD_RELOC_MN10300_32_PCREL, + +/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the +instruction. */ + BFD_RELOC_MN10300_16_PCREL, + +/* This is a 8bit DP reloc for the tms320c30, where the most +significant 8 bits of a 24 bit word are placed into the least +significant 8 bits of the opcode. */ + BFD_RELOC_TIC30_LDP, + +/* This is a 7bit reloc for the tms320c54x, where the least +significant 7 bits of a 16 bit word are placed into the least +significant 7 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTLS7, + +/* This is a 9bit DP reloc for the tms320c54x, where the most +significant 9 bits of a 16 bit word are placed into the least +significant 9 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTMS9, + +/* This is an extended address 23-bit reloc for the tms320c54x. */ + BFD_RELOC_TIC54X_23, + +/* This is a 16-bit reloc for the tms320c54x, where the least +significant 16 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_16_OF_23, + +/* This is a reloc for the tms320c54x, where the most +significant 7 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_MS7_OF_23, + +/* This is a 48 bit reloc for the FR30 that stores 32 bits. */ + BFD_RELOC_FR30_48, + +/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into +two sections. */ + BFD_RELOC_FR30_20, + +/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in +4 bits. */ + BFD_RELOC_FR30_6_IN_4, + +/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset +into 8 bits. */ + BFD_RELOC_FR30_8_IN_8, + +/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset +into 8 bits. */ + BFD_RELOC_FR30_9_IN_8, + +/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset +into 8 bits. */ + BFD_RELOC_FR30_10_IN_8, + +/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative +short offset into 8 bits. */ + BFD_RELOC_FR30_9_PCREL, + +/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative +short offset into 11 bits. */ + BFD_RELOC_FR30_12_PCREL, + +/* Motorola Mcore relocations. */ + BFD_RELOC_MCORE_PCREL_IMM8BY4, + BFD_RELOC_MCORE_PCREL_IMM11BY2, + BFD_RELOC_MCORE_PCREL_IMM4BY2, + BFD_RELOC_MCORE_PCREL_32, + BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, + BFD_RELOC_MCORE_RVA, + +/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative +short offset into 7 bits. */ + BFD_RELOC_AVR_7_PCREL, + +/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative +short offset into 12 bits. */ + BFD_RELOC_AVR_13_PCREL, + +/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually +program memory address) into 16 bits. */ + BFD_RELOC_AVR_16_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of program memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually data memory address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of data memory address) into 8 bit immediate value of +SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(most high 8 bit of program memory address) into 8 bit immediate value +of LDI or SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually command address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of 16 bit command address) into 8 bit immediate value +of SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 6 bit of 22 bit command address) into 8 bit immediate +value of SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM_NEG, + +/* This is a 32 bit reloc for the AVR that stores 23 bit value +into 22 bits. */ + BFD_RELOC_AVR_CALL, + +/* Direct 12 bit. */ + BFD_RELOC_390_12, + +/* 12 bit GOT offset. */ + BFD_RELOC_390_GOT12, + +/* 32 bit PC relative PLT address. */ + BFD_RELOC_390_PLT32, + +/* Copy symbol at runtime. */ + BFD_RELOC_390_COPY, + +/* Create GOT entry. */ + BFD_RELOC_390_GLOB_DAT, + +/* Create PLT entry. */ + BFD_RELOC_390_JMP_SLOT, + +/* Adjust by program base. */ + BFD_RELOC_390_RELATIVE, + +/* 32 bit PC relative offset to GOT. */ + BFD_RELOC_390_GOTPC, + +/* 16 bit GOT offset. */ + BFD_RELOC_390_GOT16, + +/* PC relative 16 bit shifted by 1. */ + BFD_RELOC_390_PC16DBL, + +/* 16 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT16DBL, + +/* PC relative 32 bit shifted by 1. */ + BFD_RELOC_390_PC32DBL, + +/* 32 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT32DBL, + +/* 32 bit PC rel. GOT shifted by 1. */ + BFD_RELOC_390_GOTPCDBL, + +/* 64 bit GOT offset. */ + BFD_RELOC_390_GOT64, + +/* 64 bit PC relative PLT address. */ + BFD_RELOC_390_PLT64, + +/* 32 bit rel. offset to GOT entry. */ + BFD_RELOC_390_GOTENT, + +/* These two relocations are used by the linker to determine which of +the entries in a C++ virtual function table are actually used. When +the --gc-sections option is given, the linker will zero out the entries +that are not used, so that the code for those functions need not be +included in the output. + +VTABLE_INHERIT is a zero-space relocation used to describe to the +linker the inheritence tree of a C++ virtual function table. The +relocation's symbol should be the parent class' vtable, and the +relocation should be located at the child vtable. + +VTABLE_ENTRY is a zero-space relocation that describes the use of a +virtual function table entry. The reloc's symbol should refer to the +table of the class mentioned in the code. Off of that base, an offset +describes the entry that is being used. For Rela hosts, this offset +is stored in the reloc's addend. For Rel hosts, we are forced to put +this offset in the reloc's section offset. */ + BFD_RELOC_VTABLE_INHERIT, + BFD_RELOC_VTABLE_ENTRY, + +/* Intel IA64 Relocations. */ + BFD_RELOC_IA64_IMM14, + BFD_RELOC_IA64_IMM22, + BFD_RELOC_IA64_IMM64, + BFD_RELOC_IA64_DIR32MSB, + BFD_RELOC_IA64_DIR32LSB, + BFD_RELOC_IA64_DIR64MSB, + BFD_RELOC_IA64_DIR64LSB, + BFD_RELOC_IA64_GPREL22, + BFD_RELOC_IA64_GPREL64I, + BFD_RELOC_IA64_GPREL32MSB, + BFD_RELOC_IA64_GPREL32LSB, + BFD_RELOC_IA64_GPREL64MSB, + BFD_RELOC_IA64_GPREL64LSB, + BFD_RELOC_IA64_LTOFF22, + BFD_RELOC_IA64_LTOFF64I, + BFD_RELOC_IA64_PLTOFF22, + BFD_RELOC_IA64_PLTOFF64I, + BFD_RELOC_IA64_PLTOFF64MSB, + BFD_RELOC_IA64_PLTOFF64LSB, + BFD_RELOC_IA64_FPTR64I, + BFD_RELOC_IA64_FPTR32MSB, + BFD_RELOC_IA64_FPTR32LSB, + BFD_RELOC_IA64_FPTR64MSB, + BFD_RELOC_IA64_FPTR64LSB, + BFD_RELOC_IA64_PCREL21B, + BFD_RELOC_IA64_PCREL21BI, + BFD_RELOC_IA64_PCREL21M, + BFD_RELOC_IA64_PCREL21F, + BFD_RELOC_IA64_PCREL22, + BFD_RELOC_IA64_PCREL60B, + BFD_RELOC_IA64_PCREL64I, + BFD_RELOC_IA64_PCREL32MSB, + BFD_RELOC_IA64_PCREL32LSB, + BFD_RELOC_IA64_PCREL64MSB, + BFD_RELOC_IA64_PCREL64LSB, + BFD_RELOC_IA64_LTOFF_FPTR22, + BFD_RELOC_IA64_LTOFF_FPTR64I, + BFD_RELOC_IA64_LTOFF_FPTR64MSB, + BFD_RELOC_IA64_LTOFF_FPTR64LSB, + BFD_RELOC_IA64_SEGREL32MSB, + BFD_RELOC_IA64_SEGREL32LSB, + BFD_RELOC_IA64_SEGREL64MSB, + BFD_RELOC_IA64_SEGREL64LSB, + BFD_RELOC_IA64_SECREL32MSB, + BFD_RELOC_IA64_SECREL32LSB, + BFD_RELOC_IA64_SECREL64MSB, + BFD_RELOC_IA64_SECREL64LSB, + BFD_RELOC_IA64_REL32MSB, + BFD_RELOC_IA64_REL32LSB, + BFD_RELOC_IA64_REL64MSB, + BFD_RELOC_IA64_REL64LSB, + BFD_RELOC_IA64_LTV32MSB, + BFD_RELOC_IA64_LTV32LSB, + BFD_RELOC_IA64_LTV64MSB, + BFD_RELOC_IA64_LTV64LSB, + BFD_RELOC_IA64_IPLTMSB, + BFD_RELOC_IA64_IPLTLSB, + BFD_RELOC_IA64_COPY, + BFD_RELOC_IA64_TPREL22, + BFD_RELOC_IA64_TPREL64MSB, + BFD_RELOC_IA64_TPREL64LSB, + BFD_RELOC_IA64_LTOFF_TP22, + BFD_RELOC_IA64_LTOFF22X, + BFD_RELOC_IA64_LDXMOV, + +/* Motorola 68HC11 reloc. +This is the 8 bits high part of an absolute address. */ + BFD_RELOC_M68HC11_HI8, + +/* Motorola 68HC11 reloc. +This is the 8 bits low part of an absolute address. */ + BFD_RELOC_M68HC11_LO8, + +/* Motorola 68HC11 reloc. +This is the 3 bits of a value. */ + BFD_RELOC_M68HC11_3B, + +/* These relocs are only used within the CRIS assembler. They are not +(at present) written to any object files. */ + BFD_RELOC_CRIS_BDISP8, + BFD_RELOC_CRIS_UNSIGNED_5, + BFD_RELOC_CRIS_SIGNED_6, + BFD_RELOC_CRIS_UNSIGNED_6, + BFD_RELOC_CRIS_UNSIGNED_4, + +/* Relocs used in ELF shared libraries for CRIS. */ + BFD_RELOC_CRIS_COPY, + BFD_RELOC_CRIS_GLOB_DAT, + BFD_RELOC_CRIS_JUMP_SLOT, + BFD_RELOC_CRIS_RELATIVE, + +/* 32-bit offset to symbol-entry within GOT. */ + BFD_RELOC_CRIS_32_GOT, + +/* 16-bit offset to symbol-entry within GOT. */ + BFD_RELOC_CRIS_16_GOT, + +/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_CRIS_32_GOTPLT, + +/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_CRIS_16_GOTPLT, + +/* 32-bit offset to symbol, relative to GOT. */ + BFD_RELOC_CRIS_32_GOTREL, + +/* 32-bit offset to symbol with PLT entry, relative to GOT. */ + BFD_RELOC_CRIS_32_PLT_GOTREL, + +/* 32-bit offset to symbol with PLT entry, relative to this relocation. */ + BFD_RELOC_CRIS_32_PLT_PCREL, + +/* Intel i860 Relocations. */ + BFD_RELOC_860_COPY, + BFD_RELOC_860_GLOB_DAT, + BFD_RELOC_860_JUMP_SLOT, + BFD_RELOC_860_RELATIVE, + BFD_RELOC_860_PC26, + BFD_RELOC_860_PLT26, + BFD_RELOC_860_PC16, + BFD_RELOC_860_LOW0, + BFD_RELOC_860_SPLIT0, + BFD_RELOC_860_LOW1, + BFD_RELOC_860_SPLIT1, + BFD_RELOC_860_LOW2, + BFD_RELOC_860_SPLIT2, + BFD_RELOC_860_LOW3, + BFD_RELOC_860_LOGOT0, + BFD_RELOC_860_SPGOT0, + BFD_RELOC_860_LOGOT1, + BFD_RELOC_860_SPGOT1, + BFD_RELOC_860_LOGOTOFF0, + BFD_RELOC_860_SPGOTOFF0, + BFD_RELOC_860_LOGOTOFF1, + BFD_RELOC_860_SPGOTOFF1, + BFD_RELOC_860_LOGOTOFF2, + BFD_RELOC_860_LOGOTOFF3, + BFD_RELOC_860_LOPC, + BFD_RELOC_860_HIGHADJ, + BFD_RELOC_860_HAGOT, + BFD_RELOC_860_HAGOTOFF, + BFD_RELOC_860_HAPC, + BFD_RELOC_860_HIGH, + BFD_RELOC_860_HIGOT, + BFD_RELOC_860_HIGOTOFF, + +/* OpenRISC Relocations. */ + BFD_RELOC_OPENRISC_ABS_26, + BFD_RELOC_OPENRISC_REL_26, + BFD_RELOC_UNUSED }; +typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; +reloc_howto_type * +bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); + +const char * +bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code)); + + +typedef struct symbol_cache_entry +{ + /* A pointer to the BFD which owns the symbol. This information + is necessary so that a back end can work out what additional + information (invisible to the application writer) is carried + with the symbol. + + This field is *almost* redundant, since you can use section->owner + instead, except that some symbols point to the global sections + bfd_{abs,com,und}_section. This could be fixed by making + these globals be per-bfd (or per-target-flavor). FIXME. */ + + struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ + + /* The text of the symbol. The name is left alone, and not copied; the + application may not alter it. */ + CONST char *name; + + /* The value of the symbol. This really should be a union of a + numeric value with a pointer, since some flags indicate that + a pointer to another symbol is stored here. */ + symvalue value; + + /* Attributes of a symbol: */ + +#define BSF_NO_FLAGS 0x00 + + /* The symbol has local scope; <> in <>. The value + is the offset into the section of the data. */ +#define BSF_LOCAL 0x01 + + /* The symbol has global scope; initialized data in <>. The + value is the offset into the section of the data. */ +#define BSF_GLOBAL 0x02 + + /* The symbol has global scope and is exported. The value is + the offset into the section of the data. */ +#define BSF_EXPORT BSF_GLOBAL /* no real difference */ + + /* A normal C symbol would be one of: + <>, <>, <> or + <> */ + + /* The symbol is a debugging record. The value has an arbitary + meaning, unless BSF_DEBUGGING_RELOC is also set. */ +#define BSF_DEBUGGING 0x08 + + /* The symbol denotes a function entry point. Used in ELF, + perhaps others someday. */ +#define BSF_FUNCTION 0x10 + + /* Used by the linker. */ +#define BSF_KEEP 0x20 +#define BSF_KEEP_G 0x40 + + /* A weak global symbol, overridable without warnings by + a regular global symbol of the same name. */ +#define BSF_WEAK 0x80 + + /* This symbol was created to point to a section, e.g. ELF's + STT_SECTION symbols. */ +#define BSF_SECTION_SYM 0x100 + + /* The symbol used to be a common symbol, but now it is + allocated. */ +#define BSF_OLD_COMMON 0x200 + + /* The default value for common data. */ +#define BFD_FORT_COMM_DEFAULT_VALUE 0 + + /* In some files the type of a symbol sometimes alters its + location in an output file - ie in coff a <> symbol + which is also <> symbol appears where it was + declared and not at the end of a section. This bit is set + by the target BFD part to convey this information. */ + +#define BSF_NOT_AT_END 0x400 + + /* Signal that the symbol is the label of constructor section. */ +#define BSF_CONSTRUCTOR 0x800 + + /* Signal that the symbol is a warning symbol. The name is a + warning. The name of the next symbol is the one to warn about; + if a reference is made to a symbol with the same name as the next + symbol, a warning is issued by the linker. */ +#define BSF_WARNING 0x1000 + + /* Signal that the symbol is indirect. This symbol is an indirect + pointer to the symbol with the same name as the next symbol. */ +#define BSF_INDIRECT 0x2000 + + /* BSF_FILE marks symbols that contain a file name. This is used + for ELF STT_FILE symbols. */ +#define BSF_FILE 0x4000 + + /* Symbol is from dynamic linking information. */ +#define BSF_DYNAMIC 0x8000 + + /* The symbol denotes a data object. Used in ELF, and perhaps + others someday. */ +#define BSF_OBJECT 0x10000 + + /* This symbol is a debugging symbol. The value is the offset + into the section of the data. BSF_DEBUGGING should be set + as well. */ +#define BSF_DEBUGGING_RELOC 0x20000 + + flagword flags; + + /* A pointer to the section to which this symbol is + relative. This will always be non NULL, there are special + sections for undefined and absolute symbols. */ + struct sec *section; + + /* Back end special data. */ + union + { + PTR p; + bfd_vma i; + } udata; + +} asymbol; +#define bfd_get_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) +boolean +bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym)); + +boolean +bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name)); + +#define bfd_is_local_label_name(abfd, name) \ + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) +#define bfd_canonicalize_symtab(abfd, location) \ + BFD_SEND (abfd, _bfd_canonicalize_symtab,\ + (abfd, location)) +boolean +bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count)); + +void +bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol)); + +#define bfd_make_empty_symbol(abfd) \ + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) +#define bfd_make_debug_symbol(abfd,ptr,size) \ + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) +int +bfd_decode_symclass PARAMS ((asymbol *symbol)); + +boolean +bfd_is_undefined_symclass PARAMS ((int symclass)); + +void +bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret)); + +boolean +bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym)); + +#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) +struct _bfd +{ + /* The filename the application opened the BFD with. */ + CONST char *filename; + + /* A pointer to the target jump table. */ + const struct bfd_target *xvec; + + /* To avoid dragging too many header files into every file that + includes `<>', IOSTREAM has been declared as a "char + *", and MTIME as a "long". Their correct types, to which they + are cast when used, are "FILE *" and "time_t". The iostream + is the result of an fopen on the filename. However, if the + BFD_IN_MEMORY flag is set, then iostream is actually a pointer + to a bfd_in_memory struct. */ + PTR iostream; + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + + boolean cacheable; + + /* Marks whether there was a default target specified when the + BFD was opened. This is used to select which matching algorithm + to use to choose the back end. */ + + boolean target_defaulted; + + /* The caching routines use these to maintain a + least-recently-used list of BFDs */ + + struct _bfd *lru_prev, *lru_next; + + /* When a file is closed by the caching routines, BFD retains + state information on the file here: */ + + file_ptr where; + + /* and here: (``once'' means at least once) */ + + boolean opened_once; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time: */ + + boolean mtime_set; + + /* File modified time, if mtime_set is true: */ + + long mtime; + + /* Reserved for an unimplemented file locking extension.*/ + + int ifd; + + /* The format which belongs to the BFD. (object, core, etc.) */ + + bfd_format format; + + /* The direction the BFD was opened with*/ + + enum bfd_direction {no_direction = 0, + read_direction = 1, + write_direction = 2, + both_direction = 3} direction; + + /* Format_specific flags*/ + + flagword flags; + + /* Currently my_archive is tested before adding origin to + anything. I believe that this can become always an add of + origin, with origin set to 0 for non archive files. */ + + file_ptr origin; + + /* Remember when output has begun, to stop strange things + from happening. */ + boolean output_has_begun; + + /* Pointer to linked list of sections*/ + struct sec *sections; + + /* The number of sections */ + unsigned int section_count; + + /* Stuff only useful for object files: + The start address. */ + bfd_vma start_address; + + /* Used for input and output*/ + unsigned int symcount; + + /* Symbol table for output BFD (with symcount entries) */ + struct symbol_cache_entry **outsymbols; + + /* Pointer to structure which contains architecture information*/ + const struct bfd_arch_info *arch_info; + + /* Stuff only useful for archives:*/ + PTR arelt_data; + struct _bfd *my_archive; /* The containing archive BFD. */ + struct _bfd *next; /* The next BFD in the archive. */ + struct _bfd *archive_head; /* The first BFD in the archive. */ + boolean has_armap; + + /* A chain of BFD structures involved in a link. */ + struct _bfd *link_next; + + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + + /* Used by the back end to hold private data. */ + + union + { + struct aout_data_struct *aout_data; + struct artdata *aout_ar_data; + struct _oasys_data *oasys_obj_data; + struct _oasys_ar_data *oasys_ar_data; + struct coff_tdata *coff_obj_data; + struct pe_tdata *pe_obj_data; + struct xcoff_tdata *xcoff_obj_data; + struct ecoff_tdata *ecoff_obj_data; + struct ieee_data_struct *ieee_data; + struct ieee_ar_data_struct *ieee_ar_data; + struct srec_data_struct *srec_data; + struct ihex_data_struct *ihex_data; + struct tekhex_data_struct *tekhex_data; + struct elf_obj_tdata *elf_obj_data; + struct nlm_obj_tdata *nlm_obj_data; + struct bout_data_struct *bout_data; + struct sun_core_struct *sun_core_data; + struct sco5_core_struct *sco5_core_data; + struct trad_core_struct *trad_core_data; + struct som_data_struct *som_data; + struct hpux_core_struct *hpux_core_data; + struct hppabsd_core_struct *hppabsd_core_data; + struct sgi_core_struct *sgi_core_data; + struct lynx_core_struct *lynx_core_data; + struct osf_core_struct *osf_core_data; + struct cisco_core_struct *cisco_core_data; + struct versados_data_struct *versados_data; + struct netbsd_core_struct *netbsd_core_data; + PTR any; + } tdata; + + /* Used by the application to hold private data*/ + PTR usrdata; + + /* Where all the allocated stuff under this BFD goes. This is a + struct objalloc *, but we use PTR to avoid requiring the inclusion of + objalloc.h. */ + PTR memory; +}; + +typedef enum bfd_error +{ + bfd_error_no_error = 0, + bfd_error_system_call, + bfd_error_invalid_target, + bfd_error_wrong_format, + bfd_error_invalid_operation, + bfd_error_no_memory, + bfd_error_no_symbols, + bfd_error_no_armap, + bfd_error_no_more_archived_files, + bfd_error_malformed_archive, + bfd_error_file_not_recognized, + bfd_error_file_ambiguously_recognized, + bfd_error_no_contents, + bfd_error_nonrepresentable_section, + bfd_error_no_debug_section, + bfd_error_bad_value, + bfd_error_file_truncated, + bfd_error_file_too_big, + bfd_error_invalid_error_code +} bfd_error_type; + +bfd_error_type +bfd_get_error PARAMS ((void)); + +void +bfd_set_error PARAMS ((bfd_error_type error_tag)); + +CONST char * +bfd_errmsg PARAMS ((bfd_error_type error_tag)); + +void +bfd_perror PARAMS ((CONST char *message)); + +typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...)); + +bfd_error_handler_type +bfd_set_error_handler PARAMS ((bfd_error_handler_type)); + +void +bfd_set_error_program_name PARAMS ((const char *)); + +bfd_error_handler_type +bfd_get_error_handler PARAMS ((void)); + +long +bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect)); + +long +bfd_canonicalize_reloc PARAMS ((bfd *abfd, + asection *sec, + arelent **loc, + asymbol **syms)); + +void +bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count) + + ); + +boolean +bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags)); + +int +bfd_get_arch_size PARAMS ((bfd *abfd)); + +int +bfd_get_sign_extend_vma PARAMS ((bfd *abfd)); + +boolean +bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma)); + +long +bfd_get_mtime PARAMS ((bfd *abfd)); + +long +bfd_get_size PARAMS ((bfd *abfd)); + +int +bfd_get_gp_size PARAMS ((bfd *abfd)); + +void +bfd_set_gp_size PARAMS ((bfd *abfd, int i)); + +bfd_vma +bfd_scan_vma PARAMS ((CONST char *string, CONST char **end, int base)); + +boolean +bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); + +#define bfd_copy_private_bfd_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) +boolean +bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); + +#define bfd_merge_private_bfd_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ + (ibfd, obfd)) +boolean +bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); + +#define bfd_set_private_flags(abfd, flags) \ + BFD_SEND (abfd, _bfd_set_private_flags, \ + (abfd, flags)) +#define bfd_sizeof_headers(abfd, reloc) \ + BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) + +#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ + BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line)) + + /* Do these three do anything useful at all, for any back end? */ +#define bfd_debug_info_start(abfd) \ + BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) + +#define bfd_debug_info_end(abfd) \ + BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) + +#define bfd_debug_info_accumulate(abfd, section) \ + BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) + + +#define bfd_stat_arch_elt(abfd, stat) \ + BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) + +#define bfd_update_armap_timestamp(abfd) \ + BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) + +#define bfd_set_arch_mach(abfd, arch, mach)\ + BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) + +#define bfd_relax_section(abfd, section, link_info, again) \ + BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) + +#define bfd_gc_sections(abfd, link_info) \ + BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) + +#define bfd_merge_sections(abfd, link_info) \ + BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) + +#define bfd_link_hash_table_create(abfd) \ + BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) + +#define bfd_link_add_symbols(abfd, info) \ + BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) + +#define bfd_final_link(abfd, info) \ + BFD_SEND (abfd, _bfd_final_link, (abfd, info)) + +#define bfd_free_cached_info(abfd) \ + BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) + +#define bfd_get_dynamic_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) + +#define bfd_print_private_bfd_data(abfd, file)\ + BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) + +#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ + BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) + +#define bfd_get_dynamic_reloc_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) + +#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ + BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) + +extern bfd_byte *bfd_get_relocated_section_contents + PARAMS ((bfd *, struct bfd_link_info *, + struct bfd_link_order *, bfd_byte *, + boolean, asymbol **)); + +symindex +bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym)); + +boolean +bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head)); + +bfd * +bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous)); + +CONST char * +bfd_core_file_failing_command PARAMS ((bfd *abfd)); + +int +bfd_core_file_failing_signal PARAMS ((bfd *abfd)); + +boolean +core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd)); + +#define BFD_SEND(bfd, message, arglist) \ + ((*((bfd)->xvec->message)) arglist) + +#ifdef DEBUG_BFD_SEND +#undef BFD_SEND +#define BFD_SEND(bfd, message, arglist) \ + (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ + ((*((bfd)->xvec->message)) arglist) : \ + (bfd_assert (__FILE__,__LINE__), NULL)) +#endif +#define BFD_SEND_FMT(bfd, message, arglist) \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) + +#ifdef DEBUG_BFD_SEND +#undef BFD_SEND_FMT +#define BFD_SEND_FMT(bfd, message, arglist) \ + (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ + (bfd_assert (__FILE__,__LINE__), NULL)) +#endif +enum bfd_flavour { + bfd_target_unknown_flavour, + bfd_target_aout_flavour, + bfd_target_coff_flavour, + bfd_target_ecoff_flavour, + bfd_target_xcoff_flavour, + bfd_target_elf_flavour, + bfd_target_ieee_flavour, + bfd_target_nlm_flavour, + bfd_target_oasys_flavour, + bfd_target_tekhex_flavour, + bfd_target_srec_flavour, + bfd_target_ihex_flavour, + bfd_target_som_flavour, + bfd_target_os9k_flavour, + bfd_target_versados_flavour, + bfd_target_msdos_flavour, + bfd_target_ovax_flavour, + bfd_target_evax_flavour +}; + +enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; + +/* Forward declaration. */ +typedef struct bfd_link_info _bfd_link_info; + +typedef struct bfd_target +{ + char *name; + enum bfd_flavour flavour; + enum bfd_endian byteorder; + enum bfd_endian header_byteorder; + flagword object_flags; + flagword section_flags; + char symbol_leading_char; + char ar_pad_char; + unsigned short ar_max_namelen; + bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *)); + void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *)); + bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *)); + void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *)); + bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *)); + void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *)); + bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *)); + void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *)); + bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *)); + void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *)); + bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *)); + bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *)); + void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *)); + const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *)); + boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); + boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); + + /* Generic entry points. */ +#define BFD_JUMP_TABLE_GENERIC(NAME)\ +CAT(NAME,_close_and_cleanup),\ +CAT(NAME,_bfd_free_cached_info),\ +CAT(NAME,_new_section_hook),\ +CAT(NAME,_get_section_contents),\ +CAT(NAME,_get_section_contents_in_window) + + /* Called when the BFD is being closed to do any necessary cleanup. */ + boolean (*_close_and_cleanup) PARAMS ((bfd *)); + /* Ask the BFD to free all cached information. */ + boolean (*_bfd_free_cached_info) PARAMS ((bfd *)); + /* Called when a new section is created. */ + boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); + /* Read the contents of a section. */ + boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, + file_ptr, bfd_size_type)); + boolean (*_bfd_get_section_contents_in_window) + PARAMS ((bfd *, sec_ptr, bfd_window *, + file_ptr, bfd_size_type)); + + /* Entry points to copy private data. */ +#define BFD_JUMP_TABLE_COPY(NAME)\ +CAT(NAME,_bfd_copy_private_bfd_data),\ +CAT(NAME,_bfd_merge_private_bfd_data),\ +CAT(NAME,_bfd_copy_private_section_data),\ +CAT(NAME,_bfd_copy_private_symbol_data),\ +CAT(NAME,_bfd_set_private_flags),\ +CAT(NAME,_bfd_print_private_bfd_data)\ + /* Called to copy BFD general private data from one object file + to another. */ + boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); + /* Called to merge BFD general private data from one object file + to a common output file when linking. */ + boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *)); + /* Called to copy BFD private section data from one object file + to another. */ + boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, + bfd *, sec_ptr)); + /* Called to copy BFD private symbol data from one symbol + to another. */ + boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, + bfd *, asymbol *)); + /* Called to set private backend flags */ + boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword)); + + /* Called to print private BFD data */ + boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); + + /* Core file entry points. */ +#define BFD_JUMP_TABLE_CORE(NAME)\ +CAT(NAME,_core_file_failing_command),\ +CAT(NAME,_core_file_failing_signal),\ +CAT(NAME,_core_file_matches_executable_p) + char * (*_core_file_failing_command) PARAMS ((bfd *)); + int (*_core_file_failing_signal) PARAMS ((bfd *)); + boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); + + /* Archive entry points. */ +#define BFD_JUMP_TABLE_ARCHIVE(NAME)\ +CAT(NAME,_slurp_armap),\ +CAT(NAME,_slurp_extended_name_table),\ +CAT(NAME,_construct_extended_name_table),\ +CAT(NAME,_truncate_arname),\ +CAT(NAME,_write_armap),\ +CAT(NAME,_read_ar_hdr),\ +CAT(NAME,_openr_next_archived_file),\ +CAT(NAME,_get_elt_at_index),\ +CAT(NAME,_generic_stat_arch_elt),\ +CAT(NAME,_update_armap_timestamp) + boolean (*_bfd_slurp_armap) PARAMS ((bfd *)); + boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *)); + boolean (*_bfd_construct_extended_name_table) + PARAMS ((bfd *, char **, bfd_size_type *, const char **)); + void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); + boolean (*write_armap) PARAMS ((bfd *arch, + unsigned int elength, + struct orl *map, + unsigned int orl_count, + int stridx)); + PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); + bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev)); +#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i)) + bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex)); + int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *)); + boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); + + /* Entry points used for symbols. */ +#define BFD_JUMP_TABLE_SYMBOLS(NAME)\ +CAT(NAME,_get_symtab_upper_bound),\ +CAT(NAME,_get_symtab),\ +CAT(NAME,_make_empty_symbol),\ +CAT(NAME,_print_symbol),\ +CAT(NAME,_get_symbol_info),\ +CAT(NAME,_bfd_is_local_label_name),\ +CAT(NAME,_get_lineno),\ +CAT(NAME,_find_nearest_line),\ +CAT(NAME,_bfd_make_debug_symbol),\ +CAT(NAME,_read_minisymbols),\ +CAT(NAME,_minisymbol_to_symbol) + long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *)); + long (*_bfd_canonicalize_symtab) PARAMS ((bfd *, + struct symbol_cache_entry **)); + struct symbol_cache_entry * + (*_bfd_make_empty_symbol) PARAMS ((bfd *)); + void (*_bfd_print_symbol) PARAMS ((bfd *, PTR, + struct symbol_cache_entry *, + bfd_print_symbol_type)); +#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) PARAMS ((bfd *, + struct symbol_cache_entry *, + symbol_info *)); +#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e)) + boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *)); + + alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *)); + boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd, + struct sec *section, struct symbol_cache_entry **symbols, + bfd_vma offset, CONST char **file, CONST char **func, + unsigned int *line)); + /* Back-door to allow format-aware applications to create debug symbols + while using BFD for everything else. Currently used by the assembler + when creating COFF files. */ + asymbol * (*_bfd_make_debug_symbol) PARAMS (( + bfd *abfd, + void *ptr, + unsigned long size)); +#define bfd_read_minisymbols(b, d, m, s) \ + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *, + unsigned int *)); +#define bfd_minisymbol_to_symbol(b, d, m, f) \ + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, + asymbol *)); + + /* Routines for relocs. */ +#define BFD_JUMP_TABLE_RELOCS(NAME)\ +CAT(NAME,_get_reloc_upper_bound),\ +CAT(NAME,_canonicalize_reloc),\ +CAT(NAME,_bfd_reloc_type_lookup) + long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); + long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, + struct symbol_cache_entry **)); + /* See documentation on reloc types. */ + reloc_howto_type * + (*reloc_type_lookup) PARAMS ((bfd *abfd, + bfd_reloc_code_real_type code)); + + /* Routines used when writing an object file. */ +#define BFD_JUMP_TABLE_WRITE(NAME)\ +CAT(NAME,_set_arch_mach),\ +CAT(NAME,_set_section_contents) + boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture, + unsigned long)); + boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, + file_ptr, bfd_size_type)); + + /* Routines used by the linker. */ +#define BFD_JUMP_TABLE_LINK(NAME)\ +CAT(NAME,_sizeof_headers),\ +CAT(NAME,_bfd_get_relocated_section_contents),\ +CAT(NAME,_bfd_relax_section),\ +CAT(NAME,_bfd_link_hash_table_create),\ +CAT(NAME,_bfd_link_add_symbols),\ +CAT(NAME,_bfd_final_link),\ +CAT(NAME,_bfd_link_split_section),\ +CAT(NAME,_bfd_gc_sections),\ +CAT(NAME,_bfd_merge_sections) + int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); + bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *, + struct bfd_link_info *, struct bfd_link_order *, + bfd_byte *data, boolean relocateable, + struct symbol_cache_entry **)); + + boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *, + struct bfd_link_info *, boolean *again)); + + /* Create a hash table for the linker. Different backends store + different information in this table. */ + struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); + + /* Add symbols from this object file into the hash table. */ + boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); + + /* Do a link based on the link_order structures attached to each + section of the BFD. */ + boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); + + /* Should this section be split up into smaller pieces during linking. */ + boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *)); + + /* Remove sections that are not referenced from the output. */ + boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *)); + + /* Attempt to merge SEC_MERGE sections. */ + boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); + + /* Routines to handle dynamic symbols and relocs. */ +#define BFD_JUMP_TABLE_DYNAMIC(NAME)\ +CAT(NAME,_get_dynamic_symtab_upper_bound),\ +CAT(NAME,_canonicalize_dynamic_symtab),\ +CAT(NAME,_get_dynamic_reloc_upper_bound),\ +CAT(NAME,_canonicalize_dynamic_reloc) + /* Get the amount of memory required to hold the dynamic symbols. */ + long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); + /* Read in the dynamic symbols. */ + long (*_bfd_canonicalize_dynamic_symtab) + PARAMS ((bfd *, struct symbol_cache_entry **)); + /* Get the amount of memory required to hold the dynamic relocs. */ + long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *)); + /* Read in the dynamic relocs. */ + long (*_bfd_canonicalize_dynamic_reloc) + PARAMS ((bfd *, arelent **, struct symbol_cache_entry **)); + + /* Opposite endian version of this target. */ + const struct bfd_target * alternative_target; + + PTR backend_data; + +} bfd_target; +boolean +bfd_set_default_target PARAMS ((const char *name)); + +const bfd_target * +bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd)); + +const char ** +bfd_target_list PARAMS ((void)); + +const bfd_target * +bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *)); + +boolean +bfd_check_format PARAMS ((bfd *abfd, bfd_format format)); + +boolean +bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching)); + +boolean +bfd_set_format PARAMS ((bfd *abfd, bfd_format format)); + +CONST char * +bfd_format_string PARAMS ((bfd_format format)); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/contrib/media/updf/include/bio.h b/contrib/media/updf/include/bio.h new file mode 100644 index 0000000000..764d7cb2e9 --- /dev/null +++ b/contrib/media/updf/include/bio.h @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __BIO_H +#define __BIO_H +/** +@file bio.h +@brief Implementation of an individual bit input-output (BIO) + +The functions in BIO.C have for goal to realize an individual bit input - output. +*/ + +/** @defgroup BIO BIO - Individual bit input-output stream */ +/*@{*/ + +/** +Individual bit input-output stream (BIO) +*/ +typedef struct opj_bio { + /** pointer to the start of the buffer */ + unsigned char *start; + /** pointer to the end of the buffer */ + unsigned char *end; + /** pointer to the present position in the buffer */ + unsigned char *bp; + /** temporary place where each byte is read or written */ + unsigned int buf; + /** coder : number of bits free to write. decoder : number of bits read */ + int ct; +} opj_bio_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new BIO handle +@return Returns a new BIO handle if successful, returns NULL otherwise +*/ +opj_bio_t* bio_create(void); +/** +Destroy a previously created BIO handle +@param bio BIO handle to destroy +*/ +void bio_destroy(opj_bio_t *bio); +/** +Number of bytes written. +@param bio BIO handle +@return Returns the number of bytes written +*/ +int bio_numbytes(opj_bio_t *bio); +/** +Init encoder +@param bio BIO handle +@param bp Output buffer +@param len Output buffer length +*/ +void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len); +/** +Init decoder +@param bio BIO handle +@param bp Input buffer +@param len Input buffer length +*/ +void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len); +/** +Write bits +@param bio BIO handle +@param v Value of bits +@param n Number of bits to write +*/ +void bio_write(opj_bio_t *bio, int v, int n); +/** +Read bits +@param bio BIO handle +@param n Number of bits to read +@return Returns the corresponding read number +*/ +int bio_read(opj_bio_t *bio, int n); +/** +Flush bits +@param bio BIO handle +@return Returns 1 if successful, returns 0 otherwise +*/ +int bio_flush(opj_bio_t *bio); +/** +Passes the ending bits (coming from flushing) +@param bio BIO handle +@return Returns 1 if successful, returns 0 otherwise +*/ +int bio_inalign(opj_bio_t *bio); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __BIO_H */ + diff --git a/contrib/media/updf/include/bios.h b/contrib/media/updf/include/bios.h new file mode 100644 index 0000000000..0e0acecdc4 --- /dev/null +++ b/contrib/media/updf/include/bios.h @@ -0,0 +1,115 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_bios_h_ +#define __dj_include_bios_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +int bioscom(int _cmd, char _data, int _port); +int biosdisk(int _cmd, int _drive, int _head, int _track, int _sector, + int _nsects, void *_buffer); +int biosequip(void); +int bioskey(int cmd); +int biosmemory(void); +int biosprint(int _cmd, int _byte, int _port); +long biostime(int _cmd, long _newtime); + +/* + * For compatibility with other DOS C compilers. + */ + +/* Disk parameters for _bios_disk() function. */ +struct _diskinfo_t { + unsigned drive; /* Drive number. */ + unsigned head; /* Head number. */ + unsigned track; /* Track number. */ + unsigned sector; /* Sector number. */ + unsigned nsectors; /* Number of sectors to read/write/verify. */ + void *buffer; /* Buffer for reading/writing/verifying. */ +}; +#define diskinfo_t _diskinfo_t + +/* Constants for _bios_disk() function. */ +#define _DISK_RESET 0 /* Reset disk controller. */ +#define _DISK_STATUS 1 /* Get disk status. */ +#define _DISK_READ 2 /* Read disk sectors. */ +#define _DISK_WRITE 3 /* Write disk sectors. */ +#define _DISK_VERIFY 4 /* Verify disk sectors. */ +#define _DISK_FORMAT 5 /* Format disk track. */ + +/* Constants fot _bios_serialcom() function. */ +#define _COM_INIT 0 /* Init serial port. */ +#define _COM_SEND 1 /* Send character. */ +#define _COM_RECEIVE 2 /* Receive character. */ +#define _COM_STATUS 3 /* Get serial port status. */ + +#define _COM_CHR7 2 /* 7 bits characters. */ +#define _COM_CHR8 3 /* 8 bits characters. */ + +#define _COM_STOP1 0 /* 1 stop bit. */ +#define _COM_STOP2 4 /* 2 stop bits. */ + +#define _COM_NOPARITY 0 /* No parity. */ +#define _COM_ODDPARITY 8 /* Odd parity. */ +#define _COM_SPACEPARITY 16 /* Space parity. */ +#define _COM_EVENPARITY 24 /* Even parity. */ + +#define _COM_110 0 /* 110 baud. */ +#define _COM_150 32 /* 150 baud. */ +#define _COM_300 64 /* 300 baud. */ +#define _COM_600 96 /* 600 baud. */ +#define _COM_1200 128 /* 1200 baud. */ +#define _COM_2400 160 /* 2400 baud. */ +#define _COM_4800 192 /* 4800 baud. */ +#define _COM_9600 224 /* 9600 baud. */ + +/* Constants for _bios_keybrd() function. */ +#define _KEYBRD_READ 0 /* Read character. */ +#define _KEYBRD_READY 1 /* Check character. */ +#define _KEYBRD_SHIFTSTATUS 2 /* Get shift status. */ + +#define _NKEYBRD_READ 0x10 /* Read extended character. */ +#define _NKEYBRD_READY 0x11 /* Check extended character. */ +#define _NKEYBRD_SHIFTSTATUS 0x12 /* Get exteded shift status. */ + +/* Constans for _bios_printer() function. */ +#define _PRINTER_WRITE 0 /* Write character. */ +#define _PRINTER_INIT 1 /* Initialize printer. */ +#define _PRINTER_STATUS 2 /* Get printer status. */ + +/* Constants for _bios_timeofday() function. */ +#define _TIME_GETCLOCK 0 /* Get current clock count. */ +#define _TIME_SETCLOCK 1 /* Set current clock count. */ + +#define _bios_equiplist() ((unsigned)biosequip()) +#define _bios_memsize() ((unsigned)biosmemory()) +#define _bios_printer(_c, _p, _d) ((unsigned)biosprint(_c, _d, _p)) +#define _bios_serialcom(_c, _p, _d) ((unsigned)bioscom(_c, _d, _p)) +#define _bios_keybrd(_c) ((unsigned)bioskey(_c)) + +unsigned _bios_disk(unsigned _cmd, struct _diskinfo_t *_di); +unsigned _bios_timeofday(unsigned _cmd, unsigned long *_timeval); + +/* For int86(), int86x() and union REGS. */ +#include + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_bios_h_ */ diff --git a/contrib/media/updf/include/bits/basic_file.h b/contrib/media/updf/include/bits/basic_file.h new file mode 100644 index 0000000000..65081a0af1 --- /dev/null +++ b/contrib/media/updf/include/bits/basic_file.h @@ -0,0 +1,252 @@ +// Wrapper of C-language FILE struct -*- C++ -*- + +// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8 File-based streams +// + +#ifndef _CPP_BASIC_FILE +#define _CPP_BASIC_FILE 1 + +#pragma GCC system_header + +#include +#include + +namespace std +{ + // Ulrich is going to make some detailed comment here, explaining + // all this unpleasantness, providing detailed performance analysis + // as to why we have to do all this lame vtable hacking instead of a + // sane, function-based approach. This verbiage will provide a clear + // and detailed description of the whole object-layout, + // vtable-swapping, sordid history of this hack. + template + struct __basic_file_base: public __c_file_type + { + virtual + ~__basic_file_base() { }; + + virtual int + overflow(int __c = EOF) = 0; + + virtual int + underflow() = 0; + + virtual int + uflow() = 0; + + virtual int + pbackfail(int __c) = 0; + + virtual streamsize + xsputn(const _CharT* __s, streamsize __n) = 0; + + virtual streamsize + xsgetn(_CharT* __s, streamsize __n) = 0; + + virtual streamoff + seekoff(streamoff __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) = 0; + + virtual streamoff + seekpos(streamoff __pos, + ios_base::openmode __mode = ios_base::in | ios_base::out) = 0; + + virtual streambuf* + setbuf(_CharT* __b, int __len) = 0; + + virtual int + sync() = 0; + + virtual int + doallocate() = 0; + + virtual streamsize + sys_read(_CharT* __s, streamsize __n) = 0; + + virtual streamsize + sys_write(const _CharT* __s, streamsize __n) = 0; + + virtual streamoff + sys_seek(streamoff __off, ios_base::seekdir __way) = 0; + + virtual int + sys_close() = 0; + + virtual int + sys_stat(void* __v) = 0; + + virtual int + showmanyc() = 0; + + virtual void + imbue(void* __v) = 0; + }; + + // Some of these member functions are based on libio/filebuf.cc. + // Also note that the order and number of virtual functions has to precisely + // match the order and number in the _IO_jump_t struct defined in libioP.h. + template +#ifdef _GLIBCPP_BASIC_FILE_INHERITANCE + class __basic_file: public __basic_file_base<_CharT> +#else + class __basic_file +#endif + { +#if _GLIBCPP_BASIC_FILE_ENCAPSULATION + __c_file_type* _M_cfile; + bool _M_cfile_created; +#else +# ifdef _GLIBCPP_USE_WCHAR_T + __c_wfile_type _M_wfile; +# endif +#endif + + public: + __basic_file(__c_lock* __lock = 0); + + void + _M_open_mode(ios_base::openmode __mode, int& __p_mode, int& __rw_mode, + char* __c_mode); + + // Equivalent to the normal fopen function. + __basic_file* + open(const char* __name, ios_base::openmode __mode, int __prot = 0664); + + // Used for opening the standard streams, cin, cout, cerr, clog, + // and their wide-stream equivalents. Instead of calling open, it + // just sets __c_file_type->_fileno and the respective _flags bits, and + // returns. + __basic_file* + sys_open(__c_file_type* __file, ios_base::openmode __mode); + + _CharT + sys_getc(); + + _CharT + sys_ungetc(_CharT); + + __basic_file* + close(); + + bool + is_open(); + + // NB: Must match FILE specific jump table starting here--this + // means all virtual functions starting with the dtor must match, + // slot by slot. For glibc-based dystems, this means the _IO_FILE + // as the FILE struct and _IO_jump_t as the jump table. + virtual + ~__basic_file(); // Takes the place of __finish. + + virtual int + overflow(int __c = EOF); + + virtual int + underflow(); + + virtual int + uflow(); + + virtual int + pbackfail(int __c); + + // A complex "write" function that sets all of __c_file_type's + // pointers and associated data members correctly and manages its + // relation to the external byte sequence. + virtual streamsize + xsputn(const _CharT* __s, streamsize __n); + + // A complex "read" function that sets all of __c_file_type's + // pointers and associated data members correctly and manages its + // relation to the external byte sequence. + virtual streamsize + xsgetn(_CharT* __s, streamsize __n); + + // A complex "seekoff" function that sets all of __c_file_type's + // pointers and associated data members correctly and manages its + // relation to the external byte sequence. + virtual streamoff + seekoff(streamoff __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + // A complex "seekpos" function that sets all of __c_file_type's + // pointers and associated data members correctly and manages its + // relation to the external byte sequence. + virtual streamoff + seekpos(streamoff __pos, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual streambuf* + setbuf(_CharT* __b, int __len); + + virtual int + sync(); + + virtual int + doallocate(); + + // A simple read function for the external byte sequence, that + // does no mucking around with or setting of the pointers or flags + // in __c_file_type. + virtual streamsize + sys_read(_CharT* __s, streamsize __n); + + // A simple write function for the external byte sequence, that + // does no mucking around with or setting of the pointers or flags + // in __c_file_type. + virtual streamsize + sys_write(const _CharT* __s, streamsize __n); + + // A simple seek function for the external byte sequence, that + // does no mucking around with or setting of the pointers or flags + // in __c_file_type. + virtual streamoff + sys_seek(streamoff __off, ios_base::seekdir __way); + + virtual int + sys_close(); + + virtual int + sys_stat(void* __v); + + virtual int + showmanyc(); + + virtual void + imbue(void* __v); + }; +} // namespace std + +// Now include the bits that are dependant on the underlying I/O +// model chosen at configure time. +#include + +#endif // _CPP_BASIC_FILE diff --git a/contrib/media/updf/include/bits/basic_ios.h b/contrib/media/updf/include/bits/basic_ios.h new file mode 100644 index 0000000000..7eb6d7a224 --- /dev/null +++ b/contrib/media/updf/include/bits/basic_ios.h @@ -0,0 +1,218 @@ +// Iostreams base classes -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BITS_BASICIOS_H +#define _CPP_BITS_BASICIOS_H 1 + +#pragma GCC system_header + +#include +#include + +namespace std +{ + // 27.4.5 Template class basic_ios + template + class basic_ios : public ios_base + { + public: + // Types: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + // Non-standard Types: + typedef ctype<_CharT> __ctype_type; + typedef ostreambuf_iterator<_CharT, _Traits> __ostreambuf_iter; + typedef num_put<_CharT, __ostreambuf_iter> __numput_type; + typedef istreambuf_iterator<_CharT, _Traits> __istreambuf_iter; + typedef num_get<_CharT, __istreambuf_iter> __numget_type; + + // Data members: + private: + basic_ostream<_CharT, _Traits>* _M_tie; + char_type _M_fill; + iostate _M_exception; + + protected: + basic_streambuf<_CharT, _Traits>* _M_streambuf; + iostate _M_streambuf_state; + + // Cached use_facet, which is based on the current locale info. + const __ctype_type* _M_ios_fctype; + // From ostream. + const __numput_type* _M_fnumput; + // From istream. + const __numget_type* _M_fnumget; + + public: + inline const __ctype_type* + _M_get_fctype_ios(void) + { return _M_ios_fctype; } + + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + + inline bool + operator!() const + { return this->fail(); } + + inline iostate + rdstate() const + { return _M_streambuf_state; } + + inline void + clear(iostate __state = goodbit) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if ((this->rdstate() & this->exceptions())) + __throw_ios_failure("basic_ios::clear(iostate) caused exception"); + } + + inline void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + + inline bool + good() const + { return this->rdstate() == 0; } + + inline bool + eof() const + { return (this->rdstate() & eofbit) != 0; } + + inline bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + + inline bool + bad() const + { return (this->rdstate() & badbit) != 0; } + + inline iostate + exceptions() const + { return _M_exception; } + + inline void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + + // Constructor/destructor: + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base() + { this->init(__sb); } + + virtual + ~basic_ios() { } + + // Members: + inline basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } + + inline basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + + inline basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } + + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); + + basic_ios& + copyfmt(const basic_ios& __rhs); + + inline char_type + fill() const + { return _M_fill; } + + inline char_type + fill(char_type __ch) + { + char_type __old = _M_fill; + _M_fill = __ch; + return __old; + } + + // Locales: + locale + imbue(const locale& __loc); + + char + narrow(char_type __c, char __dfault) const; + + char_type + widen(char __c) const; + + protected: + // 27.4.5.1 basic_ios constructors + basic_ios() : ios_base() + { } + + void + init(basic_streambuf<_CharT, _Traits>* __sb); + + bool + _M_check_facet(const locale::facet* __f) + { + bool __ret = false; + if (__f) + __ret = true; + else + __throw_bad_cast(); + return __ret; + } + + void + _M_cache_facets(const locale& __loc); + }; +} // namespace std + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#include +#endif + +#endif /* _CPP_BITS_BASICIOS_H */ + + diff --git a/contrib/media/updf/include/bits/basic_ios.tcc b/contrib/media/updf/include/bits/basic_ios.tcc new file mode 100644 index 0000000000..47d940bd69 --- /dev/null +++ b/contrib/media/updf/include/bits/basic_ios.tcc @@ -0,0 +1,145 @@ +// basic_ios locale and locale-related member functions -*- C++ -*- + +// Copyright (C) 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BITS_BASICIOS_TCC +#define _CPP_BITS_BASICIOS_TCC 1 + +namespace std +{ + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + // Per 27.1.1.1, do not call imbue, yet must trash all caches + // associated with imbue() + + // Alloc any new word array first, so if it fails we have "rollback". + _Words* __words = (__rhs._M_word_limit <= _S_local_words) ? + _M_word_array : new _Words[__rhs._M_word_limit]; + + // XXX This is the only reason _Callback_list was defined + // inline. The suspicion is that this increased compilation + // times dramatically for functions that use this member + // function (inserters_extractors, ios_manip_fmtflags). FIX ME, + // clean this stuff up. Callbacks are broken right now, anyway. + + // Bump refs before doing callbacks, for safety. + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_words != _M_word_array) + delete [] _M_words; + _M_dispose_callbacks(); + + _M_callbacks = __cb; // NB: Don't want any added during above. + for (int __i = 0; __i < __rhs._M_word_limit; ++__i) + __words[__i] = __rhs._M_words[__i]; + if (_M_words != _M_word_array) + delete [] _M_words; + _M_words = __words; + _M_word_limit = __rhs._M_word_limit; + + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + // The next is required to be the last assignment. + this->exceptions(__rhs.exceptions()); + + _M_call_callbacks(copyfmt_event); + return *this; + } + + template + char + basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const + { return _M_ios_fctype->narrow(__c, __dfault); } + + template + _CharT + basic_ios<_CharT, _Traits>::widen(char __c) const + { return _M_ios_fctype->widen(__c); } + + // Locales: + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_facets(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + // NB: This may be called more than once on the same object. + ios_base::_M_init(); + _M_cache_facets(_M_ios_locale); + _M_tie = 0; + _M_fill = this->widen(' '); + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + + template + void + basic_ios<_CharT, _Traits>::_M_cache_facets(const locale& __loc) + { + if (has_facet<__ctype_type>(__loc)) + _M_ios_fctype = &use_facet<__ctype_type>(__loc); + // Should be filled in by ostream and istream, respectively. + if (has_facet<__numput_type>(__loc)) + _M_fnumput = &use_facet<__numput_type>(__loc); + if (has_facet<__numget_type>(__loc)) + _M_fnumget = &use_facet<__numget_type>(__loc); + } +} // namespace std + +#endif // _CPP_BITS_BASICIOS_TCC + + + diff --git a/contrib/media/updf/include/bits/basic_string.h b/contrib/media/updf/include/bits/basic_string.h new file mode 100644 index 0000000000..ef08da102f --- /dev/null +++ b/contrib/media/updf/include/bits/basic_string.h @@ -0,0 +1,1045 @@ +// Components for manipulating sequences of characters -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 Strings library +// + +#ifndef _CPP_BITS_STRING_H +#define _CPP_BITS_STRING_H 1 + +#pragma GCC system_header + +#include + +namespace std +{ + + // Documentation? What's that? + // Nathan Myers . + // + // A string looks like this: + // + // [_Rep] + // _M_length + // [basic_string] _M_capacity + // _M_dataplus _M_state + // _M_p ----------------> unnamed array of char_type + + // Where the _M_p points to the first character in the string, and + // you cast it to a pointer-to-_Rep and subtract 1 to get a + // pointer to the header. + + // This approach has the enormous advantage that a string object + // requires only one allocation. All the ugliness is confined + // within a single pair of inline functions, which each compile to + // a single "add" instruction: _Rep::_M_data(), and + // string::_M_rep(); and the allocation function which gets a + // block of raw bytes and with room enough and constructs a _Rep + // object at the front. + + // The reason you want _M_data pointing to the character array and + // not the _Rep is so that the debugger can see the string + // contents. (Probably we should add a non-inline member to get + // the _Rep for the debugger to use, so users can check the actual + // string length.) + + // Note that the _Rep object is a POD so that you can have a + // static "empty string" _Rep object already "constructed" before + // static constructors have run. The reference-count encoding is + // chosen so that a 0 indicates one reference, so you never try to + // destroy the empty-string _Rep object. + + // All but the last paragraph is considered pretty conventional + // for a C++ string implementation. + + // 21.3 Template class basic_string + template + class basic_string + { + // Types: + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type difference_type; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef __normal_iterator iterator; + typedef __normal_iterator const_iterator; + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + + private: + // _Rep: string representation + // Invariants: + // 1. String really contains _M_length + 1 characters; last is set + // to 0 only on call to c_str(). We avoid instantiating + // _CharT() where the interface does not require it. + // 2. _M_capacity >= _M_length + // Allocated memory is always _M_capacity + (1 * sizeof(_CharT)). + // 3. _M_references has three states: + // -1: leaked, one reference, no ref-copies allowed, non-const. + // 0: one reference, non-const. + // n>0: n + 1 references, operations require a lock, const. + // 4. All fields==0 is an empty string, given the extra storage + // beyond-the-end for a null terminator; thus, the shared + // empty string representation needs no constructor. + + struct _Rep + { + // Types: + typedef typename _Alloc::rebind::other _Raw_bytes_alloc; + + // (Public) Data members: + + // The maximum number of individual char_type elements of an + // individual string is determined by _S_max_size. This is the + // value that will be returned by max_size(). (Whereas npos + // is the maximum number of bytes the allocator can allocate.) + // If one was to divvy up the theoretical largest size string, + // with a terminating character and m _CharT elements, it'd + // look like this: + // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT) + // Solving for m: + // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1 + // In addition, this implementation quarters this ammount. + static const size_type _S_max_size; + static const _CharT _S_terminal; + + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_references; + + bool + _M_is_leaked() const + { return _M_references < 0; } + + bool + _M_is_shared() const + { return _M_references > 0; } + + void + _M_set_leaked() + { _M_references = -1; } + + void + _M_set_sharable() + { _M_references = 0; } + + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*> (this + 1); } + + _CharT& + operator[](size_t __s) throw() + { return _M_refdata() [__s]; } + + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { return (!_M_is_leaked() && __alloc1 == __alloc2) ? + _M_refcopy() : _M_clone(__alloc1); } + + // Create & Destroy + static _Rep* + _S_create(size_t, const _Alloc&); + + void + _M_dispose(const _Alloc& __a) + { + if (__exchange_and_add(&_M_references, -1) <= 0) + _M_destroy(__a); + } // XXX MT + + void + _M_destroy(const _Alloc&) throw(); + + _CharT* + _M_refcopy() throw() + { + __atomic_add(&_M_references, 1); + return _M_refdata(); + } // XXX MT + + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + +#if _GLIBCPP_ALLOC_CONTROL + // These function pointers allow you to modify the allocation + // policy used by the string classes. By default they expand by + // powers of two, but this may be excessive for space-critical + // applications. + + // Returns true if ALLOCATED is too much larger than LENGTH + static bool (*_S_excess_slop) (size_t __length, size_t __allocated); + + inline static bool + __default_excess(size_t, size_t); +#else + inline static bool + _S_excess_slop(size_t, size_t); +#endif + }; + + // Use empty-base optimization: http://www.cantrip.org/emptyopt.html + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + + _CharT* _M_p; // The actual data. + }; + + public: + // Data Members (public): + // NB: This is an unsigned type, and thus represents the maximum + // size that the allocator can hold. + static const size_type npos = static_cast(-1); + + private: + // Data Members (private): + mutable _Alloc_hider _M_dataplus; + + // The following storage is init'd to 0 by the linker, resulting + // (carefully) in an empty string with one reference. + static size_type _S_empty_rep_storage[(sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)]; + + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + + // For the internal use we have functions similar to `begin'/`end' + // but they do not call _M_leak. + iterator + _M_ibegin() const { return iterator(_M_data()); } + + iterator + _M_iend() const { return iterator(_M_data() + this->size()); } + + void + _M_leak() // for use in begin() & non-const op[] + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + + iterator + _M_check(size_type __pos) const + { + if (__pos > this->size()) + __throw_out_of_range("basic_string::_M_check"); + return _M_ibegin() + __pos; + } + + // NB: _M_fold doesn't check for a bad __pos1 value. + iterator + _M_fold(size_type __pos, size_type __off) const + { + bool __testoff = __off < this->size() - __pos; + size_type __newoff = __testoff ? __off : this->size() - __pos; + return (_M_ibegin() + __pos + __newoff); + } + + // _S_copy_chars is a separate template to permit specialization + // to optimize for the common case of pointers as iterators. + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); //these types are off + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { traits_type::copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { traits_type::copy(__p, __k1, __k2 - __k1); } + + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + + void + _M_leak_hard(); + + static _Rep& + _S_empty_rep() + { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); } + + public: + // Construct/copy/destroy: + // NB: We overload ctors in some cases instead of using default + // arguments, per 17.4.4.4 para. 2 item 2. + + inline + basic_string(); + + explicit + basic_string(const _Alloc& __a); + + // NB: per LWG issue 42, semantics different from IS: + basic_string(const basic_string& __str); + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); + + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); + + template + basic_string(_InputIterator __begin, _InputIterator __end, + const _Alloc& __a = _Alloc()); + + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + + basic_string& + operator=(const basic_string& __str) { return this->assign(__str); } + + basic_string& + operator=(const _CharT* __s) { return this->assign(__s); } + + basic_string& + operator=(_CharT __c) { return this->assign(1, __c); } + + // Iterators: + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + + const_iterator + begin() const + { return const_iterator(_M_data()); } + + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } + + public: + // Capacity: + size_type + size() const { return _M_rep()->_M_length; } + + size_type + length() const { return _M_rep()->_M_length; } + + size_type + max_size() const { return _Rep::_S_max_size; } + + void + resize(size_type __n, _CharT __c); + + void + resize(size_type __n) { this->resize(__n, _CharT()); } + + size_type + capacity() const { return _M_rep()->_M_capacity; } + + void + reserve(size_type __res_arg = 0); + + void + clear() { _M_mutate(0, this->size(), 0); } + + bool + empty() const { return this->size() == 0; } + + // Element access: + const_reference + operator[] (size_type __pos) const + { return _M_data()[__pos]; } + + reference + operator[](size_type __pos) + { + _M_leak(); + return _M_data()[__pos]; + } + + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range("basic_string::at"); + return _M_data()[__n]; + } + + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range("basic_string::at"); + _M_leak(); + return _M_data()[__n]; + } + + // Modifiers: + basic_string& + operator+=(const basic_string& __str) { return this->append(__str); } + + basic_string& + operator+=(const _CharT* __s) { return this->append(__s); } + + basic_string& + operator+=(_CharT __c) { return this->append(size_type(1), __c); } + + basic_string& + append(const basic_string& __str); + + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + + basic_string& + append(const _CharT* __s, size_type __n); + + basic_string& + append(const _CharT* __s) + { return this->append(__s, traits_type::length(__s)); } + + basic_string& + append(size_type __n, _CharT __c); + + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + + void + push_back(_CharT __c) + { this->replace(_M_iend(), _M_iend(), 1, __c); } + + basic_string& + assign(const basic_string& __str); + + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { + return this->assign(__str._M_check(__pos), __str._M_fold(__pos, __n)); + } + + basic_string& + assign(const _CharT* __s, size_type __n) + { return this->assign(__s, __s + __n); } + + basic_string& + assign(const _CharT* __s) + { return this->assign(__s, __s + traits_type::length(__s)); } + + basic_string& + assign(size_type __n, _CharT __c) + { return this->replace(_M_ibegin(), _M_iend(), __n, __c); } + + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } + + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } + + template + void insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } + + basic_string& + insert(size_type __pos1, const basic_string& __str) + { + iterator __p = _M_check(__pos1); + this->replace(__p, __p, __str._M_ibegin(), __str._M_iend()); + return *this; + } + + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { + iterator __p = _M_check(__pos1); + this->replace(__p, __p, __str._M_check(__pos2), + __str._M_fold(__pos2, __n)); + return *this; + } + + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n) + { + iterator __p = _M_check(__pos); + this->replace(__p, __p, __s, __s + __n); + return *this; + } + + basic_string& + insert(size_type __pos, const _CharT* __s) + { return this->insert(__pos, __s, traits_type::length(__s)); } + + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { + this->insert(_M_check(__pos), __n, __c); + return *this; + } + + iterator + insert(iterator __p, _CharT __c = _CharT()) + { + size_type __pos = __p - _M_ibegin(); + this->insert(_M_check(__pos), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return this->_M_ibegin() + __pos; + } + + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + return this->replace(_M_check(__pos), _M_fold(__pos, __n), + _M_data(), _M_data()); + } + + iterator + erase(iterator __position) + { + size_type __i = __position - _M_ibegin(); + this->replace(__position, __position + 1, _M_data(), _M_data()); + _M_rep()->_M_set_leaked(); + return _M_ibegin() + __i; + } + + iterator + erase(iterator __first, iterator __last) + { + size_type __i = __first - _M_ibegin(); + this->replace(__first, __last, _M_data(), _M_data()); + _M_rep()->_M_set_leaked(); + return _M_ibegin() + __i; + } + + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { + return this->replace(_M_check(__pos), _M_fold(__pos, __n), + __str.begin(), __str.end()); + } + + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2); + + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + return this->replace(_M_check(__pos), _M_fold(__pos, __n1), + __s, __s + __n2); + } + + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + return this->replace(_M_check(__pos), _M_fold(__pos, __n1), + __s, __s + traits_type::length(__s)); + } + + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { + return this->replace(_M_check(__pos), _M_fold(__pos, __n1), __n2, __c); + } + + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str.begin(), __str.end()); } + + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __s, size_type __n) + { return this->replace(__i1, __i2, __s, __s + __n); } + + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { return this->replace(__i1, __i2, __s, + __s + traits_type::length(__s)); } + + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c); + + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { return _M_replace(__i1, __i2, __k1, __k2, + typename iterator_traits<_InputIterator>::iterator_category()); } + + private: + template + basic_string& + _M_replace(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, input_iterator_tag); + + template + basic_string& + _M_replace(iterator __i1, iterator __i2, _FwdIterator __k1, + _FwdIterator __k2, forward_iterator_tag); + + // _S_construct_aux is used to implement the 21.3.1 para 15 which + // requires special behaviour if _InIter is an integral type + template + static _CharT* + _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a, + __false_type) + { + typedef typename iterator_traits<_InIter>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + + template + static _CharT* + _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a, + __true_type) + { + return _S_construct(static_cast(__beg), + static_cast(__end), __a); + } + + template + static _CharT* + _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a) + { + typedef typename _Is_integer<_InIter>::_Integral _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + + // For Input Iterators, used in istreambuf_iterators, etc. + template + static _CharT* + _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, + input_iterator_tag); + + // For forward_iterators up to random_access_iterators, used for + // string::iterator, _CharT*, etc. + template + static _CharT* + _S_construct(_FwdIter __end, _FwdIter __beg, const _Alloc& __a, + forward_iterator_tag); + + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + + public: + + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; + + void + swap(basic_string<_CharT, _Traits, _Alloc>& __s); + + // String operations: + const _CharT* + c_str() const + { + // MT: This assumes concurrent writes are OK. + size_type __n = this->size(); + traits_type::assign(_M_data()[__n], _Rep::_S_terminal); + return _M_data(); + } + + const _CharT* + data() const { return _M_data(); } + + allocator_type + get_allocator() const { return _M_dataplus; } + + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; + + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } + + size_type + find(const _CharT* __s, size_type __pos = 0) const + { return this->find(__s, __pos, traits_type::length(__s)); } + + size_type + find(_CharT __c, size_type __pos = 0) const; + + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } + + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; + + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { return this->rfind(__s, __pos, traits_type::length(__s)); } + + size_type + rfind(_CharT __c, size_type __pos = npos) const; + + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } + + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { return this->find_first_of(__s, __pos, traits_type::length(__s)); } + + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } + + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } + + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { return this->find_last_of(__s, __pos, traits_type::length(__s)); } + + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } + + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } + + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } + + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; + + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } + + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } + + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; + + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { + if (__pos > this->size()) + __throw_out_of_range("basic_string::substr"); + return basic_string(*this, __pos, __n); + } + + int + compare(const basic_string& __str) const + { + size_type __size = this->size(); + size_type __osize = __str.size(); + size_type __len = min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = __size - __osize; + return __r; + } + + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; + + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; + + int + compare(const _CharT* __s) const; + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 5. String::compare specification questionable + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; + + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; +#endif + }; + + + template + inline basic_string<_CharT, _Traits, _Alloc>:: + basic_string() + : _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { } + + // operator+ + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + + // operator == + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } + + // operator != + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) != 0; } + + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) != 0; } + + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) != 0; } + + // operator < + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } + + // operator > + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } + + // operator <= + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } + + // operator >= + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } + + + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str); + + template + basic_istream<_CharT,_Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); + + template + inline basic_istream<_CharT,_Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); +} // namespace std + +#endif /* _CPP_BITS_STRING_H */ diff --git a/contrib/media/updf/include/bits/basic_string.tcc b/contrib/media/updf/include/bits/basic_string.tcc new file mode 100644 index 0000000000..9a05d2c8ac --- /dev/null +++ b/contrib/media/updf/include/bits/basic_string.tcc @@ -0,0 +1,862 @@ +// Components for manipulating sequences of characters -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 Strings library +// + +// This file is included by . It is not meant to be included +// separately. + +// Written by Jason Merrill based upon the specification by Takanori Adachi +// in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers to ISO-14882. + +#ifndef _CPP_BITS_STRING_TCC +#define _CPP_BITS_STRING_TCC 1 + +namespace std +{ + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4; + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string) + // at static init time (before static ctors are run). + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_S_empty_rep_storage[ + (sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)]; + + // NB: This is the special case for Input Iterators, used in + // istreambuf_iterators, etc. + // Input Iterators have a cost structure very different from + // pointers, calling for a different coding style. + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, + input_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); + // Avoid reallocation for common case. + _CharT __buf[100]; + size_type __i = 0; + while (__beg != __end && __i < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__i++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__i, __a); + traits_type::copy(__r->_M_refdata(), __buf, __i); + __r->_M_length = __i; + try + { + // NB: this loop looks precisely this way because + // it avoids comparing __beg != __end any more + // than strictly necessary; != might be expensive! + for (;;) + { + _CharT* __p = __r->_M_refdata() + __r->_M_length; + _CharT* __last = __r->_M_refdata() + __r->_M_capacity; + for (;;) + { + if (__beg == __end) + { + __r->_M_length = __p - __r->_M_refdata(); + *__p = _Rep::_S_terminal; // grrr. + return __r->_M_refdata(); + } + if (__p == __last) + break; + *__p++ = *__beg; + ++__beg; + } + // Allocate more space. + size_type __len = __p - __r->_M_refdata(); + _Rep* __another = _Rep::_S_create(__len + 1, __a); + traits_type::copy(__another->_M_refdata(), + __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + __r->_M_length = __len; + } + } + catch(...) + { + __r->_M_destroy(__a); + __throw_exception_again; + } + return 0; + } + + template + template + _CharT* + basic_string<_CharT,_Traits,_Alloc>:: + _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, + forward_iterator_tag) + { + size_type __dnew = static_cast(distance(__beg, __end)); + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); + + // Check for out_of_range and length_error exceptions. + _Rep* __r = _Rep::_S_create(__dnew, __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + __throw_exception_again; + } + __r->_M_length = __dnew; + + __r->_M_refdata()[__dnew] = _Rep::_S_terminal; // grrr. + return __r->_M_refdata(); + } + + template + _CharT* + basic_string<_CharT,_Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); + + // Check for out_of_range and length_error exceptions. + _Rep* __r = _Rep::_S_create(__n, __a); + try + { + if (__n) + traits_type::assign(__r->_M_refdata(), __n, __c); + } + catch(...) + { + __r->_M_destroy(__a); + __throw_exception_again; + } + __r->_M_length = __n; + __r->_M_refdata()[__n] = _Rep::_S_terminal; // grrr + return __r->_M_refdata(); + } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()), + __str.get_allocator()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_check(__pos), + __str._M_fold(__pos, __n), _Alloc()), _Alloc()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_check(__pos), + __str._M_fold(__pos, __n), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + traits_type::length(__s), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIter __beg, _InputIter __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>::assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + // XXX MT + allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + size_type __size = sizeof(_Rep) + (_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::_M_leak_hard() + { + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const _CharT* __src = _M_data() + __pos + __len1; + const size_type __how_much = __old_size - __pos - __len1; + + if (_M_rep()->_M_is_shared() || __new_size > capacity()) + { + // Must reallocate. + allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, __a); + try + { + if (__pos) + traits_type::copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + traits_type::copy(__r->_M_refdata() + __pos + __len2, + __src, __how_much); + } + catch(...) + { + __r->_M_dispose(get_allocator()); + __throw_exception_again; + } + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + // Work in-place + traits_type::move(_M_data() + __pos + __len2, __src, __how_much); + } + _M_rep()->_M_set_sharable(); + _M_rep()->_M_length = __new_size; + _M_data()[__new_size] = _Rep::_S_terminal; // grrr. (per 21.3.4) + // You cannot leave those LWG people alone for a second. + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::reserve(size_type __res) + { + if (__res > this->capacity() || _M_rep()->_M_is_shared()) + { + if (__res > this->max_size()) + __throw_length_error("basic_string::reserve"); + allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + + template + void basic_string<_CharT, _Traits, _Alloc>::swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + // The code below can usually be optimized away. + else + { + basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); + basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + +#ifdef _GLIBCPP_ALLOC_CONTROL + template + bool (*basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_excess_slop) + (size_t, size_t) = + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_default_excess; +#endif + + template + basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_t __capacity, const _Alloc& __alloc) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // 83. String::npos vs. string::max_size() + if (__capacity > _S_max_size) +#else + if (__capacity == npos) +#endif + __throw_length_error("basic_string::_S_create"); + + // NB: Need an array of char_type[__capacity], plus a + // terminating null char_type() element, plus enough for the + // _Rep data structure. Whew. Seemingly so needy, yet so elemental. + size_t __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + // NB: Might throw, but no worries about a leak, mate: _Rep() + // does not throw. + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + __p->_M_set_sharable(); // one reference + __p->_M_length = 0; + return __p; + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + _Rep* __r = _Rep::_S_create(_M_length + __res, __alloc); + if (_M_length) + { + try + { traits_type::copy(__r->_M_refdata(), _M_refdata(), _M_length); } + catch(...) + { + __r->_M_destroy(__alloc); + __throw_exception_again; + } + } + __r->_M_length = _M_length; + return __r->_M_refdata(); + } + + template + inline bool +#ifdef _GLIBCPP_ALLOC_CONTROL + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_default_excess(size_t __s, size_t __r) +#else + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_excess_slop(size_t __s, size_t __r) +#endif + { + return 2 * (__s <= 16 ? 16 : __s) < __r; + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::resize(size_type __n, _CharT __c) + { + if (__n > max_size()) + __throw_length_error("basic_string::resize"); + size_type __size = this->size(); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + // else nothing (in particular, avoid calling _M_mutate() unnecessarily.) + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace(iterator __i1, iterator __i2, _InputIter __k1, + _InputIter __k2, input_iterator_tag) + { + basic_string __s(__k1, __k2); + return this->replace(__i1, __i2, __s._M_ibegin(), __s._M_iend()); + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace(iterator __i1, iterator __i2, _ForwardIter __k1, + _ForwardIter __k2, forward_iterator_tag) + { + size_type __dold = __i2 - __i1; + size_type __dmax = this->max_size(); + size_type __dnew = static_cast(distance(__k1, __k2)); + + if (__dmax <= __dnew) + __throw_length_error("basic_string::_M_replace"); + size_type __off = __i1 - _M_ibegin(); + _M_mutate(__off, __dold, __dnew); + // Invalidated __i1, __i2 + if (__dnew) + _S_copy_chars(_M_data() + __off, __k1, __k2); + + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { + return this->replace(_M_check(__pos1), _M_fold(__pos1, __n1), + __str._M_check(__pos2), + __str._M_fold(__pos2, __n2)); + } + + template + basic_string<_CharT,_Traits,_Alloc>& + basic_string<_CharT,_Traits,_Alloc>:: + append(const basic_string& __str) + { + // Iff appending itself, string needs to pre-reserve the + // correct size so that _M_mutate does not clobber the + // iterators formed here. + size_type __size = __str.size(); + size_type __len = __size + this->size(); + if (__len > this->capacity()) + this->reserve(__len); + return this->replace(_M_iend(), _M_iend(), __str._M_ibegin(), + __str._M_iend()); + } + + template + basic_string<_CharT,_Traits,_Alloc>& + basic_string<_CharT,_Traits,_Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + // Iff appending itself, string needs to pre-reserve the + // correct size so that _M_mutate does not clobber the + // iterators formed here. + size_type __len = min(__str.size() - __pos, __n) + this->size(); + if (__len > this->capacity()) + this->reserve(__len); + return this->replace(_M_iend(), _M_iend(), __str._M_check(__pos), + __str._M_fold(__pos, __n)); + } + + template + basic_string<_CharT,_Traits,_Alloc>& + basic_string<_CharT,_Traits,_Alloc>:: + append(const _CharT* __s, size_type __n) + { + size_type __len = __n + this->size(); + if (__len > this->capacity()) + this->reserve(__len); + return this->replace(_M_iend(), _M_iend(), __s, __s + __n); + } + + template + basic_string<_CharT,_Traits,_Alloc>& + basic_string<_CharT,_Traits,_Alloc>:: + append(size_type __n, _CharT __c) + { + size_type __len = __n + this->size(); + if (__len > this->capacity()) + this->reserve(__len); + return this->replace(_M_iend(), _M_iend(), __n, __c); + } + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs) + { + typedef basic_string<_CharT,_Traits,_Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __lhs + __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) + { + typedef basic_string<_CharT,_Traits,_Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(iterator __i1, iterator __i2, size_type __n2, _CharT __c) + { + size_type __n1 = __i2 - __i1; + size_type __off1 = __i1 - _M_ibegin(); + if (max_size() - (this->size() - __n1) <= __n2) + __throw_length_error("basic_string::replace"); + _M_mutate (__off1, __n1, __n2); + // Invalidated __i1, __i2 + if (__n2) + traits_type::assign(_M_data() + __off1, __n2, __c); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + if (__pos > this->size()) + __throw_out_of_range("basic_string::copy"); + + if (__n > this->size() - __pos) + __n = this->size() - __pos; + + traits_type::copy(__s, _M_data() + __pos, __n); + // 21.3.5.7 par 3: do not append null. (good.) + return __n; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + size_type __size = this->size(); + size_t __xpos = __pos; + const _CharT* __data = _M_data(); + for (; __xpos + __n <= __size; ++__xpos) + if (traits_type::compare(__data + __xpos, __s, __n) == 0) + return __xpos; + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + size_type __ret = npos; + if (__pos < __size) + { + const _CharT* __data = _M_data(); + size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(__size - __n ,__pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + size_t __xpos = __size - 1; + if (__xpos > __pos) + __xpos = __pos; + + for (++__xpos; __xpos-- > 0; ) + if (traits_type::eq(_M_data()[__xpos], __c)) + return __xpos; + } + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + size_t __xpos = __pos; + for (; __n && __xpos < this->size(); ++__xpos) + if (!traits_type::find(__s, __n, _M_data()[__xpos])) + return __xpos; + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + size_t __xpos = __pos; + for (; __xpos < this->size(); ++__xpos) + if (!traits_type::eq(_M_data()[__xpos], __c)) + return __xpos; + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + size_type __size = this->size(); + size_type __osize = __str.size(); + if (__pos > __size) + __throw_out_of_range("basic_string::compare"); + + size_type __rsize= min(__size - __pos, __n); + size_type __len = min(__rsize, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = __rsize - __osize; + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + size_type __size = this->size(); + size_type __osize = __str.size(); + if (__pos1 > __size || __pos2 > __osize) + __throw_out_of_range("basic_string::compare"); + + size_type __rsize = min(__size - __pos1, __n1); + size_type __rosize = min(__osize - __pos2, __n2); + size_type __len = min(__rsize, __rosize); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = __rsize - __rosize; + return __r; + } + + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + size_type __size = this->size(); + int __r = traits_type::compare(_M_data(), __s, __size); + if (!__r) + __r = __size - traits_type::length(__s); + return __r; + } + + + template + int + basic_string <_CharT,_Traits,_Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + size_type __size = this->size(); + if (__pos > __size) + __throw_out_of_range("basic_string::compare"); + + size_type __osize = traits_type::length(__s); + size_type __rsize = min(__size - __pos, __n1); + size_type __len = min(__rsize, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = __rsize - __osize; + return __r; + } + + template + int + basic_string <_CharT,_Traits,_Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + size_type __size = this->size(); + if (__pos > __size) + __throw_out_of_range("basic_string::compare"); + + size_type __osize = min(traits_type::length(__s), __n2); + size_type __rsize = min(__size - __pos, __n1); + size_type __len = min(__rsize, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = __rsize - __osize; + return __r; + } + + template + void + _S_string_copy(const basic_string<_CharT, _Traits, _Alloc>& __str, + _CharT* __buf, typename _Alloc::size_type __bufsiz) + { + typedef typename _Alloc::size_type size_type; + size_type __strsize = __str.size(); + size_type __bytes = min(__strsize, __bufsiz - 1); + _Traits::copy(__buf, __str.data(), __bytes); + __buf[__bytes] = _CharT(); + } +} // namespace std + +#endif diff --git a/contrib/media/updf/include/bits/boost_concept_check.h b/contrib/media/updf/include/bits/boost_concept_check.h new file mode 100644 index 0000000000..18d580b7ee --- /dev/null +++ b/contrib/media/updf/include/bits/boost_concept_check.h @@ -0,0 +1,895 @@ +// +// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, +// sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. +// + +// GCC Note: based on version 1.12.0 of the Boost library. +#ifndef _GLIBCPP_BOOST_CONCEPT_CHECK +#define _GLIBCPP_BOOST_CONCEPT_CHECK 1 + +#pragma GCC system_header +#include // for traits and tags +#include // for pair<> + + +namespace __gnu_cxx +{ + +#define _IsUnused __attribute__ ((__unused__)) + +template +void __function_requires() +{ + void (_Concept::*__x)() _IsUnused = &_Concept::__constraints; +} + + +// ??? Should the "concept_checking*" structs begin with more than _ ? +#define _GLIBCPP_CLASS_REQUIRES(_type_var, _ns, _concept) \ + typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \ + template <_func##_type_var##_concept _Tp1> \ + struct _concept_checking##_type_var##_concept { }; \ + typedef _concept_checking##_type_var##_concept< \ + &_ns::_concept <_type_var>::__constraints> \ + _concept_checking_typedef##_type_var##_concept + +#define _GLIBCPP_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \ + typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \ + template <_func##_type_var1##_type_var2##_concept _Tp1> \ + struct _concept_checking##_type_var1##_type_var2##_concept { }; \ + typedef _concept_checking##_type_var1##_type_var2##_concept< \ + &_ns::_concept <_type_var1,_type_var2>::__constraints> \ + _concept_checking_typedef##_type_var1##_type_var2##_concept + +#define _GLIBCPP_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \ + typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \ + template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \ + struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \ + typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \ + &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \ + _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept + +#define _GLIBCPP_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \ + typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \ + template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \ + struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \ + typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \ + &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \ + _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept + + +template +struct _Aux_require_same { }; + +template +struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; + + template + struct _SameTypeConcept + { + void __constraints() { + typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required; + } + }; + + template + struct _IntegerConcept { + void __constraints() { + __error_type_must_be_an_integer_type(); + } + }; + template <> struct _IntegerConcept { void __constraints() {} }; + template <> struct _IntegerConcept { void __constraints(){} }; + template <> struct _IntegerConcept { void __constraints() {} }; + template <> struct _IntegerConcept { void __constraints() {} }; + template <> struct _IntegerConcept { void __constraints() {} }; + template <> struct _IntegerConcept { void __constraints() {} }; +#ifdef _GLIBCPP_USE_LONG_LONG + template <> struct _IntegerConcept { void __constraints() {} }; + template <> struct _IntegerConcept + { void __constraints() {} }; +#endif + + template + struct _SignedIntegerConcept { + void __constraints() { + __error_type_must_be_a_signed_integer_type(); + } + }; + template <> struct _SignedIntegerConcept { void __constraints() {} }; + template <> struct _SignedIntegerConcept { void __constraints() {} }; + template <> struct _SignedIntegerConcept { void __constraints() {} }; +#ifdef _GLIBCPP_USE_LONG_LONG + template <> struct _SignedIntegerConcept { void __constraints(){}}; +#endif + + template + struct _UnsignedIntegerConcept { + void __constraints() { + __error_type_must_be_an_unsigned_integer_type(); + } + }; + template <> struct _UnsignedIntegerConcept + { void __constraints() {} }; + template <> struct _UnsignedIntegerConcept + { void __constraints() {} }; + template <> struct _UnsignedIntegerConcept + { void __constraints() {} }; +#ifdef _GLIBCPP_USE_LONG_LONG + template <> struct _UnsignedIntegerConcept + { void __constraints() {} }; +#endif + + //=========================================================================== + // Basic Concepts + + template + struct _DefaultConstructibleConcept + { + void __constraints() { + _Tp __a _IsUnused; // require default constructor + } + }; + + template + struct _AssignableConcept + { + void __constraints() { + __a = __a; // require assignment operator + __const_constraints(__a); + } + void __const_constraints(const _Tp& __b) { + __a = __b; // const required for argument to assignment + } + _Tp __a; + }; + + template + struct _CopyConstructibleConcept + { + void __constraints() { + _Tp __a(__b); // require copy constructor + _Tp* __ptr _IsUnused = &__a; // require address of operator + __const_constraints(__a); + } + void __const_constraints(const _Tp& __a) { + _Tp __c(__a) _IsUnused; // require const copy constructor + const _Tp* __ptr _IsUnused = &__a; // require const address of operator + } + _Tp __b; + }; + + // The SGI STL version of Assignable requires copy constructor and operator= + template + struct _SGIAssignableConcept + { + void __constraints() { + _Tp __b(__a) _IsUnused; + __a = __a; // require assignment operator + __const_constraints(__a); + } + void __const_constraints(const _Tp& __b) { + _Tp __c(__b) _IsUnused; + __a = __b; // const required for argument to assignment + } + _Tp __a; + }; + + template + struct _ConvertibleConcept + { + void __constraints() { + _To __y _IsUnused = __x; + } + _From __x; + }; + + // The C++ standard requirements for many concepts talk about return + // types that must be "convertible to bool". The problem with this + // requirement is that it leaves the door open for evil proxies that + // define things like operator|| with strange return types. Two + // possible solutions are: + // 1) require the return type to be exactly bool + // 2) stay with convertible to bool, and also + // specify stuff about all the logical operators. + // For now we just test for convertible to bool. + template + void __aux_require_boolean_expr(const _Tp& __t) { + bool __x _IsUnused = __t; + } + +// FIXME + template + struct _EqualityComparableConcept + { + void __constraints() { + __aux_require_boolean_expr(__a == __b); + __aux_require_boolean_expr(__a != __b); + } + _Tp __a, __b; + }; + + template + struct _LessThanComparableConcept + { + void __constraints() { + __aux_require_boolean_expr(__a < __b); + } + _Tp __a, __b; + }; + + // This is equivalent to SGI STL's LessThanComparable. + template + struct _ComparableConcept + { + void __constraints() { + __aux_require_boolean_expr(__a < __b); + __aux_require_boolean_expr(__a > __b); + __aux_require_boolean_expr(__a <= __b); + __aux_require_boolean_expr(__a >= __b); + } + _Tp __a, __b; + }; + +#define _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \ + template \ + struct _NAME { \ + void __constraints() { (void)__constraints_(); } \ + bool __constraints_() { \ + return __a _OP __b; \ + } \ + _First __a; \ + _Second __b; \ + } + +#define _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \ + template \ + struct _NAME { \ + void __constraints() { (void)__constraints_(); } \ + _Ret __constraints_() { \ + return __a _OP __b; \ + } \ + _First __a; \ + _Second __b; \ + } + + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept); + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept); + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept); + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept); + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept); + _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept); + + _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept); + _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept); + _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept); + _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept); + _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept); + +#undef _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT +#undef _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT + + //=========================================================================== + // Function Object Concepts + + template + struct _GeneratorConcept + { + void __constraints() { + const _Return& __r _IsUnused = __f();// require operator() member function + } + _Func __f; + }; + + + template + struct _GeneratorConcept<_Func,void> + { + void __constraints() { + __f(); // require operator() member function + } + _Func __f; + }; + + template + struct _UnaryFunctionConcept + { + void __constraints() { + __r = __f(__arg); // require operator() + } + _Func __f; + _Arg __arg; + _Return __r; + }; + + template + struct _UnaryFunctionConcept<_Func, void, _Arg> { + void __constraints() { + __f(__arg); // require operator() + } + _Func __f; + _Arg __arg; + }; + + template + struct _BinaryFunctionConcept + { + void __constraints() { + __r = __f(__first, __second); // require operator() + } + _Func __f; + _First __first; + _Second __second; + _Return __r; + }; + + template + struct _BinaryFunctionConcept<_Func, void, _First, _Second> + { + void __constraints() { + __f(__first, __second); // require operator() + } + _Func __f; + _First __first; + _Second __second; + }; + + template + struct _UnaryPredicateConcept + { + void __constraints() { + __aux_require_boolean_expr(__f(__arg)); // require op() returning bool + } + _Func __f; + _Arg __arg; + }; + + template + struct _BinaryPredicateConcept + { + void __constraints() { + __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool + } + _Func __f; + _First __a; + _Second __b; + }; + + // use this when functor is used inside a container class like std::set + template + struct _Const_BinaryPredicateConcept { + void __constraints() { + __const_constraints(__f); + } + void __const_constraints(const _Func& __fun) { + __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >(); + // operator() must be a const member function + __aux_require_boolean_expr(__fun(__a, __b)); + } + _Func __f; + _First __a; + _Second __b; + }; + + //=========================================================================== + // Iterator Concepts + + template + struct _TrivialIteratorConcept + { + void __constraints() { + __function_requires< _DefaultConstructibleConcept<_Tp> >(); + __function_requires< _AssignableConcept<_Tp> >(); + __function_requires< _EqualityComparableConcept<_Tp> >(); + typedef typename std::iterator_traits<_Tp>::value_type _V; + (void)*__i; // require dereference operator + } + _Tp __i; + }; + + template + struct _Mutable_TrivialIteratorConcept + { + void __constraints() { + __function_requires< _TrivialIteratorConcept<_Tp> >(); + *__i = *__j; // require dereference and assignment + } + _Tp __i, __j; + }; + + template + struct _InputIteratorConcept + { + void __constraints() { + __function_requires< _TrivialIteratorConcept<_Tp> >(); + // require iterator_traits typedef's + typedef typename std::iterator_traits<_Tp>::difference_type _D; + __function_requires< _SignedIntegerConcept<_D> >(); + typedef typename std::iterator_traits<_Tp>::reference _R; + typedef typename std::iterator_traits<_Tp>::pointer _Pt; + typedef typename std::iterator_traits<_Tp>::iterator_category _Cat; + __function_requires< _ConvertibleConcept< + typename std::iterator_traits<_Tp>::iterator_category, + std::input_iterator_tag> >(); + ++__i; // require preincrement operator + __i++; // require postincrement operator + } + _Tp __i; + }; + + template + struct _OutputIteratorConcept + { + void __constraints() { + __function_requires< _AssignableConcept<_Tp> >(); + ++__i; // require preincrement operator + __i++; // require postincrement operator + *__i++ = __t; // require postincrement and assignment + } + _Tp __i; + _ValueT __t; + }; + + template + struct _ForwardIteratorConcept + { + void __constraints() { + __function_requires< _InputIteratorConcept<_Tp> >(); + __function_requires< _ConvertibleConcept< + typename std::iterator_traits<_Tp>::iterator_category, + std::forward_iterator_tag> >(); + typedef typename std::iterator_traits<_Tp>::reference _R; + _R __r _IsUnused = *__i; + } + _Tp __i; + }; + + template + struct _Mutable_ForwardIteratorConcept + { + void __constraints() { + __function_requires< _ForwardIteratorConcept<_Tp> >(); + *__i++ = *__i; // require postincrement and assignment + } + _Tp __i; + }; + + template + struct _BidirectionalIteratorConcept + { + void __constraints() { + __function_requires< _ForwardIteratorConcept<_Tp> >(); + __function_requires< _ConvertibleConcept< + typename std::iterator_traits<_Tp>::iterator_category, + std::bidirectional_iterator_tag> >(); + --__i; // require predecrement operator + __i--; // require postdecrement operator + } + _Tp __i; + }; + + template + struct _Mutable_BidirectionalIteratorConcept + { + void __constraints() { + __function_requires< _BidirectionalIteratorConcept<_Tp> >(); + __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >(); + *__i-- = *__i; // require postdecrement and assignment + } + _Tp __i; + }; + + + template + struct _RandomAccessIteratorConcept + { + void __constraints() { + __function_requires< _BidirectionalIteratorConcept<_Tp> >(); + __function_requires< _ComparableConcept<_Tp> >(); + __function_requires< _ConvertibleConcept< + typename std::iterator_traits<_Tp>::iterator_category, + std::random_access_iterator_tag> >(); + // ??? We don't use _R, are we just checking for "referenceability"? + typedef typename std::iterator_traits<_Tp>::reference _R; + + __i += __n; // require assignment addition operator + __i = __i + __n; __i = __n + __i; // require addition with difference type + __i -= __n; // require assignment subtraction op + __i = __i - __n; // require subtraction with + // difference type + __n = __i - __j; // require difference operator + (void)__i[__n]; // require element access operator + } + _Tp __a, __b; + _Tp __i, __j; + typename std::iterator_traits<_Tp>::difference_type __n; + }; + + template + struct _Mutable_RandomAccessIteratorConcept + { + void __constraints() { + __function_requires< _RandomAccessIteratorConcept<_Tp> >(); + __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >(); + __i[__n] = *__i; // require element access and assignment + } + _Tp __i; + typename std::iterator_traits<_Tp>::difference_type __n; + }; + + //=========================================================================== + // Container Concepts + + template + struct _ContainerConcept + { + typedef typename _Container::value_type _Value_type; + typedef typename _Container::difference_type _Difference_type; + typedef typename _Container::size_type _Size_type; + typedef typename _Container::const_reference _Const_reference; + typedef typename _Container::const_pointer _Const_pointer; + typedef typename _Container::const_iterator _Const_iterator; + + void __constraints() { + __function_requires< _InputIteratorConcept<_Const_iterator> >(); + __function_requires< _AssignableConcept<_Container> >(); + const _Container __c; + __i = __c.begin(); + __i = __c.end(); + __n = __c.size(); + __n = __c.max_size(); + __b = __c.empty(); + } + bool __b; + _Const_iterator __i; + _Size_type __n; + }; + + template + struct _Mutable_ContainerConcept + { + typedef typename _Container::value_type _Value_type; + typedef typename _Container::reference _Reference; + typedef typename _Container::iterator _Iterator; + typedef typename _Container::pointer _Pointer; + + void __constraints() { + __function_requires< _ContainerConcept<_Container> >(); + __function_requires< _AssignableConcept<_Value_type> >(); + __function_requires< _InputIteratorConcept<_Iterator> >(); + + __i = __c.begin(); + __i = __c.end(); + __c.swap(__c2); + } + _Iterator __i; + _Container __c, __c2; + }; + + template + struct _ForwardContainerConcept + { + void __constraints() { + __function_requires< _ContainerConcept<_ForwardContainer> >(); + typedef typename _ForwardContainer::const_iterator _Const_iterator; + __function_requires< _ForwardIteratorConcept<_Const_iterator> >(); + } + }; + + template + struct _Mutable_ForwardContainerConcept + { + void __constraints() { + __function_requires< _ForwardContainerConcept<_ForwardContainer> >(); + __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >(); + typedef typename _ForwardContainer::iterator _Iterator; + __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >(); + } + }; + + template + struct _ReversibleContainerConcept + { + typedef typename _ReversibleContainer::const_iterator _Const_iterator; + typedef typename _ReversibleContainer::const_reverse_iterator + _Const_reverse_iterator; + + void __constraints() { + __function_requires< _ForwardContainerConcept<_ReversibleContainer> >(); + __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >(); + __function_requires< + _BidirectionalIteratorConcept<_Const_reverse_iterator> >(); + + const _ReversibleContainer __c; + _Const_reverse_iterator __i = __c.rbegin(); + __i = __c.rend(); + } + }; + + template + struct _Mutable_ReversibleContainerConcept + { + typedef typename _ReversibleContainer::iterator _Iterator; + typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator; + + void __constraints() { + __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >(); + __function_requires< + _Mutable_ForwardContainerConcept<_ReversibleContainer> >(); + __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >(); + __function_requires< + _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >(); + + _Reverse_iterator __i = __c.rbegin(); + __i = __c.rend(); + } + _ReversibleContainer __c; + }; + + template + struct _RandomAccessContainerConcept + { + typedef typename _RandomAccessContainer::size_type _Size_type; + typedef typename _RandomAccessContainer::const_reference _Const_reference; + typedef typename _RandomAccessContainer::const_iterator _Const_iterator; + typedef typename _RandomAccessContainer::const_reverse_iterator + _Const_reverse_iterator; + + void __constraints() { + __function_requires< + _ReversibleContainerConcept<_RandomAccessContainer> >(); + __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >(); + __function_requires< + _RandomAccessIteratorConcept<_Const_reverse_iterator> >(); + + const _RandomAccessContainer __c; + _Const_reference __r _IsUnused = __c[__n]; + } + _Size_type __n; + }; + + template + struct _Mutable_RandomAccessContainerConcept + { + typedef typename _RandomAccessContainer::size_type _Size_type; + typedef typename _RandomAccessContainer::reference _Reference; + typedef typename _RandomAccessContainer::iterator _Iterator; + typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator; + + void __constraints() { + __function_requires< + _RandomAccessContainerConcept<_RandomAccessContainer> >(); + __function_requires< + _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >(); + __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >(); + __function_requires< + _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >(); + + _Reference __r _IsUnused = __c[__i]; + } + _Size_type __i; + _RandomAccessContainer __c; + }; + + // A Sequence is inherently mutable + template + struct _SequenceConcept + { + typedef typename _Sequence::reference _Reference; + typedef typename _Sequence::const_reference _Const_reference; + + void __constraints() { + // Matt Austern's book puts DefaultConstructible here, the C++ + // standard places it in Container + // function_requires< DefaultConstructible >(); + __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >(); + __function_requires< _DefaultConstructibleConcept<_Sequence> >(); + + _Sequence + __c(__n) _IsUnused, + __c2(__n, __t) _IsUnused, + __c3(__first, __last) _IsUnused; + + __c.insert(__p, __t); + __c.insert(__p, __n, __t); + __c.insert(__p, __first, __last); + + __c.erase(__p); + __c.erase(__p, __q); + + _Reference __r _IsUnused = __c.front(); + + __const_constraints(__c); + } + void __const_constraints(const _Sequence& __c) { + _Const_reference __r _IsUnused = __c.front(); + } + typename _Sequence::value_type __t; + typename _Sequence::size_type __n; + typename _Sequence::value_type *__first, *__last; + typename _Sequence::iterator __p, __q; + }; + + template + struct _FrontInsertionSequenceConcept + { + void __constraints() { + __function_requires< _SequenceConcept<_FrontInsertionSequence> >(); + + __c.push_front(__t); + __c.pop_front(); + } + _FrontInsertionSequence __c; + typename _FrontInsertionSequence::value_type __t; + }; + + template + struct _BackInsertionSequenceConcept + { + typedef typename _BackInsertionSequence::reference _Reference; + typedef typename _BackInsertionSequence::const_reference _Const_reference; + + void __constraints() { + __function_requires< _SequenceConcept<_BackInsertionSequence> >(); + + __c.push_back(__t); + __c.pop_back(); + _Reference __r _IsUnused = __c.back(); + } + void __const_constraints(const _BackInsertionSequence& __c) { + _Const_reference __r _IsUnused = __c.back(); + }; + _BackInsertionSequence __c; + typename _BackInsertionSequence::value_type __t; + }; + + template + struct _AssociativeContainerConcept + { + void __constraints() { + __function_requires< _ForwardContainerConcept<_AssociativeContainer> >(); + __function_requires< + _DefaultConstructibleConcept<_AssociativeContainer> >(); + + __i = __c.find(__k); + __r = __c.equal_range(__k); + __c.erase(__k); + __c.erase(__i); + __c.erase(__r.first, __r.second); + __const_constraints(__c); + } + void __const_constraints(const _AssociativeContainer& __c) { + __ci = __c.find(__k); + __n = __c.count(__k); + __cr = __c.equal_range(__k); + } + typedef typename _AssociativeContainer::iterator _Iterator; + typedef typename _AssociativeContainer::const_iterator _Const_iterator; + + _AssociativeContainer __c; + _Iterator __i; + std::pair<_Iterator,_Iterator> __r; + _Const_iterator __ci; + std::pair<_Const_iterator,_Const_iterator> __cr; + typename _AssociativeContainer::key_type __k; + typename _AssociativeContainer::size_type __n; + }; + + template + struct _UniqueAssociativeContainerConcept + { + void __constraints() { + __function_requires< + _AssociativeContainerConcept<_UniqueAssociativeContainer> >(); + + _UniqueAssociativeContainer __c(__first, __last); + + __pos_flag = __c.insert(__t); + __c.insert(__first, __last); + } + std::pair __pos_flag; + typename _UniqueAssociativeContainer::value_type __t; + typename _UniqueAssociativeContainer::value_type *__first, *__last; + }; + + template + struct _MultipleAssociativeContainerConcept + { + void __constraints() { + __function_requires< + _AssociativeContainerConcept<_MultipleAssociativeContainer> >(); + + _MultipleAssociativeContainer __c(__first, __last); + + __pos = __c.insert(__t); + __c.insert(__first, __last); + + } + typename _MultipleAssociativeContainer::iterator __pos _IsUnused; + typename _MultipleAssociativeContainer::value_type __t; + typename _MultipleAssociativeContainer::value_type *__first, *__last; + }; + + template + struct _SimpleAssociativeContainerConcept + { + void __constraints() { + __function_requires< + _AssociativeContainerConcept<_SimpleAssociativeContainer> >(); + typedef typename _SimpleAssociativeContainer::key_type _Key_type; + typedef typename _SimpleAssociativeContainer::value_type _Value_type; + typedef typename _Aux_require_same<_Key_type, _Value_type>::_Type + _Requqired; + } + }; + + template + struct _PairAssociativeContainerConcept + { + void __constraints() { + __function_requires< + _AssociativeContainerConcept<_SimpleAssociativeContainer> >(); + typedef typename _SimpleAssociativeContainer::key_type _Key_type; + typedef typename _SimpleAssociativeContainer::value_type _Value_type; + typedef typename _SimpleAssociativeContainer::mapped_type _Mapped_type; + typedef std::pair _Required_value_type; + typedef typename _Aux_require_same<_Value_type, + _Required_value_type>::_Type _Required; + } + }; + + template + struct _SortedAssociativeContainerConcept + { + void __constraints() { + __function_requires< + _AssociativeContainerConcept<_SortedAssociativeContainer> >(); + __function_requires< + _ReversibleContainerConcept<_SortedAssociativeContainer> >(); + + _SortedAssociativeContainer + __c(__kc) _IsUnused, + __c2(__first, __last) _IsUnused, + __c3(__first, __last, __kc) _IsUnused; + + __p = __c.upper_bound(__k); + __p = __c.lower_bound(__k); + __r = __c.equal_range(__k); + + __c.insert(__p, __t); + } + void __const_constraints(const _SortedAssociativeContainer& __c) { + __kc = __c.key_comp(); + __vc = __c.value_comp(); + + __cp = __c.upper_bound(__k); + __cp = __c.lower_bound(__k); + __cr = __c.equal_range(__k); + } + typename _SortedAssociativeContainer::key_compare __kc; + typename _SortedAssociativeContainer::value_compare __vc; + typename _SortedAssociativeContainer::value_type __t; + typename _SortedAssociativeContainer::key_type __k; + typedef typename _SortedAssociativeContainer::iterator _Iterator; + typedef typename _SortedAssociativeContainer::const_iterator + _Const_iterator; + + _Iterator __p; + _Const_iterator __cp; + std::pair<_Iterator,_Iterator> __r; + std::pair<_Const_iterator,_Const_iterator> __cr; + typename _SortedAssociativeContainer::value_type *__first, *__last; + }; + + // HashedAssociativeContainer + +} // namespace __gnu_cxx + +#undef _IsUnused + +#endif // _GLIBCPP_BOOST_CONCEPT_CHECK + + diff --git a/contrib/media/updf/include/bits/c++config b/contrib/media/updf/include/bits/c++config new file mode 100644 index 0000000000..8bd580d553 --- /dev/null +++ b/contrib/media/updf/include/bits/c++config @@ -0,0 +1,112 @@ +// Predefined symbols and macros -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CPPCONFIG +#define _CPP_CPPCONFIG 1 + +// Pick up any OS-specific definitions. +#include + +// The current version of the C++ library in compressed ISO date format. +#define __GLIBCPP__ 20010615 + +// This is necessary until GCC supports separate template +// compilation. +#define _GLIBCPP_NO_TEMPLATE_EXPORT 1 + +// This is a hack around not having either pre-compiled headers or +// export compilation. If defined, the io, string, and valarray +// headers will include all the necessary bits. If not defined, the +// implementation optimizes the headers for the most commonly-used +// types. For the io library, this means that larger, out-of-line +// member functions are only declared, and definitions are not parsed +// by the compiler, but instead instantiated into the library binary. +#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1 + +// Define this to permit user-level control of the expansion of string +// buffers (via a fn pointer), see basic_string.* for more. +//#define _GLIBCPP_ALLOC_CONTROL + +// To enable older, ARM-style iostreams and other anachronisms use this. +//#define _GLIBCPP_DEPRECATED 1 + +// Use corrected code from the committee library group's issues list. +#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1 + +// Enable concept checking code from the boost libraries. +//#define _GLIBCPP_CONCEPT_CHECKS 1 + +// Map gthr.h abstraction to that required for STL. Do not key off of +// __GTHREADS at this point since we haven't seen the correct symbol +// yet, instead setup so that include/bits/stl_threads.h will know to +// include gthr.h instead of any other type of thread support. Note: +// that gthr.h may well map to gthr-single.h which is a correct way to +// express no threads support in gcc. As a user, do not define +// _NOTHREADS without consideration of the consequences (e.g. it is an +// internal ABI change). +#define __STL_GTHREADS +#define __STL_THREADS +#define __STL_VOLATILE volatile + +// This is also a user hook, but via -f[no-]exceptions, not direct #defines. +#ifdef __EXCEPTIONS +# define __STL_USE_EXCEPTIONS +# define __STL_TRY try +# define __STL_CATCH_ALL catch(...) +# define __STL_THROW(x) throw x +# define __STL_RETHROW throw +# define __STL_NOTHROW throw() +# define __STL_UNWIND(action) catch(...) { action; throw; } +#else +# define __STL_TRY +# define __STL_CATCH_ALL if (false) +# define __STL_THROW(x) +# define __STL_RETHROW +# define __STL_NOTHROW +# define __STL_UNWIND(action) +#endif + +// Default to the typically high-speed, pool-based allocator (as +// libstdc++-v2) instead of the malloc-based allocator (libstdc++-v3 +// snapshots). See libstdc++-v3/docs/html/17_intro/howto.html for +// details on why you don't want to override this setting. Ensure +// that threads are properly configured on your platform before +// assigning blame to the STL container-memory allocator. After doing +// so, please report any possible issues to libstdc++@gcc.gnu.org . +// Do not blindly #define __USE_MALLOC here or on the command line. + +// The remainder of the prewritten config is mostly automatic; all the +// user hooks are listed above. + +// XXX +// Only used in the SGI rope extensions; this is from stl_config.h and +// should be cleaned up. +# define __stl_assert(expr) + +// End of prewritten config; the discovered settings follow. diff --git a/contrib/media/updf/include/bits/char_traits.h b/contrib/media/updf/include/bits/char_traits.h new file mode 100644 index 0000000000..eb3f9fec3a --- /dev/null +++ b/contrib/media/updf/include/bits/char_traits.h @@ -0,0 +1,275 @@ +// Character Traits for use by standard string and iostream -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 Strings library +// + +#ifndef _CPP_BITS_CHAR_TRAITS_H +#define _CPP_BITS_CHAR_TRAITS_H 1 + +#pragma GCC system_header + +#include // For memmove, memset, memchr +#include // For streampos + +namespace std +{ + // 21.1.2 Basis for explicit _Traits specialization + // NB: That for any given actual character type this definition is + // probably wrong. + template + struct char_traits + { + typedef _CharT char_type; + // Unsigned as wint_t in unsigned. + typedef unsigned long int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + for (size_t __i = 0; __i < __n; ++__i) + if (!eq(__s1[__i], __s2[__i])) + return lt(__s1[__i], __s2[__i]) ? -1 : 1; + return 0; + } + + static size_t + length(const char_type* __s) + { + const char_type* __p = __s; + while (*__p) ++__p; + return (__p - __s); + } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p) + if (*__p == __a) return __p; + return 0; + } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + for (char_type* __p = __s; __p < __s + __n; ++__p) + assign(*__p, __a); + return __s; + } + + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + + static int_type + to_int_type(const char_type& __c) { return int_type(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() { return static_cast(-1); } + + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? int_type(0) : __c; } + }; + + + // 21.1.4 char_traits specializations + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return memcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return strlen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(memchr(__s, __a, __n)); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(memmove(__s1, __s2, __n)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(memcpy(__s1, __s2, __n)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(memset(__s, __a, __n)); } + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + // To keep both the byte 0xff and the eof symbol 0xffffffff + // from ending up as 0xffffffff. + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() { return static_cast(EOF); } + + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + + +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return wcslen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + + static char_type* + move(char_type* __s1, const char_type* __s2, int_type __n) + { return wmemmove(__s1, __s2, __n); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + + static char_type + to_char_type(const int_type& __c) { return char_type(__c); } + + static int_type + to_int_type(const char_type& __c) { return int_type(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() { return static_cast(WEOF); } + + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; +#endif //_GLIBCPP_USE_WCHAR_T + + template + struct _Char_traits_match + { + _CharT _M_c; + _Char_traits_match(_CharT const& __c) : _M_c(__c) { } + + bool + operator()(_CharT const& __a) { return _Traits::eq(_M_c, __a); } + }; +} // namespace std + +#endif diff --git a/contrib/media/updf/include/bits/codecvt.h b/contrib/media/updf/include/bits/codecvt.h new file mode 100644 index 0000000000..badc7fbf12 --- /dev/null +++ b/contrib/media/updf/include/bits/codecvt.h @@ -0,0 +1,717 @@ +// Locale support (codecvt) -*- C++ -*- + +// Copyright (C) 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 22.2.1.5 Template class codecvt +// + +// Warning: this file is not meant for user inclusion. Use . + +// Written by Benjamin Kosnik + +#ifndef _CPP_BITS_CODECVT_H +#define _CPP_BITS_CODECVT_H 1 + +#pragma GCC system_header + + // XXX + // __enc_traits may need to move up the locale header hierarchy, + // depending on if ctype ends up using it. + +#ifdef _GLIBCPP_USE_WCHAR_T + // Extensions to use icov for dealing with character encodings, + // including conversions and comparisons between various character + // sets. This object encapsulates data that may need to be shared between + // char_traits, codecvt and ctype. + +#if _GLIBCPP_USE_SHADOW_HEADERS + using _C_legacy::CODESET; +#endif + + class __enc_traits + { + public: + // Types: + // NB: A conversion descriptor subsumes and enhances the + // functionality of a simple state type such as mbstate_t. + typedef iconv_t __desc_type; + + protected: + // Data Members: + // Max size of charset encoding name + static const int _S_max_size = 32; + // Name of internal character set encoding. + char _M_int_enc[_S_max_size]; + // Name of external character set encoding. + char _M_ext_enc[_S_max_size]; + + // Conversion descriptor between external encoding to internal encoding. + __desc_type _M_in_desc; + // Conversion descriptor between internal encoding to external encoding. + __desc_type _M_out_desc; + + // Details the byte-order marker for the external encoding, if necessary. + int _M_ext_bom; + + // Details the byte-order marker for the internal encoding, if necessary. + int _M_int_bom; + + public: + __enc_traits() + : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0) + { + // __intc_end = whatever we are using internally, which is + // UCS4 (linux) + // UCS2 == UNICODE (microsoft, java, aix, whatever...) + // XXX Currently don't know how to get this data from target system... + strcpy(_M_int_enc, "UCS4"); + + // __extc_end = external codeset in current locale + strcpy(_M_ext_enc, nl_langinfo(CODESET)); + } + + __enc_traits(const char* __int, const char* __ext, int __ibom = 0, + int __ebom = 0) + : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0) + { + strncpy(_M_int_enc, __int, _S_max_size); + strncpy(_M_ext_enc, __ext, _S_max_size); + } + + // 21.1.2 traits typedefs + // p4 + // typedef STATE_T state_type + // requires: state_type shall meet the requirements of + // CopyConstructible types (20.1.3) + __enc_traits(const __enc_traits& __obj) + { + strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size); + strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size); + _M_ext_bom = __obj._M_ext_bom; + _M_int_bom = __obj._M_int_bom; + } + + ~__enc_traits() + { + iconv_close(_M_in_desc); + iconv_close(_M_out_desc); + } + + // Initializes + void + _M_init() + { + _M_in_desc = iconv_open(_M_int_enc, _M_ext_enc); + _M_out_desc = iconv_open(_M_ext_enc, _M_int_enc); + if (_M_out_desc == iconv_t(-1) || _M_in_desc == iconv_t(-1)) + { + // XXX Extended error checking. + } + } + + bool + _M_good() + { + return _M_out_desc && _M_in_desc + && _M_out_desc != iconv_t(-1) && _M_in_desc != iconv_t(-1); + } + + const __desc_type* + _M_get_in_descriptor() + { return &_M_in_desc; } + + const __desc_type* + _M_get_out_descriptor() + { return &_M_out_desc; } + + const char* + _M_get_internal_enc() + { return _M_int_enc; } + + const char* + _M_get_external_enc() + { return _M_ext_enc; } + + int + _M_get_external_bom() + { return _M_ext_bom; } + + int + _M_get_internal_bom() + { return _M_int_bom; } + }; +#endif //_GLIBCPP_USE_WCHAR_T + + + // 22.2.1.5 Template class codecvt + class codecvt_base + { + public: + enum result + { + ok, + partial, + error, + noconv + }; + }; + + // Template class __codecvt_abstract_base + // NB: An abstract base class that fills in the public inlines, so + // that the specializations don't have to re-copy the public + // interface. + template + class __codecvt_abstract_base + : public locale::facet, public codecvt_base + { + public: + // Types: + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + + // 22.2.1.5.1 codecvt members + result + out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + return this->do_out(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + + result + unshift(state_type& __state, extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { return this->do_unshift(__state, __to,__to_end,__to_next); } + + result + in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + return this->do_in(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + + int + encoding() const throw() + { return this->do_encoding(); } + + bool + always_noconv() const throw() + { return this->do_always_noconv(); } + + int + length(const state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return this->do_length(__state, __from, __end, __max); } + + int + max_length() const throw() + { return this->do_max_length(); } + + protected: + explicit + __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } + + virtual + ~__codecvt_abstract_base() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const = 0; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const = 0; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const = 0; + + virtual int + do_encoding() const throw() = 0; + + virtual bool + do_always_noconv() const throw() = 0; + + virtual int + do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const = 0; + + virtual int + do_max_length() const throw() = 0; + }; + + // 22.2.1.5 Template class codecvt + // NB: Generic, mostly useless implementation. + template + class codecvt + : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> + { + public: + // Types: + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + + // Data Members: + static locale::id id; + + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base<_InternT,_ExternT,_StateT> (__refs) { } + + protected: + virtual + ~codecvt() { } + }; + + template + locale::id codecvt<_InternT, _ExternT, _StateT>::id; + +#ifdef _GLIBCPP_USE_WCHAR_T + // partial specialization + // This specialization takes advantage of iconv to provide code + // conversions between a large number of character encodings. + template + class codecvt<_InternT, _ExternT, __enc_traits> + : public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits> + { + public: + // Types: + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef __enc_traits state_type; + typedef __enc_traits::__desc_type __desc_type; + typedef __enc_traits __enc_type; + + // Data Members: + static locale::id id; + + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base(__refs) + { } + + explicit + codecvt(__enc_type* __enc, size_t __refs = 0) + : __codecvt_abstract_base(__refs) + { } + + protected: + virtual + ~codecvt() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + template + locale::id + codecvt<_InternT, _ExternT, __enc_traits>::id; + + // This adaptor works around the signature problems of the second + // argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2 + // uses 'char**', which is what the standard is (apparently) due to use + // in the future. Using this adaptor, g++ will do the work for us. + template + inline size_t + __iconv_adaptor(size_t(*iconv_func)(iconv_t, _T, size_t*, char**, size_t*), + iconv_t cd, char** inbuf, size_t* inbytesleft, + char** outbuf, size_t* outbytesleft) + { + return iconv_func(cd, (_T)inbuf, inbytesleft, outbuf, outbytesleft); + } + + template + codecvt_base::result + codecvt<_InternT, _ExternT, __enc_traits>:: + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + result __ret = error; + if (__state._M_good()) + { + typedef state_type::__desc_type __desc_type; + const __desc_type* __desc = __state._M_get_out_descriptor(); + const size_t __fmultiple = sizeof(intern_type) / sizeof(char); + size_t __flen = __fmultiple * (__from_end - __from); + const size_t __tmultiple = sizeof(extern_type) / sizeof(char); + size_t __tlen = __tmultiple * (__to_end - __to); + + // Argument list for iconv specifies a byte sequence. Thus, + // all to/from arrays must be brutally casted to char*. + char* __cto = reinterpret_cast(__to); + char* __cfrom; + size_t __conv; + + // Some encodings need a byte order marker as the first item + // in the byte stream, to designate endian-ness. The default + // value for the byte order marker is NULL, so if this is + // the case, it's not necessary and we can just go on our + // merry way. + int __int_bom = __state._M_get_internal_bom(); + if (__int_bom) + { + size_t __size = __from_end - __from; + intern_type* __cfixed = static_cast(__builtin_alloca(sizeof(intern_type) * (__size + 1))); + __cfixed[0] = static_cast(__int_bom); + char_traits::copy(__cfixed + 1, __from, __size); + __cfrom = reinterpret_cast(__cfixed); + __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, + &__flen, &__cto, &__tlen); + } + else + { + intern_type* __cfixed = const_cast(__from); + __cfrom = reinterpret_cast(__cfixed); + __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, + &__flen, &__cto, &__tlen); + } + + if (__conv != size_t(-1)) + { + __from_next = reinterpret_cast(__cfrom); + __to_next = reinterpret_cast(__cto); + __ret = ok; + } + else + { + if (__flen < static_cast(__from_end - __from)) + { + __from_next = reinterpret_cast(__cfrom); + __to_next = reinterpret_cast(__cto); + __ret = partial; + } + else + __ret = error; + } + } + return __ret; + } + + template + codecvt_base::result + codecvt<_InternT, _ExternT, __enc_traits>:: + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const + { + result __ret = error; + if (__state._M_good()) + { + typedef state_type::__desc_type __desc_type; + const __desc_type* __desc = __state._M_get_in_descriptor(); + const size_t __tmultiple = sizeof(intern_type) / sizeof(char); + size_t __tlen = __tmultiple * (__to_end - __to); + + // Argument list for iconv specifies a byte sequence. Thus, + // all to/from arrays must be brutally casted to char*. + char* __cto = reinterpret_cast(__to); + size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL, + &__cto, &__tlen); + + if (__conv != size_t(-1)) + { + __to_next = reinterpret_cast(__cto); + if (__tlen == __tmultiple * (__to_end - __to)) + __ret = noconv; + else if (__tlen == 0) + __ret = ok; + else + __ret = partial; + } + else + __ret = error; + } + return __ret; + } + + template + codecvt_base::result + codecvt<_InternT, _ExternT, __enc_traits>:: + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + result __ret = error; + if (__state._M_good()) + { + typedef state_type::__desc_type __desc_type; + const __desc_type* __desc = __state._M_get_in_descriptor(); + const size_t __fmultiple = sizeof(extern_type) / sizeof(char); + size_t __flen = __fmultiple * (__from_end - __from); + const size_t __tmultiple = sizeof(intern_type) / sizeof(char); + size_t __tlen = __tmultiple * (__to_end - __to); + + // Argument list for iconv specifies a byte sequence. Thus, + // all to/from arrays must be brutally casted to char*. + char* __cto = reinterpret_cast(__to); + char* __cfrom; + size_t __conv; + + // Some encodings need a byte order marker as the first item + // in the byte stream, to designate endian-ness. The default + // value for the byte order marker is NULL, so if this is + // the case, it's not necessary and we can just go on our + // merry way. + int __ext_bom = __state._M_get_external_bom(); + if (__ext_bom) + { + size_t __size = __from_end - __from; + extern_type* __cfixed = static_cast(__builtin_alloca(sizeof(extern_type) * (__size + 1))); + __cfixed[0] = static_cast(__ext_bom); + char_traits::copy(__cfixed + 1, __from, __size); + __cfrom = reinterpret_cast(__cfixed); + __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, + &__flen, &__cto, &__tlen); + } + else + { + extern_type* __cfixed = const_cast(__from); + __cfrom = reinterpret_cast(__cfixed); + __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, + &__flen, &__cto, &__tlen); + } + + + if (__conv != size_t(-1)) + { + __from_next = reinterpret_cast(__cfrom); + __to_next = reinterpret_cast(__cto); + __ret = ok; + } + else + { + if (__flen < static_cast(__from_end - __from)) + { + __from_next = reinterpret_cast(__cfrom); + __to_next = reinterpret_cast(__cto); + __ret = partial; + } + else + __ret = error; + } + } + return __ret; + } + + template + int + codecvt<_InternT, _ExternT, __enc_traits>:: + do_encoding() const throw() + { return 0; } + + template + bool + codecvt<_InternT, _ExternT, __enc_traits>:: + do_always_noconv() const throw() + { return false; } + + template + int + codecvt<_InternT, _ExternT, __enc_traits>:: + do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return min(__max, static_cast(__end - __from)); } + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 74. Garbled text for codecvt::do_max_length + template + int + codecvt<_InternT, _ExternT, __enc_traits>:: + do_max_length() const throw() + { return 1; } +#endif +#endif /* _GLIBCPP_USE_WCHAR_T */ + + // codecvt required specialization + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + // Types: + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + // Data Members: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + +#ifdef _GLIBCPP_USE_WCHAR_T + // codecvt required specialization + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + // Types: + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + // Data Members: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, + const extern_type* __from, const extern_type* __from_end, + const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual + int do_encoding() const throw(); + + virtual + bool do_always_noconv() const throw(); + + virtual + int do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; +#endif //_GLIBCPP_USE_WCHAR_T + + // 22.2.1.6 Template class codecvt_byname + template + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> + { + public: + explicit + codecvt_byname(const char*, size_t __refs = 0) + : codecvt<_InternT, _ExternT, _StateT>(__refs) { } + protected: + virtual + ~codecvt_byname() { } + }; + +#endif // _CPP_BITS_CODECVT_H + +// Local Variables: +// mode:c++ +// End: + diff --git a/contrib/media/updf/include/bits/concept_check.h b/contrib/media/updf/include/bits/concept_check.h new file mode 100644 index 0000000000..2a02bd8c8b --- /dev/null +++ b/contrib/media/updf/include/bits/concept_check.h @@ -0,0 +1,81 @@ +// Concept-checking control -*- C++ -*- + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _GLIBCPP_CONCEPT_CHECK +#define _GLIBCPP_CONCEPT_CHECK 1 + +#pragma GCC system_header + +#include + +// All places in libstdc++-v3 where these are used, or /might/ be used, or +// don't need to be used, or perhaps /should/ be used, are commented with +// "concept requirements" (and maybe some more text). So grep like crazy +// if you're looking for additional places to use these. + +// Concept-checking code is off by default unless users turn it on via +// configure options or editing c++config.h. + +#ifndef _GLIBCPP_CONCEPT_CHECKS + +#define __glibcpp_function_requires(...) +#define __glibcpp_class_requires(_a,_b) +#define __glibcpp_class_requires2(_a,_b,_c) +#define __glibcpp_class_requires3(_a,_b,_c,_d) +#define __glibcpp_class_requires4(_a,_b,_c,_d,_e) + +#else // the checks are on + +#include + +// Note that the obvious and elegant approach of +// +//#define glibcpp_function_requires(C) \ +// boost::function_requires< boost::C >() +// +// won't work due to concept templates with more than one parameter, e.g., +// BinaryPredicateConcept. The preprocessor tries to split things up on +// the commas in the template argument list. We can't use an inner pair of +// parenthesis to hide the commas, because "boost::(Temp)" isn't +// a valid instantiation pattern. Thus, we steal a feature from C99. + +#define __glibcpp_function_requires(...) \ + __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >() +#define __glibcpp_class_requires(_a,_C) \ + _GLIBCPP_CLASS_REQUIRES(_a, __gnu_cxx, _C) +#define __glibcpp_class_requires2(_a,_b,_C) \ + _GLIBCPP_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C) +#define __glibcpp_class_requires3(_a,_b,_c,_C) \ + _GLIBCPP_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C) +#define __glibcpp_class_requires4(_a,_b,_c,_d,_C) \ + _GLIBCPP_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C) + +#endif // enable/disable + +#endif // _GLIBCPP_CONCEPT_CHECK diff --git a/contrib/media/updf/include/bits/concept_checks.h b/contrib/media/updf/include/bits/concept_checks.h new file mode 100644 index 0000000000..4a0e2d5570 --- /dev/null +++ b/contrib/media/updf/include/bits/concept_checks.h @@ -0,0 +1,811 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __CONCEPT_CHECKS_H +#define __CONCEPT_CHECKS_H + +/* + Use these macro like assertions, but they assert properties + on types (usually template arguments). In technical terms they + verify whether a type "models" a "concept". + + This set of requirements and the terminology used here is derived + from the book "Generic Programming and the STL" by Matt Austern + (Addison Wesley). For further information please consult that + book. The requirements also are intended to match the ANSI/ISO C++ + standard. + + This file covers the basic concepts and the iterator concepts. + There are several other files that provide the requirements + for the STL containers: + container_concepts.h + sequence_concepts.h + assoc_container_concepts.h + + Jeremy Siek, 1999 + + TO DO: + - some issues with regards to concept classification and mutability + including AssociativeContianer -> ForwardContainer + and SortedAssociativeContainer -> ReversibleContainer + - HashedAssociativeContainer + - Allocator + - Function Object Concepts + + */ + +#ifndef __STL_USE_CONCEPT_CHECKS + +// Some compilers lack the features that are necessary for concept checks. +// On those compilers we define the concept check macros to do nothing. +#define __STL_REQUIRES(__type_var, __concept) do {} while(0) +#define __STL_CLASS_REQUIRES(__type_var, __concept) \ + static int __##__type_var##_##__concept +#define __STL_CONVERTIBLE(__type_x, __type_y) do {} while(0) +#define __STL_REQUIRES_SAME_TYPE(__type_x, __type_y) do {} while(0) +#define __STL_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ + static int __##__type_x##__type_y##_require_same_type +#define __STL_GENERATOR_CHECK(__func, __ret) do {} while(0) +#define __STL_CLASS_GENERATOR_CHECK(__func, __ret) \ + static int __##__func##__ret##_generator_check +#define __STL_UNARY_FUNCTION_CHECK(__func, __ret, __arg) do {} while(0) +#define __STL_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ + static int __##__func##__ret##__arg##_unary_function_check +#define __STL_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + do {} while(0) +#define __STL_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + static int __##__func##__ret##__first##__second##_binary_function_check +#define __STL_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + do {} while(0) +#define __STL_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + static int __##__opname##__ret##__first##__second##_require_binary_op + +#else /* __STL_USE_CONCEPT_CHECKS */ + +// This macro tests whether the template argument "__type_var" +// satisfies the requirements of "__concept". Here is a list of concepts +// that we know how to check: +// _Allocator +// _Assignable +// _DefaultConstructible +// _EqualityComparable +// _LessThanComparable +// _TrivialIterator +// _InputIterator +// _OutputIterator +// _ForwardIterator +// _BidirectionalIterator +// _RandomAccessIterator +// _Mutable_TrivialIterator +// _Mutable_ForwardIterator +// _Mutable_BidirectionalIterator +// _Mutable_RandomAccessIterator + +#define __STL_REQUIRES(__type_var, __concept) \ +do { \ + void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\ + ::__concept##_requirement_violation; __x = __x; } while (0) + +// Use this to check whether type X is convertible to type Y +#define __STL_CONVERTIBLE(__type_x, __type_y) \ +do { \ + void (*__x)( __type_x , __type_y ) = _STL_CONVERT_ERROR< __type_x , \ + __type_y >::__type_X_is_not_convertible_to_type_Y; \ + __x = __x; } while (0) + +// Use this to test whether two template arguments are the same type +#define __STL_REQUIRES_SAME_TYPE(__type_x, __type_y) \ +do { \ + void (*__x)( __type_x , __type_y ) = _STL_SAME_TYPE_ERROR< __type_x, \ + __type_y >::__type_X_not_same_as_type_Y; \ + __x = __x; } while (0) + + +// function object checks +#define __STL_GENERATOR_CHECK(__func, __ret) \ +do { \ + __ret (*__x)( __func&) = \ + _STL_GENERATOR_ERROR< \ + __func, __ret>::__generator_requirement_violation; \ + __x = __x; } while (0) + + +#define __STL_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ +do { \ + __ret (*__x)( __func&, const __arg& ) = \ + _STL_UNARY_FUNCTION_ERROR< \ + __func, __ret, __arg>::__unary_function_requirement_violation; \ + __x = __x; } while (0) + + +#define __STL_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ +do { \ + __ret (*__x)( __func&, const __first&, const __second& ) = \ + _STL_BINARY_FUNCTION_ERROR< \ + __func, __ret, __first, __second>::__binary_function_requirement_violation; \ + __x = __x; } while (0) + + +#define __STL_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + do { \ + __ret (*__x)( __first&, __second& ) = _STL_BINARY##__opname##_ERROR< \ + __ret, __first, __second>::__binary_operator_requirement_violation; \ + __ret (*__y)( const __first&, const __second& ) = \ + _STL_BINARY##__opname##_ERROR< __ret, __first, __second>:: \ + __const_binary_operator_requirement_violation; \ + __y = __y; __x = __x; } while (0) + + +#ifdef __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE + +#define __STL_CLASS_REQUIRES(__type_var, __concept) +#define __STL_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) +#define __STL_CLASS_GENERATOR_CHECK(__func, __ret) +#define __STL_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) +#define __STL_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) +#define __STL_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) + +#else + +// Use this macro inside of template classes, where you would +// like to place requirements on the template arguments to the class +// Warning: do not pass pointers and such (e.g. T*) in as the __type_var, +// since the type_var is used to construct identifiers. Instead typedef +// the pointer type, then use the typedef name for the __type_var. +#define __STL_CLASS_REQUIRES(__type_var, __concept) \ + typedef void (* __func##__type_var##__concept)( __type_var ); \ + template <__func##__type_var##__concept _Tp1> \ + struct __dummy_struct_##__type_var##__concept { }; \ + static __dummy_struct_##__type_var##__concept< \ + __concept##_concept_specification< \ + __type_var>::__concept##_requirement_violation> \ + __dummy_ptr_##__type_var##__concept + + +#define __STL_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ + typedef void (* __func_##__type_x##__type_y##same_type)( __type_x, \ + __type_y ); \ + template < __func_##__type_x##__type_y##same_type _Tp1> \ + struct __dummy_struct_##__type_x##__type_y##_same_type { }; \ + static __dummy_struct_##__type_x##__type_y##_same_type< \ + _STL_SAME_TYPE_ERROR<__type_x, __type_y>::__type_X_not_same_as_type_Y> \ + __dummy_ptr_##__type_x##__type_y##_same_type + + +#define __STL_CLASS_GENERATOR_CHECK(__func, __ret) \ + typedef __ret (* __f_##__func##__ret##_generator)( __func& ); \ + template <__f_##__func##__ret##_generator _Tp1> \ + struct __dummy_struct_##__func##__ret##_generator { }; \ + static __dummy_struct_##__func##__ret##_generator< \ + _STL_GENERATOR_ERROR< \ + __func, __ret>::__generator_requirement_violation> \ + __dummy_ptr_##__func##__ret##_generator + + +#define __STL_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ + typedef __ret (* __f_##__func##__ret##__arg##_unary_check)( __func&, \ + const __arg& ); \ + template <__f_##__func##__ret##__arg##_unary_check _Tp1> \ + struct __dummy_struct_##__func##__ret##__arg##_unary_check { }; \ + static __dummy_struct_##__func##__ret##__arg##_unary_check< \ + _STL_UNARY_FUNCTION_ERROR< \ + __func, __ret, __arg>::__unary_function_requirement_violation> \ + __dummy_ptr_##__func##__ret##__arg##_unary_check + + +#define __STL_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + typedef __ret (* __f_##__func##__ret##__first##__second##_binary_check)( __func&, const __first&,\ + const __second& ); \ + template <__f_##__func##__ret##__first##__second##_binary_check _Tp1> \ + struct __dummy_struct_##__func##__ret##__first##__second##_binary_check { }; \ + static __dummy_struct_##__func##__ret##__first##__second##_binary_check< \ + _STL_BINARY_FUNCTION_ERROR<__func, __ret, __first, __second>:: \ + __binary_function_requirement_violation> \ + __dummy_ptr_##__func##__ret##__first##__second##_binary_check + + +#define __STL_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + typedef __ret (* __f_##__func##__ret##__first##__second##_binary_op)(const __first&, \ + const __second& ); \ + template <__f_##__func##__ret##__first##__second##_binary_op _Tp1> \ + struct __dummy_struct_##__func##__ret##__first##__second##_binary_op { }; \ + static __dummy_struct_##__func##__ret##__first##__second##_binary_op< \ + _STL_BINARY##__opname##_ERROR<__ret, __first, __second>:: \ + __binary_operator_requirement_violation> \ + __dummy_ptr_##__func##__ret##__first##__second##_binary_op + +#endif + +/* helper class for finding non-const version of a type. Need to have + something to assign to etc. when testing constant iterators. */ + +template +struct _Mutable_trait { + typedef _Tp _Type; +}; +template +struct _Mutable_trait { + typedef _Tp _Type; +}; + + +/* helper function for avoiding compiler warnings about unused variables */ +template +void __sink_unused_warning(_Type) { } + +template +struct _STL_CONVERT_ERROR { + static void + __type_X_is_not_convertible_to_type_Y(_TypeX __x, _TypeY) { + _TypeY __y = __x; + __sink_unused_warning(__y); + } +}; + + +template struct __check_equal { }; + +template +struct _STL_SAME_TYPE_ERROR { + static void + __type_X_not_same_as_type_Y(_TypeX , _TypeY ) { + __check_equal<_TypeX> t1 = __check_equal<_TypeY>(); + } +}; + + +// Some Functon Object Checks + +template +struct _STL_GENERATOR_ERROR { + static _Ret __generator_requirement_violation(_Func& __f) { + return __f(); + } +}; + +template +struct _STL_GENERATOR_ERROR<_Func, void> { + static void __generator_requirement_violation(_Func& __f) { + __f(); + } +}; + + +template +struct _STL_UNARY_FUNCTION_ERROR { + static _Ret + __unary_function_requirement_violation(_Func& __f, + const _Arg& __arg) { + return __f(__arg); + } +}; + +template +struct _STL_UNARY_FUNCTION_ERROR<_Func, void, _Arg> { + static void + __unary_function_requirement_violation(_Func& __f, + const _Arg& __arg) { + __f(__arg); + } +}; + +template +struct _STL_BINARY_FUNCTION_ERROR { + static _Ret + __binary_function_requirement_violation(_Func& __f, + const _First& __first, + const _Second& __second) { + return __f(__first, __second); + } +}; + +template +struct _STL_BINARY_FUNCTION_ERROR<_Func, void, _First, _Second> { + static void + __binary_function_requirement_violation(_Func& __f, + const _First& __first, + const _Second& __second) { + __f(__first, __second); + } +}; + + +#define __STL_DEFINE_BINARY_OP_CHECK(_OP, _NAME) \ +template \ +struct _STL_BINARY##_NAME##_ERROR { \ + static _Ret \ + __const_binary_operator_requirement_violation(const _First& __first, \ + const _Second& __second) { \ + return __first _OP __second; \ + } \ + static _Ret \ + __binary_operator_requirement_violation(_First& __first, \ + _Second& __second) { \ + return __first _OP __second; \ + } \ +} + +__STL_DEFINE_BINARY_OP_CHECK(==, _OP_EQUAL); +__STL_DEFINE_BINARY_OP_CHECK(!=, _OP_NOT_EQUAL); +__STL_DEFINE_BINARY_OP_CHECK(<, _OP_LESS_THAN); +__STL_DEFINE_BINARY_OP_CHECK(<=, _OP_LESS_EQUAL); +__STL_DEFINE_BINARY_OP_CHECK(>, _OP_GREATER_THAN); +__STL_DEFINE_BINARY_OP_CHECK(>=, _OP_GREATER_EQUAL); +__STL_DEFINE_BINARY_OP_CHECK(+, _OP_PLUS); +__STL_DEFINE_BINARY_OP_CHECK(*, _OP_TIMES); +__STL_DEFINE_BINARY_OP_CHECK(/, _OP_DIVIDE); +__STL_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT); +__STL_DEFINE_BINARY_OP_CHECK(%, _OP_MOD); +// ... + +// TODO, add unary operators (prefix and postfix) + +/* + The presence of this class is just to trick EDG into displaying + these error messages before any other errors. Without the + classes, the errors in the functions get reported after + other class errors deep inside the library. The name + choice just makes for an eye catching error message :) + */ +struct _STL_ERROR { + + template + static _Type + __default_constructor_requirement_violation(_Type) { + return _Type(); + } + template + static _Type + __assignment_operator_requirement_violation(_Type __a) { + __a = __a; + return __a; + } + template + static _Type + __copy_constructor_requirement_violation(_Type __a) { + _Type __c(__a); + return __c; + } + template + static _Type + __const_parameter_required_for_copy_constructor(_Type /* __a */, + const _Type& __b) { + _Type __c(__b); + return __c; + } + template + static _Type + __const_parameter_required_for_assignment_operator(_Type __a, + const _Type& __b) { + __a = __b; + return __a; + } + template + static _Type + __less_than_comparable_requirement_violation(_Type __a, _Type __b) { + if (__a < __b) return __a; + return __b; + } + template + static _Type + __equality_comparable_requirement_violation(_Type __a, _Type __b) { + if (__a == __b || __a != __b) return __a; + return __b; + } + template + static void + __dereference_operator_requirement_violation(_Iterator __i) { + __sink_unused_warning(*__i); + } + template + static void + __dereference_operator_and_assignment_requirement_violation(_Iterator __i) { + *__i = *__i; + } + template + static void + __preincrement_operator_requirement_violation(_Iterator __i) { + ++__i; + } + template + static void + __postincrement_operator_requirement_violation(_Iterator __i) { + __i++; + } + template + static void + __predecrement_operator_requirement_violation(_Iterator __i) { + --__i; + } + template + static void + __postdecrement_operator_requirement_violation(_Iterator __i) { + __i--; + } + template + static void + __postincrement_operator_and_assignment_requirement_violation(_Iterator __i, + _Type __t) { + *__i++ = __t; + } + template + static _Iterator + __iterator_addition_assignment_requirement_violation(_Iterator __i, + _Distance __n) { + __i += __n; + return __i; + } + template + static _Iterator + __iterator_addition_requirement_violation(_Iterator __i, _Distance __n) { + __i = __i + __n; + __i = __n + __i; + return __i; + } + template + static _Iterator + __iterator_subtraction_assignment_requirement_violation(_Iterator __i, + _Distance __n) { + __i -= __n; + return __i; + } + template + static _Iterator + __iterator_subtraction_requirement_violation(_Iterator __i, _Distance __n) { + __i = __i - __n; + return __i; + } + template + static _Distance + __difference_operator_requirement_violation(_Iterator __i, _Iterator __j, + _Distance __n) { + __n = __i - __j; + return __n; + } + template + static _Type + __element_access_operator_requirement_violation(_Exp __x, _Type*, + _Distance __n) { + return __x[__n]; + } + template + static void + __element_assignment_operator_requirement_violation(_Exp __x, + _Type* __t, + _Distance __n) { + __x[__n] = *__t; + } + +}; /* _STL_ERROR */ + +/* Associated Type Requirements */ + +__STL_BEGIN_NAMESPACE +template struct iterator_traits; +__STL_END_NAMESPACE + +template +struct __value_type_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::value_type value_type; +}; + +template +struct __difference_type_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::difference_type + difference_type; +}; + +template +struct __reference_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::reference reference; +}; + +template +struct __pointer_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::pointer pointer; +}; + +template +struct __iterator_category_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::iterator_category + iterator_category; +}; + +/* Assignable Requirements */ + + +template +struct _Assignable_concept_specification { + static void _Assignable_requirement_violation(_Type __a) { + _STL_ERROR::__assignment_operator_requirement_violation(__a); + _STL_ERROR::__copy_constructor_requirement_violation(__a); + _STL_ERROR::__const_parameter_required_for_copy_constructor(__a,__a); + _STL_ERROR::__const_parameter_required_for_assignment_operator(__a,__a); + } +}; + +/* DefaultConstructible Requirements */ + + +template +struct _DefaultConstructible_concept_specification { + static void _DefaultConstructible_requirement_violation(_Type __a) { + _STL_ERROR::__default_constructor_requirement_violation(__a); + } +}; + +/* EqualityComparable Requirements */ + +template +struct _EqualityComparable_concept_specification { + static void _EqualityComparable_requirement_violation(_Type __a) { + _STL_ERROR::__equality_comparable_requirement_violation(__a, __a); + } +}; + +/* LessThanComparable Requirements */ +template +struct _LessThanComparable_concept_specification { + static void _LessThanComparable_requirement_violation(_Type __a) { + _STL_ERROR::__less_than_comparable_requirement_violation(__a, __a); + } +}; + +/* TrivialIterator Requirements */ + +template +struct _TrivialIterator_concept_specification { +static void +_TrivialIterator_requirement_violation(_TrivialIterator __i) { + typedef typename + __value_type_type_definition_requirement_violation<_TrivialIterator>:: + value_type __T; + // Refinement of Assignable + _Assignable_concept_specification<_TrivialIterator>:: + _Assignable_requirement_violation(__i); + // Refinement of DefaultConstructible + _DefaultConstructible_concept_specification<_TrivialIterator>:: + _DefaultConstructible_requirement_violation(__i); + // Refinement of EqualityComparable + _EqualityComparable_concept_specification<_TrivialIterator>:: + _EqualityComparable_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__dereference_operator_requirement_violation(__i); +} +}; + +template +struct _Mutable_TrivialIterator_concept_specification { +static void +_Mutable_TrivialIterator_requirement_violation(_TrivialIterator __i) { + _TrivialIterator_concept_specification<_TrivialIterator>:: + _TrivialIterator_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__dereference_operator_and_assignment_requirement_violation(__i); +} +}; + +/* InputIterator Requirements */ + +template +struct _InputIterator_concept_specification { +static void +_InputIterator_requirement_violation(_InputIterator __i) { + // Refinement of TrivialIterator + _TrivialIterator_concept_specification<_InputIterator>:: + _TrivialIterator_requirement_violation(__i); + // Associated Types + __difference_type_type_definition_requirement_violation<_InputIterator>(); + __reference_type_definition_requirement_violation<_InputIterator>(); + __pointer_type_definition_requirement_violation<_InputIterator>(); + __iterator_category_type_definition_requirement_violation<_InputIterator>(); + // Valid Expressions + _STL_ERROR::__preincrement_operator_requirement_violation(__i); + _STL_ERROR::__postincrement_operator_requirement_violation(__i); +} +}; + +/* OutputIterator Requirements */ + +template +struct _OutputIterator_concept_specification { +static void +_OutputIterator_requirement_violation(_OutputIterator __i) { + // Refinement of Assignable + _Assignable_concept_specification<_OutputIterator>:: + _Assignable_requirement_violation(__i); + // Associated Types + __iterator_category_type_definition_requirement_violation<_OutputIterator>(); + // Valid Expressions + _STL_ERROR::__dereference_operator_requirement_violation(__i); + _STL_ERROR::__preincrement_operator_requirement_violation(__i); + _STL_ERROR::__postincrement_operator_requirement_violation(__i); + _STL_ERROR:: + __postincrement_operator_and_assignment_requirement_violation(__i, *__i); +} +}; + +/* ForwardIterator Requirements */ + +template +struct _ForwardIterator_concept_specification { +static void +_ForwardIterator_requirement_violation(_ForwardIterator __i) { + // Refinement of InputIterator + _InputIterator_concept_specification<_ForwardIterator>:: + _InputIterator_requirement_violation(__i); +} +}; + +template +struct _Mutable_ForwardIterator_concept_specification { +static void +_Mutable_ForwardIterator_requirement_violation(_ForwardIterator __i) { + _ForwardIterator_concept_specification<_ForwardIterator>:: + _ForwardIterator_requirement_violation(__i); + // Refinement of OutputIterator + _OutputIterator_concept_specification<_ForwardIterator>:: + _OutputIterator_requirement_violation(__i); +} +}; + +/* BidirectionalIterator Requirements */ + +template +struct _BidirectionalIterator_concept_specification { +static void +_BidirectionalIterator_requirement_violation(_BidirectionalIterator __i) { + // Refinement of ForwardIterator + _ForwardIterator_concept_specification<_BidirectionalIterator>:: + _ForwardIterator_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__predecrement_operator_requirement_violation(__i); + _STL_ERROR::__postdecrement_operator_requirement_violation(__i); +} +}; + +template +struct _Mutable_BidirectionalIterator_concept_specification { +static void +_Mutable_BidirectionalIterator_requirement_violation( + _BidirectionalIterator __i) +{ + _BidirectionalIterator_concept_specification<_BidirectionalIterator>:: + _BidirectionalIterator_requirement_violation(__i); + // Refinement of mutable_ForwardIterator + _Mutable_ForwardIterator_concept_specification<_BidirectionalIterator>:: + _Mutable_ForwardIterator_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation< + _BidirectionalIterator>::value_type __T; + typename _Mutable_trait<__T>::_Type* __tmp_ptr = 0; + // Valid Expressions + _STL_ERROR:: + __postincrement_operator_and_assignment_requirement_violation(__i, + *__tmp_ptr); +} +}; + +/* RandomAccessIterator Requirements */ + +template +struct _RandomAccessIterator_concept_specification { +static void +_RandomAccessIterator_requirement_violation(_RandAccIter __i) { + // Refinement of BidirectionalIterator + _BidirectionalIterator_concept_specification<_RandAccIter>:: + _BidirectionalIterator_requirement_violation(__i); + // Refinement of LessThanComparable + _LessThanComparable_concept_specification<_RandAccIter>:: + _LessThanComparable_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation<_RandAccIter> + ::value_type + value_type; + typedef typename + __difference_type_type_definition_requirement_violation<_RandAccIter> + ::difference_type + _Dist; + typedef typename _Mutable_trait<_Dist>::_Type _MutDist; + + // Valid Expressions + _STL_ERROR::__iterator_addition_assignment_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__iterator_addition_requirement_violation(__i, + _MutDist()); + _STL_ERROR:: + __iterator_subtraction_assignment_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__iterator_subtraction_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__difference_operator_requirement_violation(__i, __i, + _MutDist()); + typename _Mutable_trait::_Type* __dummy_ptr = 0; + _STL_ERROR::__element_access_operator_requirement_violation(__i, + __dummy_ptr, + _MutDist()); +} +}; + +template +struct _Mutable_RandomAccessIterator_concept_specification { +static void +_Mutable_RandomAccessIterator_requirement_violation(_RandAccIter __i) +{ + _RandomAccessIterator_concept_specification<_RandAccIter>:: + _RandomAccessIterator_requirement_violation(__i); + // Refinement of mutable_BidirectionalIterator + _Mutable_BidirectionalIterator_concept_specification<_RandAccIter>:: + _Mutable_BidirectionalIterator_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation<_RandAccIter> + ::value_type + value_type; + typedef typename + __difference_type_type_definition_requirement_violation<_RandAccIter> + ::difference_type + _Dist; + + typename _Mutable_trait::_Type* __tmp_ptr = 0; + // Valid Expressions + _STL_ERROR::__element_assignment_operator_requirement_violation(__i, + __tmp_ptr, _Dist()); +} +}; + +#define __STL_TYPEDEF_REQUIREMENT(__REQUIREMENT) \ +template \ +struct __##__REQUIREMENT##__typedef_requirement_violation { \ + typedef typename Type::__REQUIREMENT __REQUIREMENT; \ +} + +__STL_TYPEDEF_REQUIREMENT(value_type); +__STL_TYPEDEF_REQUIREMENT(difference_type); +__STL_TYPEDEF_REQUIREMENT(size_type); +__STL_TYPEDEF_REQUIREMENT(reference); +__STL_TYPEDEF_REQUIREMENT(const_reference); +__STL_TYPEDEF_REQUIREMENT(pointer); +__STL_TYPEDEF_REQUIREMENT(const_pointer); + + +template +struct _Allocator_concept_specification { +static void +_Allocator_requirement_violation(_Alloc __a) { + // Refinement of DefaultConstructible + _DefaultConstructible_concept_specification<_Alloc>:: + _DefaultConstructible_requirement_violation(__a); + // Refinement of EqualityComparable + _EqualityComparable_concept_specification<_Alloc>:: + _EqualityComparable_requirement_violation(__a); + // Associated Types + __value_type__typedef_requirement_violation<_Alloc>(); + __difference_type__typedef_requirement_violation<_Alloc>(); + __size_type__typedef_requirement_violation<_Alloc>(); + __reference__typedef_requirement_violation<_Alloc>(); + __const_reference__typedef_requirement_violation<_Alloc>(); + __pointer__typedef_requirement_violation<_Alloc>(); + __const_pointer__typedef_requirement_violation<_Alloc>(); + typedef typename _Alloc::value_type _Tp; + //__STL_REQUIRES_SAME_TYPE(typename _Alloc::__STL_TEMPLATE rebind<_Tp>::other, + // _Alloc); +} +}; + +#endif /* __STL_USE_CONCEPT_CHECKS */ + +#endif /* __CONCEPT_CHECKS_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/container_concepts.h b/contrib/media/updf/include/bits/container_concepts.h new file mode 100644 index 0000000000..99aec1c4b6 --- /dev/null +++ b/contrib/media/updf/include/bits/container_concepts.h @@ -0,0 +1,244 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __STL_CONTAINER_CONCEPTS_H +#define __STL_CONTAINER_CONCEPTS_H + + +#include + +#ifdef __STL_USE_CONCEPT_CHECKS + + +// This file covers the following concepts: +// _Container +// _ForwardContainer +// _ReversibleContainer +// _const_ReversibleContainer +// _RandomAccessContainer +// + +struct _ERROR_IN_STL_CONTAINER { + + /* Container expresssions */ + + template + static void + __begin_iterator_accessor_requirement_violation(_Container __c) { + __c.begin(); + } + template + static void + __const_begin_iterator_accessor_requirement_violation(const _Container& __c) { + __c.begin(); + } + template + static void + __end_iterator_accessor_requirement_violation(_Container __c) { + __c.end(); + } + template + static void + __const_end_iterator_accessor_requirement_violation(const _Container& __c) { + __c.end(); + } + + template + static void + __rbegin_iterator_accessor_requirement_violation(_Container __c) { + __c.rbegin(); + } + template + static void + __const_rbegin_iterator_accessor_requirement_violation(const _Container& __c) { + __c.rbegin(); + } + template + static void + __rend_iterator_accessor_requirement_violation(_Container __c) { + __c.rend(); + } + template + static void + __const_rend_iterator_accessor_requirement_violation(const _Container& __c) { + __c.rend(); + } + template + static void + __size_function_must_be_const(const _Container& __c) { + __c.size(); + } + template + static void + __size_function_requirement_violation(_Container& __c) { + __c.size(); + __size_function_must_be_const(__c); + } + template + static void + __max_size_function_must_be_const(const _Container& __c) { + __c.max_size(); + } + template + static void + __max_size_function_requirement_violation(_Container& __c) { + __c.max_size(); + __max_size_function_must_be_const(__c); + } + template + static void + __empty_function_must_be_const(const _Container& __c) { + __c.empty(); + } + template + static void + __empty_function_requirement_violation(_Container& __c) { + __c.empty(); + __empty_function_must_be_const(__c); + } + template + static void + __swap_function_requirement_violation(_Container& __c) { + __c.swap(__c); + } + +}; + + +__STL_TYPEDEF_REQUIREMENT(iterator); +__STL_TYPEDEF_REQUIREMENT(const_iterator); + +/* Containers */ + +template +struct _Container_concept_specification { +static void +_Container_requirement_violation(_Container __c) { + // Refinement of Assignable + _Assignable_concept_specification<_Container>::_Assignable_requirement_violation(__c); + // Associated Types + __value_type__typedef_requirement_violation<_Container>(); + __difference_type__typedef_requirement_violation<_Container>(); + __size_type__typedef_requirement_violation<_Container>(); + __reference__typedef_requirement_violation<_Container>(); + __const_reference__typedef_requirement_violation<_Container>(); + __pointer__typedef_requirement_violation<_Container>(); + __const_pointer__typedef_requirement_violation<_Container>(); + __iterator__typedef_requirement_violation<_Container>(); + __const_iterator__typedef_requirement_violation<_Container>(); + // Valid Expressions + _ERROR_IN_STL_CONTAINER::__const_begin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__const_end_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__begin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__end_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__size_function_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__max_size_function_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__empty_function_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__swap_function_requirement_violation(__c); + // Requirements on Iterators + typedef typename _Container::iterator iter; + typedef typename _Container::const_iterator const_iter; + _InputIterator_concept_specification::_InputIterator_requirement_violation(const_iter()); + _InputIterator_concept_specification::_InputIterator_requirement_violation(iter()); +} +}; + +template +struct _ForwardContainer_concept_specification { +static void +_ForwardContainer_requirement_violation(_ForwardContainer __c) { + // Refinement of Container + _Container_concept_specification<_ForwardContainer>::_Container_requirement_violation(__c); + // Requirements on Iterators + typedef typename _ForwardContainer::iterator iter; + typedef typename _ForwardContainer::const_iterator const_iter; + _ForwardIterator_concept_specification::_ForwardIterator_requirement_violation(const_iter()); + _Mutable_ForwardIterator_concept_specification::_Mutable_ForwardIterator_requirement_violation(iter()); +} +}; + + +__STL_TYPEDEF_REQUIREMENT(reverse_iterator); +__STL_TYPEDEF_REQUIREMENT(const_reverse_iterator); + +template +struct _ReversibleContainer_concept_specification { +static void +_ReversibleContainer_requirement_violation(_ReversibleContainer __c) { + // Refinement of ForwardContainer + _ForwardContainer_concept_specification<_ReversibleContainer>::_ForwardContainer_requirement_violation(__c); + // Associated types + __reverse_iterator__typedef_requirement_violation<_ReversibleContainer>(); + __const_reverse_iterator__typedef_requirement_violation<_ReversibleContainer>(); + // Valid Expressions + _ERROR_IN_STL_CONTAINER::__const_rbegin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__const_rend_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__rbegin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__rend_iterator_accessor_requirement_violation(__c); + // Requirements on Iterators + typedef typename _ReversibleContainer::iterator iter; + typedef typename _ReversibleContainer::const_iterator const_iter; + _BidirectionalIterator_concept_specification::_BidirectionalIterator_requirement_violation(const_iter()); + _Mutable_BidirectionalIterator_concept_specification::_Mutable_BidirectionalIterator_requirement_violation(iter()); +} +}; + +template +struct _const_ReversibleContainer_concept_specification { +static void +_const_ReversibleContainer_requirement_violation(_ReversibleContainer __c) { + // Refinement of Container (JGS, not ForwardContainer) + _Container_concept_specification<_ReversibleContainer>::_Container_requirement_violation(__c); + // Associated types + __reverse_iterator__typedef_requirement_violation<_ReversibleContainer>(); + __const_reverse_iterator__typedef_requirement_violation<_ReversibleContainer>(); + // Valid Expressions + _ERROR_IN_STL_CONTAINER::__const_rbegin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__const_rend_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__rbegin_iterator_accessor_requirement_violation(__c); + _ERROR_IN_STL_CONTAINER::__rend_iterator_accessor_requirement_violation(__c); + // Requirements on Iterators + typedef typename _ReversibleContainer::iterator iter; + typedef typename _ReversibleContainer::const_iterator const_iter; + + _BidirectionalIterator_concept_specification::_BidirectionalIterator_requirement_violation(const_iter()); +} +}; + + +template +struct _RandomAccessContainer_concept_specification { +static void +_RandomAccessContainer_requirement_violation(_RandomAccessContainer __c) { + // Refinement of ReversibleContainer + _ReversibleContainer_concept_specification<_RandomAccessContainer>::_ReversibleContainer_requirement_violation(__c); + // Valid Expressions + typedef typename _RandomAccessContainer::value_type __T; + typedef typename _RandomAccessContainer::difference_type _Dist; + typedef typename _Mutable_trait<__T>::_Type Type; + typedef Type* _TypePtr; + typedef typename _Mutable_trait<_Dist>::_Type Dist; + _STL_ERROR::__element_access_operator_requirement_violation(__c, + _TypePtr(), + Dist()); + // Requirements on Iterators + typedef typename _RandomAccessContainer::iterator iter; + typedef typename _RandomAccessContainer::const_iterator const_iter; + _RandomAccessIterator_concept_specification::_RandomAccessIterator_requirement_violation(const_iter()); + _Mutable_RandomAccessIterator_concept_specification::_Mutable_RandomAccessIterator_requirement_violation(iter()); +} +}; + +#endif /* if __STL_USE_CONCEPT_CHECKS */ + +#endif /* __STL_CONTAINER_CONCEPTS_H */ diff --git a/contrib/media/updf/include/bits/cpp_type_traits.h b/contrib/media/updf/include/bits/cpp_type_traits.h new file mode 100644 index 0000000000..61cc45d47f --- /dev/null +++ b/contrib/media/updf/include/bits/cpp_type_traits.h @@ -0,0 +1,297 @@ +// The -*- C++ -*- type traits classes for internal use in libstdc++ + +// Copyright (C) 2000-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_CPP_TYPE_TRAITS_H +#define _CPP_BITS_CPP_TYPE_TRAITS_H 1 + +#pragma GCC system_header + +// +// This file provides some compile-time information about various types. +// These representations were designed, on purpose, to be constant-expressions +// and not types as found in . In particular, they +// can be used in control structures and the optimizer hopefully will do +// the obvious thing. +// +// Why integral expressions, and not functions nor types? +// Firstly, these compile-time entities are used as template-arguments +// so function return values won't work: We need compile-time entities. +// We're left with types and constant integral expressions. +// Secondly, from the point of view of ease of use, type-based compile-time +// information is -not- *that* convenient. On has to write lots of +// overloaded functions and to hope that the compiler will select the right +// one. As a net effect, the overall structure isn't very clear at first +// glance. +// Thirdly, partial ordering and overload resolution (of function templates) +// is highly costly in terms of compiler-resource. It is a Good Thing to +// keep these resource consumption as least as possible. +// +// See valarray_array.h for a case use. +// +// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06. +// + +namespace std +{ + template + struct __is_void + { + enum + { + _M_type = 0 + }; + }; + + template<> + struct __is_void + { + enum + { + _M_type = 1 + }; + }; + + // + // Integer types + // + template + struct __is_integer + { + enum + { + _M_type = 0 + }; + }; + + // Thirteen specializations (yes there are eleven standard integer + // types; 'long long' and 'unsigned long long' are supported as + // extensions) + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + +# ifdef _GLIBCPP_USE_WCHAR_T + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; +# endif + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + +# ifdef _GLIBCPP_USE_LONG_LONG + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_integer + { + enum + { + _M_type = 1 + }; + }; +# endif + + // + // Floating point types + // + template + struct __is_floating + { + enum + { + _M_type = 0 + }; + }; + + // three specializations (float, double and 'long double') + template<> + struct __is_floating + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_floating + { + enum + { + _M_type = 1 + }; + }; + + template<> + struct __is_floating + { + enum + { + _M_type = 1 + }; + }; + + // + // An arithmetic type is an integer type or a floating point type + // + template + struct __is_arithmetic + { + enum + { + _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type + }; + }; + + // + // A fundamental type is `void' or and arithmetic type + // + template + struct __is_fundamental + { + enum + { + _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type + }; + }; + + // + // For the immediate use, the following is a good approximation + // + template + struct __is_pod + { + enum + { + _M_type = __is_fundamental<_Tp>::_M_type + }; + }; + +} // namespace std + + +#endif //_CPP_BITS_CPP_TYPE_TRAITS_H diff --git a/contrib/media/updf/include/bits/endian.h b/contrib/media/updf/include/bits/endian.h new file mode 100644 index 0000000000..54bd9d14bb --- /dev/null +++ b/contrib/media/updf/include/bits/endian.h @@ -0,0 +1,7 @@ +/* i386 is little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/contrib/media/updf/include/bits/fpos.h b/contrib/media/updf/include/bits/fpos.h new file mode 100644 index 0000000000..86eb5c38e4 --- /dev/null +++ b/contrib/media/updf/include/bits/fpos.h @@ -0,0 +1,121 @@ +// File position object and stream types + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27 Input/output library +// + +#ifndef _CPP_BITS_FPOS_H +#define _CPP_BITS_FPOS_H 1 + +#pragma GCC system_header + +#include +#include // For mbstate_t. + +namespace std +{ + // 27.4.1 Types + + // 27.4.3 Template class fpos + template + class fpos + { + public: + // Types: + typedef _StateT __state_type; + + private: + streamoff _M_off; + __state_type _M_st; + + public: + __state_type + state() const { return _M_st; } + + void + state(__state_type __st) { _M_st = __st; } + + // NB: The standard defines only the implicit copy ctor and the + // previous two members. The rest is a "conforming extension". + fpos(): _M_off(streamoff()), _M_st(__state_type()) { } + + fpos(streamoff __off, __state_type __st = __state_type()) + : _M_off(__off), _M_st(__st) { } + + operator streamoff() const { return _M_off; } + + fpos& + operator+=(streamoff __off) { _M_off += __off; return *this; } + + fpos& + operator-=(streamoff __off) { _M_off -= __off; return *this; } + + fpos + operator+(streamoff __off) + { + fpos __t(*this); + __t += __off; + return __t; + } + + fpos + operator-(streamoff __off) + { + fpos __t(*this); + __t -= __off; + return __t; + } + + bool + operator==(const fpos& __pos) const + { return _M_off == __pos._M_off; } + + bool + operator!=(const fpos& __pos) const + { return _M_off != __pos._M_off; } + + streamoff + _M_position() const { return _M_off; } + + void + _M_position(streamoff __off) { _M_off = __off; } + }; + + // 27.2, paragraph 10 about fpos/char_traits circularity + typedef fpos streampos; +# ifdef _GLIBCPP_USE_WCHAR_T + typedef fpos wstreampos; +# endif +} // namespace std + +#endif + + + diff --git a/contrib/media/updf/include/bits/fstream.tcc b/contrib/media/updf/include/bits/fstream.tcc new file mode 100644 index 0000000000..7a41ba789f --- /dev/null +++ b/contrib/media/updf/include/bits/fstream.tcc @@ -0,0 +1,605 @@ +// File based streams -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8 File-based streams +// + +#ifndef _CPP_BITS_FSTREAM_TCC +#define _CPP_BITS_FSTREAM_TCC 1 + +namespace std +{ + template + void + basic_filebuf<_CharT, _Traits>:: + _M_allocate_file() + { + if (!_M_file) + { + _M_buf_unified = true; // Tie input to output for basic_filebuf. + try + { _M_file = new __file_type(&_M_lock); } + catch(...) + { + delete _M_file; + __throw_exception_again; + } + } + } + + template + void + basic_filebuf<_CharT, _Traits>:: + _M_allocate_internal_buffer() + { + if (!_M_buf && _M_buf_size_opt) + { + _M_buf_size = _M_buf_size_opt; + + // Allocate internal buffer. + try { _M_buf = new char_type[_M_buf_size]; } + catch(...) + { + delete [] _M_buf; + __throw_exception_again; + } + _M_buf_allocated = true; + } + } + + // Both close and setbuf need to deallocate internal buffers, if it exists. + template + void + basic_filebuf<_CharT, _Traits>:: + _M_destroy_internal_buffer() + { + if (_M_buf_allocated) + { + delete [] _M_buf; + _M_buf = NULL; + _M_buf_allocated = false; + this->setg(NULL, NULL, NULL); + this->setp(NULL, NULL); + } + } + + template + void + basic_filebuf<_CharT, _Traits>:: + _M_allocate_pback_buffer() + { + if (!_M_pback && _M_pback_size) + { + // Allocate pback buffer. + try + { _M_pback = new char_type[_M_pback_size]; } + catch(...) + { + delete [] _M_pback; + __throw_exception_again; + } + } + } + + template + basic_filebuf<_CharT, _Traits>:: + basic_filebuf() + : __streambuf_type(), _M_file(NULL), _M_state_cur(__state_type()), + _M_state_beg(__state_type()), _M_buf_allocated(false), + _M_last_overflowed(false) + { } + + template + basic_filebuf<_CharT, _Traits>:: + basic_filebuf(__c_file_type* __f, ios_base::openmode __mode, int_type __s) + : __streambuf_type(), _M_file(NULL), _M_state_cur(__state_type()), + _M_state_beg(__state_type()), _M_buf_allocated(false), + _M_last_overflowed(false) + { + _M_allocate_file(); + _M_file->sys_open(__f, __mode); + if (this->is_open()) + { + _M_mode = __mode; + if (__s) + { + _M_buf_size_opt = __s; + _M_allocate_internal_buffer(); + _M_set_indeterminate(); + } + _M_allocate_pback_buffer(); + } + } + + template + basic_filebuf<_CharT, _Traits>::__filebuf_type* + basic_filebuf<_CharT, _Traits>:: + open(const char* __s, ios_base::openmode __mode) + { + __filebuf_type *__ret = NULL; + if (!this->is_open()) + { + _M_allocate_file(); + _M_file->open(__s, __mode); + if (this->is_open()) + { + _M_allocate_internal_buffer(); + _M_allocate_pback_buffer(); + _M_mode = __mode; + + // For time being, set both (in/out) sets of pointers. + _M_set_indeterminate(); + if (__mode & ios_base::ate + && this->seekoff(0, ios_base::end, __mode) < 0) + this->close(); + __ret = this; + } + } + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::__filebuf_type* + basic_filebuf<_CharT, _Traits>:: + close() + { + __filebuf_type *__ret = NULL; + if (this->is_open()) + { + bool __testput = _M_out_cur && _M_out_beg < _M_out_end; + if (__testput) + _M_really_overflow(traits_type::eof()); + + // NB: Do this here so that re-opened filebufs will be cool... + _M_pback_destroy(); + +#if 0 + // XXX not done + if (_M_last_overflowed) + { + _M_output_unshift(); + _M_really_overflow(traits_type::eof()); + } +#endif + + _M_mode = ios_base::openmode(0); + _M_destroy_internal_buffer(); + + if (_M_pback) + { + delete [] _M_pback; + _M_pback = NULL; + } + __ret = this; + } + + // Can actually allocate this file as part of an open and never + // have it be opened..... + if (_M_file) + { + delete _M_file; + _M_file = NULL; + } + _M_last_overflowed = false; + return __ret; + } + + template + streamsize + basic_filebuf<_CharT, _Traits>:: + showmanyc() + { + streamsize __ret = -1; + bool __testin = _M_mode & ios_base::in; + + if (__testin) + { + bool __testeof = false; + if (_M_in_cur >= _M_in_end) + __testeof = this->underflow() == traits_type::eof(); + if (!__testeof) + __ret = _M_in_end - _M_in_cur; + } + _M_last_overflowed = false; + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + underflow() + { + int_type __ret = traits_type::eof(); + bool __testin = _M_mode & ios_base::in; + bool __testout = _M_mode & ios_base::out; + + // XXX Should re-enable codecvt bits disabled after 2.90.8. + if (__testin) + { + // Check for pback madness, and if so swich back to the + // normal buffers and jet outta here before expensive + // fileops happen... + if (_M_pback_init) + { + _M_pback_destroy(); + if (_M_in_cur < _M_in_end) + return traits_type::to_int_type(*_M_in_cur); + } + + bool __testget = _M_in_cur && _M_in_beg < _M_in_cur; + bool __testinit = _M_is_indeterminate(); + // Sync internal and external buffers. + // NB: __testget -> __testput as _M_buf_unified here. + if (__testget) + { + if (__testout) + _M_really_overflow(); +#if _GLIBCPP_AVOID_FSEEK + else if ((_M_in_cur - _M_in_beg) == 1) + _M_file->sys_getc(); +#endif + else + _M_file->seekoff(_M_in_cur - _M_in_beg, + ios_base::cur, ios_base::in); + } + + if (__testinit || __testget) + { + // Assume buffered case, need to refill internal buffers. + streamsize __size = _M_file->xsgetn(_M_in_beg, _M_buf_size); + if (0 < __size) + { + _M_set_determinate(__size); + if (__testout) + _M_out_cur = _M_in_cur; + __ret = traits_type::to_int_type(*_M_in_cur); +#if _GLIBCPP_AVOID_FSEEK + if (__size == 1) + _M_file->sys_ungetc(*_M_in_cur); + else + { +#endif + streamoff __p = _M_file->seekoff(0 - __size, ios_base::cur, + ios_base::in); + if (__p == -1) + { + // XXX Something is wrong, do error checking. + } +#if _GLIBCPP_AVOID_FSEEK + } +#endif + } + } + } + _M_last_overflowed = false; + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + pbackfail(int_type __i) + { + int_type __ret = traits_type::eof(); + bool __testin = _M_mode & ios_base::in; + + if (__testin) + { + bool __testpb = _M_in_beg < _M_in_cur; + char_type __c = traits_type::to_char_type(__i); + bool __testeof = traits_type::eq_int_type(__i, __ret); + + if (__testpb) + { + bool __testout = _M_mode & ios_base::out; + bool __testeq = traits_type::eq(__c, this->gptr()[-1]); + + // Try to put back __c into input sequence in one of three ways. + // Order these tests done in is unspecified by the standard. + if (!__testeof && __testeq) + { + --_M_in_cur; + if (__testout) + --_M_out_cur; + __ret = __i; + } + else if (__testeof) + { + --_M_in_cur; + if (__testout) + --_M_out_cur; + __ret = traits_type::not_eof(__i); + } + else if (!__testeof) + { + --_M_in_cur; + if (__testout) + --_M_out_cur; + _M_pback_create(); + *_M_in_cur = __c; + __ret = __i; + } + } + else + { + // At the beginning of the buffer, need to make a + // putback position available. + this->seekoff(-1, ios_base::cur); + this->underflow(); + if (!__testeof) + { + if (!traits_type::eq(__c, *_M_in_cur)) + { + _M_pback_create(); + *_M_in_cur = __c; + } + __ret = __i; + } + else + __ret = traits_type::not_eof(__i); + } + } + _M_last_overflowed = false; + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + overflow(int_type __c) + { + int_type __ret = traits_type::eof(); + bool __testput = _M_out_cur && _M_out_cur < _M_buf + _M_buf_size; + bool __testout = _M_mode & ios_base::out; + + if (__testout) + { + if (__testput) + { + *_M_out_cur = traits_type::to_char_type(__c); + _M_out_cur_move(1); + __ret = traits_type::not_eof(__c); + } + else + __ret = this->_M_really_overflow(__c); + } + + _M_last_overflowed = false; // Set in _M_really_overflow, below. + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + _M_really_overflow(int_type __c) + { + int_type __ret = traits_type::eof(); + bool __testput = _M_out_cur && _M_out_beg < _M_out_end; + bool __testunbuffered = _M_file && !_M_buf_size; + + if (__testput || __testunbuffered) + { +#if 1 + int __plen = _M_out_end - _M_out_beg; + streamsize __len = 0; + + if (__plen) + __len = _M_file->xsputn(_M_out_beg, __plen); + + if (__c !=traits_type::eof()) + { + char_type __pending = traits_type::to_char_type(__c); + __len += _M_file->xsputn(&__pending, 1); + ++__plen; + } + + // NB: Need this so that external byte sequence reflects + // internal buffer. + _M_file->sync(); + if (__len == __plen) + { + _M_set_indeterminate(); + __ret = traits_type::not_eof(__c); + } +#else + // Part one: Allocate temporary conversion buffer on + // stack. Convert internal buffer plus __c (ie, + // "pending sequence") to temporary conversion buffer. + int __plen = _M_out_end - _M_out_beg; + char_type* __pbuf = static_cast(__builtin_alloca(sizeof(char_type) * __plen + 1)); + traits_type::copy(__pbuf, this->pbase(), __plen); + if (!__testeof) + { + __pbuf[__plen] = traits_type::to_char_type(__c); + ++__plen; + } + + char_type* __pend; + char* __conv_buf = static_cast(__builtin_alloca(__plen)); + char* __conv_end; + _M_state_beg = _M_state_cur; + + __res_type __r = _M_fcvt->out(_M_state_cur, + __pbuf, __pbuf + __plen, + const_cast(__pend), + __conv_buf, __conv_buf + __plen, + __conv_end); + + // Part two: (Re)spill converted "pending sequence" + // contents (now in temporary conversion buffer) to + // external buffer (_M_file->_IO_*) using + // _M_file->sys_write(), and do error (minimal) checking. + if (__r != codecvt_base::error) + { + streamsize __len = _M_file->xsputn(__conv_buf, __plen); + // NB: Need this so that external byte sequence reflects + // internal buffer. + _M_file->sync(); + if (__len == __plen) + { + _M_set_indeterminate(); + __ret = traits_type::not_eof(__c); + } + } +#endif + } + _M_last_overflowed = true; + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::__streambuf_type* + basic_filebuf<_CharT, _Traits>:: + setbuf(char_type* __s, streamsize __n) + { + if (!this->is_open() && __s == 0 && __n == 0) + _M_buf_size_opt = 0; + else if (__s && __n) + { + // This is implementation-defined behavior, and assumes + // that an external char_type array of length (__s + __n) + // exists and has been pre-allocated. If this is not the + // case, things will quickly blow up. + // Step 1: Destroy the current internal array. + _M_destroy_internal_buffer(); + + // Step 2: Use the external array. + _M_buf = __s; + _M_buf_size_opt = _M_buf_size = __n; + _M_set_indeterminate(); + + // Step 3: Make sure a pback buffer is allocated. + _M_allocate_pback_buffer(); + } + _M_last_overflowed = false; + return this; + } + + template + basic_filebuf<_CharT, _Traits>::pos_type + basic_filebuf<_CharT, _Traits>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + bool __testopen = this->is_open(); + bool __testin = __mode & ios_base::in && _M_mode & ios_base::in; + bool __testout = __mode & ios_base::out && _M_mode & ios_base::out; + + // Should probably do has_facet checks here. + int __width = use_facet<__codecvt_type>(_M_buf_locale).encoding(); + if (__width < 0) + __width = 0; + bool __testfail = __off != 0 && __width <= 0; + + if (__testopen && !__testfail && (__testin || __testout)) + { + // Ditch any pback buffers to avoid confusion. + _M_pback_destroy(); + + if (__way != ios_base::cur || __off != 0) + { + off_type __computed_off = __width * __off; + + bool __testget = _M_in_cur && _M_in_beg < _M_in_end; + bool __testput = _M_out_cur && _M_out_beg < _M_out_end; + // Sync the internal and external streams. + // out + if (__testput || _M_last_overflowed) + { + // Part one: update the output sequence. + this->sync(); + // Part two: output unshift sequence. + _M_output_unshift(); + } + //in + // NB: underflow() rewinds the external buffer. + else if (__testget && __way == ios_base::cur) + __computed_off += _M_in_cur - _M_in_beg; + + __ret = _M_file->seekoff(__computed_off, __way, __mode); + _M_set_indeterminate(); + } + // NB: Need to do this in case _M_file in indeterminate + // state, ie _M_file->_offset == -1 + else + { + __ret = _M_file->seekoff(__off, ios_base::cur, __mode); + __ret += max(_M_out_cur, _M_in_cur) - _M_buf; + } + } + _M_last_overflowed = false; + return __ret; + } + + template + basic_filebuf<_CharT, _Traits>::pos_type + basic_filebuf<_CharT, _Traits>:: + seekpos(pos_type __pos, ios_base::openmode __mode) + { + pos_type __ret; + off_type __off = __pos; + + __ret = this->seekoff(__off, ios_base::beg, __mode); + + _M_last_overflowed = false; + return __ret; + } + + template + void + basic_filebuf<_CharT, _Traits>:: + _M_output_unshift() + { } + + template + void + basic_filebuf<_CharT, _Traits>:: + imbue(const locale& __loc) + { + bool __testbeg = gptr() == eback() && pptr() == pbase(); + + if (__testbeg && _M_buf_locale != __loc) + { + _M_buf_locale = __loc; + _M_buf_locale_init = true; + } + + // NB this may require the reconversion of previously + // converted chars. This in turn may cause the reconstruction + // of the original file. YIKES!! + // XXX The part in the above comment is not done. + _M_last_overflowed = false; + } + +} // namespace std + +#endif // _CPP_BITS_FSTREAM_TCC + + diff --git a/contrib/media/updf/include/bits/functexcept.h b/contrib/media/updf/include/bits/functexcept.h new file mode 100644 index 0000000000..eac2c95b43 --- /dev/null +++ b/contrib/media/updf/include/bits/functexcept.h @@ -0,0 +1,85 @@ +// Function-Based Exception Support -*- C++ -*- + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 19.1 Exception classes +// + +#include + +namespace std +{ + // Helper for exception objects in + void + __throw_bad_exception(void); + + // Helper for exception objects in + void + __throw_bad_alloc(void); + + // Helper for exception objects in + void + __throw_bad_cast(void); + + void + __throw_bad_typeid(void); + + // Helpers for exception objects in + void + __throw_logic_error(const char* __s); + + void + __throw_domain_error(const char* __s); + + void + __throw_invalid_argument(const char* __s); + + void + __throw_length_error(const char* __s); + + void + __throw_out_of_range(const char* __s); + + void + __throw_runtime_error(const char* __s); + + void + __throw_range_error(const char* __s); + + void + __throw_overflow_error(const char* __s); + + void + __throw_underflow_error(const char* __s); + + // Helpers for exception objects in basic_ios + void + __throw_ios_failure(const char* __s); +} // namespace std + diff --git a/contrib/media/updf/include/bits/generic_shadow.h b/contrib/media/updf/include/bits/generic_shadow.h new file mode 100644 index 0000000000..b2a554f89e --- /dev/null +++ b/contrib/media/updf/include/bits/generic_shadow.h @@ -0,0 +1,59 @@ +// generic C header shadow file -*- C++ -*- + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// This file is included by all the standard C headers +// after defining _SHADOW_NAME. + +#ifdef _IN_C_LEGACY_ /* sub-included by a C header */ + + // Get out of the "swamp." + } // Close extern "C" + } // Close namespace _C_legacy:: + +# undef _IN_C_LEGACY_ +# include _SHADOW_NAME + + // Dive back into the "swamp." + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ + +#else /* not _IN_C_LEGACY_: directly included by user program */ + +# include _SHADOW_NAME + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + + using namespace ::_C_legacy::_C_shadow; + +#endif /* _IN_C_LEGACY_ */ + + + diff --git a/contrib/media/updf/include/bits/gslice.h b/contrib/media/updf/include/bits/gslice.h new file mode 100644 index 0000000000..df8ecbe8be --- /dev/null +++ b/contrib/media/updf/include/bits/gslice.h @@ -0,0 +1,119 @@ +// The template and inlines for the -*- C++ -*- gslice class. + +// Copyright (C) 1997-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_GSLICE_H +#define _CPP_BITS_GSLICE_H 1 + +#pragma GCC system_header + +namespace std { + + class gslice + { + public: + gslice (); + gslice (size_t, const valarray&, const valarray&); + // XXX: the IS says the copy-ctor and copy-assignment operators are + // synthetized by the compiler but they are just unsuitable + // for a ref-counted semantic + gslice(const gslice&); + ~gslice(); + + // XXX: See the note above. + gslice& operator= (const gslice&); + + size_t start () const; + valarray size () const; + valarray stride () const; + + private: + struct _Indexer { + size_t _M_count; + size_t _M_start; + valarray _M_size; + valarray _M_stride; + valarray _M_index; + _Indexer(size_t, const valarray&, + const valarray&); + void _M_increment_use() { ++_M_count; } + size_t _M_decrement_use() { return --_M_count; } + }; + + _Indexer* _M_index; + + template friend class valarray; + }; + + inline size_t + gslice::start () const + { return _M_index ? _M_index->_M_start : 0; } + + inline valarray + gslice::size () const + { return _M_index ? _M_index->_M_size : valarray(); } + + inline valarray + gslice::stride () const + { return _M_index ? _M_index->_M_stride : valarray(); } + + inline gslice::gslice () : _M_index(0) {} + + inline + gslice::gslice(size_t __o, const valarray& __l, + const valarray& __s) + : _M_index(new gslice::_Indexer(__o, __l, __s)) {} + + inline + gslice::gslice(const gslice& __g) : _M_index(__g._M_index) + { if (_M_index) _M_index->_M_increment_use(); } + + inline + gslice::~gslice() + { if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; } + + inline gslice& + gslice::operator= (const gslice& __g) + { + if (__g._M_index) __g._M_index->_M_increment_use(); + if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; + _M_index = __g._M_index; + return *this; + } + + +} // std:: + + +#endif /* _CPP_BITS_GSLICE_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/gslice_array.h b/contrib/media/updf/include/bits/gslice_array.h new file mode 100644 index 0000000000..3e2d12fd04 --- /dev/null +++ b/contrib/media/updf/include/bits/gslice_array.h @@ -0,0 +1,171 @@ +// The template and inlines for the -*- C++ -*- gslice_array class. + +// Copyright (C) 1997-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_GSLICE_ARRAY +#define _CPP_BITS_GSLICE_ARRAY 1 + +#pragma GCC system_header + +namespace std { + + template class gslice_array + { + public: + typedef _Tp value_type; + + void operator= (const valarray<_Tp>&) const; + void operator*= (const valarray<_Tp>&) const; + void operator/= (const valarray<_Tp>&) const; + void operator%= (const valarray<_Tp>&) const; + void operator+= (const valarray<_Tp>&) const; + void operator-= (const valarray<_Tp>&) const; + void operator^= (const valarray<_Tp>&) const; + void operator&= (const valarray<_Tp>&) const; + void operator|= (const valarray<_Tp>&) const; + void operator<<=(const valarray<_Tp>&) const; + void operator>>=(const valarray<_Tp>&) const; + void operator=(const _Tp&); + + template + void operator= (const _Expr<_Dom,_Tp>&) const; + template + void operator*= (const _Expr<_Dom,_Tp>&) const; + template + void operator/= (const _Expr<_Dom,_Tp>&) const; + template + void operator%= (const _Expr<_Dom,_Tp>&) const; + template + void operator+= (const _Expr<_Dom,_Tp>&) const; + template + void operator-= (const _Expr<_Dom,_Tp>&) const; + template + void operator^= (const _Expr<_Dom,_Tp>&) const; + template + void operator&= (const _Expr<_Dom,_Tp>&) const; + template + void operator|= (const _Expr<_Dom,_Tp>&) const; + template + void operator<<= (const _Expr<_Dom,_Tp>&) const; + template + void operator>>= (const _Expr<_Dom,_Tp>&) const; + + private: + _Array<_Tp> _M_array; + const valarray& _M_index; + + friend class valarray<_Tp>; + + gslice_array (_Array<_Tp>, const valarray&); + + // this constructor needs to be implemented. + gslice_array (const gslice_array&); + + // not implemented + gslice_array(); + gslice_array& operator= (const gslice_array&); + }; + + template + inline + gslice_array<_Tp>::gslice_array (_Array<_Tp> __a, + const valarray& __i) + : _M_array (__a), _M_index (__i) {} + + + template + inline + gslice_array<_Tp>::gslice_array (const gslice_array<_Tp>& __a) + : _M_array (__a._M_array), _M_index (__a._M_index) {} + + + template + inline void + gslice_array<_Tp>::operator= (const _Tp& __t) + { + __valarray_fill (_M_array, _Array(_M_index), + _M_index.size(), __t); + } + + template + inline void + gslice_array<_Tp>::operator= (const valarray<_Tp>& __v) const + { + __valarray_copy (_Array<_Tp> (__v), __v.size (), + _M_array, _Array(_M_index)); + } + + template + template + inline void + gslice_array<_Tp>::operator= (const _Expr& __e) const + { + __valarray_copy (__e, _M_index.size(), _M_array, + _Array(_M_index)); + } + +#undef _DEFINE_VALARRAY_OPERATOR +#define _DEFINE_VALARRAY_OPERATOR(op, name) \ +template \ +inline void \ +gslice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ +{ \ + _Array_augmented_##name (_M_array, _Array(_M_index), \ + _Array<_Tp> (__v), __v.size ()); \ +} \ + \ +template template \ +inline void \ +gslice_array<_Tp>::operator op##= (const _Expr& __e) const \ +{ \ + _Array_augmented_##name (_M_array, _Array(_M_index), __e, \ + _M_index.size()); \ +} + +_DEFINE_VALARRAY_OPERATOR(*, multiplies) +_DEFINE_VALARRAY_OPERATOR(/, divides) +_DEFINE_VALARRAY_OPERATOR(%, modulus) +_DEFINE_VALARRAY_OPERATOR(+, plus) +_DEFINE_VALARRAY_OPERATOR(-, minus) +_DEFINE_VALARRAY_OPERATOR(^, xor) +_DEFINE_VALARRAY_OPERATOR(&, and) +_DEFINE_VALARRAY_OPERATOR(|, or) +_DEFINE_VALARRAY_OPERATOR(<<, shift_left) +_DEFINE_VALARRAY_OPERATOR(>>, shift_right) + +#undef _DEFINE_VALARRAY_OPERATOR + +} // std:: + +#endif /* _CPP_BITS_GSLICE_ARRAY */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/indirect_array.h b/contrib/media/updf/include/bits/indirect_array.h new file mode 100644 index 0000000000..e0324b3df2 --- /dev/null +++ b/contrib/media/updf/include/bits/indirect_array.h @@ -0,0 +1,162 @@ +// The template and inlines for the -*- C++ -*- indirect_array class. + +// Copyright (C) 1997-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_INDIRECT_ARRAY_H +#define _CPP_BITS_INDIRECT_ARRAY_H 1 + +#pragma GCC system_header + +namespace std { + + template class indirect_array + { + public: + typedef _Tp value_type; + + void operator= (const valarray<_Tp>&) const; + void operator*= (const valarray<_Tp>&) const; + void operator/= (const valarray<_Tp>&) const; + void operator%= (const valarray<_Tp>&) const; + void operator+= (const valarray<_Tp>&) const; + void operator-= (const valarray<_Tp>&) const; + void operator^= (const valarray<_Tp>&) const; + void operator&= (const valarray<_Tp>&) const; + void operator|= (const valarray<_Tp>&) const; + void operator<<= (const valarray<_Tp>&) const; + void operator>>= (const valarray<_Tp>&) const; + void operator= (const _Tp&); + // ~indirect_array(); + + template + void operator= (const _Expr<_Dom, _Tp>&) const; + template + void operator*= (const _Expr<_Dom, _Tp>&) const; + template + void operator/= (const _Expr<_Dom, _Tp>&) const; + template + void operator%= (const _Expr<_Dom, _Tp>&) const; + template + void operator+= (const _Expr<_Dom, _Tp>&) const; + template + void operator-= (const _Expr<_Dom, _Tp>&) const; + template + void operator^= (const _Expr<_Dom, _Tp>&) const; + template + void operator&= (const _Expr<_Dom, _Tp>&) const; + template + void operator|= (const _Expr<_Dom, _Tp>&) const; + template + void operator<<= (const _Expr<_Dom, _Tp>&) const; + template + void operator>>= (const _Expr<_Dom, _Tp>&) const; + + private: + indirect_array (const indirect_array&); + indirect_array (_Array<_Tp>, size_t, _Array); + + friend class valarray<_Tp>; + friend class gslice_array<_Tp>; + + const size_t _M_sz; + const _Array _M_index; + const _Array<_Tp> _M_array; + + // not implemented + indirect_array (); + indirect_array& operator= (const indirect_array&); + }; + + template + inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a) + : _M_sz (__a._M_sz), _M_index (__a._M_index), + _M_array (__a._M_array) {} + + template + inline + indirect_array<_Tp>::indirect_array (_Array<_Tp> __a, size_t __s, + _Array __i) + : _M_sz (__s), _M_index (__i), _M_array (__a) {} + + // template + // inline indirect_array<_Tp>::~indirect_array() {} + + template + inline void + indirect_array<_Tp>::operator= (const _Tp& __t) + { __valarray_fill(_M_array, _M_index, _M_sz, __t); } + + template + inline void + indirect_array<_Tp>::operator= (const valarray<_Tp>& __v) const + { __valarray_copy (_Array<_Tp> (__v), _M_sz, _M_array, _M_index); } + + template + template + inline void + indirect_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const + { __valarray_copy (__e, _M_sz, _M_array, _M_index); } + +#undef _DEFINE_VALARRAY_OPERATOR +#define _DEFINE_VALARRAY_OPERATOR(op, name) \ +template \ +inline void \ +indirect_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ +{ \ + _Array_augmented_##name (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); \ +} \ + \ +template template \ +inline void \ +indirect_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \ +{ \ + _Array_augmented_##name (_M_array, _M_index, __e, _M_sz); \ +} + +_DEFINE_VALARRAY_OPERATOR(*, multiplies) +_DEFINE_VALARRAY_OPERATOR(/, divides) +_DEFINE_VALARRAY_OPERATOR(%, modulus) +_DEFINE_VALARRAY_OPERATOR(+, plus) +_DEFINE_VALARRAY_OPERATOR(-, minus) +_DEFINE_VALARRAY_OPERATOR(^, xor) +_DEFINE_VALARRAY_OPERATOR(&, and) +_DEFINE_VALARRAY_OPERATOR(|, or) +_DEFINE_VALARRAY_OPERATOR(<<, shift_left) +_DEFINE_VALARRAY_OPERATOR(>>, shift_right) + +#undef _DEFINE_VALARRAY_OPERATOR + +} // std:: + +#endif /* _CPP_BITS_INDIRECT_ARRAY_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/ios_base.h b/contrib/media/updf/include/bits/ios_base.h new file mode 100644 index 0000000000..381e1cb00d --- /dev/null +++ b/contrib/media/updf/include/bits/ios_base.h @@ -0,0 +1,569 @@ +// Iostreams base classes -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8 File-based streams +// + +#ifndef _CPP_BITS_IOSBASE_H +#define _CPP_BITS_IOSBASE_H 1 + +#pragma GCC system_header + +namespace std +{ + // The following definitions of bitmask types are enums, not ints, + // as permitted (but not required) in the standard, in order to provide + // better type safety in iostream calls. A side effect is that + // expressions involving them are no longer compile-time constants. + enum _Ios_Fmtflags { _M_ios_fmtflags_end = 1L << 16 }; + + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Fmtflags + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline _Ios_Fmtflags + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline _Ios_Fmtflags + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + + enum _Ios_Openmode { _M_ios_openmode_end = 1L << 16 }; + + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Openmode + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline _Ios_Openmode + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline _Ios_Openmode + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + + enum _Ios_Iostate { _M_ios_iostate_end = 1L << 16 }; + + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Iostate + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline _Ios_Iostate + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline _Ios_Iostate + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + enum _Ios_Seekdir { _M_ios_seekdir_end = 1L << 16 }; + + // 27.4.2 Class ios_base + class ios_base + { + public: + + // 27.4.2.1.1 Class ios_base::failure + class failure : public exception + { + public: +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // Can't do exception(_msg) as defined in 27.4.2.1.1 + explicit + failure(const string& __str) throw(); + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + + private: + enum { _M_bufsize = 256 }; + char _M_name[_M_bufsize]; +#endif + }; + + // 27.4.2.1.2 Type ios_base::fmtflags + typedef _Ios_Fmtflags fmtflags; + // 27.4.2.1.2 Type fmtflags + static const fmtflags boolalpha = fmtflags(__ios_flags::_S_boolalpha); + static const fmtflags dec = fmtflags(__ios_flags::_S_dec); + static const fmtflags fixed = fmtflags(__ios_flags::_S_fixed); + static const fmtflags hex = fmtflags(__ios_flags::_S_hex); + static const fmtflags internal = fmtflags(__ios_flags::_S_internal); + static const fmtflags left = fmtflags(__ios_flags::_S_left); + static const fmtflags oct = fmtflags(__ios_flags::_S_oct); + static const fmtflags right = fmtflags(__ios_flags::_S_right); + static const fmtflags scientific = fmtflags(__ios_flags::_S_scientific); + static const fmtflags showbase = fmtflags(__ios_flags::_S_showbase); + static const fmtflags showpoint = fmtflags(__ios_flags::_S_showpoint); + static const fmtflags showpos = fmtflags(__ios_flags::_S_showpos); + static const fmtflags skipws = fmtflags(__ios_flags::_S_skipws); + static const fmtflags unitbuf = fmtflags(__ios_flags::_S_unitbuf); + static const fmtflags uppercase = fmtflags(__ios_flags::_S_uppercase); + static const fmtflags adjustfield = fmtflags(__ios_flags::_S_adjustfield); + static const fmtflags basefield = fmtflags(__ios_flags::_S_basefield); + static const fmtflags floatfield = fmtflags(__ios_flags::_S_floatfield); + + // 27.4.2.1.3 Type ios_base::iostate + typedef _Ios_Iostate iostate; + static const iostate badbit = iostate(__ios_flags::_S_badbit); + static const iostate eofbit = iostate(__ios_flags::_S_eofbit); + static const iostate failbit = iostate(__ios_flags::_S_failbit); + static const iostate goodbit = iostate(0); + + // 27.4.2.1.4 Type openmode + typedef _Ios_Openmode openmode; + static const openmode app = openmode(__ios_flags::_S_app); + static const openmode ate = openmode(__ios_flags::_S_ate); + static const openmode binary = openmode(__ios_flags::_S_bin); + static const openmode in = openmode(__ios_flags::_S_in); + static const openmode out = openmode(__ios_flags::_S_out); + static const openmode trunc = openmode(__ios_flags::_S_trunc); + + // 27.4.2.1.5 Type seekdir + typedef _Ios_Seekdir seekdir; + static const seekdir beg = seekdir(0); + static const seekdir cur = seekdir(SEEK_CUR); + static const seekdir end = seekdir(SEEK_END); + +#ifdef _GLIBCPP_DEPRECATED + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; +#endif + + // Callbacks; + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; + + typedef void (*event_callback) (event, ios_base&, int); + + void + register_callback(event_callback __fn, int __index); + + protected: + // Data Members + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + + // 27.4.2.6 Members for callbacks + // 27.4.2.6 ios_base callbacks + struct _Callback_list + { + // Data Members + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + int _M_refcount; // 0 means one reference. + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { ++_M_refcount; } // XXX MT + + int + _M_remove_reference() { return _M_refcount--; } // 0 => OK to delete + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void); + + // 27.4.2.5 Members for iword/pword storage + struct _Words + { + void* _M_pword; + long _M_iword; + }; + + static const int _S_local_words = 8; + _Words _M_word_array[_S_local_words]; // Guaranteed storage + _Words _M_dummy; // Only for failed iword/pword calls. + _Words* _M_words; + int _M_word_limit; + + _Words& + _M_grow_words(int __index); + + // Members for locale and locale caching. + locale _M_ios_locale; + + void + _M_init(); + + public: + + // 27.4.2.1.6 Class ios_base::Init + // Used to initialize standard streams. In theory, g++ could use + // -finit-priority to order this stuff correctly without going + // through these machinations. + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + static void + _S_ios_create(bool __sync); + + static void + _S_ios_destroy(); + + private: + static int _S_ios_base_init; + static bool _S_synced_with_stdio; + }; + + // Fmtflags state: + inline fmtflags + flags() const { return _M_flags; } + + inline fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } + + inline fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } + + inline fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + inline void + unsetf(fmtflags __mask) { _M_flags &= ~__mask; } + + inline streamsize + precision() const { return _M_precision; } + + inline streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + inline streamsize + width() const { return _M_width; } + + inline streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } + + static bool + sync_with_stdio(bool __sync = true); + + // Locales: + locale + imbue(const locale& __loc); + + inline locale + getloc() const { return _M_ios_locale; } + + // Storage: + static int + xalloc() throw(); + + inline long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_limit) + ? _M_words[__ix] : _M_grow_words(__ix); + return __word._M_iword; + } + + inline void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_limit) + ? _M_words[__ix] : _M_grow_words(__ix); + return __word._M_pword; + } + + // Destructor + ~ios_base(); + + protected: + ios_base(); + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + private: + ios_base(const ios_base&); + + ios_base& + operator=(const ios_base&); +#endif + }; + + // 27.4.5.1 fmtflags manipulators: + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + // 27.4.5.2 adjustfield anipulators: + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + // 27.4.5.3 basefield anipulators: + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + // 27.4.5.4 floatfield anipulators: + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + +} // namespace std + +#endif /* _CPP_BITS_IOSBASE_H */ + diff --git a/contrib/media/updf/include/bits/istream.tcc b/contrib/media/updf/include/bits/istream.tcc new file mode 100644 index 0000000000..3d942b2feb --- /dev/null +++ b/contrib/media/updf/include/bits/istream.tcc @@ -0,0 +1,1239 @@ +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.6.2 Output streams +// + +#include +#include // for flush() + +namespace std +{ + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskipws) + { + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskipws && (__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + const __ctype_type* __ctype = __in._M_get_fctype_ios(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + while (__c != __eof && __ctype->is(ctype_base::space, __c)) + __c = __sb->snextc(); + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//195. Should basic_istream::sentry's constructor ever set eofbit? + if (__c == __eof) + __in.setstate(ios_base::eofbit); +#endif + } + } + + if (__in.good()) + _M_ok = true; + else + { + _M_ok = false; + __in.setstate(ios_base::failbit); + } + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__istream_type& (*__pf)(__istream_type&)) + { + __pf(*this); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(bool& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(unsigned short& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(unsigned int& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(long& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(unsigned long& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + +#ifdef _GLIBCPP_USE_LONG_LONG + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(long long& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(unsigned long long& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } +#endif + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(float& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(double& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(long double& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(void*& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + try + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (_M_check_facet(_M_fnumget)) + _M_fnumget->get(*this, 0, *this, __err, __n); + this->setstate(__err); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + streamsize __xtrct = 0; + __streambuf_type* __sbin = this->rdbuf(); + sentry __cerb(*this, false); + if (__sbout && __cerb) + __xtrct = __copy_streambufs(*this, __sbin, __sbout); + if (!__sbout || !__xtrct) + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + // 27.6.1.1 paragraph 3 + if (__c != __eof) + _M_gcount = 1; + else + this->setstate(ios_base::eofbit | ios_base::failbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __eof = traits_type::eof(); + int_type __bufval = this->rdbuf()->sbumpc(); + // 27.6.1.1 paragraph 3 + if (__bufval != __eof) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__bufval); + } + else + this->setstate(ios_base::eofbit | ios_base::failbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 1) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sbumpc(); + bool __testdelim = __c == __idelim; + bool __testeof = __c == __eof; + + while (_M_gcount < __n - 1 && !__testeof && !__testdelim) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testdelim = __c == __idelim; + } + if (__testdelim || _M_gcount == __n - 1) + __sb->sputbackc(__c); + if (__testeof) + this->setstate(ios_base::eofbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + *__s = char_type(); + if (!_M_gcount) + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + int_type __c; + __streambuf_type* __this_sb = this->rdbuf(); + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __c = __this_sb->sbumpc(); + bool __testdelim = __c == __idelim; + bool __testeof = __c == __eof; + bool __testput = true; + + while (!__testeof && !__testdelim + && (__testput = __sb.sputc(traits_type::to_char_type(__c)) + != __eof)) + { + ++_M_gcount; + __c = __this_sb->sbumpc(); + __testeof = __c == __eof; + __testdelim = __c == __idelim; + } + if (__testdelim || !__testput) + __this_sb->sputbackc(traits_type::to_char_type(__c)); + if (__testeof) + this->setstate(ios_base::eofbit); + } + catch(exception& __fail) + { + // Exception may result from sputc->overflow. + __this_sb->sputbackc(traits_type::to_char_type(__c)); + } + } + if (!_M_gcount) + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sbumpc(); + ++_M_gcount; + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + bool __testdelim = __c == __idelim; + bool __testeof = __c == __eof; + + while (_M_gcount < __n && !__testeof && !__testdelim) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->sbumpc(); + ++_M_gcount; + __testeof = __c == __eof; + __testdelim = __c == __idelim; + } + + if (__testeof) + { + --_M_gcount; + this->setstate(ios_base::eofbit); + } + else if (!__testdelim) + { + --_M_gcount; + __sb->sputbackc(traits_type::to_char_type(__c)); + this->setstate(ios_base::failbit); + } + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + *__s = char_type(); + if (!_M_gcount) + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sbumpc(); + bool __testdelim = __c == __idelim; + bool __testeof = __c == __eof; + + __n = min(__n, numeric_limits::max()); + while (_M_gcount < __n - 1 && !__testeof && !__testdelim) + { + ++_M_gcount; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testdelim = __c == __idelim; + } + if ((_M_gcount == __n - 1 && !__testeof) || __testdelim) + ++_M_gcount; + if (__testeof) + this->setstate(ios_base::eofbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { __c = this->rdbuf()->sgetc(); } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + if (__n > 0) + { + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sbumpc(); + bool __testeof = __c == __eof; + + while (_M_gcount < __n - 1 && !__testeof) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + } + if (__testeof) + this->setstate(ios_base::eofbit | ios_base::failbit); + else + { + // _M_gcount == __n - 1 + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + } + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + } + else + this->setstate(ios_base::failbit); + return *this; + } + + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + const int_type __eof = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + if (__n > 0) + { + try + { + streamsize __num = this->rdbuf()->in_avail(); + if (__num != static_cast(__eof)) + { + __num = min(__num, __n); + _M_gcount = this->rdbuf()->sgetn(__s, __num); + } + else + this->setstate(ios_base::eofbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + } + else + this->setstate(ios_base::failbit); + return _M_gcount; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb || __sb->sputbackc(__c) == __eof) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + else + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb || __eof == __sb->sungetc()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + else + this->setstate(ios_base::failbit); + return *this; + } + + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + int __ret = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __streambuf_type* __sb = this->rdbuf(); + if (!__sb || __ret == __sb->pubsync()) + this->setstate(ios_base::badbit); + else + __ret = 0; + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __ret; + } + + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + pos_type __ret = pos_type(-1); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __ret; + } + + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 136. seekp, seekg setting wrong streams? + pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in); + +// 129. Need error indication from seekp() and seekg() + if (__err == pos_type(off_type(-1))) + this->setstate(failbit); +#endif + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + try + { +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 136. seekp, seekg setting wrong streams? + pos_type __err = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + +// 129. Need error indication from seekp() and seekg() + if (__err == pos_type(off_type(-1))) + this->setstate(failbit); +#endif + } + catch(exception& __fail) + { + // 27.6.1.3 paragraph 1 + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + // 27.6.1.2.3 Character extraction templates + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { __in.get(__c); } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __in.setstate(ios_base::badbit); + if ((__in.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + else + __in.setstate(ios_base::failbit); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__streambuf_type __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + streamsize __extracted = 0; + + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + // Figure out how many characters to extract. + streamsize __num = __in.width(); + if (__num == 0) + __num = numeric_limits::max(); + + __streambuf_type* __sb = __in.rdbuf(); + const __ctype_type* __ctype = __in._M_get_fctype_ios(); + int_type __c = __sb->sbumpc(); + const int_type __eof = _Traits::eof(); + bool __testsp = __ctype->is(ctype_base::space, __c); + bool __testeof = __c == __eof; + + while (__extracted < __num - 1 && !__testeof && !__testsp) + { + *__s++ = __c; + ++__extracted; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testsp = __ctype->is(ctype_base::space, __c); + } + + if (!__testeof) + __sb->sputbackc(__c); + else + __in.setstate(ios_base::eofbit); + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//68. Extractors for char* should store null at end + *__s = char_type(); +#endif + __in.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __in.setstate(ios_base::badbit); + if ((__in.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + if (!__extracted) + __in.setstate(ios_base::failbit); + return __in; + } + + // 27.6.1.4 Standard basic_istream manipulators + template + basic_istream<_CharT,_Traits>& + ws(basic_istream<_CharT,_Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__streambuf_type __streambuf_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename __istream_type::int_type __int_type; + typedef typename __istream_type::char_type __char_type; + + __streambuf_type* __sb = __in.rdbuf(); + const __ctype_type* __ctype = __in._M_get_fctype_ios(); + const __int_type __eof = _Traits::eof(); + __int_type __c; + bool __testeof; + bool __testsp; + + do + { + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testsp = __ctype->is(ctype_base::space, __c); + } + while (!__testeof && __testsp); + + if (!__testeof && !__testsp) + __sb->sputbackc(__c); + else + __in.setstate(ios_base::eofbit); + + return __in; + } + + // 21.3.7.9 basic_string::getline and operators + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typedef typename __istream_type::__streambuf_type __streambuf_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __size_type __extracted = 0; + + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + __str.erase(); + streamsize __w = __in.width(); + __size_type __n; + __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); + + __streambuf_type* __sb = __in.rdbuf(); + const __ctype_type* __ctype = __in._M_get_fctype_ios(); + __int_type __c = __sb->sbumpc(); + const __int_type __eof = _Traits::eof(); + bool __testsp = __ctype->is(ctype_base::space, __c); + bool __testeof = __c == __eof; + + while (__extracted < __n && !__testeof && !__testsp) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testsp = __ctype->is(ctype_base::space, __c); + } + if (!__testeof) + __sb->sputbackc(__c); + else + __in.setstate(ios_base::eofbit); + __in.width(0); + } +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 2000-02-01 Number to be determined + if (!__extracted) + __in.setstate (ios_base::failbit); +#endif + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typedef typename __istream_type::__streambuf_type __streambuf_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + bool __testdelim = false; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + __str.erase(); + __size_type __n = __str.max_size(); + + __int_type __idelim = _Traits::to_int_type(__delim); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sbumpc(); + const __int_type __eof = _Traits::eof(); + __testdelim = __c == __idelim; + bool __testeof = __c == __eof; + + while (__extracted <= __n && !__testeof && !__testdelim) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->sbumpc(); + __testeof = __c == __eof; + __testdelim = __c == __idelim; + } + if (__testeof) + __in.setstate(ios_base::eofbit); + } + if (!__extracted && !__testdelim) + __in.setstate(ios_base::failbit); + return __in; + } + + template + inline basic_istream<_CharT,_Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT,_Traits,_Alloc>& __str) + { return getline(__in, __str, __in.widen('\n')); } +} // namespace std + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/limits_generic.h b/contrib/media/updf/include/bits/limits_generic.h new file mode 100644 index 0000000000..8ad003340b --- /dev/null +++ b/contrib/media/updf/include/bits/limits_generic.h @@ -0,0 +1,788 @@ +// The template and inlines for the -*- C++ -*- numeric_limits classes. + +// Copyright (C) 2000-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Note: this is not a conforming implementation. +// Written by Gabriel Dos Reis + +// +// ISO 14882:1998 +// 18.2.1 +// + +#ifndef _CPP_NUMERIC_LIMITS +#define _CPP_NUMERIC_LIMITS 1 + +#pragma GCC system_header + +#include +#include +#include +#if defined( _GLIBCPP_USE_WCHAR_T) +#include +#endif + +namespace std { + + enum float_round_style { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + enum float_denorm_style { + denorm_indeterminate = -1, + denorm_absent = 0, + denorm_present = 1 + }; + + template struct numeric_limits { + static const bool is_specialized = false; + + static _T min() throw() { return static_cast<_T>(0); } + static _T max() throw() { return static_cast<_T>(0); } + + static const int digits = 0; + static const int digits10 = 0; + static const bool is_signed = false; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 0; + + static _T epsilon() throw() { return static_cast<_T>(0); } + static _T round_error() throw() { return static_cast<_T>(0); } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static _T infinity() throw() { return static_cast<_T>(0); } + static _T quiet_NaN() throw() { return static_cast<_T>(0); } + static _T signaling_NaN() throw() { return static_cast<_T>(0); } + static _T denorm_min() throw() { return static_cast<_T>(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = false; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template _T __limits_infinity(); + template _T __limits_quiet_NaN(); + template _T __limits_signaling_NaN(); + template _T __limits_denorm_min(); + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + + static const int digits = 1; + static const int digits10 = 0; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return 0; } + static bool round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static bool infinity() throw() + { return static_cast(0); } + static bool quiet_NaN() throw() + { return static_cast(0); } + static bool signaling_NaN() throw() + { return static_cast(0); } + static bool denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static char min() throw() + { return CHAR_MIN; } + static char max() throw() + { return CHAR_MAX; } + + static const int digits = 7; + static const int digits10 = 2; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static char infinity() throw() + { return static_cast(0); } + static char quiet_NaN() throw() + { return static_cast(0); } + static char signaling_NaN() throw() + { return static_cast(0); } + static char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static signed char min() throw() + { return SCHAR_MIN; } + static signed char max() throw() + { return SCHAR_MAX; } + + static const int digits = 7; + static const int digits10 = 2; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return UCHAR_MAX; } + + static const int digits = 8; + static const int digits10 = 2; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + +#if defined( _GLIBCPP_USE_WCHAR_T) + template<> struct numeric_limits { + static const bool is_specialized = true; + + static wchar_t min() throw() + { return WCHAR_MIN; } + static wchar_t max() throw() + { return WCHAR_MAX; } + + static const int digits = 31; + static const int digits10 = 9; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t infinity() throw() + { return static_cast(0); } + static wchar_t quiet_NaN() throw() + { return static_cast(0); } + static wchar_t signaling_NaN() throw() + { return static_cast(0); } + static wchar_t denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; +#endif + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static short min() throw() + { return SHRT_MIN; } + static short max() throw() + { return SHRT_MAX; } + + static const int digits = 15; + static const int digits10 = 4; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static short infinity() throw() + { return static_cast(0); } + static short quiet_NaN() throw() + { return static_cast(0); } + static short signaling_NaN() throw() + { return static_cast(0); } + static short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return USHRT_MAX; } + + static const int digits = 16; + static const int digits10 = 4; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static int min() throw() + { return INT_MIN; } + static int max() throw() + { return INT_MAX; } + + static const int digits = 31; + static const int digits10 = 9; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = true; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return UINT_MAX; } + + static const int digits = 32; + static const int digits10 = 9; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = true; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static long min() throw() + { return LONG_MIN; } + static long max() throw() + { return LONG_MAX; } + + static const int digits = 31; + static const int digits10 = 9; + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = true; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return ULONG_MAX; } + + static const int digits = 32; + static const int digits10 = 9; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = true; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static float min() throw() + { return FLT_MIN; } + static float max() throw() + { return FLT_MAX; } + + static const int digits = FLT_MANT_DIG; + static const int digits10 = FLT_DIG; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = FLT_RADIX; + static float epsilon() throw() + { return FLT_EPSILON; } + static float round_error() throw() + { return FLT_ROUNDS; } + + static const int min_exponent = FLT_MIN_EXP; + static const int min_exponent10 = FLT_MIN_10_EXP; + static const int max_exponent = FLT_MAX_EXP; + static const int max_exponent10 = FLT_MAX_10_EXP; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static float infinity() throw() + { return static_cast(0); } + static float quiet_NaN() throw() + { return static_cast(0); } + static float signaling_NaN() throw() + { return static_cast(0); } + static float denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static double min() throw() + { return DBL_MIN; } + static double max() throw() + { return DBL_MAX; } + + static const int digits = DBL_MANT_DIG; + static const int digits10 = DBL_DIG; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return DBL_EPSILON; } + static double round_error() throw() + { return 1.0; } + + static const int min_exponent = DBL_MIN_EXP; + static const int min_exponent10 = DBL_MIN_10_EXP; + static const int max_exponent = DBL_MAX_EXP; + static const int max_exponent10 = DBL_MAX_10_EXP; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return static_cast(0); } + static double quiet_NaN() throw() + { return static_cast(0); } + static double signaling_NaN() throw() + { return static_cast(0); } + static double denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + template<> struct numeric_limits { + static const bool is_specialized = true; + + static double min() throw() + { return LDBL_MIN; } + static double max() throw() + { return LDBL_MAX; } + + static const int digits = LDBL_MANT_DIG; + static const int digits10 = LDBL_DIG; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return LDBL_EPSILON; } + static double round_error() throw() + { return 1.0L; } + + static const int min_exponent = LDBL_MIN_EXP; + static const int min_exponent10 = LDBL_MIN_10_EXP; + static const int max_exponent = LDBL_MAX_EXP; + static const int max_exponent10 = LDBL_MAX_10_EXP; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return static_cast(0); } + static double quiet_NaN() throw() + { return static_cast(0); } + static double signaling_NaN() throw() + { return static_cast(0); } + static double denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + +} // namespace std + +#endif // _CPP_NUMERIC_LIMITS diff --git a/contrib/media/updf/include/bits/locale_facets.h b/contrib/media/updf/include/bits/locale_facets.h new file mode 100644 index 0000000000..cb249f8c51 --- /dev/null +++ b/contrib/media/updf/include/bits/locale_facets.h @@ -0,0 +1,1601 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 22.1 Locales +// + +// Warning: this file is not meant for user inclusion. Use . + +#ifndef _CPP_BITS_LOCFACETS_H +#define _CPP_BITS_LOCFACETS_H 1 + +#pragma GCC system_header + +#include // For struct tm +#include // For ios_base +#ifdef _GLIBCPP_USE_WCHAR_T +# include // For codecvt +# include // For wctype_t +# include // For codecvt using iconv, iconv_t +#endif + +namespace std +{ + // 22.2.1.1 Template class ctype + // Include host-specific ctype enums for ctype_base. + #include + + // __ctype_abstract_base is the common base for ctype<_CharT>. + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + // Types: + typedef _CharT char_type; + + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } + + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } + + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } + + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } + + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + + char_type + widen(char __c) const + { return this->do_widen(__c); } + + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } + + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } + + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + + protected: + explicit + __ctype_abstract_base(size_t __refs = 0): locale::facet(__refs) { } + + virtual + ~__ctype_abstract_base() { } + + virtual bool + do_is(mask __m, char_type __c) const = 0; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + + virtual char_type + do_toupper(char_type) const = 0; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; + + virtual char_type + do_tolower(char_type) const = 0; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; + + virtual char_type + do_widen(char) const = 0; + + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; + + virtual char + do_narrow(char_type, char __dfault) const = 0; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; + + // NB: Generic, mostly useless implementation. + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + // Types: + typedef _CharT char_type; + typedef typename ctype::mask mask; + + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + + static locale::id id; + + protected: + virtual + ~ctype() { } + + virtual bool + do_is(mask __m, char_type __c) const + { return false; } + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const + { return __hi; } + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return __hi; } + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const + { return __hi; } + + virtual char_type + do_toupper(char_type __c) const + { return __c; } + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const + { return __hi; } + + virtual char_type + do_tolower(char_type __c) const + { return __c; } + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const + { return __hi; } + + virtual char_type + do_widen(char __c) const + { return char_type(); } + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { return __hi; } + + virtual char + do_narrow(char_type, char __dfault) const + { return __dfault; } + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const + { return __hi; } + }; + + template + locale::id ctype<_CharT>::id; + + // 22.2.1.3 ctype specializations + template<> + class ctype : public __ctype_abstract_base + { + public: + // Types: + typedef char char_type; + + private: + // Data Members: + bool _M_del; + __to_type const& _M_toupper; + __to_type const& _M_tolower; + const mask* const& _M_ctable; + const mask* _M_table; + + public: + static locale::id id; + static const size_t table_size = 1 + static_cast(-1); + + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); + + inline bool + is(mask __m, char __c) const; + + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; + + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; + + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; + + protected: + virtual + ~ctype(); + + const mask* + table() const throw() + { return _M_table; } + + const mask* + classic_table() throw() + { return _M_ctable; } + + virtual bool + do_is(mask __m, char_type __c) const; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + + virtual char_type + do_toupper(char_type) const; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_tolower(char_type) const; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_widen(char) const; + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + + virtual char + do_narrow(char_type, char __dfault) const; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + + template<> + const ctype& + use_facet >(const locale& __loc); + +#ifdef _GLIBCPP_USE_WCHAR_T + // ctype specialization + template<> + class ctype : public __ctype_abstract_base + { + public: + // Types: + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + + // Data Members: + static locale::id id; + + explicit + ctype(size_t __refs = 0); + + protected: + __wmask_type + _M_convert_to_wmask(const mask __m) const; + + virtual + ~ctype(); + + virtual bool + do_is(mask __m, char_type __c) const; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + + virtual char_type + do_toupper(char_type) const; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_tolower(char_type) const; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_widen(char) const; + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + + virtual char + do_narrow(char_type, char __dfault) const; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + + }; + + template<> + const ctype& + use_facet >(const locale& __loc); +#endif //_GLIBCPP_USE_WCHAR_T + + // Include host-specific ctype inlines. + #include + + // 22.2.1.2 Template class ctype_byname + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef _CharT char_type; + + explicit + ctype_byname(const char*, size_t __refs = 0); + + protected: + virtual + ~ctype_byname() { } + }; + + // 22.2.1.4 Class ctype_byname specialization + template<> + ctype_byname::ctype_byname(const char*, size_t refs); + + + // 22.2.1.5 Template class codecvt + #include + + template + class _Numeric_get; // forward + + // _Format_cache holds the information extracted from the numpunct<> + // and moneypunct<> facets in a form optimized for parsing and + // formatting. It is stored via a void* pointer in the pword() + // array of an iosbase object passed to the _get and _put facets. + // NB: contains no user-serviceable parts. + template + class _Format_cache + { + public: + // Types: + typedef _CharT char_type; + typedef char_traits<_CharT> traits_type; + typedef basic_string<_CharT> string_type; + typedef typename string_type::size_type size_type; + + // Forward decls and Friends: + friend class locale; + template + friend class _Numeric_get; + friend class num_get<_CharT>; + friend class num_put<_CharT>; + friend class time_get<_CharT>; + friend class money_get<_CharT>; + friend class time_put<_CharT>; + friend class money_put<_CharT>; + + // Data Members: + + // ios_base::pword() reserved cell + static int _S_pword_ix; + + // True iff data members are consistent with the current locale, + // ie imbue sets this to false. + bool _M_valid; + + // A list of valid numeric literals: for the standard "C" locale, + // this would usually be: "-+xX0123456789abcdef0123456789ABCDEF" + static const char _S_literals[]; + + // NB: Code depends on the order of definitions of the names + // these are indices into _S_literals, above. + // This string is formatted for putting, not getting. (output, not input) + enum + { + _S_minus, + _S_plus, + _S_x, + _S_X, + _S_digits, + _S_digits_end = _S_digits + 16, + _S_udigits = _S_digits_end, + _S_udigits_end = _S_udigits + 16, + _S_ee = _S_digits + 14, // For scientific notation, 'E' + _S_Ee = _S_udigits + 14 // For scientific notation, 'e' + }; + + // The sign used to separate decimal values: for standard US + // locales, this would usually be: "." + // Abstracted from numpunct::decimal_point(). + char_type _M_decimal_point; + + // The sign used to separate groups of digits into smaller + // strings that the eye can parse with less difficulty: for + // standard US locales, this would usually be: "," + // Abstracted from numpunct::thousands_sep(). + char_type _M_thousands_sep; + + // However the US's "false" and "true" are translated. + // From numpunct::truename() and numpunct::falsename(), respectively. + string_type _M_truename; + string_type _M_falsename; + + // If we are checking groupings. This should be equivalent to + // numpunct::groupings().size() != 0 + bool _M_use_grouping; + + // If we are using numpunct's groupings, this is the current + // grouping string in effect (from numpunct::grouping()). + string _M_grouping; + + _Format_cache(); + + ~_Format_cache() throw() { } + + // Given a member of the ios heirarchy as an argument, extract + // out all the current formatting information into a + // _Format_cache object and return a pointer to it. + static _Format_cache<_CharT>* + _S_get(ios_base& __ios); + + void + _M_populate(ios_base&); + + static void + _S_callback(ios_base::event __event, ios_base& __ios, int __ix) throw(); + }; + + template + int _Format_cache<_CharT>::_S_pword_ix; + + template + const char _Format_cache<_CharT>:: + _S_literals[] = "-+xX0123456789abcdef0123456789ABCDEF"; + + template<> _Format_cache::_Format_cache(); +#ifdef _GLIBCPP_USE_WCHAR_T + template<> _Format_cache::_Format_cache(); +#endif + + // _Numeric_get is used by num_get, money_get, and time_get to help + // in parsing out numbers. + template + class _Numeric_get + { + public: + // Types: + typedef _CharT char_type; + typedef _InIter iter_type; + + // Forward decls and Friends: + template + friend class num_get; + template + friend class time_get; + template + friend class money_get; + template + friend class num_put; + template + friend class time_put; + template + friend class money_put; + + private: + explicit + _Numeric_get() { } + + virtual + ~_Numeric_get() { } + + iter_type + _M_get_digits(iter_type __in, iter_type __end) const; + }; + + template + class num_get : public locale::facet + { + public: + // Types: + typedef _CharT char_type; + typedef _InIter iter_type; + typedef char_traits<_CharT> __traits_type; + + static locale::id id; + + explicit + num_get(size_t __refs = 0) : locale::facet(__refs) { } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return do_get(__in, __end, __io, __err, __v); } + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, short& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, int& __v) const + { return do_get(__in, __end, __io, __err, __v); } +#endif + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return do_get(__in, __end, __io, __err, __v); } + +#ifdef _GLIBCPP_USE_LONG_LONG + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return do_get(__in, __end, __io, __err, __v); } +#endif + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return do_get(__in, __end, __io, __err, __v); } + +#ifdef _GLIBCPP_USE_LONG_LONG + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return do_get(__in, __end, __io, __err, __v); } +#endif + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return do_get(__in, __end, __io, __err, __v); } + + protected: + virtual ~num_get() { } + + // This consolidates the extraction, storage and + // error-processing parts of the do_get(...) overloaded member + // functions. + // NB: This is specialized for char. + void + _M_extract(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, char* __xtrc, + int& __base, bool __fp = true) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, short&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, int&) const; +#endif + virtual iter_type + do_get (iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const; +#ifdef _GLIBCPP_USE_LONG_LONG + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long long&) const; +#endif + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + unsigned short&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& __err, unsigned int&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& __err, unsigned long&) const; +#ifdef _GLIBCPP_USE_LONG_LONG + virtual iter_type + do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& __err, unsigned long long&) const; +#endif + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& __err, long double&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; + }; + + template + locale::id num_get<_CharT, _InIter>::id; + + // Declare specialized extraction member function. + template<> + void + num_get >:: + _M_extract(istreambuf_iterator __beg, + istreambuf_iterator __end, ios_base& __io, + ios_base::iostate& __err, char* __xtrc, + int& __base, bool __fp) const; + + // _Numeric_put is used by num_put, money_put, and time_put + // to help in formatting out numbers. + template + class _Numeric_put + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + protected: + explicit + _Numeric_put() { } + + virtual + ~_Numeric_put() { } + }; + + template + class num_put : public locale::facet + { + public: + // Types: + typedef _CharT char_type; + typedef _OutIter iter_type; + + static locale::id id; + + explicit + num_put(size_t __refs = 0) : locale::facet(__refs) { } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return do_put(__s, __f, __fill, __v); } + +#ifdef _GLIBCPP_USE_LONG_LONG + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return do_put(__s, __f, __fill, __v); } +#endif + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return do_put(__s, __f, __fill, __v); } + + protected: + virtual + ~num_put() { }; + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long __v) const; + +#ifdef _GLIBCPP_USE_LONG_LONG + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long long __v) const; +#endif + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, unsigned long) const; + +#ifdef _GLIBCPP_USE_LONG_LONG + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const; +#endif + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + }; + + template + locale::id num_put<_CharT, _OutIter>::id; + + template + class numpunct : public locale::facet + { + public: + // Types: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static locale::id id; + + private: + char_type _M_decimal_point; + char_type _M_thousands_sep; + string _M_grouping; + string_type _M_truename; + string_type _M_falsename; + + public: + explicit + numpunct(size_t __refs = 0) : locale::facet(__refs) + { _M_initialize_numpunct(); } + + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs) + { _M_initialize_numpunct(__cloc); } + + char_type + decimal_point() const + { return do_decimal_point(); } + + char_type + thousands_sep() const + { return do_thousands_sep(); } + + string + grouping() const + { return do_grouping(); } + + string_type + truename() const + { return do_truename(); } + + string_type + falsename() const + { return do_falsename(); } + + protected: + virtual + ~numpunct() { } + + virtual char_type + do_decimal_point() const + { return _M_decimal_point; } + + virtual char_type + do_thousands_sep() const + { return _M_thousands_sep; } + + virtual string + do_grouping() const + { return _M_grouping; } + + virtual string_type + do_truename() const + { return _M_truename; } + + virtual string_type + do_falsename() const + { return _M_falsename; } + + // For use at construction time only. + void + _M_initialize_numpunct(__c_locale __cloc = NULL); + }; + + template + locale::id numpunct<_CharT>::id; + + template + void + numpunct<_CharT>::_M_initialize_numpunct(__c_locale /*__cloc*/) + { + // NB: Cannot be made generic. + } + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); +#endif + + + template + class numpunct_byname : public numpunct<_CharT> + { + __c_locale _M_c_locale_numpunct; + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + _S_create_c_locale(_M_c_locale_numpunct, __s); + _M_initialize_numpunct(_M_c_locale_numpunct); + } + + protected: + virtual + ~numpunct_byname() + { _S_destroy_c_locale(_M_c_locale_numpunct); } + }; + + + template + class collate : public locale::facet + { + public: + // Types: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static locale::id id; + + explicit + collate(size_t __refs = 0) : locale::facet(__refs) { } + + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } + + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } + + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + protected: + ~collate() { } // virtual + + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; + + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; + + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + // Required specializations. + template<> + int + collate::do_compare(const char* __lo1, const char* __hi1, + const char* __lo2, const char* __hi2) const; + + template<> + string + collate::do_transform(const char* __lo, const char* __hi) const; + + template<> + long + collate::do_hash(const char* __lo, const char* __hi) const; +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + int + collate::do_compare(const wchar_t* __lo1, const wchar_t* __hi1, + const wchar_t* __lo2, + const wchar_t* __hi2) const; + + template<> + wstring + collate::do_transform(const wchar_t* __lo, + const wchar_t* __hi) const; + + template<> + long + collate::do_hash(const wchar_t* __lo, const wchar_t* __hi) const; +#endif + + template + class collate_byname : public collate<_CharT> + { + public: + // Types: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + collate_byname(const char*, size_t __refs = 0); + + protected: + virtual + ~collate_byname() { } + }; + + template<> + collate_byname::collate_byname(const char*, size_t __refs); +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + collate_byname::collate_byname(const char*, size_t __refs); +#endif + + class time_base + { + public: + enum dateorder { no_order, dmy, mdy, ymd, ydm }; + }; + + template + class time_get : public locale::facet, public time_base + { + public: + // Types: + typedef _CharT char_type; + typedef _InIter iter_type; + + static locale::id id; + + explicit + time_get(size_t __refs = 0) + : locale::facet (__refs), _M_daynames(0), _M_monthnames(0) { } + + dateorder + date_order() const + { return do_date_order(); } + + iter_type + get_time(iter_type __s, iter_type __end, ios_base& __f, + ios_base::iostate& __err, tm* __t) const + { return do_get_time(__s, __end, __f, __err, __t); } + + iter_type + get_date(iter_type __s, iter_type __end, ios_base& __f, + ios_base::iostate& __err, tm* __t) const + { return do_get_date(__s, __end, __f, __err, __t); } + + iter_type + get_weekday(iter_type __s, iter_type __end, ios_base& __f, + ios_base::iostate& __err, tm* __t) const + { return do_get_weekday(__s,__end,__f,__err,__t); } + + iter_type + get_monthname(iter_type __s, iter_type __end, ios_base& __f, + ios_base::iostate& __err, tm* __t) const + { return do_get_monthname(__s,__end,__f,__err,__t); } + + iter_type + get_year(iter_type __s, iter_type __end, ios_base& __f, + ios_base::iostate& __err, tm* __t) const + { return do_get_year(__s,__end,__f,__err,__t); } + + protected: + virtual + ~time_get() + { + delete [] _M_monthnames; + delete [] _M_daynames; + } + + virtual dateorder + do_date_order() const + { return time_base::ymd; } + + virtual iter_type + do_get_time(iter_type __s, iter_type /*__end*/, ios_base&, + ios_base::iostate& /*__err*/, tm* /*__t*/) const + { return __s; } + + virtual iter_type + do_get_date(iter_type __s, iter_type /*__end*/, ios_base&, + ios_base::iostate& /*__err*/, tm* /*__t*/) const + { return __s; } + + virtual iter_type + do_get_weekday(iter_type __s, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __t) const; + + virtual iter_type + do_get_monthname(iter_type __s, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __t) const; + + virtual iter_type + do_get_year(iter_type __s, iter_type /*__end*/, ios_base&, + ios_base::iostate& /*__err*/, tm* /*__t*/) const + { return __s; } + + mutable basic_string<_CharT>* _M_daynames; + mutable basic_string<_CharT>* _M_monthnames; + }; + + template + locale::id time_get<_CharT, _InIter>::id; + + template + class time_get_byname : public time_get<_CharT, _InIter> + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + + explicit + time_get_byname(const char*, size_t __refs = 0) + : time_get<_CharT, _InIter>(__refs) { } + protected: + virtual + ~time_get_byname() { } + }; + + template + class time_put : public locale::facet, public time_base + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + + static locale::id id; + + explicit + time_put(size_t __refs = 0) : locale::facet (__refs) { } + + // NB: this is a nonvirtual, calls do_put in a loop. + iter_type + put(iter_type __s, ios_base& /*__f*/, char_type /*__fill*/, + const tm* /*__tmb*/, const _CharT* /*__pattern*/, + const _CharT* /*__pat_end*/) const + { return __s; } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const tm* __tmb, char __format, char __modifier = 0) const + { return do_put(__s, __f, __fill, __tmb, __format, __modifier); } + + protected: + virtual + ~time_put() { } + + virtual iter_type + do_put(iter_type __s, ios_base&, char_type, const tm* /*__t*/, + char /*__format*/, char /*__mod*/) const + { return __s; } + }; + + template + locale::id time_put<_CharT, _OutIter>::id; + + template + class time_put_byname : public time_put<_CharT, _OutIter> + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + + explicit + time_put_byname(const char*, size_t __refs = 0) + : time_put<_CharT, _OutIter> (__refs) { } + + protected: + virtual + ~time_put_byname() { } + }; + + + template + class money_get : public locale::facet + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + typedef basic_string<_CharT> string_type; + + static locale::id id; + + explicit + money_get(size_t __refs = 0) : locale::facet(__refs) { } + + iter_type + get(iter_type __s, iter_type __end, bool __intl, + ios_base& __f, ios_base::iostate& __err, long double& __units) const + { return do_get(__s, __end, __intl, __f, __err, __units); } + + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __f, + ios_base::iostate& __err, string_type& __digits) const + { return do_get(__s, __end, __intl, __f, __err, __digits); } + + protected: + virtual + ~money_get() { } + + virtual iter_type + do_get(iter_type __s, iter_type /*__end*/, bool /*__intl*/, + ios_base& /*__io*/, ios_base::iostate& /*__err*/, + long double& /*__units*/) const + { return __s; } + + virtual iter_type + do_get(iter_type __s, iter_type /*__end*/, bool /*__intl*/, + ios_base& /*__io*/, ios_base::iostate& /*__err*/, + string_type& /*__digits*/) const + { return __s; } + }; + + template + locale::id money_get<_CharT, _InIter>::id; + + template + class money_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + typedef basic_string<_CharT> string_type; + + static locale::id id; + + explicit + money_put(size_t __refs = 0) : locale::facet(__refs) { } + + iter_type + put(iter_type __s, bool __intl, ios_base& __f, + char_type __fill, long double __units) const + { return do_put(__s, __intl, __f, __fill, __units); } + + iter_type + put(iter_type __s, bool __intl, ios_base& __f, + char_type __fill, const string_type& __digits) const + { return do_put(__s, __intl, __f, __fill, __digits); } + + protected: + virtual + ~money_put() { } + + virtual iter_type + do_put(iter_type __s, bool, ios_base& /*__io*/, char_type /*__fill*/, + long double /*__units*/) const + { return __s; } + + virtual iter_type + do_put(iter_type __s, bool, ios_base& /*__io*/, char_type /*__fill*/, + const string_type& /*__digits*/) const + { return __s; } + }; + + template + locale::id money_put<_CharT, _OutIter>::id; + + struct money_base + { + enum part { none, space, symbol, sign, value }; + struct pattern { char field[4]; }; + + static const pattern _S_default_pattern; + + // Construct and return valid pattern consisting of some combination of: + // space none symbol sign value + static pattern + _S_construct_pattern(char __preceeds, char __space, char __posn); + }; + + template + class moneypunct : public locale::facet, public money_base + { + public: + // Types: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static const bool intl = _Intl; + static locale::id id; + + private: + char_type _M_decimal_point; + char_type _M_thousands_sep; + string _M_grouping; + string_type _M_curr_symbol; + string_type _M_positive_sign; + string_type _M_negative_sign; + int _M_frac_digits; + pattern _M_pos_format; + pattern _M_neg_format; + + public: + explicit + moneypunct(size_t __refs = 0) : locale::facet(__refs) + { _M_initialize_moneypunct(); } + + explicit + moneypunct(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs) + { _M_initialize_moneypunct(__cloc); } + + char_type + decimal_point() const + { return this->do_decimal_point(); } + + char_type + thousands_sep() const + { return this->do_thousands_sep(); } + + string + grouping() const + { return this->do_grouping(); } + + string_type + curr_symbol() const + { return this->do_curr_symbol(); } + + string_type + positive_sign() const + { return this->do_positive_sign(); } + + string_type + negative_sign() const + { return this->do_negative_sign(); } + + int + frac_digits() const + { return this->do_frac_digits(); } + + pattern + pos_format() const + { return this->do_pos_format(); } + + pattern + neg_format() const + { return this->do_neg_format(); } + + protected: + virtual + ~moneypunct() { } + + virtual char_type + do_decimal_point() const + { return _M_decimal_point; } + + virtual char_type + do_thousands_sep() const + { return _M_thousands_sep; } + + virtual string + do_grouping() const + { return _M_grouping; } + + virtual string_type + do_curr_symbol() const + { return _M_curr_symbol; } + + virtual string_type + do_positive_sign() const + { return _M_positive_sign; } + + virtual string_type + do_negative_sign() const + { return _M_negative_sign; } + + virtual int + do_frac_digits() const + { return _M_frac_digits; } + + virtual pattern + do_pos_format() const + { return _M_pos_format; } + + virtual pattern + do_neg_format() const + { return _M_neg_format; } + + // For use at construction time only. + void + _M_initialize_moneypunct(__c_locale __cloc = NULL); + }; + + template + locale::id moneypunct<_CharT, _Intl>::id; + + template + const bool moneypunct<_CharT, _Intl>::intl; + + template + void + moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(__c_locale /*__cloc*/) + { + // NB: Cannot be made generic. + } + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale __cloc); +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale __cloc); +#endif + + template + class moneypunct_byname : public moneypunct<_CharT, _Intl> + { + __c_locale _M_c_locale_moneypunct; + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static const bool intl = _Intl; + + explicit + moneypunct_byname(const char* __s, size_t __refs = 0) + : moneypunct<_CharT, _Intl>(__refs) + { + _S_create_c_locale(_M_c_locale_moneypunct, __s); + _M_initialize_moneypunct(_M_c_locale_moneypunct); + } + + protected: + virtual + ~moneypunct_byname() + { _S_destroy_c_locale(_M_c_locale_moneypunct); } + }; + + template + const bool moneypunct_byname<_CharT, _Intl>::intl; + + + struct messages_base + { + typedef int catalog; + }; + + template + class messages : public locale::facet, public messages_base + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static locale::id id; + + explicit + messages(size_t __refs = 0) : locale::facet(__refs) { } + + catalog + open(const basic_string& __s, const locale& __loc) const + { return do_open(__s, __loc); } + + string_type + get(catalog __c, int __set, int __msgid, const string_type& __s) const + { return do_get(__c,__set,__msgid,__s); } + + void + close(catalog __c) const + { return do_close(__c); } + + protected: + virtual + ~messages() { } + + // NB: Probably these should be pure, and implemented only in + // specializations of messages<>. But for now... + virtual catalog + do_open(const basic_string&, const locale&) const + { return 0; } + + virtual string_type + do_get(catalog, int, int /*__msgid*/, const string_type& __dfault) const + { return __dfault; } + + virtual void + do_close(catalog) const { } + }; + + template + locale::id messages<_CharT>::id; + + template + class messages_byname : public messages<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + messages_byname(const char*, size_t __refs = 0); + + protected: + virtual + ~messages_byname() { } + }; + + template<> + messages_byname::messages_byname(const char*, size_t __refs); +#ifdef _GLIBCPP_USE_WCHAR_T + template<> + messages_byname::messages_byname(const char*, size_t __refs); +#endif + + // Subclause convenience interfaces, inlines + // NB: these are inline + // because, when used in a loop, some compilers can hoist the body + // out of the loop; then it's just as fast as the C is*() function. + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + + template + inline bool islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } +} // namespace std + +#endif /* _CPP_BITS_LOCFACETS_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/locale_facets.tcc b/contrib/media/updf/include/bits/locale_facets.tcc new file mode 100644 index 0000000000..da20f7866a --- /dev/null +++ b/contrib/media/updf/include/bits/locale_facets.tcc @@ -0,0 +1,1227 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Warning: this file is not meant for user inclusion. Use . + +#ifndef _CPP_BITS_LOCFACETS_TCC +#define _CPP_BITS_LOCFACETS_TCC 1 + +#include +#include // For localeconv +#include // For strof, strtold +#include // For numeric_limits +#include // For auto_ptr +#include // For streambuf_iterators +#include // For isspace +#include // For bad_cast +#include + + +namespace std +{ + template + locale + locale::combine(const locale& __other) + { + locale __copy(*this); + __copy._M_impl->_M_replace_facet(__other._M_impl, &_Facet::id); + return __copy; + } + + template + bool + locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type* __fcoll = &use_facet<__collate_type>(*this); + return (__fcoll->compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + + template + const _Facet& + use_facet(const locale& __loc) + { + typedef locale::_Impl::__vec_facet __vec_facet; + size_t __i = _Facet::id._M_index; + __vec_facet* __facet = __loc._M_impl->_M_facets; + const locale::facet* __fp = (*__facet)[__i]; + if (__fp == 0 || __i >= __facet->size()) + __throw_bad_cast(); + return static_cast(*__fp); + } + + template + bool + has_facet(const locale& __loc) throw() + { + typedef locale::_Impl::__vec_facet __vec_facet; + size_t __i = _Facet::id._M_index; + __vec_facet* __facet = __loc._M_impl->_M_facets; + return (__i < __facet->size() && (*__facet)[__i] != 0); + } + + // __match_parallel + // matches input __s against a set of __ntargs strings in __targets, + // placing in __matches a vector of indices into __targets which + // match, and in __remain the number of such matches. If it hits + // end of sequence before it minimizes the set, sets __eof. + // Empty strings are never matched. + template + _InIter + __match_parallel(_InIter __s, _InIter __end, int __ntargs, + const basic_string<_CharT>* __targets, + int* __matches, int& __remain, bool& __eof) + { + typedef basic_string<_CharT> __string_type; + __eof = false; + for (int __ti = 0; __ti < __ntargs; ++__ti) + __matches[__ti] = __ti; + __remain = __ntargs; + size_t __pos = 0; + do + { + int __ti = 0; + while (__ti < __remain && __pos == __targets[__matches[__ti]].size()) + ++__ti; + if (__ti == __remain) + { + if (__pos == 0) __remain = 0; + return __s; + } + if (__s == __end) + __eof = true; + bool __matched = false; + for (int __ti2 = 0; __ti2 < __remain; ) + { + const __string_type& __target = __targets[__matches[__ti2]]; + if (__pos < __target.size()) + { + if (__eof || __target[__pos] != *__s) + { + __matches[__ti2] = __matches[--__remain]; + continue; + } + __matched = true; + } + ++__ti2; + } + if (__matched) + { + ++__s; + ++__pos; + } + for (int __ti3 = 0; __ti3 < __remain;) + { + if (__pos > __targets[__matches[__ti3]].size()) + { + __matches[__ti3] = __matches[--__remain]; + continue; + } + ++__ti3; + } + } + while (__remain); + return __s; + } + + template + _Format_cache<_CharT>::_Format_cache() + : _M_valid(true), _M_use_grouping(false) + { } + + template<> + _Format_cache::_Format_cache(); + + template<> + _Format_cache::_Format_cache(); + + template + void + _Format_cache<_CharT>::_M_populate(ios_base& __io) + { + locale __loc = __io.getloc (); + numpunct<_CharT> const& __np = use_facet >(__loc); + _M_truename = __np.truename(); + _M_falsename = __np.falsename(); + _M_thousands_sep = __np.thousands_sep(); + _M_decimal_point = __np.decimal_point(); + _M_grouping = __np.grouping(); + _M_use_grouping = _M_grouping.size() != 0 && _M_grouping.data()[0] != 0; + _M_valid = true; + } + + // This function is always called via a pointer installed in + // an ios_base by ios_base::register_callback. + template + void + _Format_cache<_CharT>:: + _S_callback(ios_base::event __ev, ios_base& __ios, int __ix) throw() + { + void*& __p = __ios.pword(__ix); + switch (__ev) + { + case ios_base::erase_event: + delete static_cast<_Format_cache<_CharT>*>(__p); + __p = 0; + break; + case ios_base::copyfmt_event: + // If just stored zero, the callback would get registered again. + try + { __p = new _Format_cache<_CharT>; } + catch(...) + { } + break; + case ios_base::imbue_event: + static_cast<_Format_cache<_CharT>*>(__p)->_M_valid = false; + break; + } + } + + template + _Format_cache<_CharT>* + _Format_cache<_CharT>::_S_get(ios_base& __ios) + { + if (!_S_pword_ix) + _S_pword_ix = ios_base::xalloc(); // XXX MT + void*& __p = __ios.pword(_S_pword_ix); + + // XXX What if pword fails? must check failbit, throw. + if (__p == 0) // XXX MT? maybe sentry takes care of it + { + auto_ptr<_Format_cache<_CharT> > __ap(new _Format_cache<_CharT>); + __ios.register_callback(&_Format_cache<_CharT>::_S_callback, + _S_pword_ix); + __p = __ap.release(); + } + _Format_cache<_CharT>* __ncp = static_cast<_Format_cache<_CharT>*>(__p); + if (!__ncp->_M_valid) + __ncp->_M_populate(__ios); + + return __ncp; + } + + // This member function takes an (w)istreambuf_iterator object and + // parses it into a generic char array suitable for parsing with + // strto[l,ll,f,d]. The thought was to encapsulate the conversion + // into this one function, and thus the num_get::do_get member + // functions can just adjust for the type of the overloaded + // argument and process the char array returned from _M_extract. + // Other things were also considered, including a fused + // multiply-add loop that would obviate the need for any call to + // strto... at all: however, it would b e a bit of a pain, because + // you'd have to be able to return either floating or integral + // types, etc etc. The current approach seems to be smack dab in + // the middle between an unoptimized approach using sscanf, and + // some kind of hyper-optimized approach alluded to above. + + // XXX + // Need to do partial specialization to account for differences + // between character sets. For char, this is pretty + // straightforward, but for wchar_t, the conversion to a plain-jane + // char type is a bit more involved. + template + void + num_get<_CharT, _InIter>:: + _M_extract(_InIter /*__beg*/, _InIter /*__end*/, ios_base& /*__io*/, + ios_base::iostate& /*__err*/, char* /*__xtrc*/, + int& /*__base*/, bool /*__fp*/) const + { + // XXX Not currently done: need to expand upon char version below. + } + + template<> + void + num_get >:: + _M_extract(istreambuf_iterator __beg, + istreambuf_iterator __end, ios_base& __io, + ios_base::iostate& __err, char* __xtrc, int& __base, + bool __fp) const; + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // NB: This is an unresolved library defect #17 + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + // Parse bool values as long + if (!(__io.flags() & ios_base::boolalpha)) + { + // NB: We can't just call do_get(long) here, as it might + // refer to a derived class. + + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32] = {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long __l = strtol(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __l <= 1 + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __l; + else + __err |= ios_base::failbit; + } + + // Parse bool values as alphanumeric + else + { + typedef _Format_cache __fcache_type; + __fcache_type* __fmt = __fcache_type::_S_get(__io); + const char_type* __true = __fmt->_M_truename.c_str(); + const char_type* __false = __fmt->_M_falsename.c_str(); + const size_t __truelen = __traits_type::length(__true) - 1; + const size_t __falselen = __traits_type::length(__false) - 1; + + for (size_t __pos = 0; __beg != __end; ++__pos) + { + char_type __c = *__beg++; + bool __testf = __c == __false[__pos]; + bool __testt = __c == __true[__pos]; + if (!(__testf || __testt)) + { + __err |= ios_base::failbit; + break; + } + else if (__testf && __pos == __falselen) + { + __v = 0; + break; + } + else if (__testt && __pos == __truelen) + { + __v = 1; + break; + } + } + if (__beg == __end) + __err |= ios_base::eofbit; + } + + return __beg; + } +#endif + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, short& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long __l = strtol(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0 + && __l >= SHRT_MIN && __l <= SHRT_MAX) + __v = static_cast(__l); + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, int& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32] = {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long __l = strtol(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0 + && __l >= INT_MIN && __l <= INT_MAX) + __v = static_cast(__l); + else + __err |= ios_base::failbit; + + return __beg; + } +#endif + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long __l = strtol(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __l; + else + __err |= ios_base::failbit; + + return __beg; + } + +#ifdef _GLIBCPP_USE_LONG_LONG + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long long __ll = strtoll(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __ll; + else + __err |= ios_base::failbit; + + return __beg; + } +#endif + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + unsigned long __ul = strtoul(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0 + && __ul <= USHRT_MAX) + __v = static_cast(__ul); + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + unsigned long __ul = strtoul(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0 + && __ul <= UINT_MAX) + __v = static_cast(__ul); + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32] = {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + unsigned long __ul = strtoul(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __ul; + else + __err |= ios_base::failbit; + + return __beg; + } + +#ifdef _GLIBCPP_USE_LONG_LONG + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + unsigned long long __ull = strtoull(__xtrc, &__sanity, __base); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __ull; + else + __err |= ios_base::failbit; + + return __beg; + } +#endif + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 256 for + // floating-point types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, true); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; +#ifdef _GLIBCPP_USE_C99 + float __f = strtof(__xtrc, &__sanity); +#else + float __f = static_cast(strtod(__xtrc, &__sanity)); +#endif + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __f; + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 256 for + // floating-point types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, true); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + double __d = strtod(__xtrc, &__sanity); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __d; + else + __err |= ios_base::failbit; + + return __beg; + } + +#if defined(_GLIBCPP_USE_C99) && !defined(__hpux) + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 256 for + // floating-point types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, true); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + long double __ld = strtold(__xtrc, &__sanity); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __ld; + else + __err |= ios_base::failbit; + + return __beg; + } +#else + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + // Stage 1: extract + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, true); + + // Stage 2: determine a conversion specifier. + ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield; + const char* __conv; + if (__basefield == ios_base::oct) + __conv = "%Lo"; + else if (__basefield == ios_base::hex) + __conv = "%LX"; + else if (__basefield == 0) + __conv = "%Li"; + else + __conv = "%Lg"; + + // Stage 3: store results. + long double __ld; + int __p = sscanf(__xtrc, __conv, &__ld); + if (__p + && static_cast(__p) + != __traits_type::eof()) + __v = __ld; + else + __err |= ios_base::failbit; + + return __beg; + } +#endif + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + // Prepare for hex formatted input + typedef ios_base::fmtflags fmtflags; + fmtflags __fmt = __io.flags(); + fmtflags __fmtmask = ~(ios_base::showpos | ios_base::basefield + | ios_base::uppercase | ios_base::internal); + __io.flags(__fmt & __fmtmask | (ios_base::hex | ios_base::showbase)); + + // Stage 1: extract and determine the conversion specifier. + // Assuming leading zeros eliminated, thus the size of 32 for + // integral types. + char __xtrc[32]= {'\0'}; + int __base; + _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); + + // Stage 2: convert and store results. + char* __sanity; + errno = 0; + void* __vp = reinterpret_cast(strtoul(__xtrc, &__sanity, __base)); + if (!(__err & ios_base::failbit) + && __sanity != __xtrc && *__sanity == '\0' && errno == 0) + __v = __vp; + else + __err |= ios_base::failbit; + + // Reset from hex formatted input + __io.flags(__fmt); + return __beg; + } + + // __pad is specialized for ostreambuf_iterator, random access iterator. + template + inline _OutIter + __pad(_OutIter __s, _CharT __fill, int __padding); + + template + _RaIter + __pad(_RaIter __s, _CharT __fill, int __padding, + random_access_iterator_tag) + { + fill_n(__s, __fill); + return __s + __padding; + } + + template + _OutIter + __pad(_OutIter __s, _CharT __fill, int __padding, _Tag) + { + while (--__padding >= 0) { *__s = __fill; ++__s; } + return __s; + } + + template + inline _OutIter + __pad(_OutIter __s, _CharT __fill, int __padding) + { + return __pad(__s, __fill, __padding, + typename iterator_traits<_OutIter>::iterator_category()); + } + + template + _OutIter + __pad_numeric(_OutIter __s, ios_base::fmtflags /*__flags*/, + _CharT /*__fill*/, int /*__width*/, + _CharT const* /*__first*/, _CharT const* /*__middle*/, + _CharT const* /*__last*/) + { + // XXX Not currently done: non streambuf_iterator + return __s; + } + + // Partial specialization for ostreambuf_iterator. + template + ostreambuf_iterator<_CharT> + __pad_numeric(ostreambuf_iterator<_CharT> __s, ios_base::fmtflags __flags, + _CharT __fill, int __width, _CharT const* __first, + _CharT const* __middle, _CharT const* __last) + { + typedef ostreambuf_iterator<_CharT> __out_iter; + int __padding = __width - (__last - __first); + if (__padding < 0) + __padding = 0; + ios_base::fmtflags __aflags = __flags & ios_base::adjustfield; + bool __testfield = __padding == 0 || __aflags == ios_base::left + || __aflags == ios_base::internal; + + // This was needlessly complicated. + if (__first != __middle) + { + if (!__testfield) + { + __pad(__s, __fill, __padding); + __padding = 0; + } + copy(__first, __middle, __s); + } + __out_iter __s2 = __s; + + if (__padding && __aflags != ios_base::left) + { + __pad(__s2, __fill, __padding); + __padding = 0; + } + __out_iter __s3 = copy(__middle, __last, __s2); + if (__padding) + __pad(__s3, __fill, __padding); + return __s3; + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const _Format_cache<_CharT>* __fmt = _Format_cache<_CharT>::_S_get(__io); + ios_base::fmtflags __flags = __io.flags(); + + if ((__flags & ios_base::boolalpha) == 0) + { + unsigned long __uv = __v; + return __output_integer(__s, __io, __fill, false, __uv); + } + else + { + const char_type* __first; + const char_type* __last; + if (__v) + { + __first = __fmt->_M_truename.data(); + __last = __first + __fmt->_M_truename.size(); + } + else + { + __first = __fmt->_M_falsename.data(); + __last = __first + __fmt->_M_falsename.size(); + } + copy(__first, __last, __s); + } + return __s; + } + + // __group_digits inserts "group separator" characters into an array + // of characters. It's recursive, one iteration per group. It moves + // the characters in the buffer this way: "xxxx12345" -> "12,345xxx". + // Call this only with __grouping != __grend. + template + _CharT* + __group_digits(_CharT* __s, _CharT __grsep, char const* __grouping, + char const* __grend, _CharT const* __first, + _CharT const* __last) + { + if (__last - __first > *__grouping) + { + __s = __group_digits(__s, __grsep, + (__grouping + 1 == __grend ? __grouping : __grouping + 1), + __grend, __first, __last - *__grouping); + __first = __last - *__grouping; + *__s++ = __grsep; + } + do + { + *__s++ = *__first++; + } + while (__first != __last); + return __s; + } + + template + _OutIter + __output_integer(_OutIter __s, ios_base& __io, _CharT __fill, bool __neg, + _ValueT __v) + { + // Leave room for "+/-," "0x," and commas. + const long _M_room = numeric_limits<_ValueT>::digits10 * 2 + 4; + _CharT __digits[_M_room]; + _CharT* __front = __digits + _M_room; + ios_base::fmtflags __flags = __io.flags(); + const _Format_cache<_CharT>* __fmt = _Format_cache<_CharT>::_S_get(__io); + char const* __table = __fmt->_S_literals + __fmt->_S_digits; + + ios_base::fmtflags __basefield = (__flags & __io.basefield); + _CharT* __sign_end = __front; + if (__basefield == ios_base::hex) + { + if (__flags & ios_base::uppercase) + __table += 16; // use ABCDEF + do + *--__front = __table[__v & 15]; + while ((__v >>= 4) != 0); + __sign_end = __front; + if (__flags & ios_base::showbase) + { + *--__front = __fmt->_S_literals[__fmt->_S_x + + ((__flags & ios_base::uppercase) ? 1 : 0)]; + *--__front = __table[0]; + } + } + else if (__basefield == ios_base::oct) + { + do + *--__front = __table[__v & 7]; + while ((__v >>= 3) != 0); + if (__flags & ios_base::showbase + && static_cast(*__front) != __table[0]) + *--__front = __table[0]; + __sign_end = __front; + } + else + { + // NB: This is _lots_ faster than using ldiv. + do + *--__front = __table[__v % 10]; + while ((__v /= 10) != 0); + __sign_end = __front; + // NB: ios_base:hex || ios_base::oct assumed to be unsigned. + if (__neg || (__flags & ios_base::showpos)) + *--__front = __fmt->_S_literals[__fmt->_S_plus - __neg]; + } + + // XXX should specialize! + if (!__fmt->_M_use_grouping && !__io.width()) + return copy(__front, __digits + _M_room, __s); + + if (!__fmt->_M_use_grouping) + return __pad_numeric(__s, __flags, __fill, __io.width(0), + __front, __sign_end, __digits + _M_room); + + _CharT* __p = __digits; + while (__front < __sign_end) + *__p++ = *__front++; + const char* __gr = __fmt->_M_grouping.data(); + __front = __group_digits(__p, __fmt->_M_thousands_sep, __gr, + __gr + __fmt->_M_grouping.size(), __sign_end, __digits + _M_room); + return __pad_numeric(__s, __flags, __fill, __io.width(0), + __digits, __p, __front); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { + unsigned long __uv = __v; + bool __neg = false; + if (__v < 0) + { + __neg = true; + __uv = -__uv; + } + return __output_integer(__s, __io, __fill, __neg, __uv); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return __output_integer(__s, __io, __fill, false, __v); } + +#ifdef _GLIBCPP_USE_LONG_LONG + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __b, char_type __fill, long long __v) const + { + unsigned long long __uv = __v; + bool __neg = false; + if (__v < 0) + { + __neg = true; + __uv = -__uv; + } + return __output_integer(__s, __b, __fill, __neg, __uv); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return __output_integer(__s, __io, __fill, false, __v); } +#endif + + // Generic helper function + template + _OutIter + __output_float(_OutIter __s, ios_base& __io, _CharT __fill, + const char* __sptr, size_t __slen) + { + // XXX Not currently done: non streambuf_iterator + return __s; + } + + // Partial specialization for ostreambuf_iterator. + template + ostreambuf_iterator<_CharT, _Traits> + __output_float(ostreambuf_iterator<_CharT, _Traits> __s, ios_base& __io, + _CharT __fill, const char* __sptr, size_t __slen) + { + size_t __padding = __io.width() > streamsize(__slen) ? + __io.width() -__slen : 0; + locale __loc = __io.getloc(); + ctype<_CharT> const& __ct = use_facet >(__loc); + ios_base::fmtflags __adjfield = __io.flags() & ios_base::adjustfield; + const char* const __eptr = __sptr + __slen; + // [22.2.2.2.2.19] Table 61 + if (__adjfield == ios_base::internal) + { + // [22.2.2.2.2.14]; widen() + if (__sptr < __eptr && (*__sptr == '+' || *__sptr == '-')) + { + __s = __ct.widen(*__sptr); + ++__s; + ++__sptr; + } + __s = __pad(__s, __fill, __padding); + __padding = 0; + } + else if (__adjfield != ios_base::left) + { + __s = __pad(__s, __fill, __padding); + __padding = 0; + } + // the "C" locale decimal character + char __decimal_point = *(localeconv()->decimal_point); + const _Format_cache<_CharT>* __fmt = _Format_cache<_CharT>::_S_get(__io); + for (; __sptr != __eptr; ++__s, ++__sptr) + { + // [22.2.2.2.2.17]; decimal point conversion + if (*__sptr == __decimal_point) + __s = __fmt->_M_decimal_point; + // [22.2.2.2.2.14]; widen() + else + __s = __ct.widen(*__sptr); + } + // [22.2.2.2.2.19] Table 61 + if (__padding) + __pad(__s, __fill, __padding); + __io.width(0); + return __s; + } + + bool + __build_float_format(ios_base& __io, char* __fptr, char __modifier, + streamsize __prec); + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { + const streamsize __max_prec = numeric_limits::digits10 + 3; + streamsize __prec = __io.precision(); + // Protect against sprintf() buffer overflows. + if (__prec > __max_prec) + __prec = __max_prec; + // The *2 provides for signs, exp, 'E', and pad. + char __sbuf[__max_prec * 2]; + size_t __slen; + // Long enough for the max format spec. + char __fbuf[16]; + if (__build_float_format(__io, __fbuf, 0, __prec)) + __slen = sprintf(__sbuf, __fbuf, __prec, __v); + else + __slen = sprintf(__sbuf, __fbuf, __v); + // [22.2.2.2.2] Stages 2-4. + return __output_float(__s, __io, __fill, __sbuf, __slen); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { + const streamsize __max_prec = numeric_limits::digits10 + 3; + streamsize __prec = __io.precision(); + // Protect against sprintf() buffer overflows. + if (__prec > __max_prec) + __prec = __max_prec; + // The *2 provides for signs, exp, 'E', and pad. + char __sbuf[__max_prec * 2]; + size_t __slen; + // Long enough for the max format spec. + char __fbuf[16]; + // 'L' as per [22.2.2.2.2] Table 59 + if (__build_float_format(__io, __fbuf, 'L', __prec)) + __slen = sprintf(__sbuf, __fbuf, __prec, __v); + else + __slen = sprintf(__sbuf, __fbuf, __v); + // [22.2.2.2.2] Stages 2-4 + return __output_float(__s, __io, __fill, __sbuf, __slen); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + typedef ios_base::fmtflags fmtflags; + fmtflags __fmt = __io.flags(); + fmtflags __fmtmask = ~(ios_base::showpos | ios_base::basefield + | ios_base::uppercase | ios_base::internal); + __io.flags(__fmt & __fmtmask | (ios_base::hex | ios_base::showbase)); + try { + _OutIter __s2 = __output_integer(__s, __io, __fill, false, + reinterpret_cast(__v)); + __io.flags(__fmt); + return __s2; + } + catch (...) { + __io.flags(__fmt); + __throw_exception_again; + } + } + + // Support for time_get: + // Note that these partial specializations could, and maybe should, + // be changed to full specializations (by eliminating the _Dummy + // argument) and moved to a .cc file. + template + struct _Weekdaynames; + + template + struct _Weekdaynames + { static const char* const _S_names[14]; }; + + template + const char* const + _Weekdaynames::_S_names[14] = + { + "Sun", "Sunday", + "Mon", "Monday", "Tue", "Tuesday", "Wed", "Wednesday", + "Thu", "Thursday", "Fri", "Friday", "Sat", "Saturday" + }; + +#ifdef _GLIBCPP_USE_WCHAR_T + template + struct _Weekdaynames + { static const wchar_t* const _S_names[14]; }; + + template + const wchar_t* const + _Weekdaynames::_S_names[14] = + { + L"Sun", L"Sunday", + L"Mon", L"Monday", L"Tue", L"Tuesday", L"Wed", L"Wednesday", + L"Thu", L"Thursday", L"Fri", L"Friday", L"Sat", L"Saturday" + }; +#endif + + template + struct _Monthnames; + + template + struct _Monthnames + { static const char* const _S_names[24]; }; + + template + const char* const + _Monthnames::_S_names[24] = + { + "Jan", "January", "Feb", "February", "Mar", "March", + "Apr", "April", "May", "May", "Jun", "June", + "Jul", "July", "Aug", "August", "Sep", "September", + "Oct", "October", "Nov", "November", "Dec", "December" + }; + +#ifdef _GLIBCPP_USE_WCHAR_T + template + struct _Monthnames + { static const wchar_t* const _S_names[24]; }; + + template + const wchar_t* const + _Monthnames::_S_names[24] = + { + L"Jan", L"January", L"Feb", L"February", L"Mar", L"March", + L"Apr", L"April", L"May", L"May", L"Jun", L"June", + L"Jul", L"July", L"Aug", L"August", L"Sep", L"September", + L"Oct", L"October", L"Nov", L"November", L"Dec", L"December" + }; +#endif + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_weekday(iter_type __s, iter_type __end, + ios_base& __io, ios_base::iostate& __err, tm* __t) const + { + if (!_M_daynames) + { + _M_daynames = new basic_string<_CharT>[14]; + for (int __i = 0; __i < 14; ++__i) + _M_daynames[__i] = _Weekdaynames<_CharT>::_S_names[__i]; + } + bool __at_eof = false; + int __remain = 0; + int __matches[14]; + iter_type __out = __match_parallel(__s, __end, 14, _M_daynames, + __matches, __remain, __at_eof); + __err = ios_base::iostate(0); + if (__at_eof) __err |= __io.eofbit; + if (__remain == 1 || + __remain == 2 && (__matches[0]>>1) == (__matches[1]>>1)) + __t->tm_wday = (__matches[0]>>1); + else + __err |= __io.failbit; + return __out; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_monthname(iter_type __s, iter_type __end, + ios_base& __io, ios_base::iostate& __err, tm* __t) const + { + if (!_M_monthnames) + { + _M_monthnames = new basic_string<_CharT>[24]; + for (int __i = 0; __i < 24; ++__i) + _M_monthnames[__i] = _Monthnames<_CharT>::_S_names[__i]; + } + bool __at_eof = false; + int __remain = 0; + int __matches[24]; + iter_type __out = __match_parallel( __s, __end, 24, _M_monthnames, + __matches, __remain, __at_eof); + __err = ios_base::iostate(0); + if (__at_eof) __err |= __io.eofbit; + if (__remain == 1 || + __remain == 2 && (__matches[0]>>1) == (__matches[1]>>1)) + __t->tm_mon = (__matches[0]>>1); + else + __err |= __io.failbit; + return __out; + } +} // std:: + +#endif /* _CPP_BITS_LOCFACETS_TCC */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/localefwd.h b/contrib/media/updf/include/bits/localefwd.h new file mode 100644 index 0000000000..dd5cddc44b --- /dev/null +++ b/contrib/media/updf/include/bits/localefwd.h @@ -0,0 +1,459 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 22.1 Locales +// + +#ifndef _CPP_BITS_LOCCORE_H +#define _CPP_BITS_LOCCORE_H 1 + +#pragma GCC system_header + +#include +#include // Defines __c_locale. +#include // For CHAR_BIT +#include // For string +#include // For isspace, etc. +#include + +namespace std +{ + // NB: Don't instantiate required wchar_t facets if no wchar_t support. +#ifdef _GLIBCPP_USE_WCHAR_T +# define _GLIBCPP_NUM_FACETS 26 +#else +# define _GLIBCPP_NUM_FACETS 13 +#endif + + // 22.1.1 Locale + template + class vector; + class locale; + + // 22.1.3 Convenience interfaces + template + inline bool + isspace(_CharT, const locale&); + + template + inline bool + isprint(_CharT, const locale&); + + template + inline bool + iscntrl(_CharT, const locale&); + + template + inline bool + isupper(_CharT, const locale&); + + template + inline bool + islower(_CharT, const locale&); + + template + inline bool + isalpha(_CharT, const locale&); + + template + inline bool + isdigit(_CharT, const locale&); + + template + inline bool + ispunct(_CharT, const locale&); + + template + inline bool + isxdigit(_CharT, const locale&); + + template + inline bool + isalnum(_CharT, const locale&); + + template + inline bool + isgraph(_CharT, const locale&); + + template + inline _CharT + toupper(_CharT, const locale&); + + template + inline _CharT + tolower(_CharT, const locale&); + + + // 22.2.1 and 22.2.1.3 ctype + class ctype_base; + template + class ctype; + template<> class ctype; +#ifdef _GLIBCPP_USE_WCHAR_T + template<> class ctype; +#endif + template + class ctype_byname; + // NB: Specialized for char and wchar_t in locale_facets.h. + + class codecvt_base; + template + class codecvt; + template<> class codecvt; +#ifdef _GLIBCPP_USE_WCHAR_T + template<> class codecvt; +#endif + template + class codecvt_byname; + + // 22.2.2 and 22.2.3 numeric + template > + class num_get; + template > + class num_put; + template class numpunct; + template class numpunct_byname; + + // 22.2.4 collation + template + class collate; + template class + collate_byname; + + // 22.2.5 date and time + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + + // 22.2.6 money + class money_base; + template > + class money_get; + template > + class money_put; + template + class moneypunct; + template + class moneypunct_byname; + + // 22.2.7 message retrieval + class messages_base; + template + class messages; + template + class messages_byname; + + // 22.1.1 Class locale + class locale + { + public: + // Types: + typedef unsigned int category; + + // Forward decls and friends: + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + // Category values: + // NB: Order must match _S_facet_categories definition in locale.cc + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (collate | ctype | monetary | + numeric | time | messages); + + // Construct/copy/destroy: + locale() throw(); + + locale(const locale& __other) throw(); + + explicit + locale(const char* __std_name); + + locale(const locale& __base, const char* __s, category __cat); + + locale(const locale& __base, const locale& __add, category __cat); + + template + locale(const locale& __other, _Facet* __f); + + ~locale() throw(); + + const locale& + operator=(const locale& __other) throw(); + + template + locale + combine(const locale& __other); + + // Locale operations: + string + name() const; + + bool + operator==(const locale& __other) const throw (); + + inline bool + operator!=(const locale& __other) const throw () + { return !(this->operator==(__other)); } + + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; + + // Global locale objects: + static locale + global(const locale&); + + static const locale& + classic(); + + private: + // The (shared) implementation + _Impl* _M_impl; + + // The "C" reference locale + static _Impl* _S_classic; + + // Current global reference locale + static _Impl* _S_global; + + static const size_t _S_num_categories = 6; + static const size_t _S_num_facets = _GLIBCPP_NUM_FACETS; + + explicit + locale(_Impl*) throw(); + + static inline void + _S_initialize() + { if (!_S_classic) classic(); } + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; + + + // locale implementation object + class locale::_Impl + { + public: + // Types. + typedef vector > __vec_facet; + + // Friends. + friend class locale; + friend class locale::facet; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + private: + // Data Members. + size_t _M_references; + __vec_facet* _M_facets; + string _M_names[_S_num_categories]; + __c_locale _M_c_locale; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + inline void + _M_add_reference() throw() + { ++_M_references; } // XXX MT + + inline void + _M_remove_reference() throw() + { + if (_M_references-- == 0) // XXX MT + { + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(string __name, size_t); + ~_Impl() throw(); + + bool + _M_check_same_name() + { + bool __ret = true; + for (size_t i = 0; i < _S_num_categories - 1; ++i) + __ret &= _M_names[i] == _M_names[i + 1]; + return __ret; + } + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, facet*); + + template + inline void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + }; + + template + locale::locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + _M_impl->_M_install_facet(&_Facet::id, __f); + for (size_t __i = 0; __i < _S_num_categories; ++__i) + _M_impl->_M_names[__i] = "*"; + } + + // 22.1.1.1.2 Class locale::facet + class locale::facet + { + friend class locale; + friend class locale::_Impl; + + protected: + explicit + facet(size_t __refs = 0) throw(); + + virtual + ~facet() { }; + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + private: + size_t _M_references; + + void + _M_add_reference() throw(); + + void + _M_remove_reference() throw(); + + facet(const facet&); // not defined + + void + operator=(const facet&); // not defined + }; + + + // 22.1.1.1.3 Class locale::id + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + template + friend const _Facet& + use_facet(const locale&); + template + friend bool + has_facet(const locale&) throw (); + + // NB: There is no accessor for _M_index because it may be used + // before the constructor is run; the effect of calling a member + // function (even an inline) would be undefined. + mutable size_t _M_index; + + // Last id number assigned + static size_t _S_highwater; + + void + operator=(const id&); // not defined + + id(const id&); // not defined + + public: + // NB: This class is always a static data member, and thus can be + // counted on to be zero-initialized. + // XXX id() : _M_index(0) { } + id() { } + }; + + template + const _Facet& + use_facet(const locale& __loc); + + template + bool + has_facet(const locale& __loc) throw(); +} // namespace std + +#endif /* _CPP_BITS_LOCCORE_H */ + +// Local Variables: +// mode:c++ +// End: + diff --git a/contrib/media/updf/include/bits/mask_array.h b/contrib/media/updf/include/bits/mask_array.h new file mode 100644 index 0000000000..b2399ba1fa --- /dev/null +++ b/contrib/media/updf/include/bits/mask_array.h @@ -0,0 +1,162 @@ +// The template and inlines for the -*- C++ -*- mask_array class. + +// Copyright (C) 1997-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_MASK_ARRAY_H +#define _CPP_BITS_MASK_ARRAY_H 1 + +#pragma GCC system_header + +namespace std { + + template class mask_array + { + public: + typedef _Tp value_type; + + void operator= (const valarray<_Tp>&) const; + void operator*= (const valarray<_Tp>&) const; + void operator/= (const valarray<_Tp>&) const; + void operator%= (const valarray<_Tp>&) const; + void operator+= (const valarray<_Tp>&) const; + void operator-= (const valarray<_Tp>&) const; + void operator^= (const valarray<_Tp>&) const; + void operator&= (const valarray<_Tp>&) const; + void operator|= (const valarray<_Tp>&) const; + void operator<<=(const valarray<_Tp>&) const; + void operator>>=(const valarray<_Tp>&) const; + void operator= (const _Tp&); + + // ~mask_array (); + + template + void operator= (const _Expr<_Dom,_Tp>&) const; + template + void operator*= (const _Expr<_Dom,_Tp>&) const; + template + void operator/= (const _Expr<_Dom,_Tp>&) const; + template + void operator%= (const _Expr<_Dom,_Tp>&) const; + template + void operator+= (const _Expr<_Dom,_Tp>&) const; + template + void operator-= (const _Expr<_Dom,_Tp>&) const; + template + void operator^= (const _Expr<_Dom,_Tp>&) const; + template + void operator&= (const _Expr<_Dom,_Tp>&) const; + template + void operator|= (const _Expr<_Dom,_Tp>&) const; + template + void operator<<=(const _Expr<_Dom,_Tp>&) const; + template + void operator>>=(const _Expr<_Dom,_Tp>&) const; + + private: + mask_array (_Array<_Tp>, size_t, _Array); + friend class valarray<_Tp>; + + const size_t _M_sz; + const _Array _M_mask; + const _Array<_Tp> _M_array; + + mask_array (const mask_array&); + + // not implemented + mask_array (); + mask_array& operator= (const mask_array&); + }; + + + template + inline mask_array<_Tp>::mask_array (const mask_array<_Tp>& a) + : _M_sz (a._M_sz), _M_mask (a._M_mask), _M_array (a._M_array) {} + + template + inline + mask_array<_Tp>::mask_array (_Array<_Tp> __a, size_t __s, _Array __m) + : _M_sz (__s), _M_mask (__m), _M_array (__a) {} + + // template + // inline mask_array<_Tp>::~mask_array () {} + + template + inline void + mask_array<_Tp>::operator= (const _Tp& __t) + { __valarray_fill (_M_array, _M_sz, _M_mask, __t); } + + template + inline void + mask_array<_Tp>::operator= (const valarray<_Tp>& __v) const + { __valarray_copy (_Array<_Tp> (__v), __v.size (), _M_array, _M_mask); } + + template + template + inline void + mask_array<_Tp>::operator= (const _Expr& __e) const + { __valarray_copy (__e, __e.size (), _M_array, _M_mask); } + +#undef _DEFINE_VALARRAY_OPERATOR +#define _DEFINE_VALARRAY_OPERATOR(op, name) \ +template \ +inline void \ +mask_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ +{ \ + _Array_augmented_##name (_M_array, _M_mask, \ + _Array<_Tp> (__v), __v.size ()); \ +} \ + \ +template template \ +inline void \ +mask_array<_Tp>::operator op##= (const _Expr& __e) const \ +{ \ + _Array_augmented_##name (_M_array, _M_mask, __e, __e.size ()); \ +} + +_DEFINE_VALARRAY_OPERATOR(*, multiplies) +_DEFINE_VALARRAY_OPERATOR(/, divides) +_DEFINE_VALARRAY_OPERATOR(%, modulus) +_DEFINE_VALARRAY_OPERATOR(+, plus) +_DEFINE_VALARRAY_OPERATOR(-, minus) +_DEFINE_VALARRAY_OPERATOR(^, xor) +_DEFINE_VALARRAY_OPERATOR(&, and) +_DEFINE_VALARRAY_OPERATOR(|, or) +_DEFINE_VALARRAY_OPERATOR(<<, shift_left) +_DEFINE_VALARRAY_OPERATOR(>>, shift_right) + +#undef _DEFINE_VALARRAY_OPERATOR + +} // std:: + +#endif /* _CPP_BITS_MASK_ARRAY_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/ostream.tcc b/contrib/media/updf/include/bits/ostream.tcc new file mode 100644 index 0000000000..c3cb5d2dce --- /dev/null +++ b/contrib/media/updf/include/bits/ostream.tcc @@ -0,0 +1,755 @@ +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.6.2 Output streams +// + +#include + +namespace std +{ + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT,_Traits>& __os) + : _M_ok(__os.good()), _M_os(__os) + { + // XXX MT + if (_M_ok && __os.tie()) + __os.tie()->flush(); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + sentry __cerb(*this); + if (__cerb) + { + try + { __pf(*this); } + catch(exception& __fail) + { + // 27.6.2.5.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + sentry __cerb(*this); + if (__cerb) + { + try + { __pf(*this); } + catch(exception& __fail) + { + // 27.6.2.5.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(ios_base& (*__pf)(ios_base&)) + { + sentry __cerb(*this); + if (__cerb) + { + try + { __pf(*this); } + catch(exception& __fail) + { + // 27.6.2.5.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(bool __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(long __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + char_type __c = this->fill(); + ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (_M_check_facet(_M_fnumput)) + { + bool __b = false; + if (__fmt & ios_base::oct || __fmt & ios_base::hex) + { + unsigned long __l = static_cast(__n); + __b = _M_fnumput->put(*this, *this, __c, __l).failed(); + } + else + __b = _M_fnumput->put(*this, *this, __c, __n).failed(); + if (__b) + this->setstate(ios_base::badbit); + } + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + +#ifdef _GLIBCPP_USE_LONG_LONG + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(long long __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + char_type __c = this->fill(); + ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (_M_check_facet(_M_fnumput)) + { + bool __b = false; + if (__fmt & ios_base::oct || __fmt & ios_base::hex) + { + unsigned long long __l; + __l = static_cast(__n); + __b = _M_fnumput->put(*this, *this, __c, __l).failed(); + } + else + __b = _M_fnumput->put(*this, *this, __c, __n).failed(); + if (__b) + this->setstate(ios_base::badbit); + } + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } +#endif + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(double __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(long double __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(const void* __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { + if (_M_check_facet(_M_fnumput)) + if (_M_fnumput->put(*this, *this, this->fill(), __n).failed()) + this->setstate(ios_base::badbit); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + this->setstate(ios_base::badbit); + if ((this->exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type* __sbin) + { + streamsize __xtrct = 0; + __streambuf_type* __sbout = this->rdbuf(); + sentry __cerb(*this); + if (__sbin && __cerb) + __xtrct = __copy_streambufs(*this, __sbin, __sbout); + if (!__sbin || !__xtrct) + this->setstate(ios_base::failbit); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::put(char_type __c) + { + sentry __cerb(*this); + if (__cerb) + { + int_type __put = rdbuf()->sputc(__c); + if (__put != traits_type::to_int_type(__c)) + this->setstate(ios_base::badbit); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::write(const _CharT* __s, streamsize __n) + { + sentry __cerb(*this); + if (__cerb) + { + streamsize __put = this->rdbuf()->sputn(__s, __n); + if ( __put != __n) + this->setstate(ios_base::badbit); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::flush() + { + sentry __cerb(*this); + if (__cerb) + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + this->setstate(ios_base::badbit); + } + return *this; + } + + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>::tellp() + { + pos_type __ret = pos_type(-1); + bool __testok = this->fail() != true; + + if (__testok) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + return __ret; + } + + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>::seekp(pos_type __pos) + { + bool __testok = this->fail() != true; + + if (__testok) + { +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 136. seekp, seekg setting wrong streams? + pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out); + +// 129. Need error indication from seekp() and seekg() + if (__err == pos_type(off_type(-1))) + this->setstate(failbit); +#endif + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __d) + { + bool __testok = this->fail() != true; + + if (__testok) + { +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 136. seekp, seekg setting wrong streams? + pos_type __err = this->rdbuf()->pubseekoff(__off, __d, + ios_base::out); + +// 129. Need error indication from seekp() and seekg() + if (__err == pos_type(off_type(-1))) + this->setstate(failbit); + } +#endif + return *this; + } + + // 27.6.2.5.4 Character inserters + + // Construct correctly padded string, as per 22.2.2.2.2 + // Similar in theory to __pad_numeric, from num_put, but it doesn't + // use _S_fill: perhaps it should. + // Assumes + // __newlen > __oldlen + // __news is allocated for __newlen size + template + void + __pad_char(basic_ios<_CharT, _Traits>& __ios, + _CharT* __news, const _CharT* __olds, + const streamsize __newlen, const streamsize __oldlen) + { + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + + int_type __plen = static_cast(__newlen - __oldlen); + char_type* __pads = static_cast(__builtin_alloca(sizeof(char_type) * __plen)); + traits_type::assign(__pads, __plen, __ios.fill()); + + char_type* __beg; + char_type* __end; + size_t __mod = 0; + size_t __beglen; //either __plen or __oldlen + ios_base::fmtflags __fmt = __ios.flags() & ios_base::adjustfield; + + if (__fmt == ios_base::left) + { + // Padding last. + __beg = const_cast(__olds); + __beglen = __oldlen; + __end = __pads; + } + else if (__fmt == ios_base::internal) + { + // Pad after the sign, if there is one. + // Pad after 0[xX], if there is one. + // Who came up with these rules, anyway? Jeeze. + typedef _Format_cache<_CharT> __cache_type; + __cache_type const* __fmt = __cache_type::_S_get(__ios); + const char_type* __minus = traits_type::find(__olds, __oldlen, + __fmt->_S_minus); + const char_type* __plus = traits_type::find(__olds, __oldlen, + __fmt->_S_plus); + bool __testsign = __minus || __plus; + bool __testhex = __olds[0] == '0' + && (__olds[1] == 'x' || __olds[1] == 'X'); + + if (__testhex) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod += 2; + __beg = const_cast(__olds + __mod); + __beglen = __oldlen - __mod; + __end = __pads; + } + else if (__testsign) + { + __mod += __plen; + const char_type* __sign = __minus ? __minus + 1: __plus + 1; + __beg = const_cast(__olds); + __beglen = __sign - __olds; + __end = const_cast(__sign + __plen); + traits_type::copy(__news + __beglen, __pads, __plen); + } + else + { + // Padding first. + __beg = __pads; + __beglen = __plen; + __end = const_cast(__olds); + } + } + else + { + // Padding first. + __beg = __pads; + __beglen = __plen; + __end = const_cast(__olds); + } + + traits_type::copy(__news, __beg, __beglen); + traits_type::copy(__news + __beglen, __end, __newlen - __beglen - __mod); + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + streamsize __w = __out.width(); + _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); + __pads[0] = __c; + streamsize __len = 1; + if (__w > __len) + { + __pad_char(__out, __pads, &__c, __w, __len); + __len = __w; + } + __out.write(__pads, __len); + __out.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __out.setstate(ios_base::badbit); + if ((__out.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __out; + } + + // Specialization + template + basic_ostream& + operator<<(basic_ostream& __out, char __c) + { + typedef basic_ostream __ostream_type; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + streamsize __w = __out.width(); + char* __pads = static_cast(__builtin_alloca(__w + 1)); + __pads[0] = __c; + streamsize __len = 1; + if (__w > __len) + { + __pad_char(__out, __pads, &__c, __w, __len); + __len = __w; + } + __out.write(__pads, __len); + __out.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __out.setstate(ios_base::badbit); + if ((__out.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __out; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + streamsize __w = __out.width(); + _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); + streamsize __len = static_cast(_Traits::length(__s)); + if (__w > __len) + { + __pad_char(__out, __pads, __s, __w, __len); + __s = __pads; + __len = __w; + } + __out.write(__s, __len); + __out.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __out.setstate(ios_base::badbit); + if ((__out.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __out; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 167. Improper use of traits_type::length() + typedef char_traits __ctraits_type; +#endif + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + size_t __clen = __ctraits_type::length(__s); + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__clen + 1))); + for (size_t __i = 0; __i <= __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + _CharT* __str = __ws; + + try + { + streamsize __len = static_cast(__clen); + streamsize __w = __out.width(); + _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); + + if (__w > __len) + { + __pad_char(__out, __pads, __ws, __w, __len); + __str = __pads; + __len = __w; + } + __out.write(__str, __len); + __out.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __out.setstate(ios_base::badbit); + if ((__out.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __out; + } + + // Partial specializationss + template + basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + typedef basic_ostream __ostream_type; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + streamsize __w = __out.width(); + char* __pads = static_cast(__builtin_alloca(__w)); + streamsize __len = static_cast(_Traits::length(__s)); + if (__w > __len) + { + __pad_char(__out, __pads, __s, __w, __len); + __s = __pads; + __len = __w; + } + __out.write(__s, __len); + __out.width(0); + } + catch(exception& __fail) + { + // 27.6.1.2.1 Common requirements. + // Turn this on without causing an ios::failure to be thrown. + __out.setstate(ios_base::badbit); + if ((__out.exceptions() & ios_base::badbit) != 0) + __throw_exception_again; + } + } + return __out; + } + + // 21.3.7.9 basic_string::operator<< + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + const _CharT* __s = __str.data(); + streamsize __w = __out.width(); + _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); + streamsize __len = static_cast(__str.size()); +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // 25. String operator<< uses width() value wrong +#endif + if (__w > __len) + { + __pad_char(__out, __pads, __s, __w, __len); + __s = __pads; + __len = __w; + } + streamsize __res = __out.rdbuf()->sputn(__s, __len); + __out.width(0); + if (__res != __len) + __out.setstate(ios_base::failbit); + } + return __out; + } +} // namespace std + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/poll.h b/contrib/media/updf/include/bits/poll.h new file mode 100644 index 0000000000..d7996b46c5 --- /dev/null +++ b/contrib/media/updf/include/bits/poll.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_POLL_H +# error "Never use directly; include instead." +#endif + +/* Event types that can be polled for. These bits may be set in `events' + to indicate the interesting event types; they will appear in `revents' + to indicate the status of the file descriptor. */ +#define POLLIN 0x001 /* There is data to read. */ +#define POLLPRI 0x002 /* There is urgent data to read. */ +#define POLLOUT 0x004 /* Writing now will not block. */ + +#ifdef __USE_XOPEN +/* These values are defined in XPG4.2. */ +# define POLLRDNORM 0x040 /* Normal data may be read. */ +# define POLLRDBAND 0x080 /* Priority data may be read. */ +# define POLLWRNORM 0x100 /* Writing now will not block. */ +# define POLLWRBAND 0x200 /* Priority data may be written. */ +#endif + +#ifdef __USE_GNU +/* These are extensions for Linux. */ +# define POLLMSG 0x400 +# define POLLREMOVE 0x1000 +# define POLLRDHUP 0x2000 +#endif + +/* Event types always implicitly polled for. These bits need not be set in + `events', but they will appear in `revents' to indicate the status of + the file descriptor. */ +#define POLLERR 0x008 /* Error condition. */ +#define POLLHUP 0x010 /* Hung up. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/contrib/media/updf/include/bits/pthread_allocimpl.h b/contrib/media/updf/include/bits/pthread_allocimpl.h new file mode 100644 index 0000000000..195905a3ac --- /dev/null +++ b/contrib/media/updf/include/bits/pthread_allocimpl.h @@ -0,0 +1,491 @@ +/* + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BITS_PTHREAD_ALLOCIMPL_H +#define _CPP_BITS_PTHREAD_ALLOCIMPL_H 1 + +// Pthread-specific node allocator. +// This is similar to the default allocator, except that free-list +// information is kept separately for each thread, avoiding locking. +// This should be reasonably fast even in the presence of threads. +// The down side is that storage may not be well-utilized. +// It is not an error to allocate memory in thread A and deallocate +// it in thread B. But this effectively transfers ownership of the memory, +// so that it can only be reallocated by thread B. Thus this can effectively +// result in a storage leak if it's done on a regular basis. +// It can also result in frequent sharing of +// cache lines among processors, with potentially serious performance +// consequences. + +#include +#include +#include +#ifndef __RESTRICT +# define __RESTRICT +#endif + +#include + +namespace std +{ + +#define __STL_DATA_ALIGNMENT 8 + +union _Pthread_alloc_obj { + union _Pthread_alloc_obj * __free_list_link; + char __client_data[__STL_DATA_ALIGNMENT]; /* The client sees this. */ +}; + +// Pthread allocators don't appear to the client to have meaningful +// instances. We do in fact need to associate some state with each +// thread. That state is represented by +// _Pthread_alloc_per_thread_state<_Max_size>. + +template +struct _Pthread_alloc_per_thread_state { + typedef _Pthread_alloc_obj __obj; + enum { _S_NFREELISTS = _Max_size/__STL_DATA_ALIGNMENT }; + _Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS]; + _Pthread_alloc_per_thread_state<_Max_size> * __next; + // Free list link for list of available per thread structures. + // When one of these becomes available for reuse due to thread + // termination, any objects in its free list remain associated + // with it. The whole structure may then be used by a newly + // created thread. + _Pthread_alloc_per_thread_state() : __next(0) + { + memset((void *)__free_list, 0, (size_t) _S_NFREELISTS * sizeof(__obj *)); + } + // Returns an object of size __n, and possibly adds to size n free list. + void *_M_refill(size_t __n); +}; + +// Pthread-specific allocator. +// The argument specifies the largest object size allocated from per-thread +// free lists. Larger objects are allocated using malloc_alloc. +// Max_size must be a power of 2. +template +class _Pthread_alloc_template { + +public: // but only for internal use: + + typedef _Pthread_alloc_obj __obj; + + // Allocates a chunk for nobjs of size size. nobjs may be reduced + // if it is inconvenient to allocate the requested number. + static char *_S_chunk_alloc(size_t __size, int &__nobjs); + + enum {_S_ALIGN = __STL_DATA_ALIGNMENT}; + + static size_t _S_round_up(size_t __bytes) { + return (((__bytes) + (int) _S_ALIGN-1) & ~((int) _S_ALIGN - 1)); + } + static size_t _S_freelist_index(size_t __bytes) { + return (((__bytes) + (int) _S_ALIGN-1)/(int)_S_ALIGN - 1); + } + +private: + // Chunk allocation state. And other shared state. + // Protected by _S_chunk_allocator_lock. + static pthread_mutex_t _S_chunk_allocator_lock; + static char *_S_start_free; + static char *_S_end_free; + static size_t _S_heap_size; + static _Pthread_alloc_per_thread_state<_Max_size>* _S_free_per_thread_states; + static pthread_key_t _S_key; + static bool _S_key_initialized; + // Pthread key under which per thread state is stored. + // Allocator instances that are currently unclaimed by any thread. + static void _S_destructor(void *instance); + // Function to be called on thread exit to reclaim per thread + // state. + static _Pthread_alloc_per_thread_state<_Max_size> *_S_new_per_thread_state(); + // Return a recycled or new per thread state. + static _Pthread_alloc_per_thread_state<_Max_size> *_S_get_per_thread_state(); + // ensure that the current thread has an associated + // per thread state. + class _M_lock; + friend class _M_lock; + class _M_lock { + public: + _M_lock () { pthread_mutex_lock(&_S_chunk_allocator_lock); } + ~_M_lock () { pthread_mutex_unlock(&_S_chunk_allocator_lock); } + }; + +public: + + /* n must be > 0 */ + static void * allocate(size_t __n) + { + __obj * volatile * __my_free_list; + __obj * __RESTRICT __result; + _Pthread_alloc_per_thread_state<_Max_size>* __a; + + if (__n > _Max_size) { + return(malloc_alloc::allocate(__n)); + } + if (!_S_key_initialized || + !(__a = (_Pthread_alloc_per_thread_state<_Max_size>*) + pthread_getspecific(_S_key))) { + __a = _S_get_per_thread_state(); + } + __my_free_list = __a -> __free_list + _S_freelist_index(__n); + __result = *__my_free_list; + if (__result == 0) { + void *__r = __a -> _M_refill(_S_round_up(__n)); + return __r; + } + *__my_free_list = __result -> __free_list_link; + return (__result); + }; + + /* p may not be 0 */ + static void deallocate(void *__p, size_t __n) + { + __obj *__q = (__obj *)__p; + __obj * volatile * __my_free_list; + _Pthread_alloc_per_thread_state<_Max_size>* __a; + + if (__n > _Max_size) { + malloc_alloc::deallocate(__p, __n); + return; + } + if (!_S_key_initialized || + !(__a = (_Pthread_alloc_per_thread_state<_Max_size> *) + pthread_getspecific(_S_key))) { + __a = _S_get_per_thread_state(); + } + __my_free_list = __a->__free_list + _S_freelist_index(__n); + __q -> __free_list_link = *__my_free_list; + *__my_free_list = __q; + } + + static void * reallocate(void *__p, size_t __old_sz, size_t __new_sz); + +} ; + +typedef _Pthread_alloc_template<> pthread_alloc; + + +template +void _Pthread_alloc_template<_Max_size>::_S_destructor(void * __instance) +{ + _M_lock __lock_instance; // Need to acquire lock here. + _Pthread_alloc_per_thread_state<_Max_size>* __s = + (_Pthread_alloc_per_thread_state<_Max_size> *)__instance; + __s -> __next = _S_free_per_thread_states; + _S_free_per_thread_states = __s; +} + +template +_Pthread_alloc_per_thread_state<_Max_size> * +_Pthread_alloc_template<_Max_size>::_S_new_per_thread_state() +{ + /* lock already held here. */ + if (0 != _S_free_per_thread_states) { + _Pthread_alloc_per_thread_state<_Max_size> *__result = + _S_free_per_thread_states; + _S_free_per_thread_states = _S_free_per_thread_states -> __next; + return __result; + } else { + return new _Pthread_alloc_per_thread_state<_Max_size>; + } +} + +template +_Pthread_alloc_per_thread_state<_Max_size> * +_Pthread_alloc_template<_Max_size>::_S_get_per_thread_state() +{ + /*REFERENCED*/ + _M_lock __lock_instance; // Need to acquire lock here. + int __ret_code; + _Pthread_alloc_per_thread_state<_Max_size> * __result; + if (!_S_key_initialized) { + if (pthread_key_create(&_S_key, _S_destructor)) { + std::__throw_bad_alloc(); // defined in funcexcept.h + } + _S_key_initialized = true; + } + __result = _S_new_per_thread_state(); + __ret_code = pthread_setspecific(_S_key, __result); + if (__ret_code) { + if (__ret_code == ENOMEM) { + std::__throw_bad_alloc(); + } else { + // EINVAL + abort(); + } + } + return __result; +} + +/* We allocate memory in large chunks in order to avoid fragmenting */ +/* the malloc heap too much. */ +/* We assume that size is properly aligned. */ +template +char *_Pthread_alloc_template<_Max_size> +::_S_chunk_alloc(size_t __size, int &__nobjs) +{ + { + char * __result; + size_t __total_bytes; + size_t __bytes_left; + /*REFERENCED*/ + _M_lock __lock_instance; // Acquire lock for this routine + + __total_bytes = __size * __nobjs; + __bytes_left = _S_end_free - _S_start_free; + if (__bytes_left >= __total_bytes) { + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else if (__bytes_left >= __size) { + __nobjs = __bytes_left/__size; + __total_bytes = __size * __nobjs; + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else { + size_t __bytes_to_get = + 2 * __total_bytes + _S_round_up(_S_heap_size >> 4); + // Try to make use of the left-over piece. + if (__bytes_left > 0) { + _Pthread_alloc_per_thread_state<_Max_size>* __a = + (_Pthread_alloc_per_thread_state<_Max_size>*) + pthread_getspecific(_S_key); + __obj * volatile * __my_free_list = + __a->__free_list + _S_freelist_index(__bytes_left); + + ((__obj *)_S_start_free) -> __free_list_link = *__my_free_list; + *__my_free_list = (__obj *)_S_start_free; + } +# ifdef _SGI_SOURCE + // Try to get memory that's aligned on something like a + // cache line boundary, so as to avoid parceling out + // parts of the same line to different threads and thus + // possibly different processors. + { + const int __cache_line_size = 128; // probable upper bound + __bytes_to_get &= ~(__cache_line_size-1); + _S_start_free = (char *)memalign(__cache_line_size, __bytes_to_get); + if (0 == _S_start_free) { + _S_start_free = (char *)malloc_alloc::allocate(__bytes_to_get); + } + } +# else /* !SGI_SOURCE */ + _S_start_free = (char *)malloc_alloc::allocate(__bytes_to_get); +# endif + _S_heap_size += __bytes_to_get; + _S_end_free = _S_start_free + __bytes_to_get; + } + } + // lock is released here + return(_S_chunk_alloc(__size, __nobjs)); +} + + +/* Returns an object of size n, and optionally adds to size n free list.*/ +/* We assume that n is properly aligned. */ +/* We hold the allocation lock. */ +template +void *_Pthread_alloc_per_thread_state<_Max_size> +::_M_refill(size_t __n) +{ + int __nobjs = 128; + char * __chunk = + _Pthread_alloc_template<_Max_size>::_S_chunk_alloc(__n, __nobjs); + __obj * volatile * __my_free_list; + __obj * __result; + __obj * __current_obj, * __next_obj; + int __i; + + if (1 == __nobjs) { + return(__chunk); + } + __my_free_list = __free_list + + _Pthread_alloc_template<_Max_size>::_S_freelist_index(__n); + + /* Build free list in chunk */ + __result = (__obj *)__chunk; + *__my_free_list = __next_obj = (__obj *)(__chunk + __n); + for (__i = 1; ; __i++) { + __current_obj = __next_obj; + __next_obj = (__obj *)((char *)__next_obj + __n); + if (__nobjs - 1 == __i) { + __current_obj -> __free_list_link = 0; + break; + } else { + __current_obj -> __free_list_link = __next_obj; + } + } + return(__result); +} + +template +void *_Pthread_alloc_template<_Max_size> +::reallocate(void *__p, size_t __old_sz, size_t __new_sz) +{ + void * __result; + size_t __copy_sz; + + if (__old_sz > _Max_size + && __new_sz > _Max_size) { + return(realloc(__p, __new_sz)); + } + if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p); + __result = allocate(__new_sz); + __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz; + memcpy(__result, __p, __copy_sz); + deallocate(__p, __old_sz); + return(__result); +} + +template +_Pthread_alloc_per_thread_state<_Max_size> * +_Pthread_alloc_template<_Max_size>::_S_free_per_thread_states = 0; + +template +pthread_key_t _Pthread_alloc_template<_Max_size>::_S_key; + +template +bool _Pthread_alloc_template<_Max_size>::_S_key_initialized = false; + +template +pthread_mutex_t _Pthread_alloc_template<_Max_size>::_S_chunk_allocator_lock += PTHREAD_MUTEX_INITIALIZER; + +template +char *_Pthread_alloc_template<_Max_size> +::_S_start_free = 0; + +template +char *_Pthread_alloc_template<_Max_size> +::_S_end_free = 0; + +template +size_t _Pthread_alloc_template<_Max_size> +::_S_heap_size = 0; + + +template +class pthread_allocator { + typedef pthread_alloc _S_Alloc; // The underlying allocator. +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template struct rebind { + typedef pthread_allocator<_NewType> other; + }; + + pthread_allocator() __STL_NOTHROW {} + pthread_allocator(const pthread_allocator& a) __STL_NOTHROW {} + template + pthread_allocator(const pthread_allocator<_OtherType>&) + __STL_NOTHROW {} + ~pthread_allocator() __STL_NOTHROW {} + + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + + // __n is permitted to be 0. The C++ standard says nothing about what + // the return value is when __n == 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 ? static_cast<_Tp*>(_S_Alloc::allocate(__n * sizeof(_Tp))) + : 0; + } + + // p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type __n) + { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); } + + size_type max_size() const __STL_NOTHROW + { return size_t(-1) / sizeof(_Tp); } + + void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); } + void destroy(pointer _p) { _p->~_Tp(); } +}; + +template<> +class pthread_allocator { +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template struct rebind { + typedef pthread_allocator<_NewType> other; + }; +}; + +template +inline bool operator==(const _Pthread_alloc_template<_Max_size>&, + const _Pthread_alloc_template<_Max_size>&) +{ + return true; +} + +template +inline bool operator==(const pthread_allocator<_T1>&, + const pthread_allocator<_T2>& a2) +{ + return true; +} + +template +inline bool operator!=(const pthread_allocator<_T1>&, + const pthread_allocator<_T2>&) +{ + return false; +} + +template +struct _Alloc_traits<_Tp, _Pthread_alloc_template<_Max_size> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, _Pthread_alloc_template<_Max_size> > _Alloc_type; + typedef __allocator<_Tp, _Pthread_alloc_template<_Max_size> > + allocator_type; +}; + +template +struct _Alloc_traits<_Tp, __allocator<_Atype, _Pthread_alloc_template<_Max> > > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, _Pthread_alloc_template<_Max> > _Alloc_type; + typedef __allocator<_Tp, _Pthread_alloc_template<_Max> > allocator_type; +}; + +template +struct _Alloc_traits<_Tp, pthread_allocator<_Atype> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, _Pthread_alloc_template<> > _Alloc_type; + typedef pthread_allocator<_Tp> allocator_type; +}; + + +} // namespace std + +#endif /* _CPP_BITS_PTHREAD_ALLOCIMPL_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/sbuf_iter.h b/contrib/media/updf/include/bits/sbuf_iter.h new file mode 100644 index 0000000000..0f2c36db30 --- /dev/null +++ b/contrib/media/updf/include/bits/sbuf_iter.h @@ -0,0 +1,203 @@ +// Streambuf iterators + +// Copyright (C) 1997-2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// XXX Should specialize copy, find algorithms for streambuf iterators. + +#ifndef _CPP_BITS_SBUF_ITER_H +#define _CPP_BITS_SBUF_ITER_H 1 + +#pragma GCC system_header + +namespace std +{ + template + class ostreambuf_iterator + : public iterator + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + inline + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + ostreambuf_iterator& + operator=(_CharT __c); + + ostreambuf_iterator& + operator*() throw() + { return *this; } + + ostreambuf_iterator& + operator++(int) throw() + { return *this; } + + ostreambuf_iterator& + operator++() throw() + { return *this; } + + bool + failed() const throw() + { return _M_failed; } + }; + + template + inline ostreambuf_iterator<_CharT, _Traits>& + ostreambuf_iterator<_CharT, _Traits>::operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c),_Traits::eof())) + _M_failed = true; + return *this; + } + + + // 24.5.3 Template class istreambuf_iterator + template + class istreambuf_iterator + : public iterator + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + // Non-standard Types: + typedef istreambuf_iterator<_CharT, _Traits> __istreambufiter_type; + + private: + // 24.5.3 istreambuf_iterator + // p 1 + // If the end of stream is reached (streambuf_type::sgetc() + // returns traits_type::eof()), the iterator becomes equal to + // the "end of stream" iterator value. + // NB: This implementation assumes the "end of stream" value + // is EOF, or -1. + streambuf_type* _M_sbuf; + int_type _M_c; + + public: + istreambuf_iterator() throw() + : _M_sbuf(NULL), _M_c(-2) { } + + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(-2) { } + + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(-2) { } + + // NB: This should really have an int_type return + // value, so "end of stream" postion can be checked without + // hacking. + char_type + operator*() const + { + // The result of operator*() on an end of stream is undefined. + char_type __ret; + if (_M_sbuf && _M_c != static_cast(-2)) + __ret = _M_c; + else if (_M_sbuf) + __ret = traits_type::to_char_type(_M_sbuf->sgetc()); + else + __ret = static_cast(traits_type::eof()); + return __ret; + } + + __istreambufiter_type& + operator++() + { + if (_M_sbuf) + _M_sbuf->sbumpc(); + _M_c = -2; + return *this; + } + + __istreambufiter_type + operator++(int) + { + __istreambufiter_type __old = *this; + if (_M_sbuf) + __old._M_c = _M_sbuf->sbumpc(); + _M_c = -2; + return __old; + } + + bool + equal(const __istreambufiter_type& __b) + { + int_type __eof = traits_type::eof(); + bool __thiseof = !_M_sbuf || _M_sbuf->sgetc() == __eof; + bool __beof = !__b._M_sbuf + || __b._M_sbuf->sgetc() == __eof; + return (__thiseof && __beof || (!__thiseof && !__beof)); + } + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // 110 istreambuf_iterator::equal not const + // NB: there is also number 111 pending on this function. + bool + equal(const __istreambufiter_type& __b) const + { + int_type __eof = traits_type::eof(); + bool __thiseof = !_M_sbuf || _M_sbuf->sgetc() == __eof; + bool __beof = !__b._M_sbuf + || __b._M_sbuf->sgetc() == __eof; + return (__thiseof && __beof || (!__thiseof && !__beof)); + } +#endif + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } +} // namespace std +#endif diff --git a/contrib/media/updf/include/bits/sequence_concepts.h b/contrib/media/updf/include/bits/sequence_concepts.h new file mode 100644 index 0000000000..f251e2e26e --- /dev/null +++ b/contrib/media/updf/include/bits/sequence_concepts.h @@ -0,0 +1,206 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _STL_SEQUENCE_CONCEPTS_H +#define _STL_SEQUENCE_CONCEPTS_H 1 + +#pragma GCC system_header + +#include + +#ifdef __STL_USE_CONCEPT_CHECKS + +// This file covers the following concepts: +// _Sequence +// _FrontInsertionSequence +// _BackInsertionSequence + +struct _ERROR_IN_STL_SEQ { + + template + static void + __fill_constructor_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + typename _XX::difference_type __n = typename _XX::difference_type(); + _XX __x(__n, __t); + __sink_unused_warning(__x); + } + template + static void + __fill_default_constructor_requirement_violation(_XX& __s) { + _STL_ERROR::__default_constructor_requirement_violation(*__s.begin()); + typename _XX::difference_type __n = typename _XX::difference_type(); + _XX __x(__n); + __sink_unused_warning(__x); + } + template + static void + __range_constructor_requirement_violation(_XX& __s) { + _XX __x(__s.begin(), __s.end()); + __sink_unused_warning(__x); + } + template + static void + __insert_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + typename _XX::iterator __p = typename _XX::iterator(); + __p = __s.insert(__p, __t); + } + template + static void + __fill_insert_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + typename _XX::iterator __p = typename _XX::iterator(); + typename _XX::difference_type __n = typename _XX::difference_type(); + __s.insert(__p, __n, __t); + } + template + static void + __range_insert_function_requirement_violation(_XX& __s) { + typename _XX::iterator __p = typename _XX::iterator(); + typename _XX::iterator __i = typename _XX::iterator(); + typename _XX::iterator __j = typename _XX::iterator(); + __s.insert(__p, __i, __j); + } + template + static void + __insert_element_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + std::pair __r; + __r = __s.insert(__t); + __sink_unused_warning(__r); + } + template + static void + __unconditional_insert_element_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + typename _XX::iterator __p; + __p = __s.insert(__t); + __sink_unused_warning(__p); + } + template + static void + __erase_function_requirement_violation(_XX& __s) { + typename _XX::iterator __p = typename _XX::iterator(); + __p = __s.erase(__p); + } + template + static void + __range_erase_function_requirement_violation(_XX& __s) { + typename _XX::iterator __p = typename _XX::iterator(); + typename _XX::iterator __q = typename _XX::iterator(); + __p = __s.erase(__p, __q); + } + template + static void + __const_front_function_requirement_violation(const _XX& __s) { + typename _XX::const_reference __t = __s.front(); + __sink_unused_warning(__t); + } + template + static void + __front_function_requirement_violation(_XX& __s) { + typename _XX::reference __t = __s.front(); + __const_front_function_requirement_violation(__s); + __sink_unused_warning(__t); + } + template + static void + __const_back_function_requirement_violation(const _XX& __s) { + typename _XX::const_reference __t = __s.back(); + __sink_unused_warning(__t); + } + template + static void + __back_function_requirement_violation(_XX& __s) { + typename _XX::reference __t = __s.back(); + __const_back_function_requirement_violation(__s); + __sink_unused_warning(__t); + } + template + static void + __push_front_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + __s.push_front(__t); + } + template + static void + __pop_front_function_requirement_violation(_XX& __s) { + __s.pop_front(); + } + template + static void + __push_back_function_requirement_violation(_XX& __s) { + typename _XX::value_type __t = typename _XX::value_type(); + __s.push_back(__t); + } + template + static void + __pop_back_function_requirement_violation(_XX& __s) { + __s.pop_back(); + } + +}; + +/* Sequence Containers */ + +template +struct _Sequence_concept_specification { +static void +_Sequence_requirement_violation(_Sequence __s) { + // Refinement of ForwardContainer + _ForwardContainer_concept_specification<_Sequence>::_ForwardContainer_requirement_violation(__s); + // Refinement of DefaultConstructible + _DefaultConstructible_concept_specification<_Sequence>::_DefaultConstructible_requirement_violation(__s); + // Valid Expressions + _ERROR_IN_STL_SEQ::__fill_constructor_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__fill_default_constructor_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__range_constructor_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__insert_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__fill_insert_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__range_insert_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__erase_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__range_erase_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__front_function_requirement_violation(__s); +} +}; + +template +struct _FrontInsertionSequence_concept_specification { +static void +_FrontInsertionSequence_requirement_violation(_FrontInsertionSequence __s) { + // Refinement of Sequence + _Sequence_concept_specification<_FrontInsertionSequence>::_Sequence_requirement_violation(__s); + // Valid Expressions + _ERROR_IN_STL_SEQ::__push_front_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__pop_front_function_requirement_violation(__s); +} +}; + +template +struct _BackInsertionSequence_concept_specification { +static void +_BackInsertionSequence_requirement_violation(_BackInsertionSequence __s) { + // Refinement of Sequence + _Sequence_concept_specification<_BackInsertionSequence>::_Sequence_requirement_violation(__s); + // Valid Expressions + _ERROR_IN_STL_SEQ::__back_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__push_back_function_requirement_violation(__s); + _ERROR_IN_STL_SEQ::__pop_back_function_requirement_violation(__s); +} +}; + +#endif /* if __STL_USE_CONCEPT_CHECKS */ + + +#endif /* _STL_SEQUENCE_CONCEPTS_H */ diff --git a/contrib/media/updf/include/bits/slice.h b/contrib/media/updf/include/bits/slice.h new file mode 100644 index 0000000000..5efb6e8cf4 --- /dev/null +++ b/contrib/media/updf/include/bits/slice.h @@ -0,0 +1,80 @@ +// The template and inlines for the -*- C++ -*- slice class. + +// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_SLICE_H +#define _CPP_BITS_SLICE_H 1 + +#pragma GCC system_header + +namespace std +{ + +class slice +{ +public: + slice (); + slice (size_t, size_t, size_t); + + size_t start () const; + size_t size () const; + size_t stride () const; + +private: + size_t _M_off; // offset + size_t _M_sz; // size + size_t _M_st; // stride unit +}; + +inline slice::slice () {} + +inline slice::slice (size_t __o, size_t __d, size_t __s) + : _M_off (__o), _M_sz (__d), _M_st (__s) {} + +inline size_t +slice::start () const + { return _M_off; } + +inline size_t +slice::size () const + { return _M_sz; } + +inline size_t +slice::stride () const + { return _M_st; } + +} // std:: + + +#endif /* _CPP_BITS_SLICE_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/slice_array.h b/contrib/media/updf/include/bits/slice_array.h new file mode 100644 index 0000000000..a38da2a837 --- /dev/null +++ b/contrib/media/updf/include/bits/slice_array.h @@ -0,0 +1,164 @@ +// The template and inlines for the -*- C++ -*- slice_array class. + +// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_SLICE_ARRAY_H +#define _CPP_BITS_SLICE_ARRAY_H 1 + +#pragma GCC system_header + +namespace std +{ + + template + class slice_array + { + public: + typedef _Tp value_type; + + void operator= (const valarray<_Tp>&) const; + void operator*= (const valarray<_Tp>&) const; + void operator/= (const valarray<_Tp>&) const; + void operator%= (const valarray<_Tp>&) const; + void operator+= (const valarray<_Tp>&) const; + void operator-= (const valarray<_Tp>&) const; + void operator^= (const valarray<_Tp>&) const; + void operator&= (const valarray<_Tp>&) const; + void operator|= (const valarray<_Tp>&) const; + void operator<<= (const valarray<_Tp>&) const; + void operator>>= (const valarray<_Tp>&) const; + void operator= (const _Tp &); + // ~slice_array (); + + template + void operator= (const _Expr<_Dom,_Tp>&) const; + template + void operator*= (const _Expr<_Dom,_Tp>&) const; + template + void operator/= (const _Expr<_Dom,_Tp>&) const; + template + void operator%= (const _Expr<_Dom,_Tp>&) const; + template + void operator+= (const _Expr<_Dom,_Tp>&) const; + template + void operator-= (const _Expr<_Dom,_Tp>&) const; + template + void operator^= (const _Expr<_Dom,_Tp>&) const; + template + void operator&= (const _Expr<_Dom,_Tp>&) const; + template + void operator|= (const _Expr<_Dom,_Tp>&) const; + template + void operator<<= (const _Expr<_Dom,_Tp>&) const; + template + void operator>>= (const _Expr<_Dom,_Tp>&) const; + + private: + friend class valarray<_Tp>; + slice_array(_Array<_Tp>, const slice&); + + const size_t _M_sz; + const size_t _M_stride; + const _Array<_Tp> _M_array; + + // this constructor is implemented since we need to return a value. + slice_array (const slice_array&); + + // not implemented + slice_array (); + slice_array& operator= (const slice_array&); + }; + + template + inline slice_array<_Tp>::slice_array (_Array<_Tp> __a, const slice& __s) + : _M_sz (__s.size ()), _M_stride (__s.stride ()), + _M_array (__a.begin () + __s.start ()) {} + + + template + inline slice_array<_Tp>::slice_array(const slice_array<_Tp>& a) + : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {} + + // template + // inline slice_array<_Tp>::~slice_array () {} + + template + inline void + slice_array<_Tp>::operator= (const _Tp& __t) + { __valarray_fill (_M_array, _M_sz, _M_stride, __t); } + + template + inline void + slice_array<_Tp>::operator= (const valarray<_Tp>& __v) const + { __valarray_copy (_Array<_Tp> (__v), _M_array, _M_sz, _M_stride); } + + template + template + inline void + slice_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const + { __valarray_copy (__e, _M_sz, _M_array, _M_stride); } + +#undef _DEFINE_VALARRAY_OPERATOR +#define _DEFINE_VALARRAY_OPERATOR(op, name) \ +template \ +inline void \ +slice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ +{ \ + _Array_augmented_##name (_M_array, _M_sz, _M_stride, _Array<_Tp> (__v));\ +} \ + \ +template template \ +inline void \ +slice_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \ +{ \ + _Array_augmented_##name (_M_array, _M_stride, __e, _M_sz); \ +} + + +_DEFINE_VALARRAY_OPERATOR(*, multiplies) +_DEFINE_VALARRAY_OPERATOR(/, divides) +_DEFINE_VALARRAY_OPERATOR(%, modulus) +_DEFINE_VALARRAY_OPERATOR(+, plus) +_DEFINE_VALARRAY_OPERATOR(-, minus) +_DEFINE_VALARRAY_OPERATOR(^, xor) +_DEFINE_VALARRAY_OPERATOR(&, and) +_DEFINE_VALARRAY_OPERATOR(|, or) +_DEFINE_VALARRAY_OPERATOR(<<, shift_left) +_DEFINE_VALARRAY_OPERATOR(>>, shift_right) + +#undef _DEFINE_VALARRAY_OPERATOR + +} // std:: + +#endif /* _CPP_BITS_SLICE_ARRAY_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/sstream.tcc b/contrib/media/updf/include/bits/sstream.tcc new file mode 100644 index 0000000000..b2c5703f8b --- /dev/null +++ b/contrib/media/updf/include/bits/sstream.tcc @@ -0,0 +1,213 @@ +// String based streams -*- C++ -*- + +// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.7 String-based streams +// + +#ifndef _CPP_BITS_SSTREAM_TCC +#define _CPP_BITS_SSTREAM_TCC 1 + +#include + +namespace std +{ + + template + basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + pbackfail(int_type __c) + { + int_type __ret = traits_type::eof(); + bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); + bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur; + + // Try to put back __c into input sequence in one of three ways. + // Order these tests done in is unspecified by the standard. + if (__testpos) + { + if (traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]) + && !__testeof) + { + --_M_in_cur; + __ret = __c; + } + else if (!__testeof) + { + --_M_in_cur; + *_M_in_cur = traits_type::to_char_type(__c); + __ret = __c; + } + else if (__testeof) + { + --_M_in_cur; + __ret = traits_type::not_eof(__c); + } + } + return __ret; + } + + template + basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + overflow(int_type __c) + { + int_type __ret = traits_type::eof(); + bool __testeof = traits_type::eq_int_type(__c, __ret); + bool __testwrite = _M_out_cur < _M_buf + _M_buf_size; + bool __testout = _M_mode & ios_base::out; + + // Try to append __c into output sequence in one of two ways. + // Order these tests done in is unspecified by the standard. + if (__testout) + { + if (!__testeof) + { + __size_type __len = max(_M_buf_size, _M_buf_size_opt); + __len *= 2; + + if (__testwrite) + __ret = this->sputc(__c); + else if (__len <= _M_string.max_size()) + { + // Force-allocate, re-sync. + _M_string = this->str(); + _M_string.reserve(__len); + _M_buf_size = static_cast(__len); + _M_really_sync(_M_in_cur - _M_in_beg, + _M_out_cur - _M_out_beg); + *_M_out_cur = traits_type::to_char_type(__c); + _M_out_cur_move(1); + __ret = __c; + } + } + else + __ret = traits_type::not_eof(__c); + } + return __ret; + } + + template + basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + bool __testin = __mode & ios_base::in && _M_mode & ios_base::in; + bool __testout = __mode & ios_base::out && _M_mode & ios_base::out; + bool __testboth = __testin && __testout && __way != ios_base::cur; + + if (_M_buf_size && ((__testin != __testout) || __testboth)) + { + char_type* __beg = _M_buf; + char_type* __curi = NULL; + char_type* __curo = NULL; + char_type* __endi = NULL; + char_type* __endo = NULL; + + if (__testin) + { + __curi = this->gptr(); + __endi = this->egptr(); + } + if (__testout) + { + __curo = this->pptr(); + __endo = this->epptr(); + } + + off_type __newoffi = 0; + off_type __newoffo = 0; + if (__way == ios_base::cur) + { + __newoffi = __curi - __beg; + __newoffo = __curo - __beg; + } + else if (__way == ios_base::end) + { + __newoffi = __endi - __beg; + __newoffo = __endo - __beg; + } + + if (__testin + && __newoffi + __off >= 0 && __endi - __beg >= __newoffi + __off) + { + _M_in_cur = __beg + __newoffi + __off; + __ret = pos_type(__newoffi); + } + if (__testout + && __newoffo + __off >= 0 && __endo - __beg >= __newoffo + __off) + { + _M_out_cur_move(__newoffo + __off - (_M_out_cur - __beg)); + __ret = pos_type(__newoffo); + } + } + return __ret; + } + + template + basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekpos(pos_type __sp, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + off_type __pos = __sp._M_position(); + char_type* __beg = NULL; + char_type* __end = NULL; + bool __testin = __mode & ios_base::in && _M_mode & ios_base::in; + bool __testout = __mode & ios_base::out && _M_mode & ios_base::out; + + if (__testin) + { + __beg = this->eback(); + __end = this->egptr(); + } + if (__testout) + { + __beg = this->pbase(); + __end = _M_buf + _M_buf_size; + } + + if (0 <= __pos && __pos <= __end - __beg) + { + // Need to set both of these if applicable + if (__testin) + _M_in_cur = _M_in_beg + __pos; + if (__testout) + _M_out_cur_move((__pos) - (_M_out_cur - __beg)); + __ret = pos_type(off_type(__pos)); + } + + return __ret; + } + +} // namespace std + +#endif /* _CPP_BITS_SSTREAM_TCC */ + diff --git a/contrib/media/updf/include/bits/std_algorithm.h b/contrib/media/updf/include/bits/std_algorithm.h new file mode 100644 index 0000000000..4079cf3665 --- /dev/null +++ b/contrib/media/updf/include/bits/std_algorithm.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_ALGORITHM +#define _CPP_ALGORITHM 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include + +#endif /* _CPP_ALGORITHM */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_bitset.h b/contrib/media/updf/include/bits/std_bitset.h new file mode 100644 index 0000000000..eee8247af7 --- /dev/null +++ b/contrib/media/updf/include/bits/std_bitset.h @@ -0,0 +1,782 @@ +/* + * Copyright (c) 1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __SGI_STL_BITSET +#define __SGI_STL_BITSET + +#pragma GCC system_header + +// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused +// bits. (They are the high- order bits in the highest word.) It is +// a class invariant of class bitset<> that those unused bits are +// always zero. + +// Most of the actual code isn't contained in bitset<> itself, but in the +// base class _Base_bitset. The base class works with whole words, not with +// individual bits. This allows us to specialize _Base_bitset for the +// important special case where the bitset is only a single word. + +// The C++ standard does not define the precise semantics of operator[]. +// In this implementation the const version of operator[] is equivalent +// to test(), except that it does no range checking. The non-const version +// returns a reference to a bit, again without doing any range checking. + + +#include // for size_t +#include // for memset +#include +#include // for invalid_argument, out_of_range, + // overflow_error + +#include // for ostream (operator<<) +#include // for istream (operator>>) + +#define _GLIBCPP_BITSET_BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long)) +#define __BITSET_WORDS(__n) \ + ((__n) < 1 ? 1 : ((__n) + _GLIBCPP_BITSET_BITS_PER_WORD - 1)/_GLIBCPP_BITSET_BITS_PER_WORD) + +namespace std +{ + +// structure to aid in counting bits +template +struct _Bit_count { + static unsigned char _S_bit_count[256]; +}; + +// Mapping from 8 bit unsigned integers to the index of the first one +// bit: +template +struct _First_one { + static unsigned char _S_first_one[256]; +}; + +// +// Base class: general case. +// + +template +struct _Base_bitset { + typedef unsigned long _WordT; + + _WordT _M_w[_Nw]; // 0 is the least significant word. + + _Base_bitset( void ) { _M_do_reset(); } + _Base_bitset(unsigned long __val) { + _M_do_reset(); + _M_w[0] = __val; + } + + static size_t _S_whichword( size_t __pos ) + { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; } + static size_t _S_whichbyte( size_t __pos ) + { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; } + static size_t _S_whichbit( size_t __pos ) + { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; } + static _WordT _S_maskbit( size_t __pos ) + { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } + + _WordT& _M_getword(size_t __pos) { return _M_w[_S_whichword(__pos)]; } + _WordT _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; } + + _WordT& _M_hiword() { return _M_w[_Nw - 1]; } + _WordT _M_hiword() const { return _M_w[_Nw - 1]; } + + void _M_do_and(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] &= __x._M_w[__i]; + } + } + + void _M_do_or(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] |= __x._M_w[__i]; + } + } + + void _M_do_xor(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] ^= __x._M_w[__i]; + } + } + + void _M_do_left_shift(size_t __shift); + void _M_do_right_shift(size_t __shift); + + void _M_do_flip() { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] = ~_M_w[__i]; + } + } + + void _M_do_set() { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] = ~static_cast<_WordT>(0); + } + } + + void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); } + + bool _M_is_equal(const _Base_bitset<_Nw>& __x) const { + for (size_t __i = 0; __i < _Nw; ++__i) { + if (_M_w[__i] != __x._M_w[__i]) + return false; + } + return true; + } + + bool _M_is_any() const { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + if ( _M_w[__i] != static_cast<_WordT>(0) ) + return true; + } + return false; + } + + size_t _M_do_count() const { + size_t __result = 0; + const unsigned char* __byte_ptr = (const unsigned char*)_M_w; + const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw); + + while ( __byte_ptr < __end_ptr ) { + __result += _Bit_count::_S_bit_count[*__byte_ptr]; + __byte_ptr++; + } + return __result; + } + + unsigned long _M_do_to_ulong() const; + + // find first "on" bit + size_t _M_do_find_first(size_t __not_found) const; + + // find the next "on" bit that follows "prev" + size_t _M_do_find_next(size_t __prev, size_t __not_found) const; +}; + +// +// Definitions of non-inline functions from _Base_bitset. +// + +template +void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) +{ + if (__shift != 0) { + const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD; + const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD; + + if (__offset == 0) + for (size_t __n = _Nw - 1; __n >= __wshift; --__n) + _M_w[__n] = _M_w[__n - __wshift]; + + else { + const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset; + for (size_t __n = _Nw - 1; __n > __wshift; --__n) + _M_w[__n] = (_M_w[__n - __wshift] << __offset) | + (_M_w[__n - __wshift - 1] >> __sub_offset); + _M_w[__wshift] = _M_w[0] << __offset; + } + + fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); + } +} + +template +void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) +{ + if (__shift != 0) { + const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD; + const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD; + const size_t __limit = _Nw - __wshift - 1; + + if (__offset == 0) + for (size_t __n = 0; __n <= __limit; ++__n) + _M_w[__n] = _M_w[__n + __wshift]; + + else { + const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset; + for (size_t __n = 0; __n < __limit; ++__n) + _M_w[__n] = (_M_w[__n + __wshift] >> __offset) | + (_M_w[__n + __wshift + 1] << __sub_offset); + _M_w[__limit] = _M_w[_Nw-1] >> __offset; + } + + fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); + } +} + +template +unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const +{ + for (size_t __i = 1; __i < _Nw; ++__i) + if (_M_w[__i]) + __STL_THROW(overflow_error("bitset")); + + return _M_w[0]; +} + +template +size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const +{ + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _WordT __thisword = _M_w[__i]; + if ( __thisword != static_cast<_WordT>(0) ) { + // find byte within word + for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = static_cast(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + } + // not found, so return an indication of failure. + return __not_found; +} + +template +size_t +_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const +{ + // make bound inclusive + ++__prev; + + // check out of bounds + if ( __prev >= _Nw * _GLIBCPP_BITSET_BITS_PER_WORD ) + return __not_found; + + // search first word + size_t __i = _S_whichword(__prev); + _WordT __thisword = _M_w[__i]; + + // mask off bits below bound + __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); + + if ( __thisword != static_cast<_WordT>(0) ) { + // find byte within word + // get first byte into place + __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; + for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = static_cast(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + + // check subsequent words + __i++; + for ( ; __i < _Nw; __i++ ) { + __thisword = _M_w[__i]; + if ( __thisword != static_cast<_WordT>(0) ) { + // find byte within word + for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = static_cast(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + } + + // not found, so return an indication of failure. + return __not_found; +} // end _M_do_find_next + + +// ------------------------------------------------------------ + +// +// Base class: specialization for a single word. +// + +template<> struct _Base_bitset<1> { + typedef unsigned long _WordT; + _WordT _M_w; + + _Base_bitset( void ) : _M_w(0) {} + _Base_bitset(unsigned long __val) : _M_w(__val) {} + + static size_t _S_whichword( size_t __pos ) + { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; } + static size_t _S_whichbyte( size_t __pos ) + { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; } + static size_t _S_whichbit( size_t __pos ) + { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; } + static _WordT _S_maskbit( size_t __pos ) + { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } + + _WordT& _M_getword(size_t) { return _M_w; } + _WordT _M_getword(size_t) const { return _M_w; } + + _WordT& _M_hiword() { return _M_w; } + _WordT _M_hiword() const { return _M_w; } + + void _M_do_and(const _Base_bitset<1>& __x) { _M_w &= __x._M_w; } + void _M_do_or(const _Base_bitset<1>& __x) { _M_w |= __x._M_w; } + void _M_do_xor(const _Base_bitset<1>& __x) { _M_w ^= __x._M_w; } + void _M_do_left_shift(size_t __shift) { _M_w <<= __shift; } + void _M_do_right_shift(size_t __shift) { _M_w >>= __shift; } + void _M_do_flip() { _M_w = ~_M_w; } + void _M_do_set() { _M_w = ~static_cast<_WordT>(0); } + void _M_do_reset() { _M_w = 0; } + + bool _M_is_equal(const _Base_bitset<1>& __x) const + { return _M_w == __x._M_w; } + bool _M_is_any() const + { return _M_w != 0; } + + size_t _M_do_count() const { + size_t __result = 0; + const unsigned char* __byte_ptr = (const unsigned char*)&_M_w; + const unsigned char* __end_ptr + = ((const unsigned char*)&_M_w)+sizeof(_M_w); + while ( __byte_ptr < __end_ptr ) { + __result += _Bit_count::_S_bit_count[*__byte_ptr]; + __byte_ptr++; + } + return __result; + } + + unsigned long _M_do_to_ulong() const { return _M_w; } + + size_t _M_do_find_first(size_t __not_found) const; + + // find the next "on" bit that follows "prev" + size_t _M_do_find_next(size_t __prev, size_t __not_found) const; + +}; + + +// ------------------------------------------------------------ +// Helper class to zero out the unused high-order bits in the highest word. + +template struct _Sanitize { + static void _M_do_sanitize(unsigned long& __val) + { __val &= ~((~static_cast(0)) << _Extrabits); } +}; + +template<> struct _Sanitize<0> { + static void _M_do_sanitize(unsigned long) {} +}; + + + +// ------------------------------------------------------------ +// Class bitset. +// _Nb may be any nonzero number of type size_t. + +template +class bitset : private _Base_bitset<__BITSET_WORDS(_Nb)> +{ +private: + typedef _Base_bitset<__BITSET_WORDS(_Nb)> _Base; + typedef unsigned long _WordT; + +private: + void _M_do_sanitize() { + _Sanitize<_Nb%_GLIBCPP_BITSET_BITS_PER_WORD>::_M_do_sanitize(this->_M_hiword()); + } + +public: + + // bit reference: + class reference; + friend class reference; + + class reference { + friend class bitset; + + _WordT *_M_wp; + size_t _M_bpos; + + // left undefined + reference(); + + public: + reference( bitset& __b, size_t __pos ) { + _M_wp = &__b._M_getword(__pos); + _M_bpos = _Base::_S_whichbit(__pos); + } + + ~reference() {} + + // for b[i] = __x; + reference& operator=(bool __x) { + if ( __x ) + *_M_wp |= _Base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Base::_S_maskbit(_M_bpos); + + return *this; + } + + // for b[i] = b[__j]; + reference& operator=(const reference& __j) { + if ( (*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)) ) + *_M_wp |= _Base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Base::_S_maskbit(_M_bpos); + + return *this; + } + + // flips the bit + bool operator~() const + { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } + + // for __x = b[i]; + operator bool() const + { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } + + // for b[i].flip(); + reference& flip() { + *_M_wp ^= _Base::_S_maskbit(_M_bpos); + return *this; + } + }; + + // 23.3.5.1 constructors: + bitset() {} + bitset(unsigned long __val) : _Base_bitset<__BITSET_WORDS(_Nb)>(__val) + { _M_do_sanitize(); } + + template + explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __pos = 0) + : _Base() + { + if (__pos > __s.size()) + __STL_THROW(out_of_range("bitset")); + _M_copy_from_string(__s, __pos, + basic_string<_CharT, _Traits, _Alloc>::npos); + } + template + bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __pos, + size_t __n) + : _Base() + { + if (__pos > __s.size()) + __STL_THROW(out_of_range("bitset")); + _M_copy_from_string(__s, __pos, __n); + } + + // 23.3.5.2 bitset operations: + bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) { + this->_M_do_and(__rhs); + return *this; + } + + bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) { + this->_M_do_or(__rhs); + return *this; + } + + bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) { + this->_M_do_xor(__rhs); + return *this; + } + + bitset<_Nb>& operator<<=(size_t __pos) { + this->_M_do_left_shift(__pos); + this->_M_do_sanitize(); + return *this; + } + + bitset<_Nb>& operator>>=(size_t __pos) { + this->_M_do_right_shift(__pos); + this->_M_do_sanitize(); + return *this; + } + + // + // Extension: + // Versions of single-bit set, reset, flip, test with no range checking. + // + + bitset<_Nb>& _Unchecked_set(size_t __pos) { + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) { + if (__val) + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); + else + this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); + + return *this; + } + + bitset<_Nb>& _Unchecked_reset(size_t __pos) { + this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& _Unchecked_flip(size_t __pos) { + this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); + return *this; + } + + bool _Unchecked_test(size_t __pos) const { + return (this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) + != static_cast<_WordT>(0); + } + + // Set, reset, and flip. + + bitset<_Nb>& set() { + this->_M_do_set(); + this->_M_do_sanitize(); + return *this; + } + + bitset<_Nb>& set(size_t __pos, bool __val = true) { + if (__pos >= _Nb) + __STL_THROW(out_of_range("bitset")); + + return _Unchecked_set(__pos, __val); + } + + bitset<_Nb>& reset() { + this->_M_do_reset(); + return *this; + } + + bitset<_Nb>& reset(size_t __pos) { + if (__pos >= _Nb) + __STL_THROW(out_of_range("bitset")); + + return _Unchecked_reset(__pos); + } + + bitset<_Nb>& flip() { + this->_M_do_flip(); + this->_M_do_sanitize(); + return *this; + } + + bitset<_Nb>& flip(size_t __pos) { + if (__pos >= _Nb) + __STL_THROW(out_of_range("bitset")); + + return _Unchecked_flip(__pos); + } + + bitset<_Nb> operator~() const { + return bitset<_Nb>(*this).flip(); + } + + // element access: + //for b[i]; + reference operator[](size_t __pos) { return reference(*this,__pos); } + bool operator[](size_t __pos) const { return _Unchecked_test(__pos); } + + unsigned long to_ulong() const { return this->_M_do_to_ulong(); } + + template + basic_string<_CharT, _Traits, _Alloc> to_string() const { + basic_string<_CharT, _Traits, _Alloc> __result; + _M_copy_to_string(__result); + return __result; + } + + // Helper functions for string operations. + template + void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, + size_t, + size_t); + + template + void _M_copy_to_string(basic_string<_CharT,_Traits,_Alloc>&) const; + + size_t count() const { return this->_M_do_count(); } + + size_t size() const { return _Nb; } + + bool operator==(const bitset<_Nb>& __rhs) const { + return this->_M_is_equal(__rhs); + } + bool operator!=(const bitset<_Nb>& __rhs) const { + return !this->_M_is_equal(__rhs); + } + + bool test(size_t __pos) const { + if (__pos >= _Nb) + __STL_THROW(out_of_range("bitset")); + + return _Unchecked_test(__pos); + } + + bool any() const { return this->_M_is_any(); } + bool none() const { return !this->_M_is_any(); } + + bitset<_Nb> operator<<(size_t __pos) const + { return bitset<_Nb>(*this) <<= __pos; } + bitset<_Nb> operator>>(size_t __pos) const + { return bitset<_Nb>(*this) >>= __pos; } + + // + // EXTENSIONS: bit-find operations. These operations are + // experimental, and are subject to change or removal in future + // versions. + // + + // find the index of the first "on" bit + size_t _Find_first() const + { return this->_M_do_find_first(_Nb); } + + // find the index of the next "on" bit after prev + size_t _Find_next( size_t __prev ) const + { return this->_M_do_find_next(__prev, _Nb); } + +}; + +// +// Definitions of non-inline member functions. +// + +template +template +void bitset<_Nb> + ::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, + size_t __pos, + size_t __n) +{ + reset(); + const size_t __nbits = min(_Nb, min(__n, __s.size() - __pos)); + for (size_t __i = 0; __i < __nbits; ++__i) { + switch(__s[__pos + __nbits - __i - 1]) { + case '0': + break; + case '1': + set(__i); + break; + default: + __STL_THROW(invalid_argument("bitset")); + } + } +} + +template +template +void bitset<_Nb> + ::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const +{ + __s.assign(_Nb, '0'); + + for (size_t __i = 0; __i < _Nb; ++__i) + if (_Unchecked_test(__i)) + __s[_Nb - 1 - __i] = '1'; +} + +// ------------------------------------------------------------ + +// +// 23.3.5.3 bitset operations: +// + +template +inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result &= __y; + return __result; +} + + +template +inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result |= __y; + return __result; +} + +template +inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result ^= __y; + return __result; +} + +template +basic_istream<_CharT, _Traits>& +operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) +{ + typedef typename _Traits::char_type char_type; + basic_string<_CharT, _Traits> __tmp; + __tmp.reserve(_Nb); + + // Skip whitespace + typename basic_istream<_CharT, _Traits>::sentry __sentry(__is); + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); + for (size_t __i = 0; __i < _Nb; ++__i) { + static typename _Traits::int_type __eof = _Traits::eof(); + + typename _Traits::int_type __c1 = __buf->sbumpc(); + if (_Traits::eq_int_type(__c1, __eof)) { + __is.setstate(ios_base::eofbit); + break; + } + else { + char_type __c2 = _Traits::to_char_type(__c1); + char_type __c = __is.narrow(__c2, '*'); + + if (__c == '0' || __c == '1') + __tmp.push_back(__c); + else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) { + __is.setstate(ios_base::failbit); + break; + } + } + } + + if (__tmp.empty()) + __is.setstate(ios_base::failbit); + else + __x._M_copy_from_string(__tmp, static_cast(0), _Nb); + } + + return __is; +} + +template +basic_ostream<_CharT, _Traits>& +operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x) +{ + basic_string<_CharT, _Traits> __tmp; + __x._M_copy_to_string(__tmp); + return __os << __tmp; +} + +} // namespace std + +#undef __BITSET_WORDS + +#endif /* __SGI_STL_BITSET */ + + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/std_complex.h b/contrib/media/updf/include/bits/std_complex.h new file mode 100644 index 0000000000..e16a3bd2c8 --- /dev/null +++ b/contrib/media/updf/include/bits/std_complex.h @@ -0,0 +1,1025 @@ +// The template and inlines for the -*- C++ -*- complex number classes. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.2 Complex Numbers +// Note: this is not a conforming implementation. +// Initially implemented by Ulrich Drepper +// Improved by Gabriel Dos Reis +// + +#ifndef _CPP_COMPLEX +#define _CPP_COMPLEX 1 + +#pragma GCC system_header + +#include +#include +#include + +namespace std +{ + // Forward declarations + template class complex; + template<> class complex; + template<> class complex; + template<> class complex; + + template _Tp abs(const complex<_Tp>&); + template _Tp arg(const complex<_Tp>&); + template _Tp norm(const complex<_Tp>&); + + template complex<_Tp> conj(const complex<_Tp>&); + template complex<_Tp> polar(const _Tp&, const _Tp&); + + // Transcendentals: + template complex<_Tp> cos(const complex<_Tp>&); + template complex<_Tp> cosh(const complex<_Tp>&); + template complex<_Tp> exp(const complex<_Tp>&); + template complex<_Tp> log(const complex<_Tp>&); + template complex<_Tp> log10(const complex<_Tp>&); + template complex<_Tp> pow(const complex<_Tp>&, int); + template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); + template complex<_Tp> pow(const complex<_Tp>&, + const complex<_Tp>&); + template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); + template complex<_Tp> sin(const complex<_Tp>&); + template complex<_Tp> sinh(const complex<_Tp>&); + template complex<_Tp> sqrt(const complex<_Tp>&); + template complex<_Tp> tan(const complex<_Tp>&); + template complex<_Tp> tanh(const complex<_Tp>&); + + + // 26.2.2 Primary template class complex + template + class complex + { + public: + typedef _Tp value_type; + + complex(const _Tp& = _Tp(), const _Tp & = _Tp()); + + // Let's the compiler synthetize the copy constructor + // complex (const complex<_Tp>&); + template + complex(const complex<_Up>&); + + _Tp real() const; + _Tp imag() const; + + complex<_Tp>& operator=(const _Tp&); + complex<_Tp>& operator+=(const _Tp&); + complex<_Tp>& operator-=(const _Tp&); + complex<_Tp>& operator*=(const _Tp&); + complex<_Tp>& operator/=(const _Tp&); + + // Let's the compiler synthetize the + // copy and assignment operator + // complex<_Tp>& operator= (const complex<_Tp>&); + template + complex<_Tp>& operator=(const complex<_Up>&); + template + complex<_Tp>& operator+=(const complex<_Up>&); + template + complex<_Tp>& operator-=(const complex<_Up>&); + template + complex<_Tp>& operator*=(const complex<_Up>&); + template + complex<_Tp>& operator/=(const complex<_Up>&); + + private: + _Tp _M_real, _M_imag; + }; + + template + inline _Tp + complex<_Tp>::real() const { return _M_real; } + + template + inline _Tp + complex<_Tp>::imag() const { return _M_imag; } + + template + inline + complex<_Tp>::complex(const _Tp& __r, const _Tp& __i) + : _M_real(__r), _M_imag(__i) { } + + template + template + inline + complex<_Tp>::complex(const complex<_Up>& __z) + : _M_real(__z.real()), _M_imag(__z.imag()) { } + + template + complex<_Tp>& + complex<_Tp>::operator=(const _Tp& __t) + { + _M_real = __t; + _M_imag = _Tp(); + return *this; + } + + // 26.2.5/1 + template + inline complex<_Tp>& + complex<_Tp>::operator+=(const _Tp& __t) + { + _M_real += __t; + return *this; + } + + // 26.2.5/3 + template + inline complex<_Tp>& + complex<_Tp>::operator-=(const _Tp& __t) + { + _M_real -= __t; + return *this; + } + + // 26.2.5/5 + template + complex<_Tp>& + complex<_Tp>::operator*=(const _Tp& __t) + { + _M_real *= __t; + _M_imag *= __t; + return *this; + } + + // 26.2.5/7 + template + complex<_Tp>& + complex<_Tp>::operator/=(const _Tp& __t) + { + _M_real /= __t; + _M_imag /= __t; + return *this; + } + + template + template + complex<_Tp>& + complex<_Tp>::operator=(const complex<_Up>& __z) + { + _M_real = __z.real(); + _M_imag = __z.imag(); + return *this; + } + + // 26.2.5/9 + template + template + complex<_Tp>& + complex<_Tp>::operator+=(const complex<_Up>& __z) + { + _M_real += __z.real(); + _M_imag += __z.imag(); + return *this; + } + + // 26.2.5/11 + template + template + complex<_Tp>& + complex<_Tp>::operator-=(const complex<_Up>& __z) + { + _M_real -= __z.real(); + _M_imag -= __z.imag(); + return *this; + } + + // 26.2.5/13 + // XXX: This is a grammar school implementation. + template + template + complex<_Tp>& + complex<_Tp>::operator*=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); + _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); + _M_real = __r; + return *this; + } + + // 26.2.5/15 + // XXX: This is a grammar school implementation. + template + template + complex<_Tp>& + complex<_Tp>::operator/=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); + const _Tp __n = norm(__z); + _M_imag = (_M_real * __z.imag() - _M_imag * __z.real()) / __n; + _M_real = __r / __n; + return *this; + } + + // Operators: + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) += __y; } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) += __y; } + + template + inline complex<_Tp> + operator+(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__y) += __x; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator-(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) *= __y; } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) *= __y; } + + template + inline complex<_Tp> + operator*(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__y) *= __x; } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator/(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x) + { return __x; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x) + { return complex<_Tp>(-__x.real(), -__x.imag()); } + + template + inline bool + operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() == __y.real() && __x.imag() == __y.imag(); } + + template + inline bool + operator==(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() == __y && __x.imag() == _Tp(); } + + template + inline bool + operator==(const _Tp& __x, const complex<_Tp>& __y) + { return __x == __y.real() && _Tp() == __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() != __y.real() || __x.imag() != __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() != __y || __x.imag() != _Tp(); } + + template + inline bool + operator!=(const _Tp& __x, const complex<_Tp>& __y) + { return __x != __y.real() || _Tp() != __y.imag(); } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) + { + _Tp __re_x, __im_x; + _CharT __ch; + __is >> __ch; + if (__ch == '(') + { + __is >> __re_x >> __ch; + if (__ch == ',') + { + __is >> __im_x >> __ch; + if (__ch == ')') + __x = complex<_Tp>(__re_x, __im_x); + else + __is.setstate(ios_base::failbit); + } + else if (__ch == ')') + __x = complex<_Tp>(__re_x, _Tp(0)); + else + __is.setstate(ios_base::failbit); + } + else + { + __is.putback(__ch); + __is >> __re_x; + __x = complex<_Tp>(__re_x, _Tp(0)); + } + return __is; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) + { + basic_ostringstream<_CharT, _Traits> __s; + __s.flags(__os.flags()); + __s.imbue(__os.getloc()); + __s.precision(__os.precision()); + __s << '(' << __x.real() << "," << __x.imag() << ')'; + return __os << __s.str(); + } + + // Values + template + inline _Tp + real(const complex<_Tp>& __z) + { return __z.real(); } + + template + inline _Tp + imag(const complex<_Tp>& __z) + { return __z.imag(); } + + template + inline _Tp + abs(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + const _Tp __s = abs(__x) + abs(__y); + if (__s == _Tp()) // well ... + return __s; + __x /= __s; + __y /= __s; + return __s * sqrt(__x * __x + __y * __y); + } + + template + inline _Tp + arg(const complex<_Tp>& __z) + { return atan2(__z.imag(), __z.real()); } + + template + inline _Tp + norm(const complex<_Tp>& __z) + { + _Tp __res = abs(__z); + return __res * __res; + } + + template + inline complex<_Tp> + polar(const _Tp& __rho, const _Tp& __theta) + { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + + template + inline complex<_Tp> + conj(const complex<_Tp>& __z) + { return complex<_Tp>(__z.real(), -__z.imag()); } + + // Transcendentals + template + inline complex<_Tp> + cos(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); + } + + template + inline complex<_Tp> + cosh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); + } + + template + inline complex<_Tp> + exp(const complex<_Tp>& __z) + { return polar(exp(__z.real()), __z.imag()); } + + template + inline complex<_Tp> + log(const complex<_Tp>& __z) + { return complex<_Tp>(log(abs(__z)), arg(__z)); } + + template + inline complex<_Tp> + log10(const complex<_Tp>& __z) + { return log(__z) / log(_Tp(10.0)); } + + template + inline complex<_Tp> + sin(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); + } + + template + inline complex<_Tp> + sinh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); + } + + template + complex<_Tp> + sqrt(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + + if (__x == _Tp()) + { + _Tp __t = sqrt(abs(__y) / 2); + return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); + } + else + { + _Tp __t = sqrt(2 * (abs(__z) + abs(__x))); + _Tp __u = __t / 2; + return __x > _Tp() + ? complex<_Tp>(__u, __y / __t) + : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); + } + } + + template + inline complex<_Tp> + tan(const complex<_Tp>& __z) + { + return sin(__z) / cos(__z); + } + + template + inline complex<_Tp> + tanh(const complex<_Tp>& __z) + { + return sinh(__z) / cosh(__z); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { + return __pow_helper(__z, __n); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + return exp(__y * log(__x)); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + return exp(__y * log(__x)); + } + + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return exp(__y * log(__x)); + } + + // 26.2.3 complex specializations + // complex specialization + template<> class complex + { + public: + typedef float value_type; + + complex(float = 0.0f, float = 0.0f); +#ifdef _GLIBCPP_BUGGY_COMPLEX + complex(const complex& __z) : _M_value(__z._M_value) { } +#endif + explicit complex(const complex&); + explicit complex(const complex&); + + float real() const; + float imag() const; + + complex& operator=(float); + complex& operator+=(float); + complex& operator-=(float); + complex& operator*=(float); + complex& operator/=(float); + + // Let's the compiler synthetize the copy and assignment + // operator. It always does a pretty good job. + // complex& operator= (const complex&); + template + complex&operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex&operator/=(const complex<_Tp>&); + + private: + typedef __complex__ float _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline float + complex::real() const + { return __real__ _M_value; } + + inline float + complex::imag() const + { return __imag__ _M_value; } + + inline + complex::complex(float r, float i) + { + __real__ _M_value = r; + __imag__ _M_value = i; + } + + inline complex& + complex::operator=(float __f) + { + __real__ _M_value = __f; + __imag__ _M_value = 0.0f; + return *this; + } + + inline complex& + complex::operator+=(float __f) + { + __real__ _M_value += __f; + return *this; + } + + inline complex& + complex::operator-=(float __f) + { + __real__ _M_value -= __f; + return *this; + } + + inline complex& + complex::operator*=(float __f) + { + _M_value *= __f; + return *this; + } + + inline complex& + complex::operator/=(float __f) + { + _M_value /= __f; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + // 26.2.3 complex specializations + // complex specialization + template<> class complex + { + public: + typedef double value_type; + + complex(double =0.0, double =0.0); +#ifdef _GLIBCPP_BUGGY_COMPLEX + complex(const complex& __z) : _M_value(__z._M_value) { } +#endif + complex(const complex&); + explicit complex(const complex&); + + double real() const; + double imag() const; + + complex& operator=(double); + complex& operator+=(double); + complex& operator-=(double); + complex& operator*=(double); + complex& operator/=(double); + + // The compiler will synthetize this, efficiently. + // complex& operator= (const complex&); + template + complex& operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex& operator/=(const complex<_Tp>&); + + private: + typedef __complex__ double _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline double + complex::real() const + { return __real__ _M_value; } + + inline double + complex::imag() const + { return __imag__ _M_value; } + + inline + complex::complex(double __r, double __i) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + inline complex& + complex::operator=(double __d) + { + __real__ _M_value = __d; + __imag__ _M_value = 0.0; + return *this; + } + + inline complex& + complex::operator+=(double __d) + { + __real__ _M_value += __d; + return *this; + } + + inline complex& + complex::operator-=(double __d) + { + __real__ _M_value -= __d; + return *this; + } + + inline complex& + complex::operator*=(double __d) + { + _M_value *= __d; + return *this; + } + + inline complex& + complex::operator/=(double __d) + { + _M_value /= __d; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + // 26.2.3 complex specializations + // complex specialization + template<> class complex + { + public: + typedef long double value_type; + + complex(long double = 0.0L, long double = 0.0L); +#ifdef _GLIBCPP_BUGGY_COMPLEX + complex(const complex& __z) : _M_value(__z._M_value) { } +#endif + complex(const complex&); + complex(const complex&); + + long double real() const; + long double imag() const; + + complex& operator= (long double); + complex& operator+= (long double); + complex& operator-= (long double); + complex& operator*= (long double); + complex& operator/= (long double); + + // The compiler knows how to do this efficiently + // complex& operator= (const complex&); + template + complex& operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex& operator/=(const complex<_Tp>&); + + private: + typedef __complex__ long double _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline + complex::complex(long double __r, long double __i) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + inline long double + complex::real() const + { return __real__ _M_value; } + + inline long double + complex::imag() const + { return __imag__ _M_value; } + + inline complex& + complex::operator=(long double __r) + { + __real__ _M_value = __r; + __imag__ _M_value = 0.0L; + return *this; + } + + inline complex& + complex::operator+=(long double __r) + { + __real__ _M_value += __r; + return *this; + } + + inline complex& + complex::operator-=(long double __r) + { + __real__ _M_value -= __r; + return *this; + } + + inline complex& + complex::operator*=(long double __r) + { + __real__ _M_value *= __r; + return *this; + } + + inline complex& + complex::operator/=(long double __r) + { + __real__ _M_value /= __r; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + // These bits have to be at the end of this file, so that the + // specializations have all been defined. + // ??? No, they have to be there because of compiler limitation at + // inlining. It suffices that class specializations be defined. + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } +} // namespace std + +#endif /* _CPP_COMPLEX */ diff --git a/contrib/media/updf/include/bits/std_deque.h b/contrib/media/updf/include/bits/std_deque.h new file mode 100644 index 0000000000..f8760a51ad --- /dev/null +++ b/contrib/media/updf/include/bits/std_deque.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_DEQUE +#define _CPP_DEQUE 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_DEQUE */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_fstream.h b/contrib/media/updf/include/bits/std_fstream.h new file mode 100644 index 0000000000..a0604abbe0 --- /dev/null +++ b/contrib/media/updf/include/bits/std_fstream.h @@ -0,0 +1,425 @@ +// File based streams -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8 File-based streams +// + +#ifndef _CPP_FSTREAM +#define _CPP_FSTREAM 1 + +#pragma GCC system_header + +#include +#include +#include +#include // For codecvt +#include + +namespace std +{ + template + class basic_filebuf : public basic_streambuf<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard Types: + typedef basic_streambuf __streambuf_type; + typedef basic_filebuf __filebuf_type; + typedef __basic_file __file_type; + typedef typename traits_type::state_type __state_type; + typedef codecvt __codecvt_type; + typedef typename __codecvt_type::result __res_type; + typedef ctype __ctype_type; + + friend class ios_base; // For sync_with_stdio. + + private: + // Data Members: + // External buffer. + __file_type* _M_file; + + // Current and beginning state type for codecvt. + __state_type _M_state_cur; + __state_type _M_state_beg; + + // MT lock inherited from libio or other low-level io library. + __c_lock _M_lock; + + // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.. + bool _M_buf_allocated; + + // XXX Needed? + bool _M_last_overflowed; + + public: + // Constructors/destructor: + basic_filebuf(); + + // Non-standard ctor: + basic_filebuf(__c_file_type* __f, ios_base::openmode __mode, + int_type __s = static_cast(BUFSIZ)); + + virtual + ~basic_filebuf() + { + this->close(); + _M_last_overflowed = false; + } + + // Members: + bool + is_open(void) const { return _M_file ? _M_file->is_open() : false; } + + __filebuf_type* + open(const char* __s, ios_base::openmode __mode); + + __filebuf_type* + close(void); + + protected: + void + _M_allocate_internal_buffer(); + + void + _M_destroy_internal_buffer(); + + void + _M_allocate_pback_buffer(); + + // Create __file_type object and initialize it properly. + void + _M_allocate_file(); + + // Overridden virtual functions: + virtual streamsize + showmanyc(void); + + // Stroustrup, 1998, p. 628 + // underflow() and uflow() functions are called to get the next + // charater from the real input source when the buffer is empty. + // Buffered input uses underflow() + virtual int_type + underflow(void); + + virtual int_type + pbackfail(int_type __c = _Traits::eof()); + + // NB: For what the standard expects of the overflow function, + // see _M_really_overflow(), below. Because basic_streambuf's + // sputc/sputn call overflow directly, and the complications of + // this implementation's setting of the initial pointers all + // equal to _M_buf when initializing, it seems essential to have + // this in actuality be a helper function that checks for the + // eccentricities of this implementation, and then call + // overflow() if indeed the buffer is full. + virtual int_type + overflow(int_type __c = _Traits::eof()); + + // Stroustrup, 1998, p 648 + // The overflow() function is called to transfer characters to the + // real output destination when the buffer is full. A call to + // overflow(c) outputs the contents of the buffer plus the + // character c. + // 27.5.2.4.5 + // Consume some sequence of the characters in the pending sequence. + int_type + _M_really_overflow(int_type __c = _Traits::eof()); + + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n); + + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual pos_type + seekpos(pos_type __pos, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual int + sync(void) + { + bool __testput = _M_out_cur && _M_out_beg < _M_out_end; + if (__testput) + { + // Make sure that libio resyncs its idea of the file position + // with the external file. + _M_file->sync(); + + // Need to restore current position. This interpreted as + // the position of the external byte sequence (_M_file) + // plus the offset in the current internal buffer + // (_M_out_beg - _M_out_cur) + streamoff __cur = _M_file->seekoff(0, ios_base::cur); + off_type __off = _M_out_cur - _M_out_beg; + _M_really_overflow(); + _M_file->seekpos(__cur + __off); + } + _M_last_overflowed = false; + return 0; + } + + virtual void + imbue(const locale& __loc); + + virtual streamsize + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + // Clear out pback buffer before going on to the real deal... + if (_M_pback_init) + { + while (__ret < __n && _M_in_cur < _M_in_end) + { + *__s = *_M_in_cur; + ++__ret; + ++__s; + ++_M_in_cur; + } + _M_pback_destroy(); + } + if (__ret < __n) + __ret += __streambuf_type::xsgetn(__s, __n - __ret); + return __ret; + } + + virtual streamsize + xsputn(const char_type* __s, streamsize __n) + { + _M_pback_destroy(); + return __streambuf_type::xsputn(__s, __n); + } + + void + _M_output_unshift(); + }; + + + // 27.8.1.5 Template class basic_ifstream + template + class basic_ifstream : public basic_istream<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard types: + typedef basic_filebuf __filebuf_type; + typedef basic_istream __istream_type; + + private: + __filebuf_type _M_filebuf; + + public: + // Constructors/Destructors: + basic_ifstream() + : __istream_type(NULL), _M_filebuf() + { this->init(&_M_filebuf); } + + explicit + basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) + : __istream_type(NULL), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } + + ~basic_ifstream() + { } + + // Members: + __filebuf_type* + rdbuf() const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + bool + is_open(void) { return _M_filebuf.is_open(); } + + void + open(const char* __s, ios_base::openmode __mode = ios_base::in) + { + if (_M_filebuf.open(__s, __mode | ios_base::in) == NULL) + this->setstate(ios_base::failbit); + } + + void + close(void) + { + if (!_M_filebuf.close()) + this->setstate(ios_base::failbit); + } + }; + + + // 27.8.1.8 Template class basic_ofstream + template + class basic_ofstream : public basic_ostream<_CharT,_Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard types: + typedef basic_filebuf __filebuf_type; + typedef basic_ostream __ostream_type; + + private: + __filebuf_type _M_filebuf; + + public: + // Constructors: + basic_ofstream() + : __ostream_type(NULL), _M_filebuf() + { this->init(&_M_filebuf); } + + explicit + basic_ofstream(const char* __s, + ios_base::openmode __mode = ios_base::out|ios_base::trunc) + : __ostream_type(NULL), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } + + ~basic_ofstream() + { } + + // Members: + __filebuf_type* + rdbuf(void) const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + bool + is_open(void) { return _M_filebuf.is_open(); } + + void + open(const char* __s, + ios_base::openmode __mode = ios_base::out | ios_base::trunc) + { + if (!_M_filebuf.open(__s, __mode | ios_base::out)) + this->setstate(ios_base::failbit); + } + + void + close(void) + { + if (!_M_filebuf.close()) + setstate(ios_base::failbit); + } + }; + + + // 27.8.1.11 Template class basic_fstream + template + class basic_fstream : public basic_iostream<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard types: + typedef basic_filebuf __filebuf_type; + typedef basic_ios __ios_type; + typedef basic_iostream __iostream_type; + + private: + __filebuf_type _M_filebuf; + + public: + // Constructors/destructor: + basic_fstream() + : __iostream_type(NULL), _M_filebuf() + { this->init(&_M_filebuf); } + + explicit + basic_fstream(const char* __s, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __iostream_type(NULL), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } + + ~basic_fstream() + { } + + // Members: + __filebuf_type* + rdbuf(void) const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + bool + is_open(void) { return _M_filebuf.is_open(); } + + void + open(const char* __s, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { + if (!_M_filebuf.open(__s, __mode)) + setstate(ios_base::failbit); + } + + void + close(void) + { + if (!_M_filebuf.close()) + setstate(ios_base::failbit); + } + }; +} // namespace std + + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS +# include +#endif +#endif + +#endif + diff --git a/contrib/media/updf/include/bits/std_functional.h b/contrib/media/updf/include/bits/std_functional.h new file mode 100644 index 0000000000..bd30c1041d --- /dev/null +++ b/contrib/media/updf/include/bits/std_functional.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_FUNCTIONAL +#define _CPP_FUNCTIONAL 1 + +#pragma GCC system_header +#include +#include +#include + +#endif /* _CPP_FUNCTIONAL */ + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/std_iomanip.h b/contrib/media/updf/include/bits/std_iomanip.h new file mode 100644 index 0000000000..5e0cb91bdc --- /dev/null +++ b/contrib/media/updf/include/bits/std_iomanip.h @@ -0,0 +1,218 @@ +// Standard stream manipulators -*- C++ -*- + +// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.6.3 Standard manipulators +// + +#ifndef _CPP_IOMANIP +#define _CPP_IOMANIP 1 + +#pragma GCC system_header + +#include +#include +#include + +namespace std +{ + + struct _Resetiosflags { ios_base::fmtflags _M_mask; }; + + inline _Resetiosflags + resetiosflags(ios_base::fmtflags __mask) + { + _Resetiosflags __x; + __x._M_mask = __mask; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f) + { + __is.setf(ios_base::fmtflags(0), __f._M_mask); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Resetiosflags __f) + { + __os.setf(ios_base::fmtflags(0), __f._M_mask); + return __os; + } + + + struct _Setiosflags { ios_base::fmtflags _M_mask; }; + + inline _Setiosflags + setiosflags (ios_base::fmtflags __mask) + { + _Setiosflags __x; + __x._M_mask = __mask; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f) + { + __is.setf(__f._M_mask); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f) + { + __os.setf(__f._M_mask); + return __os; + } + + + struct _Setbase { int _M_base; }; + + inline _Setbase + setbase (int __base) + { + _Setbase __x; + __x._M_base = __base; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setbase __f) + { + __is.setf(__f._M_base == 8 ? ios_base::oct : + __f._M_base == 10 ? ios_base::dec : + __f._M_base == 16 ? ios_base::hex : + ios_base::fmtflags(0), ios_base::basefield); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Setbase __f) + { + __os.setf(__f._M_base == 8 ? ios_base::oct : + __f._M_base == 10 ? ios_base::dec : + __f._M_base == 16 ? ios_base::hex : + ios_base::fmtflags(0), ios_base::basefield); + return __os; + } + + + template + struct _Setfill { _CharT _M_c; }; + + template + _Setfill<_CharT> + setfill(_CharT __c) + { + _Setfill<_CharT> __x; + __x._M_c = __c; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f) + { + __is.fill(__f._M_c); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Setfill<_CharT> __f) + { + __os.fill(__f._M_c); + return __os; + } + + + struct _Setprecision { int _M_n; }; + + inline _Setprecision + setprecision(int __n) + { + _Setprecision __x; + __x._M_n = __n; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f) + { + __is.precision(__f._M_n); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Setprecision __f) + { + __os.precision(__f._M_n); + return __os; + } + + + struct _Setw { int _M_n; }; + + inline _Setw + setw(int __n) + { + _Setw __x; + __x._M_n = __n; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f) + { + __is.width(__f._M_n); + return __is; + } + + template + basic_ostream<_CharT,_Traits>& + operator<<(basic_ostream<_CharT,_Traits>& __os, _Setw __f) + { + __os.width(__f._M_n); + return __os; + } + +} // namespace std + +#endif /* __IOMANIP */ + diff --git a/contrib/media/updf/include/bits/std_ios.h b/contrib/media/updf/include/bits/std_ios.h new file mode 100644 index 0000000000..abedfe6abc --- /dev/null +++ b/contrib/media/updf/include/bits/std_ios.h @@ -0,0 +1,49 @@ +// Iostreams base classes -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.4 Iostreams base classes +// + +#ifndef _CPP_IOS +#define _CPP_IOS 1 + +#pragma GCC system_header + +#include +#include // For ios_base::failure +#include // For char_traits, streamoff, streamsize, fpos +#include // For SEEK_SET, SEEK_CUR, SEEK_END +#include // For class locale +#include // For ios_base declarations. +#include +#include + +#endif /* _CPP_IOS */ + diff --git a/contrib/media/updf/include/bits/std_iosfwd.h b/contrib/media/updf/include/bits/std_iosfwd.h new file mode 100644 index 0000000000..9d2dbc2a2d --- /dev/null +++ b/contrib/media/updf/include/bits/std_iosfwd.h @@ -0,0 +1,136 @@ +// Forwarding declarations -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.2 Forward declarations +// + +#ifndef _CPP_IOSFWD +#define _CPP_IOSFWD 1 + +#pragma GCC system_header + +#include +#include // For string forward declarations. +#include +#include + +namespace std +{ + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // Not included. + class ios_base; +#endif + + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + +#ifdef _GLIBCPP_USE_WCHAR_T + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; +#endif +} // namespace std + +#endif // _CPP_IOSFWD + + + + + diff --git a/contrib/media/updf/include/bits/std_iostream.h b/contrib/media/updf/include/bits/std_iostream.h new file mode 100644 index 0000000000..8c1411f5d5 --- /dev/null +++ b/contrib/media/updf/include/bits/std_iostream.h @@ -0,0 +1,62 @@ +// Standard iostream objects -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.3 Standard iostream objects +// + +#ifndef _CPP_IOSTREAM +#define _CPP_IOSTREAM 1 + +#pragma GCC system_header + +#include +#include +#include + +namespace std +{ + extern istream cin; + extern ostream cout; + extern ostream cerr; + extern ostream clog; +#ifdef _GLIBCPP_USE_WCHAR_T + extern wistream wcin; + extern wostream wcout; + extern wostream wcerr; + extern wostream wclog; +#endif + + // For construction of filebuffers for cout, cin, cerr, clog et. al. + static ios_base::Init __ioinit; +} // namespace std + +#endif + + diff --git a/contrib/media/updf/include/bits/std_istream.h b/contrib/media/updf/include/bits/std_istream.h new file mode 100644 index 0000000000..ad8d25edb5 --- /dev/null +++ b/contrib/media/updf/include/bits/std_istream.h @@ -0,0 +1,295 @@ +// Input streams -*- C++ -*- + +// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.6.1 Input streams +// + +#ifndef _CPP_ISTREAM +#define _CPP_ISTREAM 1 + +#pragma GCC system_header + +#include +#include // For numeric_limits + +namespace std +{ + // 27.6.1.1 Template class basic_istream + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + // Types (inherited from basic_ios (27.4.4)): + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + // Non-standard Types: + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef istreambuf_iterator<_CharT, _Traits> __istreambuf_iter; + typedef num_get<_CharT, __istreambuf_iter> __numget_type; + typedef ctype<_CharT> __ctype_type; + + protected: + // Data Members: + streamsize _M_gcount; + + public: + // 27.6.1.1.1 Constructor/destructor: + explicit + basic_istream(__streambuf_type* __sb) + { + this->init(__sb); + _M_gcount = streamsize(0); + } + + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + + // 27.6.1.1.2 Prefix/suffix: + class sentry; + friend class sentry; + + // 27.6.1.2 Formatted input: + // 27.6.1.2.3 basic_istream::operator>> + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)); + + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)); + + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)); + + // 27.6.1.2.2 Arithmetic Extractors + __istream_type& + operator>>(bool& __n); + + __istream_type& + operator>>(short& __n); + + __istream_type& + operator>>(unsigned short& __n); + + __istream_type& + operator>>(int& __n); + + __istream_type& + operator>>(unsigned int& __n); + + __istream_type& + operator>>(long& __n); + + __istream_type& + operator>>(unsigned long& __n); + +#ifdef _GLIBCPP_USE_LONG_LONG + __istream_type& + operator>>(long long& __n); + + __istream_type& + operator>>(unsigned long long& __n); +#endif + + __istream_type& + operator>>(float& __f); + + __istream_type& + operator>>(double& __f); + + __istream_type& + operator>>(long double& __f); + + __istream_type& + operator>>(void*& __p); + + __istream_type& + operator>>(__streambuf_type* __sb); + + // 27.6.1.3 Unformatted input: + inline streamsize + gcount(void) const + { return _M_gcount; } + + int_type + get(void); + + __istream_type& + get(char_type& __c); + + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); + + inline __istream_type& + get(char_type* __s, streamsize __n) + { return get(__s, __n, this->widen('\n')); } + + __istream_type& + get(__streambuf_type& __sb, char_type __delim); + + inline __istream_type& + get(__streambuf_type& __sb) + { return get(__sb, this->widen('\n')); } + + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); + + inline __istream_type& + getline(char_type* __s, streamsize __n) + { return getline(__s, __n, this->widen('\n')); } + + __istream_type& + ignore(streamsize __n = 1, int_type __delim = traits_type::eof()); + + int_type + peek(void); + + __istream_type& + read(char_type* __s, streamsize __n); + + streamsize + readsome(char_type* __s, streamsize __n); + + __istream_type& + putback(char_type __c); + + __istream_type& + unget(void); + + int + sync(void); + + pos_type + tellg(void); + + __istream_type& + seekg(pos_type); + + __istream_type& + seekg(off_type, ios_base::seekdir); + + private: +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // Not defined. + __istream_type& + operator=(const __istream_type&); + + basic_istream(const __istream_type&); +#endif + }; + + template + class basic_istream<_CharT, _Traits>::sentry + { + public: + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; + + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); + + operator bool() { return _M_ok; } + + private: + bool _M_ok; + }; + + // 27.6.1.2.3 Character extraction templates + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + + template + basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + + template + basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + + template + basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } + + // 27.6.1.5 Template class basic_iostream + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + // Non-standard Types: + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) + { } + + virtual + ~basic_iostream() { } + }; + + // 27.6.1.4 Standard basic_istream manipulators + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +} // namespace std + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS +# include +#endif +#endif + +#endif /* _CPP_ISTREAM */ + diff --git a/contrib/media/updf/include/bits/std_iterator.h b/contrib/media/updf/include/bits/std_iterator.h new file mode 100644 index 0000000000..cb97ed1d21 --- /dev/null +++ b/contrib/media/updf/include/bits/std_iterator.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_ITERATOR +#define _CPP_ITERATOR 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_ITERATOR */ + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/std_list.h b/contrib/media/updf/include/bits/std_list.h new file mode 100644 index 0000000000..23cbf7b94a --- /dev/null +++ b/contrib/media/updf/include/bits/std_list.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_LIST +#define _CPP_LIST 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include + +#endif /* _CPP_LIST */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_locale.h b/contrib/media/updf/include/bits/std_locale.h new file mode 100644 index 0000000000..1b3b58f22d --- /dev/null +++ b/contrib/media/updf/include/bits/std_locale.h @@ -0,0 +1,47 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 22.1 Locales +// + +#ifndef _CPP_LOCALE +#define _CPP_LOCALE 1 + +#pragma GCC system_header + +#include +#include +#include + +#endif + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/std_map.h b/contrib/media/updf/include/bits/std_map.h new file mode 100644 index 0000000000..45f75ef89c --- /dev/null +++ b/contrib/media/updf/include/bits/std_map.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_MAP +#define _CPP_MAP 1 + +#pragma GCC system_header + +#ifndef _CPP_BITS_STL_TREE_H +#include +#endif +#include +#include + +#endif /* _CPP_MAP */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_memory.h b/contrib/media/updf/include/bits/std_memory.h new file mode 100644 index 0000000000..4385a96e2b --- /dev/null +++ b/contrib/media/updf/include/bits/std_memory.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_MEMORY +#define _CPP_MEMORY 1 + +#pragma GCC system_header + +#include +#include +#include +#include //for iterator_traits +#include +#include +#include + +namespace std +{ + + template struct auto_ptr_ref { + _Tp1* _M_ptr; + auto_ptr_ref(_Tp1* __p) : _M_ptr(__p) {} +}; + +template class auto_ptr { +private: + _Tp* _M_ptr; + +public: + typedef _Tp element_type; + + explicit auto_ptr(_Tp* __p = 0) __STL_NOTHROW : _M_ptr(__p) {} + auto_ptr(auto_ptr& __a) __STL_NOTHROW : _M_ptr(__a.release()) {} + + template auto_ptr(auto_ptr<_Tp1>& __a) __STL_NOTHROW + : _M_ptr(__a.release()) {} + + auto_ptr& operator=(auto_ptr& __a) __STL_NOTHROW { + reset(__a.release()); + return *this; + } + + template + auto_ptr& operator=(auto_ptr<_Tp1>& __a) __STL_NOTHROW { + reset(__a.release()); + return *this; + } + + // Note: The C++ standard says there is supposed to be an empty throw + // specification here, but omitting it is standard conforming. Its + // presence can be detected only if _Tp::~_Tp() throws, but (17.4.3.6/2) + // this is prohibited. + ~auto_ptr() { delete _M_ptr; } + + _Tp& operator*() const __STL_NOTHROW { + return *_M_ptr; + } + _Tp* operator->() const __STL_NOTHROW { + return _M_ptr; + } + _Tp* get() const __STL_NOTHROW { + return _M_ptr; + } + _Tp* release() __STL_NOTHROW { + _Tp* __tmp = _M_ptr; + _M_ptr = 0; + return __tmp; + } + void reset(_Tp* __p = 0) __STL_NOTHROW { + if (__p != _M_ptr) { + delete _M_ptr; + _M_ptr = __p; + } + } + + // According to the C++ standard, these conversions are required. Most + // present-day compilers, however, do not enforce that requirement---and, + // in fact, most present-day compilers do not support the language + // features that these conversions rely on. +public: + auto_ptr(auto_ptr_ref<_Tp> __ref) __STL_NOTHROW + : _M_ptr(__ref._M_ptr) {} + + auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) __STL_NOTHROW { + if (__ref._M_ptr != this->get()) { + delete _M_ptr; + _M_ptr = __ref._M_ptr; + } + return *this; + } + + template operator auto_ptr_ref<_Tp1>() __STL_NOTHROW + { return auto_ptr_ref<_Tp>(this->release()); } + template operator auto_ptr<_Tp1>() __STL_NOTHROW + { return auto_ptr<_Tp1>(this->release()); } +}; + +} // namespace std + +#endif /* _CPP_MEMORY */ + + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_numeric.h b/contrib/media/updf/include/bits/std_numeric.h new file mode 100644 index 0000000000..375245ba9b --- /dev/null +++ b/contrib/media/updf/include/bits/std_numeric.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_NUMERIC +#define _CPP_NUMERIC 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include + +#endif /* _CPP_NUMERIC */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_ostream.h b/contrib/media/updf/include/bits/std_ostream.h new file mode 100644 index 0000000000..e8efb3b249 --- /dev/null +++ b/contrib/media/updf/include/bits/std_ostream.h @@ -0,0 +1,283 @@ +// Output streams -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.6.2 Output streams +// + +#ifndef _CPP_OSTREAM +#define _CPP_OSTREAM 1 + +#pragma GCC system_header + +#include + +namespace std +{ + // 27.6.2.1 Template class basic_ostream + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + + // Types (inherited from basic_ios (27.4.4)): + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + // Non-standard Types: + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef ostreambuf_iterator<_CharT, _Traits> __ostreambuf_iter; + typedef num_put<_CharT, __ostreambuf_iter> __numput_type; + typedef ctype<_CharT> __ctype_type; + + // 27.6.2.2 Constructor/destructor: + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + + virtual + ~basic_ostream() { } + + // 27.6.2.3 Prefix/suffix: + class sentry; + friend class sentry; + + // 27.6.2.5 Formatted output: + // 27.6.2.5.3 basic_ostream::operator<< + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)); + + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)); + + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)); + + // 27.6.2.5.2 Arithmetic Inserters + __ostream_type& + operator<<(long __n); + + __ostream_type& + operator<<(unsigned long __n); + + __ostream_type& + operator<<(bool __n); + + __ostream_type& + operator<<(short __n) + { + ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt & ios_base::oct || __fmt & ios_base::hex) + return this->operator<<(static_cast + (static_cast(__n))); + else + return this->operator<<(static_cast(__n)); + } + + __ostream_type& + operator<<(unsigned short __n) + { return this->operator<<(static_cast(__n)); } + + __ostream_type& + operator<<(int __n) + { + ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt & ios_base::oct || __fmt & ios_base::hex) + return this->operator<<(static_cast + (static_cast(__n))); + else + return this->operator<<(static_cast(__n)); + } + + __ostream_type& + operator<<(unsigned int __n) + { return this->operator<<(static_cast(__n)); } + +#ifdef _GLIBCPP_USE_LONG_LONG + __ostream_type& + operator<<(long long __n); + + __ostream_type& + operator<<(unsigned long long __n); +#endif + + __ostream_type& + operator<<(double __f); + + __ostream_type& + operator<<(float __f) + { return this->operator<<(static_cast(__f)); } + + __ostream_type& + operator<<(long double __f); + + __ostream_type& + operator<<(const void* __p); + + __ostream_type& + operator<<(__streambuf_type* __sb); + + // Unformatted output: + __ostream_type& + put(char_type __c); + + __ostream_type& + write(const char_type* __s, streamsize __n); + + __ostream_type& + flush(); + + // Seeks: + pos_type + tellp(); + + __ostream_type& + seekp(pos_type); + + __ostream_type& + seekp(off_type, ios_base::seekdir); + + private: +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // Not defined. + __ostream_type& + operator=(const __ostream_type&); + + basic_ostream(const __ostream_type&); +#endif + }; + + // 27.6.2.3 Class basic_ostream::sentry + template + class basic_ostream<_CharT, _Traits>::sentry + { + // Data Members: + bool _M_ok; + basic_ostream<_CharT,_Traits>& _M_os; + + public: + explicit + sentry(basic_ostream<_CharT,_Traits>& __os); + + ~sentry() + { + // XXX MT + if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception()) + { + // Can't call flush directly or else will get into recursive lock. + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } + + operator bool() + { return _M_ok; } + }; + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + + // Specialization + template + basic_ostream& + operator<<(basic_ostream& __out, char __c); + + // Signed and unsigned + template + basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + + template + basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); + + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + + // Partial specializationss + template + basic_ostream& + operator<<(basic_ostream& __out, const char* __s); + + // Signed and unsigned + template + basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + + template + basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } + + // 27.6.2.7 Standard basic_ostream manipulators + template + basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + + template + basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + + template + basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } + +} // namespace std + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS +# include +#endif +#endif + +#endif /* _CPP_OSTREAM */ + diff --git a/contrib/media/updf/include/bits/std_queue.h b/contrib/media/updf/include/bits/std_queue.h new file mode 100644 index 0000000000..b3b80abd72 --- /dev/null +++ b/contrib/media/updf/include/bits/std_queue.h @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_QUEUE +#define _CPP_QUEUE 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_QUEUE */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_set.h b/contrib/media/updf/include/bits/std_set.h new file mode 100644 index 0000000000..ea8c8d9ba0 --- /dev/null +++ b/contrib/media/updf/include/bits/std_set.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_SET +#define _CPP_SET 1 + +#pragma GCC system_header + +#ifndef _CPP_BITS_STL_TREE_H /* XXX is this guard needed? */ +#include +#endif +#include +#include + +#endif /* _CPP_SET */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_sstream.h b/contrib/media/updf/include/bits/std_sstream.h new file mode 100644 index 0000000000..bcae7ed298 --- /dev/null +++ b/contrib/media/updf/include/bits/std_sstream.h @@ -0,0 +1,367 @@ +// String based streams -*- C++ -*- + +// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.7 String-based streams +// + +#ifndef _CPP_SSTREAM +#define _CPP_SSTREAM 1 + +#pragma GCC system_header + +#include +#include + +namespace std +{ + template + class basic_stringbuf : public basic_streambuf<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 251. basic_stringbuf missing allocator_type + typedef _Alloc allocator_type; +#endif + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard Types: + typedef basic_streambuf __streambuf_type; + typedef basic_string __string_type; + typedef typename __string_type::size_type __size_type; + + private: + // Data Members: + __string_type _M_string; + + public: + // Constructors: + explicit + basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_string() + { _M_stringbuf_init(__mode); } + + explicit + basic_stringbuf(const __string_type& __str, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_string(__str.c_str()) + { _M_stringbuf_init(__mode); } + + // Get and set: + __string_type + str() const + { + if (_M_mode & ios_base::out) + { + // This is the deal: _M_string.size() is value that + // represents the size of the intial string that makes + // _M_string, and may not be the correct size of the + // current stringbuf internal buffer. + __size_type __len = _M_string.size(); + if (_M_out_cur > _M_out_beg) + __len = max(__size_type(_M_out_end - _M_out_beg), __len); + return __string_type(_M_out_beg, _M_out_beg + __len); + } + else + return _M_string; + } + + void + str(const __string_type& __s) + { + _M_string = __s; + _M_stringbuf_init(_M_mode); + } + + protected: + // Common initialization code for both ctors goes here. + void + _M_stringbuf_init(ios_base::openmode __mode) + { + // _M_buf_size is a convenient alias for "what the streambuf + // thinks the allocated size of the string really is." This is + // necessary as ostringstreams are implemented with the + // streambufs having control of the allocation and + // re-allocation of the internal string object, _M_string. + _M_buf_size = _M_string.size(); + + // NB: Start ostringstream buffers at 1024 bytes. This is an + // experimental value (pronounced "arbitrary" in some of the + // hipper english-speaking countries), and can be changed to + // suite particular needs. + _M_buf_size_opt = 512; + _M_mode = __mode; + if (_M_mode & ios_base::ate) + _M_really_sync(0, _M_buf_size); + else + _M_really_sync(0, 0); + } + + // Overridden virtual functions: + virtual int_type + underflow() + { + if (_M_in_cur && _M_in_cur < _M_in_end) + return traits_type::to_int_type(*gptr()); + else + return traits_type::eof(); + } + + virtual int_type + pbackfail(int_type __c = traits_type::eof()); + + virtual int_type + overflow(int_type __c = traits_type::eof()); + + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n) + { + if (__s && __n) + { + _M_string = __string_type(__s, __n); + _M_really_sync(0, 0); + } + return this; + } + + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual pos_type + seekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + // Internal function for correctly updating the internal buffer + // for a particular _M_string, due to initialization or + // re-sizing of an existing _M_string. + // Assumes: contents of _M_string and internal buffer match exactly. + // __i == _M_in_cur - _M_in_beg + // __o == _M_out_cur - _M_out_beg + virtual int + _M_really_sync(__size_type __i, __size_type __o) + { + char_type* __base = const_cast(_M_string.data()); + bool __testin = _M_mode & ios_base::in; + bool __testout = _M_mode & ios_base::out; + __size_type __len = _M_string.size(); + + _M_buf = __base; + if (__testin) + this->setg(__base, __base + __i, __base + __len); + if (__testout) + { + this->setp(__base, __base + __len); + _M_out_cur += __o; + } + return 0; + } + }; + + + // 27.7.2 Template class basic_istringstream + template + class basic_istringstream : public basic_istream<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 251. basic_stringbuf missing allocator_type + typedef _Alloc allocator_type; +#endif + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard types: + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_istream __istream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: + // Constructors: + explicit + basic_istringstream(ios_base::openmode __mode = ios_base::in) + : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in) + { this->init(&_M_stringbuf); } + + explicit + basic_istringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::in) + : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in) + { this->init(&_M_stringbuf); } + + ~basic_istringstream() + { } + + // Members: + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + __string_type + str() const + { return _M_stringbuf.str(); } + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + + + // 27.7.3 Template class basic_ostringstream + template + class basic_ostringstream : public basic_ostream<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 251. basic_stringbuf missing allocator_type + typedef _Alloc allocator_type; +#endif + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard types: + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_ostream __ostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: + // Constructors/destructor: + explicit + basic_ostringstream(ios_base::openmode __mode = ios_base::out) + : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out) + { this->init(&_M_stringbuf); } + + explicit + basic_ostringstream(const __string_type __str, + ios_base::openmode __mode = ios_base::out) + : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out) + { this->init(&_M_stringbuf); } + + ~basic_ostringstream() + { } + + // Members: + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + __string_type + str() const + { return _M_stringbuf.str(); } + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + + + // 27.7.4 Template class basic_stringstream + template + class basic_stringstream : public basic_iostream<_CharT, _Traits> + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +// 251. basic_stringbuf missing allocator_type + typedef _Alloc allocator_type; +#endif + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard Types: + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_iostream __iostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: + // Constructors/destructors + explicit + basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(NULL), _M_stringbuf(__m) + { this->init(&_M_stringbuf); } + + explicit + basic_stringstream(const __string_type& __str, + ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(NULL), _M_stringbuf(__str, __m) + { this->init(&_M_stringbuf); } + + ~basic_stringstream() + { } + + // Members: + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + __string_type + str() const + { return _M_stringbuf.str(); } + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +} // namespace std + + + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS +# include +#endif +#endif + +#endif // _CPP_SSTREAM diff --git a/contrib/media/updf/include/bits/std_stack.h b/contrib/media/updf/include/bits/std_stack.h new file mode 100644 index 0000000000..2ba0d8c240 --- /dev/null +++ b/contrib/media/updf/include/bits/std_stack.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_STACK +#define _CPP_STACK 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_STACK */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_stdexcept.h b/contrib/media/updf/include/bits/std_stdexcept.h new file mode 100644 index 0000000000..ee9ebf1944 --- /dev/null +++ b/contrib/media/updf/include/bits/std_stdexcept.h @@ -0,0 +1,117 @@ +// Standard exception classes -*- C++ -*- + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 19.1 Exception classes +// + +#ifndef _CPP_STDEXCEPT +#define _CPP_STDEXCEPT 1 + +#pragma GCC system_header + +#include +#include + +namespace std +{ + class logic_error : public exception + { + string _M_msg; + + public: + explicit + logic_error(const string& __arg); + + virtual + ~logic_error() throw(); + + virtual const char* + what() const throw(); + }; + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + }; + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + }; + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + }; + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + }; + + class runtime_error : public exception + { + string _M_msg; + + public: + explicit + runtime_error(const string& __arg); + + virtual + ~runtime_error() throw(); + + virtual const char* + what() const throw(); + }; + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + }; + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + }; + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + }; +} // namespace std + +#endif // _CPP_STDEXCEPT diff --git a/contrib/media/updf/include/bits/std_streambuf.h b/contrib/media/updf/include/bits/std_streambuf.h new file mode 100644 index 0000000000..8cc674d703 --- /dev/null +++ b/contrib/media/updf/include/bits/std_streambuf.h @@ -0,0 +1,534 @@ +// Stream buffer classes -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.5 Stream buffers +// + +#ifndef _CPP_STREAMBUF +#define _CPP_STREAMBUF 1 + +#pragma GCC system_header + +#include +#include +#include // For SEEK_SET, SEEK_CUR, SEEK_END +#include +#include + +namespace std +{ + template + streamsize + __copy_streambufs(basic_ios<_CharT, _Traits>& _ios, + basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout); + + // 27.5.2 Template class basic_streambuf<_CharT, _Traits> + template + class basic_streambuf + { + public: + // Types: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + // Non-standard Types: + typedef ctype __ctype_type; + typedef basic_streambuf __streambuf_type; + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs<>(basic_ios& __ios, + __streambuf_type* __sbin,__streambuf_type* __sbout); + + protected: + + // Pointer to the beginning of internally-allocated + // space. Filebuf manually allocates/deallocates this, whereas + // stringstreams attempt to use the built-in intelligence of the + // string class. If you are managing memory, set this. If not, + // leave it NULL. + char_type* _M_buf; + + // Actual size of allocated internal buffer, in bytes. + int_type _M_buf_size; + + // Optimal or preferred size of internal buffer, in bytes. + int_type _M_buf_size_opt; + + // True iff _M_in_* and _M_out_* buffers should always point to + // the same place. True for fstreams, false for sstreams. + bool _M_buf_unified; + + // This is based on _IO_FILE, just reordered to be more + // consistent, and is intended to be the most minimal abstraction + // for an internal buffer. + // get == input == read + // put == output == write + char_type* _M_in_beg; // Start of get area. + char_type* _M_in_cur; // Current read area. + char_type* _M_in_end; // End of get area. + char_type* _M_out_beg; // Start of put area. + char_type* _M_out_cur; // Current put area. + char_type* _M_out_end; // End of put area. + + // Place to stash in || out || in | out settings for current streambuf. + ios_base::openmode _M_mode; + + // Current locale setting. + locale _M_buf_locale; + + // True iff locale is initialized. + bool _M_buf_locale_init; + + // Necessary bits for putback buffer management. Only used in + // the basic_filebuf class, as necessary for the standard + // requirements. The only basic_streambuf member function that + // needs access to these data members is in_avail... + // NB: pbacks of over one character are not currently supported. + int_type _M_pback_size; + char_type* _M_pback; + char_type* _M_pback_cur_save; + char_type* _M_pback_end_save; + bool _M_pback_init; + + // Initializes pback buffers, and moves normal buffers to safety. + // Assumptions: + // _M_in_cur has already been moved back + void + _M_pback_create() + { + if (!_M_pback_init) + { + int_type __dist = _M_in_end - _M_in_cur; + int_type __len = min(_M_pback_size, __dist); + traits_type::copy(_M_pback, _M_in_cur, __len); + _M_pback_cur_save = _M_in_cur; + _M_pback_end_save = _M_in_end; + this->setg(_M_pback, _M_pback, _M_pback + __len); + _M_pback_init = true; + } + } + + // Deactivates pback buffer contents, and restores normal buffer. + // Assumptions: + // The pback buffer has only moved forward. + void + _M_pback_destroy() + { + if (_M_pback_init) + { + // Length _M_in_cur moved in the pback buffer. + int_type __off_cur = _M_in_cur - _M_pback; + + // For in | out buffers, the end can be pushed back... + int_type __off_end = 0; + int_type __pback_len = _M_in_end - _M_pback; + int_type __save_len = _M_pback_end_save - _M_buf; + if (__pback_len > __save_len) + __off_end = __pback_len - __save_len; + + this->setg(_M_buf, _M_pback_cur_save + __off_cur, + _M_pback_end_save + __off_end); + _M_pback_cur_save = NULL; + _M_pback_end_save = NULL; + _M_pback_init = false; + } + } + + // Correctly sets the _M_in_cur pointer, and bumps the + // _M_out_cur pointer as well if necessary. + void + _M_in_cur_move(off_type __n) // argument needs to be +- + { + bool __testout = _M_out_cur; + _M_in_cur += __n; + if (__testout && _M_buf_unified) + _M_out_cur += __n; + } + + // Correctly sets the _M_out_cur pointer, and bumps the + // appropriate _M_*_end pointers as well. Necessary for the + // un-tied stringbufs, in in|out mode. + // Invariant: + // __n + _M_out_[cur, end] <= _M_buf + _M_buf_size + // Assuming all _M_*_[beg, cur, end] pointers are operating on + // the same range: + // _M_buf <= _M_*_ <= _M_buf + _M_buf_size + void + _M_out_cur_move(off_type __n) // argument needs to be +- + { + bool __testin = _M_in_cur; + + _M_out_cur += __n; + if (__testin && _M_buf_unified) + _M_in_cur += __n; + if (_M_out_cur > _M_out_end) + { + _M_out_end = _M_out_cur; + // NB: in | out buffers drag the _M_in_end pointer along... + if (__testin) + _M_in_end += __n; + } + } + + // Return the size of the output buffer. This depends on the + // buffer in use: allocated buffers have a stored size in + // _M_buf_size and setbuf() buffers don't. + off_type + _M_out_buf_size() + { + off_type __ret = 0; + if (_M_out_cur) + { + // Using allocated buffer. + if (_M_out_beg == _M_buf) + __ret = _M_out_beg + _M_buf_size - _M_out_cur; + // Using non-allocated buffer. + else + __ret = _M_out_end - _M_out_cur; + } + return __ret; + } + + // These three functions are used to clarify internal buffer + // maintenance. After an overflow, or after a seekoff call that + // started at beg or end, or possibly when the stream becomes + // unbuffered, and a myrid other obscure corner cases, the + // internal buffer does not truly reflect the contents of the + // external buffer. At this point, for whatever reason, it is in + // an indeterminate state. + void + _M_set_indeterminate(void) + { + if (_M_mode & ios_base::in) + this->setg(_M_buf, _M_buf, _M_buf); + if (_M_mode & ios_base::out) + this->setp(_M_buf, _M_buf); + } + + void + _M_set_determinate(off_type __off) + { + bool __testin = _M_mode & ios_base::in; + bool __testout = _M_mode & ios_base::out; + if (__testin) + this->setg(_M_buf, _M_buf, _M_buf + __off); + if (__testout) + this->setp(_M_buf, _M_buf + __off); + } + + bool + _M_is_indeterminate(void) + { + bool __ret = false; + // Don't return true if unbuffered. + if (_M_buf) + { + if (_M_mode & ios_base::in) + __ret = _M_in_beg == _M_in_cur && _M_in_cur == _M_in_end; + if (_M_mode & ios_base::out) + __ret = _M_out_beg == _M_out_cur && _M_out_cur == _M_out_end; + } + return __ret; + } + + public: + virtual + ~basic_streambuf() + { + _M_buf_unified = false; + _M_buf_size = 0; + _M_buf_size_opt = 0; + _M_mode = ios_base::openmode(0); + _M_buf_locale_init = false; + } + + // Locales: + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + return __tmp; + } + + locale + getloc() const + { + if (_M_buf_locale_init) + return _M_buf_locale; + else + return locale(); + } + + // Buffer and positioning: + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + int + pubsync() { return this->sync(); } + + // Get and put areas: + // Get area: + streamsize + in_avail() + { + streamsize __ret; + if (_M_in_cur && _M_in_cur < _M_in_end) + { + if (_M_pback_init) + { + int_type __save_len = _M_pback_end_save - _M_pback_cur_save; + int_type __pback_len = _M_in_cur - _M_pback; + __ret = __save_len - __pback_len; + } + else + __ret = this->egptr() - this->gptr(); + } + else + __ret = this->showmanyc(); + return __ret; + } + + int_type + snextc() + { + int_type __eof = traits_type::eof(); + return (this->sbumpc() == __eof ? __eof : this->sgetc()); + } + + int_type + sbumpc(); + + int_type + sgetc() + { + int_type __ret; + if (_M_in_cur && _M_in_cur < _M_in_end) + __ret = traits_type::to_int_type(*(this->gptr())); + else + __ret = this->underflow(); + return __ret; + } + + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + + // Putback: + int_type + sputbackc(char_type __c); + + int_type + sungetc(); + + // Put area: + int_type + sputc(char_type __c); + + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + protected: + basic_streambuf() + : _M_buf(NULL), _M_buf_size(0), + _M_buf_size_opt(static_cast(BUFSIZ)), _M_buf_unified(false), + _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), + _M_out_end(0), _M_mode(ios_base::openmode(0)), _M_buf_locale(locale()), + _M_buf_locale_init(false), _M_pback_size(1), _M_pback(NULL), + _M_pback_cur_save(NULL), _M_pback_end_save(NULL), _M_pback_init(false) + { } + + // Get area: + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } + + void + gbump(int __n) { _M_in_cur += __n; } + + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend) + _M_mode = _M_mode | ios_base::in; + } + + // Put area: + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } + + void + pbump(int __n) { _M_out_cur += __n; } + + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + if (!(_M_mode & ios_base::out) && __pbeg && __pend) + _M_mode = _M_mode | ios_base::out; + } + + // Virtual functions: + // Locales: + virtual void + imbue(const locale& __loc) + { + _M_buf_locale_init = true; + if (_M_buf_locale != __loc) + _M_buf_locale = __loc; + } + + // Buffer management and positioning: + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } + + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + + virtual pos_type + seekpos(pos_type, + ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + + virtual int + sync() { return 0; } + + // Get area: + virtual streamsize + showmanyc() { return 0; } + + virtual streamsize + xsgetn(char_type* __s, streamsize __n); + + virtual int_type + underflow() + { return traits_type::eof(); } + + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + bool __testeof = this->underflow() == __ret; + bool __testpending = _M_in_cur && _M_in_cur < _M_in_end; + if (!__testeof && __testpending) + { + __ret = traits_type::to_int_type(*_M_in_cur); + ++_M_in_cur; + if (_M_buf_unified && _M_mode & ios_base::out) + ++_M_out_cur; + } + return __ret; + } + + // Putback: + virtual int_type + pbackfail(int_type /* __c */ = traits_type::eof()) + { return traits_type::eof(); } + + // Put area: + virtual streamsize + xsputn(const char_type* __s, streamsize __n); + + virtual int_type + overflow(int_type /* __c */ = traits_type::eof()) + { return traits_type::eof(); } + +#ifdef _GLIBCPP_DEPRECATED + public: + void + stossc() + { + if (_M_in_cur < _M_in_end) + ++_M_in_cur; + else + this->uflow(); + } +#endif + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + private: + basic_streambuf(const __streambuf_type&); + + __streambuf_type& + operator=(const __streambuf_type&); +#endif + }; + +} // namespace std + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS +#include +#endif +#endif + +#endif /* _CPP_STREAMBUF */ + diff --git a/contrib/media/updf/include/bits/std_string.h b/contrib/media/updf/include/bits/std_string.h new file mode 100644 index 0000000000..b781b43a64 --- /dev/null +++ b/contrib/media/updf/include/bits/std_string.h @@ -0,0 +1,54 @@ +// Components for manipulating sequences of characters -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 Strings library +// + +#ifndef _CPP_STRING +#define _CPP_STRING 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include // For allocator. +#include +#include // For operators >>, <<, and getline decls. +#include + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# include // for find_if +# include +#endif + +#endif /* _CPP_STRING */ + diff --git a/contrib/media/updf/include/bits/std_utility.h b/contrib/media/updf/include/bits/std_utility.h new file mode 100644 index 0000000000..f32799ecae --- /dev/null +++ b/contrib/media/updf/include/bits/std_utility.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_UTILITY +#define _CPP_UTILITY 1 + +#pragma GCC system_header +#include +#include +#include + +#endif /* _CPP_UTILITY */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/std_valarray.h b/contrib/media/updf/include/bits/std_valarray.h new file mode 100644 index 0000000000..a250dfd122 --- /dev/null +++ b/contrib/media/updf/include/bits/std_valarray.h @@ -0,0 +1,737 @@ +// The template and inlines for the -*- C++ -*- valarray class. + +// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_VALARRAY +#define _CPP_VALARRAY 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include +#include + +namespace std +{ + template class _Expr; + + template class _ValArray; + + template class _Oper, + template class _Meta, class _Dom> struct _UnClos; + + template class _Oper, + template class _Meta1, + template class _Meta2, + class _Dom1, class _Dom2> class _BinClos; + + template class _Meta, class _Dom> class _SClos; + + template class _Meta, class _Dom> class _GClos; + + template class _Meta, class _Dom> class _IClos; + + template class _Meta, class _Dom> class _ValFunClos; + + template class _Meta, class _Dom> class _RefFunClos; + + template struct _Unary_plus; + template struct _Bitwise_and; + template struct _Bitwise_or; + template struct _Bitwise_xor; + template struct _Bitwise_not; + template struct _Shift_left; + template struct _Shift_right; + + template class valarray; // An array of type _Tp + class slice; // BLAS-like slice out of an array + template class slice_array; + class gslice; // generalized slice out of an array + template class gslice_array; + template class mask_array; // masked array + template class indirect_array; // indirected array + +} // namespace std + +#include +#include + +namespace std +{ + template class valarray + { + public: + typedef _Tp value_type; + + // _lib.valarray.cons_ construct/destroy: + valarray(); + explicit valarray(size_t); + valarray(const _Tp&, size_t); + valarray(const _Tp* __restrict__, size_t); + valarray(const valarray&); + valarray(const slice_array<_Tp>&); + valarray(const gslice_array<_Tp>&); + valarray(const mask_array<_Tp>&); + valarray(const indirect_array<_Tp>&); + template + valarray(const _Expr<_Dom,_Tp>& __e); + ~valarray(); + + // _lib.valarray.assign_ assignment: + valarray<_Tp>& operator=(const valarray<_Tp>&); + valarray<_Tp>& operator=(const _Tp&); + valarray<_Tp>& operator=(const slice_array<_Tp>&); + valarray<_Tp>& operator=(const gslice_array<_Tp>&); + valarray<_Tp>& operator=(const mask_array<_Tp>&); + valarray<_Tp>& operator=(const indirect_array<_Tp>&); + + template valarray<_Tp>& + operator= (const _Expr<_Dom,_Tp>&); + + // _lib.valarray.access_ element access: + // XXX: LWG to be resolved. + const _Tp& operator[](size_t) const; + _Tp& operator[](size_t); + // _lib.valarray.sub_ subset operations: + _Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const; + slice_array<_Tp> operator[](slice); + _Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const; + gslice_array<_Tp> operator[](const gslice&); + valarray<_Tp> operator[](const valarray&) const; + mask_array<_Tp> operator[](const valarray&); + _Expr<_IClos<_ValArray, _Tp>, _Tp> + operator[](const valarray&) const; + indirect_array<_Tp> operator[](const valarray&); + + // _lib.valarray.unary_ unary operators: + _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp> operator+ () const; + _Expr<_UnClos,_Tp> operator- () const; + _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const; + _Expr<_UnClos,bool> operator! () const; + + // _lib.valarray.cassign_ computed assignment: + valarray<_Tp>& operator*= (const _Tp&); + valarray<_Tp>& operator/= (const _Tp&); + valarray<_Tp>& operator%= (const _Tp&); + valarray<_Tp>& operator+= (const _Tp&); + valarray<_Tp>& operator-= (const _Tp&); + valarray<_Tp>& operator^= (const _Tp&); + valarray<_Tp>& operator&= (const _Tp&); + valarray<_Tp>& operator|= (const _Tp&); + valarray<_Tp>& operator<<=(const _Tp&); + valarray<_Tp>& operator>>=(const _Tp&); + valarray<_Tp>& operator*= (const valarray<_Tp>&); + valarray<_Tp>& operator/= (const valarray<_Tp>&); + valarray<_Tp>& operator%= (const valarray<_Tp>&); + valarray<_Tp>& operator+= (const valarray<_Tp>&); + valarray<_Tp>& operator-= (const valarray<_Tp>&); + valarray<_Tp>& operator^= (const valarray<_Tp>&); + valarray<_Tp>& operator|= (const valarray<_Tp>&); + valarray<_Tp>& operator&= (const valarray<_Tp>&); + valarray<_Tp>& operator<<=(const valarray<_Tp>&); + valarray<_Tp>& operator>>=(const valarray<_Tp>&); + + template + valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator>>=(const _Expr<_Dom,_Tp>&); + + + // _lib.valarray.members_ member functions: + size_t size() const; + _Tp sum() const; + _Tp min() const; + _Tp max() const; + +// // FIXME: Extension +// _Tp product () const; + + valarray<_Tp> shift (int) const; + valarray<_Tp> cshift(int) const; + _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const; + _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const; + void resize(size_t __size, _Tp __c = _Tp()); + + private: + size_t _M_size; + _Tp* __restrict__ _M_data; + + friend class _Array<_Tp>; + }; + + + template struct _Unary_plus : unary_function<_Tp,_Tp> { + _Tp operator() (const _Tp& __t) const { return __t; } + }; + + template struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; } + }; + + template struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; } + }; + + template struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; } + }; + + template struct _Bitwise_not : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __t) const { return ~__t; } + }; + + template struct _Shift_left : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; } + }; + + template struct _Shift_right : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; } + }; + + + template + inline const _Tp& + valarray<_Tp>::operator[] (size_t __i) const + { return _M_data[__i]; } + + template + inline _Tp& + valarray<_Tp>::operator[] (size_t __i) + { return _M_data[__i]; } + +} // std:: + +#include +#include +#include +#include +#include +#include + +namespace std +{ + template + inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {} + + template + inline valarray<_Tp>::valarray (size_t __n) + : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) + { __valarray_default_construct(_M_data, _M_data + __n); } + + template + inline valarray<_Tp>::valarray (const _Tp& __t, size_t __n) + : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) + { __valarray_fill_construct (_M_data, _M_data + __n, __t); } + + template + inline valarray<_Tp>::valarray (const _Tp* __restrict__ __p, size_t __n) + : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) + { __valarray_copy_construct (__p, __p + __n, _M_data); } + + template + inline valarray<_Tp>::valarray (const valarray<_Tp>& __v) + : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size)) + { __valarray_copy_construct (__v._M_data, __v._M_data + _M_size, _M_data); } + + template + inline valarray<_Tp>::valarray (const slice_array<_Tp>& __sa) + : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz)) + { + __valarray_copy + (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data)); + } + + template + inline valarray<_Tp>::valarray (const gslice_array<_Tp>& __ga) + : _M_size(__ga._M_index.size()), + _M_data(__valarray_get_storage<_Tp>(_M_size)) + { + __valarray_copy + (__ga._M_array, _Array(__ga._M_index), + _Array<_Tp>(_M_data), _M_size); + } + + template + inline valarray<_Tp>::valarray (const mask_array<_Tp>& __ma) + : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz)) + { + __valarray_copy + (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size); + } + + template + inline valarray<_Tp>::valarray (const indirect_array<_Tp>& __ia) + : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz)) + { + __valarray_copy + (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size); + } + + template template + inline valarray<_Tp>::valarray (const _Expr<_Dom, _Tp>& __e) + : _M_size(__e.size ()), _M_data(__valarray_get_storage<_Tp>(_M_size)) + { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); } + + template + inline valarray<_Tp>::~valarray () + { + __valarray_destroy_elements(_M_data, _M_data + _M_size); + __valarray_release_memory(_M_data); + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const valarray<_Tp>& __v) + { + __valarray_copy(__v._M_data, _M_size, _M_data); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const _Tp& __t) + { + __valarray_fill (_M_data, _M_size, __t); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const slice_array<_Tp>& __sa) + { + __valarray_copy (__sa._M_array, __sa._M_sz, + __sa._M_stride, _Array<_Tp>(_M_data)); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga) + { + __valarray_copy (__ga._M_array, _Array(__ga._M_index), + _Array<_Tp>(_M_data), _M_size); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const mask_array<_Tp>& __ma) + { + __valarray_copy (__ma._M_array, __ma._M_mask, + _Array<_Tp>(_M_data), _M_size); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const indirect_array<_Tp>& __ia) + { + __valarray_copy (__ia._M_array, __ia._M_index, + _Array<_Tp>(_M_data), _M_size); + return *this; + } + + template template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e) + { + __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); + return *this; + } + + template + inline _Expr<_SClos<_ValArray,_Tp>, _Tp> + valarray<_Tp>::operator[] (slice __s) const + { + typedef _SClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __s)); + } + + template + inline slice_array<_Tp> + valarray<_Tp>::operator[] (slice __s) + { + return slice_array<_Tp> (_Array<_Tp>(_M_data), __s); + } + + template + inline _Expr<_GClos<_ValArray,_Tp>, _Tp> + valarray<_Tp>::operator[] (const gslice& __gs) const + { + typedef _GClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure, _Tp> + (_Closure (_Array<_Tp>(_M_data), __gs._M_index->_M_index)); + } + + template + inline gslice_array<_Tp> + valarray<_Tp>::operator[] (const gslice& __gs) + { + return gslice_array<_Tp> + (_Array<_Tp>(_M_data), __gs._M_index->_M_index); + } + + template + inline valarray<_Tp> + valarray<_Tp>::operator[] (const valarray& __m) const + { + size_t __s (0); + size_t __e (__m.size ()); + for (size_t __i=0; __i<__e; ++__i) + if (__m[__i]) ++__s; + return valarray<_Tp> (mask_array<_Tp> (_Array<_Tp>(_M_data), __s, + _Array (__m))); + } + + template + inline mask_array<_Tp> + valarray<_Tp>::operator[] (const valarray& __m) + { + size_t __s (0); + size_t __e (__m.size ()); + for (size_t __i=0; __i<__e; ++__i) + if (__m[__i]) ++__s; + return mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array (__m)); + } + + template + inline _Expr<_IClos<_ValArray,_Tp>, _Tp> + valarray<_Tp>::operator[] (const valarray& __i) const + { + typedef _IClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure, _Tp> (_Closure (*this, __i)); + } + + template + inline indirect_array<_Tp> + valarray<_Tp>::operator[] (const valarray& __i) + { + return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(), + _Array (__i)); + } + + template + inline size_t valarray<_Tp>::size () const { return _M_size; } + + template + inline _Tp + valarray<_Tp>::sum () const + { + return __valarray_sum(_M_data, _M_data + _M_size); + } + +// template +// inline _Tp +// valarray<_Tp>::product () const +// { +// return __valarray_product(_M_data, _M_data + _M_size); +// } + + template + inline valarray<_Tp> + valarray<_Tp>::shift(int __n) const + { + _Tp* const __a = static_cast<_Tp*> + (__builtin_alloca(sizeof(_Tp) * _M_size)); + if (__n == 0) // no shift + __valarray_copy_construct(_M_data, _M_data + _M_size, __a); + else if (__n > 0) // __n > 0: shift left + { + if (size_t(__n) > _M_size) + __valarray_default_construct(__a, __a + __n); + else + { + __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a); + __valarray_default_construct(__a+_M_size-__n, __a + _M_size); + } + } + else // __n < 0: shift right + { + __valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n); + __valarray_default_construct(__a, __a - __n); + } + return valarray<_Tp> (__a, _M_size); + } + + template + inline valarray<_Tp> + valarray<_Tp>::cshift (int __n) const + { + _Tp* const __a = static_cast<_Tp*> + (__builtin_alloca (sizeof(_Tp) * _M_size)); + if (__n == 0) // no cshift + __valarray_copy_construct(_M_data, _M_data + _M_size, __a); + else if (__n > 0) // cshift left + { + __valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n); + __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a); + } + else // cshift right + { + __valarray_copy_construct + (_M_data + _M_size+__n, _M_data + _M_size, __a); + __valarray_copy_construct + (_M_data, _M_data + _M_size+__n, __a - __n); + } + return valarray<_Tp>(__a, _M_size); + } + + template + inline void + valarray<_Tp>::resize (size_t __n, _Tp __c) + { + // This complication is so to make valarray > work + // even though it is not required by the standard. Nobody should + // be saying valarray > anyway. See the specs. + __valarray_destroy_elements(_M_data, _M_data + _M_size); + if (_M_size != __n) + { + __valarray_release_memory(_M_data); + _M_size = __n; + _M_data = __valarray_get_storage<_Tp>(__n); + } + __valarray_fill_construct(_M_data, _M_data + __n, __c); + } + + template + inline _Tp + valarray<_Tp>::min() const + { + return *min_element (_M_data, _M_data+_M_size); + } + + template + inline _Tp + valarray<_Tp>::max() const + { + return *max_element (_M_data, _M_data+_M_size); + } + + template + inline _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> + valarray<_Tp>::apply (_Tp func (_Tp)) const + { + typedef _ValFunClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure,_Tp> (_Closure (*this, func)); + } + + template + inline _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> + valarray<_Tp>::apply (_Tp func (const _Tp &)) const + { + typedef _RefFunClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure,_Tp> (_Closure (*this, func)); + } + +#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name) \ + template \ + inline _Expr<_UnClos<_Name,_ValArray,_Tp>, _Tp> \ + valarray<_Tp>::operator _Op() const \ + { \ + typedef _UnClos<_Name,_ValArray,_Tp> _Closure; \ + return _Expr<_Closure, _Tp> (_Closure (*this)); \ + } + + _DEFINE_VALARRAY_UNARY_OPERATOR(+, _Unary_plus) + _DEFINE_VALARRAY_UNARY_OPERATOR(-, negate) + _DEFINE_VALARRAY_UNARY_OPERATOR(~, _Bitwise_not) + +#undef _DEFINE_VALARRAY_UNARY_OPERATOR + + template + inline _Expr<_UnClos, bool> + valarray<_Tp>::operator!() const + { + typedef _UnClos _Closure; + return _Expr<_Closure, bool> (_Closure (*this)); + } + +#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name) \ + template \ + inline valarray<_Tp> & \ + valarray<_Tp>::operator _Op##= (const _Tp &__t) \ + { \ + _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t); \ + return *this; \ + } \ + \ + template \ + inline valarray<_Tp> & \ + valarray<_Tp>::operator _Op##= (const valarray<_Tp> &__v) \ + { \ + _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, \ + _Array<_Tp>(__v._M_data)); \ + return *this; \ + } + +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(+, plus) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(-, minus) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(*, multiplies) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(/, divides) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(%, modulus) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(^, xor) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(&, and) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(|, or) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(<<, shift_left) +_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(>>, shift_right) + +#undef _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT + + +} // std:: + + +namespace std +{ + +#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name) \ + template template \ + inline valarray<_Tp> & \ + valarray<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp> &__e) \ + { \ + _Array_augmented_##_Name (_Array<_Tp>(_M_data), __e, _M_size); \ + return *this; \ + } + +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(+, plus) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(-, minus) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(*, multiplies) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(/, divides) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(%, modulus) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(^, xor) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(&, and) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(|, or) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, shift_left) +_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right) + +#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT + + +#define _DEFINE_BINARY_OPERATOR(_Op, _Name) \ + template \ + inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>, _Tp> \ + operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ + { \ + typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, _Tp> (_Closure (__v, __w)); \ + } \ + \ + template \ + inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,_Tp> \ + operator _Op (const valarray<_Tp> &__v, const _Tp &__t) \ + { \ + typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, _Tp> (_Closure (__v, __t)); \ + } \ + \ + template \ + inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,_Tp> \ + operator _Op (const _Tp &__t, const valarray<_Tp> &__v) \ + { \ + typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, _Tp> (_Closure (__t, __v)); \ + } + +_DEFINE_BINARY_OPERATOR(+, plus) +_DEFINE_BINARY_OPERATOR(-, minus) +_DEFINE_BINARY_OPERATOR(*, multiplies) +_DEFINE_BINARY_OPERATOR(/, divides) +_DEFINE_BINARY_OPERATOR(%, modulus) +_DEFINE_BINARY_OPERATOR(^, _Bitwise_xor) +_DEFINE_BINARY_OPERATOR(&, _Bitwise_and) +_DEFINE_BINARY_OPERATOR(|, _Bitwise_or) +_DEFINE_BINARY_OPERATOR(<<, _Shift_left) +_DEFINE_BINARY_OPERATOR(>>, _Shift_right) + +#undef _DEFINE_BINARY_OPERATOR + +#define _DEFINE_LOGICAL_OPERATOR(_Op, _Name) \ + template \ + inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>,bool> \ + operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ + { \ + typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, bool> (_Closure (__v, __w)); \ + } \ + \ + template \ + inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,bool> \ + operator _Op (const valarray<_Tp> &__v, const _Tp &__t) \ + { \ + typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, bool> (_Closure (__v, __t)); \ + } \ + \ + template \ + inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,bool> \ + operator _Op (const _Tp &__t, const valarray<_Tp> &__v) \ + { \ + typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure, bool> (_Closure (__t, __v)); \ + } + +_DEFINE_LOGICAL_OPERATOR(&&, logical_and) +_DEFINE_LOGICAL_OPERATOR(||, logical_or) +_DEFINE_LOGICAL_OPERATOR(==, equal_to) +_DEFINE_LOGICAL_OPERATOR(!=, not_equal_to) +_DEFINE_LOGICAL_OPERATOR(<, less) +_DEFINE_LOGICAL_OPERATOR(>, greater) +_DEFINE_LOGICAL_OPERATOR(<=, less_equal) +_DEFINE_LOGICAL_OPERATOR(>=, greater_equal) + +#undef _DEFINE_LOGICAL_OPERATOR + +} // namespace std + +#endif // _CPP_VALARRAY + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/std_vector.h b/contrib/media/updf/include/bits/std_vector.h new file mode 100644 index 0000000000..9b5ba58774 --- /dev/null +++ b/contrib/media/updf/include/bits/std_vector.h @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_VECTOR +#define _CPP_VECTOR 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_VECTOR */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stdio.h b/contrib/media/updf/include/bits/stdio.h new file mode 100644 index 0000000000..ff30fb6dee --- /dev/null +++ b/contrib/media/updf/include/bits/stdio.h @@ -0,0 +1,16 @@ +#ifndef __BITS_STDIO_H +#define __BITS_STDIO_H + +struct file_stream_ops { + int (* s_putc)(struct __FILE *,int); + int (* s_getc)(struct __FILE *,int *); + int (* s_read)(struct __FILE *,void *,int); + int (* s_write)(struct __FILE *,void *,int); + int (* s_seek)(struct __FILE *,int,int); + int (* s_flush)(struct __FILE *); +}; + +#define STM_OP(x,n) \ + (x)->std_ops->s_##n + +#endif diff --git a/contrib/media/updf/include/bits/stl_algo.h b/contrib/media/updf/include/bits/stl_algo.h new file mode 100644 index 0000000000..a1bd83cdc8 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_algo.h @@ -0,0 +1,3643 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ALGO_H +#define __SGI_STL_INTERNAL_ALGO_H + +#include + +// See concept_check.h for the __glibcpp_*_requires macros. + +namespace std +{ + +// __median (an extension, not present in the C++ standard). + +template +inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) +{ + // concept requirements + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + if (__a < __b) + if (__b < __c) + return __b; + else if (__a < __c) + return __c; + else + return __a; + else if (__a < __c) + return __a; + else if (__b < __c) + return __c; + else + return __b; +} + +template +inline const _Tp& +__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_BinaryFunctionConcept<_Compare, bool, _Tp, _Tp>); + if (__comp(__a, __b)) + if (__comp(__b, __c)) + return __b; + else if (__comp(__a, __c)) + return __c; + else + return __a; + else if (__comp(__a, __c)) + return __a; + else if (__comp(__b, __c)) + return __c; + else + return __b; +} + +// for_each. Apply a function to every element of a range. +template +_Function for_each(_InputIter __first, _InputIter __last, _Function __f) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + for ( ; __first != __last; ++__first) + __f(*__first); + return __f; +} + +// find and find_if. + +template +inline _InputIter find(_InputIter __first, _InputIter __last, + const _Tp& __val, + input_iterator_tag) +{ + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; +} + +template +inline _InputIter find_if(_InputIter __first, _InputIter __last, + _Predicate __pred, + input_iterator_tag) +{ + while (__first != __last && !__pred(*__first)) + ++__first; + return __first; +} + +template +_RandomAccessIter find(_RandomAccessIter __first, _RandomAccessIter __last, + const _Tp& __val, + random_access_iterator_tag) +{ + typename iterator_traits<_RandomAccessIter>::difference_type __trip_count + = (__last - __first) >> 2; + + for ( ; __trip_count > 0 ; --__trip_count) { + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + } + + switch(__last - __first) { + case 3: + if (*__first == __val) return __first; + ++__first; + case 2: + if (*__first == __val) return __first; + ++__first; + case 1: + if (*__first == __val) return __first; + ++__first; + case 0: + default: + return __last; + } +} + +template +_RandomAccessIter find_if(_RandomAccessIter __first, _RandomAccessIter __last, + _Predicate __pred, + random_access_iterator_tag) +{ + typename iterator_traits<_RandomAccessIter>::difference_type __trip_count + = (__last - __first) >> 2; + + for ( ; __trip_count > 0 ; --__trip_count) { + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + } + + switch(__last - __first) { + case 3: + if (__pred(*__first)) return __first; + ++__first; + case 2: + if (__pred(*__first)) return __first; + ++__first; + case 1: + if (__pred(*__first)) return __first; + ++__first; + case 0: + default: + return __last; + } +} + +template +inline _InputIter find(_InputIter __first, _InputIter __last, + const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter>::value_type, _Tp>); + return find(__first, __last, __val, __iterator_category(__first)); +} + +template +inline _InputIter find_if(_InputIter __first, _InputIter __last, + _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_InputIter>::value_type>); + return find_if(__first, __last, __pred, __iterator_category(__first)); +} + +// adjacent_find. + +template +_ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + if (__first == __last) + return __last; + _ForwardIter __next = __first; + while(++__next != __last) { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; +} + +template +_ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last, + _BinaryPredicate __binary_pred) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + if (__first == __last) + return __last; + _ForwardIter __next = __first; + while(++__next != __last) { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; +} + +// count and count_if. There are two version of each, one whose return type +// type is void and one (present only if we have partial specialization) +// whose return type is iterator_traits<_InputIter>::difference_type. The +// C++ standard only has the latter version, but the former, which was present +// in the HP STL, is retained for backward compatibility. + +template +void count(_InputIter __first, _InputIter __last, const _Tp& __value, + _Size& __n) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_InputIter>::value_type >); + __glibcpp_function_requires(_EqualityComparableConcept<_Tp>); + for ( ; __first != __last; ++__first) + if (*__first == __value) + ++__n; +} + +template +void count_if(_InputIter __first, _InputIter __last, _Predicate __pred, + _Size& __n) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_InputIter>::value_type>); + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; +} + +template +typename iterator_traits<_InputIter>::difference_type +count(_InputIter __first, _InputIter __last, const _Tp& __value) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_InputIter>::value_type >); + __glibcpp_function_requires(_EqualityComparableConcept<_Tp>); + typename iterator_traits<_InputIter>::difference_type __n = 0; + for ( ; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; +} + +template +typename iterator_traits<_InputIter>::difference_type +count_if(_InputIter __first, _InputIter __last, _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_InputIter>::value_type>); + typename iterator_traits<_InputIter>::difference_type __n = 0; + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; +} + + +// search. + +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + + // Test for empty ranges + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + // Test for a pattern of length 1. + _ForwardIter2 __tmp(__first2); + ++__tmp; + if (__tmp == __last2) + return find(__first1, __last1, *__first2); + + // General case. + + _ForwardIter2 __p1, __p; + + __p1 = __first2; ++__p1; + + _ForwardIter1 __current = __first1; + + while (__first1 != __last1) { + __first1 = find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (*__current == *__p) { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + + ++__first1; + } + return __first1; +} + +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + _BinaryPred __predicate) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred, + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + + // Test for empty ranges + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + // Test for a pattern of length 1. + _ForwardIter2 __tmp(__first2); + ++__tmp; + if (__tmp == __last2) { + while (__first1 != __last1 && !__predicate(*__first1, *__first2)) + ++__first1; + return __first1; + } + + // General case. + + _ForwardIter2 __p1, __p; + + __p1 = __first2; ++__p1; + + _ForwardIter1 __current = __first1; + + while (__first1 != __last1) { + while (__first1 != __last1) { + if (__predicate(*__first1, *__first2)) + break; + ++__first1; + } + while (__first1 != __last1 && !__predicate(*__first1, *__first2)) + ++__first1; + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) return __last1; + + while (__predicate(*__current, *__p)) { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + + ++__first1; + } + return __first1; +} + +// search_n. Search for __count consecutive copies of __val. + +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_EqualityComparableConcept<_Tp>); + + if (__count <= 0) + return __first; + else { + __first = find(__first, __last, __val); + while (__first != __last) { + _Integer __n = __count - 1; + _ForwardIter __i = __first; + ++__i; + while (__i != __last && __n != 0 && *__i == __val) { + ++__i; + --__n; + } + if (__n == 0) + return __first; + else + __first = find(__i, __last, __val); + } + return __last; + } +} + +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val, + _BinaryPred __binary_pred) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred, + typename iterator_traits<_ForwardIter>::value_type, _Tp>); + + if (__count <= 0) + return __first; + else { + while (__first != __last) { + if (__binary_pred(*__first, __val)) + break; + ++__first; + } + while (__first != __last) { + _Integer __n = __count - 1; + _ForwardIter __i = __first; + ++__i; + while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { + ++__i; + --__n; + } + if (__n == 0) + return __first; + else { + while (__i != __last) { + if (__binary_pred(*__i, __val)) + break; + ++__i; + } + __first = __i; + } + } + return __last; + } +} + +// swap_ranges + +template +_ForwardIter2 swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_ForwardIter2>::value_type, + typename iterator_traits<_ForwardIter1>::value_type>); + + for ( ; __first1 != __last1; ++__first1, ++__first2) + iter_swap(__first1, __first2); + return __first2; +} + +// transform + +template +_OutputIter transform(_InputIter __first, _InputIter __last, + _OutputIter __result, _UnaryOperation __unary_op) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); +/* XXX + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + // should be "the type returned by _UnaryOperation" + typename iterator_traits<_InputIter>::value_type>); +*/ + + for ( ; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; +} + +template +_OutputIter transform(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _OutputIter __result, + _BinaryOperation __binary_op) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); +/* XXX + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + // should be "the type returned by _BinaryOperation" + typename iterator_traits<_InputIter1>::value_type>); +*/ + + for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; +} + +// replace, replace_if, replace_copy, replace_copy_if + +template +void replace(_ForwardIter __first, _ForwardIter __last, + const _Tp& __old_value, const _Tp& __new_value) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_ForwardIter>::value_type, _Tp>); + __glibcpp_function_requires(_ConvertibleConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + + for ( ; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; +} + +template +void replace_if(_ForwardIter __first, _ForwardIter __last, + _Predicate __pred, const _Tp& __new_value) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_ConvertibleConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_ForwardIter>::value_type>); + + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; +} + +template +_OutputIter replace_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + const _Tp& __old_value, const _Tp& __new_value) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter>::value_type, _Tp>); + + for ( ; __first != __last; ++__first, ++__result) + *__result = *__first == __old_value ? __new_value : *__first; + return __result; +} + +template +_OutputIter replace_copy_if(_InputIter __first, _InputIter __last, + _OutputIter __result, + _Predicate __pred, const _Tp& __new_value) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_InputIter>::value_type>); + + for ( ; __first != __last; ++__first, ++__result) + *__result = __pred(*__first) ? __new_value : *__first; + return __result; +} + +// generate and generate_n + +template +void generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_GeneratorConcept<_Generator, + typename iterator_traits<_ForwardIter>::value_type>); + + for ( ; __first != __last; ++__first) + *__first = __gen(); +} + +template +_OutputIter generate_n(_OutputIter __first, _Size __n, _Generator __gen) +{ +/* + // XXX concept requirements + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + "the return type of _Generator" ?? >); +*/ + + for ( ; __n > 0; --__n, ++__first) + *__first = __gen(); + return __first; +} + +// remove, remove_if, remove_copy, remove_copy_if + +template +_OutputIter remove_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, const _Tp& __value) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter>::value_type, _Tp>); + + for ( ; __first != __last; ++__first) + if (!(*__first == __value)) { + *__result = *__first; + ++__result; + } + return __result; +} + +template +_OutputIter remove_copy_if(_InputIter __first, _InputIter __last, + _OutputIter __result, _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_InputIter>::value_type>); + + for ( ; __first != __last; ++__first) + if (!__pred(*__first)) { + *__result = *__first; + ++__result; + } + return __result; +} + +template +_ForwardIter remove(_ForwardIter __first, _ForwardIter __last, + const _Tp& __value) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_ConvertibleConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_ForwardIter>::value_type, _Tp>); + + __first = find(__first, __last, __value); + _ForwardIter __i = __first; + return __first == __last ? __first + : remove_copy(++__i, __last, __first, __value); +} + +template +_ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last, + _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_ForwardIter>::value_type>); + + __first = find_if(__first, __last, __pred); + _ForwardIter __i = __first; + return __first == __last ? __first + : remove_copy_if(++__i, __last, __first, __pred); +} + +// unique and unique_copy + +template +_OutputIter __unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, _Tp*) +{ + // concept requirements -- taken care of in dispatching function + _Tp __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) { + __value = *__first; + *++__result = __value; + } + return ++__result; +} + +template +inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + output_iterator_tag) +{ + // concept requirements -- taken care of in dispatching function + return __unique_copy(__first, __last, __result, __value_type(__first)); +} + +template +_ForwardIter __unique_copy(_InputIter __first, _InputIter __last, + _ForwardIter __result, forward_iterator_tag) +{ + // concept requirements -- taken care of in dispatching function + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; +} + +template +inline _OutputIter unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_InputIter>::value_type>); + + if (__first == __last) return __result; + return __unique_copy(__first, __last, __result, + __iterator_category(__result)); +} + +template +_OutputIter __unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + _BinaryPredicate __binary_pred, _Tp*) +{ + // concept requirements -- iterators already checked + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, _Tp, _Tp>); + + _Tp __value = *__first; + *__result = __value; + while (++__first != __last) + if (!__binary_pred(__value, *__first)) { + __value = *__first; + *++__result = __value; + } + return ++__result; +} + +template +inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + _BinaryPredicate __binary_pred, + output_iterator_tag) +{ + // concept requirements -- taken care of in dispatching function + return __unique_copy(__first, __last, __result, __binary_pred, + __value_type(__first)); +} + +template +_ForwardIter __unique_copy(_InputIter __first, _InputIter __last, + _ForwardIter __result, + _BinaryPredicate __binary_pred, + forward_iterator_tag) +{ + // concept requirements -- iterators already checked + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_InputIter>::value_type>); + + *__result = *__first; + while (++__first != __last) + if (!__binary_pred(*__result, *__first)) *++__result = *__first; + return ++__result; +} + +template +inline _OutputIter unique_copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + _BinaryPredicate __binary_pred) +{ + // concept requirements -- predicates checked later + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + + if (__first == __last) return __result; + return __unique_copy(__first, __last, __result, __binary_pred, + __iterator_category(__result)); +} + +template +_ForwardIter unique(_ForwardIter __first, _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + + __first = adjacent_find(__first, __last); + return unique_copy(__first, __last, __first); +} + +template +_ForwardIter unique(_ForwardIter __first, _ForwardIter __last, + _BinaryPredicate __binary_pred) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + __first = adjacent_find(__first, __last, __binary_pred); + return unique_copy(__first, __last, __first, __binary_pred); +} + +// reverse and reverse_copy, and their auxiliary functions + +template +void __reverse(_BidirectionalIter __first, _BidirectionalIter __last, + bidirectional_iterator_tag) { + while (true) + if (__first == __last || __first == --__last) + return; + else + iter_swap(__first++, __last); +} + +template +void __reverse(_RandomAccessIter __first, _RandomAccessIter __last, + random_access_iterator_tag) { + while (__first < __last) + iter_swap(__first++, --__last); +} + +template +inline void reverse(_BidirectionalIter __first, _BidirectionalIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept< + _BidirectionalIter>); + __reverse(__first, __last, __iterator_category(__first)); +} + +template +_OutputIter reverse_copy(_BidirectionalIter __first, + _BidirectionalIter __last, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_BidirectionalIter>::value_type>); + + while (__first != __last) { + --__last; + *__result = *__last; + ++__result; + } + return __result; +} + +// rotate and rotate_copy, and their auxiliary functions + +template +_EuclideanRingElement __gcd(_EuclideanRingElement __m, + _EuclideanRingElement __n) +{ + while (__n != 0) { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; +} + +template +_ForwardIter __rotate(_ForwardIter __first, + _ForwardIter __middle, + _ForwardIter __last, + _Distance*, + forward_iterator_tag) +{ + if (__first == __middle) + return __last; + if (__last == __middle) + return __first; + + _ForwardIter __first2 = __middle; + do { + swap(*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + } while (__first2 != __last); + + _ForwardIter __new_middle = __first; + + __first2 = __middle; + + while (__first2 != __last) { + swap (*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + + return __new_middle; +} + + +template +_BidirectionalIter __rotate(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance*, + bidirectional_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept< + _BidirectionalIter>); + + if (__first == __middle) + return __last; + if (__last == __middle) + return __first; + + __reverse(__first, __middle, bidirectional_iterator_tag()); + __reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + swap (*__first++, *--__last); + + if (__first == __middle) { + __reverse(__middle, __last, bidirectional_iterator_tag()); + return __last; + } + else { + __reverse(__first, __middle, bidirectional_iterator_tag()); + return __first; + } +} + +template +_RandomAccessIter __rotate(_RandomAccessIter __first, + _RandomAccessIter __middle, + _RandomAccessIter __last, + _Distance *, _Tp *) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + _Distance __l = __n - __k; + _RandomAccessIter __result = __first + (__last - __middle); + + if (__k == 0) + return __last; + + else if (__k == __l) { + swap_ranges(__first, __middle, __middle); + return __result; + } + + _Distance __d = __gcd(__n, __k); + + for (_Distance __i = 0; __i < __d; __i++) { + _Tp __tmp = *__first; + _RandomAccessIter __p = __first; + + if (__k < __l) { + for (_Distance __j = 0; __j < __l/__d; __j++) { + if (__p > __first + __l) { + *__p = *(__p - __l); + __p -= __l; + } + + *__p = *(__p + __k); + __p += __k; + } + } + + else { + for (_Distance __j = 0; __j < __k/__d - 1; __j ++) { + if (__p < __last - __k) { + *__p = *(__p + __k); + __p += __k; + } + + *__p = * (__p - __l); + __p -= __l; + } + } + + *__p = __tmp; + ++__first; + } + + return __result; +} + +template +inline _ForwardIter rotate(_ForwardIter __first, _ForwardIter __middle, + _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + + return __rotate(__first, __middle, __last, + __distance_type(__first), + __iterator_category(__first)); +} + +template +_OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle, + _ForwardIter __last, _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_ForwardIter>::value_type>); + + return copy(__first, __middle, copy(__middle, __last, __result)); +} + +// Return a random number in the range [0, __n). This function encapsulates +// whether we're using rand (part of the standard C library) or lrand48 +// (not standard, but a much better choice whenever it's available). +template +inline _Distance __random_number(_Distance __n) { +#ifdef _GLIBCPP_HAVE_DRAND48 + return lrand48() % __n; +#else + return rand() % __n; +#endif +} + +// random_shuffle + +template +inline void random_shuffle(_RandomAccessIter __first, + _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + iter_swap(__i, __first + __random_number((__i - __first) + 1)); +} + +template +void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, + _RandomNumberGenerator& __rand) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + iter_swap(__i, __first + __rand((__i - __first) + 1)); +} + +// random_sample and random_sample_n (extensions, not part of the standard). + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __out, const _Distance __n) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_ForwardIter>::value_type>); + + _Distance __remaining = 0; + distance(__first, __last, __remaining); + _Distance __m = min(__n, __remaining); + + while (__m > 0) { + if (__random_number(__remaining) < __m) { + *__out = *__first; + ++__out; + --__m; + } + + --__remaining; + ++__first; + } + return __out; +} + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __out, const _Distance __n, + _RandomNumberGenerator& __rand) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_UnaryFunctionConcept< + _RandomNumberGenerator, _Distance, _Distance>); + + _Distance __remaining = 0; + distance(__first, __last, __remaining); + _Distance __m = min(__n, __remaining); + + while (__m > 0) { + if (__rand(__remaining) < __m) { + *__out = *__first; + ++__out; + --__m; + } + + --__remaining; + ++__first; + } + return __out; +} + +template +_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out, + const _Distance __n) +{ + _Distance __m = 0; + _Distance __t = __n; + for ( ; __first != __last && __m < __n; ++__m, ++__first) + __out[__m] = *__first; + + while (__first != __last) { + ++__t; + _Distance __M = __random_number(__t); + if (__M < __n) + __out[__M] = *__first; + ++__first; + } + + return __out + __m; +} + +template +_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out, + _RandomNumberGenerator& __rand, + const _Distance __n) +{ + // concept requirements + __glibcpp_function_requires(_UnaryFunctionConcept< + _RandomNumberGenerator, _Distance, _Distance>); + + _Distance __m = 0; + _Distance __t = __n; + for ( ; __first != __last && __m < __n; ++__m, ++__first) + __out[__m] = *__first; + + while (__first != __last) { + ++__t; + _Distance __M = __rand(__t); + if (__M < __n) + __out[__M] = *__first; + ++__first; + } + + return __out + __m; +} + +template +inline _RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + + return __random_sample(__first, __last, + __out_first, __out_last - __out_first); +} + + +template +inline _RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last, + _RandomNumberGenerator& __rand) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + + return __random_sample(__first, __last, + __out_first, __rand, + __out_last - __out_first); +} + +// partition, stable_partition, and their auxiliary functions + +template +_ForwardIter __partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, + forward_iterator_tag) +{ + if (__first == __last) return __first; + + while (__pred(*__first)) + if (++__first == __last) return __first; + + _ForwardIter __next = __first; + + while (++__next != __last) + if (__pred(*__next)) { + swap(*__first, *__next); + ++__first; + } + + return __first; +} + +template +_BidirectionalIter __partition(_BidirectionalIter __first, + _BidirectionalIter __last, + _Predicate __pred, + bidirectional_iterator_tag) +{ + while (true) { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!__pred(*__last)) + --__last; + else + break; + iter_swap(__first, __last); + ++__first; + } +} + +template +inline _ForwardIter partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_ForwardIter>::value_type>); + + return __partition(__first, __last, __pred, __iterator_category(__first)); +} + + +template +_ForwardIter __inplace_stable_partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len) +{ + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIter __middle = __first; + advance(__middle, __len / 2); + return rotate(__inplace_stable_partition(__first, __middle, __pred, + __len / 2), + __middle, + __inplace_stable_partition(__middle, __last, __pred, + __len - __len / 2)); +} + +template +_ForwardIter __stable_partition_adaptive(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) +{ + if (__len <= __buffer_size) { + _ForwardIter __result1 = __first; + _Pointer __result2 = __buffer; + for ( ; __first != __last ; ++__first) + if (__pred(*__first)) { + *__result1 = *__first; + ++__result1; + } + else { + *__result2 = *__first; + ++__result2; + } + copy(__buffer, __result2, __result1); + return __result1; + } + else { + _ForwardIter __middle = __first; + advance(__middle, __len / 2); + return rotate(__stable_partition_adaptive( + __first, __middle, __pred, + __len / 2, __buffer, __buffer_size), + __middle, + __stable_partition_adaptive( + __middle, __last, __pred, + __len - __len / 2, __buffer, __buffer_size)); + } +} + +template +inline _ForwardIter +__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, + _Predicate __pred, _Tp*, _Distance*) +{ + _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); + if (__buf.size() > 0) + return __stable_partition_adaptive(__first, __last, __pred, + _Distance(__buf.requested_size()), + __buf.begin(), __buf.size()); + else + return __inplace_stable_partition(__first, __last, __pred, + _Distance(__buf.requested_size())); +} + +template +inline _ForwardIter stable_partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) + return __first; + else + return __stable_partition_aux(__first, __last, __pred, + __value_type(__first), + __distance_type(__first)); +} + +template +_RandomAccessIter __unguarded_partition(_RandomAccessIter __first, + _RandomAccessIter __last, + _Tp __pivot) +{ + while (true) { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + iter_swap(__first, __last); + ++__first; + } +} + +template +_RandomAccessIter __unguarded_partition(_RandomAccessIter __first, + _RandomAccessIter __last, + _Tp __pivot, _Compare __comp) +{ + while (true) { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + iter_swap(__first, __last); + ++__first; + } +} + +const int __stl_threshold = 16; + +// sort() and its auxiliary functions. + +template +void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val) +{ + _RandomAccessIter __next = __last; + --__next; + while (__val < *__next) { + *__last = *__next; + __last = __next; + --__next; + } + *__last = __val; +} + +template +void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, + _Compare __comp) +{ + _RandomAccessIter __next = __last; + --__next; + while (__comp(__val, *__next)) { + *__last = *__next; + __last = __next; + --__next; + } + *__last = __val; +} + +template +inline void __linear_insert(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*) +{ + _Tp __val = *__last; + if (__val < *__first) { + copy_backward(__first, __last, __last + 1); + *__first = __val; + } + else + __unguarded_linear_insert(__last, __val); +} + +template +inline void __linear_insert(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, _Compare __comp) +{ + _Tp __val = *__last; + if (__comp(__val, *__first)) { + copy_backward(__first, __last, __last + 1); + *__first = __val; + } + else + __unguarded_linear_insert(__last, __val, __comp); +} + +template +void __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last) +{ + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + __linear_insert(__first, __i, __value_type(__first)); +} + +template +void __insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) +{ + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + __linear_insert(__first, __i, __value_type(__first), __comp); +} + +template +void __unguarded_insertion_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*) +{ + for (_RandomAccessIter __i = __first; __i != __last; ++__i) + __unguarded_linear_insert(__i, _Tp(*__i)); +} + +template +inline void __unguarded_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last) { + __unguarded_insertion_sort_aux(__first, __last, __value_type(__first)); +} + +template +void __unguarded_insertion_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, + _Tp*, _Compare __comp) +{ + for (_RandomAccessIter __i = __first; __i != __last; ++__i) + __unguarded_linear_insert(__i, _Tp(*__i), __comp); +} + +template +inline void __unguarded_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, + _Compare __comp) +{ + __unguarded_insertion_sort_aux(__first, __last, __value_type(__first), + __comp); +} + +template +void __final_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last) +{ + if (__last - __first > __stl_threshold) { + __insertion_sort(__first, __first + __stl_threshold); + __unguarded_insertion_sort(__first + __stl_threshold, __last); + } + else + __insertion_sort(__first, __last); +} + +template +void __final_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) +{ + if (__last - __first > __stl_threshold) { + __insertion_sort(__first, __first + __stl_threshold, __comp); + __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp); + } + else + __insertion_sort(__first, __last, __comp); +} + +template +inline _Size __lg(_Size __n) +{ + _Size __k; + for (__k = 0; __n != 1; __n >>= 1) ++__k; + return __k; +} + +template +void __introsort_loop(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, + _Size __depth_limit) +{ + while (__last - __first > __stl_threshold) { + if (__depth_limit == 0) { + partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1)))); + __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit); + __last = __cut; + } +} + +template +void __introsort_loop(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, + _Size __depth_limit, _Compare __comp) +{ + while (__last - __first > __stl_threshold) { + if (__depth_limit == 0) { + partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1), __comp)), + __comp); + __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp); + __last = __cut; + } +} + +template +inline void sort(_RandomAccessIter __first, _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + + if (__first != __last) { + __introsort_loop(__first, __last, + __value_type(__first), + __lg(__last - __first) * 2); + __final_insertion_sort(__first, __last); + } +} + +template +inline void sort(_RandomAccessIter __first, _RandomAccessIter __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + if (__first != __last) { + __introsort_loop(__first, __last, + __value_type(__first), + __lg(__last - __first) * 2, + __comp); + __final_insertion_sort(__first, __last, __comp); + } +} + +// stable_sort() and its auxiliary functions. + +template +void __inplace_stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last) +{ + if (__last - __first < 15) { + __insertion_sort(__first, __last); + return; + } + _RandomAccessIter __middle = __first + (__last - __first) / 2; + __inplace_stable_sort(__first, __middle); + __inplace_stable_sort(__middle, __last); + __merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); +} + +template +void __inplace_stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) +{ + if (__last - __first < 15) { + __insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIter __middle = __first + (__last - __first) / 2; + __inplace_stable_sort(__first, __middle, __comp); + __inplace_stable_sort(__middle, __last, __comp); + __merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); +} + +template +void __merge_sort_loop(_RandomAccessIter1 __first, + _RandomAccessIter1 __last, + _RandomAccessIter2 __result, _Distance __step_size) +{ + _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) { + __result = merge(__first, __first + __step_size, + __first + __step_size, __first + __two_step, + __result); + __first += __two_step; + } + + __step_size = min(_Distance(__last - __first), __step_size); + merge(__first, __first + __step_size, __first + __step_size, __last, + __result); +} + +template +void __merge_sort_loop(_RandomAccessIter1 __first, + _RandomAccessIter1 __last, + _RandomAccessIter2 __result, _Distance __step_size, + _Compare __comp) +{ + _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) { + __result = merge(__first, __first + __step_size, + __first + __step_size, __first + __two_step, + __result, + __comp); + __first += __two_step; + } + __step_size = min(_Distance(__last - __first), __step_size); + + merge(__first, __first + __step_size, + __first + __step_size, __last, + __result, + __comp); +} + +const int __stl_chunk_size = 7; + +template +void __chunk_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Distance __chunk_size) +{ + while (__last - __first >= __chunk_size) { + __insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + __insertion_sort(__first, __last); +} + +template +void __chunk_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, + _Distance __chunk_size, _Compare __comp) +{ + while (__last - __first >= __chunk_size) { + __insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + __insertion_sort(__first, __last, __comp); +} + +template +void __merge_sort_with_buffer(_RandomAccessIter __first, + _RandomAccessIter __last, + _Pointer __buffer, _Distance*) +{ + _Distance __len = __last - __first; + _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = __stl_chunk_size; + __chunk_insertion_sort(__first, __last, __step_size); + + while (__step_size < __len) { + __merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + __merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } +} + +template +void __merge_sort_with_buffer(_RandomAccessIter __first, + _RandomAccessIter __last, _Pointer __buffer, + _Distance*, _Compare __comp) +{ + _Distance __len = __last - __first; + _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = __stl_chunk_size; + __chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) { + __merge_sort_loop(__first, __last, __buffer, __step_size, __comp); + __step_size *= 2; + __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); + __step_size *= 2; + } +} + +template +void __stable_sort_adaptive(_RandomAccessIter __first, + _RandomAccessIter __last, _Pointer __buffer, + _Distance __buffer_size) +{ + _Distance __len = (__last - __first + 1) / 2; + _RandomAccessIter __middle = __first + __len; + if (__len > __buffer_size) { + __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size); + __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size); + } + else { + __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0); + __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0); + } + __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), + _Distance(__last - __middle), __buffer, __buffer_size); +} + +template +void __stable_sort_adaptive(_RandomAccessIter __first, + _RandomAccessIter __last, _Pointer __buffer, + _Distance __buffer_size, _Compare __comp) +{ + _Distance __len = (__last - __first + 1) / 2; + _RandomAccessIter __middle = __first + __len; + if (__len > __buffer_size) { + __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, + __comp); + __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, + __comp); + } + else { + __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0, + __comp); + __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0, + __comp); + } + __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), + _Distance(__last - __middle), __buffer, __buffer_size, + __comp); +} + +template +inline void __stable_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, _Distance*) +{ + _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last); + if (buf.begin() == 0) + __inplace_stable_sort(__first, __last); + else + __stable_sort_adaptive(__first, __last, buf.begin(), + _Distance(buf.size())); +} + +template +inline void __stable_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, _Distance*, + _Compare __comp) +{ + _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last); + if (buf.begin() == 0) + __inplace_stable_sort(__first, __last, __comp); + else + __stable_sort_adaptive(__first, __last, buf.begin(), + _Distance(buf.size()), + __comp); +} + +template +inline void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + + __stable_sort_aux(__first, __last, + __value_type(__first), + __distance_type(__first)); +} + +template +inline void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + __stable_sort_aux(__first, __last, + __value_type(__first), + __distance_type(__first), + __comp); +} + +// partial_sort, partial_sort_copy, and auxiliary functions. + +template +void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, + _RandomAccessIter __last, _Tp*) +{ + make_heap(__first, __middle); + for (_RandomAccessIter __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + __pop_heap(__first, __middle, __i, _Tp(*__i), + __distance_type(__first)); + sort_heap(__first, __middle); +} + +template +inline void partial_sort(_RandomAccessIter __first, + _RandomAccessIter __middle, + _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + + __partial_sort(__first, __middle, __last, __value_type(__first)); +} + +template +void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, + _RandomAccessIter __last, _Tp*, _Compare __comp) +{ + make_heap(__first, __middle, __comp); + for (_RandomAccessIter __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + __pop_heap(__first, __middle, __i, _Tp(*__i), __comp, + __distance_type(__first)); + sort_heap(__first, __middle, __comp); +} + +template +inline void partial_sort(_RandomAccessIter __first, + _RandomAccessIter __middle, + _RandomAccessIter __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + __partial_sort(__first, __middle, __last, __value_type(__first), __comp); +} + +template +_RandomAccessIter __partial_sort_copy(_InputIter __first, + _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, + _Distance*, _Tp*) +{ + if (__result_first == __result_last) return __result_last; + _RandomAccessIter __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + make_heap(__result_first, __result_real_last); + while (__first != __last) { + if (*__first < *__result_first) + __adjust_heap(__result_first, _Distance(0), + _Distance(__result_real_last - __result_first), + _Tp(*__first)); + ++__first; + } + sort_heap(__result_first, __result_real_last); + return __result_real_last; +} + +template +inline _RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_InputIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter>::value_type>); + + return __partial_sort_copy(__first, __last, __result_first, __result_last, + __distance_type(__result_first), + __value_type(__first)); +} + +template +_RandomAccessIter __partial_sort_copy(_InputIter __first, + _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, + _Compare __comp, _Distance*, _Tp*) +{ + if (__result_first == __result_last) return __result_last; + _RandomAccessIter __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) { + if (__comp(*__first, *__result_first)) + __adjust_heap(__result_first, _Distance(0), + _Distance(__result_real_last - __result_first), + _Tp(*__first), + __comp); + ++__first; + } + sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; +} + +template +inline _RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_InputIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + return __partial_sort_copy(__first, __last, __result_first, __result_last, + __comp, + __distance_type(__result_first), + __value_type(__first)); +} + +// nth_element() and its auxiliary functions. + +template +void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Tp*) +{ + while (__last - __first > 3) { + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1)))); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + __insertion_sort(__first, __last); +} + +template +inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + + __nth_element(__first, __nth, __last, __value_type(__first)); +} + +template +void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Tp*, _Compare __comp) +{ + while (__last - __first > 3) { + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1), + __comp)), + __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + __insertion_sort(__first, __last, __comp); +} + +template +inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + __nth_element(__first, __nth, __last, __value_type(__first), __comp); +} + + +// Binary search (lower_bound, upper_bound, equal_range, binary_search). + +template +_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (*__middle < __val) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; +} + +template +inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + + return __lower_bound(__first, __last, __val, + __distance_type(__first)); +} + +template +_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (__comp(*__middle, __val)) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; +} + +template +inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _Tp>); + + return __lower_bound(__first, __last, __val, __comp, + __distance_type(__first)); +} + +template +_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; +} + +template +inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + + return __upper_bound(__first, __last, __val, + __distance_type(__first)); +} + +template +_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; +} + +template +inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _Tp>); + + return __upper_bound(__first, __last, __val, __comp, + __distance_type(__first)); +} + +template +pair<_ForwardIter, _ForwardIter> +__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle, __left, __right; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (*__middle < __val) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else { + __left = lower_bound(__first, __middle, __val); + advance(__first, __len); + __right = upper_bound(++__middle, __first, __val); + return pair<_ForwardIter, _ForwardIter>(__left, __right); + } + } + return pair<_ForwardIter, _ForwardIter>(__first, __first); +} + +template +inline pair<_ForwardIter, _ForwardIter> +equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + + return __equal_range(__first, __last, __val, + __distance_type(__first)); +} + +template +pair<_ForwardIter, _ForwardIter> +__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Compare __comp, _Distance*) +{ + _Distance __len = 0; + distance(__first, __last, __len); + _Distance __half; + _ForwardIter __middle, __left, __right; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (__comp(*__middle, __val)) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else { + __left = lower_bound(__first, __middle, __val, __comp); + advance(__first, __len); + __right = upper_bound(++__middle, __first, __val, __comp); + return pair<_ForwardIter, _ForwardIter>(__left, __right); + } + } + return pair<_ForwardIter, _ForwardIter>(__first, __first); +} + +template +inline pair<_ForwardIter, _ForwardIter> +equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _Tp>); + + return __equal_range(__first, __last, __val, __comp, + __distance_type(__first)); +} + +template +bool binary_search(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + + _ForwardIter __i = lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); +} + +template +bool binary_search(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_SameTypeConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _Tp>); + + _ForwardIter __i = lower_bound(__first, __last, __val, __comp); + return __i != __last && !__comp(__val, *__i); +} + +// merge, with and without an explicitly supplied comparison function. + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) { + if (*__first2 < *__first1) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) { + if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +// inplace_merge and its auxiliary functions. + +template +void __merge_without_buffer(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2) +{ + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) { + if (*__middle < *__first) + iter_swap(__first, __middle); + return; + } + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut); + distance(__middle, __second_cut, __len22); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut); + distance(__first, __first_cut, __len11); + } + _BidirectionalIter __new_middle + = rotate(__first_cut, __middle, __second_cut); + __merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22); +} + +template +void __merge_without_buffer(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Compare __comp) +{ + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) { + if (__comp(*__middle, *__first)) + iter_swap(__first, __middle); + return; + } + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); + distance(__middle, __second_cut, __len22); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); + distance(__first, __first_cut, __len11); + } + _BidirectionalIter __new_middle + = rotate(__first_cut, __middle, __second_cut); + __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, + __comp); + __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22, __comp); +} + +template +_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first, + _BidirectionalIter1 __middle, + _BidirectionalIter1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIter2 __buffer, + _Distance __buffer_size) +{ + _BidirectionalIter2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) { + __buffer_end = copy(__middle, __last, __buffer); + copy_backward(__first, __middle, __last); + return copy(__buffer, __buffer_end, __first); + } + else if (__len1 <= __buffer_size) { + __buffer_end = copy(__first, __middle, __buffer); + copy(__middle, __last, __first); + return copy_backward(__buffer, __buffer_end, __last); + } + else + return rotate(__first, __middle, __last); +} + +template +_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, + _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, + _BidirectionalIter2 __last2, + _BidirectionalIter3 __result) +{ + if (__first1 == __last1) + return copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) { + if (*__last2 < *__last1) { + *--__result = *__last1; + if (__first1 == __last1) + return copy_backward(__first2, ++__last2, __result); + --__last1; + } + else { + *--__result = *__last2; + if (__first2 == __last2) + return copy_backward(__first1, ++__last1, __result); + --__last2; + } + } +} + +template +_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, + _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, + _BidirectionalIter2 __last2, + _BidirectionalIter3 __result, + _Compare __comp) +{ + if (__first1 == __last1) + return copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) { + if (__comp(*__last2, *__last1)) { + *--__result = *__last1; + if (__first1 == __last1) + return copy_backward(__first2, ++__last2, __result); + --__last1; + } + else { + *--__result = *__last2; + if (__first2 == __last2) + return copy_backward(__first1, ++__last1, __result); + --__last2; + } + } +} + +template +void __merge_adaptive(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) +{ + if (__len1 <= __len2 && __len1 <= __buffer_size) { + _Pointer __buffer_end = copy(__first, __middle, __buffer); + merge(__buffer, __buffer_end, __middle, __last, __first); + } + else if (__len2 <= __buffer_size) { + _Pointer __buffer_end = copy(__middle, __last, __buffer); + __merge_backward(__first, __middle, __buffer, __buffer_end, __last); + } + else { + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut); + distance(__middle, __second_cut, __len22); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut); + distance(__first, __first_cut, __len11); + } + _BidirectionalIter __new_middle = + __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, + __len22, __buffer, __buffer_size); + __merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } +} + +template +void __merge_adaptive(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) +{ + if (__len1 <= __len2 && __len1 <= __buffer_size) { + _Pointer __buffer_end = copy(__first, __middle, __buffer); + merge(__buffer, __buffer_end, __middle, __last, __first, __comp); + } + else if (__len2 <= __buffer_size) { + _Pointer __buffer_end = copy(__middle, __last, __buffer); + __merge_backward(__first, __middle, __buffer, __buffer_end, __last, + __comp); + } + else { + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); + distance(__middle, __second_cut, __len22); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); + distance(__first, __first_cut, __len11); + } + _BidirectionalIter __new_middle = + __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, + __len22, __buffer, __buffer_size); + __merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size, __comp); + } +} + +template +inline void __inplace_merge_aux(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Tp*, _Distance*) +{ + _Distance __len1 = 0; + distance(__first, __middle, __len1); + _Distance __len2 = 0; + distance(__middle, __last, __len2); + + _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last); + if (__buf.begin() == 0) + __merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + __merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _Distance(__buf.size())); +} + +template +inline void __inplace_merge_aux(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Tp*, _Distance*, + _Compare __comp) +{ + _Distance __len1 = 0; + distance(__first, __middle, __len1); + _Distance __len2 = 0; + distance(__middle, __last, __len2); + + _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last); + if (__buf.begin() == 0) + __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); + else + __merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _Distance(__buf.size()), + __comp); +} + +template +inline void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept< + _BidirectionalIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __middle || __middle == __last) + return; + __inplace_merge_aux(__first, __middle, __last, + __value_type(__first), __distance_type(__first)); +} + +template +inline void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept< + _BidirectionalIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_BidirectionalIter>::value_type, + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __middle || __middle == __last) + return; + __inplace_merge_aux(__first, __middle, __last, + __value_type(__first), __distance_type(__first), + __comp); +} + +// Set algorithms: includes, set_union, set_intersection, set_difference, +// set_symmetric_difference. All of these algorithms have the precondition +// that their input ranges are sorted and the postcondition that their output +// ranges are sorted. + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; +} + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; +} + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) { + if (*__first1 < *__first2) { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) { + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; +} + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; +} + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else { + ++__first1; + ++__first2; + } + return copy(__first1, __last1, __result); +} + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else { + ++__first1; + ++__first2; + } + return copy(__first1, __last1, __result); +} + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) { + *__result = *__first2; + ++__first2; + ++__result; + } + else { + ++__first1; + ++__first2; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_SameTypeConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + ++__result; + } + else { + ++__first1; + ++__first2; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +// min_element and max_element, with and without an explicitly supplied +// comparison function. + +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; +} + +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) __result = __first; + return __result; +} + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; +} + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; +} + +// next_permutation and prev_permutation, with and without an explicitly +// supplied comparison function. + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (*__i < *__ii) { + _BidirectionalIter __j = __last; + while (!(*__i < *--__j)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +} + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_BidirectionalIter>::value_type, + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (__comp(*__i, *__ii)) { + _BidirectionalIter __j = __last; + while (!__comp(*__i, *--__j)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +} + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (*__ii < *__i) { + _BidirectionalIter __j = __last; + while (!(*--__j < *__i)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +} + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, + typename iterator_traits<_BidirectionalIter>::value_type, + typename iterator_traits<_BidirectionalIter>::value_type>); + + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (__comp(*__ii, *__i)) { + _BidirectionalIter __j = __last; + while (!__comp(*--__j, *__i)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +} + +// find_first_of, with and without an explicitly supplied comparison function. + +template +_InputIter find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + for ( ; __first1 != __last1; ++__first1) + for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; +} + +template +_InputIter find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2, + _BinaryPredicate __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, + typename iterator_traits<_InputIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + for ( ; __first1 != __last1; ++__first1) + for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; +} + + +// find_end, with and without an explicitly supplied comparison function. +// Search [first2, last2) as a subsequence in [first1, last1), and return +// the *last* possible match. Note that find_end for bidirectional iterators +// is much faster than for forward iterators. + +// find_end for forward iterators. +template +_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + forward_iterator_tag, forward_iterator_tag) +{ + if (__first2 == __last2) + return __last1; + else { + _ForwardIter1 __result = __last1; + while (1) { + _ForwardIter1 __new_result + = search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } +} + +template +_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) +{ + if (__first2 == __last2) + return __last1; + else { + _ForwardIter1 __result = __last1; + while (1) { + _ForwardIter1 __new_result + = search(__first1, __last1, __first2, __last2, __comp); + if (__new_result == __last1) + return __result; + else { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } +} + +// find_end for bidirectional iterators. Requires partial specialization. +template +_BidirectionalIter1 +__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>); + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>); + + typedef reverse_iterator<_BidirectionalIter1> _RevIter1; + typedef reverse_iterator<_BidirectionalIter2> _RevIter2; + + _RevIter1 __rlast1(__first1); + _RevIter2 __rlast2(__first2); + _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, + _RevIter2(__last2), __rlast2); + + if (__rresult == __rlast1) + return __last1; + else { + _BidirectionalIter1 __result = __rresult.base(); + advance(__result, -distance(__first2, __last2)); + return __result; + } +} + +template +_BidirectionalIter1 +__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>); + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>); + + typedef reverse_iterator<_BidirectionalIter1> _RevIter1; + typedef reverse_iterator<_BidirectionalIter2> _RevIter2; + + _RevIter1 __rlast1(__first1); + _RevIter2 __rlast2(__first2); + _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, + _RevIter2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else { + _BidirectionalIter1 __result = __rresult.base(); + advance(__result, -distance(__first2, __last2)); + return __result; + } +} + +// Dispatching functions for find_end. + +template +inline _ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + + return __find_end(__first1, __last1, __first2, __last2, + __iterator_category(__first1), + __iterator_category(__first2)); +} + +template +inline _ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + _BinaryPredicate __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate, + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + + return __find_end(__first1, __last1, __first2, __last2, + __iterator_category(__first1), + __iterator_category(__first2), + __comp); +} + +// is_heap, a predicate testing whether or not a range is +// a heap. This function is an extension, not part of the C++ +// standard. + +template +bool __is_heap(_RandomAccessIter __first, _Distance __n) +{ + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) { + if (__first[__parent] < __first[__child]) + return false; + if ((__child & 1) == 0) + ++__parent; + } + return true; +} + +template +bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp, + _Distance __n) +{ + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) { + if (__comp(__first[__parent], __first[__child])) + return false; + if ((__child & 1) == 0) + ++__parent; + } + return true; +} + +template +inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) +{ + // concept requirements + __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIter>::value_type>); + + return __is_heap(__first, __last - __first); +} + + +template +inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, + _StrictWeakOrdering __comp) +{ + // concept requirements + __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering, + typename iterator_traits<_RandomAccessIter>::value_type, + typename iterator_traits<_RandomAccessIter>::value_type>); + + return __is_heap(__first, __comp, __last - __first); +} + +// is_sorted, a predicated testing whether a range is sorted in +// nondescending order. This is an extension, not part of the C++ +// standard. + +template +bool is_sorted(_ForwardIter __first, _ForwardIter __last) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) + return true; + + _ForwardIter __next = __first; + for (++__next; __next != __last; __first = __next, ++__next) { + if (*__next < *__first) + return false; + } + + return true; +} + +template +bool is_sorted(_ForwardIter __first, _ForwardIter __last, + _StrictWeakOrdering __comp) +{ + // concept requirements + __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering, + typename iterator_traits<_ForwardIter>::value_type, + typename iterator_traits<_ForwardIter>::value_type>); + + if (__first == __last) + return true; + + _ForwardIter __next = __first; + for (++__next; __next != __last; __first = __next, ++__next) { + if (__comp(*__next, *__first)) + return false; + } + + return true; +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ALGO_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_algobase.h b/contrib/media/updf/include/bits/stl_algobase.h new file mode 100644 index 0000000000..48520a992f --- /dev/null +++ b/contrib/media/updf/include/bits/stl_algobase.h @@ -0,0 +1,706 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + + +#ifndef __SGI_STL_INTERNAL_ALGOBASE_H +#define __SGI_STL_INTERNAL_ALGOBASE_H + +#include +#ifndef __SGI_STL_INTERNAL_PAIR_H +#include +#endif +#ifndef _CPP_BITS_TYPE_TRAITS_H +#include +#endif +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace std +{ + +// swap and iter_swap + +template +inline void __iter_swap(_ForwardIter1 __a, _ForwardIter2 __b, _Tp*) +{ + _Tp __tmp = *__a; + *__a = *__b; + *__b = __tmp; +} + +template +inline void iter_swap(_ForwardIter1 __a, _ForwardIter2 __b) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>); + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_ForwardIter1>::value_type, + typename iterator_traits<_ForwardIter2>::value_type>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_ForwardIter2>::value_type, + typename iterator_traits<_ForwardIter1>::value_type>); + + __iter_swap(__a, __b, __value_type(__a)); +} + +template +inline void swap(_Tp& __a, _Tp& __b) +{ + // concept requirements + __glibcpp_function_requires(_SGIAssignableConcept<_Tp>); + + _Tp __tmp = __a; + __a = __b; + __b = __tmp; +} + +//-------------------------------------------------- +// min and max + +#undef min +#undef max + +template +inline const _Tp& min(const _Tp& __a, const _Tp& __b) { + // concept requirements + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + //return __b < __a ? __b : __a; + if (__b < __a) return __b; return __a; +} + +template +inline const _Tp& max(const _Tp& __a, const _Tp& __b) { + // concept requirements + __glibcpp_function_requires(_LessThanComparableConcept<_Tp>); + //return __a < __b ? __b : __a; + if (__a < __b) return __b; return __a; +} + +template +inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { + //return __comp(__b, __a) ? __b : __a; + if (__comp(__b, __a)) return __b; return __a; +} + +template +inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { + //return __comp(__a, __b) ? __b : __a; + if (__comp(__a, __b)) return __b; return __a; +} + +//-------------------------------------------------- +// copy + +// All of these auxiliary functions serve two purposes. (1) Replace +// calls to copy with memmove whenever possible. (Memmove, not memcpy, +// because the input and output ranges are permitted to overlap.) +// (2) If we're using random access iterators, then write the loop as +// a for loop with an explicit count. + +template +inline _OutputIter __copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + input_iterator_tag, _Distance*) +{ + for ( ; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; +} + +template +inline _OutputIter +__copy(_RandomAccessIter __first, _RandomAccessIter __last, + _OutputIter __result, random_access_iterator_tag, _Distance*) +{ + for (_Distance __n = __last - __first; __n > 0; --__n) { + *__result = *__first; + ++__first; + ++__result; + } + return __result; +} + +template +inline _Tp* +__copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result) +{ + memmove(__result, __first, sizeof(_Tp) * (__last - __first)); + return __result + (__last - __first); +} + + +template +inline _OutputIter __copy_aux2(_InputIter __first, _InputIter __last, + _OutputIter __result, __false_type) +{ + return __copy(__first, __last, __result, + __iterator_category(__first), + __distance_type(__first)); +} + +template +inline _OutputIter __copy_aux2(_InputIter __first, _InputIter __last, + _OutputIter __result, __true_type) +{ + return __copy(__first, __last, __result, + __iterator_category(__first), + __distance_type(__first)); +} + +template +inline _Tp* __copy_aux2(_Tp* __first, _Tp* __last, _Tp* __result, + __true_type) +{ + return __copy_trivial(__first, __last, __result); +} + +template +inline _Tp* __copy_aux2(const _Tp* __first, const _Tp* __last, _Tp* __result, + __true_type) +{ + return __copy_trivial(__first, __last, __result); +} + + +template +inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, + _OutputIter __result, _Tp*) +{ + typedef typename __type_traits<_Tp>::has_trivial_assignment_operator + _Trivial; + return __copy_aux2(__first, __last, __result, _Trivial()); +} + +template +inline _OutputIter __copy_ni2(_InputIter __first, _InputIter __last, + _OutputIter __result, __true_type) +{ + return _OutputIter(__copy_aux(__first, __last, __result.base(), + __value_type(__first))); +} + +template +inline _OutputIter __copy_ni2(_InputIter __first, _InputIter __last, + _OutputIter __result, __false_type) +{ + return __copy_aux(__first, __last, __result, __value_type(__first)); +} + +template +inline _OutputIter __copy_ni1(_InputIter __first, _InputIter __last, + _OutputIter __result, __true_type) +{ + typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal; + return __copy_ni2(__first.base(), __last.base(), __result, __Normal()); +} + +template +inline _OutputIter __copy_ni1(_InputIter __first, _InputIter __last, + _OutputIter __result, __false_type) +{ + typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal; + return __copy_ni2(__first, __last, __result, __Normal()); +} + +template +inline _OutputIter copy(_InputIter __first, _InputIter __last, + _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + + typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal; + return __copy_ni1(__first, __last, __result, __Normal()); +} + +//-------------------------------------------------- +// copy_backward + +template +inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, + _BidirectionalIter1 __last, + _BidirectionalIter2 __result, + bidirectional_iterator_tag, + _Distance*) +{ + while (__first != __last) + *--__result = *--__last; + return __result; +} + +template +inline _BidirectionalIter __copy_backward(_RandomAccessIter __first, + _RandomAccessIter __last, + _BidirectionalIter __result, + random_access_iterator_tag, + _Distance*) +{ + for (_Distance __n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; +} + + +// This dispatch class is a workaround for compilers that do not +// have partial ordering of function templates. All we're doing is +// creating a specialization so that we can turn a call to copy_backward +// into a memmove whenever possible. + +template +struct __copy_backward_dispatch +{ + typedef typename iterator_traits<_BidirectionalIter1>::iterator_category + _Cat; + typedef typename iterator_traits<_BidirectionalIter1>::difference_type + _Distance; + + static _BidirectionalIter2 copy(_BidirectionalIter1 __first, + _BidirectionalIter1 __last, + _BidirectionalIter2 __result) { + return __copy_backward(__first, __last, __result, _Cat(), (_Distance*) 0); + } +}; + +template +struct __copy_backward_dispatch<_Tp*, _Tp*, __true_type> +{ + static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { + const ptrdiff_t _Num = __last - __first; + memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } +}; + +template +struct __copy_backward_dispatch +{ + static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { + return __copy_backward_dispatch<_Tp*, _Tp*, __true_type> + ::copy(__first, __last, __result); + } +}; + +template +inline _BI2 __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) { + typedef typename __type_traits::value_type> + ::has_trivial_assignment_operator + _Trivial; + return __copy_backward_dispatch<_BI1, _BI2, _Trivial> + ::copy(__first, __last, __result); +} + +template +inline _BI2 __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last, + _BI2 __result, __true_type) { + return _BI2(__copy_backward_aux(__first, __last, __result.base())); +} + +template +inline _BI2 __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last, + _BI2 __result, __false_type){ + return __copy_backward_aux(__first, __last, __result); +} + +template +inline _BI2 __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last, + _BI2 __result, __true_type) { + typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal; + return __copy_backward_output_normal_iterator(__first.base(), __last.base(), + __result, __Normal()); +} + +template +inline _BI2 __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last, + _BI2 __result, __false_type) { + typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal; + return __copy_backward_output_normal_iterator(__first, __last, __result, + __Normal()); +} + +template +inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) +{ + // concept requirements + __glibcpp_function_requires(_BidirectionalIteratorConcept<_BI1>); + __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>); + __glibcpp_function_requires(_ConvertibleConcept< + typename iterator_traits<_BI1>::value_type, + typename iterator_traits<_BI2>::value_type>); + + typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal; + return __copy_backward_input_normal_iterator(__first, __last, __result, + __Normal()); +} + +//-------------------------------------------------- +// copy_n (not part of the C++ standard) + +template +pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, + _OutputIter __result, + input_iterator_tag) { + for ( ; __count > 0; --__count) { + *__result = *__first; + ++__first; + ++__result; + } + return pair<_InputIter, _OutputIter>(__first, __result); +} + +template +inline pair<_RAIter, _OutputIter> +__copy_n(_RAIter __first, _Size __count, + _OutputIter __result, + random_access_iterator_tag) { + _RAIter __last = __first + __count; + return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result)); +} + +template +inline pair<_InputIter, _OutputIter> +__copy_n(_InputIter __first, _Size __count, _OutputIter __result) { + return __copy_n(__first, __count, __result, + __iterator_category(__first)); +} + +template +inline pair<_InputIter, _OutputIter> +copy_n(_InputIter __first, _Size __count, _OutputIter __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, + typename iterator_traits<_InputIter>::value_type>); + + return __copy_n(__first, __count, __result); +} + +//-------------------------------------------------- +// fill and fill_n + + +template +void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + + for ( ; __first != __last; ++__first) + *__first = __value; +} + +template +_OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __value) +{ + // concept requirements + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>); + + for ( ; __n > 0; --__n, ++__first) + *__first = __value; + return __first; +} + +// Specialization: for one-byte types we can use memset. + +inline void fill(unsigned char* __first, unsigned char* __last, + const unsigned char& __c) +{ + unsigned char __tmp = __c; + memset(__first, __tmp, __last - __first); +} + +inline void fill(signed char* __first, signed char* __last, + const signed char& __c) +{ + signed char __tmp = __c; + memset(__first, static_cast(__tmp), __last - __first); +} + +inline void fill(char* __first, char* __last, const char& __c) +{ + char __tmp = __c; + memset(__first, static_cast(__tmp), __last - __first); +} + +template +inline unsigned char* fill_n(unsigned char* __first, _Size __n, + const unsigned char& __c) +{ + fill(__first, __first + __n, __c); + return __first + __n; +} + +template +inline signed char* fill_n(char* __first, _Size __n, + const signed char& __c) +{ + fill(__first, __first + __n, __c); + return __first + __n; +} + +template +inline char* fill_n(char* __first, _Size __n, const char& __c) +{ + fill(__first, __first + __n, __c); + return __first + __n; +} + + +//-------------------------------------------------- +// equal and mismatch + +template +pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_EqualityComparableConcept< + typename iterator_traits<_InputIter2>::value_type>); + + while (__first1 != __last1 && *__first1 == *__first2) { + ++__first1; + ++__first2; + } + return pair<_InputIter1, _InputIter2>(__first1, __first2); +} + +template +pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _BinaryPredicate __binary_pred) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + + while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) { + ++__first1; + ++__first2; + } + return pair<_InputIter1, _InputIter2>(__first1, __first2); +} + +template +inline bool equal(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_EqualOpConcept< + typename iterator_traits<_InputIter1>::value_type, + typename iterator_traits<_InputIter2>::value_type>); + + for ( ; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; +} + +template +inline bool equal(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _BinaryPredicate __binary_pred) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + + for ( ; __first1 != __last1; ++__first1, ++__first2) + if (!__binary_pred(*__first1, *__first2)) + return false; + return true; +} + +//-------------------------------------------------- +// lexicographical_compare and lexicographical_compare_3way. +// (the latter is not part of the C++ standard.) + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter2>::value_type>); + + for ( ; __first1 != __last1 && __first2 != __last2 + ; ++__first1, ++__first2) { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; +} + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + + for ( ; __first1 != __last1 && __first2 != __last2 + ; ++__first1, ++__first2) { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; +} + +inline bool +lexicographical_compare(const unsigned char* __first1, + const unsigned char* __last1, + const unsigned char* __first2, + const unsigned char* __last2) +{ + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = memcmp(__first1, __first2, min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; +} + +inline bool lexicographical_compare(const char* __first1, const char* __last1, + const char* __first2, const char* __last2) +{ +#if CHAR_MAX == SCHAR_MAX + return lexicographical_compare((const signed char*) __first1, + (const signed char*) __last1, + (const signed char*) __first2, + (const signed char*) __last2); +#else /* CHAR_MAX == SCHAR_MAX */ + return lexicographical_compare((const unsigned char*) __first1, + (const unsigned char*) __last1, + (const unsigned char*) __first2, + (const unsigned char*) __last2); +#endif /* CHAR_MAX == SCHAR_MAX */ +} + +template +int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + while (__first1 != __last1 && __first2 != __last2) { + if (*__first1 < *__first2) + return -1; + if (*__first2 < *__first1) + return 1; + ++__first1; + ++__first2; + } + if (__first2 == __last2) { + return !(__first1 == __last1); + } + else { + return -1; + } +} + +inline int +__lexicographical_compare_3way(const unsigned char* __first1, + const unsigned char* __last1, + const unsigned char* __first2, + const unsigned char* __last2) +{ + const ptrdiff_t __len1 = __last1 - __first1; + const ptrdiff_t __len2 = __last2 - __first2; + const int __result = memcmp(__first1, __first2, min(__len1, __len2)); + return __result != 0 ? __result + : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1)); +} + +inline int +__lexicographical_compare_3way(const char* __first1, const char* __last1, + const char* __first2, const char* __last2) +{ +#if CHAR_MAX == SCHAR_MAX + return __lexicographical_compare_3way( + (const signed char*) __first1, + (const signed char*) __last1, + (const signed char*) __first2, + (const signed char*) __last2); +#else + return __lexicographical_compare_3way((const unsigned char*) __first1, + (const unsigned char*) __last1, + (const unsigned char*) __first2, + (const unsigned char*) __last2); +#endif +} + +template +int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter1>::value_type>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_InputIter2>::value_type>); + + return __lexicographical_compare_3way(__first1, __last1, __first2, __last2); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ALGOBASE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_alloc.h b/contrib/media/updf/include/bits/stl_alloc.h new file mode 100644 index 0000000000..9a0ef07e60 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_alloc.h @@ -0,0 +1,822 @@ +/* + * Copyright (c) 1996-1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ALLOC_H +#define __SGI_STL_INTERNAL_ALLOC_H + +// This implements some standard node allocators. These are +// NOT the same as the allocators in the C++ draft standard or in +// in the original STL. They do not encapsulate different pointer +// types; indeed we assume that there is only one pointer type. +// The allocation primitives are intended to allocate individual objects, +// not larger arenas as with the original STL allocators. + +#include // for __throw_bad_alloc +#include +#include +#include +#include +#ifndef __RESTRICT +# define __RESTRICT +#endif + +#ifdef __STL_THREADS +# include +# define __NODE_ALLOCATOR_THREADS true +# ifdef __STL_SGI_THREADS + // We test whether threads are in use before locking. + // Perhaps this should be moved into stl_threads.h, but that + // probably makes it harder to avoid the procedure call when + // it isn't needed. + extern "C" { + extern int __us_rsthread_malloc; + } + // The above is copied from malloc.h. Including + // would be cleaner but fails with certain levels of standard + // conformance. +# define __NODE_ALLOCATOR_LOCK if (threads && __us_rsthread_malloc) \ + { _S_node_allocator_lock._M_acquire_lock(); } +# define __NODE_ALLOCATOR_UNLOCK if (threads && __us_rsthread_malloc) \ + { _S_node_allocator_lock._M_release_lock(); } +# else /* !__STL_SGI_THREADS */ +# define __NODE_ALLOCATOR_LOCK \ + { if (threads) _S_node_allocator_lock._M_acquire_lock(); } +# define __NODE_ALLOCATOR_UNLOCK \ + { if (threads) _S_node_allocator_lock._M_release_lock(); } +# endif +#else +// Thread-unsafe +# define __NODE_ALLOCATOR_LOCK +# define __NODE_ALLOCATOR_UNLOCK +# define __NODE_ALLOCATOR_THREADS false +#endif + +namespace std +{ + +// Malloc-based allocator. Typically slower than default alloc below. +// Typically thread-safe and more storage efficient. +template +class __malloc_alloc_template { + +private: + + static void* _S_oom_malloc(size_t); + static void* _S_oom_realloc(void*, size_t); + static void (* __malloc_alloc_oom_handler)(); + +public: + + static void* allocate(size_t __n) + { + void* __result = malloc(__n); + if (0 == __result) __result = _S_oom_malloc(__n); + return __result; + } + + static void deallocate(void* __p, size_t /* __n */) + { + free(__p); + } + + static void* reallocate(void* __p, size_t /* old_sz */, size_t __new_sz) + { + void* __result = realloc(__p, __new_sz); + if (0 == __result) __result = _S_oom_realloc(__p, __new_sz); + return __result; + } + + static void (* __set_malloc_handler(void (*__f)()))() + { + void (* __old)() = __malloc_alloc_oom_handler; + __malloc_alloc_oom_handler = __f; + return(__old); + } + +}; + +// malloc_alloc out-of-memory handling + +template +void (* __malloc_alloc_template<__inst>::__malloc_alloc_oom_handler)() = 0; + +template +void* +__malloc_alloc_template<__inst>::_S_oom_malloc(size_t __n) +{ + void (* __my_malloc_handler)(); + void* __result; + + for (;;) { + __my_malloc_handler = __malloc_alloc_oom_handler; + if (0 == __my_malloc_handler) { std::__throw_bad_alloc(); } + (*__my_malloc_handler)(); + __result = malloc(__n); + if (__result) return(__result); + } +} + +template +void* __malloc_alloc_template<__inst>::_S_oom_realloc(void* __p, size_t __n) +{ + void (* __my_malloc_handler)(); + void* __result; + + for (;;) { + __my_malloc_handler = __malloc_alloc_oom_handler; + if (0 == __my_malloc_handler) { std::__throw_bad_alloc(); } + (*__my_malloc_handler)(); + __result = realloc(__p, __n); + if (__result) return(__result); + } +} + +typedef __malloc_alloc_template<0> malloc_alloc; + +template +class simple_alloc { + +public: + static _Tp* allocate(size_t __n) + { return 0 == __n ? 0 : (_Tp*) _Alloc::allocate(__n * sizeof (_Tp)); } + static _Tp* allocate(void) + { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); } + static void deallocate(_Tp* __p, size_t __n) + { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); } + static void deallocate(_Tp* __p) + { _Alloc::deallocate(__p, sizeof (_Tp)); } +}; + +// Allocator adaptor to check size arguments for debugging. +// Reports errors using assert. Checking can be disabled with +// NDEBUG, but it's far better to just use the underlying allocator +// instead when no checking is desired. +// There is some evidence that this can confuse Purify. +template +class debug_alloc { + +private: + + enum {_S_extra = 8}; // Size of space used to store size. Note + // that this must be large enough to preserve + // alignment. + +public: + + static void* allocate(size_t __n) + { + char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra); + *(size_t*)__result = __n; + return __result + (int) _S_extra; + } + + static void deallocate(void* __p, size_t __n) + { + char* __real_p = (char*)__p - (int) _S_extra; + assert(*(size_t*)__real_p == __n); + _Alloc::deallocate(__real_p, __n + (int) _S_extra); + } + + static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz) + { + char* __real_p = (char*)__p - (int) _S_extra; + assert(*(size_t*)__real_p == __old_sz); + char* __result = (char*) + _Alloc::reallocate(__real_p, __old_sz + (int) _S_extra, + __new_sz + (int) _S_extra); + *(size_t*)__result = __new_sz; + return __result + (int) _S_extra; + } + +}; + + +# ifdef __USE_MALLOC + +typedef malloc_alloc alloc; +typedef malloc_alloc single_client_alloc; + +# else + + +// Default node allocator. +// With a reasonable compiler, this should be roughly as fast as the +// original STL class-specific allocators, but with less fragmentation. +// Default_alloc_template parameters are experimental and MAY +// DISAPPEAR in the future. Clients should just use alloc for now. +// +// Important implementation properties: +// 1. If the client request an object of size > _MAX_BYTES, the resulting +// object will be obtained directly from malloc. +// 2. In all other cases, we allocate an object of size exactly +// _S_round_up(requested_size). Thus the client has enough size +// information that we can return the object to the proper free list +// without permanently losing part of the object. +// + +// The first template parameter specifies whether more than one thread +// may use this allocator. It is safe to allocate an object from +// one instance of a default_alloc and deallocate it with another +// one. This effectively transfers its ownership to the second one. +// This may have undesirable effects on reference locality. +// The second parameter is unreferenced and serves only to allow the +// creation of multiple default_alloc instances. +// Node that containers built on different allocator instances have +// different types, limiting the utility of this approach. + +template +class __default_alloc_template { + +private: + // Really we should use static const int x = N + // instead of enum { x = N }, but few compilers accept the former. + enum {_ALIGN = 8}; + enum {_MAX_BYTES = 128}; + enum {_NFREELISTS = 16}; // _MAX_BYTES/_ALIGN + static size_t + _S_round_up(size_t __bytes) + { return (((__bytes) + (size_t) _ALIGN-1) & ~((size_t) _ALIGN - 1)); } + + union _Obj { + union _Obj* _M_free_list_link; + char _M_client_data[1]; /* The client sees this. */ + }; + + static _Obj* __STL_VOLATILE _S_free_list[]; + // Specifying a size results in duplicate def for 4.1 + static size_t _S_freelist_index(size_t __bytes) { + return (((__bytes) + (size_t)_ALIGN-1)/(size_t)_ALIGN - 1); + } + + // Returns an object of size __n, and optionally adds to size __n free list. + static void* _S_refill(size_t __n); + // Allocates a chunk for nobjs of size size. nobjs may be reduced + // if it is inconvenient to allocate the requested number. + static char* _S_chunk_alloc(size_t __size, int& __nobjs); + + // Chunk allocation state. + static char* _S_start_free; + static char* _S_end_free; + static size_t _S_heap_size; + +# ifdef __STL_THREADS + static _STL_mutex_lock _S_node_allocator_lock; +# endif + + // It would be nice to use _STL_auto_lock here. But we + // don't need the NULL check. And we do need a test whether + // threads have actually been started. + class _Lock; + friend class _Lock; + class _Lock { + public: + _Lock() { __NODE_ALLOCATOR_LOCK; } + ~_Lock() { __NODE_ALLOCATOR_UNLOCK; } + }; + +public: + + /* __n must be > 0 */ + static void* allocate(size_t __n) + { + void* __ret = 0; + + if (__n > (size_t) _MAX_BYTES) { + __ret = malloc_alloc::allocate(__n); + } + else { + _Obj* __STL_VOLATILE* __my_free_list + = _S_free_list + _S_freelist_index(__n); + // Acquire the lock here with a constructor call. + // This ensures that it is released in exit or during stack + // unwinding. +# ifndef _NOTHREADS + /*REFERENCED*/ + _Lock __lock_instance; +# endif + _Obj* __RESTRICT __result = *__my_free_list; + if (__result == 0) + __ret = _S_refill(_S_round_up(__n)); + else { + *__my_free_list = __result -> _M_free_list_link; + __ret = __result; + } + } + + return __ret; + }; + + /* __p may not be 0 */ + static void deallocate(void* __p, size_t __n) + { + if (__n > (size_t) _MAX_BYTES) + malloc_alloc::deallocate(__p, __n); + else { + _Obj* __STL_VOLATILE* __my_free_list + = _S_free_list + _S_freelist_index(__n); + _Obj* __q = (_Obj*)__p; + + // acquire lock +# ifndef _NOTHREADS + /*REFERENCED*/ + _Lock __lock_instance; +# endif /* _NOTHREADS */ + __q -> _M_free_list_link = *__my_free_list; + *__my_free_list = __q; + // lock is released here + } + } + + static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz); + +} ; + +typedef __default_alloc_template<__NODE_ALLOCATOR_THREADS, 0> alloc; +typedef __default_alloc_template single_client_alloc; + +template +inline bool operator==(const __default_alloc_template<__threads, __inst>&, + const __default_alloc_template<__threads, __inst>&) +{ + return true; +} + +template +inline bool operator!=(const __default_alloc_template<__threads, __inst>&, + const __default_alloc_template<__threads, __inst>&) +{ + return false; +} + + + +/* We allocate memory in large chunks in order to avoid fragmenting */ +/* the malloc heap too much. */ +/* We assume that size is properly aligned. */ +/* We hold the allocation lock. */ +template +char* +__default_alloc_template<__threads, __inst>::_S_chunk_alloc(size_t __size, + int& __nobjs) +{ + char* __result; + size_t __total_bytes = __size * __nobjs; + size_t __bytes_left = _S_end_free - _S_start_free; + + if (__bytes_left >= __total_bytes) { + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else if (__bytes_left >= __size) { + __nobjs = (int)(__bytes_left/__size); + __total_bytes = __size * __nobjs; + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else { + size_t __bytes_to_get = + 2 * __total_bytes + _S_round_up(_S_heap_size >> 4); + // Try to make use of the left-over piece. + if (__bytes_left > 0) { + _Obj* __STL_VOLATILE* __my_free_list = + _S_free_list + _S_freelist_index(__bytes_left); + + ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list; + *__my_free_list = (_Obj*)_S_start_free; + } + _S_start_free = (char*)malloc(__bytes_to_get); + if (0 == _S_start_free) { + size_t __i; + _Obj* __STL_VOLATILE* __my_free_list; + _Obj* __p; + // Try to make do with what we have. That can't + // hurt. We do not try smaller requests, since that tends + // to result in disaster on multi-process machines. + for (__i = __size; + __i <= (size_t) _MAX_BYTES; + __i += (size_t) _ALIGN) { + __my_free_list = _S_free_list + _S_freelist_index(__i); + __p = *__my_free_list; + if (0 != __p) { + *__my_free_list = __p -> _M_free_list_link; + _S_start_free = (char*)__p; + _S_end_free = _S_start_free + __i; + return(_S_chunk_alloc(__size, __nobjs)); + // Any leftover piece will eventually make it to the + // right free list. + } + } + _S_end_free = 0; // In case of exception. + _S_start_free = (char*)malloc_alloc::allocate(__bytes_to_get); + // This should either throw an + // exception or remedy the situation. Thus we assume it + // succeeded. + } + _S_heap_size += __bytes_to_get; + _S_end_free = _S_start_free + __bytes_to_get; + return(_S_chunk_alloc(__size, __nobjs)); + } +} + + +/* Returns an object of size __n, and optionally adds to size __n free list.*/ +/* We assume that __n is properly aligned. */ +/* We hold the allocation lock. */ +template +void* +__default_alloc_template<__threads, __inst>::_S_refill(size_t __n) +{ + int __nobjs = 20; + char* __chunk = _S_chunk_alloc(__n, __nobjs); + _Obj* __STL_VOLATILE* __my_free_list; + _Obj* __result; + _Obj* __current_obj; + _Obj* __next_obj; + int __i; + + if (1 == __nobjs) return(__chunk); + __my_free_list = _S_free_list + _S_freelist_index(__n); + + /* Build free list in chunk */ + __result = (_Obj*)__chunk; + *__my_free_list = __next_obj = (_Obj*)(__chunk + __n); + for (__i = 1; ; __i++) { + __current_obj = __next_obj; + __next_obj = (_Obj*)((char*)__next_obj + __n); + if (__nobjs - 1 == __i) { + __current_obj -> _M_free_list_link = 0; + break; + } else { + __current_obj -> _M_free_list_link = __next_obj; + } + } + return(__result); +} + +template +void* +__default_alloc_template::reallocate(void* __p, + size_t __old_sz, + size_t __new_sz) +{ + void* __result; + size_t __copy_sz; + + if (__old_sz > (size_t) _MAX_BYTES && __new_sz > (size_t) _MAX_BYTES) { + return(realloc(__p, __new_sz)); + } + if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p); + __result = allocate(__new_sz); + __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz; + memcpy(__result, __p, __copy_sz); + deallocate(__p, __old_sz); + return(__result); +} + +#ifdef __STL_THREADS + template + _STL_mutex_lock + __default_alloc_template<__threads, __inst>::_S_node_allocator_lock + __STL_MUTEX_INITIALIZER; +#endif + + +template +char* __default_alloc_template<__threads, __inst>::_S_start_free = 0; + +template +char* __default_alloc_template<__threads, __inst>::_S_end_free = 0; + +template +size_t __default_alloc_template<__threads, __inst>::_S_heap_size = 0; + +template +typename __default_alloc_template<__threads, __inst>::_Obj* __STL_VOLATILE +__default_alloc_template<__threads, __inst> ::_S_free_list[ + __default_alloc_template<__threads, __inst>::_NFREELISTS +] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; +// The 16 zeros are necessary to make version 4.1 of the SunPro +// compiler happy. Otherwise it appears to allocate too little +// space for the array. + +#endif /* ! __USE_MALLOC */ + +// This implements allocators as specified in the C++ standard. +// +// Note that standard-conforming allocators use many language features +// that are not yet widely implemented. In particular, they rely on +// member templates, partial specialization, partial ordering of function +// templates, the typename keyword, and the use of the template keyword +// to refer to a template member of a dependent type. + +template +class allocator { + typedef alloc _Alloc; // The underlying allocator. +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template struct rebind { + typedef allocator<_Tp1> other; + }; + + allocator() __STL_NOTHROW {} + allocator(const allocator&) __STL_NOTHROW {} + template allocator(const allocator<_Tp1>&) __STL_NOTHROW {} + ~allocator() __STL_NOTHROW {} + + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + + // __n is permitted to be 0. The C++ standard says nothing about what + // the return value is when __n == 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 ? static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp))) + : 0; + } + + // __p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type __n) + { _Alloc::deallocate(__p, __n * sizeof(_Tp)); } + + size_type max_size() const __STL_NOTHROW + { return size_t(-1) / sizeof(_Tp); } + + void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); } + void destroy(pointer __p) { __p->~_Tp(); } +}; + +template<> +class allocator { +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template struct rebind { + typedef allocator<_Tp1> other; + }; +}; + + +template +inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) +{ + return true; +} + +template +inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) +{ + return false; +} + +// Allocator adaptor to turn an SGI-style allocator (e.g. alloc, malloc_alloc) +// into a standard-conforming allocator. Note that this adaptor does +// *not* assume that all objects of the underlying alloc class are +// identical, nor does it assume that all of the underlying alloc's +// member functions are static member functions. Note, also, that +// __allocator<_Tp, alloc> is essentially the same thing as allocator<_Tp>. + +template +struct __allocator { + _Alloc __underlying_alloc; + + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template struct rebind { + typedef __allocator<_Tp1, _Alloc> other; + }; + + __allocator() __STL_NOTHROW {} + __allocator(const __allocator& __a) __STL_NOTHROW + : __underlying_alloc(__a.__underlying_alloc) {} + template + __allocator(const __allocator<_Tp1, _Alloc>& __a) __STL_NOTHROW + : __underlying_alloc(__a.__underlying_alloc) {} + ~__allocator() __STL_NOTHROW {} + + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + + // __n is permitted to be 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 + ? static_cast<_Tp*>(__underlying_alloc.allocate(__n * sizeof(_Tp))) + : 0; + } + + // __p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type __n) + { __underlying_alloc.deallocate(__p, __n * sizeof(_Tp)); } + + size_type max_size() const __STL_NOTHROW + { return size_t(-1) / sizeof(_Tp); } + + void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); } + void destroy(pointer __p) { __p->~_Tp(); } +}; + +template +class __allocator { + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template struct rebind { + typedef __allocator<_Tp1, _Alloc> other; + }; +}; + +template +inline bool operator==(const __allocator<_Tp, _Alloc>& __a1, + const __allocator<_Tp, _Alloc>& __a2) +{ + return __a1.__underlying_alloc == __a2.__underlying_alloc; +} + +template +inline bool operator!=(const __allocator<_Tp, _Alloc>& __a1, + const __allocator<_Tp, _Alloc>& __a2) +{ + return __a1.__underlying_alloc != __a2.__underlying_alloc; +} + +// Comparison operators for all of the predifined SGI-style allocators. +// This ensures that __allocator (for example) will +// work correctly. + +template +inline bool operator==(const __malloc_alloc_template&, + const __malloc_alloc_template&) +{ + return true; +} + +template +inline bool operator!=(const __malloc_alloc_template<__inst>&, + const __malloc_alloc_template<__inst>&) +{ + return false; +} + +template +inline bool operator==(const debug_alloc<_Alloc>&, + const debug_alloc<_Alloc>&) { + return true; +} + +template +inline bool operator!=(const debug_alloc<_Alloc>&, + const debug_alloc<_Alloc>&) { + return false; +} + +// Another allocator adaptor: _Alloc_traits. This serves two +// purposes. First, make it possible to write containers that can use +// either SGI-style allocators or standard-conforming allocator. +// Second, provide a mechanism so that containers can query whether or +// not the allocator has distinct instances. If not, the container +// can avoid wasting a word of memory to store an empty object. + +// This adaptor uses partial specialization. The general case of +// _Alloc_traits<_Tp, _Alloc> assumes that _Alloc is a +// standard-conforming allocator, possibly with non-equal instances +// and non-static members. (It still behaves correctly even if _Alloc +// has static member and if all instances are equal. Refinements +// affect performance, not correctness.) + +// There are always two members: allocator_type, which is a standard- +// conforming allocator type for allocating objects of type _Tp, and +// _S_instanceless, a static const member of type bool. If +// _S_instanceless is true, this means that there is no difference +// between any two instances of type allocator_type. Furthermore, if +// _S_instanceless is true, then _Alloc_traits has one additional +// member: _Alloc_type. This type encapsulates allocation and +// deallocation of objects of type _Tp through a static interface; it +// has two member functions, whose signatures are +// static _Tp* allocate(size_t) +// static void deallocate(_Tp*, size_t) + +// The fully general version. + +template +struct _Alloc_traits +{ + static const bool _S_instanceless = false; + typedef typename _Allocator::template rebind<_Tp>::other allocator_type; +}; + +template +const bool _Alloc_traits<_Tp, _Allocator>::_S_instanceless; + +// The version for the default allocator. + +template +struct _Alloc_traits<_Tp, allocator<_Tp1> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, alloc> _Alloc_type; + typedef allocator<_Tp> allocator_type; +}; + +// Versions for the predefined SGI-style allocators. + +template +struct _Alloc_traits<_Tp, __malloc_alloc_template<__inst> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type; + typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type; +}; + +#ifndef __USE_MALLOC +template +struct _Alloc_traits<_Tp, __default_alloc_template<__threads, __inst> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, __default_alloc_template<__threads, __inst> > + _Alloc_type; + typedef __allocator<_Tp, __default_alloc_template<__threads, __inst> > + allocator_type; +}; +#endif + +template +struct _Alloc_traits<_Tp, debug_alloc<_Alloc> > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, debug_alloc<_Alloc> > _Alloc_type; + typedef __allocator<_Tp, debug_alloc<_Alloc> > allocator_type; +}; + +// Versions for the __allocator adaptor used with the predefined +// SGI-style allocators. + +template +struct _Alloc_traits<_Tp, + __allocator<_Tp1, __malloc_alloc_template<__inst> > > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type; + typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type; +}; + +#ifndef __USE_MALLOC +template +struct _Alloc_traits<_Tp, + __allocator<_Tp1, + __default_alloc_template<__thr, __inst> > > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, __default_alloc_template<__thr,__inst> > + _Alloc_type; + typedef __allocator<_Tp, __default_alloc_template<__thr,__inst> > + allocator_type; +}; +#endif + +template +struct _Alloc_traits<_Tp, __allocator<_Tp1, debug_alloc<_Alloc> > > +{ + static const bool _S_instanceless = true; + typedef simple_alloc<_Tp, debug_alloc<_Alloc> > _Alloc_type; + typedef __allocator<_Tp, debug_alloc<_Alloc> > allocator_type; +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ALLOC_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_bvector.h b/contrib/media/updf/include/bits/stl_bvector.h new file mode 100644 index 0000000000..e57b6be335 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_bvector.h @@ -0,0 +1,698 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_BVECTOR_H +#define __SGI_STL_INTERNAL_BVECTOR_H + +namespace std +{ + +static const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int)); + +struct _Bit_reference { + unsigned int* _M_p; + unsigned int _M_mask; + _Bit_reference(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_mask(__y) {} + +public: + _Bit_reference() : _M_p(0), _M_mask(0) {} + operator bool() const { return !(!(*_M_p & _M_mask)); } + _Bit_reference& operator=(bool __x) + { + if (__x) *_M_p |= _M_mask; + else *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool operator<(const _Bit_reference& __x) const { + return !bool(*this) && bool(__x); + } + void flip() { *_M_p ^= _M_mask; } +}; + +inline void swap(_Bit_reference __x, _Bit_reference __y) +{ + bool __tmp = __x; + __x = __y; + __y = __tmp; +} + +struct _Bit_iterator_base : public random_access_iterator +{ + unsigned int* _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) {} + + void _M_bump_up() { + if (_M_offset++ == __WORD_BIT - 1) { + _M_offset = 0; + ++_M_p; + } + } + void _M_bump_down() { + if (_M_offset-- == 0) { + _M_offset = __WORD_BIT - 1; + --_M_p; + } + } + + void _M_incr(ptrdiff_t __i) { + difference_type __n = __i + _M_offset; + _M_p += __n / __WORD_BIT; + __n = __n % __WORD_BIT; + if (__n < 0) { + _M_offset = (unsigned int) __n + __WORD_BIT; + --_M_p; + } else + _M_offset = (unsigned int) __n; + } + + bool operator==(const _Bit_iterator_base& __i) const { + return _M_p == __i._M_p && _M_offset == __i._M_offset; + } + bool operator<(const _Bit_iterator_base& __i) const { + return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool operator!=(const _Bit_iterator_base& __i) const { + return !(*this == __i); + } + bool operator>(const _Bit_iterator_base& __i) const { + return __i < *this; + } + bool operator<=(const _Bit_iterator_base& __i) const { + return !(__i < *this); + } + bool operator>=(const _Bit_iterator_base& __i) const { + return !(*this < __i); + } +}; + +inline ptrdiff_t +operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __WORD_BIT * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset; +} + + +struct _Bit_iterator : public _Bit_iterator_base +{ + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + + reference operator*() const { return reference(_M_p, 1U << _M_offset); } + iterator& operator++() { + _M_bump_up(); + return *this; + } + iterator operator++(int) { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& operator--() { + _M_bump_down(); + return *this; + } + iterator operator--(int) { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + iterator operator+(difference_type __i) const { + iterator __tmp = *this; + return __tmp += __i; + } + iterator operator-(difference_type __i) const { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference operator[](difference_type __i) { return *(*this + __i); } +}; + +inline _Bit_iterator +operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } + + +struct _Bit_const_iterator : public _Bit_iterator_base +{ + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_const_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) {} + + const_reference operator*() const { + return _Bit_reference(_M_p, 1U << _M_offset); + } + const_iterator& operator++() { + _M_bump_up(); + return *this; + } + const_iterator operator++(int) { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& operator--() { + _M_bump_down(); + return *this; + } + const_iterator operator--(int) { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + const_iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + const_iterator operator+(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator operator-(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference operator[](difference_type __i) { + return *(*this + __i); + } +}; + +inline _Bit_const_iterator +operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } + + +// Bit-vector base class, which encapsulates the difference between +// old SGI-style allocators and standard-conforming allocators. + +// Base class for ordinary allocators. +template +class _Bvector_alloc_base { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + + _Bvector_alloc_base(const allocator_type& __a) + : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + unsigned int* _M_bit_alloc(size_t __n) + { return _M_data_allocator.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _M_data_allocator.deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + typename _Alloc_traits::allocator_type + _M_data_allocator; + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +// Specialization for instanceless allocators. +template +class _Bvector_alloc_base<_Allocator, true> { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Bvector_alloc_base(const allocator_type&) + : _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + typedef typename _Alloc_traits::_Alloc_type + _Alloc_type; + + unsigned int* _M_bit_alloc(size_t __n) + { return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _Alloc_type::deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +template +class _Bvector_base + : public _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> +{ + typedef _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> + _Base; +public: + typedef typename _Base::allocator_type allocator_type; + + _Bvector_base(const allocator_type& __a) : _Base(__a) {} + ~_Bvector_base() { _Base::_M_deallocate(); } +}; + +} // namespace std + +// Declare a partial specialization of vector. +#include +namespace std +{ + +template + class vector : public _Bvector_base<_Alloc> + { + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + + typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { + return _Bvector_base<_Alloc>::get_allocator(); + } + + protected: + using _Bvector_base<_Alloc>::_M_bit_alloc; + using _Bvector_base<_Alloc>::_M_deallocate; + using _Bvector_base<_Alloc>::_M_start; + using _Bvector_base<_Alloc>::_M_finish; + using _Bvector_base<_Alloc>::_M_end_of_storage; + + protected: + void _M_initialize(size_type __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + _M_finish = _M_start + difference_type(__n); + } + void _M_insert_aux(iterator __position, bool __x) { + if (_M_finish._M_p != _M_end_of_storage) { + copy_backward(__position, _M_finish, _M_finish + 1); + *__position = __x; + ++_M_finish; + } + else { + size_type __len = size() ? 2 * size() : __WORD_BIT; + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + *__i++ = __x; + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + template + void _M_initialize_range(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + _M_start = iterator(); + _M_finish = iterator(); + _M_end_of_storage = 0; + for ( ; __first != __last; ++__first) + push_back(*__first); + } + + template + void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize(__n); + copy(__first, __last, _M_start); + } + + template + void _M_insert_range(iterator __pos, + _InputIterator __first, _InputIterator __last, + input_iterator_tag) { + for ( ; __first != __last; ++__first) { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void _M_insert_range(iterator __position, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + if (__first != __last) { + size_type __n = 0; + distance(__first, __last, __n); + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + copy(__first, __last, __position); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + } + + public: + iterator begin() { return _M_start; } + const_iterator begin() const { return _M_start; } + iterator end() { return _M_finish; } + const_iterator end() const { return _M_finish; } + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + size_type size() const { return size_type(end() - begin()); } + size_type max_size() const { return size_type(-1); } + size_type capacity() const { + return size_type(const_iterator(_M_end_of_storage, 0) - begin()); + } + bool empty() const { return begin() == end(); } + + reference operator[](size_type __n) + { return *(begin() + difference_type(__n)); } + const_reference operator[](size_type __n) const + { return *(begin() + difference_type(__n)); } + + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __throw_range_error("vector"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + explicit vector(const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) {} + + vector(size_type __n, bool __value, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0); + } + + explicit vector(size_type __n) + : _Bvector_base<_Alloc>(allocator_type()) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, 0); + } + + vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator()) { + _M_initialize(__x.size()); + copy(__x.begin(), __x.end(), _M_start); + } + + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + + template + void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) { + _M_initialize_range(__first, __last, __iterator_category(__first)); + } + + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) + { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + ~vector() { } + + vector& operator=(const vector& __x) { + if (&__x == this) return *this; + if (__x.size() > capacity()) { + _M_deallocate(); + _M_initialize(__x.size()); + } + copy(__x.begin(), __x.end(), begin()); + _M_finish = begin() + difference_type(__x.size()); + return *this; + } + + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void _M_fill_assign(size_t __n, bool __x) { + if (__n > size()) { + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else { + erase(begin() + __n, end()); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + } + + void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_t) __n, (bool) __val); } + + template + void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) + { _M_assign_aux(__first, __last, __iterator_category(__first)); } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + iterator __cur = begin(); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); + } + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __len = 0; + distance(__first, __last, __len); + if (__len < size()) + erase(copy(__first, __last, begin()), end()); + else { + _ForwardIterator __mid = __first; + advance(__mid, size()); + copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + + void reserve(size_type __n) { + if (capacity() < __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_finish = copy(begin(), end(), iterator(__q, 0)); + _M_deallocate(); + _M_start = iterator(__q, 0); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + } + } + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + void push_back(bool __x) { + if (_M_finish._M_p != _M_end_of_storage) + *_M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void swap(vector& __x) { + std::swap(_M_start, __x._M_start); + std::swap(_M_finish, __x._M_finish); + std::swap(_M_end_of_storage, __x._M_end_of_storage); + } + iterator insert(iterator __position, bool __x = bool()) { + difference_type __n = __position - begin(); + if (_M_finish._M_p != _M_end_of_storage && __position == end()) + *_M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) { + _M_fill_insert(__pos, __n, __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) { + _M_insert_range(__pos, __first, __last, __iterator_category(__first)); + } + + template + void insert(iterator __position, + _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + + void _M_fill_insert(iterator __position, size_type __n, bool __x) { + if (__n == 0) return; + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + fill(__position, __position + difference_type(__n), __x); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + fill_n(__i, __n, __x); + _M_finish = copy(__position, end(), __i + difference_type(__n)); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, size_type __n, bool __x) { + _M_fill_insert(__position, __n, __x); + } + + void pop_back() { --_M_finish; } + iterator erase(iterator __position) { + if (__position + 1 != end()) + copy(__position + 1, end(), __position); + --_M_finish; + return __position; + } + iterator erase(iterator __first, iterator __last) { + _M_finish = copy(__last, end(), __first); + return __first; + } + void resize(size_type __new_size, bool __x = bool()) { + if (__new_size < size()) + erase(begin() + difference_type(__new_size), end()); + else + insert(end(), __new_size - size(), __x); + } + void flip() { + for (unsigned int* __p = _M_start._M_p; __p != _M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void clear() { erase(begin(), end()); } + }; + +// This typedef is non-standard. It is provided for backward compatibility. +typedef vector bit_vector; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_config.h b/contrib/media/updf/include/bits/stl_config.h new file mode 100644 index 0000000000..afeddad71b --- /dev/null +++ b/contrib/media/updf/include/bits/stl_config.h @@ -0,0 +1,573 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1997 + * Silicon Graphics + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef __STL_CONFIG_H +# define __STL_CONFIG_H + +// Flags: +// * __STL_NO_BOOL: defined if the compiler doesn't have bool as a builtin +// type. +// * __STL_HAS_WCHAR_T: defined if the compier has wchar_t as a builtin type. +// * __STL_NO_DRAND48: defined if the compiler doesn't have the drand48 +// function. +// * __STL_STATIC_TEMPLATE_MEMBER_BUG: defined if the compiler can't handle +// static members of template classes. +// * __STL_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a +// constant-initializer in the declaration of a static const data member +// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) +// * __STL_CLASS_PARTIAL_SPECIALIZATION: defined if the compiler supports +// partial specialization of template classes. +// * __STL_PARTIAL_SPECIALIZATION_SYNTAX: defined if the compiler +// supports partial specialization syntax for full specialization of +// class templates. (Even if it doesn't actually support partial +// specialization itself.) +// * __STL_FUNCTION_TMPL_PARTIAL_ORDER: defined if the compiler supports +// partial ordering of function templates. (a.k.a partial specialization +// of function templates.) +// * __STL_MEMBER_TEMPLATES: defined if the compiler supports template +// member functions of classes. +// * __STL_MEMBER_TEMPLATE_CLASSES: defined if the compiler supports +// nested classes that are member templates of other classes. +// * __STL_TEMPLATE_FRIENDS: defined if the compiler supports templatized +// friend declarations. +// * __STL_EXPLICIT_FUNCTION_TMPL_ARGS: defined if the compiler +// supports calling a function template by providing its template +// arguments explicitly. +// * __STL_LIMITED_DEFAULT_TEMPLATES: defined if the compiler is unable +// to handle default template parameters that depend on previous template +// parameters. +// * __STL_NON_TYPE_TMPL_PARAM_BUG: defined if the compiler has trouble with +// function template argument deduction for non-type template parameters. +// * __SGI_STL_NO_ARROW_OPERATOR: defined if the compiler is unable +// to support the -> operator for iterators. +// * __STL_DEFAULT_CONSTRUCTOR_BUG: defined if T() does not work properly +// when T is a builtin type. +// * __STL_USE_EXCEPTIONS: defined if the compiler (in the current compilation +// mode) supports exceptions. +// * __STL_USE_NAMESPACES: defined if the compiler has the necessary +// support for namespaces. +// * __STL_NO_EXCEPTION_HEADER: defined if the compiler does not have a +// standard-conforming header . +// * __STL_NO_BAD_ALLOC: defined if the compiler does not have a +// header, or if does not contain a bad_alloc class. If a bad_alloc +// class exists, it is assumed to be in namespace std. +// * __STL_SGI_THREADS: defined if this is being compiled for an SGI IRIX +// system in multithreaded mode, using native SGI threads instead of +// pthreads. +// * __STL_WIN32THREADS: defined if this is being compiled on a WIN32 +// compiler in multithreaded mode. +// * __STL_PTHREADS: defined if we should use portable pthreads +// synchronization. +// * __STL_UITHREADS: defined if we should use UI / solaris / UnixWare threads +// synchronization. UIthreads are similar to pthreads, but are based +// on an earlier version of the Posix threads standard. +// * __STL_LONG_LONG if the compiler has long long and unsigned long long +// types. (They're not in the C++ standard, but they are included +// in the C99 standard.) +// * __STL_THREADS is defined if thread safety is needed. +// * __STL_VOLATILE is defined to be "volatile" if threads are being +// used, and the empty string otherwise. +// * __STL_USE_CONCEPT_CHECKS enables some extra compile-time error +// checking to make sure that user-defined template arguments satisfy +// all of the appropriate requirements. This may result in more +// comprehensible error messages. It incurs no runtime overhead. This +// feature requires member templates and partial specialization. +// * __STL_NO_USING_CLAUSE_IN_CLASS: The compiler does not handle "using" +// clauses inside of class definitions. +// * __STL_NO_FRIEND_TEMPLATE_CLASS: The compiler does not handle friend +// declaractions where the friend is a template class. +// * __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE: The compiler does not +// support the use of a function pointer type as the argument +// for a template. +// * __STL_MEMBER_TEMPLATE_KEYWORD: standard C++ requires the template +// keyword in a few new places (14.2.4). This flag is set for +// compilers that support (and require) this usage. + + +// User-settable macros that control compilation: +// * __STL_USE_SGI_ALLOCATORS: if defined, then the STL will use older +// SGI-style allocators, instead of standard-conforming allocators, +// even if the compiler supports all of the language features needed +// for standard-conforming allocators. +// * __STL_NO_NAMESPACES: if defined, don't put the library in namespace +// std, even if the compiler supports namespaces. +// * __STL_NO_RELOPS_NAMESPACE: if defined, don't put the relational +// operator templates (>, <=. >=, !=) in namespace std::rel_ops, even +// if the compiler supports namespaces and partial ordering of +// function templates. +// * __STL_ASSERTIONS: if defined, then enable runtime checking through the +// __stl_assert macro. +// * _PTHREADS: if defined, use Posix threads for multithreading support. +// * _UITHREADS:if defined, use SCO/Solaris/UI threads for multithreading +// support +// * _NOTHREADS: if defined, don't use any multithreading support. +// * _STL_NO_CONCEPT_CHECKS: if defined, disables the error checking that +// we get from __STL_USE_CONCEPT_CHECKS. +// * __STL_USE_NEW_IOSTREAMS: if defined, then the STL will use new, +// standard-conforming iostreams (e.g. the header). If not +// defined, the STL will use old cfront-style iostreams (e.g. the +// header). + +// Other macros defined by this file: + +// * bool, true, and false, if __STL_NO_BOOL is defined. +// * typename, as a null macro if it's not already a keyword. +// * explicit, as a null macro if it's not already a keyword. +// * namespace-related macros (__STD, __STL_BEGIN_NAMESPACE, etc.) +// * exception-related macros (__STL_TRY, __STL_UNWIND, etc.) +// * __stl_assert, either as a test or as a null macro, depending on +// whether or not __STL_ASSERTIONS is defined. + +# if defined(_PTHREADS) && !defined(_NOTHREADS) +# define __STL_PTHREADS +# endif + +# if defined(_UITHREADS) && !defined(_PTHREADS) && !defined(_NOTHREADS) +# define __STL_UITHREADS +# endif + +# if defined(__sgi) && !defined(__GNUC__) +# include +# if !defined(_BOOL) +# define __STL_NO_BOOL +# endif +# if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32 +# define __STL_STATIC_CONST_INIT_BUG +# endif +# if defined(_WCHAR_T_IS_KEYWORD) +# define __STL_HAS_WCHAR_T +# endif +# if !defined(_TYPENAME_IS_KEYWORD) +# define __STL_NEED_TYPENAME +# endif +# ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# endif +# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32 +# define __STL_FUNCTION_TMPL_PARTIAL_ORDER +# endif +# ifdef _MEMBER_TEMPLATES +# define __STL_MEMBER_TEMPLATES +# define __STL_TEMPLATE_FRIENDS +# define __STL_MEMBER_TEMPLATE_CLASSES +# endif +# if defined(_MEMBER_TEMPLATE_KEYWORD) +# define __STL_MEMBER_TEMPLATE_KEYWORD +# endif +# if defined(_STANDARD_C_PLUS_PLUS) +# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS +# endif +# if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32 +# define __STL_MEMBER_TEMPLATE_KEYWORD +# endif +# if COMPILER_VERSION < 720 || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) +# define __STL_DEFAULT_CONSTRUCTOR_BUG +# endif +# if !defined(_EXPLICIT_IS_KEYWORD) +# define __STL_NEED_EXPLICIT +# endif +# ifdef __EXCEPTIONS +# define __STL_USE_EXCEPTIONS +# endif +# if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES) +# define __STL_HAS_NAMESPACES +# endif +# if (_COMPILER_VERSION < 721) || \ + !defined(__STL_HAS_NAMESPACES) || defined(__STL_NO_NAMESPACES) +# define __STL_NO_EXCEPTION_HEADER +# endif +# if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || \ + !defined(_NAMESPACES) +# define __STL_NO_BAD_ALLOC +# endif +# if !defined(_NOTHREADS) && !defined(__STL_PTHREADS) +# define __STL_SGI_THREADS +# endif +# if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI +# define __STL_LONG_LONG +# endif +# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) +# define __STL_USE_NEW_IOSTREAMS +# endif +# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) +# define __STL_CAN_THROW_RANGE_ERRORS +# endif +# if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) +# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS +# endif +# endif + + +/* + * Jochen Schlick '1999 - added new #defines (__STL)_UITHREADS (for + * providing SCO / Solaris / UI thread support) + * - added the necessary defines for the SCO UDK 7 + * compiler (and its template friend behavior) + * - all UDK7 specific STL changes are based on the + * macro __USLC__ being defined + */ +// SCO UDK 7 compiler (UnixWare 7x, OSR 5, UnixWare 2x) +# if defined(__USLC__) +# define __STL_HAS_WCHAR_T +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# define __STL_PARTIAL_SPECIALIZATION_SYNTAX +# define __STL_FUNCTION_TMPL_PARTIAL_ORDER +# define __STL_MEMBER_TEMPLATES +# define __STL_MEMBER_TEMPLATE_CLASSES +# define __STL_USE_EXCEPTIONS +# define __STL_HAS_NAMESPACES +# define __STL_USE_NAMESPACES +# define __STL_LONG_LONG +# if defined(_REENTRANT) +# define _UITHREADS /* if UnixWare < 7.0.1 */ +# define __STL_UITHREADS +// use the following defines instead of the UI threads defines when +// you want to use POSIX threads +//# define _PTHREADS /* only if UnixWare >=7.0.1 */ +//# define __STL_PTHREADS +# endif +# endif + + + +# ifdef __GNUC__ +# define __STL_HAS_WCHAR_T +# define __STL_MEMBER_TEMPLATES +# define __STL_MEMBER_TEMPLATE_CLASSES +# define __STL_TEMPLATE_FRIENDS +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# define __STL_PARTIAL_SPECIALIZATION_SYNTAX +# define __STL_FUNCTION_TMPL_PARTIAL_ORDER +# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS +# define __SGI_STL_USE_AUTO_PTR_CONVERSIONS +# define __STL_HAS_NAMESPACES +# define __STL_USE_NAMESPACES +# ifdef __EXCEPTIONS +# define __STL_USE_EXCEPTIONS +# endif +# define __STL_THROW_RANGE_ERRORS +# define __STL_CAN_THROW_RANGE_ERRORS +# define __STL_USE_STD_ALLOCATORS +# define __USE_MALLOC // As the "underlying allocator" +//# define __STL_USE_NEW_IOSTREAMS //990209 bkoz--use standard .h includes. +# ifdef _REENTRANT +# define __STL_THREADS +# endif +# ifdef _PTHREADS +# define __STL_PTHREADS +# endif +# ifndef __STRICT_ANSI__ +# define __STL_LONG_LONG +# endif +# if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95) +# define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE +# endif +# endif + +# if defined(__SUNPRO_CC) +# define __STL_NO_BOOL +# define __STL_NEED_TYPENAME +# define __STL_NEED_EXPLICIT +# define __STL_USE_EXCEPTIONS +# ifdef _REENTRANT +# define __STL_PTHREADS +# endif +# define __SGI_STL_NO_ARROW_OPERATOR +# define __STL_PARTIAL_SPECIALIZATION_SYNTAX +# define __STL_NO_EXCEPTION_HEADER +# define __STL_NO_BAD_ALLOC +# endif + +# if defined(__COMO__) +# define __STL_MEMBER_TEMPLATES +# define __STL_MEMBER_TEMPLATE_CLASSES +# define __STL_TEMPLATE_FRIENDS +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# define __STL_USE_EXCEPTIONS +# define __STL_HAS_NAMESPACES +# endif + +// Intel compiler, which uses the EDG front end. +# if defined(__ICL) +# define __STL_LONG_LONG +# define __STL_MEMBER_TEMPLATES +# define __STL_MEMBER_TEMPLATE_CLASSES +# define __STL_TEMPLATE_FRIENDS +# define __STL_FUNCTION_TMPL_PARTIAL_ORDER +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# define __STL_NO_DRAND48 +# define __STL_HAS_NAMESPACES +# define __STL_USE_EXCEPTIONS +# define __STL_MEMBER_TEMPLATE_KEYWORD +# ifdef _CPPUNWIND +# define __STL_USE_EXCEPTIONS +# endif +# ifdef _MT +# define __STL_WIN32THREADS +# endif +# endif + +// Mingw32, GCC compiler using the Microsoft C runtime +# if defined(__MINGW32__) +# define __STL_NO_DRAND48 +# ifdef _MT +# define __STL_WIN32THREADS +# endif +# endif + +// Cygwin32, GCC compiler on MS Windows +# if defined(__CYGWIN__) +# define __STL_NO_DRAND48 +# endif + + + +// Microsoft compiler. +# if defined(_MSC_VER) && !defined(__ICL) && !defined(__MWERKS__) +# define __STL_NO_DRAND48 +# define __STL_STATIC_CONST_INIT_BUG +# define __STL_NEED_TYPENAME +# define __STL_NO_USING_CLAUSE_IN_CLASS +# define __STL_NO_FRIEND_TEMPLATE_CLASS +# if _MSC_VER < 1100 /* 1000 is version 4.0, 1100 is 5.0, 1200 is 6.0. */ +# define __STL_NEED_EXPLICIT +# define __STL_NO_BOOL +# define __STL_NO_BAD_ALLOC +# endif +# if _MSC_VER > 1000 +# include +# define __STL_DONT_USE_BOOL_TYPEDEF +# endif +# define __STL_NON_TYPE_TMPL_PARAM_BUG +# define __SGI_STL_NO_ARROW_OPERATOR +# define __STL_DEFAULT_CONSTRUCTOR_BUG +# ifdef _CPPUNWIND +# define __STL_USE_EXCEPTIONS +# endif +# ifdef _MT +# define __STL_WIN32THREADS +# endif +# if _MSC_VER >= 1200 +# define __STL_PARTIAL_SPECIALIZATION_SYNTAX +# define __STL_HAS_NAMESPACES +# define __STL_CAN_THROW_RANGE_ERRORS +# define NOMINMAX +# undef min +# undef max +// disable warning 'initializers put in unrecognized initialization area' +# pragma warning ( disable : 4075 ) +// disable warning 'empty controlled statement found' +# pragma warning ( disable : 4390 ) +// disable warning 'debug symbol greater than 255 chars' +# pragma warning ( disable : 4786 ) +# endif +# if _MSC_VER < 1100 +# define __STL_NO_EXCEPTION_HEADER +# define __STL_NO_BAD_ALLOC +# endif + // Because of a Microsoft front end bug, we must not provide a + // namespace qualifier when declaring a friend function. +# define __STD_QUALIFIER +# endif + +# if defined(__BORLANDC__) +# define __STL_NO_BAD_ALLOC +# define __STL_NO_DRAND48 +# define __STL_DEFAULT_CONSTRUCTOR_BUG +# if __BORLANDC__ >= 0x540 /* C++ Builder 4.0 */ +# define __STL_CLASS_PARTIAL_SPECIALIZATION +# define __STL_FUNCTION_TMPL_PARTIAL_ORDER +# define __STL_EXPLICIT_FUNCTION_TMPL_ARGS +# define __STL_MEMBER_TEMPLATES +# define __STL_TEMPLATE_FRIENDS +# else +# define __STL_NEED_TYPENAME +# define __STL_LIMITED_DEFAULT_TEMPLATES +# define __SGI_STL_NO_ARROW_OPERATOR +# define __STL_NON_TYPE_TMPL_PARAM_BUG +# endif +# ifdef _CPPUNWIND +# define __STL_USE_EXCEPTIONS +# endif +# ifdef __MT__ +# define __STL_WIN32THREADS +# endif +# endif + +# if defined(__STL_NO_BOOL) && !defined(__STL_DONT_USE_BOOL_TYPEDEF) + typedef int bool; +# define true 1 +# define false 0 +# endif + +# ifdef __STL_NEED_TYPENAME +# define typename +# endif + +# ifdef __STL_LIMITED_DEFAULT_TEMPLATES +# define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) +# else +# define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) = _Tp +# endif + +# ifdef __STL_MEMBER_TEMPLATE_KEYWORD +# define __STL_TEMPLATE template +# else +# define __STL_TEMPLATE +# endif + +# ifdef __STL_NEED_EXPLICIT +# define explicit +# endif + +# ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS +# define __STL_NULL_TMPL_ARGS <> +# else +# define __STL_NULL_TMPL_ARGS +# endif + +# if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \ + || defined (__STL_PARTIAL_SPECIALIZATION_SYNTAX) +# define __STL_TEMPLATE_NULL template<> +# else +# define __STL_TEMPLATE_NULL +# endif + +// Use standard-conforming allocators if we have the necessary language +// features. __STL_USE_SGI_ALLOCATORS is a hook so that users can +// disable new-style allocators, and continue to use the same kind of +// allocators as before, without having to edit library headers. +# if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && \ + defined(__STL_MEMBER_TEMPLATES) && \ + defined(__STL_MEMBER_TEMPLATE_CLASSES) && \ + !defined(__STL_NO_BOOL) && \ + !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \ + !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \ + !defined(__STL_USE_SGI_ALLOCATORS) +# define __STL_USE_STD_ALLOCATORS +# endif + +# ifndef __STL_DEFAULT_ALLOCATOR +# ifdef __STL_USE_STD_ALLOCATORS +# define __STL_DEFAULT_ALLOCATOR(T) allocator< T > +# else +# define __STL_DEFAULT_ALLOCATOR(T) alloc +# endif +# endif + +// __STL_NO_NAMESPACES is a hook so that users can disable namespaces +// without having to edit library headers. __STL_NO_RELOPS_NAMESPACE is +// a hook so that users can disable the std::rel_ops namespace, keeping +// the relational operator template in namespace std, without having to +// edit library headers. +# if defined(__STL_HAS_NAMESPACES) && !defined(__STL_NO_NAMESPACES) +# define __STL_USE_NAMESPACES +# define __STD std +# define __STL_BEGIN_NAMESPACE namespace std { +# define __STL_END_NAMESPACE } +# if defined(__STL_FUNCTION_TMPL_PARTIAL_ORDER) && \ + !defined(__STL_NO_RELOPS_NAMESPACE) +# define __STL_USE_NAMESPACE_FOR_RELOPS +# define __STL_BEGIN_RELOPS_NAMESPACE namespace std { namespace rel_ops { +# define __STL_END_RELOPS_NAMESPACE } } +# define __STD_RELOPS std::rel_ops +# else /* Use std::rel_ops namespace */ +# define __STL_USE_NAMESPACE_FOR_RELOPS +# define __STL_BEGIN_RELOPS_NAMESPACE namespace std { +# define __STL_END_RELOPS_NAMESPACE } +# define __STD_RELOPS std +# endif /* Use std::rel_ops namespace */ +# else +# define __STD +# define __STL_BEGIN_NAMESPACE +# define __STL_END_NAMESPACE +# undef __STL_USE_NAMESPACE_FOR_RELOPS +# define __STL_BEGIN_RELOPS_NAMESPACE +# define __STL_END_RELOPS_NAMESPACE +# define __STD_RELOPS +# undef __STL_USE_NAMESPACES +# endif + +// Some versions of the EDG front end sometimes require an explicit +// namespace spec where they shouldn't. This macro facilitates that. +// If the bug becomes irrelevant, then all uses of __STD_QUALIFIER +// should be removed. The 7.3 beta SGI compiler has this bug, but the +// MR version is not expected to have it. + +# if defined(__STL_USE_NAMESPACES) && !defined(__STD_QUALIFIER) +# define __STD_QUALIFIER std:: +# else +# define __STD_QUALIFIER +# endif + +# ifdef __STL_USE_EXCEPTIONS +# define __STL_TRY try +# define __STL_CATCH_ALL catch(...) +# define __STL_THROW(x) throw x +# define __STL_RETHROW throw +# define __STL_NOTHROW throw() +# define __STL_UNWIND(action) catch(...) { action; throw; } +# else +# define __STL_TRY +# define __STL_CATCH_ALL if (false) +# define __STL_THROW(x) +# define __STL_RETHROW +# define __STL_NOTHROW +# define __STL_UNWIND(action) +# endif + +#ifdef __STL_ASSERTIONS +# include +# define __stl_assert(expr) \ + if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \ + __FILE__, __LINE__, # expr); abort(); } +#else +# define __stl_assert(expr) +#endif + +#if defined(__STL_WIN32THREADS) || defined(__STL_SGI_THREADS) \ + || defined(__STL_PTHREADS) || defined(__STL_UITHREADS) +# define __STL_THREADS +# define __STL_VOLATILE volatile +#else +# define __STL_VOLATILE +#endif + +// Because concept-checks do not presently work correctly, they +// are disabled. +#if 0 +#if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \ + && defined(__STL_MEMBER_TEMPLATES) \ + && !defined(_STL_NO_CONCEPT_CHECKS) +# define __STL_USE_CONCEPT_CHECKS +#endif +#endif + +#endif /* __STL_CONFIG_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_construct.h b/contrib/media/updf/include/bits/stl_construct.h new file mode 100644 index 0000000000..3a38c343d4 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_construct.h @@ -0,0 +1,123 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_CONSTRUCT_H +#define _CPP_BITS_STL_CONSTRUCT_H 1 + +#include + +namespace std +{ + +// construct and destroy. These functions are not part of the C++ standard, +// and are provided for backward compatibility with the HP STL. We also +// provide internal names _Construct and _Destroy that can be used within +// the library, so that standard-conforming pieces don't have to rely on +// non-standard extensions. + +// Internal names + +template +inline void _Construct(_T1* __p, const _T2& __value) { +new ((void*) __p) _T1(__value); +} + +template +inline void _Construct(_T1* __p) { + new ((void*) __p) _T1(); +} + +template +inline void _Destroy(_Tp* __pointer) { + __pointer->~_Tp(); +} + +template +void +__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) +{ + for ( ; __first != __last; ++__first) + destroy(&*__first); +} + +template +inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) {} + +template +inline void +__destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) +{ + typedef typename __type_traits<_Tp>::has_trivial_destructor + _Trivial_destructor; + __destroy_aux(__first, __last, _Trivial_destructor()); +} + +template +inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { + __destroy(__first, __last, __value_type(__first)); +} + +inline void _Destroy(char*, char*) {} +inline void _Destroy(int*, int*) {} +inline void _Destroy(long*, long*) {} +inline void _Destroy(float*, float*) {} +inline void _Destroy(double*, double*) {} +inline void _Destroy(wchar_t*, wchar_t*) {} + +// -------------------------------------------------- +// Old names from the HP STL. + +template +inline void construct(_T1* __p, const _T2& __value) { + _Construct(__p, __value); +} + +template +inline void construct(_T1* __p) { + _Construct(__p); +} + +template +inline void destroy(_Tp* __pointer) { + _Destroy(__pointer); +} + +template +inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { + _Destroy(__first, __last); +} + +} // namespace std + +#endif /* _CPP_BITS_STL_CONSTRUCT_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_deque.h b/contrib/media/updf/include/bits/stl_deque.h new file mode 100644 index 0000000000..25fd6682a2 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_deque.h @@ -0,0 +1,1322 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#include +#include +#include + +#ifndef __SGI_STL_INTERNAL_DEQUE_H +#define __SGI_STL_INTERNAL_DEQUE_H + +/* Class invariants: + * For any nonsingular iterator i: + * i.node is the address of an element in the map array. The + * contents of i.node is a pointer to the beginning of a node. + * i.first == *(i.node) + * i.last == i.first + node_size + * i.cur is a pointer in the range [i.first, i.last). NOTE: + * the implication of this is that i.cur is always a dereferenceable + * pointer, even if i is a past-the-end iterator. + * Start and Finish are always nonsingular iterators. NOTE: this means + * that an empty deque must have one node, and that a deque + * with N elements, where N is the buffer size, must have two nodes. + * For every node other than start.node and finish.node, every element + * in the node is an initialized object. If start.node == finish.node, + * then [start.cur, finish.cur) are initialized objects, and + * the elements outside that range are uninitialized storage. Otherwise, + * [start.cur, start.last) and [finish.first, finish.cur) are initialized + * objects, and [start.first, start.cur) and [finish.cur, finish.last) + * are uninitialized storage. + * [map, map + map_size) is a valid, non-empty range. + * [start.node, finish.node] is a valid range contained within + * [map, map + map_size). + * A pointer in the range [map, map + map_size) points to an allocated node + * if and only if the pointer is in the range [start.node, finish.node]. + */ + + +/* + * In previous versions of deque, there was an extra template + * parameter so users could control the node size. This extension + * turns out to violate the C++ standard (it can be detected using + * template template parameters), and it has been removed. + */ + +namespace std +{ + +// Note: this function is simply a kludge to work around several compilers' +// bugs in handling constant expressions. +inline size_t __deque_buf_size(size_t __size) { + return __size < 512 ? size_t(512 / __size) : size_t(1); +} + +template +struct _Deque_iterator { + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } + + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp** _Map_pointer; + + typedef _Deque_iterator _Self; + + _Tp* _M_cur; + _Tp* _M_first; + _Tp* _M_last; + _Map_pointer _M_node; + + _Deque_iterator(_Tp* __x, _Map_pointer __y) + : _M_cur(__x), _M_first(*__y), + _M_last(*__y + _S_buffer_size()), _M_node(__y) {} + _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {} + _Deque_iterator(const iterator& __x) + : _M_cur(__x._M_cur), _M_first(__x._M_first), + _M_last(__x._M_last), _M_node(__x._M_node) {} + + reference operator*() const { return *_M_cur; } + pointer operator->() const { return _M_cur; } + + difference_type operator-(const _Self& __x) const { + return difference_type(_S_buffer_size()) * (_M_node - __x._M_node - 1) + + (_M_cur - _M_first) + (__x._M_last - __x._M_cur); + } + + _Self& operator++() { + ++_M_cur; + if (_M_cur == _M_last) { + _M_set_node(_M_node + 1); + _M_cur = _M_first; + } + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + ++*this; + return __tmp; + } + + _Self& operator--() { + if (_M_cur == _M_first) { + _M_set_node(_M_node - 1); + _M_cur = _M_last; + } + --_M_cur; + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + --*this; + return __tmp; + } + + _Self& operator+=(difference_type __n) + { + difference_type __offset = __n + (_M_cur - _M_first); + if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) + _M_cur += __n; + else { + difference_type __node_offset = + __offset > 0 ? __offset / difference_type(_S_buffer_size()) + : -difference_type((-__offset - 1) / _S_buffer_size()) - 1; + _M_set_node(_M_node + __node_offset); + _M_cur = _M_first + + (__offset - __node_offset * difference_type(_S_buffer_size())); + } + return *this; + } + + _Self operator+(difference_type __n) const + { + _Self __tmp = *this; + return __tmp += __n; + } + + _Self& operator-=(difference_type __n) { return *this += -__n; } + + _Self operator-(difference_type __n) const { + _Self __tmp = *this; + return __tmp -= __n; + } + + reference operator[](difference_type __n) const { return *(*this + __n); } + + bool operator==(const _Self& __x) const { return _M_cur == __x._M_cur; } + bool operator!=(const _Self& __x) const { return !(*this == __x); } + bool operator<(const _Self& __x) const { + return (_M_node == __x._M_node) ? + (_M_cur < __x._M_cur) : (_M_node < __x._M_node); + } + bool operator>(const _Self& __x) const { return __x < *this; } + bool operator<=(const _Self& __x) const { return !(__x < *this); } + bool operator>=(const _Self& __x) const { return !(*this < __x); } + + void _M_set_node(_Map_pointer __new_node) { + _M_node = __new_node; + _M_first = *__new_node; + _M_last = _M_first + difference_type(_S_buffer_size()); + } +}; + +template +inline _Deque_iterator<_Tp, _Ref, _Ptr> +operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) +{ + return __x + __n; +} + + +// Deque base class. It has two purposes. First, its constructor +// and destructor allocate (but don't initialize) storage. This makes +// exception safety easier. Second, the base class encapsulates all of +// the differences between SGI-style allocators and standard-conforming +// allocators. + +// Base class for ordinary allocators. +template +class _Deque_alloc_base { +public: + typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return _M_node_allocator; } + + _Deque_alloc_base(const allocator_type& __a) + : _M_node_allocator(__a), _M_map_allocator(__a), + _M_map(0), _M_map_size(0) + {} + +protected: + typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type + _Map_allocator_type; + + allocator_type _M_node_allocator; + _Map_allocator_type _M_map_allocator; + + _Tp* _M_allocate_node() { + return _M_node_allocator.allocate(__deque_buf_size(sizeof(_Tp))); + } + void _M_deallocate_node(_Tp* __p) { + _M_node_allocator.deallocate(__p, __deque_buf_size(sizeof(_Tp))); + } + _Tp** _M_allocate_map(size_t __n) + { return _M_map_allocator.allocate(__n); } + void _M_deallocate_map(_Tp** __p, size_t __n) + { _M_map_allocator.deallocate(__p, __n); } + + _Tp** _M_map; + size_t _M_map_size; +}; + +// Specialization for instanceless allocators. +template +class _Deque_alloc_base<_Tp, _Alloc, true> +{ +public: + typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Deque_alloc_base(const allocator_type&) : _M_map(0), _M_map_size(0) {} + +protected: + typedef typename _Alloc_traits<_Tp, _Alloc>::_Alloc_type _Node_alloc_type; + typedef typename _Alloc_traits<_Tp*, _Alloc>::_Alloc_type _Map_alloc_type; + + _Tp* _M_allocate_node() { + return _Node_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); + } + void _M_deallocate_node(_Tp* __p) { + _Node_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); + } + _Tp** _M_allocate_map(size_t __n) + { return _Map_alloc_type::allocate(__n); } + void _M_deallocate_map(_Tp** __p, size_t __n) + { _Map_alloc_type::deallocate(__p, __n); } + + _Tp** _M_map; + size_t _M_map_size; +}; + +template +class _Deque_base + : public _Deque_alloc_base<_Tp,_Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> +{ +public: + typedef _Deque_alloc_base<_Tp,_Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + typedef _Deque_iterator<_Tp,_Tp&,_Tp*> iterator; + typedef _Deque_iterator<_Tp,const _Tp&,const _Tp*> const_iterator; + + _Deque_base(const allocator_type& __a, size_t __num_elements) + : _Base(__a), _M_start(), _M_finish() + { _M_initialize_map(__num_elements); } + _Deque_base(const allocator_type& __a) + : _Base(__a), _M_start(), _M_finish() {} + ~_Deque_base(); + +protected: + void _M_initialize_map(size_t); + void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); + void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); + enum { _S_initial_map_size = 8 }; + +protected: + iterator _M_start; + iterator _M_finish; +}; + +// Non-inline member functions from _Deque_base. + +template +_Deque_base<_Tp,_Alloc>::~_Deque_base() { + if (_M_map) { + _M_destroy_nodes(_M_start._M_node, _M_finish._M_node + 1); + _M_deallocate_map(_M_map, _M_map_size); + } +} + +template +void +_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements) +{ + size_t __num_nodes = + __num_elements / __deque_buf_size(sizeof(_Tp)) + 1; + + _M_map_size = max((size_t) _S_initial_map_size, __num_nodes + 2); + _M_map = _M_allocate_map(_M_map_size); + + _Tp** __nstart = _M_map + (_M_map_size - __num_nodes) / 2; + _Tp** __nfinish = __nstart + __num_nodes; + + __STL_TRY { + _M_create_nodes(__nstart, __nfinish); + } + __STL_UNWIND((_M_deallocate_map(_M_map, _M_map_size), + _M_map = 0, _M_map_size = 0)); + _M_start._M_set_node(__nstart); + _M_finish._M_set_node(__nfinish - 1); + _M_start._M_cur = _M_start._M_first; + _M_finish._M_cur = _M_finish._M_first + + __num_elements % __deque_buf_size(sizeof(_Tp)); +} + +template +void _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, _Tp** __nfinish) +{ + _Tp** __cur; + __STL_TRY { + for (__cur = __nstart; __cur < __nfinish; ++__cur) + *__cur = _M_allocate_node(); + } + __STL_UNWIND(_M_destroy_nodes(__nstart, __cur)); +} + +template +void +_Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) +{ + for (_Tp** __n = __nstart; __n < __nfinish; ++__n) + _M_deallocate_node(*__n); +} + +template > +class deque : protected _Deque_base<_Tp, _Alloc> { + + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + + typedef _Deque_base<_Tp, _Alloc> _Base; +public: // Basic types + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + typedef typename _Base::allocator_type allocator_type; + allocator_type get_allocator() const { return _Base::get_allocator(); } + +public: // Iterators + typedef typename _Base::iterator iterator; + typedef typename _Base::const_iterator const_iterator; + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + +protected: // Internal typedefs + typedef pointer* _Map_pointer; + static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } + +protected: + using _Base::_M_initialize_map; + using _Base::_M_create_nodes; + using _Base::_M_destroy_nodes; + using _Base::_M_allocate_node; + using _Base::_M_deallocate_node; + using _Base::_M_allocate_map; + using _Base::_M_deallocate_map; + + using _Base::_M_map; + using _Base::_M_map_size; + using _Base::_M_start; + using _Base::_M_finish; + +public: // Basic accessors + iterator begin() { return _M_start; } + iterator end() { return _M_finish; } + const_iterator begin() const { return _M_start; } + const_iterator end() const { return _M_finish; } + + reverse_iterator rbegin() { return reverse_iterator(_M_finish); } + reverse_iterator rend() { return reverse_iterator(_M_start); } + const_reverse_iterator rbegin() const + { return const_reverse_iterator(_M_finish); } + const_reverse_iterator rend() const + { return const_reverse_iterator(_M_start); } + + reference operator[](size_type __n) + { return _M_start[difference_type(__n)]; } + const_reference operator[](size_type __n) const + { return _M_start[difference_type(__n)]; } + + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __throw_range_error("deque"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + reference front() { return *_M_start; } + reference back() { + iterator __tmp = _M_finish; + --__tmp; + return *__tmp; + } + const_reference front() const { return *_M_start; } + const_reference back() const { + const_iterator __tmp = _M_finish; + --__tmp; + return *__tmp; + } + + size_type size() const { return _M_finish - _M_start; } + size_type max_size() const { return size_type(-1); } + bool empty() const { return _M_finish == _M_start; } + +public: // Constructor, destructor. + explicit deque(const allocator_type& __a = allocator_type()) + : _Base(__a, 0) {} + deque(const deque& __x) : _Base(__x.get_allocator(), __x.size()) + { uninitialized_copy(__x.begin(), __x.end(), _M_start); } + deque(size_type __n, const value_type& __value, + const allocator_type& __a = allocator_type()) : _Base(__a, __n) + { _M_fill_initialize(__value); } + explicit deque(size_type __n) : _Base(allocator_type(), __n) + { _M_fill_initialize(value_type()); } + + // Check whether it's an integral type. If so, it's not an iterator. + template + deque(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) : _Base(__a) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + template + void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { + _M_initialize_map(__n); + _M_fill_initialize(__x); + } + + template + void _M_initialize_dispatch(_InputIter __first, _InputIter __last, + __false_type) { + _M_range_initialize(__first, __last, __iterator_category(__first)); + } + + ~deque() { destroy(_M_start, _M_finish); } + + deque& operator= (const deque& __x) { + const size_type __len = size(); + if (&__x != this) { + if (__len >= __x.size()) + erase(copy(__x.begin(), __x.end(), _M_start), _M_finish); + else { + const_iterator __mid = __x.begin() + difference_type(__len); + copy(__x.begin(), __mid, _M_start); + insert(_M_finish, __mid, __x.end()); + } + } + return *this; + } + + void swap(deque& __x) { + std::swap(_M_start, __x._M_start); + std::swap(_M_finish, __x._M_finish); + std::swap(_M_map, __x._M_map); + std::swap(_M_map_size, __x._M_map_size); + } + +public: + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void _M_fill_assign(size_type __n, const _Tp& __val) { + if (__n > size()) { + fill(begin(), end(), __val); + insert(end(), __n - size(), __val); + } + else { + erase(begin() + __n, end()); + fill(begin(), end(), __val); + } + } + + void assign(size_type __n, const _Tp& __val) { + _M_fill_assign(__n, __val); + } + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + +private: // helper functions for assign() + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_type) __n, (_Tp) __val); } + + template + void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) { + _M_assign_aux(__first, __last, __iterator_category(__first)); + } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + input_iterator_tag); + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __len = 0; + distance(__first, __last, __len); + if (__len > size()) { + _ForwardIterator __mid = __first; + advance(__mid, size()); + copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + else + erase(copy(__first, __last, begin()), end()); + } + +public: // push_* and pop_* + + void push_back(const value_type& __t) { + if (_M_finish._M_cur != _M_finish._M_last - 1) { + construct(_M_finish._M_cur, __t); + ++_M_finish._M_cur; + } + else + _M_push_back_aux(__t); + } + + void push_back() { + if (_M_finish._M_cur != _M_finish._M_last - 1) { + construct(_M_finish._M_cur); + ++_M_finish._M_cur; + } + else + _M_push_back_aux(); + } + + void push_front(const value_type& __t) { + if (_M_start._M_cur != _M_start._M_first) { + construct(_M_start._M_cur - 1, __t); + --_M_start._M_cur; + } + else + _M_push_front_aux(__t); + } + + void push_front() { + if (_M_start._M_cur != _M_start._M_first) { + construct(_M_start._M_cur - 1); + --_M_start._M_cur; + } + else + _M_push_front_aux(); + } + + + void pop_back() { + if (_M_finish._M_cur != _M_finish._M_first) { + --_M_finish._M_cur; + destroy(_M_finish._M_cur); + } + else + _M_pop_back_aux(); + } + + void pop_front() { + if (_M_start._M_cur != _M_start._M_last - 1) { + destroy(_M_start._M_cur); + ++_M_start._M_cur; + } + else + _M_pop_front_aux(); + } + +public: // Insert + + iterator insert(iterator position, const value_type& __x) { + if (position._M_cur == _M_start._M_cur) { + push_front(__x); + return _M_start; + } + else if (position._M_cur == _M_finish._M_cur) { + push_back(__x); + iterator __tmp = _M_finish; + --__tmp; + return __tmp; + } + else { + return _M_insert_aux(position, __x); + } + } + + iterator insert(iterator __position) + { return insert(__position, value_type()); } + + void insert(iterator __pos, size_type __n, const value_type& __x) + { _M_fill_insert(__pos, __n, __x); } + + void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + // Check whether it's an integral type. If so, it's not an iterator. + template + void insert(iterator __pos, _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__pos, __first, __last, _Integral()); + } + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) { + _M_fill_insert(__pos, (size_type) __n, (value_type) __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) { + insert(__pos, __first, __last, __iterator_category(__first)); + } + + void resize(size_type __new_size, const value_type& __x) { + const size_type __len = size(); + if (__new_size < __len) + erase(_M_start + __new_size, _M_finish); + else + insert(_M_finish, __new_size - __len, __x); + } + + void resize(size_type new_size) { resize(new_size, value_type()); } + +public: // Erase + iterator erase(iterator __pos) { + iterator __next = __pos; + ++__next; + size_type __index = __pos - _M_start; + if (__index < (size() >> 1)) { + copy_backward(_M_start, __pos, __next); + pop_front(); + } + else { + copy(__next, _M_finish, __pos); + pop_back(); + } + return _M_start + __index; + } + + iterator erase(iterator __first, iterator __last); + void clear(); + +protected: // Internal construction/destruction + + void _M_fill_initialize(const value_type& __value); + + template + void _M_range_initialize(_InputIterator __first, _InputIterator __last, + input_iterator_tag); + + template + void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag); + +protected: // Internal push_* and pop_* + + void _M_push_back_aux(const value_type&); + void _M_push_back_aux(); + void _M_push_front_aux(const value_type&); + void _M_push_front_aux(); + void _M_pop_back_aux(); + void _M_pop_front_aux(); + +protected: // Internal insert functions + + template + void insert(iterator __pos, _InputIterator __first, _InputIterator __last, + input_iterator_tag); + + template + void insert(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag); + + iterator _M_insert_aux(iterator __pos, const value_type& __x); + iterator _M_insert_aux(iterator __pos); + void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); + + template + void _M_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + size_type __n); + + iterator _M_reserve_elements_at_front(size_type __n) { + size_type __vacancies = _M_start._M_cur - _M_start._M_first; + if (__n > __vacancies) + _M_new_elements_at_front(__n - __vacancies); + return _M_start - difference_type(__n); + } + + iterator _M_reserve_elements_at_back(size_type __n) { + size_type __vacancies = (_M_finish._M_last - _M_finish._M_cur) - 1; + if (__n > __vacancies) + _M_new_elements_at_back(__n - __vacancies); + return _M_finish + difference_type(__n); + } + + void _M_new_elements_at_front(size_type __new_elements); + void _M_new_elements_at_back(size_type __new_elements); + +protected: // Allocation of _M_map and nodes + + // Makes sure the _M_map has space for new nodes. Does not actually + // add the nodes. Can invalidate _M_map pointers. (And consequently, + // deque iterators.) + + void _M_reserve_map_at_back (size_type __nodes_to_add = 1) { + if (__nodes_to_add + 1 > _M_map_size - (_M_finish._M_node - _M_map)) + _M_reallocate_map(__nodes_to_add, false); + } + + void _M_reserve_map_at_front (size_type __nodes_to_add = 1) { + if (__nodes_to_add > size_type(_M_start._M_node - _M_map)) + _M_reallocate_map(__nodes_to_add, true); + } + + void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); +}; + +// Non-inline member functions + +template +template +void deque<_Tp, _Alloc> + ::_M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag) +{ + iterator __cur = begin(); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); +} + +template +void deque<_Tp, _Alloc>::_M_fill_insert(iterator __pos, + size_type __n, const value_type& __x) +{ + if (__pos._M_cur == _M_start._M_cur) { + iterator __new_start = _M_reserve_elements_at_front(__n); + __STL_TRY { + uninitialized_fill(__new_start, _M_start, __x); + _M_start = __new_start; + } + __STL_UNWIND(_M_destroy_nodes(__new_start._M_node, _M_start._M_node)); + } + else if (__pos._M_cur == _M_finish._M_cur) { + iterator __new_finish = _M_reserve_elements_at_back(__n); + __STL_TRY { + uninitialized_fill(_M_finish, __new_finish, __x); + _M_finish = __new_finish; + } + __STL_UNWIND(_M_destroy_nodes(_M_finish._M_node + 1, + __new_finish._M_node + 1)); + } + else + _M_insert_aux(__pos, __n, __x); +} + +template +typename deque<_Tp,_Alloc>::iterator +deque<_Tp,_Alloc>::erase(iterator __first, iterator __last) +{ + if (__first == _M_start && __last == _M_finish) { + clear(); + return _M_finish; + } + else { + difference_type __n = __last - __first; + difference_type __elems_before = __first - _M_start; + if (static_cast(__elems_before) < (size() - __n) / 2) { + copy_backward(_M_start, __first, __last); + iterator __new_start = _M_start + __n; + destroy(_M_start, __new_start); + _M_destroy_nodes(__new_start._M_node, _M_start._M_node); + _M_start = __new_start; + } + else { + copy(__last, _M_finish, __first); + iterator __new_finish = _M_finish - __n; + destroy(__new_finish, _M_finish); + _M_destroy_nodes(__new_finish._M_node + 1, _M_finish._M_node + 1); + _M_finish = __new_finish; + } + return _M_start + __elems_before; + } +} + +template +void deque<_Tp,_Alloc>::clear() +{ + for (_Map_pointer __node = _M_start._M_node + 1; + __node < _M_finish._M_node; + ++__node) { + destroy(*__node, *__node + _S_buffer_size()); + _M_deallocate_node(*__node); + } + + if (_M_start._M_node != _M_finish._M_node) { + destroy(_M_start._M_cur, _M_start._M_last); + destroy(_M_finish._M_first, _M_finish._M_cur); + _M_deallocate_node(_M_finish._M_first); + } + else + destroy(_M_start._M_cur, _M_finish._M_cur); + + _M_finish = _M_start; +} + +// Precondition: _M_start and _M_finish have already been initialized, +// but none of the deque's elements have yet been constructed. +template +void deque<_Tp,_Alloc>::_M_fill_initialize(const value_type& __value) { + _Map_pointer __cur; + __STL_TRY { + for (__cur = _M_start._M_node; __cur < _M_finish._M_node; ++__cur) + uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value); + uninitialized_fill(_M_finish._M_first, _M_finish._M_cur, __value); + } + __STL_UNWIND(destroy(_M_start, iterator(*__cur, __cur))); +} + +template template +void deque<_Tp,_Alloc>::_M_range_initialize(_InputIterator __first, + _InputIterator __last, + input_iterator_tag) +{ + _M_initialize_map(0); + __STL_TRY { + for ( ; __first != __last; ++__first) + push_back(*__first); + } + __STL_UNWIND(clear()); +} + +template template +void deque<_Tp,_Alloc>::_M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, + forward_iterator_tag) +{ + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize_map(__n); + + _Map_pointer __cur_node; + __STL_TRY { + for (__cur_node = _M_start._M_node; + __cur_node < _M_finish._M_node; + ++__cur_node) { + _ForwardIterator __mid = __first; + advance(__mid, _S_buffer_size()); + uninitialized_copy(__first, __mid, *__cur_node); + __first = __mid; + } + uninitialized_copy(__first, __last, _M_finish._M_first); + } + __STL_UNWIND(destroy(_M_start, iterator(*__cur_node, __cur_node))); +} + +// Called only if _M_finish._M_cur == _M_finish._M_last - 1. +template +void deque<_Tp,_Alloc>::_M_push_back_aux(const value_type& __t) +{ + value_type __t_copy = __t; + _M_reserve_map_at_back(); + *(_M_finish._M_node + 1) = _M_allocate_node(); + __STL_TRY { + construct(_M_finish._M_cur, __t_copy); + _M_finish._M_set_node(_M_finish._M_node + 1); + _M_finish._M_cur = _M_finish._M_first; + } + __STL_UNWIND(_M_deallocate_node(*(_M_finish._M_node + 1))); +} + +// Called only if _M_finish._M_cur == _M_finish._M_last - 1. +template +void deque<_Tp,_Alloc>::_M_push_back_aux() +{ + _M_reserve_map_at_back(); + *(_M_finish._M_node + 1) = _M_allocate_node(); + __STL_TRY { + construct(_M_finish._M_cur); + _M_finish._M_set_node(_M_finish._M_node + 1); + _M_finish._M_cur = _M_finish._M_first; + } + __STL_UNWIND(_M_deallocate_node(*(_M_finish._M_node + 1))); +} + +// Called only if _M_start._M_cur == _M_start._M_first. +template +void deque<_Tp,_Alloc>::_M_push_front_aux(const value_type& __t) +{ + value_type __t_copy = __t; + _M_reserve_map_at_front(); + *(_M_start._M_node - 1) = _M_allocate_node(); + __STL_TRY { + _M_start._M_set_node(_M_start._M_node - 1); + _M_start._M_cur = _M_start._M_last - 1; + construct(_M_start._M_cur, __t_copy); + } + __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1)))); +} + +// Called only if _M_start._M_cur == _M_start._M_first. +template +void deque<_Tp,_Alloc>::_M_push_front_aux() +{ + _M_reserve_map_at_front(); + *(_M_start._M_node - 1) = _M_allocate_node(); + __STL_TRY { + _M_start._M_set_node(_M_start._M_node - 1); + _M_start._M_cur = _M_start._M_last - 1; + construct(_M_start._M_cur); + } + __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1)))); +} + +// Called only if _M_finish._M_cur == _M_finish._M_first. +template +void deque<_Tp,_Alloc>::_M_pop_back_aux() +{ + _M_deallocate_node(_M_finish._M_first); + _M_finish._M_set_node(_M_finish._M_node - 1); + _M_finish._M_cur = _M_finish._M_last - 1; + destroy(_M_finish._M_cur); +} + +// Called only if _M_start._M_cur == _M_start._M_last - 1. Note that +// if the deque has at least one element (a precondition for this member +// function), and if _M_start._M_cur == _M_start._M_last, then the deque +// must have at least two nodes. +template +void deque<_Tp,_Alloc>::_M_pop_front_aux() +{ + destroy(_M_start._M_cur); + _M_deallocate_node(_M_start._M_first); + _M_start._M_set_node(_M_start._M_node + 1); + _M_start._M_cur = _M_start._M_first; +} + +template template +void deque<_Tp,_Alloc>::insert(iterator __pos, + _InputIterator __first, _InputIterator __last, + input_iterator_tag) +{ + copy(__first, __last, inserter(*this, __pos)); +} + +template template +void +deque<_Tp,_Alloc>::insert(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __n = 0; + distance(__first, __last, __n); + if (__pos._M_cur == _M_start._M_cur) { + iterator __new_start = _M_reserve_elements_at_front(__n); + __STL_TRY { + uninitialized_copy(__first, __last, __new_start); + _M_start = __new_start; + } + __STL_UNWIND(_M_destroy_nodes(__new_start._M_node, _M_start._M_node)); + } + else if (__pos._M_cur == _M_finish._M_cur) { + iterator __new_finish = _M_reserve_elements_at_back(__n); + __STL_TRY { + uninitialized_copy(__first, __last, _M_finish); + _M_finish = __new_finish; + } + __STL_UNWIND(_M_destroy_nodes(_M_finish._M_node + 1, + __new_finish._M_node + 1)); + } + else + _M_insert_aux(__pos, __first, __last, __n); +} + +template +typename deque<_Tp, _Alloc>::iterator +deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos, const value_type& __x) +{ + difference_type __index = __pos - _M_start; + value_type __x_copy = __x; + if (static_cast(__index) < size() / 2) { + push_front(front()); + iterator __front1 = _M_start; + ++__front1; + iterator __front2 = __front1; + ++__front2; + __pos = _M_start + __index; + iterator __pos1 = __pos; + ++__pos1; + copy(__front2, __pos1, __front1); + } + else { + push_back(back()); + iterator __back1 = _M_finish; + --__back1; + iterator __back2 = __back1; + --__back2; + __pos = _M_start + __index; + copy_backward(__pos, __back2, __back1); + } + *__pos = __x_copy; + return __pos; +} + +template +typename deque<_Tp,_Alloc>::iterator +deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos) +{ + difference_type __index = __pos - _M_start; + if (static_cast(__index) < size() / 2) { + push_front(front()); + iterator __front1 = _M_start; + ++__front1; + iterator __front2 = __front1; + ++__front2; + __pos = _M_start + __index; + iterator __pos1 = __pos; + ++__pos1; + copy(__front2, __pos1, __front1); + } + else { + push_back(back()); + iterator __back1 = _M_finish; + --__back1; + iterator __back2 = __back1; + --__back2; + __pos = _M_start + __index; + copy_backward(__pos, __back2, __back1); + } + *__pos = value_type(); + return __pos; +} + +template +void deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + size_type __n, + const value_type& __x) +{ + const difference_type __elems_before = __pos - _M_start; + size_type __length = this->size(); + value_type __x_copy = __x; + if (__elems_before < difference_type(__length / 2)) { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = _M_start; + __pos = _M_start + __elems_before; + __STL_TRY { + if (__elems_before >= difference_type(__n)) { + iterator __start_n = _M_start + difference_type(__n); + uninitialized_copy(_M_start, __start_n, __new_start); + _M_start = __new_start; + copy(__start_n, __pos, __old_start); + fill(__pos - difference_type(__n), __pos, __x_copy); + } + else { + __uninitialized_copy_fill(_M_start, __pos, __new_start, + _M_start, __x_copy); + _M_start = __new_start; + fill(__old_start, __pos, __x_copy); + } + } + __STL_UNWIND(_M_destroy_nodes(__new_start._M_node, _M_start._M_node)); + } + else { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = _M_finish; + const difference_type __elems_after = + difference_type(__length) - __elems_before; + __pos = _M_finish - __elems_after; + __STL_TRY { + if (__elems_after > difference_type(__n)) { + iterator __finish_n = _M_finish - difference_type(__n); + uninitialized_copy(__finish_n, _M_finish, _M_finish); + _M_finish = __new_finish; + copy_backward(__pos, __finish_n, __old_finish); + fill(__pos, __pos + difference_type(__n), __x_copy); + } + else { + __uninitialized_fill_copy(_M_finish, __pos + difference_type(__n), + __x_copy, __pos, _M_finish); + _M_finish = __new_finish; + fill(__pos, __old_finish, __x_copy); + } + } + __STL_UNWIND(_M_destroy_nodes(_M_finish._M_node + 1, + __new_finish._M_node + 1)); + } +} + +template template +void deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + _ForwardIterator __first, + _ForwardIterator __last, + size_type __n) +{ + const difference_type __elemsbefore = __pos - _M_start; + size_type __length = size(); + if (static_cast(__elemsbefore) < __length / 2) { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = _M_start; + __pos = _M_start + __elemsbefore; + __STL_TRY { + if (__elemsbefore >= difference_type(__n)) { + iterator __start_n = _M_start + difference_type(__n); + uninitialized_copy(_M_start, __start_n, __new_start); + _M_start = __new_start; + copy(__start_n, __pos, __old_start); + copy(__first, __last, __pos - difference_type(__n)); + } + else { + _ForwardIterator __mid = __first; + advance(__mid, difference_type(__n) - __elemsbefore); + __uninitialized_copy_copy(_M_start, __pos, __first, __mid, + __new_start); + _M_start = __new_start; + copy(__mid, __last, __old_start); + } + } + __STL_UNWIND(_M_destroy_nodes(__new_start._M_node, _M_start._M_node)); + } + else { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = _M_finish; + const difference_type __elemsafter = + difference_type(__length) - __elemsbefore; + __pos = _M_finish - __elemsafter; + __STL_TRY { + if (__elemsafter > difference_type(__n)) { + iterator __finish_n = _M_finish - difference_type(__n); + uninitialized_copy(__finish_n, _M_finish, _M_finish); + _M_finish = __new_finish; + copy_backward(__pos, __finish_n, __old_finish); + copy(__first, __last, __pos); + } + else { + _ForwardIterator __mid = __first; + advance(__mid, __elemsafter); + __uninitialized_copy_copy(__mid, __last, __pos, _M_finish, _M_finish); + _M_finish = __new_finish; + copy(__first, __mid, __pos); + } + } + __STL_UNWIND(_M_destroy_nodes(_M_finish._M_node + 1, + __new_finish._M_node + 1)); + } +} + +template +void deque<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems) +{ + size_type __new_nodes + = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size(); + _M_reserve_map_at_front(__new_nodes); + size_type __i; + __STL_TRY { + for (__i = 1; __i <= __new_nodes; ++__i) + *(_M_start._M_node - __i) = _M_allocate_node(); + } +# ifdef __STL_USE_EXCEPTIONS + catch(...) { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(_M_start._M_node - __j)); + throw; + } +# endif /* __STL_USE_EXCEPTIONS */ +} + +template +void deque<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems) +{ + size_type __new_nodes + = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size(); + _M_reserve_map_at_back(__new_nodes); + size_type __i; + __STL_TRY { + for (__i = 1; __i <= __new_nodes; ++__i) + *(_M_finish._M_node + __i) = _M_allocate_node(); + } +# ifdef __STL_USE_EXCEPTIONS + catch(...) { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(_M_finish._M_node + __j)); + throw; + } +# endif /* __STL_USE_EXCEPTIONS */ +} + +template +void deque<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add, + bool __add_at_front) +{ + size_type __old_num_nodes = _M_finish._M_node - _M_start._M_node + 1; + size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; + + _Map_pointer __new_nstart; + if (_M_map_size > 2 * __new_num_nodes) { + __new_nstart = _M_map + (_M_map_size - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + if (__new_nstart < _M_start._M_node) + copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart); + else + copy_backward(_M_start._M_node, _M_finish._M_node + 1, + __new_nstart + __old_num_nodes); + } + else { + size_type __new_map_size = + _M_map_size + max(_M_map_size, __nodes_to_add) + 2; + + _Map_pointer __new_map = _M_allocate_map(__new_map_size); + __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart); + _M_deallocate_map(_M_map, _M_map_size); + + _M_map = __new_map; + _M_map_size = __new_map_size; + } + + _M_start._M_set_node(__new_nstart); + _M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); +} + + +// Nonmember functions. + +template +inline bool operator==(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return __x.size() == __y.size() && + equal(__x.begin(), __x.end(), __y.begin()); +} + +template +inline bool operator<(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); +} + +template +inline bool operator!=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return !(__y < __x); +} +template +inline bool operator>=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) { + return !(__x < __y); +} + +template +inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) { + __x.swap(__y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_DEQUE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_function.h b/contrib/media/updf/include/bits/stl_function.h new file mode 100644 index 0000000000..43bf93296b --- /dev/null +++ b/contrib/media/updf/include/bits/stl_function.h @@ -0,0 +1,744 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_FUNCTION_H +#define __SGI_STL_INTERNAL_FUNCTION_H + +namespace std +{ + +template +struct unary_function { + typedef _Arg argument_type; + typedef _Result result_type; +}; + +template +struct binary_function { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; +}; + +template +struct plus : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } +}; + +template +struct minus : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } +}; + +template +struct multiplies : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } +}; + +template +struct divides : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } +}; + +// identity_element (not part of the C++ standard). + +template inline _Tp identity_element(plus<_Tp>) { + return _Tp(0); +} +template inline _Tp identity_element(multiplies<_Tp>) { + return _Tp(1); +} + +template +struct modulus : public binary_function<_Tp,_Tp,_Tp> +{ + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } +}; + +template +struct negate : public unary_function<_Tp,_Tp> +{ + _Tp operator()(const _Tp& __x) const { return -__x; } +}; + +template +struct equal_to : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } +}; + +template +struct not_equal_to : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } +}; + +template +struct greater : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } +}; + +template +struct less : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } +}; + +template +struct greater_equal : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } +}; + +template +struct less_equal : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } +}; + +template +struct logical_and : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } +}; + +template +struct logical_or : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } +}; + +template +struct logical_not : public unary_function<_Tp,bool> +{ + bool operator()(const _Tp& __x) const { return !__x; } +}; + +template +class unary_negate + : public unary_function { +protected: + _Predicate _M_pred; +public: + explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {} + bool operator()(const typename _Predicate::argument_type& __x) const { + return !_M_pred(__x); + } +}; + +template +inline unary_negate<_Predicate> +not1(const _Predicate& __pred) +{ + return unary_negate<_Predicate>(__pred); +} + +template +class binary_negate + : public binary_function { +protected: + _Predicate _M_pred; +public: + explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {} + bool operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { + return !_M_pred(__x, __y); + } +}; + +template +inline binary_negate<_Predicate> +not2(const _Predicate& __pred) +{ + return binary_negate<_Predicate>(__pred); +} + +template +class binder1st + : public unary_function { +protected: + _Operation op; + typename _Operation::first_argument_type value; +public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) {} + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const { + return op(value, __x); + } +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // 109. Missing binders for non-const sequence elements + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const { + return op(value, __x); + } +#endif +}; + +template +inline binder1st<_Operation> +bind1st(const _Operation& __fn, const _Tp& __x) +{ + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); +} + +template +class binder2nd + : public unary_function { +protected: + _Operation op; + typename _Operation::second_argument_type value; +public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) {} + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const { + return op(__x, value); + } +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // 109. Missing binders for non-const sequence elements + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const { + return op(__x, value); + } +#endif +}; + +template +inline binder2nd<_Operation> +bind2nd(const _Operation& __fn, const _Tp& __x) +{ + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); +} + +// unary_compose and binary_compose (extensions, not part of the standard). + +template +class unary_compose + : public unary_function +{ +protected: + _Operation1 _M_fn1; + _Operation2 _M_fn2; +public: + unary_compose(const _Operation1& __x, const _Operation2& __y) + : _M_fn1(__x), _M_fn2(__y) {} + typename _Operation1::result_type + operator()(const typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x)); + } +}; + +template +inline unary_compose<_Operation1,_Operation2> +compose1(const _Operation1& __fn1, const _Operation2& __fn2) +{ + return unary_compose<_Operation1,_Operation2>(__fn1, __fn2); +} + +template +class binary_compose + : public unary_function { +protected: + _Operation1 _M_fn1; + _Operation2 _M_fn2; + _Operation3 _M_fn3; +public: + binary_compose(const _Operation1& __x, const _Operation2& __y, + const _Operation3& __z) + : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { } + typename _Operation1::result_type + operator()(const typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x), _M_fn3(__x)); + } +}; + +template +inline binary_compose<_Operation1, _Operation2, _Operation3> +compose2(const _Operation1& __fn1, const _Operation2& __fn2, + const _Operation3& __fn3) +{ + return binary_compose<_Operation1,_Operation2,_Operation3> + (__fn1, __fn2, __fn3); +} + +template +class pointer_to_unary_function : public unary_function<_Arg, _Result> { +protected: + _Result (*_M_ptr)(_Arg); +public: + pointer_to_unary_function() {} + explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {} + _Result operator()(_Arg __x) const { return _M_ptr(__x); } +}; + +template +inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) +{ + return pointer_to_unary_function<_Arg, _Result>(__x); +} + +template +class pointer_to_binary_function : + public binary_function<_Arg1,_Arg2,_Result> { +protected: + _Result (*_M_ptr)(_Arg1, _Arg2); +public: + pointer_to_binary_function() {} + explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) {} + _Result operator()(_Arg1 __x, _Arg2 __y) const { + return _M_ptr(__x, __y); + } +}; + +template +inline pointer_to_binary_function<_Arg1,_Arg2,_Result> +ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { + return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__x); +} + +// identity is an extensions: it is not part of the standard. +template +struct _Identity : public unary_function<_Tp,_Tp> { + _Tp& operator()(_Tp& __x) const { return __x; } + const _Tp& operator()(const _Tp& __x) const { return __x; } +}; + +template struct identity : public _Identity<_Tp> {}; + +// select1st and select2nd are extensions: they are not part of the standard. +template +struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { + typename _Pair::first_type& operator()(_Pair& __x) const { + return __x.first; + } + const typename _Pair::first_type& operator()(const _Pair& __x) const { + return __x.first; + } +}; + +template +struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> +{ + typename _Pair::second_type& operator()(_Pair& __x) const { + return __x.second; + } + const typename _Pair::second_type& operator()(const _Pair& __x) const { + return __x.second; + } +}; + +template struct select1st : public _Select1st<_Pair> {}; +template struct select2nd : public _Select2nd<_Pair> {}; + +// project1st and project2nd are extensions: they are not part of the standard +template +struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> { + _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; } +}; + +template +struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> { + _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; } +}; + +template +struct project1st : public _Project1st<_Arg1, _Arg2> {}; + +template +struct project2nd : public _Project2nd<_Arg1, _Arg2> {}; + +// constant_void_fun, constant_unary_fun, and constant_binary_fun are +// extensions: they are not part of the standard. (The same, of course, +// is true of the helper functions constant0, constant1, and constant2.) + +template +struct _Constant_void_fun { + typedef _Result result_type; + result_type _M_val; + + _Constant_void_fun(const result_type& __v) : _M_val(__v) {} + const result_type& operator()() const { return _M_val; } +}; + +template +struct _Constant_unary_fun { + typedef _Argument argument_type; + typedef _Result result_type; + result_type _M_val; + + _Constant_unary_fun(const result_type& __v) : _M_val(__v) {} + const result_type& operator()(const _Argument&) const { return _M_val; } +}; + +template +struct _Constant_binary_fun { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + _Result _M_val; + + _Constant_binary_fun(const _Result& __v) : _M_val(__v) {} + const result_type& operator()(const _Arg1&, const _Arg2&) const { + return _M_val; + } +}; + +template +struct constant_void_fun : public _Constant_void_fun<_Result> { + constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {} +}; + + +template +struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument> +{ + constant_unary_fun(const _Result& __v) + : _Constant_unary_fun<_Result, _Argument>(__v) {} +}; + + +template +struct constant_binary_fun + : public _Constant_binary_fun<_Result, _Arg1, _Arg2> +{ + constant_binary_fun(const _Result& __v) + : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {} +}; + +template +inline constant_void_fun<_Result> constant0(const _Result& __val) +{ + return constant_void_fun<_Result>(__val); +} + +template +inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) +{ + return constant_unary_fun<_Result,_Result>(__val); +} + +template +inline constant_binary_fun<_Result,_Result,_Result> +constant2(const _Result& __val) +{ + return constant_binary_fun<_Result,_Result,_Result>(__val); +} + +// subtractive_rng is an extension: it is not part of the standard. +// Note: this code assumes that int is 32 bits. +class subtractive_rng : public unary_function { +private: + unsigned int _M_table[55]; + size_t _M_index1; + size_t _M_index2; +public: + unsigned int operator()(unsigned int __limit) { + _M_index1 = (_M_index1 + 1) % 55; + _M_index2 = (_M_index2 + 1) % 55; + _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2]; + return _M_table[_M_index1] % __limit; + } + + void _M_initialize(unsigned int __seed) + { + unsigned int __k = 1; + _M_table[54] = __seed; + size_t __i; + for (__i = 0; __i < 54; __i++) { + size_t __ii = (21 * (__i + 1) % 55) - 1; + _M_table[__ii] = __k; + __k = __seed - __k; + __seed = _M_table[__ii]; + } + for (int __loop = 0; __loop < 4; __loop++) { + for (__i = 0; __i < 55; __i++) + _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55]; + } + _M_index1 = 0; + _M_index2 = 31; + } + + subtractive_rng(unsigned int __seed) { _M_initialize(__seed); } + subtractive_rng() { _M_initialize(161803398u); } +}; + + +// Adaptor function objects: pointers to member functions. + +// There are a total of 16 = 2^4 function objects in this family. +// (1) Member functions taking no arguments vs member functions taking +// one argument. +// (2) Call through pointer vs call through reference. +// (3) Member function with void return type vs member function with +// non-void return type. +// (4) Const vs non-const member function. + +// Note that choice (3) is nothing more than a workaround: according +// to the draft, compilers should handle void and non-void the same way. +// This feature is not yet widely implemented, though. You can only use +// member functions returning void if your compiler supports partial +// specialization. + +// All of this complexity is in the function objects themselves. You can +// ignore it by using the helper function mem_fun and mem_fun_ref, +// which create whichever type of adaptor is appropriate. +// (mem_fun1 and mem_fun1_ref are no longer part of the C++ standard, +// but they are provided for backward compatibility.) + + +template +class mem_fun_t : public unary_function<_Tp*,_Ret> { +public: + explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} + _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } +private: + _Ret (_Tp::*_M_f)(); +}; + +template +class const_mem_fun_t : public unary_function { +public: + explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} + _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } +private: + _Ret (_Tp::*_M_f)() const; +}; + + +template +class mem_fun_ref_t : public unary_function<_Tp,_Ret> { +public: + explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} + _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } +private: + _Ret (_Tp::*_M_f)(); +}; + +template +class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> { +public: + explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} + _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } +private: + _Ret (_Tp::*_M_f)() const; +}; + +template +class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> { +public: + explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} + _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } +private: + _Ret (_Tp::*_M_f)(_Arg); +}; + +template +class const_mem_fun1_t : public binary_function { +public: + explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} + _Ret operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } +private: + _Ret (_Tp::*_M_f)(_Arg) const; +}; + +template +class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { +public: + explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} + _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } +private: + _Ret (_Tp::*_M_f)(_Arg); +}; + +template +class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { +public: + explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} + _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } +private: + _Ret (_Tp::*_M_f)(_Arg) const; +}; + +template +class mem_fun_t : public unary_function<_Tp*,void> { +public: + explicit mem_fun_t(void (_Tp::*__pf)()) : _M_f(__pf) {} + void operator()(_Tp* __p) const { (__p->*_M_f)(); } +private: + void (_Tp::*_M_f)(); +}; + +template +class const_mem_fun_t : public unary_function { +public: + explicit const_mem_fun_t(void (_Tp::*__pf)() const) : _M_f(__pf) {} + void operator()(const _Tp* __p) const { (__p->*_M_f)(); } +private: + void (_Tp::*_M_f)() const; +}; + +template +class mem_fun_ref_t : public unary_function<_Tp,void> { +public: + explicit mem_fun_ref_t(void (_Tp::*__pf)()) : _M_f(__pf) {} + void operator()(_Tp& __r) const { (__r.*_M_f)(); } +private: + void (_Tp::*_M_f)(); +}; + +template +class const_mem_fun_ref_t : public unary_function<_Tp,void> { +public: + explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const) : _M_f(__pf) {} + void operator()(const _Tp& __r) const { (__r.*_M_f)(); } +private: + void (_Tp::*_M_f)() const; +}; + +template +class mem_fun1_t : public binary_function<_Tp*,_Arg,void> { +public: + explicit mem_fun1_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} + void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } +private: + void (_Tp::*_M_f)(_Arg); +}; + +template +class const_mem_fun1_t + : public binary_function { +public: + explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} + void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } +private: + void (_Tp::*_M_f)(_Arg) const; +}; + +template +class mem_fun1_ref_t + : public binary_function<_Tp,_Arg,void> { +public: + explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} + void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } +private: + void (_Tp::*_M_f)(_Arg); +}; + +template +class const_mem_fun1_ref_t + : public binary_function<_Tp,_Arg,void> { +public: + explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} + void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } +private: + void (_Tp::*_M_f)(_Arg) const; +}; + + +// Mem_fun adaptor helper functions. There are only two: +// mem_fun and mem_fun_ref. (mem_fun1 and mem_fun1_ref +// are provided for backward compatibility, but they are no longer +// part of the C++ standard.) + +template +inline mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret,_Tp>(__f); } + +template +inline const_mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret,_Tp>(__f); } + +template +inline mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret,_Tp>(__f); } + +template +inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret,_Tp>(__f); } + +template +inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); } + +template +inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg> +mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } + +template +inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); } + +template +inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun1_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg> +mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_FUNCTION_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_heap.h b/contrib/media/updf/include/bits/stl_heap.h new file mode 100644 index 0000000000..0770d7cf2a --- /dev/null +++ b/contrib/media/updf/include/bits/stl_heap.h @@ -0,0 +1,314 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_HEAP_H +#define _CPP_BITS_STL_HEAP_H 1 + +namespace std +{ + +// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap. + +template +void +__push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) +{ + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) { + *(__first + __holeIndex) = *(__first + __parent); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = __value; +} + +template +inline void +__push_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Distance*, _Tp*) +{ + __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), + _Tp(*(__last - 1))); +} + +template +inline void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>); + + __push_heap_aux(__first, __last, + __distance_type(__first), __value_type(__first)); +} + +template +void +__push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) +{ + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { + *(__first + __holeIndex) = *(__first + __parent); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = __value; +} + +template +inline void +__push_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp, + _Distance*, _Tp*) +{ + __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), + _Tp(*(__last - 1)), __comp); +} + +template +inline void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + + __push_heap_aux(__first, __last, __comp, + __distance_type(__first), __value_type(__first)); +} + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) +{ + _Distance __topIndex = __holeIndex; + _Distance __secondChild = 2 * __holeIndex + 2; + while (__secondChild < __len) { + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = *(__first + __secondChild); + __holeIndex = __secondChild; + __secondChild = 2 * (__secondChild + 1); + } + if (__secondChild == __len) { + *(__first + __holeIndex) = *(__first + (__secondChild - 1)); + __holeIndex = __secondChild - 1; + } + __push_heap(__first, __holeIndex, __topIndex, __value); +} + +template +inline void +__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Tp __value, _Distance*) +{ + *__result = *__first; + __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value); +} + +template +inline void +__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Tp*) +{ + __pop_heap(__first, __last - 1, __last - 1, + _Tp(*(__last - 1)), __distance_type(__first)); +} + +template +inline void pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>); + + __pop_heap_aux(__first, __last, __value_type(__first)); +} + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) +{ + _Distance __topIndex = __holeIndex; + _Distance __secondChild = 2 * __holeIndex + 2; + while (__secondChild < __len) { + if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = *(__first + __secondChild); + __holeIndex = __secondChild; + __secondChild = 2 * (__secondChild + 1); + } + if (__secondChild == __len) { + *(__first + __holeIndex) = *(__first + (__secondChild - 1)); + __holeIndex = __secondChild - 1; + } + __push_heap(__first, __holeIndex, __topIndex, __value, __comp); +} + +template +inline void +__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Tp __value, _Compare __comp, + _Distance*) +{ + *__result = *__first; + __adjust_heap(__first, _Distance(0), _Distance(__last - __first), + __value, __comp); +} + +template +inline void +__pop_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Tp*, _Compare __comp) +{ + __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp, + __distance_type(__first)); +} + +template +inline void +pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + + __pop_heap_aux(__first, __last, __value_type(__first), __comp); +} + +template +void +__make_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Tp*, _Distance*) +{ + if (__last - __first < 2) return; + _Distance __len = __last - __first; + _Distance __parent = (__len - 2)/2; + + while (true) { + __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent))); + if (__parent == 0) return; + __parent--; + } +} + +template +inline void +make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>); + + __make_heap(__first, __last, + __value_type(__first), __distance_type(__first)); +} + +template +void +__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp, _Tp*, _Distance*) +{ + if (__last - __first < 2) return; + _Distance __len = __last - __first; + _Distance __parent = (__len - 2)/2; + + while (true) { + __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)), + __comp); + if (__parent == 0) return; + __parent--; + } +} + +template +inline void +make_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + + __make_heap(__first, __last, __comp, + __value_type(__first), __distance_type(__first)); +} + +template +void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + __glibcpp_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>); + + while (__last - __first > 1) + pop_heap(__first, __last--); +} + +template +void +sort_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< + _RandomAccessIterator>); + + while (__last - __first > 1) + pop_heap(__first, __last--, __comp); +} + +} // namespace std + +#endif /* _CPP_BITS_STL_HEAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_iterator.h b/contrib/media/updf/include/bits/stl_iterator.h new file mode 100644 index 0000000000..a062d4dcb0 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_iterator.h @@ -0,0 +1,548 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ITERATOR_H +#define __SGI_STL_INTERNAL_ITERATOR_H + +namespace std +{ + +template +class back_insert_iterator { +protected: + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + explicit back_insert_iterator(_Container& __x) : container(&__x) {} + back_insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->push_back(__value); + return *this; + } + back_insert_iterator<_Container>& operator*() { return *this; } + back_insert_iterator<_Container>& operator++() { return *this; } + back_insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +inline back_insert_iterator<_Container> back_inserter(_Container& __x) { + return back_insert_iterator<_Container>(__x); +} + +template +class front_insert_iterator { +protected: + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + explicit front_insert_iterator(_Container& __x) : container(&__x) {} + front_insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->push_front(__value); + return *this; + } + front_insert_iterator<_Container>& operator*() { return *this; } + front_insert_iterator<_Container>& operator++() { return *this; } + front_insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +inline front_insert_iterator<_Container> front_inserter(_Container& __x) { + return front_insert_iterator<_Container>(__x); +} + +template +class insert_iterator { +protected: + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +inline +insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) +{ + typedef typename _Container::iterator __iter; + return insert_iterator<_Container>(__x, __iter(__i)); +} + +template +class reverse_bidirectional_iterator { + typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, + _Reference, _Distance> _Self; +protected: + _BidirectionalIterator current; +public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Reference reference; + + reverse_bidirectional_iterator() {} + explicit reverse_bidirectional_iterator(_BidirectionalIterator __x) + : current(__x) {} + _BidirectionalIterator base() const { return current; } + _Reference operator*() const { + _BidirectionalIterator __tmp = current; + return *--__tmp; + } + pointer operator->() const { return &(operator*()); } + _Self& operator++() { + --current; + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + --current; + return __tmp; + } + _Self& operator--() { + ++current; + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + ++current; + return __tmp; + } +}; + +template +inline bool operator==( + const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __x, + const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __y) +{ + return __x.base() == __y.base(); +} + +template +inline bool operator!=( + const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __x, + const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __y) +{ + return !(__x == __y); +} + + +// This is the new version of reverse_iterator, as defined in the +// draft C++ standard. It relies on the iterator_traits template, +// which in turn relies on partial specialization. The class +// reverse_bidirectional_iterator is no longer part of the draft +// standard, but it is retained for backward compatibility. + +template +class reverse_iterator +{ +protected: + _Iterator current; +public: + typedef typename iterator_traits<_Iterator>::iterator_category + iterator_category; + typedef typename iterator_traits<_Iterator>::value_type + value_type; + typedef typename iterator_traits<_Iterator>::difference_type + difference_type; + typedef typename iterator_traits<_Iterator>::pointer + pointer; + typedef typename iterator_traits<_Iterator>::reference + reference; + + typedef _Iterator iterator_type; + typedef reverse_iterator<_Iterator> _Self; + +public: + reverse_iterator() {} + explicit reverse_iterator(iterator_type __x) : current(__x) {} + + reverse_iterator(const _Self& __x) : current(__x.current) {} + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) {} + + iterator_type base() const { return current; } + reference operator*() const { + _Iterator __tmp = current; + return *--__tmp; + } + pointer operator->() const { return &(operator*()); } + + _Self& operator++() { + --current; + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + --current; + return __tmp; + } + _Self& operator--() { + ++current; + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + ++current; + return __tmp; + } + + _Self operator+(difference_type __n) const { + return _Self(current - __n); + } + _Self& operator+=(difference_type __n) { + current -= __n; + return *this; + } + _Self operator-(difference_type __n) const { + return _Self(current + __n); + } + _Self& operator-=(difference_type __n) { + current += __n; + return *this; + } + reference operator[](difference_type __n) const { return *(*this + __n); } +}; + +template +inline bool operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return __x.base() == __y.base(); +} + +template +inline bool operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return __y.base() < __x.base(); +} + +template +inline bool operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return !(__x < __y); +} + +template +inline typename reverse_iterator<_Iterator>::difference_type +operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) { + return __y.base() - __x.base(); +} + +template +inline reverse_iterator<_Iterator> +operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) { + return reverse_iterator<_Iterator>(__x.base() - __n); +} + + +template , + class _Dist = ptrdiff_t> +class istream_iterator { +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + typedef input_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Dist difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + istream_iterator() : _M_stream(0), _M_ok(false) {} + istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } + + reference operator*() const { return _M_value; } + pointer operator->() const { return &(operator*()); } + + istream_iterator& operator++() { + _M_read(); + return *this; + } + istream_iterator operator++(int) { + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + + bool _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + +private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + + void _M_read() { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } +}; + +template +inline bool +operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { + return __x._M_equal(__y); +} + +template +inline bool +operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { + return !__x._M_equal(__y); +} + + +template > +class ostream_iterator { +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) {} + ostream_iterator<_Tp>& operator=(const _Tp& __value) { + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + ostream_iterator<_Tp>& operator*() { return *this; } + ostream_iterator<_Tp>& operator++() { return *this; } + ostream_iterator<_Tp>& operator++(int) { return *this; } +private: + ostream_type* _M_stream; + const _CharT* _M_string; +}; + + +// This iterator adapter is 'normal' in the sense that it does not +// change the semantics of any of the operators of its itererator +// parameter. Its primary purpose is to convert an iterator that is +// not a class, e.g. a pointer, into an iterator that is a class. +// The _Container parameter exists solely so that different containers +// using this template can instantiate different types, even if the +// _Iterator parameter is the same. +template +class __normal_iterator + : public iterator::iterator_category, + iterator_traits<_Iterator>::value_type, + iterator_traits<_Iterator>::difference_type, + iterator_traits<_Iterator>::pointer, + iterator_traits<_Iterator>::reference> +{ + +protected: + _Iterator _M_current; + +public: + typedef __normal_iterator<_Iterator, _Container> normal_iterator_type; + typedef iterator_traits<_Iterator> __traits_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + + __normal_iterator() : _M_current(_Iterator()) { } + + explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + + // Allow iterator to const_iterator conversion + template + inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i) + : _M_current(__i.base()) { } + + // Forward iterator requirements + reference + operator*() const { return *_M_current; } + + pointer + operator->() const { return _M_current; } + + normal_iterator_type& + operator++() { ++_M_current; return *this; } + + normal_iterator_type + operator++(int) { return __normal_iterator(_M_current++); } + + // Bidirectional iterator requirements + normal_iterator_type& + operator--() { --_M_current; return *this; } + + normal_iterator_type + operator--(int) { return __normal_iterator(_M_current--); } + + // Random access iterator requirements + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + + normal_iterator_type& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + + normal_iterator_type + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + + normal_iterator_type& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + + normal_iterator_type + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + + difference_type + operator-(const normal_iterator_type& __i) const + { return _M_current - __i._M_current; } + + const _Iterator& + base() const { return _M_current; } +}; + +// forward iterator requirements + +template +inline bool +operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return __lhs.base() == __rhs.base(); } + +template +inline bool +operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return !(__lhs == __rhs); } + +// random access iterator requirements + +template +inline bool +operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return __lhs.base() < __rhs.base(); } + +template +inline bool +operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return __rhs < __lhs; } + +template +inline bool +operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return !(__rhs < __lhs); } + +template +inline bool +operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) +{ return !(__lhs < __rhs); } + +template +inline __normal_iterator<_Iterator, _Container> +operator+(__normal_iterator<_Iterator, _Container>::difference_type __n, + const __normal_iterator<_Iterator, _Container>& __i) +{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_iterator_base.h b/contrib/media/updf/include/bits/stl_iterator_base.h new file mode 100644 index 0000000000..44a6f8fbfb --- /dev/null +++ b/contrib/media/updf/include/bits/stl_iterator_base.h @@ -0,0 +1,367 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_H +#define __SGI_STL_INTERNAL_ITERATOR_BASE_H + +// This file contains all of the general iterator-related utilities. +// The internal file stl_iterator.h contains predefined iterators, +// such as front_insert_iterator and istream_iterator. + +#include + +__STL_BEGIN_NAMESPACE + +struct input_iterator_tag {}; +struct output_iterator_tag {}; +struct forward_iterator_tag : public input_iterator_tag {}; +struct bidirectional_iterator_tag : public forward_iterator_tag {}; +struct random_access_iterator_tag : public bidirectional_iterator_tag {}; + +// The base classes input_iterator, output_iterator, forward_iterator, +// bidirectional_iterator, and random_access_iterator are not part of +// the C++ standard. (They have been replaced by struct iterator.) +// They are included for backward compatibility with the HP STL. + +template struct input_iterator { + typedef input_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +struct output_iterator { + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; +}; + +template struct forward_iterator { + typedef forward_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + + +template struct bidirectional_iterator { + typedef bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +template struct random_access_iterator { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +#ifdef __STL_USE_NAMESPACES +template +struct iterator { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; +}; +#endif /* __STL_USE_NAMESPACES */ + +#ifdef __STL_CLASS_PARTIAL_SPECIALIZATION + +template +struct iterator_traits { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; +}; + +template +struct iterator_traits<_Tp*> { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +template +struct iterator_traits { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; +}; + +// The overloaded functions iterator_category, distance_type, and +// value_type are not part of the C++ standard. (They have been +// replaced by struct iterator_traits.) They are included for +// backward compatibility with the HP STL. + +// We introduce internal names for these functions. + +template +inline typename iterator_traits<_Iter>::iterator_category +__iterator_category(const _Iter&) +{ + typedef typename iterator_traits<_Iter>::iterator_category _Category; + return _Category(); +} + +template +inline typename iterator_traits<_Iter>::difference_type* +__distance_type(const _Iter&) +{ + return static_cast::difference_type*>(0); +} + +template +inline typename iterator_traits<_Iter>::value_type* +__value_type(const _Iter&) +{ + return static_cast::value_type*>(0); +} + +template +inline typename iterator_traits<_Iter>::iterator_category +iterator_category(const _Iter& __i) { return __iterator_category(__i); } + + +template +inline typename iterator_traits<_Iter>::difference_type* +distance_type(const _Iter& __i) { return __distance_type(__i); } + +template +inline typename iterator_traits<_Iter>::value_type* +value_type(const _Iter& __i) { return __value_type(__i); } + +#define __ITERATOR_CATEGORY(__i) __iterator_category(__i) +#define __DISTANCE_TYPE(__i) __distance_type(__i) +#define __VALUE_TYPE(__i) __value_type(__i) + +#else /* __STL_CLASS_PARTIAL_SPECIALIZATION */ + +template +inline input_iterator_tag +iterator_category(const input_iterator<_Tp, _Distance>&) + { return input_iterator_tag(); } + +inline output_iterator_tag iterator_category(const output_iterator&) + { return output_iterator_tag(); } + +template +inline forward_iterator_tag +iterator_category(const forward_iterator<_Tp, _Distance>&) + { return forward_iterator_tag(); } + +template +inline bidirectional_iterator_tag +iterator_category(const bidirectional_iterator<_Tp, _Distance>&) + { return bidirectional_iterator_tag(); } + +template +inline random_access_iterator_tag +iterator_category(const random_access_iterator<_Tp, _Distance>&) + { return random_access_iterator_tag(); } + +template +inline random_access_iterator_tag iterator_category(const _Tp*) + { return random_access_iterator_tag(); } + +template +inline _Tp* value_type(const input_iterator<_Tp, _Distance>&) + { return (_Tp*)(0); } + +template +inline _Tp* value_type(const forward_iterator<_Tp, _Distance>&) + { return (_Tp*)(0); } + +template +inline _Tp* value_type(const bidirectional_iterator<_Tp, _Distance>&) + { return (_Tp*)(0); } + +template +inline _Tp* value_type(const random_access_iterator<_Tp, _Distance>&) + { return (_Tp*)(0); } + +template +inline _Tp* value_type(const _Tp*) { return (_Tp*)(0); } + +template +inline _Distance* distance_type(const input_iterator<_Tp, _Distance>&) +{ + return (_Distance*)(0); +} + +template +inline _Distance* distance_type(const forward_iterator<_Tp, _Distance>&) +{ + return (_Distance*)(0); +} + +template +inline _Distance* +distance_type(const bidirectional_iterator<_Tp, _Distance>&) +{ + return (_Distance*)(0); +} + +template +inline _Distance* +distance_type(const random_access_iterator<_Tp, _Distance>&) +{ + return (_Distance*)(0); +} + +template +inline ptrdiff_t* distance_type(const _Tp*) { return (ptrdiff_t*)(0); } + +// Without partial specialization we can't use iterator_traits, so +// we must keep the old iterator query functions around. + +#define __ITERATOR_CATEGORY(__i) iterator_category(__i) +#define __DISTANCE_TYPE(__i) distance_type(__i) +#define __VALUE_TYPE(__i) value_type(__i) + +#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */ + +template +inline void __distance(_InputIterator __first, _InputIterator __last, + _Distance& __n, input_iterator_tag) +{ + while (__first != __last) { ++__first; ++__n; } +} + +template +inline void __distance(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance& __n, random_access_iterator_tag) +{ + __STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator); + __n += __last - __first; +} + +template +inline void distance(_InputIterator __first, + _InputIterator __last, _Distance& __n) +{ + __STL_REQUIRES(_InputIterator, _InputIterator); + __distance(__first, __last, __n, iterator_category(__first)); +} + +#ifdef __STL_CLASS_PARTIAL_SPECIALIZATION + +template +inline typename iterator_traits<_InputIterator>::difference_type +__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) +{ + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; +} + +template +inline typename iterator_traits<_RandomAccessIterator>::difference_type +__distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) { + __STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator); + return __last - __first; +} + +template +inline typename iterator_traits<_InputIterator>::difference_type +distance(_InputIterator __first, _InputIterator __last) { + typedef typename iterator_traits<_InputIterator>::iterator_category + _Category; + __STL_REQUIRES(_InputIterator, _InputIterator); + return __distance(__first, __last, _Category()); +} + +#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */ + +template +inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag) { + while (__n--) ++__i; +} + +#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) +#pragma set woff 1183 +#endif + +template +inline void __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) { + __STL_REQUIRES(_BidirectionalIterator, _BidirectionalIterator); + if (__n >= 0) + while (__n--) ++__i; + else + while (__n++) --__i; +} + +#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) +#pragma reset woff 1183 +#endif + +template +inline void __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) { + __STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator); + __i += __n; +} + +template +inline void advance(_InputIterator& __i, _Distance __n) { + __STL_REQUIRES(_InputIterator, _InputIterator); + __advance(__i, __n, iterator_category(__i)); +} + +__STL_END_NAMESPACE + +#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_H */ + + + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_iterator_base_funcs.h b/contrib/media/updf/include/bits/stl_iterator_base_funcs.h new file mode 100644 index 0000000000..6162fd8132 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_iterator_base_funcs.h @@ -0,0 +1,152 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H +#define __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H + +// This file contains all of the general iterator-related utility +// functions, such as distance() and advance(). +// The internal file stl_iterator.h contains predefined iterators, +// such as front_insert_iterator and istream_iterator. + +#pragma GCC system_header +#include + +namespace std +{ + +// There are two signatures for distance. In addition to the one taking +// two iterators and returning a result, there is another taking two +// iterators and a reference-to-result variable, and returning nothing. +// The latter seems to be an SGI extension. -- pedwards +template +inline void __distance(_InputIterator __first, _InputIterator __last, + _Distance& __n, input_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + while (__first != __last) { ++__first; ++__n; } +} + +template +inline void __distance(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance& __n, random_access_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>); + __n += __last - __first; +} + +template +inline void distance(_InputIterator __first, + _InputIterator __last, _Distance& __n) +{ + // concept requirements -- taken care of in __distance + __distance(__first, __last, __n, iterator_category(__first)); +} + +template +inline typename iterator_traits<_InputIterator>::difference_type +__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; +} + +template +inline typename iterator_traits<_RandomAccessIterator>::difference_type +__distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>); + return __last - __first; +} + +template +inline typename iterator_traits<_InputIterator>::difference_type +distance(_InputIterator __first, _InputIterator __last) +{ + // concept requirements -- taken care of in __distance + typedef typename iterator_traits<_InputIterator>::iterator_category + _Category; + return __distance(__first, __last, _Category()); +} + +template +inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIter>); + while (__n--) ++__i; +} + +template +inline void __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) +{ + // concept requirements +__glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>); + if (__n > 0) + while (__n--) ++__i; + else + while (__n++) --__i; +} + +template +inline void __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) +{ + // concept requirements + __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>); + __i += __n; +} + +template +inline void advance(_InputIterator& __i, _Distance __n) +{ + // concept requirements -- taken care of in __advance + __advance(__i, __n, iterator_category(__i)); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H */ + + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_iterator_base_types.h b/contrib/media/updf/include/bits/stl_iterator_base_types.h new file mode 100644 index 0000000000..ac32424ae7 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_iterator_base_types.h @@ -0,0 +1,182 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H +#define __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H + +// This file contains all of the general iterator-related utility +// types, such as iterator_traits and struct iterator. +// The internal file stl_iterator.h contains predefined iterators, +// such as front_insert_iterator and istream_iterator. + +#pragma GCC system_header + +namespace std +{ + +struct input_iterator_tag {}; +struct output_iterator_tag {}; +struct forward_iterator_tag : public input_iterator_tag {}; +struct bidirectional_iterator_tag : public forward_iterator_tag {}; +struct random_access_iterator_tag : public bidirectional_iterator_tag {}; + +// The base classes input_iterator, output_iterator, forward_iterator, +// bidirectional_iterator, and random_access_iterator are not part of +// the C++ standard. (They have been replaced by struct iterator.) +// They are included for backward compatibility with the HP STL. + +template struct input_iterator { + typedef input_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +struct output_iterator { + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; +}; + +template struct forward_iterator { + typedef forward_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + + +template struct bidirectional_iterator { + typedef bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +template struct random_access_iterator { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +template +struct iterator { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; +}; + +template +struct iterator_traits { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; +}; + +template +struct iterator_traits<_Tp*> { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +template +struct iterator_traits { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; +}; + +// The overloaded functions iterator_category, distance_type, and +// value_type are not part of the C++ standard. (They have been +// replaced by struct iterator_traits.) They are included for +// backward compatibility with the HP STL. + +// We introduce internal names for these functions. + +template +inline typename iterator_traits<_Iter>::iterator_category +__iterator_category(const _Iter&) +{ + typedef typename iterator_traits<_Iter>::iterator_category _Category; + return _Category(); +} + +template +inline typename iterator_traits<_Iter>::difference_type* +__distance_type(const _Iter&) +{ + return static_cast::difference_type*>(0); +} + +template +inline typename iterator_traits<_Iter>::value_type* +__value_type(const _Iter&) +{ + return static_cast::value_type*>(0); +} + +template +inline typename iterator_traits<_Iter>::iterator_category +iterator_category(const _Iter& __i) { return __iterator_category(__i); } + + +template +inline typename iterator_traits<_Iter>::difference_type* +distance_type(const _Iter& __i) { return __distance_type(__i); } + +template +inline typename iterator_traits<_Iter>::value_type* +value_type(const _Iter& __i) { return __value_type(__i); } + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H */ + + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_list.h b/contrib/media/updf/include/bits/stl_list.h new file mode 100644 index 0000000000..d837556cc9 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_list.h @@ -0,0 +1,745 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_LIST_H +#define __SGI_STL_INTERNAL_LIST_H + +#include + +namespace std +{ + +struct _List_node_base { + _List_node_base* _M_next; + _List_node_base* _M_prev; +}; + +template +struct _List_node : public _List_node_base { + _Tp _M_data; +}; + +struct _List_iterator_base { + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef bidirectional_iterator_tag iterator_category; + + _List_node_base* _M_node; + + _List_iterator_base(_List_node_base* __x) : _M_node(__x) {} + _List_iterator_base() {} + + void _M_incr() { _M_node = _M_node->_M_next; } + void _M_decr() { _M_node = _M_node->_M_prev; } + + bool operator==(const _List_iterator_base& __x) const { + return _M_node == __x._M_node; + } + bool operator!=(const _List_iterator_base& __x) const { + return _M_node != __x._M_node; + } +}; + +template +struct _List_iterator : public _List_iterator_base { + typedef _List_iterator<_Tp,_Tp&,_Tp*> iterator; + typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator; + typedef _List_iterator<_Tp,_Ref,_Ptr> _Self; + + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef _List_node<_Tp> _Node; + + _List_iterator(_Node* __x) : _List_iterator_base(__x) {} + _List_iterator() {} + _List_iterator(const iterator& __x) : _List_iterator_base(__x._M_node) {} + + reference operator*() const { return ((_Node*) _M_node)->_M_data; } + pointer operator->() const { return &(operator*()); } + + _Self& operator++() { + this->_M_incr(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + this->_M_incr(); + return __tmp; + } + _Self& operator--() { + this->_M_decr(); + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + this->_M_decr(); + return __tmp; + } +}; + + +// Base class that encapsulates details of allocators. Three cases: +// an ordinary standard-conforming allocator, a standard-conforming +// allocator with no non-static data, and an SGI-style allocator. +// This complexity is necessary only because we're worrying about backward +// compatibility and because we want to avoid wasting storage on an +// allocator instance if it isn't necessary. + + +// Base for general standard-conforming allocators. +template +class _List_alloc_base { +public: + typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return _Node_allocator; } + + _List_alloc_base(const allocator_type& __a) : _Node_allocator(__a) {} + +protected: + _List_node<_Tp>* _M_get_node() + { return _Node_allocator.allocate(1); } + void _M_put_node(_List_node<_Tp>* __p) + { _Node_allocator.deallocate(__p, 1); } + +protected: + typename _Alloc_traits<_List_node<_Tp>, _Allocator>::allocator_type + _Node_allocator; + _List_node<_Tp>* _M_node; +}; + +// Specialization for instanceless allocators. + +template +class _List_alloc_base<_Tp, _Allocator, true> { +public: + typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _List_alloc_base(const allocator_type&) {} + +protected: + typedef typename _Alloc_traits<_List_node<_Tp>, _Allocator>::_Alloc_type + _Alloc_type; + _List_node<_Tp>* _M_get_node() { return _Alloc_type::allocate(1); } + void _M_put_node(_List_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); } + +protected: + _List_node<_Tp>* _M_node; +}; + +template +class _List_base + : public _List_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> +{ +public: + typedef _List_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + + _List_base(const allocator_type& __a) : _Base(__a) { + _M_node = _M_get_node(); + _M_node->_M_next = _M_node; + _M_node->_M_prev = _M_node; + } + ~_List_base() { + clear(); + _M_put_node(_M_node); + } + + void clear(); +}; + + +template +void +_List_base<_Tp,_Alloc>::clear() +{ + _List_node<_Tp>* __cur = (_List_node<_Tp>*) _M_node->_M_next; + while (__cur != _M_node) { + _List_node<_Tp>* __tmp = __cur; + __cur = (_List_node<_Tp>*) __cur->_M_next; + _Destroy(&__tmp->_M_data); + _M_put_node(__tmp); + } + _M_node->_M_next = _M_node; + _M_node->_M_prev = _M_node; +} + +template > +class list : protected _List_base<_Tp, _Alloc> +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + + typedef _List_base<_Tp, _Alloc> _Base; +protected: + typedef void* _Void_pointer; + +public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _List_node<_Tp> _Node; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + typedef typename _Base::allocator_type allocator_type; + allocator_type get_allocator() const { return _Base::get_allocator(); } + +public: + typedef _List_iterator<_Tp,_Tp&,_Tp*> iterator; + typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator; + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + +protected: + using _Base::_M_node; + using _Base::_M_put_node; + using _Base::_M_get_node; + +protected: + _Node* _M_create_node(const _Tp& __x) + { + _Node* __p = _M_get_node(); + __STL_TRY { + _Construct(&__p->_M_data, __x); + } + __STL_UNWIND(_M_put_node(__p)); + return __p; + } + + _Node* _M_create_node() + { + _Node* __p = _M_get_node(); + __STL_TRY { + _Construct(&__p->_M_data); + } + __STL_UNWIND(_M_put_node(__p)); + return __p; + } + +public: + explicit list(const allocator_type& __a = allocator_type()) : _Base(__a) {} + + iterator begin() { return (_Node*)(_M_node->_M_next); } + const_iterator begin() const { return (_Node*)(_M_node->_M_next); } + + iterator end() { return _M_node; } + const_iterator end() const { return _M_node; } + + reverse_iterator rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator rend() + { return reverse_iterator(begin()); } + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + bool empty() const { return _M_node->_M_next == _M_node; } + size_type size() const { + size_type __result = 0; + distance(begin(), end(), __result); + return __result; + } + size_type max_size() const { return size_type(-1); } + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(--end()); } + const_reference back() const { return *(--end()); } + + void swap(list<_Tp, _Alloc>& __x) { std::swap(_M_node, __x._M_node); } + + iterator insert(iterator __position, const _Tp& __x) { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_next = __position._M_node; + __tmp->_M_prev = __position._M_node->_M_prev; + __position._M_node->_M_prev->_M_next = __tmp; + __position._M_node->_M_prev = __tmp; + return __tmp; + } + iterator insert(iterator __position) { return insert(__position, _Tp()); } + + // Check whether it's an integral type. If so, it's not an iterator. + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) { + _M_fill_insert(__pos, (size_type) __n, (_Tp) __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type); + + template + void insert(iterator __pos, _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__pos, __first, __last, _Integral()); + } + + void insert(iterator __pos, size_type __n, const _Tp& __x) + { _M_fill_insert(__pos, __n, __x); } + void _M_fill_insert(iterator __pos, size_type __n, const _Tp& __x); + + void push_front(const _Tp& __x) { insert(begin(), __x); } + void push_front() {insert(begin());} + void push_back(const _Tp& __x) { insert(end(), __x); } + void push_back() {insert(end());} + + iterator erase(iterator __position) { + _List_node_base* __next_node = __position._M_node->_M_next; + _List_node_base* __prev_node = __position._M_node->_M_prev; + _Node* __n = (_Node*) __position._M_node; + __prev_node->_M_next = __next_node; + __next_node->_M_prev = __prev_node; + _Destroy(&__n->_M_data); + _M_put_node(__n); + return iterator((_Node*) __next_node); + } + iterator erase(iterator __first, iterator __last); + void clear() { _Base::clear(); } + + void resize(size_type __new_size, const _Tp& __x); + void resize(size_type __new_size) { this->resize(__new_size, _Tp()); } + + void pop_front() { erase(begin()); } + void pop_back() { + iterator __tmp = end(); + erase(--__tmp); + } + list(size_type __n, const _Tp& __value, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { insert(begin(), __n, __value); } + explicit list(size_type __n) + : _Base(allocator_type()) + { insert(begin(), __n, _Tp()); } + + // We don't need any dispatching tricks here, because insert does all of + // that anyway. + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { insert(begin(), __first, __last); } + + list(const list<_Tp, _Alloc>& __x) : _Base(__x.get_allocator()) + { insert(begin(), __x.begin(), __x.end()); } + + ~list() { } + + list<_Tp, _Alloc>& operator=(const list<_Tp, _Alloc>& __x); + +public: + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); } + + void _M_fill_assign(size_type __n, const _Tp& __val); + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_type) __n, (_Tp) __val); } + + template + void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + +protected: + void transfer(iterator __position, iterator __first, iterator __last) { + if (__position != __last) { + // Remove [first, last) from its old position. + __last._M_node->_M_prev->_M_next = __position._M_node; + __first._M_node->_M_prev->_M_next = __last._M_node; + __position._M_node->_M_prev->_M_next = __first._M_node; + + // Splice [first, last) into its new position. + _List_node_base* __tmp = __position._M_node->_M_prev; + __position._M_node->_M_prev = __last._M_node->_M_prev; + __last._M_node->_M_prev = __first._M_node->_M_prev; + __first._M_node->_M_prev = __tmp; + } + } + +public: + void splice(iterator __position, list& __x) { + if (!__x.empty()) + this->transfer(__position, __x.begin(), __x.end()); + } + void splice(iterator __position, list&, iterator __i) { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) return; + this->transfer(__position, __i, __j); + } + void splice(iterator __position, list&, iterator __first, iterator __last) { + if (__first != __last) + this->transfer(__position, __first, __last); + } + void remove(const _Tp& __value); + void unique(); + void merge(list& __x); + void reverse(); + void sort(); + + template void remove_if(_Predicate); + template void unique(_BinaryPredicate); + template void merge(list&, _StrictWeakOrdering); + template void sort(_StrictWeakOrdering); +}; + +template +inline bool +operator==(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y) +{ + typedef typename list<_Tp,_Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; +} + +template +inline bool operator<(const list<_Tp,_Alloc>& __x, + const list<_Tp,_Alloc>& __y) +{ + return lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); +} + +template +inline bool operator!=(const list<_Tp,_Alloc>& __x, + const list<_Tp,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const list<_Tp,_Alloc>& __x, + const list<_Tp,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const list<_Tp,_Alloc>& __x, + const list<_Tp,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const list<_Tp,_Alloc>& __x, + const list<_Tp,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline void +swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) +{ + __x.swap(__y); +} + +template template +void +list<_Tp, _Alloc>::_M_insert_dispatch(iterator __position, + _InputIter __first, _InputIter __last, + __false_type) +{ + for ( ; __first != __last; ++__first) + insert(__position, *__first); +} + +template +void +list<_Tp, _Alloc>::_M_fill_insert(iterator __position, + size_type __n, const _Tp& __x) +{ + for ( ; __n > 0; --__n) + insert(__position, __x); +} + +template +typename list<_Tp,_Alloc>::iterator list<_Tp, _Alloc>::erase(iterator __first, + iterator __last) +{ + while (__first != __last) + erase(__first++); + return __last; +} + +template +void list<_Tp, _Alloc>::resize(size_type __new_size, const _Tp& __x) +{ + iterator __i = begin(); + size_type __len = 0; + for ( ; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else // __i == end() + insert(end(), __new_size - __len, __x); +} + +template +list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list<_Tp, _Alloc>& __x) +{ + if (this != &__x) { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + *__first1++ = *__first2++; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; +} + +template +void list<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { + iterator __i = begin(); + for ( ; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); +} + +template template +void +list<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first2, _InputIter __last2, + __false_type) +{ + iterator __first1 = begin(); + iterator __last1 = end(); + for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); +} + +template +void list<_Tp, _Alloc>::remove(const _Tp& __value) +{ + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) { + iterator __next = __first; + ++__next; + if (*__first == __value) erase(__first); + __first = __next; + } +} + +template +void list<_Tp, _Alloc>::unique() +{ + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) return; + iterator __next = __first; + while (++__next != __last) { + if (*__first == *__next) + erase(__next); + else + __first = __next; + __next = __first; + } +} + +template +void list<_Tp, _Alloc>::merge(list<_Tp, _Alloc>& __x) +{ + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) { + iterator __next = __first2; + transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) transfer(__last1, __first2, __last2); +} + +inline void __List_base_reverse(_List_node_base* __p) +{ + _List_node_base* __tmp = __p; + do { + std::swap(__tmp->_M_next, __tmp->_M_prev); + __tmp = __tmp->_M_prev; // Old next node is now prev. + } while (__tmp != __p); +} + +template +inline void list<_Tp, _Alloc>::reverse() +{ + __List_base_reverse(this->_M_node); +} + +template +void list<_Tp, _Alloc>::sort() +{ + // Do nothing if the list has length 0 or 1. + if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node) { + list<_Tp, _Alloc> __carry; + list<_Tp, _Alloc> __counter[64]; + int __fill = 0; + while (!empty()) { + __carry.splice(__carry.begin(), *this, begin()); + int __i = 0; + while(__i < __fill && !__counter[__i].empty()) { + __counter[__i].merge(__carry); + __carry.swap(__counter[__i++]); + } + __carry.swap(__counter[__i]); + if (__i == __fill) ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + __counter[__i].merge(__counter[__i-1]); + swap(__counter[__fill-1]); + } +} + +template template +void list<_Tp, _Alloc>::remove_if(_Predicate __pred) +{ + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) { + iterator __next = __first; + ++__next; + if (__pred(*__first)) erase(__first); + __first = __next; + } +} + +template template +void list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred) +{ + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) return; + iterator __next = __first; + while (++__next != __last) { + if (__binary_pred(*__first, *__next)) + erase(__next); + else + __first = __next; + __next = __first; + } +} + +template template +void list<_Tp, _Alloc>::merge(list<_Tp, _Alloc>& __x, + _StrictWeakOrdering __comp) +{ + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) { + iterator __next = __first2; + transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) transfer(__last1, __first2, __last2); +} + +template template +void list<_Tp, _Alloc>::sort(_StrictWeakOrdering __comp) +{ + // Do nothing if the list has length 0 or 1. + if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node) { + list<_Tp, _Alloc> __carry; + list<_Tp, _Alloc> __counter[64]; + int __fill = 0; + while (!empty()) { + __carry.splice(__carry.begin(), *this, begin()); + int __i = 0; + while(__i < __fill && !__counter[__i].empty()) { + __counter[__i].merge(__carry, __comp); + __carry.swap(__counter[__i++]); + } + __carry.swap(__counter[__i]); + if (__i == __fill) ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + __counter[__i].merge(__counter[__i-1], __comp); + swap(__counter[__fill-1]); + } +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_LIST_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_map.h b/contrib/media/updf/include/bits/stl_map.h new file mode 100644 index 0000000000..f1024fa2f5 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_map.h @@ -0,0 +1,231 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_MAP_H +#define _CPP_BITS_STL_MAP_H 1 + +#include + +namespace std +{ + +template , + class _Alloc = allocator > > +class map +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept); + +public: + // typedefs: + typedef _Key key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; + typedef pair value_type; + typedef _Compare key_compare; + + class value_compare + : public binary_function { + friend class map<_Key,_Tp,_Compare,_Alloc>; + protected : + _Compare comp; + value_compare(_Compare __c) : comp(__c) {} + public: + bool operator()(const value_type& __x, const value_type& __y) const { + return comp(__x.first, __y.first); + } + }; + +private: + typedef _Rb_tree, key_compare, _Alloc> _Rep_type; + _Rep_type _M_t; // red-black tree representing map +public: + typedef typename _Rep_type::pointer pointer; + typedef typename _Rep_type::const_pointer const_pointer; + typedef typename _Rep_type::reference reference; + typedef typename _Rep_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::allocator_type allocator_type; + + // allocation/deallocation + + map() : _M_t(_Compare(), allocator_type()) {} + explicit map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) {} + + template + map(_InputIterator __first, _InputIterator __last) + : _M_t(_Compare(), allocator_type()) + { _M_t.insert_unique(__first, __last); } + + template + map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); } + map(const map<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {} + + map<_Key,_Tp,_Compare,_Alloc>& + operator=(const map<_Key, _Tp, _Compare, _Alloc>& __x) + { + _M_t = __x._M_t; + return *this; + } + + // accessors: + + key_compare key_comp() const { return _M_t.key_comp(); } + value_compare value_comp() const { return value_compare(_M_t.key_comp()); } + allocator_type get_allocator() const { return _M_t.get_allocator(); } + + iterator begin() { return _M_t.begin(); } + const_iterator begin() const { return _M_t.begin(); } + iterator end() { return _M_t.end(); } + const_iterator end() const { return _M_t.end(); } + reverse_iterator rbegin() { return _M_t.rbegin(); } + const_reverse_iterator rbegin() const { return _M_t.rbegin(); } + reverse_iterator rend() { return _M_t.rend(); } + const_reverse_iterator rend() const { return _M_t.rend(); } + bool empty() const { return _M_t.empty(); } + size_type size() const { return _M_t.size(); } + size_type max_size() const { return _M_t.max_size(); } + _Tp& operator[](const key_type& __k) { + iterator __i = lower_bound(__k); + // __i->first is greater than or equivalent to __k. + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, _Tp())); + return (*__i).second; + } + void swap(map<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); } + + // insert/erase + + pair insert(const value_type& __x) + { return _M_t.insert_unique(__x); } + iterator insert(iterator position, const value_type& __x) + { return _M_t.insert_unique(position, __x); } + template + void insert(_InputIterator __first, _InputIterator __last) { + _M_t.insert_unique(__first, __last); + } + + void erase(iterator __position) { _M_t.erase(__position); } + size_type erase(const key_type& __x) { return _M_t.erase(__x); } + void erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void clear() { _M_t.clear(); } + + // map operations: + + iterator find(const key_type& __x) { return _M_t.find(__x); } + const_iterator find(const key_type& __x) const { return _M_t.find(__x); } + size_type count(const key_type& __x) const { + return _M_t.find(__x) == _M_t.end() ? 0 : 1; + } + iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); } + const_iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); } + const_iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + + pair equal_range(const key_type& __x) { + return _M_t.equal_range(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } + + template + friend bool operator== (const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + template + friend bool operator< (const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); +}; + +template +inline bool operator==(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return __x._M_t == __y._M_t; +} + +template +inline bool operator<(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return __x._M_t < __y._M_t; +} + +template +inline bool operator!=(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const map<_Key,_Tp,_Compare,_Alloc>& __x, + const map<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline void swap(map<_Key,_Tp,_Compare,_Alloc>& __x, + map<_Key,_Tp,_Compare,_Alloc>& __y) { + __x.swap(__y); +} + +} // namespace std + +#endif /* _CPP_BITS_STL_MAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_multimap.h b/contrib/media/updf/include/bits/stl_multimap.h new file mode 100644 index 0000000000..c35708eb59 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_multimap.h @@ -0,0 +1,235 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_MULTIMAP_H +#define __SGI_STL_INTERNAL_MULTIMAP_H + +#include + +namespace std +{ + +// Forward declaration of operators < and ==, needed for friend declaration. + +template , + class _Alloc = allocator > > +class multimap; + +template +inline bool operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y); + +template +inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y); + +template +class multimap +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept); + +public: + +// typedefs: + + typedef _Key key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; + typedef pair value_type; + typedef _Compare key_compare; + + class value_compare : public binary_function { + friend class multimap<_Key,_Tp,_Compare,_Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) : comp(__c) {} + public: + bool operator()(const value_type& __x, const value_type& __y) const { + return comp(__x.first, __y.first); + } + }; + +private: + typedef _Rb_tree, key_compare, _Alloc> _Rep_type; + _Rep_type _M_t; // red-black tree representing multimap +public: + typedef typename _Rep_type::pointer pointer; + typedef typename _Rep_type::const_pointer const_pointer; + typedef typename _Rep_type::reference reference; + typedef typename _Rep_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::allocator_type allocator_type; + +// allocation/deallocation + + multimap() : _M_t(_Compare(), allocator_type()) { } + explicit multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t(_Compare(), allocator_type()) + { _M_t.insert_equal(__first, __last); } + + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); } + multimap(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) { } + + multimap<_Key,_Tp,_Compare,_Alloc>& + operator=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) { + _M_t = __x._M_t; + return *this; + } + + // accessors: + + key_compare key_comp() const { return _M_t.key_comp(); } + value_compare value_comp() const { return value_compare(_M_t.key_comp()); } + allocator_type get_allocator() const { return _M_t.get_allocator(); } + + iterator begin() { return _M_t.begin(); } + const_iterator begin() const { return _M_t.begin(); } + iterator end() { return _M_t.end(); } + const_iterator end() const { return _M_t.end(); } + reverse_iterator rbegin() { return _M_t.rbegin(); } + const_reverse_iterator rbegin() const { return _M_t.rbegin(); } + reverse_iterator rend() { return _M_t.rend(); } + const_reverse_iterator rend() const { return _M_t.rend(); } + bool empty() const { return _M_t.empty(); } + size_type size() const { return _M_t.size(); } + size_type max_size() const { return _M_t.max_size(); } + void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); } + + // insert/erase + + iterator insert(const value_type& __x) { return _M_t.insert_equal(__x); } + iterator insert(iterator __position, const value_type& __x) { + return _M_t.insert_equal(__position, __x); + } + template + void insert(_InputIterator __first, _InputIterator __last) { + _M_t.insert_equal(__first, __last); + } + void erase(iterator __position) { _M_t.erase(__position); } + size_type erase(const key_type& __x) { return _M_t.erase(__x); } + void erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void clear() { _M_t.clear(); } + + // multimap operations: + + iterator find(const key_type& __x) { return _M_t.find(__x); } + const_iterator find(const key_type& __x) const { return _M_t.find(__x); } + size_type count(const key_type& __x) const { return _M_t.count(__x); } + iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); } + const_iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); } + const_iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + pair equal_range(const key_type& __x) { + return _M_t.equal_range(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } + + template + friend bool operator== (const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + template + friend bool operator< (const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); +}; + +template +inline bool operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return __x._M_t == __y._M_t; +} + +template +inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return __x._M_t < __y._M_t; +} + +template +inline bool operator!=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, + const multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x, + multimap<_Key,_Tp,_Compare,_Alloc>& __y) { + __x.swap(__y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_MULTIMAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_multiset.h b/contrib/media/updf/include/bits/stl_multiset.h new file mode 100644 index 0000000000..2d16985f95 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_multiset.h @@ -0,0 +1,247 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_MULTISET_H +#define __SGI_STL_INTERNAL_MULTISET_H + +#include + +namespace std +{ + +// Forward declaration of operators < and ==, needed for friend declaration. + +template , + class _Alloc = allocator<_Key> > +class multiset; + +template +inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y); + +template +inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y); + +template +class multiset +{ + // concept requirements + __glibcpp_class_requires(_Key, _SGIAssignableConcept); + __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept); + +public: + + // typedefs: + + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; +private: + typedef _Rb_tree, key_compare, _Alloc> _Rep_type; + _Rep_type _M_t; // red-black tree representing multiset +public: + typedef typename _Rep_type::const_pointer pointer; + typedef typename _Rep_type::const_pointer const_pointer; + typedef typename _Rep_type::const_reference reference; + typedef typename _Rep_type::const_reference const_reference; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::allocator_type allocator_type; + + // allocation/deallocation + + multiset() : _M_t(_Compare(), allocator_type()) {} + explicit multiset(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) {} + + template + multiset(_InputIterator __first, _InputIterator __last) + : _M_t(_Compare(), allocator_type()) + { _M_t.insert_equal(__first, __last); } + + template + multiset(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); } + + multiset(const multiset<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {} + + multiset<_Key,_Compare,_Alloc>& + operator=(const multiset<_Key,_Compare,_Alloc>& __x) { + _M_t = __x._M_t; + return *this; + } + + // accessors: + + key_compare key_comp() const { return _M_t.key_comp(); } + value_compare value_comp() const { return _M_t.key_comp(); } + allocator_type get_allocator() const { return _M_t.get_allocator(); } + + iterator begin() const { return _M_t.begin(); } + iterator end() const { return _M_t.end(); } + reverse_iterator rbegin() const { return _M_t.rbegin(); } + reverse_iterator rend() const { return _M_t.rend(); } + bool empty() const { return _M_t.empty(); } + size_type size() const { return _M_t.size(); } + size_type max_size() const { return _M_t.max_size(); } + void swap(multiset<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); } + + // insert/erase + iterator insert(const value_type& __x) { + return _M_t.insert_equal(__x); + } + iterator insert(iterator __position, const value_type& __x) { + typedef typename _Rep_type::iterator _Rep_iterator; + return _M_t.insert_equal((_Rep_iterator&)__position, __x); + } + + template + void insert(_InputIterator __first, _InputIterator __last) { + _M_t.insert_equal(__first, __last); + } + void erase(iterator __position) { + typedef typename _Rep_type::iterator _Rep_iterator; + _M_t.erase((_Rep_iterator&)__position); + } + size_type erase(const key_type& __x) { + return _M_t.erase(__x); + } + void erase(iterator __first, iterator __last) { + typedef typename _Rep_type::iterator _Rep_iterator; + _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); + } + void clear() { _M_t.clear(); } + + // multiset operations: + + size_type count(const key_type& __x) const { return _M_t.count(__x); } + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//214. set::find() missing const overload + iterator find(const key_type& __x) { return _M_t.find(__x); } + const_iterator find(const key_type& __x) const { return _M_t.find(__x); } + iterator lower_bound(const key_type& __x) { + return _M_t.lower_bound(__x); + } + const_iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) { + return _M_t.upper_bound(__x); + } + const_iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + pair equal_range(const key_type& __x) { + return _M_t.equal_range(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } +#else + iterator find(const key_type& __x) const { return _M_t.find(__x); } + iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } +#endif + + template + friend bool operator== (const multiset<_K1,_C1,_A1>&, + const multiset<_K1,_C1,_A1>&); + template + friend bool operator< (const multiset<_K1,_C1,_A1>&, + const multiset<_K1,_C1,_A1>&); +}; + +template +inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return __x._M_t == __y._M_t; +} + +template +inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return __x._M_t < __y._M_t; +} + +template +inline bool operator!=(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline void swap(multiset<_Key,_Compare,_Alloc>& __x, + multiset<_Key,_Compare,_Alloc>& __y) { + __x.swap(__y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_MULTISET_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_numeric.h b/contrib/media/updf/include/bits/stl_numeric.h new file mode 100644 index 0000000000..ccafd37448 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_numeric.h @@ -0,0 +1,279 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + + +#ifndef _CPP_BITS_STL_NUMERIC_H +#define _CPP_BITS_STL_NUMERIC_H 1 + +namespace std +{ + +template +_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + + for ( ; __first != __last; ++__first) + __init = __init + *__first; + return __init; +} + +template +_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, + _BinaryOperation __binary_op) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + + for ( ; __first != __last; ++__first) + __init = __binary_op(__init, *__first); + return __init; +} + +template +_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _Tp __init) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>); + + for ( ; __first1 != __last1; ++__first1, ++__first2) + __init = __init + (*__first1 * *__first2); + return __init; +} + +template +_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _Tp __init, + _BinaryOperation1 __binary_op1, + _BinaryOperation2 __binary_op2) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>); + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>); + + for ( ; __first1 != __last1; ++__first1, ++__first2) + __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); + return __init; +} + +template +_OutputIterator +__partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*) +{ + _Tp __value = *__first; + while (++__first != __last) { + __value = __value + *__first; + *++__result = __value; + } + return ++__result; +} + +template +_OutputIterator +partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, + typename iterator_traits<_InputIterator>::value_type>); + + if (__first == __last) return __result; + *__result = *__first; + return __partial_sum(__first, __last, __result, __value_type(__first)); +} + +template +_OutputIterator +__partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) +{ + _Tp __value = *__first; + while (++__first != __last) { + __value = __binary_op(__value, *__first); + *++__result = __value; + } + return ++__result; +} + +template +_OutputIterator +partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOperation __binary_op) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, + typename iterator_traits<_InputIterator>::value_type>); + + if (__first == __last) return __result; + *__result = *__first; + return __partial_sum(__first, __last, __result, __value_type(__first), + __binary_op); +} + +template +_OutputIterator +__adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*) +{ + _Tp __value = *__first; + while (++__first != __last) { + _Tp __tmp = *__first; + *++__result = __tmp - __value; + __value = __tmp; + } + return ++__result; +} + +template +_OutputIterator +adjacent_difference(_InputIterator __first, + _InputIterator __last, _OutputIterator __result) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, + typename iterator_traits<_InputIterator>::value_type>); + + if (__first == __last) return __result; + *__result = *__first; + return __adjacent_difference(__first, __last, __result, + __value_type(__first)); +} + +template +_OutputIterator +__adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, + _BinaryOperation __binary_op) { + _Tp __value = *__first; + while (++__first != __last) { + _Tp __tmp = *__first; + *++__result = __binary_op(__tmp, __value); + __value = __tmp; + } + return ++__result; +} + +template +_OutputIterator +adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOperation __binary_op) +{ + // concept requirements + __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>); + __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, + typename iterator_traits<_InputIterator>::value_type>); + + if (__first == __last) return __result; + *__result = *__first; + return __adjacent_difference(__first, __last, __result, + __value_type(__first), + __binary_op); +} + +// Returns __x ** __n, where __n >= 0. _Note that "multiplication" +// is required to be associative, but not necessarily commutative. + + +template +_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op) +{ + if (__n == 0) + return identity_element(__monoid_op); + else { + while ((__n & 1) == 0) { + __n >>= 1; + __x = __monoid_op(__x, __x); + } + + _Tp __result = __x; + __n >>= 1; + while (__n != 0) { + __x = __monoid_op(__x, __x); + if ((__n & 1) != 0) + __result = __monoid_op(__result, __x); + __n >>= 1; + } + return __result; + } +} + +template +inline _Tp __power(_Tp __x, _Integer __n) +{ + return __power(__x, __n, multiplies<_Tp>()); +} + +// Alias for the internal name __power. Note that power is an extension, +// not part of the C++ standard. + +template +inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op) +{ + return __power(__x, __n, __monoid_op); +} + +template +inline _Tp power(_Tp __x, _Integer __n) +{ + return __power(__x, __n); +} + +// iota is not part of the C++ standard. It is an extension. + +template +void +iota(_ForwardIter __first, _ForwardIter __last, _Tp __value) +{ + // concept requirements + __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>); + __glibcpp_function_requires(_ConvertibleConcept<_Tp, + typename iterator_traits<_ForwardIter>::value_type>); + + while (__first != __last) + *__first++ = __value++; +} + +} // namespace std + +#endif /* _CPP_BITS_STL_NUMERIC_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_pair.h b/contrib/media/updf/include/bits/stl_pair.h new file mode 100644 index 0000000000..efb166c1bb --- /dev/null +++ b/contrib/media/updf/include/bits/stl_pair.h @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_PAIR_H +#define __SGI_STL_INTERNAL_PAIR_H + +namespace std +{ + +template +struct pair { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//265. std::pair::pair() effects overly restrictive + pair() : first(), second() {} +#else + pair() : first(_T1()), second(_T2()) {} +#endif + pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} + + template + pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} +}; + +template +inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) +{ + return __x.first == __y.first && __x.second == __y.second; +} + +template +inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) +{ + return __x.first < __y.first || + (!(__y.first < __x.first) && __x.second < __y.second); +} + +template +inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__x < __y); +} + +template +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//181. make_pair() unintended behavior +inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) +#else +inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y) +#endif +{ + return pair<_T1, _T2>(__x, __y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_PAIR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_pthread_alloc.h b/contrib/media/updf/include/bits/stl_pthread_alloc.h new file mode 100644 index 0000000000..65879354f6 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_pthread_alloc.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 1996-1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BITS_STL_PTHREAD_ALLOC_H +#define _CPP_BITS_STL_PTHREAD_ALLOC_H 1 + +#include + +using std::_Pthread_alloc_template; +using std::pthread_alloc; + +#endif /* _CPP_BITS_STL_PTHREAD_ALLOC_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_queue.h b/contrib/media/updf/include/bits/stl_queue.h new file mode 100644 index 0000000000..c1fe023e4d --- /dev/null +++ b/contrib/media/updf/include/bits/stl_queue.h @@ -0,0 +1,198 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_QUEUE_H +#define __SGI_STL_INTERNAL_QUEUE_H + +#include + +namespace std +{ + +// Forward declarations of operators < and ==, needed for friend declaration. + +template > +class queue; + +template +inline bool operator==(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&); + +template +inline bool operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&); + + +template +class queue +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires(_Sequence, _FrontInsertionSequenceConcept); + __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept); + typedef typename _Sequence::value_type _Sequence_value_type; + __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept); + + template + friend bool operator== (const queue<_Tp1, _Seq1>&, + const queue<_Tp1, _Seq1>&); + template + friend bool operator< (const queue<_Tp1, _Seq1>&, + const queue<_Tp1, _Seq1>&); +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; +protected: + _Sequence c; +public: + explicit queue(const _Sequence& __c = _Sequence()) : c(__c) {} + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + reference front() { return c.front(); } + const_reference front() const { return c.front(); } + reference back() { return c.back(); } + const_reference back() const { return c.back(); } + void push(const value_type& __x) { c.push_back(__x); } + void pop() { c.pop_front(); } +}; + +template +bool +operator==(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return __x.c == __y.c; +} + +template +bool +operator<(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return __x.c < __y.c; +} + +template +bool +operator!=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return !(__x == __y); +} + +template +bool +operator>(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return __y < __x; +} + +template +bool +operator<=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return !(__y < __x); +} + +template +bool +operator>=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) +{ + return !(__x < __y); +} + +template , + class _Compare = less > +class priority_queue +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires(_Sequence, _SequenceConcept); + __glibcpp_class_requires(_Sequence, _RandomAccessContainerConcept); + typedef typename _Sequence::value_type _Sequence_value_type; + __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept); + __glibcpp_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept); + +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; +protected: + _Sequence c; + _Compare comp; +public: + explicit priority_queue(const _Compare& __x = _Compare(), + const _Sequence& __s = _Sequence()) + : c(__s), comp(__x) + { make_heap(c.begin(), c.end(), comp); } + + template + priority_queue(_InputIterator __first, _InputIterator __last, + const _Compare& __x = _Compare(), + const _Sequence& __s = _Sequence()) + : c(__s), comp(__x) + { + c.insert(c.end(), __first, __last); + make_heap(c.begin(), c.end(), comp); + } + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + const_reference top() const { return c.front(); } + void push(const value_type& __x) { + __STL_TRY { + c.push_back(__x); + push_heap(c.begin(), c.end(), comp); + } + __STL_UNWIND(c.clear()); + } + void pop() { + __STL_TRY { + pop_heap(c.begin(), c.end(), comp); + c.pop_back(); + } + __STL_UNWIND(c.clear()); + } +}; + +// no equality is provided + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_QUEUE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_raw_storage_iter.h b/contrib/media/updf/include/bits/stl_raw_storage_iter.h new file mode 100644 index 0000000000..22fec74bcb --- /dev/null +++ b/contrib/media/updf/include/bits/stl_raw_storage_iter.h @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H +#define _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H 1 + +namespace std +{ + +template +class raw_storage_iterator { +protected: + _ForwardIterator _M_iter; +public: + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} + raw_storage_iterator& operator*() { return *this; } + raw_storage_iterator& operator=(const _Tp& __element) { + construct(&*_M_iter, __element); + return *this; + } + raw_storage_iterator<_ForwardIterator, _Tp>& operator++() { + ++_M_iter; + return *this; + } + raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) { + raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; + ++_M_iter; + return __tmp; + } +}; + + +} // namespace std + +#endif /* _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_relops.h b/contrib/media/updf/include/bits/stl_relops.h new file mode 100644 index 0000000000..531137a677 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_relops.h @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1996,1997 + * Silicon Graphics + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +/**** libstdc++-v3 note: Inclusion of this file has been removed from + * all of the other STL headers for safety reasons, except std_utility.h. + * For more information, see the thread of about twenty messages starting + * with , or the + * FAQ at . + * + * Short summary: the rel_ops operators cannot be made to play nice. + * Don't use them. +*/ + +#ifndef _CPP_BITS_STL_RELOPS_H +#define _CPP_BITS_STL_RELOPS_H 1 + +namespace std +{ + namespace rel_ops + { + +template +inline bool operator!=(const _Tp& __x, const _Tp& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const _Tp& __x, const _Tp& __y) { + return __y < __x; +} + +template +inline bool operator<=(const _Tp& __x, const _Tp& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const _Tp& __x, const _Tp& __y) { + return !(__x < __y); +} + + } // namespace rel_ops +} // namespace std + +#endif /* _CPP_BITS_STL_RELOPS_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_set.h b/contrib/media/updf/include/bits/stl_set.h new file mode 100644 index 0000000000..13dca9f324 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_set.h @@ -0,0 +1,244 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_SET_H +#define __SGI_STL_INTERNAL_SET_H + +#include + +namespace std +{ + +// Forward declarations of operators < and ==, needed for friend declaration. + +template , + class _Alloc = allocator<_Key> > +class set; + +template +inline bool operator==(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y); + +template +inline bool operator<(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y); + + +template +class set +{ + // concept requirements + __glibcpp_class_requires(_Key, _SGIAssignableConcept); + __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept); + +public: + // typedefs: + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; +private: + typedef _Rb_tree, key_compare, _Alloc> _Rep_type; + _Rep_type _M_t; // red-black tree representing set +public: + typedef typename _Rep_type::const_pointer pointer; + typedef typename _Rep_type::const_pointer const_pointer; + typedef typename _Rep_type::const_reference reference; + typedef typename _Rep_type::const_reference const_reference; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::allocator_type allocator_type; + + // allocation/deallocation + + set() : _M_t(_Compare(), allocator_type()) {} + explicit set(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) {} + + template + set(_InputIterator __first, _InputIterator __last) + : _M_t(_Compare(), allocator_type()) + { _M_t.insert_unique(__first, __last); } + + template + set(_InputIterator __first, _InputIterator __last, const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); } + + set(const set<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {} + set<_Key,_Compare,_Alloc>& operator=(const set<_Key, _Compare, _Alloc>& __x) + { + _M_t = __x._M_t; + return *this; + } + + // accessors: + + key_compare key_comp() const { return _M_t.key_comp(); } + value_compare value_comp() const { return _M_t.key_comp(); } + allocator_type get_allocator() const { return _M_t.get_allocator(); } + + iterator begin() const { return _M_t.begin(); } + iterator end() const { return _M_t.end(); } + reverse_iterator rbegin() const { return _M_t.rbegin(); } + reverse_iterator rend() const { return _M_t.rend(); } + bool empty() const { return _M_t.empty(); } + size_type size() const { return _M_t.size(); } + size_type max_size() const { return _M_t.max_size(); } + void swap(set<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); } + + // insert/erase + pair insert(const value_type& __x) { + pair __p = _M_t.insert_unique(__x); + return pair(__p.first, __p.second); + } + iterator insert(iterator __position, const value_type& __x) { + typedef typename _Rep_type::iterator _Rep_iterator; + return _M_t.insert_unique((_Rep_iterator&)__position, __x); + } + template + void insert(_InputIterator __first, _InputIterator __last) { + _M_t.insert_unique(__first, __last); + } + void erase(iterator __position) { + typedef typename _Rep_type::iterator _Rep_iterator; + _M_t.erase((_Rep_iterator&)__position); + } + size_type erase(const key_type& __x) { + return _M_t.erase(__x); + } + void erase(iterator __first, iterator __last) { + typedef typename _Rep_type::iterator _Rep_iterator; + _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); + } + void clear() { _M_t.clear(); } + + // set operations: + + size_type count(const key_type& __x) const { + return _M_t.find(__x) == _M_t.end() ? 0 : 1; + } + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//214. set::find() missing const overload + iterator find(const key_type& __x) { return _M_t.find(__x); } + const_iterator find(const key_type& __x) const { return _M_t.find(__x); } + iterator lower_bound(const key_type& __x) { + return _M_t.lower_bound(__x); + } + const_iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) { + return _M_t.upper_bound(__x); + } + const_iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + pair equal_range(const key_type& __x) { + return _M_t.equal_range(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } +#else + iterator find(const key_type& __x) const { return _M_t.find(__x); } + iterator lower_bound(const key_type& __x) const { + return _M_t.lower_bound(__x); + } + iterator upper_bound(const key_type& __x) const { + return _M_t.upper_bound(__x); + } + pair equal_range(const key_type& __x) const { + return _M_t.equal_range(__x); + } +#endif + + template + friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&); + template + friend bool operator< (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&); +}; + +template +inline bool operator==(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return __x._M_t == __y._M_t; +} + +template +inline bool operator<(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return __x._M_t < __y._M_t; +} + +template +inline bool operator!=(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator>(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<=(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>=(const set<_Key,_Compare,_Alloc>& __x, + const set<_Key,_Compare,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline void swap(set<_Key,_Compare,_Alloc>& __x, + set<_Key,_Compare,_Alloc>& __y) { + __x.swap(__y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_SET_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_stack.h b/contrib/media/updf/include/bits/stl_stack.h new file mode 100644 index 0000000000..9f4fd46060 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_stack.h @@ -0,0 +1,130 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_STACK_H +#define __SGI_STL_INTERNAL_STACK_H + +#include + +namespace std +{ + +// Forward declarations of operators == and <, needed for friend declaration. + +template > +class stack; + +template +bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); + +template +bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); + + +template +class stack +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept); + typedef typename _Sequence::value_type _Sequence_value_type; + __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept); + + template + friend bool operator== (const stack<_Tp1, _Seq1>&, + const stack<_Tp1, _Seq1>&); + template + friend bool operator< (const stack<_Tp1, _Seq1>&, + const stack<_Tp1, _Seq1>&); +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; +protected: + _Sequence c; +public: + stack() : c() {} + explicit stack(const _Sequence& __s) : c(__s) {} + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + reference top() { return c.back(); } + const_reference top() const { return c.back(); } + void push(const value_type& __x) { c.push_back(__x); } + void pop() { c.pop_back(); } +}; + +template +bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return __x.c == __y.c; +} + +template +bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return __x.c < __y.c; +} + +template +bool operator!=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return !(__x == __y); +} + +template +bool operator>(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return __y < __x; +} + +template +bool operator<=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return !(__y < __x); +} + +template +bool operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) +{ + return !(__x < __y); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_STACK_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_tempbuf.h b/contrib/media/updf/include/bits/stl_tempbuf.h new file mode 100644 index 0000000000..e1c5334e42 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_tempbuf.h @@ -0,0 +1,152 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_TEMPBUF_H +#define __SGI_STL_INTERNAL_TEMPBUF_H + +namespace std +{ + +template +pair<_Tp*, ptrdiff_t> +__get_temporary_buffer(ptrdiff_t __len, _Tp*) +{ + if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp))) + __len = INT_MAX / sizeof(_Tp); + + while (__len > 0) { + _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp)); + if (__tmp != 0) + return pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + + return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0); +} + +template +inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) { + return __get_temporary_buffer(__len, (_Tp*) 0); +} + +// This overload is not required by the standard; it is an extension. +// It is supported for backward compatibility with the HP STL, and +// because not all compilers support the language feature (explicit +// function template arguments) that is required for the standard +// version of get_temporary_buffer. +template +inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len, _Tp*) { + return __get_temporary_buffer(__len, (_Tp*) 0); +} + +template +void return_temporary_buffer(_Tp* __p) { + free(__p); +} + +template +class _Temporary_buffer { +private: + ptrdiff_t _M_original_len; + ptrdiff_t _M_len; + _Tp* _M_buffer; + + void _M_allocate_buffer() { + _M_original_len = _M_len; + _M_buffer = 0; + + if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp))) + _M_len = INT_MAX / sizeof(_Tp); + + while (_M_len > 0) { + _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp)); + if (_M_buffer) + break; + _M_len /= 2; + } + } + + void _M_initialize_buffer(const _Tp&, __true_type) {} + void _M_initialize_buffer(const _Tp& val, __false_type) { + uninitialized_fill_n(_M_buffer, _M_len, val); + } + +public: + ptrdiff_t size() const { return _M_len; } + ptrdiff_t requested_size() const { return _M_original_len; } + _Tp* begin() { return _M_buffer; } + _Tp* end() { return _M_buffer + _M_len; } + + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) { + // Workaround for a __type_traits bug in the pre-7.3 compiler. + typedef typename __type_traits<_Tp>::has_trivial_default_constructor + _Trivial; + + __STL_TRY { + _M_len = 0; + distance(__first, __last, _M_len); + _M_allocate_buffer(); + if (_M_len > 0) + _M_initialize_buffer(*__first, _Trivial()); + } + __STL_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0); + } + + ~_Temporary_buffer() { + destroy(_M_buffer, _M_buffer + _M_len); + free(_M_buffer); + } + +private: + // Disable copy constructor and assignment operator. + _Temporary_buffer(const _Temporary_buffer&) {} + void operator=(const _Temporary_buffer&) {} +}; + +// Class temporary_buffer is not part of the standard. It is an extension. + +template ::value_type + > +struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> +{ + temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {} + ~temporary_buffer() {} +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_TEMPBUF_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_threads.h b/contrib/media/updf/include/bits/stl_threads.h new file mode 100644 index 0000000000..cdbf205df3 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_threads.h @@ -0,0 +1,512 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. +// Stl_config.h should be included before this file. + +#ifndef __SGI_STL_INTERNAL_THREADS_H +#define __SGI_STL_INTERNAL_THREADS_H + +// Supported threading models are native SGI, pthreads, uithreads +// (similar to pthreads, but based on an earlier draft of the Posix +// threads standard), and Win32 threads. Uithread support by Jochen +// Schlick, 1999. + +// GCC extension begin +// In order to present a stable threading configuration, in all cases, +// gcc looks for it's own abstraction layer before all others. All +// modifications to this file are marked to allow easier importation of +// STL upgrades. +#if defined(__STL_GTHREADS) +#include "bits/gthr.h" +#else +// GCC extension end +#if defined(__STL_SGI_THREADS) +#include +#include +#elif defined(__STL_PTHREADS) +#include +#elif defined(__STL_UITHREADS) +#include +#include +#elif defined(__STL_WIN32THREADS) +#include +#endif +// GCC extension begin +#endif +// GCC extension end + +namespace std +{ + +// Class _Refcount_Base provides a type, _RC_t, a data member, +// _M_ref_count, and member functions _M_incr and _M_decr, which perform +// atomic preincrement/predecrement. The constructor initializes +// _M_ref_count. + +// Hack for SGI o32 compilers. +#if defined(__STL_SGI_THREADS) && !defined(__add_and_fetch) && \ + (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64))) +# define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v) +# define __test_and_set(__l,__v) test_and_set(__l,__v) +#endif /* o32 */ + +struct _Refcount_Base +{ + // The type _RC_t +# ifdef __STL_WIN32THREADS + typedef long _RC_t; +# else + typedef size_t _RC_t; +#endif + + // The data member _M_ref_count + volatile _RC_t _M_ref_count; + + // Constructor +// GCC extension begin +#ifdef __STL_GTHREADS + __gthread_mutex_t _M_ref_count_lock; + _Refcount_Base(_RC_t __n) : _M_ref_count(__n) + { +#ifdef __GTHREAD_MUTEX_INIT + __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; + _M_ref_count_lock = __tmp; +#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) + __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock); +#else +#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org. +#endif + } +#else +// GCC extension end +# ifdef __STL_PTHREADS + pthread_mutex_t _M_ref_count_lock; + _Refcount_Base(_RC_t __n) : _M_ref_count(__n) + { pthread_mutex_init(&_M_ref_count_lock, 0); } +# elif defined(__STL_UITHREADS) + mutex_t _M_ref_count_lock; + _Refcount_Base(_RC_t __n) : _M_ref_count(__n) + { mutex_init(&_M_ref_count_lock, USYNC_THREAD, 0); } +# else + _Refcount_Base(_RC_t __n) : _M_ref_count(__n) {} +# endif +// GCC extension begin +#endif +// GCC extension end + +// GCC extension begin +#ifdef __STL_GTHREADS + void _M_incr() { + __gthread_mutex_lock(&_M_ref_count_lock); + ++_M_ref_count; + __gthread_mutex_unlock(&_M_ref_count_lock); + } + _RC_t _M_decr() { + __gthread_mutex_lock(&_M_ref_count_lock); + volatile _RC_t __tmp = --_M_ref_count; + __gthread_mutex_unlock(&_M_ref_count_lock); + return __tmp; + } +#else +// GCC extension end + // _M_incr and _M_decr +# ifdef __STL_SGI_THREADS + void _M_incr() { __add_and_fetch(&_M_ref_count, 1); } + _RC_t _M_decr() { return __add_and_fetch(&_M_ref_count, (size_t) -1); } +# elif defined (__STL_WIN32THREADS) + void _M_incr() { InterlockedIncrement((_RC_t*)&_M_ref_count); } + _RC_t _M_decr() { return InterlockedDecrement((_RC_t*)&_M_ref_count); } +# elif defined(__STL_PTHREADS) + void _M_incr() { + pthread_mutex_lock(&_M_ref_count_lock); + ++_M_ref_count; + pthread_mutex_unlock(&_M_ref_count_lock); + } + _RC_t _M_decr() { + pthread_mutex_lock(&_M_ref_count_lock); + volatile _RC_t __tmp = --_M_ref_count; + pthread_mutex_unlock(&_M_ref_count_lock); + return __tmp; + } +# elif defined(__STL_UITHREADS) + void _M_incr() { + mutex_lock(&_M_ref_count_lock); + ++_M_ref_count; + mutex_unlock(&_M_ref_count_lock); + } + _RC_t _M_decr() { + mutex_lock(&_M_ref_count_lock); + /*volatile*/ _RC_t __tmp = --_M_ref_count; + mutex_unlock(&_M_ref_count_lock); + return __tmp; + } +# else /* No threads */ + void _M_incr() { ++_M_ref_count; } + _RC_t _M_decr() { return --_M_ref_count; } +# endif +// GCC extension begin +#endif +// GCC extension end +}; + +// Atomic swap on unsigned long +// This is guaranteed to behave as though it were atomic only if all +// possibly concurrent updates use _Atomic_swap. +// In some cases the operation is emulated with a lock. +// GCC extension begin +#ifdef __STL_GTHREADS +// We don't provide an _Atomic_swap in this configuration. This only +// affects the use of ext/rope with threads. Someone could add this +// later, if required. You can start by cloning the __STL_PTHREADS +// path while making the obvious changes. Later it could be optimized +// to use the atomicity.h abstraction layer from libstdc++-v3. +#else +// GCC extension end +# ifdef __STL_SGI_THREADS + inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { +# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) + return test_and_set(__p, __q); +# else + return __test_and_set(__p, (unsigned long)__q); +# endif + } +# elif defined(__STL_WIN32THREADS) + inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { + return (unsigned long) InterlockedExchange((LPLONG)__p, (LONG)__q); + } +# elif defined(__STL_PTHREADS) + // We use a template here only to get a unique initialized instance. + template + struct _Swap_lock_struct { + static pthread_mutex_t _S_swap_lock; + }; + + template + pthread_mutex_t + _Swap_lock_struct<__dummy>::_S_swap_lock = PTHREAD_MUTEX_INITIALIZER; + + // This should be portable, but performance is expected + // to be quite awful. This really needs platform specific + // code. + inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { + pthread_mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock); + unsigned long __result = *__p; + *__p = __q; + pthread_mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock); + return __result; + } +# elif defined(__STL_UITHREADS) + // We use a template here only to get a unique initialized instance. + template + struct _Swap_lock_struct { + static mutex_t _S_swap_lock; + }; + + template + mutex_t + _Swap_lock_struct<__dummy>::_S_swap_lock = DEFAULTMUTEX; + + // This should be portable, but performance is expected + // to be quite awful. This really needs platform specific + // code. + inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { + mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock); + unsigned long __result = *__p; + *__p = __q; + mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock); + return __result; + } +# elif defined (__STL_SOLARIS_THREADS) + // any better solutions ? + // We use a template here only to get a unique initialized instance. + template + struct _Swap_lock_struct { + static mutex_t _S_swap_lock; + }; + +# if ( __STL_STATIC_TEMPLATE_DATA > 0 ) + template + mutex_t + _Swap_lock_struct<__dummy>::_S_swap_lock = DEFAULTMUTEX; +# else + __DECLARE_INSTANCE(mutex_t, _Swap_lock_struct<__dummy>::_S_swap_lock, + =DEFAULTMUTEX); +# endif /* ( __STL_STATIC_TEMPLATE_DATA > 0 ) */ + + // This should be portable, but performance is expected + // to be quite awful. This really needs platform specific + // code. + inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { + mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock); + unsigned long __result = *__p; + *__p = __q; + mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock); + return __result; + } +# else + static inline unsigned long _Atomic_swap(unsigned long * __p, unsigned long __q) { + unsigned long __result = *__p; + *__p = __q; + return __result; + } +# endif +// GCC extension begin +#endif +// GCC extension end + +// Locking class. Note that this class *does not have a constructor*. +// It must be initialized either statically, with __STL_MUTEX_INITIALIZER, +// or dynamically, by explicitly calling the _M_initialize member function. +// (This is similar to the ways that a pthreads mutex can be initialized.) +// There are explicit member functions for acquiring and releasing the lock. + +// There is no constructor because static initialization is essential for +// some uses, and only a class aggregate (see section 8.5.1 of the C++ +// standard) can be initialized that way. That means we must have no +// constructors, no base classes, no virtual functions, and no private or +// protected members. + +// Helper struct. This is a workaround for various compilers that don't +// handle static variables in inline functions properly. +template +struct _STL_mutex_spin { + enum { __low_max = 30, __high_max = 1000 }; + // Low if we suspect uniprocessor, high for multiprocessor. + + static unsigned __max; + static unsigned __last; +}; + +template +unsigned _STL_mutex_spin<__inst>::__max = _STL_mutex_spin<__inst>::__low_max; + +template +unsigned _STL_mutex_spin<__inst>::__last = 0; + +// GCC extension begin +#if defined(__STL_GTHREADS) +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) +extern __gthread_mutex_t _GLIBCPP_mutex; +extern __gthread_mutex_t *_GLIBCPP_mutex_address; +extern __gthread_once_t _GLIBCPP_once; +extern void _GLIBCPP_mutex_init (void); +extern void _GLIBCPP_mutex_address_init (void); +#endif +#endif +// GCC extension end + +struct _STL_mutex_lock +{ +// GCC extension begin +#if defined(__STL_GTHREADS) + // The class must be statically initialized with __STL_MUTEX_INITIALIZER. +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) + volatile int _M_init_flag; + __gthread_once_t _M_once; +#endif + __gthread_mutex_t _M_lock; + void _M_initialize() { +#ifdef __GTHREAD_MUTEX_INIT + // There should be no code in this path given the usage rules above. +#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) + if (_M_init_flag) return; + if (__gthread_once (&_GLIBCPP_once, _GLIBCPP_mutex_init) != 0 + && __gthread_active_p ()) + abort (); + __gthread_mutex_lock (&_GLIBCPP_mutex); + if (!_M_init_flag) { + // Even though we have a global lock, we use __gthread_once to be + // absolutely certain the _M_lock mutex is only initialized once on + // multiprocessor systems. + _GLIBCPP_mutex_address = &_M_lock; + if (__gthread_once (&_M_once, _GLIBCPP_mutex_address_init) != 0 + && __gthread_active_p ()) + abort (); + _M_init_flag = 1; + } + __gthread_mutex_unlock (&_GLIBCPP_mutex); +#endif + } + void _M_acquire_lock() { +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) + if (!_M_init_flag) _M_initialize(); +#endif + __gthread_mutex_lock(&_M_lock); + } + void _M_release_lock() { +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) + if (!_M_init_flag) _M_initialize(); +#endif + __gthread_mutex_unlock(&_M_lock); + } +#else +// GCC extension end +#if defined(__STL_SGI_THREADS) || defined(__STL_WIN32THREADS) + // It should be relatively easy to get this to work on any modern Unix. + volatile unsigned long _M_lock; + void _M_initialize() { _M_lock = 0; } + static void _S_nsec_sleep(int __log_nsec) { +# ifdef __STL_SGI_THREADS + struct timespec __ts; + /* Max sleep is 2**27nsec ~ 60msec */ + __ts.tv_sec = 0; + __ts.tv_nsec = 1L << __log_nsec; + nanosleep(&__ts, 0); +# elif defined(__STL_WIN32THREADS) + if (__log_nsec <= 20) { + Sleep(0); + } else { + Sleep(1 << (__log_nsec - 20)); + } +# else +# error unimplemented +# endif + } + void _M_acquire_lock() { + volatile unsigned long* __lock = &this->_M_lock; + + if (!_Atomic_swap((unsigned long*)__lock, 1)) { + return; + } + unsigned __my_spin_max = _STL_mutex_spin<0>::__max; + unsigned __my_last_spins = _STL_mutex_spin<0>::__last; + volatile unsigned __junk = 17; // Value doesn't matter. + unsigned __i; + for (__i = 0; __i < __my_spin_max; __i++) { + if (__i < __my_last_spins/2 || *__lock) { + __junk *= __junk; __junk *= __junk; + __junk *= __junk; __junk *= __junk; + continue; + } + if (!_Atomic_swap((unsigned long*)__lock, 1)) { + // got it! + // Spinning worked. Thus we're probably not being scheduled + // against the other process with which we were contending. + // Thus it makes sense to spin longer the next time. + _STL_mutex_spin<0>::__last = __i; + _STL_mutex_spin<0>::__max = _STL_mutex_spin<0>::__high_max; + return; + } + } + // We are probably being scheduled against the other process. Sleep. + _STL_mutex_spin<0>::__max = _STL_mutex_spin<0>::__low_max; + for (__i = 0 ;; ++__i) { + int __log_nsec = __i + 6; + + if (__log_nsec > 27) __log_nsec = 27; + if (!_Atomic_swap((unsigned long *)__lock, 1)) { + return; + } + _S_nsec_sleep(__log_nsec); + } + } + void _M_release_lock() { + volatile unsigned long* __lock = &_M_lock; +# if defined(__STL_SGI_THREADS) && defined(__GNUC__) && __mips >= 3 + asm("sync"); + *__lock = 0; +# elif defined(__STL_SGI_THREADS) && __mips >= 3 \ + && (defined (_ABIN32) || defined(_ABI64)) + __lock_release(__lock); +# else + *__lock = 0; + // This is not sufficient on many multiprocessors, since + // writes to protected variables and the lock may be reordered. +# endif + } + +// We no longer use win32 critical sections. +// They appear to be slower in the contention-free case, +// and they appear difficult to initialize without introducing a race. + +#elif defined(__STL_PTHREADS) + pthread_mutex_t _M_lock; + void _M_initialize() { pthread_mutex_init(&_M_lock, NULL); } + void _M_acquire_lock() { pthread_mutex_lock(&_M_lock); } + void _M_release_lock() { pthread_mutex_unlock(&_M_lock); } +#elif defined(__STL_UITHREADS) + mutex_t _M_lock; + void _M_initialize() { mutex_init(&_M_lock, USYNC_THREAD, 0); } + void _M_acquire_lock() { mutex_lock(&_M_lock); } + void _M_release_lock() { mutex_unlock(&_M_lock); } +#else /* No threads */ + void _M_initialize() {} + void _M_acquire_lock() {} + void _M_release_lock() {} +#endif +// GCC extension begin +#endif +// GCC extension end +}; + +// GCC extension begin +#if defined(__STL_GTHREADS) +#ifdef __GTHREAD_MUTEX_INIT +#define __STL_MUTEX_INITIALIZER = { __GTHREAD_MUTEX_INIT } +#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) +#ifdef __GTHREAD_MUTEX_INIT_DEFAULT +#define __STL_MUTEX_INITIALIZER \ + = { 0, __GTHREAD_ONCE_INIT, __GTHREAD_MUTEX_INIT_DEFAULT } +#else +#define __STL_MUTEX_INITIALIZER = { 0, __GTHREAD_ONCE_INIT } +#endif +#endif +#else +// GCC extension end +#ifdef __STL_PTHREADS +// Pthreads locks must be statically initialized to something other than +// the default value of zero. +# define __STL_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER } +#elif defined(__STL_UITHREADS) +// UIthreads locks must be statically initialized to something other than +// the default value of zero. +# define __STL_MUTEX_INITIALIZER = { DEFAULTMUTEX } +#elif defined(__STL_SGI_THREADS) || defined(__STL_WIN32THREADS) +# define __STL_MUTEX_INITIALIZER = { 0 } +#else +# define __STL_MUTEX_INITIALIZER +#endif +// GCC extension begin +#endif +// GCC extension end + + +// A locking class that uses _STL_mutex_lock. The constructor takes a +// reference to an _STL_mutex_lock, and acquires a lock. The +// destructor releases the lock. It's not clear that this is exactly +// the right functionality. It will probably change in the future. + +struct _STL_auto_lock +{ + _STL_mutex_lock& _M_lock; + + _STL_auto_lock(_STL_mutex_lock& __lock) : _M_lock(__lock) + { _M_lock._M_acquire_lock(); } + ~_STL_auto_lock() { _M_lock._M_release_lock(); } + +private: + void operator=(const _STL_auto_lock&); + _STL_auto_lock(const _STL_auto_lock&); +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_THREADS_H */ + +// Local Variables: +// mode:C++ +// End: + diff --git a/contrib/media/updf/include/bits/stl_tree.h b/contrib/media/updf/include/bits/stl_tree.h new file mode 100644 index 0000000000..253734e60e --- /dev/null +++ b/contrib/media/updf/include/bits/stl_tree.h @@ -0,0 +1,1277 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_TREE_H +#define __SGI_STL_INTERNAL_TREE_H + +/* + +Red-black tree class, designed for use in implementing STL +associative containers (set, multiset, map, and multimap). The +insertion and deletion algorithms are based on those in Cormen, +Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990), +except that + +(1) the header cell is maintained with links not only to the root +but also to the leftmost node of the tree, to enable constant time +begin(), and to the rightmost node of the tree, to enable linear time +performance when used with the generic set algorithms (set_union, +etc.); + +(2) when a node being deleted has two children its successor node is +relinked into its place, rather than copied, so that the only +iterators invalidated are those referring to the deleted node. + +*/ + +#include +#include +#include +#include + +namespace std +{ + +typedef bool _Rb_tree_Color_type; +const _Rb_tree_Color_type _S_rb_tree_red = false; +const _Rb_tree_Color_type _S_rb_tree_black = true; + +struct _Rb_tree_node_base +{ + typedef _Rb_tree_Color_type _Color_type; + typedef _Rb_tree_node_base* _Base_ptr; + + _Color_type _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + + static _Base_ptr _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Base_ptr _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } +}; + +template +struct _Rb_tree_node : public _Rb_tree_node_base +{ + typedef _Rb_tree_node<_Value>* _Link_type; + _Value _M_value_field; +}; + + +struct _Rb_tree_base_iterator +{ + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + _Base_ptr _M_node; + + void _M_increment() + { + if (_M_node->_M_right != 0) { + _M_node = _M_node->_M_right; + while (_M_node->_M_left != 0) + _M_node = _M_node->_M_left; + } + else { + _Base_ptr __y = _M_node->_M_parent; + while (_M_node == __y->_M_right) { + _M_node = __y; + __y = __y->_M_parent; + } + if (_M_node->_M_right != __y) + _M_node = __y; + } + } + + void _M_decrement() + { + if (_M_node->_M_color == _S_rb_tree_red && + _M_node->_M_parent->_M_parent == _M_node) + _M_node = _M_node->_M_right; + else if (_M_node->_M_left != 0) { + _Base_ptr __y = _M_node->_M_left; + while (__y->_M_right != 0) + __y = __y->_M_right; + _M_node = __y; + } + else { + _Base_ptr __y = _M_node->_M_parent; + while (_M_node == __y->_M_left) { + _M_node = __y; + __y = __y->_M_parent; + } + _M_node = __y; + } + } +}; + +template +struct _Rb_tree_iterator : public _Rb_tree_base_iterator +{ + typedef _Value value_type; + typedef _Ref reference; + typedef _Ptr pointer; + typedef _Rb_tree_iterator<_Value, _Value&, _Value*> + iterator; + typedef _Rb_tree_iterator<_Value, const _Value&, const _Value*> + const_iterator; + typedef _Rb_tree_iterator<_Value, _Ref, _Ptr> + _Self; + typedef _Rb_tree_node<_Value>* _Link_type; + + _Rb_tree_iterator() {} + _Rb_tree_iterator(_Link_type __x) { _M_node = __x; } + _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; } + + reference operator*() const { return _Link_type(_M_node)->_M_value_field; } + pointer operator->() const { return &(operator*()); } + + _Self& operator++() { _M_increment(); return *this; } + _Self operator++(int) { + _Self __tmp = *this; + _M_increment(); + return __tmp; + } + + _Self& operator--() { _M_decrement(); return *this; } + _Self operator--(int) { + _Self __tmp = *this; + _M_decrement(); + return __tmp; + } +}; + +template +inline bool operator==(const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __x, + const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __y) { + return __x._M_node == __y._M_node; +} + +template +inline bool operator==(const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __x, + const _Rb_tree_iterator<_Value, _Value&, _Value*>& __y) { + return __x._M_node == __y._M_node; +} + +template +inline bool operator==(const _Rb_tree_iterator<_Value, _Value&, _Value*>& __x, + const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __y) { + return __x._M_node == __y._M_node; +} + +template +inline bool operator!=(const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __x, + const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __y) { + return __x._M_node != __y._M_node; +} + +template +inline bool operator!=(const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __x, + const _Rb_tree_iterator<_Value, _Value&, _Value*>& __y) { + return __x._M_node != __y._M_node; +} + +template +inline bool operator!=(const _Rb_tree_iterator<_Value, _Value&, _Value*>& __x, + const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __y) { + return __x._M_node != __y._M_node; +} + +inline void +_Rb_tree_rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) +{ + _Rb_tree_node_base* __y = __x->_M_right; + __x->_M_right = __y->_M_left; + if (__y->_M_left !=0) + __y->_M_left->_M_parent = __x; + __y->_M_parent = __x->_M_parent; + + if (__x == __root) + __root = __y; + else if (__x == __x->_M_parent->_M_left) + __x->_M_parent->_M_left = __y; + else + __x->_M_parent->_M_right = __y; + __y->_M_left = __x; + __x->_M_parent = __y; +} + +inline void +_Rb_tree_rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) +{ + _Rb_tree_node_base* __y = __x->_M_left; + __x->_M_left = __y->_M_right; + if (__y->_M_right != 0) + __y->_M_right->_M_parent = __x; + __y->_M_parent = __x->_M_parent; + + if (__x == __root) + __root = __y; + else if (__x == __x->_M_parent->_M_right) + __x->_M_parent->_M_right = __y; + else + __x->_M_parent->_M_left = __y; + __y->_M_right = __x; + __x->_M_parent = __y; +} + +inline void +_Rb_tree_rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) +{ + __x->_M_color = _S_rb_tree_red; + while (__x != __root && __x->_M_parent->_M_color == _S_rb_tree_red) { + if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) { + _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right; + if (__y && __y->_M_color == _S_rb_tree_red) { + __x->_M_parent->_M_color = _S_rb_tree_black; + __y->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + __x = __x->_M_parent->_M_parent; + } + else { + if (__x == __x->_M_parent->_M_right) { + __x = __x->_M_parent; + _Rb_tree_rotate_left(__x, __root); + } + __x->_M_parent->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_right(__x->_M_parent->_M_parent, __root); + } + } + else { + _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left; + if (__y && __y->_M_color == _S_rb_tree_red) { + __x->_M_parent->_M_color = _S_rb_tree_black; + __y->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + __x = __x->_M_parent->_M_parent; + } + else { + if (__x == __x->_M_parent->_M_left) { + __x = __x->_M_parent; + _Rb_tree_rotate_right(__x, __root); + } + __x->_M_parent->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_left(__x->_M_parent->_M_parent, __root); + } + } + } + __root->_M_color = _S_rb_tree_black; +} + +inline _Rb_tree_node_base* +_Rb_tree_rebalance_for_erase(_Rb_tree_node_base* __z, + _Rb_tree_node_base*& __root, + _Rb_tree_node_base*& __leftmost, + _Rb_tree_node_base*& __rightmost) +{ + _Rb_tree_node_base* __y = __z; + _Rb_tree_node_base* __x = 0; + _Rb_tree_node_base* __x_parent = 0; + if (__y->_M_left == 0) // __z has at most one non-null child. y == z. + __x = __y->_M_right; // __x might be null. + else + if (__y->_M_right == 0) // __z has exactly one non-null child. y == z. + __x = __y->_M_left; // __x is not null. + else { // __z has two non-null children. Set __y to + __y = __y->_M_right; // __z's successor. __x might be null. + while (__y->_M_left != 0) + __y = __y->_M_left; + __x = __y->_M_right; + } + if (__y != __z) { // relink y in place of z. y is z's successor + __z->_M_left->_M_parent = __y; + __y->_M_left = __z->_M_left; + if (__y != __z->_M_right) { + __x_parent = __y->_M_parent; + if (__x) __x->_M_parent = __y->_M_parent; + __y->_M_parent->_M_left = __x; // __y must be a child of _M_left + __y->_M_right = __z->_M_right; + __z->_M_right->_M_parent = __y; + } + else + __x_parent = __y; + if (__root == __z) + __root = __y; + else if (__z->_M_parent->_M_left == __z) + __z->_M_parent->_M_left = __y; + else + __z->_M_parent->_M_right = __y; + __y->_M_parent = __z->_M_parent; + std::swap(__y->_M_color, __z->_M_color); + __y = __z; + // __y now points to node to be actually deleted + } + else { // __y == __z + __x_parent = __y->_M_parent; + if (__x) __x->_M_parent = __y->_M_parent; + if (__root == __z) + __root = __x; + else + if (__z->_M_parent->_M_left == __z) + __z->_M_parent->_M_left = __x; + else + __z->_M_parent->_M_right = __x; + if (__leftmost == __z) + if (__z->_M_right == 0) // __z->_M_left must be null also + __leftmost = __z->_M_parent; + // makes __leftmost == _M_header if __z == __root + else + __leftmost = _Rb_tree_node_base::_S_minimum(__x); + if (__rightmost == __z) + if (__z->_M_left == 0) // __z->_M_right must be null also + __rightmost = __z->_M_parent; + // makes __rightmost == _M_header if __z == __root + else // __x == __z->_M_left + __rightmost = _Rb_tree_node_base::_S_maximum(__x); + } + if (__y->_M_color != _S_rb_tree_red) { + while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black)) + if (__x == __x_parent->_M_left) { + _Rb_tree_node_base* __w = __x_parent->_M_right; + if (__w->_M_color == _S_rb_tree_red) { + __w->_M_color = _S_rb_tree_black; + __x_parent->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_left(__x_parent, __root); + __w = __x_parent->_M_right; + } + if ((__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black) && + (__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black)) { + __w->_M_color = _S_rb_tree_red; + __x = __x_parent; + __x_parent = __x_parent->_M_parent; + } else { + if (__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black) { + if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; + __w->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_right(__w, __root); + __w = __x_parent->_M_right; + } + __w->_M_color = __x_parent->_M_color; + __x_parent->_M_color = _S_rb_tree_black; + if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; + _Rb_tree_rotate_left(__x_parent, __root); + break; + } + } else { // same as above, with _M_right <-> _M_left. + _Rb_tree_node_base* __w = __x_parent->_M_left; + if (__w->_M_color == _S_rb_tree_red) { + __w->_M_color = _S_rb_tree_black; + __x_parent->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_right(__x_parent, __root); + __w = __x_parent->_M_left; + } + if ((__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black) && + (__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black)) { + __w->_M_color = _S_rb_tree_red; + __x = __x_parent; + __x_parent = __x_parent->_M_parent; + } else { + if (__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black) { + if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; + __w->_M_color = _S_rb_tree_red; + _Rb_tree_rotate_left(__w, __root); + __w = __x_parent->_M_left; + } + __w->_M_color = __x_parent->_M_color; + __x_parent->_M_color = _S_rb_tree_black; + if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; + _Rb_tree_rotate_right(__x_parent, __root); + break; + } + } + if (__x) __x->_M_color = _S_rb_tree_black; + } + return __y; +} + +// Base class to encapsulate the differences between old SGI-style +// allocators and standard-conforming allocators. In order to avoid +// having an empty base class, we arbitrarily move one of rb_tree's +// data members into the base class. + +// _Base for general standard-conforming allocators. +template +class _Rb_tree_alloc_base { +public: + typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return _M_node_allocator; } + + _Rb_tree_alloc_base(const allocator_type& __a) + : _M_node_allocator(__a), _M_header(0) {} + +protected: + typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::allocator_type + _M_node_allocator; + _Rb_tree_node<_Tp>* _M_header; + + _Rb_tree_node<_Tp>* _M_get_node() + { return _M_node_allocator.allocate(1); } + void _M_put_node(_Rb_tree_node<_Tp>* __p) + { _M_node_allocator.deallocate(__p, 1); } +}; + +// Specialization for instanceless allocators. +template +class _Rb_tree_alloc_base<_Tp, _Alloc, true> { +public: + typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Rb_tree_alloc_base(const allocator_type&) : _M_header(0) {} + +protected: + _Rb_tree_node<_Tp>* _M_header; + + typedef typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::_Alloc_type + _Alloc_type; + + _Rb_tree_node<_Tp>* _M_get_node() + { return _Alloc_type::allocate(1); } + void _M_put_node(_Rb_tree_node<_Tp>* __p) + { _Alloc_type::deallocate(__p, 1); } +}; + +template +struct _Rb_tree_base + : public _Rb_tree_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> +{ + typedef _Rb_tree_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + + _Rb_tree_base(const allocator_type& __a) + : _Base(__a) { _M_header = _M_get_node(); } + ~_Rb_tree_base() { _M_put_node(_M_header); } + +}; + + +template > +class _Rb_tree : protected _Rb_tree_base<_Value, _Alloc> { + typedef _Rb_tree_base<_Value, _Alloc> _Base; +protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef _Rb_tree_node<_Value> _Rb_tree_node; + typedef _Rb_tree_Color_type _Color_type; +public: + typedef _Key key_type; + typedef _Value value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node* _Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + typedef typename _Base::allocator_type allocator_type; + allocator_type get_allocator() const { return _Base::get_allocator(); } + +protected: + using _Base::_M_get_node; + using _Base::_M_put_node; + using _Base::_M_header; + +protected: + + _Link_type _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + __STL_TRY { + construct(&__tmp->_M_value_field, __x); + } + __STL_UNWIND(_M_put_node(__tmp)); + return __tmp; + } + + _Link_type _M_clone_node(_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + + void destroy_node(_Link_type __p) + { + destroy(&__p->_M_value_field); + _M_put_node(__p); + } + +protected: + size_type _M_node_count; // keeps track of size of tree + _Compare _M_key_compare; + + _Link_type& _M_root() const + { return (_Link_type&) _M_header->_M_parent; } + _Link_type& _M_leftmost() const + { return (_Link_type&) _M_header->_M_left; } + _Link_type& _M_rightmost() const + { return (_Link_type&) _M_header->_M_right; } + + static _Link_type& _S_left(_Link_type __x) + { return (_Link_type&)(__x->_M_left); } + static _Link_type& _S_right(_Link_type __x) + { return (_Link_type&)(__x->_M_right); } + static _Link_type& _S_parent(_Link_type __x) + { return (_Link_type&)(__x->_M_parent); } + static reference _S_value(_Link_type __x) + { return __x->_M_value_field; } + static const _Key& _S_key(_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Color_type& _S_color(_Link_type __x) + { return (_Color_type&)(__x->_M_color); } + + static _Link_type& _S_left(_Base_ptr __x) + { return (_Link_type&)(__x->_M_left); } + static _Link_type& _S_right(_Base_ptr __x) + { return (_Link_type&)(__x->_M_right); } + static _Link_type& _S_parent(_Base_ptr __x) + { return (_Link_type&)(__x->_M_parent); } + static reference _S_value(_Base_ptr __x) + { return ((_Link_type)__x)->_M_value_field; } + static const _Key& _S_key(_Base_ptr __x) + { return _KeyOfValue()(_S_value(_Link_type(__x)));} + static _Color_type& _S_color(_Base_ptr __x) + { return (_Color_type&)(_Link_type(__x)->_M_color); } + + static _Link_type _S_minimum(_Link_type __x) + { return (_Link_type) _Rb_tree_node_base::_S_minimum(__x); } + + static _Link_type _S_maximum(_Link_type __x) + { return (_Link_type) _Rb_tree_node_base::_S_maximum(__x); } + +public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_iterator + const_iterator; + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + +private: + iterator _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + _Link_type _M_copy(_Link_type __x, _Link_type __p); + void _M_erase(_Link_type __x); + +public: + // allocation/deallocation + _Rb_tree() + : _Base(allocator_type()), _M_node_count(0), _M_key_compare() + { _M_empty_initialize(); } + + _Rb_tree(const _Compare& __comp) + : _Base(allocator_type()), _M_node_count(0), _M_key_compare(__comp) + { _M_empty_initialize(); } + + _Rb_tree(const _Compare& __comp, const allocator_type& __a) + : _Base(__a), _M_node_count(0), _M_key_compare(__comp) + { _M_empty_initialize(); } + + _Rb_tree(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x) + : _Base(__x.get_allocator()), + _M_node_count(0), _M_key_compare(__x._M_key_compare) + { + if (__x._M_root() == 0) + _M_empty_initialize(); + else { + _S_color(_M_header) = _S_rb_tree_red; + _M_root() = _M_copy(__x._M_root(), _M_header); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + } + _M_node_count = __x._M_node_count; + } + ~_Rb_tree() { clear(); } + _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& + operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x); + +private: + void _M_empty_initialize() { + _S_color(_M_header) = _S_rb_tree_red; // used to distinguish header from + // __root, in iterator.operator++ + _M_root() = 0; + _M_leftmost() = _M_header; + _M_rightmost() = _M_header; + } + +public: + // accessors: + _Compare key_comp() const { return _M_key_compare; } + iterator begin() { return _M_leftmost(); } + const_iterator begin() const { return _M_leftmost(); } + iterator end() { return _M_header; } + const_iterator end() const { return _M_header; } + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + bool empty() const { return _M_node_count == 0; } + size_type size() const { return _M_node_count; } + size_type max_size() const { return size_type(-1); } + + void swap(_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __t) { + std::swap(_M_header, __t._M_header); + std::swap(_M_node_count, __t._M_node_count); + std::swap(_M_key_compare, __t._M_key_compare); + } + +public: + // insert/erase + pair insert_unique(const value_type& __x); + iterator insert_equal(const value_type& __x); + + iterator insert_unique(iterator __position, const value_type& __x); + iterator insert_equal(iterator __position, const value_type& __x); + + template + void insert_unique(_InputIterator __first, _InputIterator __last); + template + void insert_equal(_InputIterator __first, _InputIterator __last); + + void erase(iterator __position); + size_type erase(const key_type& __x); + void erase(iterator __first, iterator __last); + void erase(const key_type* __first, const key_type* __last); + void clear() { + if (_M_node_count != 0) { + _M_erase(_M_root()); + _M_leftmost() = _M_header; + _M_root() = 0; + _M_rightmost() = _M_header; + _M_node_count = 0; + } + } + +public: + // set operations: + iterator find(const key_type& __x); + const_iterator find(const key_type& __x) const; + size_type count(const key_type& __x) const; + iterator lower_bound(const key_type& __x); + const_iterator lower_bound(const key_type& __x) const; + iterator upper_bound(const key_type& __x); + const_iterator upper_bound(const key_type& __x) const; + pair equal_range(const key_type& __x); + pair equal_range(const key_type& __x) const; + +public: + // Debugging. + bool __rb_verify() const; +}; + +template +inline bool +operator==(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) +{ + return __x.size() == __y.size() && + equal(__x.begin(), __x.end(), __y.begin()); +} + +template +inline bool +operator<(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) +{ + return lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); +} + +template +inline bool +operator!=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool +operator>(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool +operator<=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool +operator>=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) { + return !(__x < __y); +} + + +template +inline void +swap(_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, + _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) +{ + __x.swap(__y); +} + + +template +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x) +{ + if (this != &__x) { + // Note that _Key may be a constant type. + clear(); + _M_node_count = 0; + _M_key_compare = __x._M_key_compare; + if (__x._M_root() == 0) { + _M_root() = 0; + _M_leftmost() = _M_header; + _M_rightmost() = _M_header; + } + else { + _M_root() = _M_copy(__x._M_root(), _M_header); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_node_count = __x._M_node_count; + } + } + return *this; +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::_M_insert(_Base_ptr __x_, _Base_ptr __y_, const _Value& __v) +{ + _Link_type __x = (_Link_type) __x_; + _Link_type __y = (_Link_type) __y_; + _Link_type __z; + + if (__y == _M_header || __x != 0 || + _M_key_compare(_KeyOfValue()(__v), _S_key(__y))) { + __z = _M_create_node(__v); + _S_left(__y) = __z; // also makes _M_leftmost() = __z + // when __y == _M_header + if (__y == _M_header) { + _M_root() = __z; + _M_rightmost() = __z; + } + else if (__y == _M_leftmost()) + _M_leftmost() = __z; // maintain _M_leftmost() pointing to min node + } + else { + __z = _M_create_node(__v); + _S_right(__y) = __z; + if (__y == _M_rightmost()) + _M_rightmost() = __z; // maintain _M_rightmost() pointing to max node + } + _S_parent(__z) = __y; + _S_left(__z) = 0; + _S_right(__z) = 0; + _Rb_tree_rebalance(__z, _M_header->_M_parent); + ++_M_node_count; + return iterator(__z); +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::insert_equal(const _Value& __v) +{ + _Link_type __y = _M_header; + _Link_type __x = _M_root(); + while (__x != 0) { + __y = __x; + __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert(__x, __y, __v); +} + + +template +pair::iterator, + bool> +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::insert_unique(const _Value& __v) +{ + _Link_type __y = _M_header; + _Link_type __x = _M_root(); + bool __comp = true; + while (__x != 0) { + __y = __x; + __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + if (__j == begin()) + return pair(_M_insert(__x, __y, __v), true); + else + --__j; + if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert(__x, __y, __v), true); + return pair(__j, false); +} + + +template +typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator +_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc> + ::insert_unique(iterator __position, const _Val& __v) +{ + if (__position._M_node == _M_header->_M_left) { // begin() + if (size() > 0 && + _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + else + return insert_unique(__v).first; + } else if (__position._M_node == _M_header) { // end() + if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) + return _M_insert(0, _M_rightmost(), __v); + else + return insert_unique(__v).first; + } else { + iterator __before = __position; + --__before; + if (_M_key_compare(_S_key(__before._M_node), _KeyOfValue()(__v)) + && _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) { + if (_S_right(__before._M_node) == 0) + return _M_insert(0, __before._M_node, __v); + else + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + } else + return insert_unique(__v).first; + } +} + +template +typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc> + ::insert_equal(iterator __position, const _Val& __v) +{ + if (__position._M_node == _M_header->_M_left) { // begin() + if (size() > 0 && + !_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + else + return insert_equal(__v); + } else if (__position._M_node == _M_header) {// end() + if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) + return _M_insert(0, _M_rightmost(), __v); + else + return insert_equal(__v); + } else { + iterator __before = __position; + --__before; + if (!_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node)) + && !_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { + if (_S_right(__before._M_node) == 0) + return _M_insert(0, __before._M_node, __v); + else + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + } else + return insert_equal(__v); + } +} + +template + template +void _Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc> + ::insert_equal(_II __first, _II __last) +{ + for ( ; __first != __last; ++__first) + insert_equal(*__first); +} + +template + template +void _Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc> + ::insert_unique(_II __first, _II __last) { + for ( ; __first != __last; ++__first) + insert_unique(*__first); +} + +template +inline void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::erase(iterator __position) +{ + _Link_type __y = + (_Link_type) _Rb_tree_rebalance_for_erase(__position._M_node, + _M_header->_M_parent, + _M_header->_M_left, + _M_header->_M_right); + destroy_node(__y); + --_M_node_count; +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::size_type +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::erase(const _Key& __x) +{ + pair __p = equal_range(__x); + size_type __n = 0; + distance(__p.first, __p.second, __n); + erase(__p.first, __p.second); + return __n; +} + +template +typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type +_Rb_tree<_Key,_Val,_KoV,_Compare,_Alloc> + ::_M_copy(_Link_type __x, _Link_type __p) +{ + // structural copy. __x and __p must be non-null. + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + + __STL_TRY { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + + while (__x != 0) { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + __STL_UNWIND(_M_erase(__top)); + + return __top; +} + +template +void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::_M_erase(_Link_type __x) +{ + // erase without rebalancing + while (__x != 0) { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + destroy_node(__x); + __x = __y; + } +} + +template +void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::erase(iterator __first, iterator __last) +{ + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) erase(__first++); +} + +template +void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::erase(const _Key* __first, const _Key* __last) +{ + while (__first != __last) erase(*__first++); +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::find(const _Key& __k) +{ + _Link_type __y = _M_header; // Last node which is not less than __k. + _Link_type __x = _M_root(); // Current node. + + while (__x != 0) + if (!_M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + + iterator __j = iterator(__y); + return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ? + end() : __j; +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::const_iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::find(const _Key& __k) const +{ + _Link_type __y = _M_header; /* Last node which is not less than __k. */ + _Link_type __x = _M_root(); /* Current node. */ + + while (__x != 0) { + if (!_M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + } + const_iterator __j = const_iterator(__y); + return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ? + end() : __j; +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::size_type +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::count(const _Key& __k) const +{ + pair __p = equal_range(__k); + size_type __n = 0; + distance(__p.first, __p.second, __n); + return __n; +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::lower_bound(const _Key& __k) +{ + _Link_type __y = _M_header; /* Last node which is not less than __k. */ + _Link_type __x = _M_root(); /* Current node. */ + + while (__x != 0) + if (!_M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + + return iterator(__y); +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::const_iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::lower_bound(const _Key& __k) const +{ + _Link_type __y = _M_header; /* Last node which is not less than __k. */ + _Link_type __x = _M_root(); /* Current node. */ + + while (__x != 0) + if (!_M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + + return const_iterator(__y); +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::upper_bound(const _Key& __k) +{ + _Link_type __y = _M_header; /* Last node which is greater than __k. */ + _Link_type __x = _M_root(); /* Current node. */ + + while (__x != 0) + if (_M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + + return iterator(__y); +} + +template +typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::const_iterator +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::upper_bound(const _Key& __k) const +{ + _Link_type __y = _M_header; /* Last node which is greater than __k. */ + _Link_type __x = _M_root(); /* Current node. */ + + while (__x != 0) + if (_M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + + return const_iterator(__y); +} + +template +inline +pair::iterator, + typename _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::iterator> +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> + ::equal_range(const _Key& __k) +{ + return pair(lower_bound(__k), upper_bound(__k)); +} + +template +inline +pair::const_iterator, + typename _Rb_tree<_Key, _Value, _KoV, _Compare, _Alloc>::const_iterator> +_Rb_tree<_Key, _Value, _KoV, _Compare, _Alloc> + ::equal_range(const _Key& __k) const +{ + return pair(lower_bound(__k), + upper_bound(__k)); +} + +inline int +__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root) +{ + if (__node == 0) + return 0; + int __sum = 0; + do { + if (__node->_M_color == _S_rb_tree_black) + ++__sum; + if (__node == __root) + break; + __node = __node->_M_parent; + } while (1); + return __sum; +} + +template +bool _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const +{ + if (_M_node_count == 0 || begin() == end()) + return _M_node_count == 0 && begin() == end() && + _M_header->_M_left == _M_header && _M_header->_M_right == _M_header; + + int __len = __black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) { + _Link_type __x = (_Link_type) __it._M_node; + _Link_type __L = _S_left(__x); + _Link_type __R = _S_right(__x); + + if (__x->_M_color == _S_rb_tree_red) + if ((__L && __L->_M_color == _S_rb_tree_red) || + (__R && __R->_M_color == _S_rb_tree_red)) + return false; + + if (__L && _M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_key_compare(_S_key(__R), _S_key(__x))) + return false; + + if (!__L && !__R && __black_count(__x, _M_root()) != __len) + return false; + } + + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + + return true; +} + +// Class rb_tree is not part of the C++ standard. It is provided for +// compatibility with the HP STL. + +template > +struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> +{ + typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base; + typedef typename _Base::allocator_type allocator_type; + + rb_tree(const _Compare& __comp = _Compare(), + const allocator_type& __a = allocator_type()) + : _Base(__comp, __a) {} + + ~rb_tree() {} +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_TREE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_uninitialized.h b/contrib/media/updf/include/bits/stl_uninitialized.h new file mode 100644 index 0000000000..6f7c5a4929 --- /dev/null +++ b/contrib/media/updf/include/bits/stl_uninitialized.h @@ -0,0 +1,282 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_UNINITIALIZED_H +#define _CPP_BITS_STL_UNINITIALIZED_H 1 + +#include + +namespace std +{ + +// uninitialized_copy + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline _ForwardIter +__uninitialized_copy_aux(_InputIter __first, _InputIter __last, + _ForwardIter __result, + __true_type) +{ + return copy(__first, __last, __result); +} + +template +_ForwardIter +__uninitialized_copy_aux(_InputIter __first, _InputIter __last, + _ForwardIter __result, + __false_type) +{ + _ForwardIter __cur = __result; + __STL_TRY { + for ( ; __first != __last; ++__first, ++__cur) + _Construct(&*__cur, *__first); + return __cur; + } + __STL_UNWIND(_Destroy(__result, __cur)); +} + + +template +inline _ForwardIter +__uninitialized_copy(_InputIter __first, _InputIter __last, + _ForwardIter __result, _Tp*) +{ + typedef typename __type_traits<_Tp>::is_POD_type _Is_POD; + return __uninitialized_copy_aux(__first, __last, __result, _Is_POD()); +} + +template +inline _ForwardIter + uninitialized_copy(_InputIter __first, _InputIter __last, + _ForwardIter __result) +{ + return __uninitialized_copy(__first, __last, __result, + __value_type(__result)); +} + +inline char* uninitialized_copy(const char* __first, const char* __last, + char* __result) { + memmove(__result, __first, __last - __first); + return __result + (__last - __first); +} + +inline wchar_t* +uninitialized_copy(const wchar_t* __first, const wchar_t* __last, + wchar_t* __result) +{ + memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); + return __result + (__last - __first); +} + +// uninitialized_copy_n (not part of the C++ standard) + +template +pair<_InputIter, _ForwardIter> +__uninitialized_copy_n(_InputIter __first, _Size __count, + _ForwardIter __result, + input_iterator_tag) +{ + _ForwardIter __cur = __result; + __STL_TRY { + for ( ; __count > 0 ; --__count, ++__first, ++__cur) + _Construct(&*__cur, *__first); + return pair<_InputIter, _ForwardIter>(__first, __cur); + } + __STL_UNWIND(_Destroy(__result, __cur)); +} + +template +inline pair<_RandomAccessIter, _ForwardIter> +__uninitialized_copy_n(_RandomAccessIter __first, _Size __count, + _ForwardIter __result, + random_access_iterator_tag) { + _RandomAccessIter __last = __first + __count; + return pair<_RandomAccessIter, _ForwardIter>( + __last, + uninitialized_copy(__first, __last, __result)); +} + +template +inline pair<_InputIter, _ForwardIter> +__uninitialized_copy_n(_InputIter __first, _Size __count, + _ForwardIter __result) { + return __uninitialized_copy_n(__first, __count, __result, + __iterator_category(__first)); +} + +template +inline pair<_InputIter, _ForwardIter> +uninitialized_copy_n(_InputIter __first, _Size __count, + _ForwardIter __result) { + return __uninitialized_copy_n(__first, __count, __result, + __iterator_category(__first)); +} + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline void +__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, + const _Tp& __x, __true_type) +{ + fill(__first, __last, __x); +} + +template +void +__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, + const _Tp& __x, __false_type) +{ + _ForwardIter __cur = __first; + __STL_TRY { + for ( ; __cur != __last; ++__cur) + _Construct(&*__cur, __x); + } + __STL_UNWIND(_Destroy(__first, __cur)); +} + +template +inline void __uninitialized_fill(_ForwardIter __first, + _ForwardIter __last, const _Tp& __x, _Tp1*) +{ + typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD; + __uninitialized_fill_aux(__first, __last, __x, _Is_POD()); + +} + +template +inline void uninitialized_fill(_ForwardIter __first, + _ForwardIter __last, + const _Tp& __x) +{ + __uninitialized_fill(__first, __last, __x, __value_type(__first)); +} + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline _ForwardIter +__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, + const _Tp& __x, __true_type) +{ + return fill_n(__first, __n, __x); +} + +template +_ForwardIter +__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, + const _Tp& __x, __false_type) +{ + _ForwardIter __cur = __first; + __STL_TRY { + for ( ; __n > 0; --__n, ++__cur) + _Construct(&*__cur, __x); + return __cur; + } + __STL_UNWIND(_Destroy(__first, __cur)); +} + +template +inline _ForwardIter +__uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x, _Tp1*) +{ + typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD; + return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); +} + +template +inline _ForwardIter +uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) +{ + return __uninitialized_fill_n(__first, __n, __x, __value_type(__first)); +} + +// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, +// __uninitialized_fill_copy. + +// __uninitialized_copy_copy +// Copies [first1, last1) into [result, result + (last1 - first1)), and +// copies [first2, last2) into +// [result, result + (last1 - first1) + (last2 - first2)). + +template +inline _ForwardIter +__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _ForwardIter __result) +{ + _ForwardIter __mid = uninitialized_copy(__first1, __last1, __result); + __STL_TRY { + return uninitialized_copy(__first2, __last2, __mid); + } + __STL_UNWIND(_Destroy(__result, __mid)); +} + +// __uninitialized_fill_copy +// Fills [result, mid) with x, and copies [first, last) into +// [mid, mid + (last - first)). +template +inline _ForwardIter +__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, + const _Tp& __x, + _InputIter __first, _InputIter __last) +{ + uninitialized_fill(__result, __mid, __x); + __STL_TRY { + return uninitialized_copy(__first, __last, __mid); + } + __STL_UNWIND(_Destroy(__result, __mid)); +} + +// __uninitialized_copy_fill +// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and +// fills [first2 + (last1 - first1), last2) with x. +template +inline void +__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2, + const _Tp& __x) +{ + _ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2); + __STL_TRY { + uninitialized_fill(__mid2, __last2, __x); + } + __STL_UNWIND(_Destroy(__first2, __mid2)); +} + +} // namespace std + +#endif /* _CPP_BITS_STL_UNINITIALIZED_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/stl_vector.h b/contrib/media/updf/include/bits/stl_vector.h new file mode 100644 index 0000000000..4bc0253edc --- /dev/null +++ b/contrib/media/updf/include/bits/stl_vector.h @@ -0,0 +1,727 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_VECTOR_H +#define __SGI_STL_INTERNAL_VECTOR_H + +#include +#include +#include + +namespace std +{ + +// The vector base class serves two purposes. First, its constructor +// and destructor allocate (but don't initialize) storage. This makes +// exception safety easier. Second, the base class encapsulates all of +// the differences between SGI-style allocators and standard-conforming +// allocators. + +// Base class for ordinary allocators. +template +class _Vector_alloc_base { +public: + typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + + _Vector_alloc_base(const allocator_type& __a) + : _M_data_allocator(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + {} + +protected: + allocator_type _M_data_allocator; + _Tp* _M_start; + _Tp* _M_finish; + _Tp* _M_end_of_storage; + + _Tp* _M_allocate(size_t __n) + { return _M_data_allocator.allocate(__n); } + void _M_deallocate(_Tp* __p, size_t __n) + { if (__p) _M_data_allocator.deallocate(__p, __n); } +}; + +// Specialization for allocators that have the property that we don't +// actually have to store an allocator object. +template +class _Vector_alloc_base<_Tp, _Allocator, true> { +public: + typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Vector_alloc_base(const allocator_type&) + : _M_start(0), _M_finish(0), _M_end_of_storage(0) + {} + +protected: + _Tp* _M_start; + _Tp* _M_finish; + _Tp* _M_end_of_storage; + + typedef typename _Alloc_traits<_Tp, _Allocator>::_Alloc_type _Alloc_type; + _Tp* _M_allocate(size_t __n) + { return _Alloc_type::allocate(__n); } + void _M_deallocate(_Tp* __p, size_t __n) + { _Alloc_type::deallocate(__p, __n);} +}; + +template +struct _Vector_base + : public _Vector_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> +{ + typedef _Vector_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + + _Vector_base(const allocator_type& __a) : _Base(__a) {} + _Vector_base(size_t __n, const allocator_type& __a) : _Base(__a) { + _M_start = _M_allocate(__n); + _M_finish = _M_start; + _M_end_of_storage = _M_start + __n; + } + + ~_Vector_base() { _M_deallocate(_M_start, _M_end_of_storage - _M_start); } +}; + + +template > +class vector : protected _Vector_base<_Tp, _Alloc> +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + +private: + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef vector<_Tp, _Alloc> vector_type; +public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef __normal_iterator iterator; + typedef __normal_iterator const_iterator; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + typedef typename _Base::allocator_type allocator_type; + allocator_type get_allocator() const { return _Base::get_allocator(); } + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + +protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_start; + using _Base::_M_finish; + using _Base::_M_end_of_storage; + +protected: + void _M_insert_aux(iterator __position, const _Tp& __x); + void _M_insert_aux(iterator __position); + +public: + iterator begin() { return iterator (_M_start); } + const_iterator begin() const + { return const_iterator (_M_start); } + iterator end() { return iterator (_M_finish); } + const_iterator end() const { return const_iterator (_M_finish); } + + reverse_iterator rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator rend() + { return reverse_iterator(begin()); } + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + size_type size() const + { return size_type(end() - begin()); } + size_type max_size() const + { return size_type(-1) / sizeof(_Tp); } + size_type capacity() const + { return size_type(const_iterator(_M_end_of_storage) - begin()); } + bool empty() const + { return begin() == end(); } + + reference operator[](size_type __n) { return *(begin() + __n); } + const_reference operator[](size_type __n) const { return *(begin() + __n); } + + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __throw_out_of_range("vector"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + explicit vector(const allocator_type& __a = allocator_type()) + : _Base(__a) {} + + vector(size_type __n, const _Tp& __value, + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_finish = uninitialized_fill_n(_M_start, __n, __value); } + + explicit vector(size_type __n) + : _Base(__n, allocator_type()) + { _M_finish = uninitialized_fill_n(_M_start, __n, _Tp()); } + + vector(const vector<_Tp, _Alloc>& __x) + : _Base(__x.size(), __x.get_allocator()) + { _M_finish = uninitialized_copy(__x.begin(), __x.end(), _M_start); } + + // Check whether it's an integral type. If so, it's not an iterator. + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) : _Base(__a) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_initialize_aux(__first, __last, _Integral()); + } + + template + void _M_initialize_aux(_Integer __n, _Integer __value, __true_type) { + _M_start = _M_allocate(__n); + _M_end_of_storage = _M_start + __n; + _M_finish = uninitialized_fill_n(_M_start, __n, __value); + } + + template + void _M_initialize_aux(_InputIterator __first, _InputIterator __last, + __false_type) { + _M_range_initialize(__first, __last, __iterator_category(__first)); + } + + ~vector() { destroy(_M_start, _M_finish); } + + vector<_Tp, _Alloc>& operator=(const vector<_Tp, _Alloc>& __x); + void reserve(size_type __n) { + if (capacity() < __n) { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, _M_start, _M_finish); + destroy(_M_start, _M_finish); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __tmp; + _M_finish = __tmp + __old_size; + _M_end_of_storage = _M_start + __n; + } + } + + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); } + void _M_fill_assign(size_type __n, const _Tp& __val); + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_type) __n, (_Tp) __val); } + + template + void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) + { _M_assign_aux(__first, __last, __iterator_category(__first)); } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + input_iterator_tag); + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag); + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + + void push_back(const _Tp& __x) { + if (_M_finish != _M_end_of_storage) { + construct(_M_finish, __x); + ++_M_finish; + } + else + _M_insert_aux(end(), __x); + } + void push_back() { + if (_M_finish != _M_end_of_storage) { + construct(_M_finish); + ++_M_finish; + } + else + _M_insert_aux(end()); + } + void swap(vector<_Tp, _Alloc>& __x) { + std::swap(_M_start, __x._M_start); + std::swap(_M_finish, __x._M_finish); + std::swap(_M_end_of_storage, __x._M_end_of_storage); + } + + iterator insert(iterator __position, const _Tp& __x) { + size_type __n = __position - begin(); + if (_M_finish != _M_end_of_storage && __position == end()) { + construct(_M_finish, __x); + ++_M_finish; + } + else + _M_insert_aux(iterator(__position), __x); + return begin() + __n; + } + iterator insert(iterator __position) { + size_type __n = __position - begin(); + if (_M_finish != _M_end_of_storage && __position == end()) { + construct(_M_finish); + ++_M_finish; + } + else + _M_insert_aux(iterator(__position)); + return begin() + __n; + } + // Check whether it's an integral type. If so, it's not an iterator. + template + void insert(iterator __pos, _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__pos, __first, __last, _Integral()); + } + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, (size_type) __n, (_Tp) __val); } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) { + _M_range_insert(__pos, __first, __last, __iterator_category(__first)); + } + + void insert (iterator __pos, size_type __n, const _Tp& __x) + { _M_fill_insert(__pos, __n, __x); } + + void _M_fill_insert (iterator __pos, size_type __n, const _Tp& __x); + + void pop_back() { + --_M_finish; + destroy(_M_finish); + } + iterator erase(iterator __position) { + if (__position + 1 != end()) + copy(__position + 1, end(), __position); + --_M_finish; + destroy(_M_finish); + return __position; + } + iterator erase(iterator __first, iterator __last) { + iterator __i(copy(__last, end(), __first)); + destroy(__i, end()); + _M_finish = _M_finish - (__last - __first); + return __first; + } + + void resize(size_type __new_size, const _Tp& __x) { + if (__new_size < size()) + erase(begin() + __new_size, end()); + else + insert(end(), __new_size - size(), __x); + } + void resize(size_type __new_size) { resize(__new_size, _Tp()); } + void clear() { erase(begin(), end()); } + +protected: + + template + pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, + _ForwardIterator __last) + { + pointer __result = _M_allocate(__n); + __STL_TRY { + uninitialized_copy(__first, __last, __result); + return __result; + } + __STL_UNWIND(_M_deallocate(__result, __n)); + } + + template + void _M_range_initialize(_InputIterator __first, + _InputIterator __last, input_iterator_tag) + { + for ( ; __first != __last; ++__first) + push_back(*__first); + } + + // This function is only called by the constructor. + template + void _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, forward_iterator_tag) + { + size_type __n = 0; + distance(__first, __last, __n); + _M_start = _M_allocate(__n); + _M_end_of_storage = _M_start + __n; + _M_finish = uninitialized_copy(__first, __last, _M_start); + } + + template + void _M_range_insert(iterator __pos, + _InputIterator __first, _InputIterator __last, + input_iterator_tag); + + template + void _M_range_insert(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag); +}; + +template +inline bool +operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) +{ + return __x.size() == __y.size() && + equal(__x.begin(), __x.end(), __y.begin()); +} + +template +inline bool +operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) +{ + return lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); +} + +template +inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) +{ + __x.swap(__y); +} + +template +inline bool +operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool +operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { + return __y < __x; +} + +template +inline bool +operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool +operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { + return !(__x < __y); +} + +template +vector<_Tp,_Alloc>& +vector<_Tp,_Alloc>::operator=(const vector<_Tp, _Alloc>& __x) +{ + if (&__x != this) { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end()); + destroy(_M_start, _M_finish); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __tmp; + _M_end_of_storage = _M_start + __xlen; + } + else if (size() >= __xlen) { + iterator __i(copy(__x.begin(), __x.end(), begin())); + destroy(__i, end()); + } + else { + copy(__x.begin(), __x.begin() + size(), _M_start); + uninitialized_copy(__x.begin() + size(), __x.end(), _M_finish); + } + _M_finish = _M_start + __xlen; + } + return *this; +} + +template +void vector<_Tp, _Alloc>::_M_fill_assign(size_t __n, const value_type& __val) +{ + if (__n > capacity()) { + vector<_Tp, _Alloc> __tmp(__n, __val, get_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) { + fill(begin(), end(), __val); + _M_finish = uninitialized_fill_n(_M_finish, __n - size(), __val); + } + else + erase(fill_n(begin(), __n, __val), end()); +} + +template template +void vector<_Tp, _Alloc>::_M_assign_aux(_InputIter __first, _InputIter __last, + input_iterator_tag) { + iterator __cur(begin()); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); +} + +template template +void +vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIter __first, _ForwardIter __last, + forward_iterator_tag) { + size_type __len = 0; + distance(__first, __last, __len); + + if (__len > capacity()) { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + destroy(_M_start, _M_finish); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __tmp; + _M_end_of_storage = _M_finish = _M_start + __len; + } + else if (size() >= __len) { + iterator __new_finish(copy(__first, __last, _M_start)); + destroy(__new_finish, end()); + _M_finish = __new_finish.base(); + } + else { + _ForwardIter __mid = __first; + advance(__mid, size()); + copy(__first, __mid, _M_start); + _M_finish = uninitialized_copy(__mid, __last, _M_finish); + } +} + +template +void +vector<_Tp, _Alloc>::_M_insert_aux(iterator __position, const _Tp& __x) +{ + if (_M_finish != _M_end_of_storage) { + construct(_M_finish, *(_M_finish - 1)); + ++_M_finish; + _Tp __x_copy = __x; + copy_backward(__position, iterator(_M_finish - 2), iterator(_M_finish- 1)); + *__position = __x_copy; + } + else { + const size_type __old_size = size(); + const size_type __len = __old_size != 0 ? 2 * __old_size : 1; + iterator __new_start(_M_allocate(__len)); + iterator __new_finish(__new_start); + __STL_TRY { + __new_finish = uninitialized_copy(iterator(_M_start), __position, + __new_start); + construct(__new_finish.base(), __x); + ++__new_finish; + __new_finish = uninitialized_copy(__position, iterator(_M_finish), + __new_finish); + } + __STL_UNWIND((destroy(__new_start,__new_finish), + _M_deallocate(__new_start.base(),__len))); + destroy(begin(), end()); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __new_start.base(); + _M_finish = __new_finish.base(); + _M_end_of_storage = __new_start.base() + __len; + } +} + +template +void +vector<_Tp, _Alloc>::_M_insert_aux(iterator __position) +{ + if (_M_finish != _M_end_of_storage) { + construct(_M_finish, *(_M_finish - 1)); + ++_M_finish; + copy_backward(__position, iterator(_M_finish - 2), + iterator(_M_finish - 1)); + *__position = _Tp(); + } + else { + const size_type __old_size = size(); + const size_type __len = __old_size != 0 ? 2 * __old_size : 1; + pointer __new_start = _M_allocate(__len); + pointer __new_finish = __new_start; + __STL_TRY { + __new_finish = uninitialized_copy(iterator(_M_start), __position, + __new_start); + construct(__new_finish); + ++__new_finish; + __new_finish = uninitialized_copy(__position, iterator(_M_finish), + __new_finish); + } + __STL_UNWIND((destroy(__new_start,__new_finish), + _M_deallocate(__new_start,__len))); + destroy(begin(), end()); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __new_start; + _M_finish = __new_finish; + _M_end_of_storage = __new_start + __len; + } +} + +template +void vector<_Tp, _Alloc>::_M_fill_insert(iterator __position, size_type __n, + const _Tp& __x) +{ + if (__n != 0) { + if (size_type(_M_end_of_storage - _M_finish) >= __n) { + _Tp __x_copy = __x; + const size_type __elems_after = end() - __position; + iterator __old_finish(_M_finish); + if (__elems_after > __n) { + uninitialized_copy(_M_finish - __n, _M_finish, _M_finish); + _M_finish += __n; + copy_backward(__position, __old_finish - __n, __old_finish); + fill(__position, __position + __n, __x_copy); + } + else { + uninitialized_fill_n(_M_finish, __n - __elems_after, __x_copy); + _M_finish += __n - __elems_after; + uninitialized_copy(__position, __old_finish, _M_finish); + _M_finish += __elems_after; + fill(__position, __old_finish, __x_copy); + } + } + else { + const size_type __old_size = size(); + const size_type __len = __old_size + max(__old_size, __n); + iterator __new_start(_M_allocate(__len)); + iterator __new_finish(__new_start); + __STL_TRY { + __new_finish = uninitialized_copy(begin(), __position, __new_start); + __new_finish = uninitialized_fill_n(__new_finish, __n, __x); + __new_finish + = uninitialized_copy(__position, end(), __new_finish); + } + __STL_UNWIND((destroy(__new_start,__new_finish), + _M_deallocate(__new_start.base(),__len))); + destroy(_M_start, _M_finish); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __new_start.base(); + _M_finish = __new_finish.base(); + _M_end_of_storage = __new_start.base() + __len; + } + } +} + +template template +void +vector<_Tp, _Alloc>::_M_range_insert(iterator __pos, + _InputIterator __first, + _InputIterator __last, + input_iterator_tag) +{ + for ( ; __first != __last; ++__first) { + __pos = insert(__pos, *__first); + ++__pos; + } +} + +template template +void +vector<_Tp, _Alloc>::_M_range_insert(iterator __position, + _ForwardIterator __first, + _ForwardIterator __last, + forward_iterator_tag) +{ + if (__first != __last) { + size_type __n = 0; + distance(__first, __last, __n); + if (size_type(_M_end_of_storage - _M_finish) >= __n) { + const size_type __elems_after = end() - __position; + iterator __old_finish(_M_finish); + if (__elems_after > __n) { + uninitialized_copy(_M_finish - __n, _M_finish, _M_finish); + _M_finish += __n; + copy_backward(__position, __old_finish - __n, __old_finish); + copy(__first, __last, __position); + } + else { + _ForwardIterator __mid = __first; + advance(__mid, __elems_after); + uninitialized_copy(__mid, __last, _M_finish); + _M_finish += __n - __elems_after; + uninitialized_copy(__position, __old_finish, _M_finish); + _M_finish += __elems_after; + copy(__first, __mid, __position); + } + } + else { + const size_type __old_size = size(); + const size_type __len = __old_size + max(__old_size, __n); + iterator __new_start(_M_allocate(__len)); + iterator __new_finish(__new_start); + __STL_TRY { + __new_finish = uninitialized_copy(iterator(_M_start), + __position, __new_start); + __new_finish = uninitialized_copy(__first, __last, __new_finish); + __new_finish + = uninitialized_copy(__position, iterator(_M_finish), __new_finish); + } + __STL_UNWIND((destroy(__new_start,__new_finish), + _M_deallocate(__new_start.base(),__len))); + destroy(_M_start, _M_finish); + _M_deallocate(_M_start, _M_end_of_storage - _M_start); + _M_start = __new_start.base(); + _M_finish = __new_finish.base(); + _M_end_of_storage = __new_start.base() + __len; + } + } +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_VECTOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/streambuf.tcc b/contrib/media/updf/include/bits/streambuf.tcc new file mode 100644 index 0000000000..fc26232a32 --- /dev/null +++ b/contrib/media/updf/include/bits/streambuf.tcc @@ -0,0 +1,230 @@ +// Stream buffer classes -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.5 Stream buffers +// + +#ifndef _CPP_BITS_STREAMBUF_TCC +#define _CPP_BITS_STREAMBUF_TCC 1 + +namespace std { + + template + basic_streambuf<_CharT, _Traits>::int_type + basic_streambuf<_CharT, _Traits>:: + sbumpc() + { + int_type __ret; + if (_M_in_cur && _M_in_cur < _M_in_end) + { + char_type __c = *gptr(); + _M_in_cur_move(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->uflow(); + return __ret; + } + + template + basic_streambuf<_CharT, _Traits>::int_type + basic_streambuf<_CharT, _Traits>:: + sputbackc(char_type __c) + { + int_type __ret; + bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur; + bool __testne = _M_in_cur && !traits_type::eq(__c, this->gptr()[-1]); + if (!__testpos || __testne) + __ret = pbackfail(traits_type::to_int_type(__c)); + else + { + _M_in_cur_move(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + + template + basic_streambuf<_CharT, _Traits>::int_type + basic_streambuf<_CharT, _Traits>:: + sungetc() + { + int_type __ret; + if (_M_in_cur && _M_in_beg < _M_in_cur) + { + _M_in_cur_move(-1); + __ret = traits_type::to_int_type(*_M_in_cur); + } + else + __ret = this->pbackfail(); + return __ret; + } + + // Don't test against _M_buf + _M_buf_size, because _M_buf reflects + // allocated space, and on certain (rare but entirely legal) + // situations, there will be no allocated space yet the internal + // buffers will still be valid. (This happens if setp is used to set + // the internal buffer to say some externally-allocated sequence.) + template + basic_streambuf<_CharT, _Traits>::int_type + basic_streambuf<_CharT, _Traits>:: + sputc(char_type __c) + { + int_type __ret; + if (_M_out_buf_size()) + { + *_M_out_cur = __c; + _M_out_cur_move(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + size_t __buf_len = _M_in_end - _M_in_cur; + if (__buf_len > 0) + { + size_t __remaining = __n - __ret; + size_t __len = min(__buf_len, __remaining); + traits_type::copy(__s, _M_in_cur, __len); + __ret += __len; + __s += __len; + _M_in_cur_move(__len); + } + + if (__ret < __n) + { + int_type __c = this->uflow(); + if (__c != traits_type::eof()) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + // Don't test against _M_buf + _M_buf_size, because _M_buf reflects + // allocated space, and on certain (rare but entirely legal) + // situations, there will be no allocated space yet the internal + // buffers will still be valid. (This happens if setp is used to set + // the internal buffer to say some externally-allocated sequence.) + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + off_type __buf_len = _M_out_buf_size(); + if (__buf_len > 0) + { + off_type __remaining = __n - __ret; + off_type __len = min(__buf_len, __remaining); + traits_type::copy(_M_out_cur, __s, __len); + __ret += __len; + __s += __len; + _M_out_cur_move(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (__c != traits_type::eof()) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + // Conceivably, this could be used to implement buffer-to-buffer + // copies, if this was ever desired in an un-ambiguous way by the + // standard. If so, then checks for __ios being zero would be + // necessary. + template + streamsize + __copy_streambufs(basic_ios<_CharT, _Traits>& __ios, + basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + typedef typename _Traits::int_type int_type; + + streamsize __ret = 0; + streamsize __bufsize = __sbin->in_avail(); + streamsize __xtrct; + bool __testput = __sbout->_M_mode & ios_base::out; + try { + while (__testput && __bufsize != -1) + { + __xtrct = __sbout->sputn(__sbin->gptr(), __bufsize); + __ret += __xtrct; + __sbin->_M_in_cur_move(__xtrct); + if (__xtrct == __bufsize) + { + int_type __c = __sbin->sgetc(); + if (__c == _Traits::eof()) + { + __ios.setstate(ios_base::eofbit); + break; + } + __bufsize = __sbin->in_avail(); + } + else + break; + } + } + catch(exception& __fail) { + if ((__ios.exceptions() & ios_base::failbit) != 0) + __throw_exception_again; + } + return __ret; + } +} // namespace std + +#endif // _CPP_BITS_STREAMBUF_TCC + diff --git a/contrib/media/updf/include/bits/stringfwd.h b/contrib/media/updf/include/bits/stringfwd.h new file mode 100644 index 0000000000..66bcace1ab --- /dev/null +++ b/contrib/media/updf/include/bits/stringfwd.h @@ -0,0 +1,68 @@ +// String support -*- C++ -*- + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 Strings library +// + +#ifndef _CPP_BITS_STRINGFWD_H +#define _CPP_BITS_STRINGFWD_H 1 + +#pragma GCC system_header + +#include + +namespace std +{ + template + struct char_traits; + + template<> class char_traits; +#ifdef _GLIBCPP_USE_WCHAR_T + template<> class char_traits; +#endif + + template + class allocator; + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + + typedef basic_string string; +#ifdef _GLIBCPP_USE_WCHAR_T + typedef basic_string wstring; +#endif +} // namespace std + +#endif // _CPP_BITS_STRINGFWD_H + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/type_traits.h b/contrib/media/updf/include/bits/type_traits.h new file mode 100644 index 0000000000..70b3522f05 --- /dev/null +++ b/contrib/media/updf/include/bits/type_traits.h @@ -0,0 +1,314 @@ +/* + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _CPP_BITS_TYPE_TRAITS_H +#define _CPP_BITS_TYPE_TRAITS_H 1 + +#pragma GCC system_header + +#include + +/* +This header file provides a framework for allowing compile time dispatch +based on type attributes. This is useful when writing template code. +For example, when making a copy of an array of an unknown type, it helps +to know if the type has a trivial copy constructor or not, to help decide +if a memcpy can be used. + +The class template __type_traits provides a series of typedefs each of +which is either __true_type or __false_type. The argument to +__type_traits can be any type. The typedefs within this template will +attain their correct values by one of these means: + 1. The general instantiation contain conservative values which work + for all types. + 2. Specializations may be declared to make distinctions between types. + 3. Some compilers (such as the Silicon Graphics N32 and N64 compilers) + will automatically provide the appropriate specializations for all + types. + +EXAMPLE: + +//Copy an array of elements which have non-trivial copy constructors +template void + copy(_Tp* __source,_Tp* __destination,int __n,__false_type); +//Copy an array of elements which have trivial copy constructors. Use memcpy. +template void + copy(_Tp* __source,_Tp* __destination,int __n,__true_type); + +//Copy an array of any type by using the most efficient copy mechanism +template inline void copy(_Tp* __source,_Tp* __destination,int __n) { + copy(__source,__destination,__n, + typename __type_traits<_Tp>::has_trivial_copy_constructor()); +} +*/ + + +template struct _Bool {}; +typedef _Bool __true_type; +typedef _Bool __false_type; + +template +struct __type_traits { + typedef __true_type this_dummy_member_must_be_first; + /* Do not remove this member. It informs a compiler which + automatically specializes __type_traits that this + __type_traits template is special. It just makes sure that + things work if an implementation is using a template + called __type_traits for something unrelated. */ + + /* The following restrictions should be observed for the sake of + compilers which automatically produce type specific specializations + of this class: + - You may reorder the members below if you wish + - You may remove any of the members below if you wish + - You must not rename members without making the corresponding + name change in the compiler + - Members you add will be treated like regular members unless + you add the appropriate support in the compiler. */ + + + typedef __false_type has_trivial_default_constructor; + typedef __false_type has_trivial_copy_constructor; + typedef __false_type has_trivial_assignment_operator; + typedef __false_type has_trivial_destructor; + typedef __false_type is_POD_type; +}; + + +// Provide some specializations. + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +#ifdef _GLIBCPP_USE_LONG_LONG + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +#endif /* _GLIBCPP_USE_LONG_LONG */ + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template<> struct __type_traits { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +template +struct __type_traits<_Tp*> { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + + +// The following could be written in terms of numeric_limits. +// We're doing it separately to reduce the number of dependencies. + +template struct _Is_integer { + typedef __false_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +#ifdef _GLIBCPP_USE_LONG_LONG + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +template<> struct _Is_integer { + typedef __true_type _Integral; +}; + +#endif /* _GLIBCPP_USE_LONG_LONG */ + +template struct _Is_normal_iterator { + typedef __false_type _Normal; +}; + +// Forward declaration hack, should really include this from somewhere. +namespace std { + template class __normal_iterator; +}; + +template +struct _Is_normal_iterator< std::__normal_iterator<_Iterator, _Container> > { + typedef __true_type _Normal; +}; + +#endif /* _CPP_BITS_TYPE_TRAITS_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/bits/valarray_array.h b/contrib/media/updf/include/bits/valarray_array.h new file mode 100644 index 0000000000..741f646d2b --- /dev/null +++ b/contrib/media/updf/include/bits/valarray_array.h @@ -0,0 +1,577 @@ +// The template and inlines for the -*- C++ -*- internal _Array helper class. + +// Copyright (C) 1997-2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_ARRAY_H +#define _CPP_BITS_ARRAY_H 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include + +namespace std +{ + + // + // Helper functions on raw pointers + // + + // We get memory by the old fashion way + inline void* + __valarray_get_memory(size_t __n) + { return operator new(__n); } + + template + inline _Tp*__restrict__ + __valarray_get_storage(size_t __n) + { + return static_cast<_Tp*__restrict__> + (__valarray_get_memory(__n * sizeof(_Tp))); + } + + // Return memory to the system + inline void + __valarray_release_memory(void* __p) + { operator delete(__p); } + + // Turn a raw-memory into an array of _Tp filled with _Tp() + // This is required in 'valarray v(n);' + template + struct _Array_default_ctor + { + // Please note that this isn't exception safe. But + // valarrays aren't required to be exception safe. + inline static void + _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e) + { while (__b != __e) new(__b++) _Tp(); } + }; + + template + struct _Array_default_ctor<_Tp, true> + { + // For fundamental types, it suffices to say 'memset()' + inline static void + _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e) + { memset(__b, 0, (__e - __b)*sizeof(_Tp)); } + }; + + template + inline void + __valarray_default_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e) + { + _Array_default_ctor<_Tp, __is_fundamental<_Tp>::_M_type>:: + _S_do_it(__b, __e); + } + + // Turn a raw-memory into an array of _Tp filled with __t + // This is the required in valarray v(n, t). Also + // used in valarray<>::resize(). + template + struct _Array_init_ctor + { + // Please note that this isn't exception safe. But + // valarrays aren't required to be exception safe. + inline static void + _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t) + { while (__b != __e) new(__b++) _Tp(__t); } + }; + + template + struct _Array_init_ctor<_Tp, true> + { + inline static void + _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t) + { while (__b != __e) *__b++ = __t; } + }; + + template + inline void + __valarray_fill_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e, + const _Tp __t) + { + _Array_init_ctor<_Tp, __is_fundamental<_Tp>::_M_type>:: + _S_do_it(__b, __e, __t); + } + + // + // copy-construct raw array [__o, *) from plain array [__b, __e) + // We can't just say 'memcpy()' + // + template + struct _Array_copy_ctor + { + // Please note that this isn't exception safe. But + // valarrays aren't required to be exception safe. + inline static void + _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e, + _Tp* __restrict__ __o) + { while (__b != __e) new(__o++) _Tp(*__b++); } + }; + + template + struct _Array_copy_ctor<_Tp, true> + { + inline static void + _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e, + _Tp* __restrict__ __o) + { memcpy(__o, __b, (__e - __b)*sizeof(_Tp)); } + }; + + template + inline void + __valarray_copy_construct(const _Tp* __restrict__ __b, + const _Tp* __restrict__ __e, + _Tp* __restrict__ __o) + { + _Array_copy_ctor<_Tp, __is_fundamental<_Tp>::_M_type>:: + _S_do_it(__b, __e, __o); + } + + // copy-construct raw array [__o, *) from strided array __a[<__n : __s>] + template + inline void + __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n, + size_t __s, _Tp* __restrict__ __o) + { + if (__is_fundamental<_Tp>::_M_type) + while (__n--) { *__o++ = *__a; __a += __s; } + else + while (__n--) { new(__o++) _Tp(*__a); __a += __s; } + } + + // copy-construct raw array [__o, *) from indexed array __a[__i[<__n>]] + template + inline void + __valarray_copy_construct (const _Tp* __restrict__ __a, + const size_t* __restrict__ __i, + _Tp* __restrict__ __o, size_t __n) + { + if (__is_fundamental<_Tp>::_M_type) + while (__n--) *__o++ = __a[*__i++]; + else + while (__n--) new (__o++) _Tp(__a[*__i++]); + } + + // Do the necessary cleanup when we're done with arrays. + template + inline void + __valarray_destroy_elements(_Tp* __restrict__ __b, _Tp* __restrict__ __e) + { + if (!__is_fundamental<_Tp>::_M_type) + while (__b != __e) { __b->~_Tp(); ++__b; } + } + + // fill plain array __a[<__n>] with __t + template + void + __valarray_fill (_Tp* __restrict__ __a, size_t __n, const _Tp& __t) + { while (__n--) *__a++ = __t; } + + // fill strided array __a[<__n-1 : __s>] with __t + template + inline void + __valarray_fill (_Tp* __restrict__ __a, size_t __n, + size_t __s, const _Tp& __t) + { for (size_t __i=0; __i<__n; ++__i, __a+=__s) *__a = __t; } + + // fill indir ect array __a[__i[<__n>]] with __i + template + inline void + __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i, + size_t __n, const _Tp& __t) + { for (size_t __j=0; __j<__n; ++__j, ++__i) __a[*__i] = __t; } + + // copy plain array __a[<__n>] in __b[<__n>] + // For non-fundamental types, it is wrong to say 'memcpy()' + template + struct _Array_copier + { + inline static void + _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) + { while (__n--) *__b++ = *__a++; } + }; + + template + struct _Array_copier<_Tp, true> + { + inline static void + _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) + { memcpy (__b, __a, __n * sizeof (_Tp)); } + }; + + template + inline void + __valarray_copy (const _Tp* __restrict__ __a, size_t __n, + _Tp* __restrict__ __b) + { + _Array_copier<_Tp, __is_fundamental<_Tp>::_M_type>:: + _S_do_it(__a, __n, __b); + } + + // copy strided array __a[<__n : __s>] in plain __b[<__n>] + template + inline void + __valarray_copy (const _Tp* __restrict__ __a, size_t __n, size_t __s, + _Tp* __restrict__ __b) + { for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b = *__a; } + + // copy plain __a[<__n>] in strided __b[<__n : __s>] + template + inline void + __valarray_copy (const _Tp* __restrict__ __a, _Tp* __restrict__ __b, + size_t __n, size_t __s) + { for (size_t __i=0; __i<__n; ++__i, ++__a, __b+=__s) *__b = *__a; } + + // copy indexed __a[__i[<__n>]] in plain __b[<__n>] + template + inline void + __valarray_copy (const _Tp* __restrict__ __a, + const size_t* __restrict__ __i, + _Tp* __restrict__ __b, size_t __n) + { for (size_t __j=0; __j<__n; ++__j, ++__b, ++__i) *__b = __a[*__i]; } + + // copy plain __a[<__n>] in indexed __b[__i[<__n>]] + template + inline void + __valarray_copy (const _Tp* __restrict__ __a, size_t __n, + _Tp* __restrict__ __b, const size_t* __restrict__ __i) + { for (size_t __j=0; __j<__n; ++__j, ++__a, ++__i) __b[*__i] = *__a; } + + + // + // Compute the sum of elements in range [__f, __l) + // This is a naive algorithm. It suffers from cancelling. + // In the future try to specialize + // for _Tp = float, double, long double using a more accurate + // algorithm. + // + template + inline _Tp + __valarray_sum(const _Tp* __restrict__ __f, const _Tp* __restrict__ __l) + { + _Tp __r = _Tp(); + while (__f != __l) __r += *__f++; + return __r; + } + + // Compute the product of all elements in range [__f, __l) + template + inline _Tp + __valarray_product(const _Tp* __restrict__ __f, + const _Tp* __restrict__ __l) + { + _Tp __r = _Tp(1); + while (__f != __l) __r = __r * *__f++; + return __r; + } + + // Compute the min/max of an array-expression + template + inline typename _Ta::value_type + __valarray_min(const _Ta& __a) + { + size_t __s = __a.size(); + typedef typename _Ta::value_type _Value_type; + _Value_type __r = __s == 0 ? _Value_type() : __a[0]; + for (size_t __i = 1; __i < __s; ++__i) + { + _Value_type __t = __a[__i]; + if (__t < __r) + __r = __t; + } + return __r; + } + + template + inline typename _Ta::value_type + __valarray_max(const _Ta& __a) + { + size_t __s = __a.size(); + typedef typename _Ta::value_type _Value_type; + _Value_type __r = __s == 0 ? _Value_type() : __a[0]; + for (size_t __i = 1; __i < __s; ++__i) + { + _Value_type __t = __a[__i]; + if (__t > __r) + __r = __t; + } + return __r; + } + + // + // Helper class _Array, first layer of valarray abstraction. + // All operations on valarray should be forwarded to this class + // whenever possible. -- gdr + // + + template + struct _Array + { + explicit _Array (size_t); + explicit _Array (_Tp* const __restrict__); + explicit _Array (const valarray<_Tp>&); + _Array (const _Tp* __restrict__, size_t); + + _Tp* begin () const; + + _Tp* const __restrict__ _M_data; + }; + + template + inline void + __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t) + { __valarray_fill (__a._M_data, __n, __t); } + + template + inline void + __valarray_fill (_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t) + { __valarray_fill (__a._M_data, __n, __s, __t); } + + template + inline void + __valarray_fill (_Array<_Tp> __a, _Array __i, + size_t __n, const _Tp& __t) + { __valarray_fill (__a._M_data, __i._M_data, __n, __t); } + + template + inline void + __valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) + { __valarray_copy (__a._M_data, __n, __b._M_data); } + + template + inline void + __valarray_copy (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) + { __valarray_copy(__a._M_data, __n, __s, __b._M_data); } + + template + inline void + __valarray_copy (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) + { __valarray_copy (__a._M_data, __b._M_data, __n, __s); } + + template + inline void + __valarray_copy (_Array<_Tp> __a, _Array __i, + _Array<_Tp> __b, size_t __n) + { __valarray_copy (__a._M_data, __i._M_data, __b._M_data, __n); } + + template + inline void + __valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, + _Array __i) + { __valarray_copy (__a._M_data, __n, __b._M_data, __i._M_data); } + + template + inline + _Array<_Tp>::_Array (size_t __n) + : _M_data(__valarray_get_storage<_Tp>(__n)) + { __valarray_default_construct(_M_data, _M_data + __n); } + + template + inline + _Array<_Tp>::_Array (_Tp* const __restrict__ __p) : _M_data (__p) {} + + template + inline _Array<_Tp>::_Array (const valarray<_Tp>& __v) + : _M_data (__v._M_data) {} + + template + inline + _Array<_Tp>::_Array (const _Tp* __restrict__ __b, size_t __s) + : _M_data(__valarray_get_storage<_Tp>(__s)) + { __valarray_copy_construct(__b, __s, _M_data); } + + template + inline _Tp* + _Array<_Tp>::begin () const + { return _M_data; } + +#define _DEFINE_ARRAY_FUNCTION(_Op, _Name) \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, const _Tp& __t) \ +{ \ + for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) \ + *__p _Op##= __t; \ +} \ + \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \ +{ \ + _Tp* __p = __a._M_data; \ + for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) \ + *__p _Op##= *__q; \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, \ + const _Expr<_Dom,_Tp>& __e, size_t __n) \ +{ \ + _Tp* __p (__a._M_data); \ + for (size_t __i=0; __i<__n; ++__i, ++__p) *__p _Op##= __e[__i]; \ +} \ + \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, size_t __s, \ + _Array<_Tp> __b) \ +{ \ + _Tp* __q (__b._M_data); \ + for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) \ + *__p _Op##= *__q; \ +} \ + \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, _Array<_Tp> __b, \ + size_t __n, size_t __s) \ +{ \ + _Tp* __q (__b._M_data); \ + for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) \ + *__p _Op##= *__q; \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __s, \ + const _Expr<_Dom,_Tp>& __e, size_t __n) \ +{ \ + _Tp* __p (__a._M_data); \ + for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p _Op##= __e[__i]; \ +} \ + \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, _Array __i, \ + _Array<_Tp> __b, size_t __n) \ +{ \ + _Tp* __q (__b._M_data); \ + for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) \ + __a._M_data[*__j] _Op##= *__q; \ +} \ + \ +template \ +inline void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, \ + _Array<_Tp> __b, _Array __i) \ +{ \ + _Tp* __p (__a._M_data); \ + for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) \ + *__p _Op##= __b._M_data[*__j]; \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, _Array __i, \ + const _Expr<_Dom, _Tp>& __e, size_t __n) \ +{ \ + size_t* __j (__i._M_data); \ + for (size_t __k=0; __k<__n; ++__k, ++__j) \ + __a._M_data[*__j] _Op##= __e[__k]; \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, _Array __m, \ + _Array<_Tp> __b, size_t __n) \ +{ \ + bool* ok (__m._M_data); \ + _Tp* __p (__a._M_data); \ + for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { \ + while (! *ok) { \ + ++ok; \ + ++__p; \ + } \ + *__p _Op##= *__q; \ + } \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, \ + _Array<_Tp> __b, _Array __m) \ +{ \ + bool* ok (__m._M_data); \ + _Tp* __q (__b._M_data); \ + for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { \ + while (! *ok) { \ + ++ok; \ + ++__q; \ + } \ + *__p _Op##= *__q; \ + } \ +} \ + \ +template \ +void \ +_Array_augmented_##_Name (_Array<_Tp> __a, _Array __m, \ + const _Expr<_Dom, _Tp>& __e, size_t __n) \ +{ \ + bool* ok(__m._M_data); \ + _Tp* __p (__a._M_data); \ + for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { \ + while (! *ok) { \ + ++ok; \ + ++__p; \ + } \ + *__p _Op##= __e[__i]; \ + } \ +} + +_DEFINE_ARRAY_FUNCTION(+, plus) +_DEFINE_ARRAY_FUNCTION(-, minus) +_DEFINE_ARRAY_FUNCTION(*, multiplies) +_DEFINE_ARRAY_FUNCTION(/, divides) +_DEFINE_ARRAY_FUNCTION(%, modulus) +_DEFINE_ARRAY_FUNCTION(^, xor) +_DEFINE_ARRAY_FUNCTION(|, or) +_DEFINE_ARRAY_FUNCTION(&, and) +_DEFINE_ARRAY_FUNCTION(<<, shift_left) +_DEFINE_ARRAY_FUNCTION(>>, shift_right) + +#undef _DEFINE_VALARRAY_FUNCTION + +} // std:: + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +# include +#endif + +#endif /* _CPP_BITS_ARRAY_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/valarray_array.tcc b/contrib/media/updf/include/bits/valarray_array.tcc new file mode 100644 index 0000000000..ab77f4aca1 --- /dev/null +++ b/contrib/media/updf/include/bits/valarray_array.tcc @@ -0,0 +1,161 @@ +// The template and inlines for the -*- C++ -*- internal _Array helper class. + +// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_BITS_VALARRAY_ARRAY_TCC +#define _CPP_BITS_VALARRAY_ARRAY_TCC 1 + +namespace std +{ + +export template +void +__valarray_fill (_Array<_Tp> __a, size_t __n, _Array __m, const _Tp& __t) +{ + _Tp* __p = __a._M_data; + bool* __ok (__m._M_data); + for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) { + while (! *__ok) { + ++__ok; + ++__p; + } + *__p = __t; + } +} + +export template +void +__valarray_copy (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) +{ + _Tp* __p (__a._M_data); + bool* __ok (__m._M_data); + for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) { + while (! *__ok) { + ++__ok; + ++__p; + } + *__q = *__p; + } +} + +export template +void +__valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) +{ + _Tp* __q (__b._M_data); + bool* __ok (__m._M_data); + for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++__ok, ++__q) { + while (! *__ok) { + ++__ok; + ++__q; + } + *__q = *__p; + } +} + +export template +void +__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a) +{ + _Tp* __p (__a._M_data); + for (size_t __i=0; __i<__n; ++__i, ++__p) *__p = __e[__i]; +} + +export template +void +__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, + _Array<_Tp> __a, size_t __s) +{ + _Tp* __p (__a._M_data); + for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p = __e[__i]; +} + +export template +void +__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, + _Array<_Tp> __a, _Array __i) +{ + size_t* __j (__i._M_data); + for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] = __e[__k]; +} + +export template +void +__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, + _Array<_Tp> __a, _Array __m) +{ + bool* __ok (__m._M_data); + _Tp* __p (__a._M_data); + for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) { + while (! *__ok) { + ++__ok; + ++__p; + } + *__p = __e[__i]; + } +} + + +export template +void +__valarray_copy_construct (const _Expr<_Dom, _Tp>& __e, size_t __n, + _Array<_Tp> __a) +{ + _Tp* __p (__a._M_data); + for (size_t __i=0; __i<__n; ++__i, ++__p) new (__p) _Tp(__e[__i]); +} + + +export template +void +__valarray_copy_construct (_Array<_Tp> __a, _Array __m, + _Array<_Tp> __b, size_t __n) +{ + _Tp* __p (__a._M_data); + bool* __ok (__m._M_data); + for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) { + while (! *__ok) { + ++__ok; + ++__p; + } + new (__q) _Tp(*__p); + } +} + + + + +} // std:: + +#endif /* _CPP_BITS_VALARRAY_ARRAY_TCC */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/valarray_meta.h b/contrib/media/updf/include/bits/valarray_meta.h new file mode 100644 index 0000000000..392dc9b7eb --- /dev/null +++ b/contrib/media/updf/include/bits/valarray_meta.h @@ -0,0 +1,1070 @@ +// The template and inlines for the -*- C++ -*- internal _Meta class. + +// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Written by Gabriel Dos Reis + +#ifndef _CPP_VALARRAY_META_H +#define _CPP_VALARRAY_META_H 1 + +#pragma GCC system_header + +namespace std +{ + + // + // Implementing a loosened valarray return value is tricky. + // First we need to meet 26.3.1/3: we should not add more than + // two levels of template nesting. Therefore we resort to template + // template to "flatten" loosened return value types. + // At some point we use partial specialization to remove one level + // template nesting due to _Expr<> + // + + + // This class is NOT defined. It doesn't need to. + template class _Constant; + + // + // Unary function application closure. + // + template class _UnFunBase { + public: + typedef typename _Dom::value_type value_type; + typedef value_type _Vt; + + _UnFunBase (const _Dom& __e, _Vt __f(_Vt)) + : _M_expr(__e), _M_func(__f) {} + + _Vt operator[] (size_t __i) const { return _M_func(_M_expr[__i]); } + size_t size () const { return _M_expr.size(); } + + private: + const _Dom& _M_expr; + _Vt (*_M_func)(_Vt); + }; + + template class _Meta, class _Dom> + class _UnFunClos; + + template + struct _UnFunClos<_Expr,_Dom> : _UnFunBase<_Dom> { + typedef _UnFunBase<_Dom> _Base; + typedef typename _Base::value_type value_type; + + _UnFunClos (const _Dom& __e, value_type __f(value_type)) + : _Base (__e, __f) {} + }; + + template + struct _UnFunClos<_ValArray,_Tp> : _UnFunBase > { + typedef _UnFunBase > _Base; + typedef typename _Base::value_type value_type; + + _UnFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp)) + : _Base (__v, __f) {} + }; + + // + // Binary function application closure. + // + template class _Meta1, + template class Meta2, + class _Dom1, class _Dom2> class _BinFunClos; + + template class _BinFunBase { + public: + typedef typename _Dom1::value_type value_type; + typedef value_type _Vt; + + _BinFunBase (const _Dom1& __e1, const _Dom2& __e2, + _Vt __f (_Vt, _Vt)) + : _M_expr1 (__e1), _M_expr2 (__e2), _M_func (__f) {} + + value_type operator[] (size_t __i) const + { return _M_func (_M_expr1[__i], _M_expr2[__i]); } + size_t size () const { return _M_expr1.size (); } + + private: + const _Dom1& _M_expr1; + const _Dom2& _M_expr2; + _Vt (*_M_func)(_Vt, _Vt); + }; + + template class _BinFunBase1 { + public: + typedef typename _Dom::value_type value_type ; + typedef value_type _Vt; + + _BinFunBase1 (const _Vt& __c, const _Dom& __e, _Vt __f(_Vt, _Vt)) + : _M_expr1 (__c), _M_expr2 (__e), _M_func (__f) {} + + value_type operator[] (size_t __i) const + { return _M_func (_M_expr1, _M_expr2[__i]); } + size_t size () const { return _M_expr2.size (); } + + private: + const _Vt& _M_expr1; + const _Dom& _M_expr2; + _Vt (*_M_func)(_Vt, _Vt); + }; + + template class _BinFunBase2 { + public: + typedef typename _Dom::value_type value_type; + typedef value_type _Vt; + + _BinFunBase2 (const _Dom& __e, const _Vt& __c, _Vt __f(_Vt, _Vt)) + : _M_expr1 (__e), _M_expr2 (__c), _M_func (__f) {} + + value_type operator[] (size_t __i) const + { return _M_func (_M_expr1[__i], _M_expr2); } + size_t size () const { return _M_expr1.size (); } + + private: + const _Dom& _M_expr1; + const _Vt& _M_expr2; + _Vt (*_M_func)(_Vt, _Vt); + }; + + template + struct _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> : _BinFunBase<_Dom1,_Dom2> { + typedef _BinFunBase<_Dom1,_Dom2> _Base; + typedef typename _Base::value_type value_type; + typedef value_type _Tp; + + _BinFunClos (const _Dom1& __e1, const _Dom2& __e2, + _Tp __f(_Tp, _Tp)) + : _Base (__e1, __e2, __f) {} + }; + + template + struct _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> + : _BinFunBase, valarray<_Tp> > { + typedef _BinFunBase, valarray<_Tp> > _Base; + typedef _Tp value_type; + + _BinFunClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w, + _Tp __f(_Tp, _Tp)) + : _Base (__v, __w, __f) {} + }; + + template + struct _BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type> + : _BinFunBase<_Dom,valarray > { + typedef typename _Dom::value_type _Tp; + typedef _BinFunBase<_Dom,valarray<_Tp> > _Base; + typedef _Tp value_type; + + _BinFunClos (const _Dom& __e, const valarray<_Tp>& __v, + _Tp __f(_Tp, _Tp)) + : _Base (__e, __v, __f) {} + }; + + template + struct _BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom> + : _BinFunBase,_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _BinFunBase<_Dom,valarray<_Tp> > _Base; + typedef _Tp value_type; + + _BinFunClos (const valarray<_Tp>& __v, const _Dom& __e, + _Tp __f(_Tp, _Tp)) + : _Base (__v, __e, __f) {} + }; + + template + struct _BinFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type> + : _BinFunBase2<_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _Tp value_type; + typedef _BinFunBase2<_Dom> _Base; + + _BinFunClos (const _Dom& __e, const _Tp& __t, _Tp __f (_Tp, _Tp)) + : _Base (__e, __t, __f) {} + }; + + template + struct _BinFunClos<_Constant,_Expr,_Dom,typename _Dom::value_type> + : _BinFunBase1<_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _Tp value_type; + typedef _BinFunBase1<_Dom> _Base; + + _BinFunClos (const _Tp& __t, const _Dom& __e, _Tp __f (_Tp, _Tp)) + : _Base (__t, __e, __f) {} + }; + + template + struct _BinFunClos<_ValArray,_Constant,_Tp,_Tp> + : _BinFunBase2 > { + typedef _BinFunBase2 > _Base; + typedef _Tp value_type; + + _BinFunClos (const valarray<_Tp>& __v, const _Tp& __t, + _Tp __f(_Tp, _Tp)) + : _Base (__v, __t, __f) {} + }; + + template + struct _BinFunClos<_Constant,_ValArray,_Tp,_Tp> + : _BinFunBase1 > { + typedef _BinFunBase1 > _Base; + typedef _Tp value_type; + + _BinFunClos (const _Tp& __t, const valarray<_Tp>& __v, + _Tp __f (_Tp, _Tp)) + : _Base (__t, __v, __f) {} + }; + + // + // Apply function taking a value/const reference closure + // + + template class _FunBase { + public: + typedef typename _Dom::value_type value_type; + + _FunBase (const _Dom& __e, value_type __f(_Arg)) + : _M_expr (__e), _M_func (__f) {} + + value_type operator[] (size_t __i) const + { return _M_func (_M_expr[__i]); } + size_t size() const { return _M_expr.size ();} + + private: + const _Dom& _M_expr; + value_type (*_M_func)(_Arg); + }; + + template + struct _ValFunClos<_Expr,_Dom> + : _FunBase<_Dom, typename _Dom::value_type> { + typedef _FunBase<_Dom, typename _Dom::value_type> _Base; + typedef typename _Base::value_type value_type; + typedef value_type _Tp; + + _ValFunClos (const _Dom& __e, _Tp __f (_Tp)) : _Base (__e, __f) {} + }; + + template + struct _ValFunClos<_ValArray,_Tp> + : _FunBase, _Tp> { + typedef _FunBase, _Tp> _Base; + typedef _Tp value_type; + + _ValFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp)) + : _Base (__v, __f) {} + }; + + template + struct _RefFunClos<_Expr,_Dom> : + _FunBase<_Dom, const typename _Dom::value_type&> { + typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base; + typedef typename _Base::value_type value_type; + typedef value_type _Tp; + + _RefFunClos (const _Dom& __e, _Tp __f (const _Tp&)) + : _Base (__e, __f) {} + }; + + template + struct _RefFunClos<_ValArray,_Tp> + : _FunBase, const _Tp&> { + typedef _FunBase, const _Tp&> _Base; + typedef _Tp value_type; + + _RefFunClos (const valarray<_Tp>& __v, _Tp __f(const _Tp&)) + : _Base (__v, __f) {} + }; + + // + // Unary expression closure. + // + + template class _Oper, typename _Arg> + class _UnBase { + public: + typedef _Oper _Op; + typedef typename _Op::result_type value_type; + + _UnBase (const _Arg& __e) : _M_expr(__e) {} + value_type operator[] (size_t) const; + size_t size () const { return _M_expr.size (); } + + private: + const _Arg& _M_expr; + }; + + template class _Oper, typename _Arg> + inline typename _UnBase<_Oper, _Arg>::value_type + _UnBase<_Oper, _Arg>::operator[] (size_t __i) const + { return _Op() (_M_expr[__i]); } + + template class _Oper, class _Dom> + struct _UnClos<_Oper, _Expr, _Dom> : _UnBase<_Oper, _Dom> { + typedef _Dom _Arg; + typedef _UnBase<_Oper, _Dom> _Base; + typedef typename _Base::value_type value_type; + + _UnClos (const _Arg& __e) : _Base(__e) {} + }; + + template class _Oper, typename _Tp> + struct _UnClos<_Oper, _ValArray, _Tp> : _UnBase<_Oper, valarray<_Tp> > { + typedef valarray<_Tp> _Arg; + typedef _UnBase<_Oper, valarray<_Tp> > _Base; + typedef typename _Base::value_type value_type; + + _UnClos (const _Arg& __e) : _Base(__e) {} + }; + + + // + // Binary expression closure. + // + + template class _Oper, + typename _FirstArg, typename _SecondArg> + class _BinBase { + public: + typedef _Oper _Op; + typedef typename _Op::result_type value_type; + + _BinBase (const _FirstArg& __e1, const _SecondArg& __e2) + : _M_expr1 (__e1), _M_expr2 (__e2) {} + value_type operator[] (size_t) const; + size_t size () const { return _M_expr1.size (); } + + private: + const _FirstArg& _M_expr1; + const _SecondArg& _M_expr2; + }; + + template class _Oper, + typename _FirstArg, typename _SecondArg> + inline typename _BinBase<_Oper,_FirstArg,_SecondArg>::value_type + _BinBase<_Oper,_FirstArg,_SecondArg>::operator[] (size_t __i) const + { return _Op() (_M_expr1[__i], _M_expr2[__i]); } + + + template class _Oper, class _Clos> + class _BinBase2 { + public: + typedef typename _Clos::value_type _Vt; + typedef _Oper<_Vt> _Op; + typedef typename _Op::result_type value_type; + + _BinBase2 (const _Clos& __e, const _Vt& __t) + : _M_expr1 (__e), _M_expr2 (__t) {} + value_type operator[] (size_t) const; + size_t size () const { return _M_expr1.size (); } + + private: + const _Clos& _M_expr1; + const _Vt& _M_expr2; + }; + + template class _Oper, class _Clos> + inline typename _BinBase2<_Oper,_Clos>::value_type + _BinBase2<_Oper,_Clos>::operator[] (size_t __i) const + { return _Op() (_M_expr1[__i], _M_expr2); } + + + template class _Oper, class _Clos> + class _BinBase1 { + public: + typedef typename _Clos::value_type _Vt; + typedef _Oper<_Vt> _Op; + typedef typename _Op::result_type value_type; + + _BinBase1 (const _Vt& __t, const _Clos& __e) + : _M_expr1 (__t), _M_expr2 (__e) {} + value_type operator[] (size_t) const; + size_t size () const { return _M_expr2.size (); } + + private: + const _Vt& _M_expr1; + const _Clos& _M_expr2; + }; + + template class _Oper, class _Clos> + inline typename + _BinBase1<_Oper,_Clos>::value_type + _BinBase1<_Oper,_Clos>:: operator[] (size_t __i) const + { return _Op() (_M_expr1, _M_expr2[__i]); } + + + template class _Oper, class _Dom1, class _Dom2> + struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2> + : _BinBase<_Oper,_Dom1,_Dom2> { + typedef _BinBase<_Oper,_Dom1,_Dom2> _Base; + typedef typename _Base::value_type value_type; + + _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {} + }; + + template class _Oper, typename _Tp> + struct _BinClos<_Oper,_ValArray,_ValArray,_Tp,_Tp> + : _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > { + typedef _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > _Base; + typedef _Tp value_type; + + _BinClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w) + : _Base (__v, __w) {} + }; + + template class _Oper, class _Dom> + struct _BinClos<_Oper,_Expr,_ValArray,_Dom,typename _Dom::value_type> + : _BinBase<_Oper,_Dom,valarray > { + typedef typename _Dom::value_type _Tp; + typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base; + typedef typename _Base::value_type value_type; + + _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2) + : _Base (__e1, __e2) {} + }; + + template class _Oper, class _Dom> + struct _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom> + : _BinBase<_Oper,valarray,_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base; + typedef typename _Base::value_type value_type; + + _BinClos (const valarray<_Tp>& __e1, const _Dom& __e2) + : _Base (__e1, __e2) {} + }; + + template class _Oper, class _Dom> + struct _BinClos<_Oper,_Expr,_Constant,_Dom,typename _Dom::value_type> + : _BinBase2<_Oper,_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _BinBase2<_Oper,_Dom> _Base; + typedef typename _Base::value_type value_type; + + _BinClos (const _Dom& __e1, const _Tp& __e2) : _Base (__e1, __e2) {} + }; + + template class _Oper, class _Dom> + struct _BinClos<_Oper,_Constant,_Expr,typename _Dom::value_type,_Dom> + : _BinBase1<_Oper,_Dom> { + typedef typename _Dom::value_type _Tp; + typedef _BinBase1<_Oper,_Dom> _Base; + typedef typename _Base::value_type value_type; + + _BinClos (const _Tp& __e1, const _Dom& __e2) : _Base (__e1, __e2) {} + }; + + template class _Oper, typename _Tp> + struct _BinClos<_Oper,_ValArray,_Constant,_Tp,_Tp> + : _BinBase2<_Oper,valarray<_Tp> > { + typedef _BinBase2<_Oper,valarray<_Tp> > _Base; + typedef typename _Base::value_type value_type; + + _BinClos (const valarray<_Tp>& __v, const _Tp& __t) + : _Base (__v, __t) {} + }; + + template class _Oper, typename _Tp> + struct _BinClos<_Oper,_Constant,_ValArray,_Tp,_Tp> + : _BinBase1<_Oper,valarray<_Tp> > { + typedef _BinBase1<_Oper,valarray<_Tp> > _Base; + typedef typename _Base::value_type value_type; + + _BinClos (const _Tp& __t, const valarray<_Tp>& __v) + : _Base (__t, __v) {} + }; + + + // + // slice_array closure. + // + template class _SBase { + public: + typedef typename _Dom::value_type value_type; + + _SBase (const _Dom& __e, const slice& __s) + : _M_expr (__e), _M_slice (__s) {} + value_type operator[] (size_t __i) const + { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; } + size_t size() const { return _M_slice.size (); } + + private: + const _Dom& _M_expr; + const slice& _M_slice; + }; + + template class _SBase<_Array<_Tp> > { + public: + typedef _Tp value_type; + + _SBase (_Array<_Tp> __a, const slice& __s) + : _M_array (__a._M_data+__s.start()), _M_size (__s.size()), + _M_stride (__s.stride()) {} + value_type operator[] (size_t __i) const + { return _M_array._M_data[__i * _M_stride]; } + size_t size() const { return _M_size; } + + private: + const _Array<_Tp> _M_array; + const size_t _M_size; + const size_t _M_stride; + }; + + template struct _SClos<_Expr,_Dom> : _SBase<_Dom> { + typedef _SBase<_Dom> _Base; + typedef typename _Base::value_type value_type; + + _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {} + }; + + template + struct _SClos<_ValArray,_Tp> : _SBase<_Array<_Tp> > { + typedef _SBase<_Array<_Tp> > _Base; + typedef _Tp value_type; + + _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} + }; + + // + // gslice_array closure. + // + template class _GBase { + public: + typedef typename _Dom::value_type value_type; + + _GBase (const _Dom& __e, const valarray& __i) + : _M_expr (__e), _M_index(__i) {} + value_type operator[] (size_t __i) const + { return _M_expr[_M_index[__i]]; } + size_t size () const { return _M_index.size(); } + + private: + const _Dom& _M_expr; + const valarray& _M_index; + }; + + template class _GBase<_Array<_Tp> > { + public: + typedef _Tp value_type; + + _GBase (_Array<_Tp> __a, const valarray& __i) + : _M_array (__a), _M_index(__i) {} + value_type operator[] (size_t __i) const + { return _M_array._M_data[_M_index[__i]]; } + size_t size () const { return _M_index.size(); } + + private: + const _Array<_Tp> _M_array; + const valarray& _M_index; + }; + + template struct _GClos<_Expr,_Dom> : _GBase<_Dom> { + typedef _GBase<_Dom> _Base; + typedef typename _Base::value_type value_type; + + _GClos (const _Dom& __e, const valarray& __i) + : _Base (__e, __i) {} + }; + + template + struct _GClos<_ValArray,_Tp> : _GBase<_Array<_Tp> > { + typedef _GBase<_Array<_Tp> > _Base; + typedef typename _Base::value_type value_type; + + _GClos (_Array<_Tp> __a, const valarray& __i) + : _Base (__a, __i) {} + }; + + // + // indirect_array closure + // + + template class _IBase { + public: + typedef typename _Dom::value_type value_type; + + _IBase (const _Dom& __e, const valarray& __i) + : _M_expr (__e), _M_index (__i) {} + value_type operator[] (size_t __i) const + { return _M_expr[_M_index[__i]]; } + size_t size() const { return _M_index.size(); } + + private: + const _Dom& _M_expr; + const valarray& _M_index; + }; + + template struct _IClos<_Expr,_Dom> : _IBase<_Dom> { + typedef _IBase<_Dom> _Base; + typedef typename _Base::value_type value_type; + + _IClos (const _Dom& __e, const valarray& __i) + : _Base (__e, __i) {} + }; + + template + struct _IClos<_ValArray,_Tp> : _IBase > { + typedef _IBase > _Base; + typedef _Tp value_type; + + _IClos (const valarray<_Tp>& __a, const valarray& __i) + : _Base (__a, __i) {} + }; + + // + // class _Expr + // + template class _Expr { + public: + typedef _Tp value_type; + + _Expr (const _Clos&); + + const _Clos& operator() () const; + + value_type operator[] (size_t) const; + valarray operator[] (slice) const; + valarray operator[] (const gslice&) const; + valarray operator[] (const valarray&) const; + valarray operator[] (const valarray&) const; + + _Expr<_UnClos<_Unary_plus,_Expr,_Clos>, value_type> + operator+ () const; + + _Expr<_UnClos, value_type> + operator- () const; + + _Expr<_UnClos<_Bitwise_not,_Expr,_Clos>, value_type> + operator~ () const; + + _Expr<_UnClos, bool> + operator! () const; + + size_t size () const; + value_type sum () const; + + valarray shift (int) const; + valarray cshift (int) const; + + value_type min() const; + value_type max() const; + + valarray apply(value_type (*) (const value_type&)) const; + valarray apply(value_type (*) (value_type)) const; + + private: + const _Clos _M_closure; + }; + + template + inline + _Expr<_Clos,_Tp>::_Expr (const _Clos& __c) : _M_closure(__c) {} + + template + inline const _Clos& + _Expr<_Clos,_Tp>::operator() () const + { return _M_closure; } + + template + inline _Tp + _Expr<_Clos,_Tp>::operator[] (size_t __i) const + { return _M_closure[__i]; } + + template + inline valarray<_Tp> + _Expr<_Clos,_Tp>::operator[] (slice __s) const + { return _M_closure[__s]; } + + template + inline valarray<_Tp> + _Expr<_Clos,_Tp>::operator[] (const gslice& __gs) const + { return _M_closure[__gs]; } + + template + inline valarray<_Tp> + _Expr<_Clos,_Tp>::operator[] (const valarray& __m) const + { return _M_closure[__m]; } + + template + inline valarray<_Tp> + _Expr<_Clos,_Tp>::operator[] (const valarray& __i) const + { return _M_closure[__i]; } + + template + inline size_t + _Expr<_Clos,_Tp>::size () const { return _M_closure.size (); } + + template + inline valarray<_Tp> + _Expr<_Clos, _Tp>::shift(int __n) const + { return valarray<_Tp>(_M_closure).shift(__n); } + + template + inline valarray<_Tp> + _Expr<_Clos, _Tp>::cshift(int __n) const + { return valarray<_Tp>(_M_closure).cshift(__n); } + + template + inline valarray<_Tp> + _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const + { return valarray<_Tp>(_M_closure).apply(__f); } + + template + inline valarray<_Tp> + _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const + { return valarray<_Tp>(_M_closure).apply(__f); } + + // XXX: replace this with a more robust summation algorithm. + template + inline _Tp + _Expr<_Clos,_Tp>::sum () const + { + size_t __n = _M_closure.size(); + if (__n == 0) return _Tp(); + else { + _Tp __s = _M_closure[--__n]; + while (__n != 0) __s += _M_closure[--__n]; + return __s; + } + } + + template + inline _Tp + _Expr<_Clos, _Tp>::min() const + { return __valarray_min(_M_closure); } + + template + inline _Tp + _Expr<_Clos, _Tp>::max() const + { return __valarray_max(_M_closure); } + + template + inline _Expr<_UnClos, bool> + _Expr<_Dom,_Tp>::operator! () const + { + typedef _UnClos _Closure; + return _Expr<_Closure,_Tp> (_Closure(this->_M_closure)); + } + +#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \ +template \ +inline _Expr<_UnClos<_Name,_Expr,_Dom>,_Tp> \ +_Expr<_Dom,_Tp>::operator _Op () const \ +{ \ + typedef _UnClos<_Name,_Expr,_Dom> _Closure; \ + return _Expr<_Closure,_Tp> (_Closure (this->_M_closure)); \ +} + + _DEFINE_EXPR_UNARY_OPERATOR(+, _Unary_plus) + _DEFINE_EXPR_UNARY_OPERATOR(-, negate) + _DEFINE_EXPR_UNARY_OPERATOR(~, _Bitwise_not) + +#undef _DEFINE_EXPR_UNARY_OPERATOR + + +#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, \ + typename _Name::result_type> \ +operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ + const _Expr<_Dom2,typename _Dom2::value_type>& __w) \ +{ \ + typedef typename _Dom1::value_type _Arg; \ + typedef typename _Name<_Arg>::result_type _Value; \ + typedef _BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2> _Closure; \ + return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \ + typename _Name::result_type> \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ + const typename _Dom::value_type& __t) \ +{ \ + typedef typename _Dom::value_type _Arg; \ + typedef typename _Name<_Arg>::result_type _Value; \ + typedef _BinClos<_Name,_Expr,_Constant,_Dom,_Arg> _Closure; \ + return _Expr<_Closure,_Value> (_Closure (__v (), __t)); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \ + typename _Name::result_type> \ +operator _Op (const typename _Dom::value_type& __t, \ + const _Expr<_Dom,typename _Dom::value_type>& __v) \ +{ \ + typedef typename _Dom::value_type _Arg; \ + typedef typename _Name<_Arg>::result_type _Value; \ + typedef _BinClos<_Name,_Constant,_Expr,_Arg,_Dom> _Closure; \ + return _Expr<_Closure,_Value> (_Closure (__t, __v ())); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \ + typename _Name::result_type> \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ + const valarray& __v) \ +{ \ + typedef typename _Dom::value_type _Arg; \ + typedef typename _Name<_Arg>::result_type _Value; \ + typedef _BinClos<_Name,_Expr,_ValArray,_Dom,_Arg> _Closure; \ + return _Expr<_Closure,_Value> (_Closure (__e (), __v)); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \ + typename _Name::result_type> \ +operator _Op (const valarray& __v, \ + const _Expr<_Dom,typename _Dom::value_type>& __e) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef typename _Name<_Tp>::result_type _Value; \ + typedef _BinClos<_Name,_ValArray,_Expr,_Tp,_Dom> _Closure; \ + return _Expr<_Closure,_Value> (_Closure (__v, __e ())); \ +} + + _DEFINE_EXPR_BINARY_OPERATOR(+, plus) + _DEFINE_EXPR_BINARY_OPERATOR(-, minus) + _DEFINE_EXPR_BINARY_OPERATOR(*, multiplies) + _DEFINE_EXPR_BINARY_OPERATOR(/, divides) + _DEFINE_EXPR_BINARY_OPERATOR(%, modulus) + _DEFINE_EXPR_BINARY_OPERATOR(^, _Bitwise_xor) + _DEFINE_EXPR_BINARY_OPERATOR(&, _Bitwise_and) + _DEFINE_EXPR_BINARY_OPERATOR(|, _Bitwise_or) + _DEFINE_EXPR_BINARY_OPERATOR(<<, _Shift_left) + _DEFINE_EXPR_BINARY_OPERATOR(>>, _Shift_right) + +#undef _DEFINE_EXPR_BINARY_OPERATOR + +#define _DEFINE_EXPR_RELATIONAL_OPERATOR(_Op, _Name) \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, bool> \ +operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ + const _Expr<_Dom2,typename _Dom2::value_type>& __w) \ +{ \ + typedef typename _Dom1::value_type _Arg; \ + typedef _BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2> _Closure; \ + return _Expr<_Closure,bool> (_Closure (__v (), __w ())); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \ + bool> \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ + const typename _Dom::value_type& __t) \ +{ \ + typedef typename _Dom::value_type _Arg; \ + typedef _BinClos<_Name,_Expr,_Constant,_Dom,_Arg> _Closure; \ + return _Expr<_Closure,bool> (_Closure (__v (), __t)); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \ + bool> \ +operator _Op (const typename _Dom::value_type& __t, \ + const _Expr<_Dom,typename _Dom::value_type>& __v) \ +{ \ + typedef typename _Dom::value_type _Arg; \ + typedef _BinClos<_Name,_Constant,_Expr,_Arg,_Dom> _Closure; \ + return _Expr<_Closure,bool> (_Closure (__t, __v ())); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \ + bool> \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ + const valarray& __v) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinClos<_Name,_Expr,_ValArray,_Dom,_Tp> _Closure; \ + return _Expr<_Closure,bool> (_Closure (__e (), __v)); \ +} \ + \ +template \ +inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \ + bool> \ +operator _Op (const valarray& __v, \ + const _Expr<_Dom,typename _Dom::value_type>& __e) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinClos<_Name,_ValArray,_Expr,_Tp,_Dom> _Closure; \ + return _Expr<_Closure,bool> (_Closure (__v, __e ())); \ +} + + _DEFINE_EXPR_RELATIONAL_OPERATOR(&&, logical_and) + _DEFINE_EXPR_RELATIONAL_OPERATOR(||, logical_or) + _DEFINE_EXPR_RELATIONAL_OPERATOR(==, equal_to) + _DEFINE_EXPR_RELATIONAL_OPERATOR(!=, not_equal_to) + _DEFINE_EXPR_RELATIONAL_OPERATOR(<, less) + _DEFINE_EXPR_RELATIONAL_OPERATOR(>, greater) + _DEFINE_EXPR_RELATIONAL_OPERATOR(<=, less_equal) + _DEFINE_EXPR_RELATIONAL_OPERATOR(>=, greater_equal) + +#undef _DEFINE_EXPR_RELATIONAL_OPERATOR + + + +#define _DEFINE_EXPR_UNARY_FUNCTION(_Name) \ +template \ +inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> \ +_Name(const _Expr<_Dom,typename _Dom::value_type>& __e) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _UnFunClos<_Expr,_Dom> _Closure; \ + return _Expr<_Closure,_Tp>(_Closure(__e(), (_Tp(*)(_Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> \ +_Name(const valarray<_Tp>& __v) \ +{ \ + typedef _UnFunClos<_ValArray,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(&_Name))); \ +} + + + _DEFINE_EXPR_UNARY_FUNCTION(abs) + _DEFINE_EXPR_UNARY_FUNCTION(cos) + _DEFINE_EXPR_UNARY_FUNCTION(acos) + _DEFINE_EXPR_UNARY_FUNCTION(cosh) + _DEFINE_EXPR_UNARY_FUNCTION(sin) + _DEFINE_EXPR_UNARY_FUNCTION(asin) + _DEFINE_EXPR_UNARY_FUNCTION(sinh) + _DEFINE_EXPR_UNARY_FUNCTION(tan) + _DEFINE_EXPR_UNARY_FUNCTION(tanh) + _DEFINE_EXPR_UNARY_FUNCTION(atan) + _DEFINE_EXPR_UNARY_FUNCTION(exp) + _DEFINE_EXPR_UNARY_FUNCTION(log) + _DEFINE_EXPR_UNARY_FUNCTION(log10) + _DEFINE_EXPR_UNARY_FUNCTION(sqrt) + +#undef _DEFINE_EXPR_UNARY_FUNCTION + + +#define _DEFINE_EXPR_BINARY_FUNCTION(_Name) \ +template \ +inline _Expr<_BinFunClos<_Expr,_Expr,_Dom1,_Dom2>,typename _Dom1::value_type>\ +_Name (const _Expr<_Dom1,typename _Dom1::value_type>& __e1, \ + const _Expr<_Dom2,typename _Dom2::value_type>& __e2) \ +{ \ + typedef typename _Dom1::value_type _Tp; \ + typedef _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__e1 (), __e2 (), (_Tp(*)(_Tp, _Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type>, \ + typename _Dom::value_type> \ +_Name (const _Expr<_Dom,typename _Dom::value_type>& __e, \ + const valarray& __v) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinFunClos<_Expr,_ValArray,_Dom,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__e (), __v, (_Tp(*)(_Tp, _Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom>, \ + typename _Dom::value_type> \ +_Name (const valarray& __v, \ + const _Expr<_Dom,typename _Dom::value_type>& __e) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinFunClos<_ValArray,_Expr,_Tp,_Dom> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__v, __e (), (_Tp(*)(_Tp, _Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type>, \ + typename _Dom::value_type> \ +_Name (const _Expr<_Dom, typename _Dom::value_type>& __e, \ + const typename _Dom::value_type& __t) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinFunClos<_Expr,_Constant,_Dom,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__e (), __t, (_Tp(*)(_Tp, _Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_Constant,_Expr,typename _Dom::value_type,_Dom>, \ + typename _Dom::value_type> \ +_Name (const typename _Dom::value_type& __t, \ + const _Expr<_Dom,typename _Dom::value_type>& __e) \ +{ \ + typedef typename _Dom::value_type _Tp; \ + typedef _BinFunClos<_Constant,_Expr,_Tp,_Dom> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__t, __e (), (_Tp(*)(_Tp, _Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_ValArray,_ValArray,_Tp,_Tp>, _Tp> \ +_Name (const valarray<_Tp>& __v, const valarray<_Tp>& __w) \ +{ \ + typedef _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__v, __w, (_Tp(*)(_Tp,_Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_ValArray,_Constant,_Tp,_Tp>,_Tp> \ +_Name (const valarray<_Tp>& __v, const _Tp& __t) \ +{ \ + typedef _BinFunClos<_ValArray,_Constant,_Tp,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__v, __t, (_Tp(*)(_Tp,_Tp))(&_Name))); \ +} \ + \ +template \ +inline _Expr<_BinFunClos<_Constant,_ValArray,_Tp,_Tp>,_Tp> \ +_Name (const _Tp& __t, const valarray<_Tp>& __v) \ +{ \ + typedef _BinFunClos<_Constant,_ValArray,_Tp,_Tp> _Closure; \ + return _Expr<_Closure,_Tp> \ + (_Closure (__t, __v, (_Tp(*)(_Tp,_Tp))(&_Name))); \ +} + +_DEFINE_EXPR_BINARY_FUNCTION(atan2) +_DEFINE_EXPR_BINARY_FUNCTION(pow) + +#undef _DEFINE_EXPR_BINARY_FUNCTION + +} // std:: + + +#endif /* _CPP_VALARRAY_META_H */ + +// Local Variables: +// mode:c++ +// End: diff --git a/contrib/media/updf/include/bits/wchar.h b/contrib/media/updf/include/bits/wchar.h new file mode 100644 index 0000000000..442a4621e4 --- /dev/null +++ b/contrib/media/updf/include/bits/wchar.h @@ -0,0 +1,26 @@ +/* wchar_t type related definitions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _BITS_WCHAR_H +#define _BITS_WCHAR_H 1 + +#define __WCHAR_MIN (-2147483647l - 1l) +#define __WCHAR_MAX (2147483647l) + +#endif /* bits/wchar.h */ diff --git a/contrib/media/updf/include/bits/wordsize.h b/contrib/media/updf/include/bits/wordsize.h new file mode 100644 index 0000000000..ba643b60a2 --- /dev/null +++ b/contrib/media/updf/include/bits/wordsize.h @@ -0,0 +1,19 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define __WORDSIZE 32 diff --git a/contrib/media/updf/include/bitset b/contrib/media/updf/include/bitset new file mode 100644 index 0000000000..9ce6c7962d --- /dev/null +++ b/contrib/media/updf/include/bitset @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BITSET +#include +#endif diff --git a/contrib/media/updf/include/c_std/bits/cmath.tcc b/contrib/media/updf/include/c_std/bits/cmath.tcc new file mode 100644 index 0000000000..9b86bbb9da --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/cmath.tcc @@ -0,0 +1,54 @@ +// -*- C++ -*- C math library. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// This file was written by Gabriel Dos Reis + +#ifndef _CPP_BITS_CMATH_TCC +#define _CPP_BITS_CMATH_TCC 1 + +namespace std +{ + export template + _Tp + __cmath_power(_Tp __x, unsigned int __n) + { + _Tp __y = __n % 2 ? __x : 1; + + while (__n >>= 1) + { + __x = __x * __x; + if (__n % 2) + __y = __y * __x; + } + + return __y; + } +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cassert.h b/contrib/media/updf/include/c_std/bits/std_cassert.h new file mode 100644 index 0000000000..533f2e2396 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cassert.h @@ -0,0 +1,47 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 19.2 Assertions +// + +// No include guards on this header... + +#pragma GCC system_header +#include_next + + + + + + + + + + diff --git a/contrib/media/updf/include/c_std/bits/std_cctype.h b/contrib/media/updf/include/c_std/bits/std_cctype.h new file mode 100644 index 0000000000..aa120b00bc --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cctype.h @@ -0,0 +1,72 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: +// + +#ifndef _CPP_CCTYPE +#define _CPP_CCTYPE 1 + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef isalnum +#undef isalpha +#undef iscntrl +#undef isdigit +#undef isgraph +#undef islower +#undef isprint +#undef ispunct +#undef isspace +#undef isupper +#undef isxdigit +#undef tolower +#undef toupper + +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cerrno.h b/contrib/media/updf/include/c_std/bits/std_cerrno.h new file mode 100644 index 0000000000..cb5a94f476 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cerrno.h @@ -0,0 +1,45 @@ +// The -*- C++ -*- error number header. + +// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 19.3 Error numbers +// + +#ifndef _CPP_CERRNO +#define _CPP_CERRNO 1 + +#pragma GCC system_header +#include_next + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef errno +#define errno errno +#endif + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cfloat.h b/contrib/media/updf/include/c_std/bits/std_cfloat.h new file mode 100644 index 0000000000..0dfdd2eaf5 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cfloat.h @@ -0,0 +1,40 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CFLOAT +#define _CPP_CFLOAT 1 + +#pragma GCC system_header +#include_next + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_climits.h b/contrib/media/updf/include/c_std/bits/std_climits.h new file mode 100644 index 0000000000..1eb8c0bb27 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_climits.h @@ -0,0 +1,40 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLIMITS +#define _CPP_CLIMITS 1 + +#pragma GCC system_header +#include_next + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_clocale.h b/contrib/media/updf/include/c_std/bits/std_clocale.h new file mode 100644 index 0000000000..eace7a0019 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_clocale.h @@ -0,0 +1,51 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLOCALE +#define _CPP_CLOCALE 1 + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef setlocale +#undef localeconv + +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cmath.h b/contrib/media/updf/include/c_std/bits/std_cmath.h new file mode 100644 index 0000000000..d43256c153 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cmath.h @@ -0,0 +1,656 @@ +// -*- C++ -*- C math library. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.5 C library +// + +#ifndef _CPP_CMATH +#define _CPP_CMATH 1 + +#include + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef abs +#undef div +#undef acos +#undef asin +#undef atan +#undef atan2 +#undef ceil +#undef cos +#undef cosh +#undef exp +#undef fabs +#undef floor +#undef fmod +#undef frexp +#undef ldexp +#undef log +#undef log10 +#undef modf +#undef pow +#undef sin +#undef sinh +#undef sqrt +#undef tan +#undef tanh + +namespace std +{ + // Forward declaration of a helper function. This really should be + // an `exported' forward declaration. + template _Tp __cmath_power(_Tp, unsigned int); + + template + inline _Tp + __cmath_abs(_Tp __x) + { + return __x < _Tp() ? -__x : __x; + } + + inline float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline double + abs(double __x) + { return __builtin_fabs(__x); } + + inline long double + abs(long double __x) + { return __builtin_fabsl(__x); } + +#if _GLIBCPP_HAVE_ACOSF + inline float + acos(float __x) { return ::acosf(__x); } +#else + inline float + acos(float __x) { return ::acos(static_cast(__x)); } +#endif + + using ::acos; + +#if _GLIBCPP_HAVE_ACOSL + inline long double + acos(long double __x) { return ::acosl(__x); } +#else + inline long double + acos(long double __x) { return ::acos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ASINF + inline float + asin(float __x) { return ::asinf(__x); } +#else + inline float + asin(float __x) { return ::asin(static_cast(__x)); } +#endif + + using ::asin; + +#if _GLIBCPP_HAVE_ASINL + inline long double + asin(long double __x) { return ::asinl(__x); } +#else + inline long double + asin(long double __x) { return ::asin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATANF + inline float + atan(float __x) { return ::atanf(__x); } +#else + inline float + atan(float __x) { return ::atan(static_cast(__x)); } +#endif + + using ::atan; + +#if _GLIBCPP_HAVE_ATANL + inline long double + atan(long double __x) { return ::atanl(__x); } +#else + inline long double + atan(long double __x) { return ::atan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATAN2F + inline float + atan2(float __y, float __x) { return ::atan2f(__y, __x); } +#else + inline float + atan2(float __y, float __x) + { return ::atan2(static_cast(__y), static_cast(__x)); } +#endif + + using ::atan2; + +#if _GLIBCPP_HAVE_ATAN2L + inline long double + atan2(long double __y, long double __x) { return ::atan2l(__y, __x); } +#else + inline long double + atan2(long double __y, long double __x) + { return ::atan2(static_cast(__y), static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_CEILF + inline float + ceil(float __x) { return ::ceilf(__x); } +#else + inline float + ceil(float __x) { return ::ceil(static_cast(__x)); } +#endif + + using ::ceil; + +#if _GLIBCPP_HAVE_CEILL + inline long double + ceil(long double __x) { return ::ceill(__x); } +#else + inline long double + ceil(long double __x) { return ::ceil(static_cast(__x)); } +#endif + + inline float + cos(float __x) + { return __builtin_cosf(__x); } + + using ::cos; + + inline long double + cos(long double __x) + { return __builtin_cosl(__x); } + +#if _GLIBCPP_HAVE_COSHF + inline float + cosh(float __x) { return ::coshf(__x); } +#else + inline float + cosh(float __x) { return ::cosh(static_cast(__x)); } +#endif + + using ::cosh; + +#if _GLIBCPP_HAVE_COSHL + inline long double + cosh(long double __x) { return ::coshl(__x); } +#else + inline long double + cosh(long double __x) { return ::cosh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_EXPF + inline float + exp(float __x) { return ::expf(__x); } +#else + inline float + exp(float __x) { return ::exp(static_cast(__x)); } +#endif + + using ::exp; + +#if _GLIBCPP_HAVE_EXPL + inline long double + exp(long double __x) { return ::expl(__x); } +#else + inline long double + exp(long double __x) { return ::exp(static_cast(__x)); } +#endif + + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + + using ::fabs; + + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + +#if _GLIBCPP_HAVE_FLOORF + inline float + floor(float __x) { return ::floorf(__x); } +#else + inline float + floor(float __x) { return ::floor(static_cast(__x)); } +#endif + + using ::floor; + +#if _GLIBCPP_HAVE_FLOORL + inline long double + floor(long double __x) { return ::floorl(__x); } +#else + inline long double + floor(long double __x) { return ::floor(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FMODF + inline float + fmod(float __x, float __y) { return ::fmodf(__x, __y); } +#else + inline float + fmod(float __x, float __y) + { return ::fmod(static_cast(__x), static_cast(__y)); } +#endif + + using ::fmod; + +#if _GLIBCPP_HAVE_FMODL + inline long double + fmod(long double __x, long double __y) { return ::fmodl(__x, __y); } +#else + inline long double + fmod(long double __x, long double __y) + { return ::fmod(static_cast(__x), static_cast(__y)); } +#endif + +#if _GLIBCPP_HAVE_FREXPF + inline float + frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); } +#else + inline float + frexp(float __x, int* __exp) { return ::frexp(__x, __exp); } +#endif + + using ::frexp; + +#if _GLIBCPP_HAVE_FREXPL + inline long double + frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); } +#else + inline long double + frexp(long double __x, int* __exp) + { return ::frexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LDEXPF + inline float + ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); } +#else + inline float + ldexp(float __x, int __exp) + { return ::ldexp(static_cast(__x), __exp); } +#endif + + using ::ldexp; + +#if _GLIBCPP_HAVE_LDEXPL + inline long double + ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); } +#else + inline long double + ldexp(long double __x, int __exp) + { return ::ldexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LOGF + inline float + log(float __x) { return ::logf(__x); } +#else + inline float log(float __x) + { return ::log(static_cast(__x)); } +#endif + + using ::log; + +#if _GLIBCPP_HAVE_LOGL + inline long double + log(long double __x) { return ::logl(__x); } +#else + inline long double + log(long double __x) { return ::log(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_LOG10F + inline float + log10(float __x) { return ::log10f(__x); } +#else + inline float + log10(float __x) { return ::log10(static_cast(__x)); } +#endif + + using ::log10; + +#if _GLIBCPP_HAVE_LOG10L + inline long double + log10(long double __x) { return ::log10l(__x); } +#else + inline long double + log10(long double __x) { return ::log10(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_MODFF + inline float + modf(float __x, float* __iptr) { return ::modff(__x, __iptr); } +#else + inline float + modf(float __x, float* __iptr) + { + double __tmp; + double __res = ::modf(static_cast(__x), &__tmp); + *__iptr = static_cast(__tmp); + return __res; + } +#endif + + using ::modf; + +#if _GLIBCPP_HAVE_MODFL + inline long double + modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); } +#else + inline long double + modf(long double __x, long double* __iptr) + { + double __tmp; + double __res = ::modf(static_cast(__x), &__tmp); + * __iptr = static_cast(__tmp); + return __res; + } +#endif + + template + inline _Tp + __pow_helper(_Tp __x, int __n) + { + return __n < 0 + ? _Tp(1)/__cmath_power(__x, -__n) + : __cmath_power(__x, __n); + } + +#if _GLIBCPP_HAVE_POWF + inline float + pow(float __x, float __y) { return ::powf(__x, __y); } +#else + inline float + pow(float __x, float __y) + { return ::pow(static_cast(__x), static_cast(__y)); } +#endif + + using ::pow; + +#if _GLIBCPP_HAVE_POWL + inline long double + pow(long double __x, long double __y) { return ::powl(__x, __y); } +#else + inline long double + pow(long double __x, long double __y) + { return ::pow(static_cast(__x), static_cast(__y)); } +#endif + + inline float + pow(float __x, int __n) + { return __pow_helper(__x, __n); } + + inline double + pow(double __x, int __i) + { return __pow_helper(__x, __i); } + + inline long double + pow(long double __x, int __n) + { return __pow_helper(__x, __n); } + + inline float + sin(float __x) + { return __builtin_sinf(__x); } + + using ::sin; + + inline long double + sin(long double __x) + { return __builtin_sinl(__x); } + +#if _GLIBCPP_HAVE_SINHF + inline float + sinh(float __x) { return ::sinhf(__x); } +#else + inline float + sinh(float __x) { return ::sinh(static_cast(__x)); } +#endif + + using ::sinh; + +#if _GLIBCPP_HAVE_SINHL + inline long double + sinh(long double __x) { return ::sinhl(__x); } +#else + inline long double + sinh(long double __x) { return ::sinh(static_cast(__x)); } +#endif + + inline float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + using ::sqrt; + + inline long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + +#if _GLIBCPP_HAVE_TANF + inline float + tan(float __x) { return ::tanf(__x); } +#else + inline float + tan(float __x) { return ::tan(static_cast(__x)); } +#endif + + using ::tan; + +#if _GLIBCPP_HAVE_TANL + inline long double + tan(long double __x) { return ::tanl(__x); } +#else + inline long double + tan(long double __x) { return ::tan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANHF + inline float + tanh(float __x) { return ::tanhf(__x); } +#else + inline float + tanh(float __x) { return ::tanh(static_cast(__x)); } +#endif + + using ::tanh; + +#if _GLIBCPP_HAVE_TANHL + inline long double + tanh(long double __x) { return ::tanhl(__x); } +#else + inline long double + tanh(long double __x) { return ::tanh(static_cast(__x)); } +#endif +} + + +#if _GLIBCPP_USE_C99 +// These are possible macros imported from C99-land. For strict +// conformance, remove possible C99-injected names from the global +// namespace, and sequester them in the __gnu_cxx extension namespace. +namespace __gnu_cxx +{ + template + int + __capture_fpclassify(_Tp __f) { return fpclassify(__f); } + + template + int + __capture_isfinite(_Tp __f) { return isfinite(__f); } + + template + int + __capture_isinf(_Tp __f) { return isinf(__f); } + + template + int + __capture_isnan(_Tp __f) { return isnan(__f); } + + template + int + __capture_isnormal(_Tp __f) { return isnormal(__f); } + + template + int + __capture_signbit(_Tp __f) { return signbit(__f); } + + template + int + __capture_isgreater(_Tp __f1, _Tp __f2) + { return isgreater(__f1, __f2); } + + template + int + __capture_isgreaterequal(_Tp __f1, _Tp __f2) + { return isgreaterequal(__f1, __f2); } + + template + int + __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); } + + template + int + __capture_islessequal(_Tp __f1, _Tp __f2) + { return islessequal(__f1, __f2); } + + template + int + __capture_islessgreater(_Tp __f1, _Tp __f2) + { return islessgreater(__f1, __f2); } + + template + int + __capture_isunordered(_Tp __f1, _Tp __f2) + { return isunordered(__f1, __f2); } +} +#endif + +#undef fpclassify +#undef isfinite +#undef isinf +#undef isnan +#undef isnormal +#undef signbit +#undef isgreater +#undef isgreaterequal +#undef isless +#undef islessequal +#undef islessgreater +#undef isunordered + +#if _GLIBCPP_USE_C99 +namespace __gnu_cxx +{ + template + int + fpclassify(_Tp __f) { return __capture_fpclassify(__f); } + + template + int + isfinite(_Tp __f) { return __capture_isfinite(__f); } + + template + int + isinf(_Tp __f) { return __capture_isinf(__f); } + + template + int + isnan(_Tp __f) { return __capture_isnan(__f); } + + template + int + isnormal(_Tp __f) { return __capture_isnormal(__f); } + + template + int + signbit(_Tp __f) { return __capture_signbit(__f); } + + template + int + isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); } + + template + int + isgreaterequal(_Tp __f1, _Tp __f2) + { return __capture_isgreaterequal(__f1, __f2); } + + template + int + isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); } + + template + int + islessequal(_Tp __f1, _Tp __f2) + { return __capture_islessequal(__f1, __f2); } + + template + int + islessgreater(_Tp __f1, _Tp __f2) + { return __capture_islessgreater(__f1, __f2); } + + template + int + isunordered(_Tp __f1, _Tp __f2) + { return __capture_isunordered(__f1, __f2); } +} + +namespace std +{ + using __gnu_cxx::fpclassify; + using __gnu_cxx::isfinite; + using __gnu_cxx::isinf; + using __gnu_cxx::isnan; + using __gnu_cxx::isnormal; + using __gnu_cxx::signbit; + using __gnu_cxx::isgreater; + using __gnu_cxx::isgreaterequal; + using __gnu_cxx::isless; + using __gnu_cxx::islessequal; + using __gnu_cxx::islessgreater; + using __gnu_cxx::isunordered; +} +#endif + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +# include +#endif + +#endif + + + diff --git a/contrib/media/updf/include/c_std/bits/std_csetjmp.h b/contrib/media/updf/include/c_std/bits/std_csetjmp.h new file mode 100644 index 0000000000..73648aeb8f --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_csetjmp.h @@ -0,0 +1,54 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSETJMP +#define _CPP_CSETJMP 1 + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef longjmp + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef setjmp +#define setjmp(env) setjmp (env) +#endif + +namespace std +{ + using ::jmp_buf; + using ::longjmp; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_csignal.h b/contrib/media/updf/include/c_std/bits/std_csignal.h new file mode 100644 index 0000000000..f30d9e0007 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_csignal.h @@ -0,0 +1,50 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSIGNAL +#define _CPP_CSIGNAL 1 + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef raise + +namespace std +{ + using ::sig_atomic_t; + using ::signal; + using ::raise; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cstdarg.h b/contrib/media/updf/include/c_std/bits/std_cstdarg.h new file mode 100644 index 0000000000..c327520ae1 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cstdarg.h @@ -0,0 +1,50 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSTDARG +#define _CPP_CSTDARG 1 + +#pragma GCC system_header +#include_next + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef va_end +#define va_end(ap) va_end (ap) +#endif + +namespace std +{ + using ::va_list; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cstddef.h b/contrib/media/updf/include/c_std/bits/std_cstddef.h new file mode 100644 index 0000000000..79c89a668b --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cstddef.h @@ -0,0 +1,46 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.1 Types +// + +#ifndef _CPP_CSTDDEF +#define _CPP_CSTDDEF 1 + +#pragma GCC system_header +#include_next + +namespace std +{ + using ::ptrdiff_t; + using ::size_t; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cstdio.h b/contrib/media/updf/include/c_std/bits/std_cstdio.h new file mode 100644 index 0000000000..03d8221493 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cstdio.h @@ -0,0 +1,161 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8.2 C Library files +// + +#ifndef _CPP_CSTDIO +#define _CPP_CSTDIO 1 + +#include +#include + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef clearerr +#undef fclose +#undef feof +#undef ferror +#undef fflush +#undef fgetc +#undef fgetpos +#undef fgets +#undef fopen +#undef fprintf +#undef fputc +#undef fputs +#undef fread +#undef freopen +#undef fscanf +#undef fseek +#undef fsetpos +#undef ftell +#undef fwrite +#undef getc +#undef getchar +#undef gets +#undef perror +#undef printf +#undef putc +#undef putchar +#undef puts +#undef remove +#undef rename +#undef rewind +#undef scanf +#undef setbuf +#undef setvbuf +#undef sprintf +#undef sscanf +#undef tmpfile +#undef tmpnam +#undef ungetc +#undef vfprintf +#undef vprintf +#undef vsprintf + +namespace std +{ + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + using ::gets; + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + using ::tmpnam; + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} + +#if _GLIBCPP_USE_C99 + +#undef snprintf +#undef vfscanf +#undef vscanf +#undef vsnprintf +#undef vsscanf + +namespace __gnu_cxx +{ + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; +} + +namespace std +{ + using __gnu_cxx::snprintf; + using __gnu_cxx::vfscanf; + using __gnu_cxx::vscanf; + using __gnu_cxx::vsnprintf; + using __gnu_cxx::vsscanf; +} +#endif + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cstdlib.h b/contrib/media/updf/include/c_std/bits/std_cstdlib.h new file mode 100644 index 0000000000..d123b8ddd7 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cstdlib.h @@ -0,0 +1,167 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSTDLIB +#define _CPP_CSTDLIB 1 + +#include +#include + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef abort +#undef abs +#undef atexit +#undef atof +#undef atoi +#undef atol +#undef bsearch +#undef calloc +#undef div +#undef exit +#undef free +#undef getenv +#undef labs +#undef ldiv +#undef malloc +#undef mblen +#undef mbstowcs +#undef mbtowc +#undef qsort +#undef rand +#undef realloc +#undef srand +#undef strtod +#undef strtol +#undef strtoul +#undef system +#undef wcstombs +#undef wctomb + +namespace std +{ + using ::div_t; + using ::ldiv_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + using ::wcstombs; + using ::wctomb; + + inline long + abs(long __i) { return labs(__i); } + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } +} + +#if _GLIBCPP_USE_C99 + +#undef _Exit +#undef llabs +#undef lldiv +#undef atoll +#undef strtoll +#undef strtoull +#undef strtof +#undef strtold + +namespace __gnu_cxx +{ + using ::lldiv_t; + using ::_Exit; + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline long long + llabs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + inline lldiv_t + lldiv(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::atoll; + using ::strtof; + using ::strtoll; + using ::strtoull; + using ::strtold; +} + +namespace std +{ + using __gnu_cxx::lldiv_t; + using __gnu_cxx::_Exit; + using __gnu_cxx::abs; + using __gnu_cxx::llabs; + using __gnu_cxx::div; + using __gnu_cxx::lldiv; + using __gnu_cxx::atoll; + using __gnu_cxx::strtof; + using __gnu_cxx::strtoll; + using __gnu_cxx::strtoull; + using __gnu_cxx::strtold; +} +#endif + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cstring.h b/contrib/media/updf/include/c_std/bits/std_cstring.h new file mode 100644 index 0000000000..5ad06ee9e9 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cstring.h @@ -0,0 +1,117 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSTRING +#define _CPP_CSTRING 1 + +#include + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef memcpy +#undef memmove +#undef strcpy +#undef strncpy +#undef strcat +#undef strncat +#undef memcmp +#undef strcmp +#undef strcoll +#undef strncmp +#undef strxfrm +#undef memchr +#undef strchr +#undef strcspn +#undef strpbrk +#undef strrchr +#undef strspn +#undef strstr +#undef strtok +#undef memset +#undef strerror +#undef strlen + +namespace std +{ + using ::memcpy; + using ::memmove; + using ::strcpy; + using ::strncpy; + using ::strcat; + using ::strncat; + using ::memcmp; + using ::strcmp; + using ::strcoll; + using ::strncmp; + using ::strxfrm; + using ::strcspn; + using ::strspn; + using ::strtok; + using ::memset; + using ::strerror; + using ::strlen; + + using ::memchr; + + inline void* + memchr(void* __p, int __c, size_t __n) + { return memchr(const_cast(__p), __c, __n); } + + using ::strchr; + + inline char* + strchr(char* __s1, int __n) + { return __builtin_strchr(const_cast(__s1), __n); } + + using ::strpbrk; + + inline char* + strpbrk(char* __s1, const char* __s2) + { return __builtin_strpbrk(const_cast(__s1), __s2); } + + using ::strrchr; + + inline char* + strrchr(char* __s1, int __n) + { return __builtin_strrchr(const_cast(__s1), __n); } + + using ::strstr; + + inline char* + strstr(char* __s1, const char* __s2) + { return __builtin_strstr(const_cast(__s1), __s2); } +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_ctime.h b/contrib/media/updf/include/c_std/bits/std_ctime.h new file mode 100644 index 0000000000..b97c046015 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_ctime.h @@ -0,0 +1,70 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Date and time +// + +#ifndef _CPP_CTIME +#define _CPP_CTIME 1 + +#include + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef clock +#undef difftime +#undef mktime +#undef time +#undef asctime +#undef ctime +#undef gmtime +#undef localtime +#undef strftime + +namespace std +{ + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cwchar.h b/contrib/media/updf/include/c_std/bits/std_cwchar.h new file mode 100644 index 0000000000..6ad9931752 --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cwchar.h @@ -0,0 +1,231 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: ??? +// + +#ifndef _CPP_CWCHAR +#define _CPP_CWCHAR 1 + +#include +#include + +#if _GLIBCPP_HAVE_WCHAR_H +#pragma GCC system_header +#include_next +#endif + +// Need to do a bit of trickery here with mbstate_t as char_traits +// assumes it is in wchar.h, regardless of wchar_t specializations. +#ifndef _GLIBCPP_HAVE_MBSTATE_T +extern "C" +{ + typedef struct + { + int __fill[6]; + } mbstate_t; +} +#endif + +namespace std +{ + using ::mbstate_t; +} + +// Get rid of those macros defined in in lieu of real functions. +#undef btowc +#undef fgetwc +#undef fgetws +#undef fputwc +#undef fputws +#undef fwide +#undef fwprintf +#undef fwscanf +#undef getwc +#undef getwchar +#undef mbrlen +#undef mbrtowc +#undef mbsinit +#undef mbsrtowcs +#undef putwc +#undef putwchar +#undef swprintf +#undef swscanf +#undef ungetwc +#undef vfwprintf +#undef vfwscanf +#undef vswprintf +#undef vswscanf +#undef vwprintf +#undef vwscanf +#undef wcrtomb +#undef wcscat +#undef wcschr +#undef wcscmp +#undef wcscoll +#undef wcscpy +#undef wcscspn +#undef wcsftime +#undef wcslen +#undef wcsncat +#undef wcsncmp +#undef wcsncpy +#undef wcspbrk +#undef wcsrchr +#undef wcsrtombs +#undef wcsspn +#undef wcsstr +#undef wcstod +#undef wcstof +#undef wcstok +#undef wcstol +#undef wcstoul +#undef wcsxfrm +#undef wctob +#undef wmemchr +#undef wmemcmp +#undef wmemcpy +#undef wmemmove +#undef wmemset +#undef wprintf +#undef wscanf + +#if _GLIBCPP_USE_WCHAR_T +namespace std +{ + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + using ::swprintf; + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + using ::vfwscanf; + using ::vswprintf; + using ::vswscanf; + using ::vwprintf; + using ::vwscanf; + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + using ::wcstof; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + + using ::wcschr; + + inline wchar_t* + wcschr(wchar_t* __p, wchar_t __c) + { return wcschr(const_cast(__p), __c); } + + using ::wcspbrk; + + inline wchar_t* + wcspbrk(wchar_t* __s1, wchar_t* __s2) + { return wcspbrk(const_cast(__s1), __s2); } + + using ::wcsrchr; + + inline wchar_t* + wcsrchr(wchar_t* __p, wchar_t __c) + { return wcsrchr(const_cast(__p), __c); } + + using ::wcsstr; + + inline wchar_t* + wcsstr(wchar_t* __s1, wchar_t* __s2) + { return wcsstr(const_cast(__s1), __s2); } + + using ::wmemchr; + + inline wchar_t* + wmemchr(wchar_t* __p, wchar_t __c, size_t __n) + { return wmemchr(const_cast(__p), __c, __n); } +} + +#if _GLIBCPP_USE_C99 + +#undef wcstold +#undef wcstoll +#undef wcstoull + +namespace __gnu_cxx +{ + using ::wcstold; + using ::wcstoll; + using ::wcstoull; +} + +namespace std +{ + using __gnu_cxx::wcstold; + using __gnu_cxx::wcstoll; + using __gnu_cxx::wcstoull; +} +#endif + +#endif //_GLIBCPP_USE_WCHAR_T + +#endif diff --git a/contrib/media/updf/include/c_std/bits/std_cwctype.h b/contrib/media/updf/include/c_std/bits/std_cwctype.h new file mode 100644 index 0000000000..8fd58d0ece --- /dev/null +++ b/contrib/media/updf/include/c_std/bits/std_cwctype.h @@ -0,0 +1,87 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: +// + +#ifndef _CPP_CWCTYPE +#define _CPP_CWCTYPE 1 + +#pragma GCC system_header +#include_next + +// Get rid of those macros defined in in lieu of real functions. +#undef iswalnum +#undef iswalpha +#undef iswblank +#undef iswcntrl +#undef iswdigit +#undef iswgraph +#undef iswlower +#undef iswprint +#undef iswprint +#undef iswpunct +#undef iswspace +#undef iswupper +#undef iswxdigit +#undef iswctype +#undef towlower +#undef towupper +#undef towctrans +#undef wctrans + +namespace std +{ + using ::wint_t; // cwchar + + using ::wctype_t; + using ::wctrans_t; + + using ::iswalnum; + using ::iswalpha; + using ::iswblank; + using ::iswcntrl; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::iswctype; + using ::towlower; + using ::towupper; + using ::towctrans; + using ::wctrans; +} + +#endif diff --git a/contrib/media/updf/include/cassert b/contrib/media/updf/include/cassert new file mode 100644 index 0000000000..fe0b8b5b64 --- /dev/null +++ b/contrib/media/updf/include/cassert @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// This one should not have include guards. +#include + diff --git a/contrib/media/updf/include/cctype b/contrib/media/updf/include/cctype new file mode 100644 index 0000000000..868e4be335 --- /dev/null +++ b/contrib/media/updf/include/cctype @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CCTYPE +#include +#endif diff --git a/contrib/media/updf/include/cerrno b/contrib/media/updf/include/cerrno new file mode 100644 index 0000000000..b7bfe3a393 --- /dev/null +++ b/contrib/media/updf/include/cerrno @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CERRNO +#include +#endif diff --git a/contrib/media/updf/include/cfloat b/contrib/media/updf/include/cfloat new file mode 100644 index 0000000000..d91824d38a --- /dev/null +++ b/contrib/media/updf/include/cfloat @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CFLOAT +#include +#endif diff --git a/contrib/media/updf/include/choices.h b/contrib/media/updf/include/choices.h new file mode 100644 index 0000000000..64f0ec859b --- /dev/null +++ b/contrib/media/updf/include/choices.h @@ -0,0 +1,28 @@ +/** \file choices.h switches that control debugging in source code. + * Uncomment the defines below to allow a specific type of compilation + */ + +#ifndef __choices_h__ +#define __choices_h__ + +/** Turn on YACAS_DEBUG if you want to see run-time statistics + * after typing Exit() + */ +//#define YACAS_DEBUG + +/** Turn on USE_ASSERT to find programming errors through the asserts + * placed in various places of the application. + */ +//#define USE_ASSERT + +/** Turn on NO_EXCEPTIONS if you want to disable run-time checking + * while executing commands. + */ +//#define NO_EXCEPTIONS + +/** Enable long reference counts. This makes EVERY object 2 bytes + larger, so use only if needed. + */ +//#define USE_LONG_REF_COUNTS + +#endif diff --git a/contrib/media/updf/include/cio.h b/contrib/media/updf/include/cio.h new file mode 100644 index 0000000000..580bf9c0d1 --- /dev/null +++ b/contrib/media/updf/include/cio.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __CIO_H +#define __CIO_H +/** +@file cio.h +@brief Implementation of a byte input-output process (CIO) + +The functions in CIO.C have for goal to realize a byte input / output process. +*/ + +/** @defgroup CIO CIO - byte input-output stream */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Number of bytes left before the end of the stream +@param cio CIO handle +@return Returns the number of bytes before the end of the stream +*/ +int cio_numbytesleft(opj_cio_t *cio); +/** +Get pointer to the current position in the stream +@param cio CIO handle +@return Returns a pointer to the current position +*/ +unsigned char *cio_getbp(opj_cio_t *cio); +/** +Write some bytes +@param cio CIO handle +@param v Value to write +@param n Number of bytes to write +@return Returns the number of bytes written or 0 if an error occured +*/ +unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n); +/** +Read some bytes +@param cio CIO handle +@param n Number of bytes to read +@return Returns the value of the n bytes read +*/ +unsigned int cio_read(opj_cio_t *cio, int n); +/** +Skip some bytes +@param cio CIO handle +@param n Number of bytes to skip +*/ +void cio_skip(opj_cio_t *cio, int n); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __CIO_H */ + diff --git a/contrib/media/updf/include/ciso646 b/contrib/media/updf/include/ciso646 new file mode 100644 index 0000000000..f5dd444bd1 --- /dev/null +++ b/contrib/media/updf/include/ciso646 @@ -0,0 +1,28 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. diff --git a/contrib/media/updf/include/climits b/contrib/media/updf/include/climits new file mode 100644 index 0000000000..afadc6403d --- /dev/null +++ b/contrib/media/updf/include/climits @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CLIMITS +#include +#endif diff --git a/contrib/media/updf/include/clocale b/contrib/media/updf/include/clocale new file mode 100644 index 0000000000..8a62dfa886 --- /dev/null +++ b/contrib/media/updf/include/clocale @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CLOCALE +#include +#endif diff --git a/contrib/media/updf/include/cmath b/contrib/media/updf/include/cmath new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/media/updf/include/coff.h b/contrib/media/updf/include/coff.h new file mode 100644 index 0000000000..32c8cf53a1 --- /dev/null +++ b/contrib/media/updf/include/coff.h @@ -0,0 +1,339 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_coff_h_ +#define __dj_include_coff_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/*** coff information for Intel 386/486. */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr { + unsigned short f_magic; /* magic number */ + unsigned short f_nscns; /* number of sections */ + unsigned long f_timdat; /* time & date stamp */ + unsigned long f_symptr; /* file pointer to symtab */ + unsigned long f_nsyms; /* number of symtab entries */ + unsigned short f_opthdr; /* sizeof(optional hdr) */ + unsigned short f_flags; /* flags */ +}; + + +/* Bits for f_flags: + * F_RELFLG relocation info stripped from file + * F_EXEC file is executable (no unresolved external references) + * F_LNNO line numbers stripped from file + * F_LSYMS local symbols stripped from file + * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) + */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + + + +#define I386MAGIC 0x14c +#define I386AIXMAGIC 0x175 +#define I386BADMAG(x) (((x).f_magic!=I386MAGIC) && (x).f_magic!=I386AIXMAGIC) + + +#define FILHDR struct external_filehdr +#define FILHSZ sizeof(FILHDR) + + +/********************** AOUT "OPTIONAL HEADER" **********************/ + + +typedef struct +{ + unsigned short magic; /* type of file */ + unsigned short vstamp; /* version stamp */ + unsigned long tsize; /* text size in bytes, padded to FW bdry*/ + unsigned long dsize; /* initialized data " " */ + unsigned long bsize; /* uninitialized data " " */ + unsigned long entry; /* entry pt. */ + unsigned long text_start; /* base of text used for this file */ + unsigned long data_start; /* base of data used for this file */ +} +AOUTHDR; + + +typedef struct gnu_aout { + unsigned long info; + unsigned long tsize; + unsigned long dsize; + unsigned long bsize; + unsigned long symsize; + unsigned long entry; + unsigned long txrel; + unsigned long dtrel; + } GNU_AOUT; + +#define AOUTSZ (sizeof(AOUTHDR)) + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + + +/********************** SECTION HEADER **********************/ + + +struct external_scnhdr { + char s_name[8]; /* section name */ + unsigned long s_paddr; /* physical address, aliased s_nlib */ + unsigned long s_vaddr; /* virtual address */ + unsigned long s_size; /* section size */ + unsigned long s_scnptr; /* file ptr to raw data for section */ + unsigned long s_relptr; /* file ptr to relocation */ + unsigned long s_lnnoptr; /* file ptr to line numbers */ + unsigned short s_nreloc; /* number of relocation entries */ + unsigned short s_nlnno; /* number of line number entries*/ + unsigned long s_flags; /* flags */ +}; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ sizeof(SCNHDR) + +/* + * names of "special" sections + */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _COMMENT ".comment" +#define _LIB ".lib" + +/* + * s_flags "type" + */ +#define STYP_TEXT (0x0020) /* section contains text only */ +#define STYP_DATA (0x0040) /* section contains data only */ +#define STYP_BSS (0x0080) /* section contains bss only */ + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + * Line numbers are grouped on a per function basis; first entry in a function + * grouping will have l_lnno = 0 and in place of physical address will be the + * symbol table index of the function name. + */ +struct external_lineno { + union { + unsigned long l_symndx __attribute__((packed)); /* function name symbol index, iff l_lnno == 0 */ + unsigned long l_paddr __attribute__((packed)); /* (physical) address of line number */ + } l_addr; + unsigned short l_lnno; /* line number */ +}; + + +#define LINENO struct external_lineno +#define LINESZ sizeof(LINENO) + + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union { + char e_name[E_SYMNMLEN]; + struct { + unsigned long e_zeroes __attribute__((packed)); + unsigned long e_offset __attribute__((packed)); + } e; + } e; + unsigned long e_value __attribute__((packed)); + short e_scnum; + unsigned short e_type; + unsigned char e_sclass; + unsigned char e_numaux; +}; + +#define N_BTMASK (0xf) +#define N_TMASK (0x30) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +union external_auxent { + struct { + unsigned long x_tagndx __attribute__((packed)); /* str, un, or enum tag indx */ + union { + struct { + unsigned short x_lnno; /* declaration line number */ + unsigned short x_size; /* str/union/array size */ + } x_lnsz; + unsigned long x_fsize __attribute__((packed)); /* size of function */ + } x_misc; + union { + struct { /* if ISFCN, tag, or .bb */ + unsigned long x_lnnoptr __attribute__((packed)); /* ptr to fcn line # */ + unsigned long x_endndx __attribute__((packed)); /* entry ndx past block end */ + } x_fcn; + struct { /* if ISARY, up to 4 dimen. */ + unsigned short x_dimen[E_DIMNUM]; + } x_ary; + } x_fcnary; + unsigned short x_tvndx; /* tv index */ + } x_sym; + + union { + char x_fname[E_FILNMLEN]; + struct { + unsigned long x_zeroes __attribute__((packed)); + unsigned long x_offset __attribute__((packed)); + } x_n; + } x_file; + + struct { + unsigned long x_scnlen __attribute__((packed)); /* section length */ + unsigned short x_nreloc; /* # relocation entries */ + unsigned short x_nlinno; /* # line numbers */ + } x_scn; + + struct { + unsigned long x_tvfill __attribute__((packed)); /* tv fill value */ + unsigned short x_tvlen; /* length of .tv */ + unsigned short x_tvran[2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + + +}; + +#define SYMENT struct external_syment +#define SYMESZ sizeof(SYMENT) +#define AUXENT union external_auxent +#define AUXESZ sizeof(AUXENT) + + +# define _ETEXT "etext" + + +/* Relocatable symbols have number of the section in which they are defined, + or one of the following: */ + +#define N_UNDEF ((short)0) /* undefined symbol */ +#define N_ABS ((short)-1) /* value of symbol is absolute */ +#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */ +#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */ +#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/ + +/* + * Type of a symbol, in low N bits of the word + */ +#define T_NULL 0 +#define T_VOID 1 /* function argument (only used by compiler) */ +#define T_CHAR 2 /* character */ +#define T_SHORT 3 /* short integer */ +#define T_INT 4 /* integer */ +#define T_LONG 5 /* long integer */ +#define T_FLOAT 6 /* floating point */ +#define T_DOUBLE 7 /* double word */ +#define T_STRUCT 8 /* structure */ +#define T_UNION 9 /* union */ +#define T_ENUM 10 /* enumeration */ +#define T_MOE 11 /* member of enumeration*/ +#define T_UCHAR 12 /* unsigned character */ +#define T_USHORT 13 /* unsigned short */ +#define T_UINT 14 /* unsigned integer */ +#define T_ULONG 15 /* unsigned long */ +#define T_LNGDBL 16 /* long double */ + +/* + * derived types, in n_type +*/ +#define DT_NON (0) /* no derived type */ +#define DT_PTR (1) /* pointer */ +#define DT_FCN (2) /* function */ +#define DT_ARY (3) /* array */ + +#define BTYPE(x) ((x) & N_BTMASK) + +#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT)) +#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT)) +#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT)) +#define ISTAG(x) ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG) +#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK)) + +/********************** STORAGE CLASSES **********************/ + +/* This used to be defined as -1, but now n_sclass is unsigned. */ +#define C_EFCN 0xff /* physical end of function */ +#define C_NULL 0 +#define C_AUTO 1 /* automatic variable */ +#define C_EXT 2 /* external symbol */ +#define C_STAT 3 /* static */ +#define C_REG 4 /* register variable */ +#define C_EXTDEF 5 /* external definition */ +#define C_LABEL 6 /* label */ +#define C_ULABEL 7 /* undefined label */ +#define C_MOS 8 /* member of structure */ +#define C_ARG 9 /* function argument */ +#define C_STRTAG 10 /* structure tag */ +#define C_MOU 11 /* member of union */ +#define C_UNTAG 12 /* union tag */ +#define C_TPDEF 13 /* type definition */ +#define C_USTATIC 14 /* undefined static */ +#define C_ENTAG 15 /* enumeration tag */ +#define C_MOE 16 /* member of enumeration */ +#define C_REGPARM 17 /* register parameter */ +#define C_FIELD 18 /* bit field */ +#define C_AUTOARG 19 /* auto argument */ +#define C_LASTENT 20 /* dummy entry (end of block) */ +#define C_BLOCK 100 /* ".bb" or ".eb" */ +#define C_FCN 101 /* ".bf" or ".ef" */ +#define C_EOS 102 /* end of structure */ +#define C_FILE 103 /* file name */ +#define C_LINE 104 /* line # reformatted as symbol table entry */ +#define C_ALIAS 105 /* duplicate tag */ +#define C_HIDDEN 106 /* ext symbol in dmert public lib */ + +/********************** RELOCATION DIRECTIVES **********************/ + + + +struct external_reloc { + unsigned long r_vaddr __attribute__((packed)); + unsigned long r_symndx __attribute__((packed)); + unsigned short r_type; +}; + + +#define RELOC struct external_reloc +#define RELSZ sizeof(RELOC) + +#define RELOC_REL32 20 /* 32-bit PC-relative address */ +#define RELOC_ADDR32 6 /* 32-bit absolute address */ + +#define DEFAULT_DATA_SECTION_ALIGNMENT 4 +#define DEFAULT_BSS_SECTION_ALIGNMENT 4 +#define DEFAULT_TEXT_SECTION_ALIGNMENT 4 +/* For new sections we havn't heard of before */ +#define DEFAULT_SECTION_ALIGNMENT 4 + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_coff_h_ */ diff --git a/contrib/media/updf/include/commandline.h b/contrib/media/updf/include/commandline.h new file mode 100644 index 0000000000..4a4b41818b --- /dev/null +++ b/contrib/media/updf/include/commandline.h @@ -0,0 +1,112 @@ + +/** \file commandline.h + * Implementation of a platform-independent command line with history. + * + * The class CCommandLine has two roles: + * 1) It has an outside interface, ReadLine(), that yields to the + * system until the user is finished entering an expression at + * the command line. The result can be found in iLine. + * 2) It defines a mini-API needed to implement the command line. + * For each platform Yacas is meant to run on there should be a + * CCommandLine-derived class if this functionality is to be used. + * + */ + +#ifndef __commandline_h__ +#define __commandline_h__ + +#include "lispstring.h" +#include "yacasbase.h" + +enum ESpecialChars +{ + eDelete = 0x1000, + eBackSpace, + eLeft, + eRight, + eUp, + eDown, + eHome, + eEnd, + eEnter, + eTab, + eEscape +}; + +/** + * Implementation of a platform-independent command line with history. + * + * The class CCommandLine has two roles: + * 1) It has an outside interface, ReadLine(), that yields to the + * system until the user is finished entering an expression at + * the command line. The result can be found in iLine. + * 2) It defines a mini-API needed to implement the command line. + * For each platform Yacas is meant to run on there should be a + * CCommandLine-derived class if this functionality is to be used. + * + * The derived class is responsible for filling the history list, + * and for externalizing the history list to disk when the system + * shuts down. + */ + +/// \class CConsoleHistory, implement history list the user can browse through. +class CConsoleHistory +{ +public: + CConsoleHistory() : iHistory(),history(0) {} + void ResetHistoryPosition(); + void AddLine(LispString& aString); + void Append(LispString * aString); + LispInt ArrowUp(LispString& aString,LispInt &aCursorPos); + LispInt ArrowDown(LispString& aString,LispInt &aCursorPos); + LispInt Complete(LispString& aString,LispInt &aCursorPos); + LispInt NrLines(); + LispString * GetLine(LispInt aLine); +protected: + CDeletingArrayGrower > iHistory; + LispInt history; +}; + +class CCommandLine : public YacasBase +{ +public: + CCommandLine() : iFullLineDirty(LispFalse),iHistoryUnchanged(0),iLine(),iSubLine(),iHistoryList() {}; + virtual ~CCommandLine(); + /// Call this function if the user needs to enter an expression. + virtual void ReadLine(LispChar * prompt); +public: //platform stuff + /** return a key press, which is either an ascii value, or one + * of the values specified in ESpecialChars + */ + virtual LispInt GetKey() = 0; + /// Go to the next line on the console (carriage return/line feed). + virtual void NewLine() = 0; + /** Show the current line (in iSubLine), with the required prompt, + * and the cursor position at cursor (starting from the prompt). + */ + virtual void ShowLine(LispChar * prompt, + LispInt promptlen,LispInt cursor) = 0; + /// Pause for a short while. Used when matching brackets. + virtual void Pause() = 0; + + /// Maximum number of history lines to be saved (-1 is all) + virtual void MaxHistoryLinesSaved(LispInt aNrLines); + +protected: + virtual void ReadLineSub(LispChar * prompt); +private: + void GetHistory(LispInt aLine); + void ShowOpen(LispChar * prompt,LispInt promptlen, + LispChar aOpen, LispChar aClose, LispInt aCurPos); +protected: + LispInt iFullLineDirty; + LispInt iHistoryUnchanged; + +public: + LispString iLine; + LispString iSubLine; + + CConsoleHistory iHistoryList; +}; + +#endif diff --git a/contrib/media/updf/include/complex b/contrib/media/updf/include/complex new file mode 100644 index 0000000000..dfc144ffdc --- /dev/null +++ b/contrib/media/updf/include/complex @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_COMPLEX +#include +#endif diff --git a/contrib/media/updf/include/compressedfiles.h b/contrib/media/updf/include/compressedfiles.h new file mode 100644 index 0000000000..f6ae240406 --- /dev/null +++ b/contrib/media/updf/include/compressedfiles.h @@ -0,0 +1,51 @@ + +#ifndef __compressedfiles_h__ +#define __compressedfiles_h__ + +#include "lisptype.h" +#include "lispassert.h" + +class CompressedFiles +{ +public: + CompressedFiles(unsigned char * aBuffer, LispInt aFullSize, LispInt aCompressed); + ~CompressedFiles(); + LispInt FindFile(LispChar * aName); + LispChar * Name(LispInt aIndex); + LispChar * Contents(LispInt aIndex); + inline LispInt NrFiles() const {return iNrFiles;} + void Sizes(LispInt& aOriginalSize, LispInt& aCompressedSize, LispInt aIndex); + inline LispInt IsValid() const {return iIsValid;} +protected: + LispInt GetInt(unsigned char*&indptr); + +private: + // copy constructor not implemented yet, so an assert is in order + CompressedFiles(const CompressedFiles& aOther) + : iFullBuffer(NULL),iCompressed(0),iFullSize(0),iIndex(NULL),iNrFiles(0),iIndexSize(0),iIsValid(LispFalse) + { + LISPASSERT(0); + } + inline CompressedFiles& operator=(const CompressedFiles& aOther) + { + iFullBuffer = NULL; + iCompressed = 0; + iFullSize = 0; + iIndex = NULL; + iNrFiles = 0; + iIndexSize = 0; + iIsValid = LispFalse; + LISPASSERT(0); + return *this; + } +private: + unsigned char * iFullBuffer; + LispInt iCompressed; + LispInt iFullSize; + unsigned char * *iIndex; + LispInt iNrFiles; + LispInt iIndexSize; + LispInt iIsValid; +}; + +#endif // __compressedfiles_h__ diff --git a/contrib/media/updf/include/config.h b/contrib/media/updf/include/config.h new file mode 100644 index 0000000000..00a1f4e2fa --- /dev/null +++ b/contrib/media/updf/include/config.h @@ -0,0 +1,87 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the `pow' function. */ +/* #undef HAVE_POW */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libpng" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libpng" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libpng 1.5.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libpng" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.5.1" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "1.5.1" + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/contrib/media/updf/include/configure b/contrib/media/updf/include/configure new file mode 100755 index 0000000000..e7195ccb10 --- /dev/null +++ b/contrib/media/updf/include/configure @@ -0,0 +1,16739 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63 for jbig2dec 0.11. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='jbig2dec' +PACKAGE_TARNAME='jbig2dec' +PACKAGE_VERSION='0.11' +PACKAGE_STRING='jbig2dec 0.11' +PACKAGE_BUGREPORT='jbig2-dev@ghostscript.com' + +ac_unique_file="jbig2dec.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +JBIG2_STDINT_H +JBIG2_INT8_T +JBIG2_INT16_T +JBIG2_INT32_T +LIBOBJS +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +JBIG2DEC_LT_AGE +JBIG2DEC_LT_REVISION +JBIG2DEC_LT_CURRENT +am__leading_dot +SET_MAKE +AWK +INSTALL_STRIP_PROGRAM +STRIP +install_sh +AMTAR +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_libpng +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures jbig2dec 0.11 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/jbig2dec] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of jbig2dec 0.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libpng=prefix include support for png output (if libpng is + available) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +jbig2dec configure 0.11 +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by jbig2dec $as_me 0.11, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +am__api_version="1.7" +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +$as_echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + + # test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='jbig2dec' + VERSION='0.11' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + +ac_config_headers="$ac_config_headers config.h" + + + +JBIG2DEC_LT_CURRENT=0 + +JBIG2DEC_LT_REVISION=0 + +JBIG2DEC_LT_AGE=0 + + +# Checks for programs. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define NO_MINUS_C_MINUS_O 1 +_ACEOF + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6b' +macro_revision='1.3017' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:4404: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4407: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4410: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5616 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7469: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7473: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7808: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7812: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7913: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7917: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7968: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7972: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10771 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10867 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +# platform specific compiler flags +if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -Wall" +fi + +# Checks for libraries. + +# Check whether --with-libpng was given. +if test "${with_libpng+set}" = set; then + withval=$with_libpng; ac_cv_want_libpng="$withval" +else + ac_cv_want_libpng="yes" +fi + +save_cflags="$CFLAGS" +save_ldflags="$LDFLAGS" +have_libpng="no" +if test "x$ac_cv_want_libpng" != "xno"; then + if test "x$ac_cv_want_libpng" != "xyes"; then + CFLAGS="$CFLAGS -I$ac_cv_want_libpng/include" + LDFLAGS="$LDFLAGS -L$ac_cv_want_libpng/lib" + fi + { $as_echo "$as_me:$LINENO: checking for library containing pow" >&5 +$as_echo_n "checking for library containing pow... " >&6; } +if test "${ac_cv_search_pow+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_pow=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_pow+set}" = set; then + break +fi +done +if test "${ac_cv_search_pow+set}" = set; then + : +else + ac_cv_search_pow=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5 +$as_echo "$ac_cv_search_pow" >&6; } +ac_res=$ac_cv_search_pow +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:$LINENO: checking for png_check_sig in -lpng" >&5 +$as_echo_n "checking for png_check_sig in -lpng... " >&6; } +if test "${ac_cv_lib_png_png_check_sig+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char png_check_sig (); +int +main () +{ +return png_check_sig (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_png_png_check_sig=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png_png_check_sig=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_check_sig" >&5 +$as_echo "$ac_cv_lib_png_png_check_sig" >&6; } +if test "x$ac_cv_lib_png_png_check_sig" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 +$as_echo_n "checking for deflate in -lz... " >&6; } +if test "${ac_cv_lib_z_deflate+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char deflate (); +int +main () +{ +return deflate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_z_deflate=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_deflate=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 +$as_echo "$ac_cv_lib_z_deflate" >&6; } +if test "x$ac_cv_lib_z_deflate" = x""yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPNG 1 +_ACEOF + + LIBS="-lpng -lz $LIBS" + case " $LIBOBJS " in + *" jbig2_image_png.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS jbig2_image_png.$ac_objext" + ;; +esac + + have_libpng="yes" + +fi + + +fi + +fi +if test "x$have_libpng" != "xyes"; then + CFLAGS="$save_cflags" + LDFLAGS="$save_ldflags" +fi + +# Checks for header files. +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + + + + +for ac_header in libintl.h stddef.h unistd.h strings.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------- ## +## Report this to jbig2-dev@ghostscript.com ## +## ---------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +stdint_types_in="no_replacement_found" +stdint_types_discovered="yes" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if test "${ac_cv_sizeof_char+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_char=$ac_lo;; +'') if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (char) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_char=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (char)); } +static unsigned long int ulongval () { return (long int) (sizeof (char)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (char))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (char)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (char)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (char) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_char=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (short))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (short)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (short)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (long))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +case 1 in + $ac_cv_sizeof_char) int8_type="char";; + *) stdint_types_discovered="no" +esac +case 2 in + $ac_cv_sizeof_short) int16_type="short";; + $ac_cv_sizeof_char) int16_type="char";; + $ac_cv_sizeof_int) int16_type="char";; + *) stdint_types_discovered="no";; +esac +case 4 in + $ac_cv_sizeof_int) int32_type="int";; + $ac_cv_sizeof_long) int32_type="long";; + $ac_cv_sizeof_short) int32_type="short";; + *) stdint_types_discovered="no";; +esac +if test "${ac_cv_header_stdint_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } +if test "${ac_cv_header_stdint_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +$as_echo "$ac_cv_header_stdint_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking stdint.h usability" >&5 +$as_echo_n "checking stdint.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking stdint.h presence" >&5 +$as_echo_n "checking stdint.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------- ## +## Report this to jbig2-dev@ghostscript.com ## +## ---------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } +if test "${ac_cv_header_stdint_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_stdint_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +$as_echo "$ac_cv_header_stdint_h" >&6; } + +fi + + +if test "x$ac_cv_header_stdint_h" != "xyes"; then + for include in sys/types.h inttypes.h sys/inttypes.h sys/int_types.h ; do + { $as_echo "$as_me:$LINENO: checking for uint32_t in $include" >&5 +$as_echo_n "checking for uint32_t in $include... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$include> +int +main () +{ +uint32_t canary; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + stdint_types_in="$include" + break; + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + if test "x$stdint_types_in" != "xno_replacement_found"; then + { $as_echo "$as_me:$LINENO: result: Adding $stdint_types_in to config header for stdint types" >&5 +$as_echo "Adding $stdint_types_in to config header for stdint types" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define JBIG2_REPLACE_STDINT_H /**/ +_ACEOF + + elif test "x$stdint_types_discovered" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: +Unable to find suitable definitions of the stdint.h types (uint32_t and friends) +You will have to define these yourself in a separate header. +See config_win32.h for an example. + " >&5 +$as_echo "$as_me: error: +Unable to find suitable definitions of the stdint.h types (uint32_t and friends) +You will have to define these yourself in a separate header. +See config_win32.h for an example. + " >&2;} + { (exit 1); exit 1; }; } + fi +fi +JBIG2_INT32_T=$int32_type + +JBIG2_INT16_T=$int16_type + +JBIG2_INT8_T=$int8_type + +JBIG2_STDINT_H=$stdint_types_in + + +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +$as_echo_n "checking for size_t... " >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_size_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((size_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +$as_echo "$ac_cv_type_size_t" >&6; } +if test "x$ac_cv_type_size_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + +# Checks for library functions. +{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_working=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memcmp_working=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_memcmp_working=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac + + + +for ac_func in snprintf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac + +fi +done + + + + + +for ac_func in memset strdup +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:$LINENO: checking for getopt_long" >&5 +$as_echo_n "checking for getopt_long... " >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getopt_long + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getopt_long (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getopt_long || defined __stub___getopt_long +choke me +#endif + +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_getopt_long=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getopt_long=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +$as_echo "$ac_cv_func_getopt_long" >&6; } +if test "x$ac_cv_func_getopt_long" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_LONG /**/ +_ACEOF + +else + + case " $LIBOBJS " in + *" getopt.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt.$ac_objext" + ;; +esac + + case " $LIBOBJS " in + *" getopt1.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" + ;; +esac + + +fi + + +# generate output +ac_config_files="$ac_config_files Makefile config_types.h" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by jbig2dec $as_me 0.11, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +jbig2dec config.status 0.11 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "config_types.h") CONFIG_FILES="$CONFIG_FILES config_types.h" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi +# Compute "$ac_file"'s index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + "$ac_file" | "$ac_file":* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/contrib/media/updf/include/conio.h b/contrib/media/updf/include/conio.h new file mode 100644 index 0000000000..ed9ff02740 --- /dev/null +++ b/contrib/media/updf/include/conio.h @@ -0,0 +1,112 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_conio_h_ +#define __dj_include_conio_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + + +extern int directvideo; /* ignored by gppconio */ +extern int _wscroll; + +#define _NOCURSOR 0 +#define _SOLIDCURSOR 1 +#define _NORMALCURSOR 2 + +struct text_info { + unsigned char winleft; + unsigned char wintop; + unsigned char winright; + unsigned char winbottom; + unsigned char attribute; + unsigned char normattr; + unsigned char currmode; + unsigned char screenheight; + unsigned char screenwidth; + unsigned char curx; + unsigned char cury; +}; + +enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7, C4350=64 }; + +enum COLORS { + /* dark colors */ + BLACK, + BLUE, + GREEN, + CYAN, + RED, + MAGENTA, + BROWN, + LIGHTGRAY, + /* light colors */ + DARKGRAY, /* "light black" */ + LIGHTBLUE, + LIGHTGREEN, + LIGHTCYAN, + LIGHTRED, + LIGHTMAGENTA, + YELLOW, + WHITE +}; + +#define BLINK 0x80 /* blink bit */ + +void blinkvideo(void); +char * cgets(char *_str); +void clreol(void); +void clrscr(void); +int _conio_kbhit(void); /* checks for ungetch char */ +int cprintf(const char *_format, ...) __attribute__((format(printf,1,2))); +int cputs(const char *_str); +int cscanf(const char *_format, ...) __attribute__((format(scanf,1,2))); +void delline(void); +int getch(void); +int getche(void); +int gettext(int _left, int _top, int _right, int _bottom, void *_destin); +void gettextinfo(struct text_info *_r); +void gotoxy(int _x, int _y); +void gppconio_init(void); +void highvideo(void); +void insline(void); +void intensevideo(void); +void lowvideo(void); +int movetext(int _left, int _top, int _right, int _bottom, int _destleft, int _desttop); +void normvideo(void); +int putch(int _c); +int puttext(int _left, int _top, int _right, int _bottom, void *_source); +void _setcursortype(int _type); +void _set_screen_lines(int _nlines); +void textattr(int _attr); +void textbackground(int _color); +void textcolor(int _color); +void textmode(int _mode); +int ungetch(int); +int wherex(void); +int wherey(void); +void window(int _left, int _top, int _right, int _bottom); + +#define kbhit _conio_kbhit /* Who ever includes gppconio.h probably + also wants _conio_kbhit and not kbhit + from libc */ + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_conio_h_ */ diff --git a/contrib/media/updf/include/console.c b/contrib/media/updf/include/console.c new file mode 100644 index 0000000000..5b5870295e --- /dev/null +++ b/contrib/media/updf/include/console.c @@ -0,0 +1,144 @@ +#include + + +///=========================== + +#define CON_COLOR_BLUE 1 +#define CON_COLOR_GREEN 2 +#define CON_COLOR_RED 4 +#define CON_COLOR_BRIGHT 8 +/* öâåò ôîíà */ +#define CON_BGR_BLUE 0x10 +#define CON_BGR_GREEN 0x20 +#define CON_BGR_RED 0x40 +#define CON_BGR_BRIGHT 0x80 + +///=========================== +#define _stdcall __attribute__((stdcall)) +#define __stdcall __attribute__((stdcall)) +#define _cdecl __attribute__((cdecl)) +#define __cdecl __attribute__((cdecl)) + + + + + +void (* _stdcall con_init)(unsigned w_w, unsigned w_h, unsigned s_w, unsigned s_h, const char* t); +void (* _cdecl printf)(const char* format,...); +void (* _stdcall _exit2)(char bCloseWindow); +void (* __stdcall gets)(char* str, int n); + int (* __stdcall getch)(void); + int (* __stdcall con_get_font_height)(void); + int (* __stdcall con_set_cursor_height)(int new_height); +unsigned (*__stdcall con_get_flags)(void); +unsigned (*__stdcall con_set_flags)(unsigned new_flags); +void (*__stdcall con_cls)(void); + +typedef struct +{ +unsigned p00 __attribute__((packed)); +unsigned p04 __attribute__((packed)); +unsigned p08 __attribute__((packed)); +unsigned p12 __attribute__((packed)); +unsigned p16 __attribute__((packed)); +char p20 __attribute__((packed)); +char *p21 __attribute__((packed)); +} kol_struct70 __attribute__((packed)); + +typedef struct +{ +char *name __attribute__((packed)); +void *data __attribute__((packed)); +} kol_struct_import __attribute__((packed)); + +///=========================== + +void kol_exit() +{ +asm ("int $0x40"::"a"(-1)); +} + +int kol_file_70(kol_struct70 *k) +{ +asm ("int $0x40"::"a"(70), "b"(k)); +} + + + +void* kol_cofflib_procload (kol_struct_import *imp, char *name) +{ +int i; +for (i=0;;i++) + if ( NULL == ((imp+i) -> name)) + break; + else + if ( 0 == strcmp(name, (imp+i)->name) ) + return (imp+i)->data; +return NULL; +} + + + + +void CONSOLE_INIT(char title[]) +{ +kol_struct_import *imp; + +__menuet__debug_out ("console init"); +imp = __kolibri__cofflib_load("/sys/lib/console.obj"); +if (imp == NULL) + {__menuet__debug_out ("imp NULL"); kol_exit();} + +con_init = ( _stdcall void (*)(unsigned, unsigned, unsigned, unsigned, const char*)) + kol_cofflib_procload (imp, "con_init"); +if (con_init == NULL) + {__menuet__debug_out ("con init failed"); kol_exit();} + +printf = ( _cdecl void (*)(const char*,...)) + kol_cofflib_procload (imp, "con_printf"); +if (printf == NULL) + kol_exit(); + +_exit2 = ( _stdcall void (*)(char)) + kol_cofflib_procload (imp, "con_exit"); +if (_exit2 == NULL) + kol_exit(); + +gets = ( _stdcall void (*)(char*, int)) + kol_cofflib_procload (imp, "con_gets"); +if (gets == NULL) + kol_exit(); + +getch = ( _stdcall int (*)(void)) + kol_cofflib_procload (imp, "con_getch2"); +if (getch == NULL) + kol_exit(); + +con_get_font_height = ( _stdcall int (*)(void)) + kol_cofflib_procload (imp, "con_get_font_height"); +if (con_get_font_height == NULL) + kol_exit(); + +con_set_cursor_height = ( _stdcall int (*)(int)) + kol_cofflib_procload (imp, "con_set_cursor_height"); +if (con_set_cursor_height == NULL) + kol_exit(); + +con_get_flags = ( _stdcall unsigned (*)(void)) + kol_cofflib_procload (imp, "con_get_flags"); +if (con_get_flags == NULL) + kol_exit(); + +con_set_flags = ( _stdcall unsigned (*)(unsigned)) + kol_cofflib_procload (imp, "con_set_flags"); +if (con_set_flags == NULL) + kol_exit(); + +con_cls = ( _stdcall void (*)(void)) + kol_cofflib_procload (imp, "con_cls"); +if (con_cls == NULL) + kol_exit(); + +__menuet__debug_out ("success"); +con_init(-1, -1, -1, -1, title); +} diff --git a/contrib/media/updf/include/core_yacasmain.h b/contrib/media/updf/include/core_yacasmain.h new file mode 100644 index 0000000000..39cdad0d09 --- /dev/null +++ b/contrib/media/updf/include/core_yacasmain.h @@ -0,0 +1,8 @@ +CORE_KERNEL_FUNCTION("Exit",LispExit,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsExitRequested",LispExitRequested,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("HistorySize",LispHistorySize,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("StaSiz",LispStackSize,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsPromptShown",LispIsPromptShown,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ReadCmdLineString",LispReadCmdLineString,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("GetTime",LispTime,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FileSize",LispFileSize,1,YacasEvaluator::Function | YacasEvaluator::Fixed) diff --git a/contrib/media/updf/include/corefunctions.h b/contrib/media/updf/include/corefunctions.h new file mode 100644 index 0000000000..99a8d178be --- /dev/null +++ b/contrib/media/updf/include/corefunctions.h @@ -0,0 +1,251 @@ +// +// declare the core functions that have special syntax +// + +OPERATOR(bodied,KMaxPrecedence,While) +OPERATOR(bodied,KMaxPrecedence,Rule) +OPERATOR(bodied,KMaxPrecedence,MacroRule) +OPERATOR(bodied,KMaxPrecedence,RulePattern) +OPERATOR(bodied,KMaxPrecedence,MacroRulePattern) +OPERATOR(bodied,KMaxPrecedence,FromFile) +OPERATOR(bodied,KMaxPrecedence,FromString) +OPERATOR(bodied,KMaxPrecedence,ToFile) +OPERATOR(bodied,KMaxPrecedence,ToString) +OPERATOR(bodied,KMaxPrecedence,ToStdout) +OPERATOR(bodied,KMaxPrecedence,TraceRule) +OPERATOR(bodied,KMaxPrecedence,Subst) +OPERATOR(bodied,KMaxPrecedence,LocalSymbols) +OPERATOR(bodied,KMaxPrecedence,BackQuote) +OPERATOR(prefix,0,`) +OPERATOR(prefix,0,@) +OPERATOR(prefix,0,_) +OPERATOR(infix,0,_) + + +// +// Evaluation direction. +// +CORE_KERNEL_FUNCTION("Hold",LispQuote,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Eval",LispEval,1,YacasEvaluator::Function | YacasEvaluator::Fixed) + +// +// Input/output functions +// +CORE_KERNEL_FUNCTION("Write",LispWrite,1,YacasEvaluator::Function | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("WriteString",LispWriteString,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FullForm",LispFullForm,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefaultDirectory",LispDefaultDirectory,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FromFile",LispFromFile,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FromString",LispFromString,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Read",LispRead,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ReadToken",LispReadToken,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ToFile",LispToFile,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ToString",LispToString,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ToStdout",LispToStdout,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Load",LispLoad,1,YacasEvaluator::Function | YacasEvaluator::Fixed) + +// +// Variable setting/clearing +// +CORE_KERNEL_FUNCTION("Set",LispSetVar,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MacroSet",LispMacroSetVar,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +// MacroClear is the same as Clear, but with its arguments evaluated first +CORE_KERNEL_FUNCTION("Clear",LispClearVar,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("MacroClear",LispClearVar,1,YacasEvaluator::Function | YacasEvaluator::Variable) + +CORE_KERNEL_FUNCTION("Local",LispNewLocal,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("MacroLocal",LispNewLocal,1,YacasEvaluator::Function | YacasEvaluator::Variable) + +// +// List and compound object manipulation +// +CORE_KERNEL_FUNCTION("Head",LispHead,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathNth",LispNth,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Tail",LispTail,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DestructiveReverse",LispDestructiveReverse,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Length",LispLength,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("List",LispList,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("UnList",LispUnList,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Listify",LispListify,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Concat",LispConcatenate,1,YacasEvaluator::Function | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("ConcatStrings",LispConcatenateStrings,1,YacasEvaluator::Function | YacasEvaluator::Variable) + +CORE_KERNEL_FUNCTION("Delete",LispDelete,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DestructiveDelete",LispDestructiveDelete,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Insert",LispInsert,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DestructiveInsert",LispDestructiveInsert,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Replace",LispReplace,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DestructiveReplace",LispDestructiveReplace,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Atom",LispAtomize,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("String",LispStringify,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CharString",LispCharString,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FlatCopy",LispFlatCopy,1,YacasEvaluator::Function | YacasEvaluator::Fixed) + +//???CORE_KERNEL_FUNCTION("",LispNoCacheConcatenateStrings) + +// +// Program control flow +// +CORE_KERNEL_FUNCTION("Prog",LispProgBody,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("While",LispWhile,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("If",LispIf,2,YacasEvaluator::Macro | YacasEvaluator::Variable) +// +// Error handling +// +CORE_KERNEL_FUNCTION("Check",LispCheck,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("TrapError",LispTrapError,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("GetCoreError",LispGetCoreError,0,YacasEvaluator::Function | YacasEvaluator::Fixed) + +// +// User function definition +// +CORE_KERNEL_FUNCTION("Prefix",LispPreFix,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Infix",LispInFix,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Postfix",LispPostFix,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Bodied",LispBodied,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RuleBase",LispRuleBase,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MacroRuleBase",LispMacroRuleBase,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RuleBaseListed",LispRuleBaseListed,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MacroRuleBaseListed",LispMacroRuleBaseListed,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefMacroRuleBase",LispDefMacroRuleBase,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefMacroRuleBaseListed",LispDefMacroRuleBaseListed,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("HoldArg",LispHoldArg,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Rule",LispNewRule,5,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MacroRule",LispMacroNewRule,5,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("UnFence",LispUnFence,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Retract",LispRetract,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +// +// Predicates +// +CORE_KERNEL_FUNCTION("MathNot",LispNot,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION_ALIAS("Not",LispNot,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathAnd",LispLazyAnd,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION_ALIAS("And",LispLazyAnd,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("MathOr",LispLazyOr,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION_ALIAS("Or",LispLazyOr,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("Equals",LispEquals,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION_ALIAS("=",LispEquals,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("LessThan",LispLessThan,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("GreaterThan",LispGreaterThan,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsFunction",LispIsFunction,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsAtom",LispIsAtom,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsNumber",LispIsNumber,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsInteger",LispIsInteger,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsList",LispIsList,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsString",LispIsString,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsBound",LispIsBound,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +// +// Math functions (REQUIRING number inputs);. +// +CORE_KERNEL_FUNCTION("MathMultiply",LispMultiply,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathAdd",LispAdd,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathSubtract",LispSubtract,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathDivide",LispDivide,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Builtin'Precision'Set",YacasBuiltinPrecisionSet,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathGetExactBits",LispGetExactBits,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathSetExactBits",LispSetExactBits,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathBitCount",LispBitCount,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathSign",LispMathSign,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathIsSmall",LispMathIsSmall,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathNegate",LispMathNegate,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathFloor",LispFloor,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathCeil",LispCeil,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathAbs",LispAbs,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathMod",LispMod,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathDiv",LispDiv,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("BitsToDigits",LispBitsToDigits,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DigitsToBits",LispDigitsToBits,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathGcd",LispGcd,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("SystemCall",LispSystemCall,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FastArcSin",LispFastArcSin,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FastLog",LispFastLog,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FastPower",LispFastPower,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ShiftLeft",LispShiftLeft,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ShiftRight",LispShiftRight,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FromBase",LispFromBase,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ToBase",LispToBase,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MaxEvalDepth",LispMaxEvalDepth,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefLoad",LispDefLoad,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Use",LispUse,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RightAssociative",LispRightAssociative,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("LeftPrecedence",LispLeftPrecedence,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RightPrecedence",LispRightPrecedence,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsBodied",LispIsBodied,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsInfix",LispIsInFix,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsPrefix",LispIsPreFix,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("IsPostfix",LispIsPostFix,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("OpPrecedence",LispGetPrecedence,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("OpLeftPrecedence",LispGetLeftPrecedence,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("OpRightPrecedence",LispGetRightPrecedence,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Builtin'Precision'Get",YacasBuiltinPrecisionGet,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("BitAnd",LispBitAnd,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("BitOr",LispBitOr,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("BitXor",LispBitXor,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Secure",LispSecure,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FindFile",LispFindFile,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("FindFunction",LispFindFunction,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +// Generic object support +CORE_KERNEL_FUNCTION("IsGeneric",LispIsGeneric,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("GenericTypeName",LispGenericTypeName,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Array'Create",GenArrayCreate,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Array'Size",GenArraySize,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Array'Get",GenArrayGet,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Array'Set",GenArraySet,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CustomEval",LispCustomEval,4,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CustomEval'Expression",LispCustomEvalExpression,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CustomEval'Result",LispCustomEvalResult,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CustomEval'Locals",LispCustomEvalLocals,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CustomEval'Stop",LispCustomEvalStop,0,YacasEvaluator::Function | YacasEvaluator::Fixed) + +CORE_KERNEL_FUNCTION("TraceRule",LispTraceRule,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("TraceStack",LispTraceStack,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("LispRead",LispReadLisp,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("LispReadListed",LispReadLispListed,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Type",LispType,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("StringMid'Get",YacasStringMidGet,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("StringMid'Set",YacasStringMidSet,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +// Pattern matching +CORE_KERNEL_FUNCTION("Pattern'Create",GenPatternCreate,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Pattern'Matches",GenPatternMatches,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RuleBaseDefined",LispRuleBaseDefined,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefLoadFunction",LispDefLoadFunction,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RuleBaseArgList",LispRuleBaseArgList,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("RulePattern",LispNewRulePattern,5,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MacroRulePattern",LispMacroNewRulePattern,5,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Subst",LispSubst,3,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("LocalSymbols",LispLocalSymbols,1,YacasEvaluator::Macro | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("FastIsPrime",LispFastIsPrime,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("MathFac",LispFac,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ApplyPure",LispApplyPure,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("PrettyReader'Set",YacasPrettyReaderSet,1,YacasEvaluator::Function | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("PrettyReader'Get",YacasPrettyReaderGet,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("PrettyPrinter'Set",YacasPrettyPrinterSet,1,YacasEvaluator::Function | YacasEvaluator::Variable) +CORE_KERNEL_FUNCTION("PrettyPrinter'Get",YacasPrettyPrinterGet,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("GarbageCollect",LispGarbageCollect,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("SetGlobalLazyVariable",LispSetGlobalLazyVariable,2,YacasEvaluator::Macro | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("PatchLoad",LispPatchLoad,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("PatchString",LispPatchString,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ExtraInfo'Set",YacasExtraInfoSet,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("ExtraInfo'Get",YacasExtraInfoGet,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DefaultTokenizer",LispDefaultTokenizer,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CommonLispTokenizer",LispCommonLispTokenizer,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("XmlTokenizer",LispXmlTokenizer,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("XmlExplodeTag",LispExplodeTag,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("Builtin'Assoc",YacasBuiltinAssoc,2,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CurrentFile",LispCurrentFile,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("CurrentLine",LispCurrentLine,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("`",LispBackQuote,1,YacasEvaluator::Macro | YacasEvaluator::Fixed) + +// +// Debugging functions +// +CORE_KERNEL_FUNCTION("MathDebugInfo",LispDumpBigNumberDebugInfo,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("InDebugMode",LispInDebugMode,0,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DebugFile",LispDebugFile,1,YacasEvaluator::Function | YacasEvaluator::Fixed) +CORE_KERNEL_FUNCTION("DebugLine",LispDebugLine,1,YacasEvaluator::Function | YacasEvaluator::Fixed) + +// +// Information functions +// +CORE_KERNEL_FUNCTION("Version",LispVersion,0,YacasEvaluator::Function | YacasEvaluator::Fixed) + diff --git a/contrib/media/updf/include/crc32.h b/contrib/media/updf/include/crc32.h new file mode 100644 index 0000000000..13b33c0867 --- /dev/null +++ b/contrib/media/updf/include/crc32.h @@ -0,0 +1,8 @@ + +long crc32val; + +void UpdateCRC(unsigned char *s, + register int len); + + /* update running CRC calculation with contents of a buffer */ + diff --git a/contrib/media/updf/include/crt0.h b/contrib/media/updf/include/crt0.h new file mode 100644 index 0000000000..e47231b2e0 --- /dev/null +++ b/contrib/media/updf/include/crt0.h @@ -0,0 +1,191 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_crt0_h_ +#define __dj_include_crt0_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/*****************************************************************************\ + * crt0.h - specific to go32 v2.0 applications, controls command line + * argument creation. +\*****************************************************************************/ + +/*****************************************************************************\ + * If the application wishes to provide a wildcard expansion function, + * it should define a __crt0_glob_function function. It should return + * a list of the expanded values, or 0 if no expansion will occur. + * The startup code will free the returned pointer if it is nonzero. + * + * If no expander function is provided, wildcards will be expanded in + * the POSIX.1 style. To disable expansion, provide a __crt0_glob_function + * that always returns 0. + * + * Applications that do not rely on environment variables can provide an + * alternate version of __crt0_load_environment_file that does nothing. + * + * Applications that do not rely on arguments passed to main() can + * provide an alternate version of __crt0_setup_arguments() that does + * nothing. +\*****************************************************************************/ + +extern char *__dos_argv0; +extern int __crt0_argc; +extern char **__crt0_argv; + +void __crt0_load_environment_file(char *_app_name); +void __crt0_setup_arguments(void); +char **__crt0_glob_function(char *_arg); + +/*****************************************************************************\ + * + * To set any of these startup flags, add the following declaration to + * *your* source code: + * + * int _crt0_startup_flags = _CRT0_FLAG_* | _CRT0_FLAG_*; + * + * The default is all flags off. + * +\*****************************************************************************/ + +extern int _crt0_startup_flags; + +/* If set, argv[0] is left in whatever case it was. If not set, all +** characters are mapped to lower case. Note that if the argv0 field in +** the stubinfo structure is present, the case of that part of argv0 is not +** affected. +*/ +#define _CRT0_FLAG_PRESERVE_UPPER_CASE 0x0001 + +/* If set, reverse slashes (dos-style) are preserved in argv[0]. If not +** set, all reverse slashes are replaced with unix-style slashes. +*/ +#define _CRT0_FLAG_USE_DOS_SLASHES 0x0002 + +/* If set, the .EXE suffix is removed from the file name component of +** argv[0]. If not set, the suffix remains. +*/ +#define _CRT0_FLAG_DROP_EXE_SUFFIX 0x0004 + +/* If set, the drive specifier (ex: `C:') is removed from the beginning of +** argv[0] (if present). If not set, the drive specifier remains. +*/ +#define _CRT0_FLAG_DROP_DRIVE_SPECIFIER 0x0008 + +/* If set, response files (ex: @gcc.rf) are not expanded. If not set, the +** contents of the response files are used to create arguments. Note that +** if the file does not exist, that argument remains unexpanded. +*/ +#define _CRT0_FLAG_DISALLOW_RESPONSE_FILES 0x0010 + +/* If set, fill sbrk()'d memory with a constant value. If not, memory +** gets whatever happens to have been in there, which breaks some +** applications. +*/ +#define _CRT0_FLAG_FILL_SBRK_MEMORY 0x0020 + +/* If set, fill memory (above) with 0xdeadbeef, else fill with zero. +** This is especially useful for debugging uninitialized memory problems. +*/ +#define _CRT0_FLAG_FILL_DEADBEEF 0x0040 + +/* If set, set DS limit to 4GB which allows use of near pointers to DOS +** (and other) memory. WARNING, disables memory protection and bad pointers +** may crash the machine or wipe out your data. +*/ +#define _CRT0_FLAG_NEARPTR 0x0080 + +/* If set, disable NULL pointer protection (if it can be controlled at all). +*/ +#define _CRT0_FLAG_NULLOK 0x0100 + +/* If set, enabled capture of NMI in exception code. This may cause problems +** with laptops and "green" boxes which use it to wake up. Default is to +** leave NMIs alone and pass through to real mode code. You decide. +*/ +#define _CRT0_FLAG_NMI_SIGNAL 0x0200 + +/* If set, disable usage of long file name functions even on systems +** (such as Win95) which support them. This might be needed to work +** around program assumptions on file name format on programs written +** specifically for DOS. +*/ +#define _CRT0_FLAG_NO_LFN 0x0400 + +/* If set, chooses an sbrk() algorithm. If your code requires one type +** or the other, set the value (since the default may change). The non-move +** sbrk makes sure the base of CS/DS/SS does not change. Each new sbrk() +** allocation is put in a different DPMI memory block. This works best with +** DOS programs which would like to use near pointers or hardware interrupts. +** The unix sbrk resizes a single memory block, so programs making assumptions +** about unix-like sbrk behavior may run better with this choice. +*/ +#define _CRT0_FLAG_NONMOVE_SBRK 0x0000 /* Default */ +#define _CRT0_FLAG_UNIX_SBRK 0x0800 + +/* If set, locks all memory as it is allocated. This effectively disables +** virtual memory, and may be useful if using extensive hardware interrupt +** codes in a relatively small image size. The memory is locked after it +** is sbrk()ed, so the locking may fail. This bit may be set or cleared +** during execution. When sbrk() uses multiple memory zones, it can be +** difficult to lock all memory since the memory block size and location is +** impossible to determine. +*/ + +#define _CRT0_FLAG_LOCK_MEMORY 0x1000 + +/* If set, disables all filename letter-case conversion in functions that +** traverse directories (except findfirst/findnext which always return the +** filenames exactly as found in the directory entry). When reset, all +** filenames on 8+3 MSDOS filesystems and DOS-style 8+3 filenames on LFN +** systems are converted to lower-case by functions such as `readdir', +** `getcwd', `_fixpath' and `srchpath'. Note that when this flag is set, +** ALL filenames on MSDOS systems will appear in upper-case, which is +** both ugly and will break many Unix-born programs. Use only if you know +** exactly what you are doing! +*/ + +#define _CRT0_FLAG_PRESERVE_FILENAME_CASE 0x2000 + +/* If set, the quote characters ', ", and \ will be retained in argv[] +** elements when processing command lines passed via `system'. This is +** used by `redir', and should only be needed if you want to get the +** original command line exactly as it was passed by the caller. +*/ + +#define _CRT0_FLAG_KEEP_QUOTES 0x4000 + +/*****************************************************************************\ + * Access to the memory handles used by the non-move sbrk algorithm. + * The handle is the SI:DI DPMI handle; the address is the offset relative + * to the application's address space. Address will be zero unused slots > 1. +\*****************************************************************************/ + +typedef struct { + long handle; + unsigned address; + } __djgpp_sbrk_handle; + +extern __djgpp_sbrk_handle __djgpp_memory_handle_list[256]; +__djgpp_sbrk_handle *__djgpp_memory_handle(unsigned address); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_crt0_h_ */ diff --git a/contrib/media/updf/include/csetjmp b/contrib/media/updf/include/csetjmp new file mode 100644 index 0000000000..ce6fb32c95 --- /dev/null +++ b/contrib/media/updf/include/csetjmp @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSETJMP +#include +#endif diff --git a/contrib/media/updf/include/csignal b/contrib/media/updf/include/csignal new file mode 100644 index 0000000000..b3da42a9a7 --- /dev/null +++ b/contrib/media/updf/include/csignal @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSIGNAL +#include +#endif diff --git a/contrib/media/updf/include/cstdarg b/contrib/media/updf/include/cstdarg new file mode 100644 index 0000000000..36032b22c2 --- /dev/null +++ b/contrib/media/updf/include/cstdarg @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDARG +#include +#endif diff --git a/contrib/media/updf/include/cstddef b/contrib/media/updf/include/cstddef new file mode 100644 index 0000000000..086bb726b2 --- /dev/null +++ b/contrib/media/updf/include/cstddef @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDDEF +#include +#endif diff --git a/contrib/media/updf/include/cstdio b/contrib/media/updf/include/cstdio new file mode 100644 index 0000000000..7a6cf8306d --- /dev/null +++ b/contrib/media/updf/include/cstdio @@ -0,0 +1,18 @@ +#ifndef _CSTDIO_INCLUDED +#define _CSTDIO_INCLUDED +#include +class ios +{ +public: + enum open_mode { in = 0x01, + out = 0x02, + ate = 0x04, + app = 0x08, + trunc = 0x10, + nocreate = 0x20, + noreplace = 0x40, + binary = 0x80 }; + enum seek_dir { beg=0, cur=1, end=2 }; + +}; +#endif diff --git a/contrib/media/updf/include/cstdlib b/contrib/media/updf/include/cstdlib new file mode 100644 index 0000000000..7796c6b325 --- /dev/null +++ b/contrib/media/updf/include/cstdlib @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDLIB +#include +#endif diff --git a/contrib/media/updf/include/cstring b/contrib/media/updf/include/cstring new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/media/updf/include/ctime b/contrib/media/updf/include/ctime new file mode 100644 index 0000000000..b19136e87a --- /dev/null +++ b/contrib/media/updf/include/ctime @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CTIME +#include +#endif diff --git a/contrib/media/updf/include/ctype.h b/contrib/media/updf/include/ctype.h new file mode 100644 index 0000000000..df46ae22da --- /dev/null +++ b/contrib/media/updf/include/ctype.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_ctype_h_ +#define __dj_include_ctype_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +int isalnum(int c); +int isalpha(int c); +int iscntrl(int c); +int isdigit(int c); +int isgraph(int c); +int islower(int c); +int isprint(int c); +int ispunct(int c); +int isspace(int c); +int isupper(int c); +int isxdigit(int c); +int tolower(int c); +int toupper(int c); + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#include +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +int isascii(int c); +int toascii(int c); + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#include +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_ctype_h_ */ diff --git a/contrib/media/updf/include/curses.h b/contrib/media/updf/include/curses.h new file mode 100755 index 0000000000..f1ecf40c43 --- /dev/null +++ b/contrib/media/updf/include/curses.h @@ -0,0 +1,946 @@ +/* +*************************************************************************** +* This file comprises part of PDCurses. PDCurses is Public Domain software. +* You may use this code for whatever purposes you desire. This software +* is provided AS IS with NO WARRANTY whatsoever. +* Should this software be used in another application, an acknowledgement +* that PDCurses code is used would be appreciated, but is not mandatory. +* +* Any changes which you make to this software which may improve or enhance +* it, should be forwarded to the current maintainer for the benefit of +* other users. +* +* The only restriction placed on this code is that no distribution of +* modified PDCurses code be made under the PDCurses name, by anyone +* other than the current maintainer. +* +* See the file maintain.er for details of the current maintainer. +*************************************************************************** +*/ +/* +$Id$ +*/ +/* +*---------------------------------------------------------------------- +* PDCurses +*---------------------------------------------------------------------- +* MH +* 950126 2.2 Added more System V R4 functions +* +* Added beta Xwindows port +* +* Changed chtype to long +* +* Incorporated panels library +* +* Support for more and newer versions of compilers +* +* MH +* 930531 2.1 Added support for djgpp +* +* Added beta Unix version +* +* Added OS/2 DLL support. +* +* Changed behaviour of overlay(), overwrite() and typeahead() +* +* 921120 2.0 Changed #if to #ifdef/#if defined to make it +* easier to add new platforms/compilers. +* +* Added System V colour support. +* +* Added OS/2 port. +*------- +* Frotz +* 911221 2.0 pre-beta Changed back from short to int. (int is the +* correct size for the default platform. Short +* might be too short on some platforms. This +* is more portable. I, also, made this mistake.) +* +* Many functions are now macros. If you want +* the real thing, #undef the macro. (X/Open +* requirement.) +* +* Merged many sources into current release. +* +* Added many X/Open routines (not quite all yet). +* +* Added internal documentation to all routines. +* +* Added a HISTORY file to the environment. +* +* Added a CONTRIB file to the environment. +*------- +* bl 900114 1.4 Window origin mod in overlay() and overwrite(), on +* public (and very reasonable) request. Swapped +* #define'd values of OK and ERR; OK now 1, and +* ERR is 0/NULL. Conforms better to UNIX +* versions. borderchars[] removed from WINDOW +* struct since the border() functions were +* redefined. Use of short wherever possible. +* Portability improvements, mispelled name of +* [w]setscrreg(). +* +* 881005 1.3 All modules lint-checked with MSC '-W3' and +* turbo'C' '-w -w-pro' switches. Support for +* border(), wborder() functions. +* +* 881002 1.2 Rcsid[] string in all modules, for maintenance. +* +* 880306 1.1 'Raw' output routines, revision info in curses.h. +* +* 870515 1.0 Initial Release. +* +*---------------------------------------------------------------------- +*/ + +#ifndef __PDCURSES__ +#define __PDCURSES__ 1 + +/*man-start********************************************************************* + +All defines are "defined" here. All compiler and environment +specific definitions are defined into generic class defines. +These defines are to be given values so that the code can +rely on #if, rather than a complicated set of #if defined() or +#ifdefs... + +PDCurses definitions list: (Only define those needed) + + REGISTERWINDOWS True for auto window update registery. + FAST_VIDEO True if display is memory mapped, or + we can utilize the fast video update routines. + DOS True if compiling for DOS. + OS2 True if compiling for OS/2. + FLEXOS True if compiling for Flexos. + HC True if using a Metaware compiler. + TC True if using a Borland compiler. + MSC True if using a Microsoft compiler. + ANSI True if the compiler supports ANSI C and + (full or mixed) prototypes. + CPLUSPLUS True if the compiler supports C++. + +PDCurses portable platform definitions list: + + PDCurses Enables access to PDCurses-only routines. + XOPEN Always true. + SYSV True if you are compiling for SYSV portability. + BSD True if you are compiling for BSD portability. + INTERNAL Enables access to internal PDCurses routines. + PDCURSES_WCLR Makes behaviour of wclrtoeol() and wclrtoeof() + unique to PDCurses. By default Unix behavior is set. + See notes in wclrtoeol() and wclrtoeof(). +**man-end**********************************************************************/ + +#define PDCURSES 1 /* PDCurses-only routines */ +#define XOPEN 1 /* X/Open Curses routines */ +#define SYSV 1 /* System V Curses routines */ +#define BSD 1 /* BSD Curses routines */ +#define INTERNAL 1 /* PDCurses Internal routines */ + + +#ifdef __MENUET_CURSES__ + +#undef DOS +#undef LINUX +#undef UNIX +#define MENUETOS 1 +#define ANSI 1 +#define CURSES__32BIT__ +#ifdef _cplusplus +#define CPLUSPLUS 1 +#endif +#define NO_VSSCANF 1 +#endif + +/*---------------------------------------------------------------------*/ +#include /* Required by X/Open usage below */ +/*---------------------------------------------------------------------- + * + * PDCurses Manifest Constants + * + */ +#ifndef FALSE /* booleans */ +# define FALSE 0 +#endif +#ifndef TRUE /* booleans */ +# define TRUE !FALSE +#endif +#ifndef NULL +# define NULL ((void*)0) /* Null pointer */ +#endif +#ifndef ERR +# define ERR 0 /* general error flag */ +#endif +#ifndef OK +# define OK 1 /* general OK flag */ +#endif + + + + +/*---------------------------------------------------------------------- + * + * PDCurses Type Declarations + * + */ +typedef unsigned char bool; /* PDCurses Boolean type */ +typedef unsigned short chtype; /* 8-bit attr + 8-bit char */ + + + +/*---------------------------------------------------------------------- + * + * PDCurses Structure Definitions: + * + */ +typedef struct _win /* definition of a window. */ +{ + int _cury; /* current pseudo-cursor */ + int _curx; + int _maxy; /* max window coordinates */ + int _maxx; + int _pmaxy; /* max physical size */ + int _pmaxx; + int _begy; /* origin on screen */ + int _begx; + int _lastpy; /* last y coordinate of upper left pad display area */ + int _lastpx; /* last x coordinate of upper left pad display area */ + int _lastsy1; /* last upper y coordinate of screen window for pad */ + int _lastsx1; /* last upper x coordinate of screen window for pad */ + int _lastsy2; /* last lower y coordinate of screen window for pad */ + int _lastsx2; /* last lower x coordinate of screen window for pad */ + int _flags; /* window properties */ + chtype _attrs; /* standard A_STANDOUT attributes and colors */ + chtype _bkgd; /* wrs(4/6/93) background, normally blank */ + int _tabsize; /* tab character size */ + bool _clear; /* causes clear at next refresh */ + bool _leave; /* leaves cursor as it happens */ + bool _scroll; /* allows window scrolling */ + bool _nodelay; /* input character wait flag */ + bool _immed; /* immediate update flag */ + bool _use_keypad; /* flags keypad key mode active */ + bool _use_idl; /* True if Ins/Del line can be used*/ + bool _use_idc; /* True if Ins/Del character can be used*/ + chtype**_y; /* pointer to line pointer array */ + int* _firstch; /* first changed character in line */ + int* _lastch; /* last changed character in line */ + int _tmarg; /* top of scrolling region */ + int _bmarg; /* bottom of scrolling region */ + char* _title; /* window title */ + char _title_ofs; /* window title offset from left */ + chtype _title_attr; /* window title attributes */ + chtype _blank; /* window's blank character */ + int _parx, _pary; /* coords relative to parent (0,0) */ +struct _win* _parent; /* subwin's pointer to parent win */ +} WINDOW; + + + +/*---------------------------------------------------------------------- +* +* Private structures that are necessary for correct +* macro construction. +* +*/ + +#ifdef REGISTERWINDOWS +typedef struct _ref /* Refresh Window Structure */ +{ + WINDOW* win; +struct _ref* next; +struct _ref* tail; +} ACTIVE; + +typedef struct _wins +{ + WINDOW* w; /* pointer to a visible window */ + struct _wins* next; /* Next visible window pointer */ + struct _wins* prev; /* Next visible window pointer */ + struct _wins* tail; /* Last visible window pointer */ + /* Only head window (stdscr) has */ + /* a valid tail pointer. */ +} WINDS; +#endif + + + + +typedef struct +{ + bool alive; /* TRUE if already opened. */ + bool autocr; /* if lf -> crlf */ + bool cbreak; /* if terminal unbuffered */ + bool echo; /* if terminal echo */ + bool raw_inp; /* raw input mode (v. cooked input) */ + bool raw_out; /* raw output mode (7 v. 8 bits) */ + bool refrbrk; /* if premature refresh brk allowed */ + bool orgcbr; /* original MSDOS ^-BREAK setting */ + bool visible_cursor; /* TRUE if cursor is visible */ + bool audible; /* FALSE if the bell is visual */ + bool full_redraw; /* TRUE for bad performance */ + bool direct_video; /* Allow Direct Screen Memory writes*/ + bool mono; /* TRUE if current screen is mono. */ + bool sizeable; /* TRUE if adapter is resizeable. */ + bool bogus_adapter; /* TRUE if adapter has insane values*/ + bool shell; /* TRUE if reset_prog_mode() needs */ + /* to be called. */ + chtype blank; /* Background character */ + chtype orig_attr; /* Original screen attributes */ + int cursrow; /* position of physical cursor */ + int curscol; /* position of physical cursor */ + int cursor; /* Current Cursor definition */ + int visibility; /* Visibility of cursor */ + int video_page; /* Current PC video page */ + int orig_emulation; /* Original cursor emulation value */ + int orig_cursor; /* Original cursor size */ + int font; /* default font size */ + int orig_font; /* Original font size */ + int lines; /* New value for LINES */ + int cols; /* New value for COLS */ + int emalloc; /* 0x0C0C if initscr() is to reset */ + /* this value to TRUE; */ + /* TRUE only if emalloc()/ecalloc() */ + /* are is to be used; */ + /* FALSE if malloc()/calloc() are */ + /* to be used. */ + int tahead; /* Type-ahead value */ + int adapter; /* Screen type */ +#ifdef UNIX + int adapter; /* Screen type */ + int number_keys; /* number of function keys */ + char *key_seq[200]; /* key sequence ptr for function keys */ + int key_num[200]; /* key numbers for function keys */ +#endif + +} SCREEN; + + + + + +/* external variables */ +extern int LINES; /* terminal height */ +extern int COLS; /* terminal width */ +extern WINDOW* stdscr; /* the default screen window */ +extern SCREEN _cursvar; /* curses variables */ + +#if defined (INTERNAL) | defined (CURSES_LIBRARY) +extern WINDOW* curscr; /* the current screen image */ +extern int _default_lines; /* For presetting maximum lines */ +#endif + +#ifdef REGISTERWINDOWS +extern ACTIVE* CurWins; /* Currently Visible Windows */ +#endif + + + + +/*man-start********************************************************************* + +PDCurses Text Attributes: + +To include colour in PDCurses, a number of things had to be sacrificed +from the strict Unix and System V support. +The main problem is fitting all character attributes and colour into +an unsigned char (all 8 bits!). On System V, chtype is a long on +PDCurses it is a short int. + +The following is the structure of a win->_attrs chtype: + +------------------------------------------------- +|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| +------------------------------------------------- + colour number | attrs | character eg 'a' + +the high order char is an index into an array of physical colours +(defined in INITPAIR.c). 32 (5 bits) foreground/background colour +combinations combined with 8 (3 bits) attribute modifiers are +available. + +The available attribute enhancers are bold, reverse and blink. +All other Unix attributes have no effect as attributes. This +limitation may be overcome in future releases by expanding chtype +to a long. + +**man-end**********************************************************************/ + +/* Video attribute definitions. */ +#define A_NORMAL (chtype)0x0000 /* SysV */ +#define A_ALTCHARSET (chtype)0x0000 /* X/Open */ +#define A_BLINK (chtype)0x0400 /* X/Open */ +#define A_BLANK (chtype)0x0000 /* X/Open */ +#define A_BOLD (chtype)0x0100 /* X/Open */ +#define A_DIM (chtype)0x0000 /* X/Open */ +#define A_PROTECT (chtype)0x0000 /* X/Open */ +#define A_REVERSE (chtype)0x0200 /* X/Open */ +#define A_STANDOUT ((chtype)(A_REVERSE | A_BOLD)) /* X/Open */ +#define A_UNDERLINE (chtype)0x0000 /* X/Open */ +#define A_COLOR (chtype)0xF800 /*System V */ +#define A_CHARTEXT (chtype)(0xFF) /* X/Open */ +#define A_ATTRIBUTES (chtype)(~A_CHARTEXT) /* X/Open */ + +#define CHR_MSK A_CHARTEXT /* Obsolete */ +#define ATR_MSK A_ATTRIBUTES /* Obsolete */ +#define ATR_NRM A_NORMAL /* Obsolete */ + +#define ACS_ULCORNER (chtype)0xda /* SysV */ +#define ACS_LLCORNER (chtype)0xc0 /* SysV */ +#define ACS_URCORNER (chtype)0xbf /* SysV */ +#define ACS_LRCORNER (chtype)0xd9 /* SysV */ +#define ACS_RTEE (chtype)0xb4 /* SysV */ +#define ACS_LTEE (chtype)0xc3 /* SysV */ +#define ACS_BTEE (chtype)0xc1 /* SysV */ +#define ACS_TTEE (chtype)0xc2 /* SysV */ +#define ACS_HLINE (chtype)0xc4 /* SysV */ +#define ACS_VLINE (chtype)0xb3 /* SysV */ +#define ACS_PLUS (chtype)0xc5 /* SysV */ +#define ACS_S1 (chtype)0x2d /* SysV */ +#define ACS_S9 (chtype)0x5f /* SysV */ +#define ACS_DIAMOND (chtype)0xc5 /* SysV */ +#define ACS_CKBOARD (chtype)0xb2 /* SysV */ +#define ACS_DEGREE (chtype)0xf8 /* SysV */ +#define ACS_PLMINUS (chtype)0xf1 /* SysV */ +#define ACS_BULLET (chtype)0xf9 /* SysV */ +#define ACS_LARROW (chtype)0x3c /* SysV */ +#define ACS_RARROW (chtype)0x3e /* SysV */ +#define ACS_DARROW (chtype)0x76 /* SysV */ +#define ACS_UARROW (chtype)0x5e /* SysV */ +#define ACS_BOARD (chtype)0x23 /* SysV */ +#define ACS_LANTERN (chtype)0x23 /* SysV */ +#define ACS_BLOCK (chtype)0x23 /* SysV */ + +# define COLOR_BLACK 0 +# define COLOR_BLUE 1 +# define COLOR_GREEN 2 +# define COLOR_CYAN 3 +# define COLOR_RED 4 +# define COLOR_MAGENTA 5 +# define COLOR_YELLOW 6 +# define COLOR_WHITE 7 + +#define COLOR_PAIR(n) (((n) << 11) & A_ATTRIBUTES) +#define PAIR_NUMBER(n) (((n) & A_COLOR) >> 11) + +extern int COLORS,COLOR_PAIRS; +/*---------------------------------------------------------------------- + * + * Function and Keypad Key Definitions. + * Many are just for compatibility. + * + */ +#define KEY_MIN 0x101 /* Minimum curses key value */ +#define KEY_BREAK 0x101 /* Not on PC KBD */ +#define KEY_DOWN 0x102 /* Down arrow key */ +#define KEY_UP 0x103 /* Up arrow key */ +#define KEY_LEFT 0x104 /* Left arrow key */ +#define KEY_RIGHT 0x105 /* Right arrow key */ +#define KEY_HOME 0x106 /* home key */ +#define KEY_BACKSPACE 0x107 /* not on pc */ +#define KEY_F0 0x108 /* function keys. space for */ +#define KEY_F(n) (KEY_F0+(n))/* 64 keys are reserved. */ +#define KEY_DL 0x148 /* not on pc */ +#define KEY_IL 0x149 /* insert line */ +#define KEY_DC 0x14a /* delete character */ +#define KEY_IC 0x14b /* insert char or enter ins mode */ +#define KEY_EIC 0x14c /* exit insert char mode */ +#define KEY_CLEAR 0x14d /* clear screen */ +#define KEY_EOS 0x14e /* clear to end of screen */ +#define KEY_EOL 0x14f /* clear to end of line */ +#define KEY_SF 0x150 /* scroll 1 line forward */ +#define KEY_SR 0x151 /* scroll 1 line back (reverse) */ +#define KEY_NPAGE 0x152 /* next page */ +#define KEY_PPAGE 0x153 /* previous page */ +#define KEY_STAB 0x154 /* set tab */ +#define KEY_CTAB 0x155 /* clear tab */ +#define KEY_CATAB 0x156 /* clear all tabs */ +#define KEY_ENTER 0x157 /* enter or send (unreliable) */ +#define KEY_SRESET 0x158 /* soft/reset (partial/unreliable)*/ +#define KEY_RESET 0x159 /* reset/hard reset (unreliable) */ +#define KEY_PRINT 0x15a /* print/copy */ +#define KEY_LL 0x15b /* home down/bottom (lower left) */ +#define KEY_ABORT 0x15c /* abort/terminate key (any) */ +#define KEY_SHELP 0x15d /* short help */ +#define KEY_LHELP 0x15e /* long help */ +#define KEY_BTAB 0x15f /* Back tab key */ +#define KEY_BEG 0x160 /* beg(inning) key */ +#define KEY_CANCEL 0x161 /* cancel key */ +#define KEY_CLOSE 0x162 /* close key */ +#define KEY_COMMAND 0x163 /* cmd (command) key */ +#define KEY_COPY 0x164 /* copy key */ +#define KEY_CREATE 0x165 /* create key */ +#define KEY_END 0x166 /* end key */ +#define KEY_EXIT 0x167 /* exit key */ +#define KEY_FIND 0x168 /* find key */ +#define KEY_HELP 0x169 /* help key */ +#define KEY_MARK 0x16a /* mark key */ +#define KEY_MESSAGE 0x16b /* message key */ +#define KEY_MOVE 0x16c /* move key */ +#define KEY_NEXT 0x16d /* next object key */ +#define KEY_OPEN 0x16e /* open key */ +#define KEY_OPTIONS 0x16f /* options key */ +#define KEY_PREVIOUS 0x170 /* previous object key */ +#define KEY_REDO 0x171 /* redo key */ +#define KEY_REFERENCE 0x172 /* ref(erence) key */ +#define KEY_REFRESH 0x173 /* refresh key */ +#define KEY_REPLACE 0x174 /* replace key */ +#define KEY_RESTART 0x175 /* restart key */ +#define KEY_RESUME 0x176 /* resume key */ +#define KEY_SAVE 0x177 /* save key */ +#define KEY_SBEG 0x178 /* shifted beginning key */ +#define KEY_SCANCEL 0x179 /* shifted cancel key */ +#define KEY_SCOMMAND 0x17a /* shifted command key */ +#define KEY_SCOPY 0x17b /* shifted copy key */ +#define KEY_SCREATE 0x17c /* shifted create key */ +#define KEY_SDC 0x17d /* shifted delete char key */ +#define KEY_SDL 0x17e /* shifted delete line key */ +#define KEY_SELECT 0x17f /* select key */ +#define KEY_SEND 0x180 /* shifted end key */ +#define KEY_SEOL 0x181 /* shifted clear line key */ +#define KEY_SEXIT 0x182 /* shifted exit key */ +#define KEY_SFIND 0x183 /* shifted find key */ +#define KEY_SHOME 0x184 /* shifted home key */ +#define KEY_SIC 0x185 /* shifted input key */ +#define KEY_SLEFT 0x187 /* shifted left arrow key */ +#define KEY_SMESSAGE 0x188 /* shifted message key */ +#define KEY_SMOVE 0x189 /* shifted move key */ +#define KEY_SNEXT 0x18a /* shifted next key */ +#define KEY_SOPTIONS 0x18b /* shifted options key */ +#define KEY_SPREVIOUS 0x18c /* shifted prev key */ +#define KEY_SPRINT 0x18d /* shifted print key */ +#define KEY_SREDO 0x18e /* shifted redo key */ +#define KEY_SREPLACE 0x18f /* shifted replace key */ +#define KEY_SRIGHT 0x190 /* shifted right arrow */ +#define KEY_SRSUME 0x191 /* shifted resume key */ +#define KEY_SSAVE 0x192 /* shifted save key */ +#define KEY_SSUSPEND 0x193 /* shifted suspend key */ +#define KEY_SUNDO 0x194 /* shifted undo key */ +#define KEY_SUSPEND 0x195 /* suspend key */ +#define KEY_UNDO 0x196 /* undo key */ + +/* PDCurses specific key definitions */ + +#define ALT_0 0x197 /* Alt-0 PC only */ +#define ALT_1 0x198 /* Alt-1 PC only */ +#define ALT_2 0x199 /* Alt-2 PC only */ +#define ALT_3 0x19a /* Alt-3 PC only */ +#define ALT_4 0x19b /* Alt-4 PC only */ +#define ALT_5 0x19c /* Alt-5 PC only */ +#define ALT_6 0x19d /* Alt-6 PC only */ +#define ALT_7 0x19e /* Alt-7 PC only */ +#define ALT_8 0x19f /* Alt-8 PC only */ +#define ALT_9 0x1a0 /* Alt-9 PC only */ +#define ALT_A 0x1a1 /* Alt-A PC only */ +#define ALT_B 0x1a2 /* Alt-B PC only */ +#define ALT_C 0x1a3 /* Alt-C PC only */ +#define ALT_D 0x1a4 /* Alt-D PC only */ +#define ALT_E 0x1a5 /* Alt-E PC only */ +#define ALT_F 0x1a6 /* Alt-F PC only */ +#define ALT_G 0x1a7 /* Alt-G PC only */ +#define ALT_H 0x1a8 /* Alt-H PC only */ +#define ALT_I 0x1a9 /* Alt-I PC only */ +#define ALT_J 0x1aa /* Alt-J PC only */ +#define ALT_K 0x1ab /* Alt-K PC only */ +#define ALT_L 0x1ac /* Alt-L PC only */ +#define ALT_M 0x1ad /* Alt-M PC only */ +#define ALT_N 0x1ae /* Alt-N PC only */ +#define ALT_O 0x1af /* Alt-O PC only */ +#define ALT_P 0x1b0 /* Alt-P PC only */ +#define ALT_Q 0x1b1 /* Alt-Q PC only */ +#define ALT_R 0x1b2 /* Alt-R PC only */ +#define ALT_S 0x1b3 /* Alt-S PC only */ +#define ALT_T 0x1b4 /* Alt-T PC only */ +#define ALT_U 0x1b5 /* Alt-U PC only */ +#define ALT_V 0x1b6 /* Alt-V PC only */ +#define ALT_W 0x1b7 /* Alt-W PC only */ +#define ALT_X 0x1b8 /* Alt-X PC only */ +#define ALT_Y 0x1b9 /* Alt-Y PC only */ +#define ALT_Z 0x1ba /* Alt-Z PC only */ +#define CTL_LEFT 0x1bb /* Control-Left-Arrow PC only */ +#define CTL_RIGHT 0x1bc /* Control-Right-Arrow PC only */ +#define CTL_PGUP 0x1bd /* Control-PgUp PC only */ +#define CTL_PGDN 0x1be /* Control-PgDn PC only */ +#define CTL_HOME 0x1bf /* Control-Home PC only */ +#define CTL_END 0x1c0 /* Control-End PC only */ +#define KEY_BACKTAB 0x1c1 /* Back-tab PC only */ + +#define KEY_A1 0x1c2 /* upper left on Virtual keypad */ +#define KEY_A2 0x1c3 /* upper middle on Virt. keypad */ +#define KEY_A3 0x1c4 /* upper right on Vir. keypad */ +#define KEY_B1 0x1c5 /* middle left on Virt. keypad */ +#define KEY_B2 0x1c6 /* center on Virt. keypad */ +#define KEY_B3 0x1c7 /* middle right on Vir. keypad */ +#define KEY_C1 0x1c8 /* lower left on Virt. keypad */ +#define KEY_C2 0x1c9 /* lower middle on Virt. keypad */ +#define KEY_C3 0x1ca /* lower right on Vir. keypad */ +#define PADSLASH 0x1cb /* slash on keypad */ +#define PADENTER 0x1cc /* enter on keypad */ +#define CTL_PADENTER 0x1cd /* ctl-enter on keypad */ +#define ALT_PADENTER 0x1ce /* alt-enter on keypad */ +#define SHF_PADSTOP 0x1cf /* shift-stop on keypad */ +#define PADSTAR 0x1d0 /* star on keypad */ +#define PADMINUS 0x1d1 /* minus on keypad */ +#define PADPLUS 0x1d2 /* plus on keypad */ +#define CTL_PADSTOP 0x1d3 /* ctl-stop on keypad */ +#define CTL_PADCENTER 0x1d4 /* ctl-enter on keypad */ +#define CTL_PADPLUS 0x1d5 /* ctl-plus on keypad */ +#define CTL_PADMINUS 0x1d6 /* ctl-minus on keypad */ +#define CTL_PADSLASH 0x1d7 /* ctl-slash on keypad */ +#define CTL_PADSTAR 0x1d8 /* ctl-star on keypad */ +#define ALT_PADPLUS 0x1d9 /* alt-plus on keypad */ +#define ALT_PADMINUS 0x1da /* alt-minus on keypad */ +#define ALT_PADSLASH 0x1db /* alt-slash on keypad */ +#define ALT_PADSTAR 0x1dc /* alt-star on keypad */ +#define CTL_INS 0x1dd /* ctl-insert */ +#define ALT_DEL 0x1de /* alt-delete */ +#define ALT_INS 0x1df /* alt-insert */ +#define CTL_UP 0x1e0 /* ctl-up arrow */ +#define CTL_DOWN 0x1e1 /* ctl-down arrow */ +#define CTL_TAB 0x1e2 /* ctl-tab */ +#define ALT_TAB 0x1e3 /* alt-tab */ +#define ALT_MINUS 0x1e4 /* alt-minus */ +#define ALT_EQUAL 0x1e5 /* alt-equal */ +#define ALT_HOME 0x1e6 /* alt-home */ +#define ALT_PGUP 0x1e7 /* alt-pgup */ +#define ALT_PGDN 0x1e8 /* alt-pgdn */ +#define ALT_END 0x1e9 /* alt-end */ +#define ALT_UP 0x1ea /* alt-up arrow */ +#define ALT_DOWN 0x1eb /* alt-down arrow */ +#define ALT_RIGHT 0x1ec /* alt-right arrow */ +#define ALT_LEFT 0x1ed /* alt-left arrow */ +#define ALT_ENTER 0x1ee /* alt-enter */ +#define ALT_ESC 0x1ef /* alt-escape */ +#define ALT_BQUOTE 0x1f0 /* alt-back quote */ +#define ALT_LBRACKET 0x1f1 /* alt-left bracket */ +#define ALT_RBRACKET 0x1f2 /* alt-right bracket */ +#define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ +#define ALT_FQUOTE 0x1f4 /* alt-forward quote */ +#define ALT_COMMA 0x1f5 /* alt-comma */ +#define ALT_STOP 0x1f6 /* alt-stop */ +#define ALT_FSLASH 0x1f7 /* alt-forward slash */ +#define ALT_BKSP 0x1f8 /* alt-backspace */ +#define CTL_BKSP 0x1f9 /* ctl-backspace */ +#define CTL_PAD0 0x1fa /* ctl-keypad 0 */ +#define CTL_PAD1 0x1fb /* ctl-keypad 1 */ +#define CTL_PAD2 0x1fc /* ctl-keypad 2 */ +#define CTL_PAD3 0x1fd /* ctl-keypad 3 */ +#define CTL_PAD4 0x1fe /* ctl-keypad 4 */ +#define CTL_PAD5 0x1ff /* ctl-keypad 5 */ +#define CTL_PAD6 0x200 /* ctl-keypad 6 */ +#define CTL_PAD7 0x201 /* ctl-keypad 7 */ +#define CTL_PAD8 0x202 /* ctl-keypad 8 */ +#define CTL_PAD9 0x203 /* ctl-keypad 9 */ +#define CTL_DEL 0x204 /* clt-delete */ +#define ALT_BSLASH 0x205 /* alt-back slash */ +#define CTL_ENTER 0x206 /* ctl-enter */ +#define KEY_MOUSE 0x207 /* "mouse" key */ +#define KEY_MAX KEY_MOUSE /* Maximum curses key */ + + +/*---------------------------------------------------------------------- +* PDCurses function declarations +*/ +#ifdef ANSI +# ifdef CPLUSPLUS + extern "C" { +# endif +int addchnstr( chtype *, int ); +int baudrate( void ); +int beep( void ); +int border( chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype ); +char breakchar( void ); +int can_change_color ( void ); +int clearok( WINDOW*, bool ); +int color_content( int, short*, short*, short* ); +int copywin( WINDOW*, WINDOW*, int, int, int, int, int, int, int ); +int curs_set( int ); +int cursoff( void ); +int curson( void ); +int def_prog_mode( void ); +int def_shell_mode( void ); +int delay_output( int ); +int delwin( WINDOW* ); +WINDOW* derwin( WINDOW*, int, int, int, int ); +int doupdate( void ); +WINDOW* dupwin( WINDOW* ); +int endwin( void ); +char erasechar( void ); +int fixterm( void ); +int flash( void ); +int flushinp( void ); +int gettmode( void ); +bool has_colors( void ); +int hline( chtype, int ); +int inchnstr( chtype *, int ); +int init_color( short, short, short, short ); +int init_pair( short, short, short ); +WINDOW* initscr( void ); +int intrflush( WINDOW*, bool ); +int is_linetouched(WINDOW *,int); +int is_wintouched(WINDOW *); +char* keyname( int ); +char killchar( void ); +char* longname( void ); +int meta( WINDOW*, bool ); +int mvaddrawch( int, int, chtype ); +int mvaddrawstr( int, int, char* ); +int mvcur( int, int, int, int ); +int mvderwin( WINDOW*, int, int ); +int mvinsrawch( int, int, chtype ); +int mvprintw( int, int, char*,... ); +int mvscanw( int, int, char*,... ); +int mvwin( WINDOW*, int, int ); +int mvwinsrawch( WINDOW*, int, int, chtype ); +int mvwprintw( WINDOW*, int, int, char*,... ); +int mvwscanw( WINDOW*, int, int, char*,... ); +WINDOW* newpad( int, int ); +SCREEN* newterm( char*, FILE*, FILE* ); +WINDOW* newwin( int, int, int, int ); +int noraw( void ); +int overlay( WINDOW*, WINDOW* ); +int overwrite( WINDOW*, WINDOW* ); +int pair_content( int, short*, short* ); +int pnoutrefresh( WINDOW*, int, int, int, int, int, int ); +int prefresh( WINDOW*, int, int, int, int, int, int ); +int printw( char*,... ); +int raw( void ); +int refresh( void ); +int reset_prog_mode( void ); +int reset_shell_mode( void ); +int resetterm( void ); +int resetty( void ); +int saveoldterm( void ); +int saveterm( void ); +int savetty( void ); +int scanw( char*,... ); +int scroll( WINDOW* ); +SCREEN* set_term( SCREEN* ); +int start_color( void ); +WINDOW* subpad( WINDOW*, int, int, int, int ); +WINDOW* subwin( WINDOW*, int, int, int, int ); +int tabsize( int ); +chtype termattrs( void ); +char* termname( void ); +int touchline( WINDOW*, int ,int ); +int touchwin( WINDOW* ); +int typeahead( int ); +char* unctrl( chtype ); +int vline( chtype, int ); +int waddchnstr( WINDOW*, chtype*, int ); +int waddnstr( WINDOW*, char*, int ); +int waddrawstr( WINDOW*, char* ); +int waddstr( WINDOW*, char* ); +int wattroff( WINDOW*, chtype ); +int wattron( WINDOW*, chtype ); +int wattrset( WINDOW*, chtype ); +int wbkgd(WINDOW*, chtype); +void wbkgdset(WINDOW*, chtype); +int wborder( WINDOW*, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype ); +int wclear( WINDOW* ); +int wclrtobot( WINDOW* ); +int wclrtoeol( WINDOW* ); +int wdelch( WINDOW* ); +int wdeleteln( WINDOW* ); +int werase( WINDOW* ); +int wgetch( WINDOW* ); +int wgetnstr( WINDOW*, char*, int ); +int wgetstr( WINDOW*, char* ); +int whline( WINDOW*, chtype, int ); +int winchnstr( WINDOW*, chtype*, int ); +int winnstr( WINDOW*, char*, int ); +int winsch( WINDOW*, chtype ); +int winsdelln( WINDOW*, int ); +int winsertln( WINDOW* ); +int winsnstr( WINDOW*, char*, int ); +int wmove( WINDOW*, int, int ); +int wnoutrefresh( WINDOW* ); +char wordchar( void ); +int wprintw( WINDOW*, char*,... ); +int wredrawln( WINDOW*, int ,int ); +int wrefresh( WINDOW* ); +int wscanw( WINDOW*, char*,... ); +int wscrl( WINDOW*, int ); +int wsetscrreg( WINDOW*, int, int ); +int wtabsize( WINDOW*, int ); +int wtouchln(WINDOW *, int, int, int); +int ungetch( int ); +int wvline( WINDOW*, chtype, int ); + +#ifdef PDCURSES +int raw_output( bool ); +int resize_screen( int ); +WINDOW* resize_window( WINDOW*, int, int ); +int win_print( WINDOW*, int ); +#endif + +/* +* Keep the compiler happy with our macros below... +*/ +int PDC_chadd( WINDOW*, chtype, bool, bool ); +int PDC_chins( WINDOW*, chtype, bool ); + +# ifdef CPLUSPLUS + } +# endif +#endif + + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +/* +* Functions defined as macros +*/ + +#define addch( c ) waddch( stdscr, c ) +#define addchstr( c ) addchnstr( c, -1 ) +#define addstr(str) waddstr( stdscr, str ) +#define addnstr(str, n) waddnstr( stdscr, str, n ) +#define attroff(attr) wattroff( stdscr, attr ) +#define attron(attr) wattron( stdscr, attr ) +#define attrset(attr) wattrset( stdscr, attr ) +#define bkgd(c) wbkgd(stdscr,c) +#define bkgdset(c) wbkgdset(stdscr,c) +#define border(ls,rs,ts,bs,tl,tr,bl,br) wborder(stdscr,ls,rs,ts,bs,tl,tr,bl,br) +#define box( w, v, h ) wborder( w, v, v, h, h, 0, 0, 0, 0 ) +#define clear() (clearok( stdscr, TRUE )==ERR?ERR:wclear( stdscr )) +#define clrtobot() wclrtobot( stdscr ) +#define clrtoeol() wclrtoeol( stdscr ) +#define delch() wdelch( stdscr ) +#define deleteln() wdeleteln( stdscr ) +#define derwin(w,nl,nc,by,bx) subwin((w),(nl),(nc),(by+(w)->_begy),(bx+(w)->_begx)) +#define echochar(c) (addch((chtype)c)==ERR?ERR:refresh()) +#define erase() werase( stdscr ) +#define getbegx(w) (w)->_begx +#define getbegy(w) (w)->_begy +#define getbegyx(w,y,x) ( y = (w)->_begy, x = (w)->_begx ) +#define getch() wgetch(stdscr) +#define getmaxx(w) (w)->_maxx +#define getmaxy(w) (w)->_maxy +#define getmaxyx(w,y,x) ( y = (w)->_maxy, x = (w)->_maxx ) +#define getparx(w) (w)->_parx +#define getpary(w) (w)->_pary +#define getparyx(w,y,x) ( y = (w)->_pary, x = (w)->_parx ) +#define getstr(str) wgetstr( stdscr, str ) +#define getyx(w,y,x) ( y = (w)->_cury, x = (w)->_curx ) +#define has_colors() ((_cursvar.mono) ? FALSE : TRUE) +#define idcok(w,flag) OK +#define idlok(w,flag) OK +#define inch() (stdscr->_y[stdscr->_cury][stdscr->_curx]) +#define inchstr( c ) inchnstr( c, stdscr->_maxx-stdscr->_curx ) +#define innstr(str,n) winnstr(stdscr,(str),(n)) +#define insch( c ) winsch( stdscr, c ) +#define insdelln(n) winsdelln(stdscr,n) +#define insertln() winsertln( stdscr ) +#define insnstr(s,n) winsnstr(stdscr,s,n) +#define insstr(s) winsnstr(stdscr,s,(-1)) +#define instr(str) winnstr(stdscr,(str),stdscr->_maxx) +#define isendwin() ((_cursvar.alive) ? FALSE : TRUE) +#define keypad(w,flag) (w->_use_keypad = flag) +#define leaveok(w,flag) (w->_leave = flag) +#define move(y,x) wmove( stdscr, y, x ) +#define mvaddch(y,x,c) (move( y, x )==ERR?ERR:addch( c )) +#define mvaddchstr(y,x,c) (move( y, x )==ERR?ERR:addchnstr( c, -1 )) +#define mvaddchnstr(y,x,c,n) (move( y, x )==ERR?ERR:addchnstr( c, n )) +#define mvaddstr(y,x,str) (move( y, x )==ERR?ERR:addstr( str )) +#define mvdelch(y,x) (move( y, x )==ERR?ERR:wdelch( stdscr )) +#define mvgetch(y,x) (move( y, x )==ERR?ERR:wgetch(stdscr)) +#define mvgetstr(y,x,str) (move( y, x )==ERR?ERR:wgetstr( stdscr, str )) +#define mvinch(y,x) (move( y, x )==ERR?ERR:(stdscr->_y[y][x])) +#define mvinchstr(y,x,c) (move( y, x )==ERR?ERR:inchnstr( c, stdscr->_maxx-stdscr->_curx )) +#define mvinchnstr(y,x,c,n) (move( y, x )==ERR?ERR:inchnstr( c, n )) +#define mvinsch(y,x,c) (move( y, x )==ERR?ERR:winsch( stdscr, c )) +#define mvinsnstr(y,x,s,n) (move( y, x )==ERR?ERR:winsnstr(stdscr,s,n)) +#define mvinsstr(y,x,s) (move( y, x )==ERR?ERR:winsnstr(stdscr,s,(-1))) +#define mvinstr(y,x,str) (move( y, x )==ERR?ERR:winnstr(stdscr,(str),stdscr->_maxx)) +#define mvinnstr(y,x,str,n) (move( y, x )==ERR?ERR:winnstr(stdscr,(str),(n))) +#define mvwaddch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddch( w, c )) +#define mvwaddchstr(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, -1 )) +#define mvwaddchnstr(w,y,x,c,n) (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, n )) +#define mvwaddrawch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddrawch( w, c )) +#define mvwaddrawstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:waddrawstr( w, str )) +#define mvwaddstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:waddstr( w, str )) +#define mvwdelch(w,y,x) (wmove( w, y, x )==ERR?ERR:wdelch( w )) +#define mvwgetch(w,y,x) (wmove( w, y, x )==ERR?ERR:wgetch( w )) +#define mvwgetstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:wgetstr( w, str )) +#define mvwinch(w,y,x) (wmove( w, y, x )==ERR?ERR:((w)->_y[y][x])) +#define mvwinchstr(w,y,x,c) (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, (w)->_maxx-(w)->_curx )) +#define mvwinchnstr(w,y,x,c,n) (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, n )) +#define mvwinsch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:winsch( w, c )) +#define mvwinstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:winnstr(w,str,(w)->_maxx)) +#define mvwinnstr(w,y,x,str,n) (wmove( w, y, x )==ERR?ERR:winnstr(w,str,n)) +#define mvwinsnstr(w,y,x,s,n) (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,n)) +#define mvwinsstr(w,y,x,s) (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,(-1))) +#define napms(ms) delay_output(ms) +#define nl() (_cursvar.autocr = TRUE) +#define nonl() (_cursvar.autocr = FALSE) +#define notimeout(w,flag) (OK) +#define pechochar(w,c) (waddch(w,(chtype)c)==ERR?ERR:prefresh(w)) +#define redrawwin(w) wredrawln((w),0,(win)->_maxy) +#define refrbrk(flag) (_cursvar.refrbrk = flag) +#define refresh() wrefresh( stdscr ) +#define scrl(n) wscrl(stdscr,n) +#define scroll(w) wscrl((w),1) +#define scrollok(w,flag) ((w)->_scroll = flag) +#define setscrreg(top, bot) wsetscrreg( stdscr, top, bot ) +#define standend() wattrset(stdscr, A_NORMAL) +#define standout() wattrset(stdscr, A_STANDOUT) +#define touchline(w,y,n) wtouchln((w),(y),(n),TRUE) +#define touchwin(w) wtouchln((w),0,(w)->_maxy,TRUE) +#define traceoff() {trace_on = FALSE;} +#define traceon() {trace_on = TRUE;} +#define untouchwin(w) wtouchln((w),0,((w)->_maxy),FALSE) +#define waddch(w, c) PDC_chadd( w, (chtype)c, (bool)!(_cursvar.raw_out), TRUE ) +#define waddchstr(w, c) (waddchnstr( w, c, -1 ) ) +#define wclear(w) ( werase( w )==ERR?ERR:((w)->_clear = TRUE)) +#define wechochar(w,c) (waddch(w,(chtype)c)==ERR?ERR:wrefresh(w)) +#define winch(w) ((w)->_y[(w)->_cury][(w)->_curx]) +#define winchstr(w, c) (winchnstr( w, c, (w)->_maxx-(w)->_curx ) ) +#define winsstr(w,str) winsnstr((w),(str),(-1)) +#define winstr(w,str) winnstr((w),str,(w)->_maxx) +#define wstandend(w) wattrset(w, A_NORMAL) +#define wstandout(w) wattrset(w, A_STANDOUT) + +#ifndef UNIX +#define cbreak() (_cursvar.cbreak = TRUE) +#define nocbreak() (_cursvar.cbreak = FALSE) +#define crmode() (_cursvar.cbreak = TRUE) +#define nocrmode() (_cursvar.cbreak = FALSE) +#define echo() (_cursvar.echo = TRUE) +#define noecho() (_cursvar.echo = FALSE) +#define nodelay(w,flag) (w->_nodelay = flag) +#endif + +#ifdef PDCURSES +#define addrawch( c ) waddrawch( stdscr, c ) +#define addrawstr(str) waddrawstr( stdscr, str ) +#define insrawch( c ) winsrawch( stdscr, c ) +#define waddrawch(w, c) PDC_chadd( w, (chtype)c, FALSE, TRUE ) +#define winsrawch(w, c) PDC_chins( w, (chtype)c, FALSE ) + +/* + * FYI: Need to document these functions... + */ +#define title(s,a) wtitle( stdscr, s, (chtype)a ) +#define titleofs(ofs) wtitleofs( stdscr, ofs ) +#define wtitle(w,s,a) (w->_title = s, w->_title_attr = (chtype)a) +#define wtitleofs(w,ofs) (w->_title_ofs = ofs) +#endif + +/* + * Load up curspriv.h. This should be in the same place as + * stdlib.h. We allow anyone who defines CURSES_LIBRARY to have + * access to our internal routines. This provides quick + * PC applications at the expense of portability. + */ +#if defined (CURSES_LIBRARY) | defined( INTERNAL) +# include +# include +#endif + +#endif /* __PDCURSES__ */ diff --git a/contrib/media/updf/include/cursos2.h b/contrib/media/updf/include/cursos2.h new file mode 100644 index 0000000000..7f644a7453 --- /dev/null +++ b/contrib/media/updf/include/cursos2.h @@ -0,0 +1,324 @@ +/* +*************************************************************************** +* This file comprises part of PDCurses. PDCurses is Public Domain software. +* You may use this code for whatever purposes you desire. This software +* is provided AS IS with NO WARRANTY whatsoever. +* Should this software be used in another application, an acknowledgement +* that PDCurses code is used would be appreciated, but is not mandatory. +* +* Any changes which you make to this software which may improve or enhance +* it, should be forwarded to the current maintainer for the benefit of +* other users. +* +* The only restriction placed on this code is that no distribution of +* modified PDCurses code be made under the PDCurses name, by anyone +* other than the current maintainer. +* +* See the file maintain.er for details of the current maintainer. +*************************************************************************** +*/ +/* +$Id$ +*/ +#ifndef CURSOS2_INCL +#define CURSOS2_INCL 1 + +#ifdef CURSES__32BIT__ + +#if (NOVIO) +#define KbdSetStatus Kbd32SetStatus +#define KbdGetStatus Kbd32GetStatus +#define KbdCharIn Kbd32CharIn +#define KbdPeek Kbd32Peek +#define KbdFlushBuffer Kbd32FlushBuffer + +#define VioGetMode Vio32GetMode +#define VioSetMode Vio32SetMode +#define VioGetCurPos Vio32GetCurPos +#define VioSetCurPos Vio32SetCurPos +#define VioGetCurType Vio32GetCurType +#define VioSetCurType Vio32SetCurType +#define VioScrollDn Vio32ScrollDn +#define VioScrollUp Vio32ScrollUp +#define VioGetConfig Vio32GetConfig +#define VioWrtTTY Vio32WrtTTY +#define VioReadCellStr Vio32ReadCellStr +#define VioWrtCellStr Vio32WrtCellStr +#define VioWrtNAttr Vio32WrtNAttr +#endif /* NOVIO */ + +#define FARKeyword + +#define CURS_INCL_VIO_KBD + + +#ifdef __EMX__ +# ifndef USE_OS2_H +# ifdef EMXVIDEO /* Define to use emx dos compatible video */ +# include +# include +# ifdef USE_OS2_H +# undef USE_OS2_H /* And we can use the extra compile speed... */ +# endif +# else +# define USE_OS2_H +# endif +# endif +# define APIENTRY +#else +# define APIRET ULONG +#endif + +#else + + +# define FARKeyword far +# define APIRET USHORT + +#ifdef USE_OS2_H +# define INCL_VIO +# define INCL_KBD +#else +# define CURS_INCL_VIO_KBD +#endif + + +#endif /* __32BIT__ */ + +#ifndef EMXVIDEO + +/* if USE_OS2_H is defined then use the os2.h that comes with your compiler ...*/ + +#ifdef USE_OS2_H +# include +#else + +/* ... otherwise use these definitions */ + +# include + +#endif + +#ifdef CURS_INCL_VIO_KBD + +typedef SHANDLE HKBD; +typedef HKBD FARKeyword * PHKBD; + + +typedef SHANDLE HVIO; +typedef HVIO FARKeyword * PHVIO; + + + +typedef struct _KBDINFO { + USHORT cb; + USHORT fsMask; + USHORT chTurnAround; + USHORT fsInterim; + USHORT fsState; + }KBDINFO; +typedef KBDINFO FARKeyword *PKBDINFO; + + +USHORT APIENTRY KbdSetStatus( + PKBDINFO pkbdinfo, + HKBD hkbd ); + + +USHORT APIENTRY KbdGetStatus( + PKBDINFO pkbdinfo, + HKBD hdbd ); + + +typedef struct _KBDKEYINFO { + UCHAR chChar; /* ASCII character code */ + UCHAR chScan; /* Scan Code */ + UCHAR fbStatus; + UCHAR bNlsShift; + USHORT fsState; + ULONG time; + }KBDKEYINFO; +typedef KBDKEYINFO FARKeyword *PKBDKEYINFO; + +#define IO_WAIT 0 +#define IO_NOWAIT 1 + +USHORT APIENTRY KbdCharIn( + PKBDKEYINFO pkbci, + USHORT fWait, /* IO_WAIT, IO_NOWAIT */ + HKBD hkbd); + +USHORT APIENTRY KbdPeek( + PKBDKEYINFO pkbci, + HKBD hkbd ); + +USHORT APIENTRY KbdFlushBuffer( + HKBD hkbd); + + +typedef struct _VIOMODEINFO { + USHORT cb; + UCHAR fbType; + UCHAR color; + USHORT col; /* number of text columns */ + USHORT row; /* number of text rows */ + USHORT hres; /* horizontal resolution */ + USHORT vres; /* vertical resolution */ + UCHAR fmt_ID; + UCHAR attrib; /* number of attributes */ + ULONG buf_addr; + ULONG buf_length; + ULONG full_length; + ULONG partial_length; + PCH ext_data_addr; + } VIOMODEINFO; +typedef VIOMODEINFO FARKeyword *PVIOMODEINFO; + + +USHORT APIENTRY VioGetMode( + PVIOMODEINFO pvioModeInfo, + HVIO hvio); + + +USHORT APIENTRY VioSetMode( + PVIOMODEINFO pvioModeInfo, + HVIO hvio); + + +USHORT APIENTRY VioGetCurPos( + PUSHORT pusRow, + PUSHORT pusColumn, + HVIO hvio ); + + +USHORT APIENTRY VioSetCurPos( + USHORT usRow, + USHORT usColumn, + HVIO hvio); + +typedef struct _VIOCURSORINFO { + USHORT yStart; + USHORT cEnd; + USHORT cx; + USHORT attr; /* -1=hidden cursor, any other=normal cursor */ + } VIOCURSORINFO; +typedef VIOCURSORINFO FARKeyword *PVIOCURSORINFO; + + +USHORT APIENTRY VioGetCurType( + PVIOCURSORINFO pvioCursorInfo, + HVIO hvio ); + + +USHORT APIENTRY VioSetCurType( + PVIOCURSORINFO pvioCursorInfo, + HVIO hvio ); + +USHORT APIENTRY VioScrollDn( + USHORT usTopRow, + USHORT usLeftCol, + USHORT usBotRow, + USHORT usRightCol, + USHORT cbLines, + PBYTE pCell, + HVIO hvio ); + + + +USHORT APIENTRY VioScrollUp( + USHORT usTopRow, + USHORT usLeftCol, + USHORT usBotRow, + USHORT usRightCol, + USHORT cbLines, + PBYTE pCell, + HVIO hvio ); + + + /* VIOCONFIGINFO.adapter constants */ + + #define DISPLAY_MONOCHROME 0x0000 + #define DISPLAY_CGA 0x0001 + #define DISPLAY_EGA 0x0002 + #define DISPLAY_VGA 0x0003 + #define DISPLAY_8514A 0x0007 + + /* VIOCONFIGINFO.display constants */ + + #define MONITOR_MONOCHROME 0x0000 + #define MONITOR_COLOR 0x0001 + #define MONITOR_ENHANCED 0x0002 + #define MONITOR_8503 0x0003 + #define MONITOR_851X_COLOR 0x0004 + #define MONITOR_8514 0x0009 + +typedef struct _VIOCONFIGINFO { + USHORT cb; + USHORT adapter; + USHORT display; + ULONG cbMemory; + USHORT Configuration; + USHORT VDHVersion; + USHORT Flags; + ULONG HWBufferSize; + ULONG FullSaveSize; + ULONG PartSaveSize; + USHORT EMAdaptersOFF; + USHORT EMDisplaysOFF; + } VIOCONFIGINFO; +typedef VIOCONFIGINFO FARKeyword *PVIOCONFIGINFO; + + +USHORT APIENTRY VioGetConfig( + USHORT usConfigId, /* Reserved (must be 0) */ + PVIOCONFIGINFO pvioin, + HVIO hvio ); + +USHORT APIENTRY VioWrtTTY( + PCH pch, + USHORT cb, + HVIO hvio ); + +USHORT APIENTRY VioReadCellStr( + PCH pchCellStr, + PUSHORT pcb, + USHORT usRow, + USHORT usColumn, + HVIO hvio ); + +USHORT APIENTRY VioWrtCellStr( + PCH pchCellStr, + USHORT cb, + USHORT usRow, + USHORT usColumn, + HVIO hvio ); + +USHORT APIENTRY VioWrtNAttr( + PBYTE pAttr, + USHORT cb, + USHORT usRow, + USHORT usColumn, + HVIO hvio ); + + +USHORT APIENTRY VioWrtNCell( + PBYTE pCell, + USHORT cb, + USHORT usRow, + USHORT usColumn, + HVIO hvio ); + +#endif + +#endif + + +#ifndef KEYBOARD_ASCII_MODE +#define KEYBOARD_ASCII_MODE 0x0008 +#endif + +#ifndef KEYBOARD_BINARY_MODE +#define KEYBOARD_BINARY_MODE 0x0004 +#endif + +#endif /* !EMXVIDEO */ diff --git a/contrib/media/updf/include/curspriv.h b/contrib/media/updf/include/curspriv.h new file mode 100644 index 0000000000..5d997d6bcc --- /dev/null +++ b/contrib/media/updf/include/curspriv.h @@ -0,0 +1,320 @@ +/* +*************************************************************************** +* This file comprises part of PDCurses. PDCurses is Public Domain software. +* You may use this code for whatever purposes you desire. This software +* is provided AS IS with NO WARRANTY whatsoever. +* Should this software be used in another application, an acknowledgement +* that PDCurses code is used would be appreciated, but is not mandatory. +* +* Any changes which you make to this software which may improve or enhance +* it, should be forwarded to the current maintainer for the benefit of +* other users. +* +* The only restriction placed on this code is that no distribution of +* modified PDCurses code be made under the PDCurses name, by anyone +* other than the current maintainer. +* +* See the file maintain.er for details of the current maintainer. +*************************************************************************** +*/ +/* +$Id$ +*/ +/* +* +* CURSPRIV.H +* +* Header file for definitions and declarations for the +* PDCurses package. These definitions should not be generally +* accessible to programmers, but are provided if the applications +* programmer decides to make the decision in favor of speed on a +* PC over portability. +* +* Revision History: +* Frotz 1.5Beta 900714 Added many levels of compiler support. +* Added mixed prototypes for all "internal" routines. +* Removed all assembly language. Added EGA/VGA +* support. Converted all #ifdef to #if in all +* modules except CURSES.H and CURSPRIV.H. +* Always include ASSERT.H. Added support for an +* external malloc(), calloc() and free(). +* Added support for FAST_VIDEO (direct-memory writes). +* Added various memory model support (for FAST_VIDEO). +* Added much of the December 1988 X/Open Curses +* specification. +* bl 1.3 881005 All modules lint-checked with MSC '-W3' and turbo'C' +* '-w -w-pro' switches. +* bl 1.2 881002 Support (by #ifdef UCMASM) for uppercase-only +* assembly routine names. If UCMASM if defined, +* all assembler names are #defined as upper case. +* Not needed if you do "MASM /MX. Also missing +* declaration of cursesscroll(). Fixes thanks to +* N.D. Pentcheff +* bl 1.1 880306 Add _chadd() for raw output routines. +* bl 1.0 870515 Release. +* +*/ + +#ifndef __CURSES_INTERNALS__ +#define __CURSES_INTERNALS__ + +/* Always include... */ +#include + + + +/*---------------------------------------------------------------------- +* MEMORY MODEL SUPPORT: +* +* MODELS +* TINY cs,ds,ss all in 1 segment (not enough memory!) +* SMALL cs:1 segment, ds:1 segment +* MEDIUM cs:many segments ds:1 segment +* COMPACT cs:1 segment, ds:many segments +* LARGE cs:many segments ds:many segments +* HUGE cs:many segments ds:segments > 64K +*/ +#ifdef __TINY__ +# define SMALL 1 +#endif +#ifdef __SMALL__ +# define SMALL 1 +#endif +#ifdef __MEDIUM__ +# define MEDIUM 1 +#endif +#ifdef __COMPACT__ +# define COMPACT 1 +#endif +#ifdef __LARGE__ +# define LARGE 1 +#endif +#ifdef __HUGE__ +# define HUGE 1 +#endif + + +/*---------------------------------------------------------------------- +* OPERATING SYSTEM SUPPORT: +* +* DOS The one we all know and love:-} +* OS/2 The new kid on the block. +* FLEXOS A Real-time, protected-mode OS from +* Digital Research, Inc. +* (AKA, the 4680 from IBM...) +*/ + +/*----------------------------------------*/ + + +/*---------------------------------------------------------------------- +* MALLOC DEBUGGING SUPPORT: +* +* Set EMALLOC and EMALLOC_MAGIC in order to use your private +* versions of malloc(), calloc(), and free(). This can help, +* but not solve, your malloc problems when debugging... +* +*/ +#ifndef INTERNAL +# define EMALLOC 0 /* Disable External Malloc */ +#else +# define EMALLOC 0 /* Enable/Disable External Malloc */ +# define EMALLOC_MAGIC 0x0C0C /* Our magic indicator that we should */ + /* use our external malloc rather than */ + /* the runtime's malloc. */ +#endif + + +/*----------------------------------------------------------------------*/ +/* window properties */ +#define _SUBWIN 0x01 /* window is a subwindow */ +#define _ENDLINE 0x02 /* last winline is last screen line */ +#define _FULLWIN 0x04 /* window fills screen */ +#define _SCROLLWIN 0x08 /* window lwr rgt is screen lwr rgt */ +#define _PAD 0x10 /* X/Open Pad. */ +#define _SUBPAD 0x20 /* X/Open subpad. */ + + + + +/*----------------------------------------------------------------------*/ +/* Miscellaneous */ +#define _INBUFSIZ 512 /* size of terminal input buffer */ +#define _NO_CHANGE -1 /* flags line edge unchanged */ + + + + +/* @@@ THESE SHOULD BE INDIVIDUAL FUNCTIONS, NOT MACROS! */ +#define _BCHAR 0x03 /* Break char (^C) */ +#define _ECHAR 0x08 /* Erase char (^H) */ +#define _DWCHAR 0x17 /* Delete Word char (^W) */ +#define _DLCHAR 0x15 /* Delete Line char (^U) */ +#define _GOCHAR 0x11 /* ^Q character */ +#define _PRINTCHAR 0x10 /* ^P character */ +#define _STOPCHAR 0x13 /* ^S character */ +#define NUNGETCH 20 /* max # chars to ungetch() */ + + + + +/* Setmode stuff */ +struct cttyset +{ + bool been_set; + SCREEN saved; +}; + +extern struct cttyset c_sh_tty; /* tty modes for shell_mode */ +extern struct cttyset c_pr_tty; /* tty modes for prog_mode */ +extern struct cttyset c_save_tty; +extern struct cttyset c_save_trm; + +/* Printscan stuff */ +extern char c_printscanbuf[]; /* buffer used during I/O */ + +/* tracing flag */ +extern bool trace_on; + +/* Strget stuff */ +extern char* c_strbeg; + +/* doupdate stuff */ +extern WINDOW* twin; /* used by many routines */ + +/* Monitor (terminal) type information */ +#define _NONE 0x00 +#define _MDA 0x01 +#define _CGA 0x02 +#define _EGACOLOR 0x04 +#define _EGAMONO 0x05 +#define _VGACOLOR 0x07 +#define _VGAMONO 0x08 +#define _MCGACOLOR 0x0a +#define _MCGAMONO 0x0b +#define _FLEXOS 0x20 /* A Flexos console */ +#define _MDS_GENIUS 0x30 +#define _UNIX_COLOR 0x40 +#define _UNIX_MONO 0x41 + +/* Text-mode font size information */ +#define _FONT8 8 +#define _FONT14 14 +#define _FONT15 15 /* GENIUS */ +#define _FONT16 16 + + +/*---------------------------------------------------------------------- +* ANSI C prototypes. Be sure that your compiler conditional +* compilation definitions above define ANSI to be non-zero +* if you compiler supports prototypes. +*/ +#ifdef ANSI +# ifdef CPLUSPLUS + extern "C" { +# endif +int PDC_backchar( WINDOW*, char*, int* ); +bool PDC_breakout( void ); +int PDC_chadd( WINDOW*, chtype, bool, bool ); +bool PDC_check_bios_key( void ); +int PDC_chg_attr( WINDOW*, chtype, int, int, int, int ); +int PDC_chins( WINDOW*, chtype, bool ); +int PDC_clr_scrn( WINDOW* ); +int PDC_clr_update( WINDOW* ); +int PDC_copy_win( WINDOW *,WINDOW *,int,int,int,int,int,int,int,int,bool ); +int PDC_cursor_off( void ); +int PDC_cursor_on( void ); +int PDC_fix_cursor( int ); +int PDC_gattr( void ); +int PDC_get_bios_key( void ); +int PDC_get_columns( void ); +bool PDC_get_ctrl_break( void ); +int PDC_get_cur_col( void ); +int PDC_get_cur_row( void ); +int PDC_get_cursor_pos( int*, int* ); +int PDC_get_cursor_mode( void ); +int PDC_get_font( void ); +int PDC_get_rows( void ); +int PDC_gotoxy( int, int ); +int PDC_init_atrtab(void); +WINDOW* PDC_makenew( int, int, int, int ); +int PDC_newline( WINDOW*, int ); +int PDC_print( int, int, int ); +int PDC_putc( chtype, chtype ); +int PDC_putchar( chtype ); +int PDC_putctty( chtype, chtype ); +int PDC_rawgetch( void ); +int PDC_sanity_check( int ); +int PDC_scr_close( void ); +int PDC_scr_open( SCREEN*, bool ); +int PDC_scroll( int, int, int, int, int, chtype ); +int PDC_set_80x25( void ); +int PDC_set_ctrl_break( bool ); +int PDC_set_cursor_mode( int, int ); +int PDC_set_font( int ); +int PDC_set_rows( int ); +int PDC_split_plane( WINDOW*, char*, char*, int, int, int, int ); +int PDC_sysgetch( void ); +bool PDC_transform_line( int ); +void PDC_usleep( long ); +int PDC_validchar( int ); + +#if defined( OS2 ) && !defined( EMXVIDEO ) +VIOCONFIGINFO PDC_query_adapter_type( void ); +VIOMODEINFO PDC_get_scrn_mode( void ); +int PDC_set_scrn_mode( VIOMODEINFO ); +bool PDC_scrn_modes_equal (VIOMODEINFO, VIOMODEINFO); +#else +int PDC_query_adapter_type( void ); +int PDC_get_scrn_mode( void ); +int PDC_set_scrn_mode( int ); +bool PDC_scrn_modes_equal (int, int); +#endif + +#ifdef FLEXOS +int PDC_flexos_8bitmode( void ); +int PDC_flexos_16bitmode( void ); +char* PDC_flexos_gname( void ); +#endif + +#ifdef UNIX +int PDC_kbhit(void); +int PDC_setup_keys(void); +#endif + +#if defined (XCURSES) +int XCurses_redraw_curscr(void); +int XCurses_display_cursor(int,int ,chtype ,int ,int ,chtype ); +int XCurses_rawgetch(void); +bool XCurses_kbhit(void); +int XCurses_instruct(int); +int XCurses_transform_line(long *, int , int , int ); +int Xinitscr(void); +int Xendwin(void); +#endif + +#ifdef PDCDEBUG +void PDC_debug( char*,... ); +#endif + +#ifdef REGISTERWINDOWS +bool PDC_inswin( WINDOW*, WINDOW* ); +int PDC_addtail( WINDOW* ); +int PDC_addwin( WINDOW*, WINDOW* ); +int PDC_rmwin( WINDOW* ); +WINDS* PDC_findwin( WINDOW* ); +#endif +# ifdef CPLUSPLUS + } +# endif +#endif + +#define PDC_COLOR_PAIRS 64 +#define PDC_OFFSET 8 +#define MAX_ATRTAB 272 +#define chtype_attr(ch) ((atrtab[((ch >> 8) & 0xFF)] << 8) & A_ATTRIBUTES) + +#include +#include + +#endif /* __CURSES_INTERNALS__*/ diff --git a/contrib/media/updf/include/cwchar b/contrib/media/updf/include/cwchar new file mode 100644 index 0000000000..311b2e9e31 --- /dev/null +++ b/contrib/media/updf/include/cwchar @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CWCHAR +#include +#endif diff --git a/contrib/media/updf/include/cwctype b/contrib/media/updf/include/cwctype new file mode 100644 index 0000000000..4cf2e7dfe7 --- /dev/null +++ b/contrib/media/updf/include/cwctype @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CWCTYPE +#include +#endif diff --git a/contrib/media/updf/include/debug/dbgcom.h b/contrib/media/updf/include/debug/dbgcom.h new file mode 100644 index 0000000000..c8938ef074 --- /dev/null +++ b/contrib/media/updf/include/debug/dbgcom.h @@ -0,0 +1,83 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_dbgcom_h_ +#define __dj_include_debug_dbgcom_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include +#include + +typedef struct { + unsigned long app_base; /* linear base address of application */ + unsigned long dr[8]; /* debug registers, set when a_tss runs */ +} ExternalDebuggerInfo; + +extern ExternalDebuggerInfo edi; + +/* structure of FPU state */ +/* 14 bytes for FPU env */ +/* plus 8*10 bytes from the FPU stack */ +/* r[8] is the array as defined in intel docs */ +/* st0 is r[top] */ + +#define NPX_TOP_MASK 0x3800 +#define NPX_TOP_SHIFT 11 + +typedef struct { + unsigned short sig0; + unsigned short sig1; + unsigned short sig2; + unsigned short sig3; + unsigned short exponent:15; + unsigned short sign:1; +} NPXREG; + +typedef struct { + unsigned long control; + unsigned long status; + unsigned long tag; + unsigned long eip; + unsigned long cs; + unsigned long dataptr; + unsigned long datasel; + NPXREG reg[8]; + long double st[8]; + char st_valid[8]; + long double mmx[8]; + char in_mmx_mode; + char top; +} NPX; + +extern NPX npx; + +void save_npx (void); /* Save the FPU of the debugged program */ +void load_npx (void); /* Restore the FPU of the debugged program */ + +void run_child(void); +int read_child(unsigned child_addr, void *buf, unsigned len); +int write_child(unsigned child_addr, void *buf, unsigned len); +void edi_init(jmp_buf start_state); +void cleanup_client(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_dbgcom_h_ */ diff --git a/contrib/media/updf/include/debug/redir.h b/contrib/media/updf/include/debug/redir.h new file mode 100644 index 0000000000..d370537ed2 --- /dev/null +++ b/contrib/media/updf/include/debug/redir.h @@ -0,0 +1,55 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_redir_h_ +#define __dj_include_debug_redir_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* How many handles do we track. + WARNING: if you change this, you need to recompile dbgredir.c !!! */ +#define DBG_HANDLES 3 + +/* Describe a single redirected handle. + Actually only inf_handle and our_handle are currently used (and + even they could share the same slot), but I'm keeping the rest, + mostly because they might be useful for applications. */ +struct dbg_redirect { + int inf_handle; + int our_handle; + char *file_name; + int mode; + off_t filepos; +}; + +/* cmdline_parse_args processes command lines into the following structure: */ +typedef struct _cmdline { + char *command; /* command line with redirection removed */ + int redirected; /* 1 if handles redirected for child */ + struct dbg_redirect **redirection;/* info about redirected handles */ +} cmdline_t; + +extern void redir_cmdline_delete (cmdline_t *); +extern int redir_cmdline_parse (const char *, cmdline_t *); +extern int redir_to_child (cmdline_t *); +extern int redir_to_debugger (cmdline_t *); +extern int redir_debug_init (cmdline_t *); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_dbgcom_h_ */ diff --git a/contrib/media/updf/include/debug/stab.h b/contrib/media/updf/include/debug/stab.h new file mode 100644 index 0000000000..b91ac12284 --- /dev/null +++ b/contrib/media/updf/include/debug/stab.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_stab_h_ +#define __dj_include_debug_stab_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* This is file STAB.H */ +/* +** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#if !defined (N_UNDF) +#define N_UNDF 0 +#endif +#if !defined (N_ABS) +#define N_ABS 2 +#endif +#if !defined (N_TEXT) +#define N_TEXT 4 +#endif +#if !defined (N_DATA) +#define N_DATA 6 +#endif +#if !defined (N_BSS) +#define N_BSS 8 +#endif +#if !defined (N_FN) +#define N_FN 15 +#endif + +#if !defined (N_EXT) +#define N_EXT 1 +#endif +#if !defined (N_TYPE) +#define N_TYPE 0x1e +#endif +#if !defined (N_STAB) +#define N_STAB 0xe0 +#endif + +#if !defined (N_SO) +#define N_SO 0x64 +#endif +#if !defined (N_SLINE) +#define N_SLINE 0x44 +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_stab_h_ */ diff --git a/contrib/media/updf/include/debug/syms.h b/contrib/media/updf/include/debug/syms.h new file mode 100644 index 0000000000..72de732807 --- /dev/null +++ b/contrib/media/updf/include/debug/syms.h @@ -0,0 +1,65 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_syms_h_ +#define __dj_include_debug_syms_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* This is file SYMS.H */ +/* +** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef _SYMS_H_ +#define _SYMS_H_ + +void syms_init(char *fname); +void syms_list(int byval); +unsigned long syms_name2val(const char *name); +char *syms_val2name(unsigned long val, unsigned long *delta); +char *syms_val2line(unsigned long val, int *lineret, int exact); +char *syms_module(int no); +unsigned long syms_line2val(char *filename, int lnum); +void syms_listwild(char *pattern, + void (*handler)(unsigned long addr, char type_c, char *name, char *name2, int lnum)); + +extern int undefined_symbol; +extern int syms_printwhy; + +#define N_INDR 0x0a +#define N_SETA 0x14 /* Absolute set element symbol */ +#define N_SETT 0x16 /* Text set element symbol */ +#define N_SETD 0x18 /* Data set element symbol */ +#define N_SETB 0x1A /* Bss set element symbol */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_syms_h_ */ diff --git a/contrib/media/updf/include/debug/tss.h b/contrib/media/updf/include/debug/tss.h new file mode 100644 index 0000000000..06fd68155a --- /dev/null +++ b/contrib/media/updf/include/debug/tss.h @@ -0,0 +1,72 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_tss_h_ +#define __dj_include_debug_tss_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +typedef struct TSS { + unsigned short tss_back_link; + unsigned short res0; + unsigned long tss_esp0; + unsigned short tss_ss0; + unsigned short res1; + unsigned long tss_esp1; + unsigned short tss_ss1; + unsigned short res2; + unsigned long tss_esp2; + unsigned short tss_ss2; + unsigned short res3; + unsigned long tss_cr3; + + unsigned long tss_eip; + unsigned long tss_eflags; + unsigned long tss_eax; + unsigned long tss_ecx; + unsigned long tss_edx; + unsigned long tss_ebx; + unsigned long tss_esp; + unsigned long tss_ebp; + unsigned long tss_esi; + unsigned long tss_edi; + unsigned short tss_es; + unsigned short res4; + unsigned short tss_cs; + unsigned short res5; + unsigned short tss_ss; + unsigned short res6; + unsigned short tss_ds; + unsigned short res7; + unsigned short tss_fs; + unsigned short res8; + unsigned short tss_gs; + unsigned short res9; + unsigned short tss_ldt; + unsigned short res10; + unsigned short tss_trap; + unsigned char tss_iomap; + unsigned char tss_irqn; + unsigned long tss_error; +} TSS; + +extern TSS a_tss; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_tss_h_ */ diff --git a/contrib/media/updf/include/debug/v2load.h b/contrib/media/updf/include/debug/v2load.h new file mode 100644 index 0000000000..13b56f80d8 --- /dev/null +++ b/contrib/media/updf/include/debug/v2load.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_v2load_h_ +#define __dj_include_debug_v2load_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include + +typedef struct { + unsigned first_addr; + unsigned last_addr; + } AREAS; + +typedef enum { + A_text, + A_data, + A_bss, + A_arena, + A_stack +} AREA_TYPES; + +#define areas _v2load_areas +#define MAX_AREA 5 + +extern AREAS areas[MAX_AREA]; + +int v2loadimage(const char *program, const char *cmdline, jmp_buf load_state); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_v2load_h_ */ diff --git a/contrib/media/updf/include/debug/wild.h b/contrib/media/updf/include/debug/wild.h new file mode 100644 index 0000000000..b93f661002 --- /dev/null +++ b/contrib/media/updf/include/debug/wild.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_debug_wild_h_ +#define __dj_include_debug_wild_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +int wild(char *pattern, char *string); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_debug_wild_h_ */ diff --git a/contrib/media/updf/include/debugmem.h b/contrib/media/updf/include/debugmem.h new file mode 100644 index 0000000000..a5a15b6ff0 --- /dev/null +++ b/contrib/media/updf/include/debugmem.h @@ -0,0 +1,23 @@ + + +#ifndef __debugmem_h__ +#define __debugmem_h__ + + +#ifdef YACAS_DEBUG + +#ifdef NO_GLOBALS +#error "Memory heap checking only possible with global variables!" +#endif + + void* YacasMallocPrivate(unsigned long size, const char* aFile, int aLine); + void* YacasReAllocPrivate(void* orig, unsigned long size, const char* aFile, int aLine); + void YacasFreePrivate(void* aOrig); + void CheckPtr(void * anAllocatedPtr, const char* file, int line); + void CheckAllPtrs(int final = 0); +#endif + +#endif + + + diff --git a/contrib/media/updf/include/deffile.h b/contrib/media/updf/include/deffile.h new file mode 100644 index 0000000000..914ba44e07 --- /dev/null +++ b/contrib/media/updf/include/deffile.h @@ -0,0 +1,47 @@ +/** \file deffile.h deffiles, which speed up loading. + * This module adds support for loading files which specify + * which script file to look for when trying to use a specific + * function. + */ + +#ifndef __deffile_h__ +#define __deffile_h__ + +#include "yacasbase.h" +#include "lisphash.h" + +/** LispDefFile represents one file that can be loaded just-in-time. + */ +class LispDefFile : public YacasBase +{ +public: + LispDefFile(LispString * aFile); + LispDefFile(const LispDefFile& aOther); + ~LispDefFile(); + void SetLoaded(); + inline LispBoolean IsLoaded(); + inline LispString * FileName(); + + LispStringSmartPtr iFileName; + LispBoolean iIsLoaded; +}; + +/** LispDefFiles maintains an array of files that can be defloaded. + * When the user invokes a DefLoad on a file, an entry is added to the + * array of deffiles in the LispEnvironment class. When the function + * is called, and there is no body of rules defined for this function, + * the engine looks up the correct file to load from this associated + * has class. + */ +class LispEnvironment; +class LispDefFiles : public LispAssociatedHash +{ +public: + LispDefFile* File(LispString * aFileName); +}; + +void LoadDefFile(LispEnvironment& aEnvironment, LispString * aFileName); + +#include "deffile.inl" + +#endif diff --git a/contrib/media/updf/include/defines.h b/contrib/media/updf/include/defines.h new file mode 100644 index 0000000000..c839f75ad3 --- /dev/null +++ b/contrib/media/updf/include/defines.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)defines.h 8.1 (Berkeley) 6/6/93 + */ + +#define settimer(x) clocks.x = clocks.system++ + +#if !defined(TN3270) + +#define SetIn3270() + +#endif /* !defined(TN3270) */ + +#define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); } +#define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } +#define NETBYTES() (ring_full_count(&netoring)) +#define NETROOM() (ring_empty_count(&netoring)) + +#define TTYADD(c) if (!(SYNCHing||flushout)) { \ + *ttyoring.supply = c; \ + ring_supplied(&ttyoring, 1); \ + } +#define TTYBYTES() (ring_full_count(&ttyoring)) +#define TTYROOM() (ring_empty_count(&ttyoring)) + +/* Various modes */ +#define MODE_LOCAL_CHARS(m) ((m)&(MODE_EDIT|MODE_TRAPSIG)) +#define MODE_LOCAL_ECHO(m) ((m)&MODE_ECHO) +#define MODE_COMMAND_LINE(m) ((m)==-1) + +#define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */ diff --git a/contrib/media/updf/include/deque b/contrib/media/updf/include/deque new file mode 100644 index 0000000000..c8ee81e9e6 --- /dev/null +++ b/contrib/media/updf/include/deque @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_DEQUE +#include +#endif diff --git a/contrib/media/updf/include/dir.h b/contrib/media/updf/include/dir.h new file mode 100644 index 0000000000..e8f4b32f82 --- /dev/null +++ b/contrib/media/updf/include/dir.h @@ -0,0 +1,92 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_dir_h_ +#define __dj_include_dir_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* ffblk is also enhanced for LFNs; the dos 21 byte reserved area is used to + hold the extra information. Fields marked LFN are only valid if the magic + is set to LFN32 */ + +/* This is for g++ 2.7.2 and below */ +#pragma pack(push,1) + +struct ffblk { + char lfn_magic[6]; /* LFN */ + short lfn_handle; /* LFN */ + unsigned short lfn_ctime; /* LFN */ + unsigned short lfn_cdate; /* LFN */ + unsigned short lfn_atime; /* LFN */ + unsigned short lfn_adate; /* LFN */ + char _ff_reserved[5]; + unsigned char ff_attrib; + unsigned short ff_ftime; + unsigned short ff_fdate; + unsigned long ff_fsize; + char ff_name[260]; +}; + +struct ffblklfn { + unsigned long fd_attrib; + unsigned long long fd_ctime; + unsigned long long fd_atime; + unsigned long long fd_mtime; + unsigned long fd_sizehi; + unsigned long fd_size; + unsigned long long fd_reserved; + char fd_longname[260]; + char fd_name[14]; +}; + +#pragma pack(pop) + +#define FA_RDONLY 1 +#define FA_HIDDEN 2 +#define FA_SYSTEM 4 +#define FA_LABEL 8 +#define FA_DIREC 16 +#define FA_ARCH 32 + +/* for fnmerge/fnsplit */ +#define MAXPATH 260 +#define MAXDRIVE 3 +#define MAXDIR 256 +#define MAXFILE 256 +#define MAXEXT 255 + +#define WILDCARDS 0x01 +#define EXTENSION 0x02 +#define FILENAME 0x04 +#define DIRECTORY 0x08 +#define DRIVE 0x10 + +int __file_tree_walk(const char *_dir, int (*_fn)(const char *_path, const struct ffblk *_ff)); +int findfirst(const char *_pathname, struct ffblk *_ffblk, int _attrib); +int findnext(struct ffblk *_ffblk); +void fnmerge (char *_path, const char *_drive, const char *_dir, const char *_name, const char *_ext); +int fnsplit (const char *_path, char *_drive, char *_dir, char *_name, char *_ext); +int getdisk(void); +char * searchpath(const char *_program); +int setdisk(int _drive); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_dir.h_ */ diff --git a/contrib/media/updf/include/direct.h b/contrib/media/updf/include/direct.h new file mode 100644 index 0000000000..45bab70a1d --- /dev/null +++ b/contrib/media/updf/include/direct.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_direct_h_ +#define __dj_include_direct_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_direct_h_ */ diff --git a/contrib/media/updf/include/dirent.h b/contrib/media/updf/include/dirent.h new file mode 100644 index 0000000000..cb527aed4a --- /dev/null +++ b/contrib/media/updf/include/dirent.h @@ -0,0 +1,62 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_dirent_h_ +#define __dj_include_dirent_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +/* Definition of DIR requires many other headers; not included here to + avoid namespace pollution. */ +//typedef struct __dj_DIR DIR; +#include + +struct dirent { + char d_namlen; + char d_name[256]; +}; + +typedef struct +{ + struct systree_info2 fileinfo; + struct dirent entry; + __u8 bdfeheader[0x20]; + struct bdfe_item bdfebase; + __u8 bdfename[264]; +} DIR; + +int closedir(DIR *dirp); +DIR * opendir(const char *_dirname); +struct dirent * readdir(DIR *_dirp); +//void rewinddir(DIR *_dirp); + +#ifndef _POSIX_SOURCE + +extern int __opendir_flags; /* default is zero, used only by opendir */ +#define __OPENDIR_PRESERVE_CASE 0001 +#define __OPENDIR_FIND_HIDDEN 0002 /* ignored; on by default */ +#define __OPENDIR_FIND_LABEL 0004 +#define __OPENDIR_NO_HIDDEN 0x08 /* NOT 0002 for back-compatibility */ + +void seekdir(DIR *_dir, long _loc); +long telldir(DIR *_dir); +void __set_need_fake_dot_dotdot(DIR *_dir); +void _lfn_find_close(int _handle); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_dirent_h_ */ diff --git a/contrib/media/updf/include/dos.h b/contrib/media/updf/include/dos.h new file mode 100644 index 0000000000..fda60119fb --- /dev/null +++ b/contrib/media/updf/include/dos.h @@ -0,0 +1,275 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_dos_h_ +#define __dj_include_dos_h_ + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include + +int _detect_80387(void); + +struct DWORDREGS { + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long cflag; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned short eflags; +}; + +struct DWORDREGS_W { + unsigned long di; + unsigned long si; + unsigned long bp; + unsigned long cflag; + unsigned long bx; + unsigned long dx; + unsigned long cx; + unsigned long ax; + unsigned short flags; +}; + +struct WORDREGS { + unsigned short di, _upper_di; + unsigned short si, _upper_si; + unsigned short bp, _upper_bp; + unsigned short cflag, _upper_cflag; + unsigned short bx, _upper_bx; + unsigned short dx, _upper_dx; + unsigned short cx, _upper_cx; + unsigned short ax, _upper_ax; + unsigned short flags; +}; + +struct BYTEREGS { + unsigned short di, _upper_di; + unsigned short si, _upper_si; + unsigned short bp, _upper_bp; + unsigned long cflag; + unsigned char bl; + unsigned char bh; + unsigned short _upper_bx; + unsigned char dl; + unsigned char dh; + unsigned short _upper_dx; + unsigned char cl; + unsigned char ch; + unsigned short _upper_cx; + unsigned char al; + unsigned char ah; + unsigned short _upper_ax; + unsigned short flags; +}; + +union REGS { /* Compatible with DPMI structure, except cflag */ + struct DWORDREGS d; +#ifdef _NAIVE_DOS_REGS + struct WORDREGS x; +#else +#ifdef _BORLAND_DOS_REGS + struct DWORDREGS x; +#else + struct DWORDREGS_W x; +#endif +#endif + struct WORDREGS w; + struct BYTEREGS h; +}; + +struct SREGS { + unsigned short es; + unsigned short ds; + unsigned short fs; + unsigned short gs; + unsigned short cs; + unsigned short ss; +}; + +struct ftime { + unsigned ft_tsec:5; /* 0-29, double to get real seconds */ + unsigned ft_min:6; /* 0-59 */ + unsigned ft_hour:5; /* 0-23 */ + unsigned ft_day:5; /* 1-31 */ + unsigned ft_month:4; /* 1-12 */ + unsigned ft_year:7; /* since 1980 */ +}; + +struct date { + short da_year; + char da_day; + char da_mon; +}; + +struct time { + unsigned char ti_min; + unsigned char ti_hour; + unsigned char ti_hund; + unsigned char ti_sec; +}; + +struct dfree { + unsigned df_avail; + unsigned df_total; + unsigned df_bsec; + unsigned df_sclus; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +extern unsigned short _osmajor, _osminor; +extern const char * _os_flavor; +extern int _doserrno; + +unsigned short _get_dos_version(int); + + +int int86(int ivec, union REGS *in, union REGS *out); +int int86x(int ivec, union REGS *in, union REGS *out, struct SREGS *seg); +int intdos(union REGS *in, union REGS *out); +int intdosx(union REGS *in, union REGS *out, struct SREGS *seg); +int bdos(int func, unsigned dx, unsigned al); +int bdosptr(int func, void *dx, unsigned al); + +#define bdosptr(a, b, c) bdos(a, (unsigned)(b), c) +#define intdos(a, b) int86(0x21, a, b) +#define intdosx(a, b, c) int86x(0x21, a, b, c) + +int getftime(int handle, struct ftime *ftimep); +int setftime(int handle, struct ftime *ftimep); + +int getcbrk(void); +int setcbrk(int new_value); + +void getdate(struct date *); +/* void gettime(struct time *); */ +void setdate(struct date *); +void settime(struct time *); + +void getdfree(unsigned char drive, struct dfree *ptr); + +void delay(unsigned msec); +/* int _get_default_drive(void); +void _fixpath(const char *, char *); */ + + +/* + * For compatibility with other DOS C compilers. + */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_VOLID 0x08 /* Volume ID file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +#define _enable enable +#define _disable disable + +struct _dosdate_t { + unsigned char day; /* 1-31 */ + unsigned char month; /* 1-12 */ + unsigned short year; /* 1980-2099 */ + unsigned char dayofweek; /* 0-6, 0=Sunday */ +}; +#define dosdate_t _dosdate_t + +struct _dostime_t { + unsigned char hour; /* 0-23 */ + unsigned char minute; /* 0-59 */ + unsigned char second; /* 0-59 */ + unsigned char hsecond; /* 0-99 */ +}; +#define dostime_t _dostime_t + +#pragma pack(push,1) +struct _find_t { + char reserved[21]; + unsigned char attrib; + unsigned short wr_time; + unsigned short wr_date; + unsigned long size; + char name[256]; +}; +#pragma pack(pop) +#define find_t _find_t + +struct _diskfree_t { + unsigned short total_clusters; + unsigned short avail_clusters; + unsigned short sectors_per_cluster; + unsigned short bytes_per_sector; +}; +#define diskfree_t _diskfree_t + +struct _DOSERROR { + int exterror; + #ifdef __cplusplus + char errclass; + #else + char class; + #endif + char action; + char locus; +}; +#define DOSERROR _DOSERROR + +unsigned int _dos_creat(const char *_filename, unsigned int _attr, int *_handle); +unsigned int _dos_creatnew(const char *_filename, unsigned int _attr, int *_handle); +unsigned int _dos_open(const char *_filename, unsigned int _mode, int *_handle); +unsigned int _dos_write(int _handle, const void *_buffer, unsigned int _count, unsigned int *_result); +unsigned int _dos_read(int _handle, void *_buffer, unsigned int _count, unsigned int *_result); +unsigned int _dos_close(int _handle); +unsigned int _dos_commit(int _handle); + +unsigned int _dos_findfirst(char *_name, unsigned int _attr, struct _find_t *_result); +unsigned int _dos_findnext(struct _find_t *_result); + +void _dos_getdate(struct _dosdate_t *_date); +unsigned int _dos_setdate(struct _dosdate_t *_date); +void _dos_gettime(struct _dostime_t *_time); +unsigned int _dos_settime(struct _dostime_t *_time); + +unsigned int _dos_getftime(int _handle, unsigned int *_p_date, unsigned int *_p_time); +unsigned int _dos_setftime(int _handle, unsigned int _date, unsigned int _time); +unsigned int _dos_getfileattr(const char *_filename, unsigned int *_p_attr); +unsigned int _dos_setfileattr(const char *_filename, unsigned int _attr); + +void _dos_getdrive(unsigned int *_p_drive); +void _dos_setdrive(unsigned int _drive, unsigned int *_p_drives); +unsigned int _dos_getdiskfree(unsigned int _drive, struct _diskfree_t *_diskspace); + +int _dosexterr(struct _DOSERROR *_p_error); +#define dosexterr(_ep) _dosexterr(_ep) + +#define int386(_i, _ir, _or) int86(_i, _ir, _or) +#define int386x(_i, _ir, _or, _sr) int86x(_i, _ir, _or, _sr) + +#ifdef __cplusplus +} +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifndef _USE_LFN +#define _USE_LFN (1) +#endif + +#endif /* !__dj_include_dos_h_ */ diff --git a/contrib/media/updf/include/dwt.h b/contrib/media/updf/include/dwt.h new file mode 100644 index 0000000000..adf73e5440 --- /dev/null +++ b/contrib/media/updf/include/dwt.h @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __DWT_H +#define __DWT_H +/** +@file dwt.h +@brief Implementation of a discrete wavelet transform (DWT) + +The functions in DWT.C have for goal to realize forward and inverse discret wavelet +transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in +DWT.C are used by some function in TCD.C. +*/ + +/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */ +/*@{*/ + + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Forward 5-3 wavelet tranform in 2-D. +Apply a reversible DWT transform to a component of an image. +@param tilec Tile component information (current tile) +*/ +void dwt_encode(opj_tcd_tilecomp_t * tilec); +/** +Inverse 5-3 wavelet tranform in 2-D. +Apply a reversible inverse DWT transform to a component of an image. +@param tilec Tile component information (current tile) +@param numres Number of resolution levels to decode +*/ +void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres); +/** +Get the gain of a subband for the reversible 5-3 DWT. +@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) +@return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise +*/ +int dwt_getgain(int orient); +/** +Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. +@param level Level of the wavelet function +@param orient Band of the wavelet function +@return Returns the norm of the wavelet function +*/ +double dwt_getnorm(int level, int orient); +/** +Forward 9-7 wavelet transform in 2-D. +Apply an irreversible DWT transform to a component of an image. +@param tilec Tile component information (current tile) +*/ +void dwt_encode_real(opj_tcd_tilecomp_t * tilec); +/** +Inverse 9-7 wavelet transform in 2-D. +Apply an irreversible inverse DWT transform to a component of an image. +@param tilec Tile component information (current tile) +@param numres Number of resolution levels to decode +*/ +void dwt_decode_real(opj_tcd_tilecomp_t* tilec, int numres); +/** +Get the gain of a subband for the irreversible 9-7 DWT. +@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) +@return Returns the gain of the 9-7 wavelet transform +*/ +int dwt_getgain_real(int orient); +/** +Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT +@param level Level of the wavelet function +@param orient Band of the wavelet function +@return Returns the norm of the 9-7 wavelet +*/ +double dwt_getnorm_real(int level, int orient); +/** +Explicit calculation of the Quantization Stepsizes +@param tccp Tile-component coding parameters +@param prec Precint analyzed +*/ +void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __DWT_H */ diff --git a/contrib/media/updf/include/efmt.h b/contrib/media/updf/include/efmt.h new file mode 100644 index 0000000000..39e2cb4225 --- /dev/null +++ b/contrib/media/updf/include/efmt.h @@ -0,0 +1,85 @@ +#ifndef __EFMT_H +#define __EFMT_H + +#ifndef __PACKED__ +#define __PACKED__ __attribute__((packed)) +#endif + +typedef struct +{ + unsigned long magic __PACKED__; + unsigned char bitness __PACKED__; + unsigned char endian __PACKED__; + unsigned char elf_ver_1 __PACKED__; + unsigned char res[9] __PACKED__; + unsigned short file_type __PACKED__; + unsigned short machine __PACKED__; + unsigned long elf_ver_2 __PACKED__; + unsigned long entry_pt __PACKED__; + unsigned long phtab_offset __PACKED__; + unsigned long shtab_offset __PACKED__; + unsigned long flags __PACKED__; + unsigned short file_hdr_size __PACKED__; + unsigned short phtab_ent_size __PACKED__; + unsigned short num_phtab_ents __PACKED__; + unsigned short shtab_ent_size __PACKED__; + unsigned short num_sects __PACKED__; + unsigned short shstrtab_index __PACKED__; +} elf_file_t; + +typedef struct +{ + unsigned long sect_name __PACKED__; + unsigned long type __PACKED__; + unsigned long flags __PACKED__; + unsigned long virt_adr __PACKED__; + unsigned long offset __PACKED__; + unsigned long size __PACKED__; + unsigned long link __PACKED__; + unsigned long info __PACKED__; + unsigned long align __PACKED__; + unsigned long ent_size __PACKED__; +} elf_sect_t; + +typedef struct +{ + unsigned long adr __PACKED__; + unsigned char type __PACKED__; + unsigned long symtab_index:24 __PACKED__; + unsigned long addend __PACKED__; +} elf_reloc_t; + +typedef struct +{ + unsigned long name __PACKED__; + unsigned long value __PACKED__; + unsigned long size __PACKED__; + unsigned type:4 __PACKED__; + unsigned binding:4 __PACKED__; + unsigned char zero __PACKED__; + unsigned short section __PACKED__; +} elf_sym_t; + +typedef struct +{ + unsigned char * file, * sects,*bss,*symtab; + char * strtab; + unsigned long bss_sect_num,entry; +} exe_file_t; + +int get_elf_section_name(exe_file_t * f,unsigned short sect_num,char * namebuf); +int get_elf_section_addr(exe_file_t * f,unsigned short sect_num,unsigned long * adr); +int get_elf_symbol_addr(exe_file_t * f,unsigned long i, + unsigned long * sym_val,unsigned short sect_num, + int (* lookup_fn)(char * symname,unsigned long * val)); +int do_elf_relocation(exe_file_t * f,elf_reloc_t * reloc, + unsigned short sect_num,unsigned long symtab_sect_num, + int (* sym_lookup_fn)(char * symname,unsigned long * val),int ignore_ext); +int get_elf_section_index(exe_file_t * f,char * sect_name,unsigned long * i); +int elf_load_from_mem(exe_file_t * f); +int relocate_elf_file(exe_file_t * f, + int (* sym_lookup_fn)(char * symname,unsigned long * val),int ignore_ext); +int get_elf_symbol_value(exe_file_t * f,char * symname,unsigned long * symval); + + +#endif diff --git a/contrib/media/updf/include/elf.h b/contrib/media/updf/include/elf.h new file mode 100644 index 0000000000..a9f0777bf0 --- /dev/null +++ b/contrib/media/updf/include/elf.h @@ -0,0 +1,2105 @@ +/* This file defines standard ELF types, structures, and macros. + Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _ELF_H +#define _ELF_H 1 + +#include + + +/* Standard ELF types. */ + +#include + +/* Type for a 16-bit quantity. */ +typedef uint16_t Elf32_Half; +typedef uint16_t Elf64_Half; + +/* Types for signed and unsigned 32-bit quantities. */ +typedef uint32_t Elf32_Word; +typedef int32_t Elf32_Sword; +typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; + +/* Types for signed and unsigned 64-bit quantities. */ +typedef uint64_t Elf32_Xword; +typedef int64_t Elf32_Sxword; +typedef uint64_t Elf64_Xword; +typedef int64_t Elf64_Sxword; + +/* Type of addresses. */ +typedef uint32_t Elf32_Addr; +typedef uint64_t Elf64_Addr; + +/* Type of file offsets. */ +typedef uint32_t Elf32_Off; +typedef uint64_t Elf64_Off; + +/* Type for section indices, which are 16-bit quantities. */ +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; + +/* Type for version symbol information. */ +typedef Elf32_Half Elf32_Versym; +typedef Elf64_Half Elf64_Versym; + + +/* The ELF file header. This appears at the start of every ELF file. */ + +#define EI_NIDENT (16) + +typedef struct +{ + unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ + Elf32_Half e_type; /* Object file type */ + Elf32_Half e_machine; /* Architecture */ + Elf32_Word e_version; /* Object file version */ + Elf32_Addr e_entry; /* Entry point virtual address */ + Elf32_Off e_phoff; /* Program header table file offset */ + Elf32_Off e_shoff; /* Section header table file offset */ + Elf32_Word e_flags; /* Processor-specific flags */ + Elf32_Half e_ehsize; /* ELF header size in bytes */ + Elf32_Half e_phentsize; /* Program header table entry size */ + Elf32_Half e_phnum; /* Program header table entry count */ + Elf32_Half e_shentsize; /* Section header table entry size */ + Elf32_Half e_shnum; /* Section header table entry count */ + Elf32_Half e_shstrndx; /* Section header string table index */ +} Elf32_Ehdr; + +typedef struct +{ + unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ + Elf64_Half e_type; /* Object file type */ + Elf64_Half e_machine; /* Architecture */ + Elf64_Word e_version; /* Object file version */ + Elf64_Addr e_entry; /* Entry point virtual address */ + Elf64_Off e_phoff; /* Program header table file offset */ + Elf64_Off e_shoff; /* Section header table file offset */ + Elf64_Word e_flags; /* Processor-specific flags */ + Elf64_Half e_ehsize; /* ELF header size in bytes */ + Elf64_Half e_phentsize; /* Program header table entry size */ + Elf64_Half e_phnum; /* Program header table entry count */ + Elf64_Half e_shentsize; /* Section header table entry size */ + Elf64_Half e_shnum; /* Section header table entry count */ + Elf64_Half e_shstrndx; /* Section header string table index */ +} Elf64_Ehdr; + +/* Fields in the e_ident array. The EI_* macros are indices into the + array. The macros under each EI_* macro are the values the byte + may have. */ + +#define EI_MAG0 0 /* File identification byte 0 index */ +#define ELFMAG0 0x7f /* Magic number byte 0 */ + +#define EI_MAG1 1 /* File identification byte 1 index */ +#define ELFMAG1 'E' /* Magic number byte 1 */ + +#define EI_MAG2 2 /* File identification byte 2 index */ +#define ELFMAG2 'L' /* Magic number byte 2 */ + +#define EI_MAG3 3 /* File identification byte 3 index */ +#define ELFMAG3 'F' /* Magic number byte 3 */ + +/* Conglomeration of the identification bytes, for easy testing as a word. */ +#define ELFMAG "\177ELF" +#define SELFMAG 4 + +#define EI_CLASS 4 /* File class byte index */ +#define ELFCLASSNONE 0 /* Invalid class */ +#define ELFCLASS32 1 /* 32-bit objects */ +#define ELFCLASS64 2 /* 64-bit objects */ +#define ELFCLASSNUM 3 + +#define EI_DATA 5 /* Data encoding byte index */ +#define ELFDATANONE 0 /* Invalid data encoding */ +#define ELFDATA2LSB 1 /* 2's complement, little endian */ +#define ELFDATA2MSB 2 /* 2's complement, big endian */ +#define ELFDATANUM 3 + +#define EI_VERSION 6 /* File version byte index */ + /* Value must be EV_CURRENT */ + +#define EI_OSABI 7 /* OS ABI identification */ +#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ +#define ELFOSABI_HPUX 1 /* HP-UX */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ + +#define EI_ABIVERSION 8 /* ABI version */ + +#define EI_PAD 9 /* Byte index of padding bytes */ + +/* Legal values for e_type (object file type). */ + +#define ET_NONE 0 /* No file type */ +#define ET_REL 1 /* Relocatable file */ +#define ET_EXEC 2 /* Executable file */ +#define ET_DYN 3 /* Shared object file */ +#define ET_CORE 4 /* Core file */ +#define ET_NUM 5 /* Number of defined types */ +#define ET_LOOS 0xfe00 /* OS-specific range start */ +#define ET_HIOS 0xfeff /* OS-specific range end */ +#define ET_LOPROC 0xff00 /* Processor-specific range start */ +#define ET_HIPROC 0xffff /* Processor-specific range end */ + +/* Legal values for e_machine (architecture). */ + +#define EM_NONE 0 /* No machine */ +#define EM_M32 1 /* AT&T WE 32100 */ +#define EM_SPARC 2 /* SUN SPARC */ +#define EM_386 3 /* Intel 80386 */ +#define EM_68K 4 /* Motorola m68k family */ +#define EM_88K 5 /* Motorola m88k family */ +#define EM_860 7 /* Intel 80860 */ +#define EM_MIPS 8 /* MIPS R3000 big-endian */ +#define EM_S370 9 /* IBM System/370 */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ + +#define EM_PARISC 15 /* HPPA */ +#define EM_VPP500 17 /* Fujitsu VPP500 */ +#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ +#define EM_960 19 /* Intel 80960 */ +#define EM_PPC 20 /* PowerPC */ +#define EM_PPC64 21 /* PowerPC 64-bit */ +#define EM_S390 22 /* IBM S390 */ + +#define EM_V800 36 /* NEC V800 series */ +#define EM_FR20 37 /* Fujitsu FR20 */ +#define EM_RH32 38 /* TRW RH-32 */ +#define EM_RCE 39 /* Motorola RCE */ +#define EM_ARM 40 /* ARM */ +#define EM_FAKE_ALPHA 41 /* Digital Alpha */ +#define EM_SH 42 /* Hitachi SH */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit */ +#define EM_TRICORE 44 /* Siemens Tricore */ +#define EM_ARC 45 /* Argonaut RISC Core */ +#define EM_H8_300 46 /* Hitachi H8/300 */ +#define EM_H8_300H 47 /* Hitachi H8/300H */ +#define EM_H8S 48 /* Hitachi H8S */ +#define EM_H8_500 49 /* Hitachi H8/500 */ +#define EM_IA_64 50 /* Intel Merced */ +#define EM_MIPS_X 51 /* Stanford MIPS-X */ +#define EM_COLDFIRE 52 /* Motorola Coldfire */ +#define EM_68HC12 53 /* Motorola M68HC12 */ +#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ +#define EM_PCP 55 /* Siemens PCP */ +#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ +#define EM_NDR1 57 /* Denso NDR1 microprocessor */ +#define EM_STARCORE 58 /* Motorola Start*Core processor */ +#define EM_ME16 59 /* Toyota ME16 processor */ +#define EM_ST100 60 /* STMicroelectronic ST100 processor */ +#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ +#define EM_X86_64 62 /* AMD x86-64 architecture */ +#define EM_PDSP 63 /* Sony DSP Processor */ + +#define EM_FX66 66 /* Siemens FX66 microcontroller */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ +#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ +#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ +#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ +#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ +#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ +#define EM_SVX 73 /* Silicon Graphics SVx */ +#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */ +#define EM_VAX 75 /* Digital VAX */ +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ +#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */ +#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ +#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ +#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ +#define EM_HUANY 81 /* Harvard University machine-independent object files */ +#define EM_PRISM 82 /* SiTera Prism */ +#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ +#define EM_FR30 84 /* Fujitsu FR30 */ +#define EM_D10V 85 /* Mitsubishi D10V */ +#define EM_D30V 86 /* Mitsubishi D30V */ +#define EM_V850 87 /* NEC v850 */ +#define EM_M32R 88 /* Mitsubishi M32R */ +#define EM_MN10300 89 /* Matsushita MN10300 */ +#define EM_MN10200 90 /* Matsushita MN10200 */ +#define EM_PJ 91 /* picoJava */ +#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ +#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ +#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ +#define EM_NUM 95 + +/* If it is necessary to assign new unofficial EM_* values, please + pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the + chances of collision with official or non-GNU unofficial values. */ + +#define EM_ALPHA 0x9026 + +/* Legal values for e_version (version). */ + +#define EV_NONE 0 /* Invalid ELF version */ +#define EV_CURRENT 1 /* Current version */ +#define EV_NUM 2 + +/* Section header. */ + +typedef struct +{ + Elf32_Word sh_name; /* Section name (string tbl index) */ + Elf32_Word sh_type; /* Section type */ + Elf32_Word sh_flags; /* Section flags */ + Elf32_Addr sh_addr; /* Section virtual addr at execution */ + Elf32_Off sh_offset; /* Section file offset */ + Elf32_Word sh_size; /* Section size in bytes */ + Elf32_Word sh_link; /* Link to another section */ + Elf32_Word sh_info; /* Additional section information */ + Elf32_Word sh_addralign; /* Section alignment */ + Elf32_Word sh_entsize; /* Entry size if section holds table */ +} Elf32_Shdr; + +typedef struct +{ + Elf64_Word sh_name; /* Section name (string tbl index) */ + Elf64_Word sh_type; /* Section type */ + Elf64_Xword sh_flags; /* Section flags */ + Elf64_Addr sh_addr; /* Section virtual addr at execution */ + Elf64_Off sh_offset; /* Section file offset */ + Elf64_Xword sh_size; /* Section size in bytes */ + Elf64_Word sh_link; /* Link to another section */ + Elf64_Word sh_info; /* Additional section information */ + Elf64_Xword sh_addralign; /* Section alignment */ + Elf64_Xword sh_entsize; /* Entry size if section holds table */ +} Elf64_Shdr; + +/* Special section indices. */ + +#define SHN_UNDEF 0 /* Undefined section */ +#define SHN_LORESERVE 0xff00 /* Start of reserved indices */ +#define SHN_LOPROC 0xff00 /* Start of processor-specific */ +#define SHN_HIPROC 0xff1f /* End of processor-specific */ +#define SHN_LOOS 0xff20 /* Start of OS-specific */ +#define SHN_HIOS 0xff3f /* End of OS-specific */ +#define SHN_ABS 0xfff1 /* Associated symbol is absolute */ +#define SHN_COMMON 0xfff2 /* Associated symbol is common */ +#define SHN_XINDEX 0xffff /* Index is in extra table. */ +#define SHN_HIRESERVE 0xffff /* End of reserved indices */ + +/* Legal values for sh_type (section type). */ + +#define SHT_NULL 0 /* Section header table entry unused */ +#define SHT_PROGBITS 1 /* Program data */ +#define SHT_SYMTAB 2 /* Symbol table */ +#define SHT_STRTAB 3 /* String table */ +#define SHT_RELA 4 /* Relocation entries with addends */ +#define SHT_HASH 5 /* Symbol hash table */ +#define SHT_DYNAMIC 6 /* Dynamic linking information */ +#define SHT_NOTE 7 /* Notes */ +#define SHT_NOBITS 8 /* Program space with no data (bss) */ +#define SHT_REL 9 /* Relocation entries, no addends */ +#define SHT_SHLIB 10 /* Reserved */ +#define SHT_DYNSYM 11 /* Dynamic linker symbol table */ +#define SHT_INIT_ARRAY 14 /* Array of constructors */ +#define SHT_FINI_ARRAY 15 /* Array of destructors */ +#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ +#define SHT_GROUP 17 /* Section group */ +#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ +#define SHT_NUM 19 /* Number of defined types. */ +#define SHT_LOOS 0x60000000 /* Start OS-specific */ +#define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */ +#define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */ +#define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */ +#define SHT_SUNW_move 0x6ffffffa +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ +#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ +#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ +#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ +#define SHT_HIOS 0x6fffffff /* End OS-specific type */ +#define SHT_LOPROC 0x70000000 /* Start of processor-specific */ +#define SHT_HIPROC 0x7fffffff /* End of processor-specific */ +#define SHT_LOUSER 0x80000000 /* Start of application-specific */ +#define SHT_HIUSER 0x8fffffff /* End of application-specific */ + +/* Legal values for sh_flags (section flags). */ + +#define SHF_WRITE (1 << 0) /* Writable */ +#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ +#define SHF_EXECINSTR (1 << 2) /* Executable */ +#define SHF_MERGE (1 << 4) /* Might be merged */ +#define SHF_STRINGS (1 << 5) /* Contains nul-terminated strings */ +#define SHF_INFO_LINK (1 << 6) /* `sh_info' contains SHT index */ +#define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */ +#define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling + required */ +#define SHF_MASKOS 0x0ff00000 /* OS-specific. */ +#define SHF_MASKPROC 0xf0000000 /* Processor-specific */ + +/* Section group handling. */ +#define GRP_COMDAT 0x1 /* Mark group as COMDAT. */ + +/* Symbol table entry. */ + +typedef struct +{ + Elf32_Word st_name; /* Symbol name (string tbl index) */ + Elf32_Addr st_value; /* Symbol value */ + Elf32_Word st_size; /* Symbol size */ + unsigned char st_info; /* Symbol type and binding */ + unsigned char st_other; /* Symbol visibility */ + Elf32_Section st_shndx; /* Section index */ +} Elf32_Sym; + +typedef struct +{ + Elf64_Word st_name; /* Symbol name (string tbl index) */ + unsigned char st_info; /* Symbol type and binding */ + unsigned char st_other; /* Symbol visibility */ + Elf64_Section st_shndx; /* Section index */ + Elf64_Addr st_value; /* Symbol value */ + Elf64_Xword st_size; /* Symbol size */ +} Elf64_Sym; + +/* The syminfo section if available contains additional information about + every dynamic symbol. */ + +typedef struct +{ + Elf32_Half si_boundto; /* Direct bindings, symbol bound to */ + Elf32_Half si_flags; /* Per symbol flags */ +} Elf32_Syminfo; + +typedef struct +{ + Elf64_Half si_boundto; /* Direct bindings, symbol bound to */ + Elf64_Half si_flags; /* Per symbol flags */ +} Elf64_Syminfo; + +/* Possible values for si_boundto. */ +#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ +#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ +#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ + +/* Possible bitmasks for si_flags. */ +#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ +#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ +#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ +#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy + loaded */ +/* Syminfo version values. */ +#define SYMINFO_NONE 0 +#define SYMINFO_CURRENT 1 +#define SYMINFO_NUM 2 + + +/* Special section index. */ + +#define SHN_UNDEF 0 /* No section, undefined symbol. */ + +/* How to extract and insert information held in the st_info field. */ + +#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) +#define ELF32_ST_TYPE(val) ((val) & 0xf) +#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) + +/* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */ +#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) +#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) +#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) + +/* Legal values for ST_BIND subfield of st_info (symbol binding). */ + +#define STB_LOCAL 0 /* Local symbol */ +#define STB_GLOBAL 1 /* Global symbol */ +#define STB_WEAK 2 /* Weak symbol */ +#define STB_NUM 3 /* Number of defined types. */ +#define STB_LOOS 10 /* Start of OS-specific */ +#define STB_HIOS 12 /* End of OS-specific */ +#define STB_LOPROC 13 /* Start of processor-specific */ +#define STB_HIPROC 15 /* End of processor-specific */ + +/* Legal values for ST_TYPE subfield of st_info (symbol type). */ + +#define STT_NOTYPE 0 /* Symbol type is unspecified */ +#define STT_OBJECT 1 /* Symbol is a data object */ +#define STT_FUNC 2 /* Symbol is a code object */ +#define STT_SECTION 3 /* Symbol associated with a section */ +#define STT_FILE 4 /* Symbol's name is file name */ +#define STT_COMMON 5 /* Symbol is a common data object */ +#define STT_NUM 6 /* Number of defined types. */ +#define STT_LOOS 10 /* Start of OS-specific */ +#define STT_HIOS 12 /* End of OS-specific */ +#define STT_LOPROC 13 /* Start of processor-specific */ +#define STT_HIPROC 15 /* End of processor-specific */ + + +/* Symbol table indices are found in the hash buckets and chain table + of a symbol hash table section. This special index value indicates + the end of a chain, meaning no further symbols are found in that bucket. */ + +#define STN_UNDEF 0 /* End of a chain. */ + + +/* How to extract and insert information held in the st_other field. */ + +#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) + +/* For ELF64 the definitions are the same. */ +#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) + +/* Symbol visibility specification encoded in the st_other field. */ +#define STV_DEFAULT 0 /* Default symbol visibility rules */ +#define STV_INTERNAL 1 /* Processor specific hidden class */ +#define STV_HIDDEN 2 /* Sym unavailable in other modules */ +#define STV_PROTECTED 3 /* Not preemptible, not exported */ + + +/* Relocation table entry without addend (in section of type SHT_REL). */ + +typedef struct +{ + Elf32_Addr r_offset; /* Address */ + Elf32_Word r_info; /* Relocation type and symbol index */ +} Elf32_Rel; + +/* I have seen two different definitions of the Elf64_Rel and + Elf64_Rela structures, so we'll leave them out until Novell (or + whoever) gets their act together. */ +/* The following, at least, is used on Sparc v9, MIPS, and Alpha. */ + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + Elf64_Xword r_info; /* Relocation type and symbol index */ +} Elf64_Rel; + +/* Relocation table entry with addend (in section of type SHT_RELA). */ + +typedef struct +{ + Elf32_Addr r_offset; /* Address */ + Elf32_Word r_info; /* Relocation type and symbol index */ + Elf32_Sword r_addend; /* Addend */ +} Elf32_Rela; + +typedef struct +{ + Elf64_Addr r_offset; /* Address */ + Elf64_Xword r_info; /* Relocation type and symbol index */ + Elf64_Sxword r_addend; /* Addend */ +} Elf64_Rela; + +/* How to extract and insert information held in the r_info field. */ + +#define ELF32_R_SYM(val) ((val) >> 8) +#define ELF32_R_TYPE(val) ((val) & 0xff) +#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) + +#define ELF64_R_SYM(i) ((i) >> 32) +#define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) + +/* Program segment header. */ + +typedef struct +{ + Elf32_Word p_type; /* Segment type */ + Elf32_Off p_offset; /* Segment file offset */ + Elf32_Addr p_vaddr; /* Segment virtual address */ + Elf32_Addr p_paddr; /* Segment physical address */ + Elf32_Word p_filesz; /* Segment size in file */ + Elf32_Word p_memsz; /* Segment size in memory */ + Elf32_Word p_flags; /* Segment flags */ + Elf32_Word p_align; /* Segment alignment */ +} Elf32_Phdr; + +typedef struct +{ + Elf64_Word p_type; /* Segment type */ + Elf64_Word p_flags; /* Segment flags */ + Elf64_Off p_offset; /* Segment file offset */ + Elf64_Addr p_vaddr; /* Segment virtual address */ + Elf64_Addr p_paddr; /* Segment physical address */ + Elf64_Xword p_filesz; /* Segment size in file */ + Elf64_Xword p_memsz; /* Segment size in memory */ + Elf64_Xword p_align; /* Segment alignment */ +} Elf64_Phdr; + +/* Legal values for p_type (segment type). */ + +#define PT_NULL 0 /* Program header table entry unused */ +#define PT_LOAD 1 /* Loadable program segment */ +#define PT_DYNAMIC 2 /* Dynamic linking information */ +#define PT_INTERP 3 /* Program interpreter */ +#define PT_NOTE 4 /* Auxiliary information */ +#define PT_SHLIB 5 /* Reserved */ +#define PT_PHDR 6 /* Entry for header table itself */ +#define PT_NUM 7 /* Number of defined types */ +#define PT_LOOS 0x60000000 /* Start of OS-specific */ +#define PT_HIOS 0x6fffffff /* End of OS-specific */ +#define PT_LOPROC 0x70000000 /* Start of processor-specific */ +#define PT_HIPROC 0x7fffffff /* End of processor-specific */ + +/* Legal values for p_flags (segment flags). */ + +#define PF_X (1 << 0) /* Segment is executable */ +#define PF_W (1 << 1) /* Segment is writable */ +#define PF_R (1 << 2) /* Segment is readable */ +#define PF_MASKOS 0x0ff00000 /* OS-specific */ +#define PF_MASKPROC 0xf0000000 /* Processor-specific */ + +/* Legal values for note segment descriptor types for core files. */ + +#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ +#define NT_FPREGSET 2 /* Contains copy of fpregset struct */ +#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ +#define NT_PRXREG 4 /* Contains copy of prxregset struct */ +#define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ +#define NT_AUXV 6 /* Contains copy of auxv array */ +#define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ +#define NT_PSTATUS 10 /* Contains copy of pstatus struct */ +#define NT_PSINFO 13 /* Contains copy of psinfo struct */ +#define NT_PRCRED 14 /* Contains copy of prcred struct */ +#define NT_UTSNAME 15 /* Contains copy of utsname struct */ +#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ +#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ +#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct*/ + +/* Legal values for the note segment descriptor types for object files. */ + +#define NT_VERSION 1 /* Contains a version string. */ + + +/* Dynamic section entry. */ + +typedef struct +{ + Elf32_Sword d_tag; /* Dynamic entry type */ + union + { + Elf32_Word d_val; /* Integer value */ + Elf32_Addr d_ptr; /* Address value */ + } d_un; +} Elf32_Dyn; + +typedef struct +{ + Elf64_Sxword d_tag; /* Dynamic entry type */ + union + { + Elf64_Xword d_val; /* Integer value */ + Elf64_Addr d_ptr; /* Address value */ + } d_un; +} Elf64_Dyn; + +/* Legal values for d_tag (dynamic entry type). */ + +#define DT_NULL 0 /* Marks end of dynamic section */ +#define DT_NEEDED 1 /* Name of needed library */ +#define DT_PLTRELSZ 2 /* Size in bytes of PLT relocs */ +#define DT_PLTGOT 3 /* Processor defined value */ +#define DT_HASH 4 /* Address of symbol hash table */ +#define DT_STRTAB 5 /* Address of string table */ +#define DT_SYMTAB 6 /* Address of symbol table */ +#define DT_RELA 7 /* Address of Rela relocs */ +#define DT_RELASZ 8 /* Total size of Rela relocs */ +#define DT_RELAENT 9 /* Size of one Rela reloc */ +#define DT_STRSZ 10 /* Size of string table */ +#define DT_SYMENT 11 /* Size of one symbol table entry */ +#define DT_INIT 12 /* Address of init function */ +#define DT_FINI 13 /* Address of termination function */ +#define DT_SONAME 14 /* Name of shared object */ +#define DT_RPATH 15 /* Library search path (deprecated) */ +#define DT_SYMBOLIC 16 /* Start symbol search here */ +#define DT_REL 17 /* Address of Rel relocs */ +#define DT_RELSZ 18 /* Total size of Rel relocs */ +#define DT_RELENT 19 /* Size of one Rel reloc */ +#define DT_PLTREL 20 /* Type of reloc in PLT */ +#define DT_DEBUG 21 /* For debugging; unspecified */ +#define DT_TEXTREL 22 /* Reloc might modify .text */ +#define DT_JMPREL 23 /* Address of PLT relocs */ +#define DT_BIND_NOW 24 /* Process relocations of object */ +#define DT_INIT_ARRAY 25 /* Array with addresses of init fct */ +#define DT_FINI_ARRAY 26 /* Array with addresses of fini fct */ +#define DT_INIT_ARRAYSZ 27 /* Size in bytes of DT_INIT_ARRAY */ +#define DT_FINI_ARRAYSZ 28 /* Size in bytes of DT_FINI_ARRAY */ +#define DT_RUNPATH 29 /* Library search path */ +#define DT_FLAGS 30 /* Flags for the object being loaded */ +#define DT_ENCODING 32 /* Start of encoded range */ +#define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ +#define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ +#define DT_NUM 34 /* Number used */ +#define DT_LOOS 0x60000000 /* Start of OS-specific */ +#define DT_HIOS 0x6fffffff /* End of OS-specific */ +#define DT_LOPROC 0x70000000 /* Start of processor-specific */ +#define DT_HIPROC 0x7fffffff /* End of processor-specific */ +#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */ + +/* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the + Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's + approach. */ +#define DT_VALRNGLO 0x6ffffd00 +#define DT_GNU_PRELINKED 0x6ffffdf5 /* Prelinking timestamp */ +#define DT_GNU_CONFLICTSZ 0x6ffffdf6 /* Size of conflict section */ +#define DT_GNU_LIBLISTSZ 0x6ffffdf7 /* Size of library list */ +#define DT_CHECKSUM 0x6ffffdf8 +#define DT_PLTPADSZ 0x6ffffdf9 +#define DT_MOVEENT 0x6ffffdfa +#define DT_MOVESZ 0x6ffffdfb +#define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */ +#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting + the following DT_* entry. */ +#define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */ +#define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */ +#define DT_VALRNGHI 0x6ffffdff +#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) /* Reverse order! */ +#define DT_VALNUM 12 + +/* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the + Dyn.d_un.d_ptr field of the Elf*_Dyn structure. + + If any adjustment is made to the ELF object after it has been + built these entries will need to be adjusted. */ +#define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */ +#define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */ +#define DT_CONFIG 0x6ffffefa /* Configuration information. */ +#define DT_DEPAUDIT 0x6ffffefb /* Dependency auditing. */ +#define DT_AUDIT 0x6ffffefc /* Object auditing. */ +#define DT_PLTPAD 0x6ffffefd /* PLT padding. */ +#define DT_MOVETAB 0x6ffffefe /* Move table. */ +#define DT_SYMINFO 0x6ffffeff /* Syminfo table. */ +#define DT_ADDRRNGHI 0x6ffffeff +#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */ +#define DT_ADDRNUM 10 + +/* The versioning entry types. The next are defined as part of the + GNU extension. */ +#define DT_VERSYM 0x6ffffff0 + +#define DT_RELACOUNT 0x6ffffff9 +#define DT_RELCOUNT 0x6ffffffa + +/* These were chosen by Sun. */ +#define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */ +#define DT_VERDEF 0x6ffffffc /* Address of version definition + table */ +#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ +#define DT_VERNEED 0x6ffffffe /* Address of table with needed + versions */ +#define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */ +#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ +#define DT_VERSIONTAGNUM 16 + +/* Sun added these machine-independent extensions in the "processor-specific" + range. Be compatible. */ +#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */ +#define DT_FILTER 0x7fffffff /* Shared object to get values from */ +#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) +#define DT_EXTRANUM 3 + +/* Values of `d_un.d_val' in the DT_FLAGS entry. */ +#define DF_ORIGIN 0x00000001 /* Object may use DF_ORIGIN */ +#define DF_SYMBOLIC 0x00000002 /* Symbol resolutions starts here */ +#define DF_TEXTREL 0x00000004 /* Object contains text relocations */ +#define DF_BIND_NOW 0x00000008 /* No lazy binding for this object */ + +/* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 + entry in the dynamic section. */ +#define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */ +#define DF_1_GLOBAL 0x00000002 /* Set RTLD_GLOBAL for this object. */ +#define DF_1_GROUP 0x00000004 /* Set RTLD_GROUP for this object. */ +#define DF_1_NODELETE 0x00000008 /* Set RTLD_NODELETE for this object.*/ +#define DF_1_LOADFLTR 0x00000010 /* Trigger filtee loading at runtime.*/ +#define DF_1_INITFIRST 0x00000020 /* Set RTLD_INITFIRST for this object*/ +#define DF_1_NOOPEN 0x00000040 /* Set RTLD_NOOPEN for this object. */ +#define DF_1_ORIGIN 0x00000080 /* $ORIGIN must be handled. */ +#define DF_1_DIRECT 0x00000100 /* Direct binding enabled. */ +#define DF_1_TRANS 0x00000200 +#define DF_1_INTERPOSE 0x00000400 /* Object is used to interpose. */ +#define DF_1_NODEFLIB 0x00000800 /* Ignore default lib search path. */ +#define DF_1_NODUMP 0x00001000 /* Object can't be dldump'ed. */ +#define DF_1_CONFALT 0x00002000 /* Configuration alternative created.*/ +#define DF_1_ENDFILTEE 0x00004000 /* Filtee terminates filters search. */ +#define DF_1_DISPRELDNE 0x00008000 /* Disp reloc applied at build time. */ +#define DF_1_DISPRELPND 0x00010000 /* Disp reloc applied at run-time. */ + +/* Flags for the feature selection in DT_FEATURE_1. */ +#define DTF_1_PARINIT 0x00000001 +#define DTF_1_CONFEXP 0x00000002 + +/* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */ +#define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */ +#define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not + generally available. */ + +/* Version definition sections. */ + +typedef struct +{ + Elf32_Half vd_version; /* Version revision */ + Elf32_Half vd_flags; /* Version information */ + Elf32_Half vd_ndx; /* Version Index */ + Elf32_Half vd_cnt; /* Number of associated aux entries */ + Elf32_Word vd_hash; /* Version name hash value */ + Elf32_Word vd_aux; /* Offset in bytes to verdaux array */ + Elf32_Word vd_next; /* Offset in bytes to next verdef + entry */ +} Elf32_Verdef; + +typedef struct +{ + Elf64_Half vd_version; /* Version revision */ + Elf64_Half vd_flags; /* Version information */ + Elf64_Half vd_ndx; /* Version Index */ + Elf64_Half vd_cnt; /* Number of associated aux entries */ + Elf64_Word vd_hash; /* Version name hash value */ + Elf64_Word vd_aux; /* Offset in bytes to verdaux array */ + Elf64_Word vd_next; /* Offset in bytes to next verdef + entry */ +} Elf64_Verdef; + + +/* Legal values for vd_version (version revision). */ +#define VER_DEF_NONE 0 /* No version */ +#define VER_DEF_CURRENT 1 /* Current version */ +#define VER_DEF_NUM 2 /* Given version number */ + +/* Legal values for vd_flags (version information flags). */ +#define VER_FLG_BASE 0x1 /* Version definition of file itself */ +#define VER_FLG_WEAK 0x2 /* Weak version identifier */ + +/* Versym symbol index values. */ +#define VER_NDX_LOCAL 0 /* Symbol is local. */ +#define VER_NDX_GLOBAL 1 /* Symbol is global. */ +#define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */ +#define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */ + +/* Auxialiary version information. */ + +typedef struct +{ + Elf32_Word vda_name; /* Version or dependency names */ + Elf32_Word vda_next; /* Offset in bytes to next verdaux + entry */ +} Elf32_Verdaux; + +typedef struct +{ + Elf64_Word vda_name; /* Version or dependency names */ + Elf64_Word vda_next; /* Offset in bytes to next verdaux + entry */ +} Elf64_Verdaux; + + +/* Version dependency section. */ + +typedef struct +{ + Elf32_Half vn_version; /* Version of structure */ + Elf32_Half vn_cnt; /* Number of associated aux entries */ + Elf32_Word vn_file; /* Offset of filename for this + dependency */ + Elf32_Word vn_aux; /* Offset in bytes to vernaux array */ + Elf32_Word vn_next; /* Offset in bytes to next verneed + entry */ +} Elf32_Verneed; + +typedef struct +{ + Elf64_Half vn_version; /* Version of structure */ + Elf64_Half vn_cnt; /* Number of associated aux entries */ + Elf64_Word vn_file; /* Offset of filename for this + dependency */ + Elf64_Word vn_aux; /* Offset in bytes to vernaux array */ + Elf64_Word vn_next; /* Offset in bytes to next verneed + entry */ +} Elf64_Verneed; + + +/* Legal values for vn_version (version revision). */ +#define VER_NEED_NONE 0 /* No version */ +#define VER_NEED_CURRENT 1 /* Current version */ +#define VER_NEED_NUM 2 /* Given version number */ + +/* Auxiliary needed version information. */ + +typedef struct +{ + Elf32_Word vna_hash; /* Hash value of dependency name */ + Elf32_Half vna_flags; /* Dependency specific information */ + Elf32_Half vna_other; /* Unused */ + Elf32_Word vna_name; /* Dependency name string offset */ + Elf32_Word vna_next; /* Offset in bytes to next vernaux + entry */ +} Elf32_Vernaux; + +typedef struct +{ + Elf64_Word vna_hash; /* Hash value of dependency name */ + Elf64_Half vna_flags; /* Dependency specific information */ + Elf64_Half vna_other; /* Unused */ + Elf64_Word vna_name; /* Dependency name string offset */ + Elf64_Word vna_next; /* Offset in bytes to next vernaux + entry */ +} Elf64_Vernaux; + + +/* Legal values for vna_flags. */ +#define VER_FLG_WEAK 0x2 /* Weak version identifier */ + + +/* Auxiliary vector. */ + +/* This vector is normally only used by the program interpreter. The + usual definition in an ABI supplement uses the name auxv_t. The + vector is not usually defined in a standard file, but it + can't hurt. We rename it to avoid conflicts. The sizes of these + types are an arrangement between the exec server and the program + interpreter, so we don't fully specify them here. */ + +typedef struct +{ + int a_type; /* Entry type */ + union + { + long int a_val; /* Integer value */ + void *a_ptr; /* Pointer value */ + void (*a_fcn) (void); /* Function pointer value */ + } a_un; +} Elf32_auxv_t; + +typedef struct +{ + long int a_type; /* Entry type */ + union + { + long int a_val; /* Integer value */ + void *a_ptr; /* Pointer value */ + void (*a_fcn) (void); /* Function pointer value */ + } a_un; +} Elf64_auxv_t; + +/* Legal values for a_type (entry type). */ + +#define AT_NULL 0 /* End of vector */ +#define AT_IGNORE 1 /* Entry should be ignored */ +#define AT_EXECFD 2 /* File descriptor of program */ +#define AT_PHDR 3 /* Program headers for program */ +#define AT_PHENT 4 /* Size of program header entry */ +#define AT_PHNUM 5 /* Number of program headers */ +#define AT_PAGESZ 6 /* System page size */ +#define AT_BASE 7 /* Base address of interpreter */ +#define AT_FLAGS 8 /* Flags */ +#define AT_ENTRY 9 /* Entry point of program */ +#define AT_NOTELF 10 /* Program is not ELF */ +#define AT_UID 11 /* Real uid */ +#define AT_EUID 12 /* Effective uid */ +#define AT_GID 13 /* Real gid */ +#define AT_EGID 14 /* Effective gid */ +#define AT_CLKTCK 17 /* Frequency of times() */ + +/* Some more special a_type values describing the hardware. */ +#define AT_PLATFORM 15 /* String identifying platform. */ +#define AT_HWCAP 16 /* Machine dependent hints about + processor capabilities. */ + +/* This entry gives some information about the FPU initialization + performed by the kernel. */ +#define AT_FPUCW 18 /* Used FPU control word. */ + +/* Cache block sizes. */ +#define AT_DCACHEBSIZE 19 /* Data cache block size. */ +#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ +#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ + +/* A special ignored value for PPC, used by the kernel to control the + interpretation of the AUXV. Must be > 16. */ +#define AT_IGNOREPPC 22 /* Entry should be ignored */ + + +/* Note section contents. Each entry in the note section begins with + a header of a fixed form. */ + +typedef struct +{ + Elf32_Word n_namesz; /* Length of the note's name. */ + Elf32_Word n_descsz; /* Length of the note's descriptor. */ + Elf32_Word n_type; /* Type of the note. */ +} Elf32_Nhdr; + +typedef struct +{ + Elf64_Word n_namesz; /* Length of the note's name. */ + Elf64_Word n_descsz; /* Length of the note's descriptor. */ + Elf64_Word n_type; /* Type of the note. */ +} Elf64_Nhdr; + +/* Known names of notes. */ + +/* Solaris entries in the note section have this name. */ +#define ELF_NOTE_SOLARIS "SUNW Solaris" + +/* Note entries for GNU systems have this name. */ +#define ELF_NOTE_GNU "GNU" + + +/* Defined types of notes for Solaris. */ + +/* Value of descriptor (one word) is desired pagesize for the binary. */ +#define ELF_NOTE_PAGESIZE_HINT 1 + + +/* Defined note types for GNU systems. */ + +/* ABI information. The descriptor consists of words: + word 0: OS descriptor + word 1: major version of the ABI + word 2: minor version of the ABI + word 3: subminor version of the ABI +*/ +#define ELF_NOTE_ABI 1 + +/* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI + note section entry. */ +#define ELF_NOTE_OS_LINUX 0 +#define ELF_NOTE_OS_GNU 1 +#define ELF_NOTE_OS_SOLARIS2 2 + + +/* Move records. */ +typedef struct +{ + Elf32_Xword m_value; /* Symbol value. */ + Elf32_Word m_info; /* Size and index. */ + Elf32_Word m_poffset; /* Symbol offset. */ + Elf32_Half m_repeat; /* Repeat count. */ + Elf32_Half m_stride; /* Stride info. */ +} Elf32_Move; + +typedef struct +{ + Elf64_Xword m_value; /* Symbol value. */ + Elf64_Xword m_info; /* Size and index. */ + Elf64_Xword m_poffset; /* Symbol offset. */ + Elf64_Half m_repeat; /* Repeat count. */ + Elf64_Half m_stride; /* Stride info. */ +} Elf64_Move; + +/* Macro to construct move records. */ +#define ELF32_M_SYM(info) ((info) >> 8) +#define ELF32_M_SIZE(info) ((unsigned char) (info)) +#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) + +#define ELF64_M_SYM(info) ELF32_M_SYM (info) +#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) +#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) + + +/* Motorola 68k specific definitions. */ + +/* Values for Elf32_Ehdr.e_flags. */ +#define EF_CPU32 0x00810000 + +/* m68k relocs. */ + +#define R_68K_NONE 0 /* No reloc */ +#define R_68K_32 1 /* Direct 32 bit */ +#define R_68K_16 2 /* Direct 16 bit */ +#define R_68K_8 3 /* Direct 8 bit */ +#define R_68K_PC32 4 /* PC relative 32 bit */ +#define R_68K_PC16 5 /* PC relative 16 bit */ +#define R_68K_PC8 6 /* PC relative 8 bit */ +#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */ +#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */ +#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */ +#define R_68K_GOT32O 10 /* 32 bit GOT offset */ +#define R_68K_GOT16O 11 /* 16 bit GOT offset */ +#define R_68K_GOT8O 12 /* 8 bit GOT offset */ +#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */ +#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */ +#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */ +#define R_68K_PLT32O 16 /* 32 bit PLT offset */ +#define R_68K_PLT16O 17 /* 16 bit PLT offset */ +#define R_68K_PLT8O 18 /* 8 bit PLT offset */ +#define R_68K_COPY 19 /* Copy symbol at runtime */ +#define R_68K_GLOB_DAT 20 /* Create GOT entry */ +#define R_68K_JMP_SLOT 21 /* Create PLT entry */ +#define R_68K_RELATIVE 22 /* Adjust by program base */ +/* Keep this the last entry. */ +#define R_68K_NUM 23 + +/* Intel 80386 specific definitions. */ + +/* i386 relocs. */ + +#define R_386_NONE 0 /* No reloc */ +#define R_386_32 1 /* Direct 32 bit */ +#define R_386_PC32 2 /* PC relative 32 bit */ +#define R_386_GOT32 3 /* 32 bit GOT entry */ +#define R_386_PLT32 4 /* 32 bit PLT address */ +#define R_386_COPY 5 /* Copy symbol at runtime */ +#define R_386_GLOB_DAT 6 /* Create GOT entry */ +#define R_386_JMP_SLOT 7 /* Create PLT entry */ +#define R_386_RELATIVE 8 /* Adjust by program base */ +#define R_386_GOTOFF 9 /* 32 bit offset to GOT */ +#define R_386_GOTPC 10 /* 32 bit PC relative offset to GOT */ +/* Keep this the last entry. */ +#define R_386_NUM 11 + +/* SUN SPARC specific definitions. */ + +/* Legal values for ST_TYPE subfield of st_info (symbol type). */ + +#define STT_REGISTER 13 /* Global register reserved to app. */ + +/* Values for Elf64_Ehdr.e_flags. */ + +#define EF_SPARCV9_MM 3 +#define EF_SPARCV9_TSO 0 +#define EF_SPARCV9_PSO 1 +#define EF_SPARCV9_RMO 2 +#define EF_SPARC_LEDATA 0x800000 /* little endian data */ +#define EF_SPARC_EXT_MASK 0xFFFF00 +#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ +#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */ +#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ +#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */ + +/* SPARC relocs. */ + +#define R_SPARC_NONE 0 /* No reloc */ +#define R_SPARC_8 1 /* Direct 8 bit */ +#define R_SPARC_16 2 /* Direct 16 bit */ +#define R_SPARC_32 3 /* Direct 32 bit */ +#define R_SPARC_DISP8 4 /* PC relative 8 bit */ +#define R_SPARC_DISP16 5 /* PC relative 16 bit */ +#define R_SPARC_DISP32 6 /* PC relative 32 bit */ +#define R_SPARC_WDISP30 7 /* PC relative 30 bit shifted */ +#define R_SPARC_WDISP22 8 /* PC relative 22 bit shifted */ +#define R_SPARC_HI22 9 /* High 22 bit */ +#define R_SPARC_22 10 /* Direct 22 bit */ +#define R_SPARC_13 11 /* Direct 13 bit */ +#define R_SPARC_LO10 12 /* Truncated 10 bit */ +#define R_SPARC_GOT10 13 /* Truncated 10 bit GOT entry */ +#define R_SPARC_GOT13 14 /* 13 bit GOT entry */ +#define R_SPARC_GOT22 15 /* 22 bit GOT entry shifted */ +#define R_SPARC_PC10 16 /* PC relative 10 bit truncated */ +#define R_SPARC_PC22 17 /* PC relative 22 bit shifted */ +#define R_SPARC_WPLT30 18 /* 30 bit PC relative PLT address */ +#define R_SPARC_COPY 19 /* Copy symbol at runtime */ +#define R_SPARC_GLOB_DAT 20 /* Create GOT entry */ +#define R_SPARC_JMP_SLOT 21 /* Create PLT entry */ +#define R_SPARC_RELATIVE 22 /* Adjust by program base */ +#define R_SPARC_UA32 23 /* Direct 32 bit unaligned */ + +/* Additional Sparc64 relocs. */ + +#define R_SPARC_PLT32 24 /* Direct 32 bit ref to PLT entry */ +#define R_SPARC_HIPLT22 25 /* High 22 bit PLT entry */ +#define R_SPARC_LOPLT10 26 /* Truncated 10 bit PLT entry */ +#define R_SPARC_PCPLT32 27 /* PC rel 32 bit ref to PLT entry */ +#define R_SPARC_PCPLT22 28 /* PC rel high 22 bit PLT entry */ +#define R_SPARC_PCPLT10 29 /* PC rel trunc 10 bit PLT entry */ +#define R_SPARC_10 30 /* Direct 10 bit */ +#define R_SPARC_11 31 /* Direct 11 bit */ +#define R_SPARC_64 32 /* Direct 64 bit */ +#define R_SPARC_OLO10 33 /* 10bit with secondary 13bit addend */ +#define R_SPARC_HH22 34 /* Top 22 bits of direct 64 bit */ +#define R_SPARC_HM10 35 /* High middle 10 bits of ... */ +#define R_SPARC_LM22 36 /* Low middle 22 bits of ... */ +#define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */ +#define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */ +#define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */ +#define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */ +#define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */ +#define R_SPARC_7 43 /* Direct 7 bit */ +#define R_SPARC_5 44 /* Direct 5 bit */ +#define R_SPARC_6 45 /* Direct 6 bit */ +#define R_SPARC_DISP64 46 /* PC relative 64 bit */ +#define R_SPARC_PLT64 47 /* Direct 64 bit ref to PLT entry */ +#define R_SPARC_HIX22 48 /* High 22 bit complemented */ +#define R_SPARC_LOX10 49 /* Truncated 11 bit complemented */ +#define R_SPARC_H44 50 /* Direct high 12 of 44 bit */ +#define R_SPARC_M44 51 /* Direct mid 22 of 44 bit */ +#define R_SPARC_L44 52 /* Direct low 10 of 44 bit */ +#define R_SPARC_REGISTER 53 /* Global register usage */ +#define R_SPARC_UA64 54 /* Direct 64 bit unaligned */ +#define R_SPARC_UA16 55 /* Direct 16 bit unaligned */ +/* Keep this the last entry. */ +#define R_SPARC_NUM 56 + +/* For Sparc64, legal values for d_tag of Elf64_Dyn. */ + +#define DT_SPARC_REGISTER 0x70000001 +#define DT_SPARC_NUM 2 + +/* Bits present in AT_HWCAP, primarily for Sparc32. */ + +#define HWCAP_SPARC_FLUSH 1 /* The cpu supports flush insn. */ +#define HWCAP_SPARC_STBAR 2 +#define HWCAP_SPARC_SWAP 4 +#define HWCAP_SPARC_MULDIV 8 +#define HWCAP_SPARC_V9 16 /* The cpu is v9, so v8plus is ok. */ +#define HWCAP_SPARC_ULTRA3 32 + +/* MIPS R3000 specific definitions. */ + +/* Legal values for e_flags field of Elf32_Ehdr. */ + +#define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used */ +#define EF_MIPS_PIC 2 /* Contains PIC code */ +#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence */ +#define EF_MIPS_XGOT 8 +#define EF_MIPS_64BIT_WHIRL 16 +#define EF_MIPS_ABI2 32 +#define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level */ + +/* Legal values for MIPS architecture level. */ + +#define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ +#define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ +#define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ +#define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ +#define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ +#define EF_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */ +#define EF_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */ + +/* The following are non-official names and should not be used. */ + +#define E_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ +#define E_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ +#define E_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ +#define E_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ +#define E_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ +#define E_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */ +#define E_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */ + +/* Special section indices. */ + +#define SHN_MIPS_ACOMMON 0xff00 /* Allocated common symbols */ +#define SHN_MIPS_TEXT 0xff01 /* Allocated test symbols. */ +#define SHN_MIPS_DATA 0xff02 /* Allocated data symbols. */ +#define SHN_MIPS_SCOMMON 0xff03 /* Small common symbols */ +#define SHN_MIPS_SUNDEFINED 0xff04 /* Small undefined symbols */ + +/* Legal values for sh_type field of Elf32_Shdr. */ + +#define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link */ +#define SHT_MIPS_MSYM 0x70000001 +#define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols */ +#define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes */ +#define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */ +#define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging information*/ +#define SHT_MIPS_REGINFO 0x70000006 /* Register usage information */ +#define SHT_MIPS_PACKAGE 0x70000007 +#define SHT_MIPS_PACKSYM 0x70000008 +#define SHT_MIPS_RELD 0x70000009 +#define SHT_MIPS_IFACE 0x7000000b +#define SHT_MIPS_CONTENT 0x7000000c +#define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */ +#define SHT_MIPS_SHDR 0x70000010 +#define SHT_MIPS_FDESC 0x70000011 +#define SHT_MIPS_EXTSYM 0x70000012 +#define SHT_MIPS_DENSE 0x70000013 +#define SHT_MIPS_PDESC 0x70000014 +#define SHT_MIPS_LOCSYM 0x70000015 +#define SHT_MIPS_AUXSYM 0x70000016 +#define SHT_MIPS_OPTSYM 0x70000017 +#define SHT_MIPS_LOCSTR 0x70000018 +#define SHT_MIPS_LINE 0x70000019 +#define SHT_MIPS_RFDESC 0x7000001a +#define SHT_MIPS_DELTASYM 0x7000001b +#define SHT_MIPS_DELTAINST 0x7000001c +#define SHT_MIPS_DELTACLASS 0x7000001d +#define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */ +#define SHT_MIPS_DELTADECL 0x7000001f +#define SHT_MIPS_SYMBOL_LIB 0x70000020 +#define SHT_MIPS_EVENTS 0x70000021 /* Event section. */ +#define SHT_MIPS_TRANSLATE 0x70000022 +#define SHT_MIPS_PIXIE 0x70000023 +#define SHT_MIPS_XLATE 0x70000024 +#define SHT_MIPS_XLATE_DEBUG 0x70000025 +#define SHT_MIPS_WHIRL 0x70000026 +#define SHT_MIPS_EH_REGION 0x70000027 +#define SHT_MIPS_XLATE_OLD 0x70000028 +#define SHT_MIPS_PDR_EXCEPTION 0x70000029 + +/* Legal values for sh_flags field of Elf32_Shdr. */ + +#define SHF_MIPS_GPREL 0x10000000 /* Must be part of global data area */ +#define SHF_MIPS_MERGE 0x20000000 +#define SHF_MIPS_ADDR 0x40000000 +#define SHF_MIPS_STRINGS 0x80000000 +#define SHF_MIPS_NOSTRIP 0x08000000 +#define SHF_MIPS_LOCAL 0x04000000 +#define SHF_MIPS_NAMES 0x02000000 +#define SHF_MIPS_NODUPE 0x01000000 + + +/* Symbol tables. */ + +/* MIPS specific values for `st_other'. */ +#define STO_MIPS_DEFAULT 0x0 +#define STO_MIPS_INTERNAL 0x1 +#define STO_MIPS_HIDDEN 0x2 +#define STO_MIPS_PROTECTED 0x3 +#define STO_MIPS_SC_ALIGN_UNUSED 0xff + +/* MIPS specific values for `st_info'. */ +#define STB_MIPS_SPLIT_COMMON 13 + +/* Entries found in sections of type SHT_MIPS_GPTAB. */ + +typedef union +{ + struct + { + Elf32_Word gt_current_g_value; /* -G value used for compilation */ + Elf32_Word gt_unused; /* Not used */ + } gt_header; /* First entry in section */ + struct + { + Elf32_Word gt_g_value; /* If this value were used for -G */ + Elf32_Word gt_bytes; /* This many bytes would be used */ + } gt_entry; /* Subsequent entries in section */ +} Elf32_gptab; + +/* Entry found in sections of type SHT_MIPS_REGINFO. */ + +typedef struct +{ + Elf32_Word ri_gprmask; /* General registers used */ + Elf32_Word ri_cprmask[4]; /* Coprocessor registers used */ + Elf32_Sword ri_gp_value; /* $gp register value */ +} Elf32_RegInfo; + +/* Entries found in sections of type SHT_MIPS_OPTIONS. */ + +typedef struct +{ + unsigned char kind; /* Determines interpretation of the + variable part of descriptor. */ + unsigned char size; /* Size of descriptor, including header. */ + Elf32_Section section; /* Section header index of section affected, + 0 for global options. */ + Elf32_Word info; /* Kind-specific information. */ +} Elf_Options; + +/* Values for `kind' field in Elf_Options. */ + +#define ODK_NULL 0 /* Undefined. */ +#define ODK_REGINFO 1 /* Register usage information. */ +#define ODK_EXCEPTIONS 2 /* Exception processing options. */ +#define ODK_PAD 3 /* Section padding options. */ +#define ODK_HWPATCH 4 /* Hardware workarounds performed */ +#define ODK_FILL 5 /* record the fill value used by the linker. */ +#define ODK_TAGS 6 /* reserve space for desktop tools to write. */ +#define ODK_HWAND 7 /* HW workarounds. 'AND' bits when merging. */ +#define ODK_HWOR 8 /* HW workarounds. 'OR' bits when merging. */ + +/* Values for `info' in Elf_Options for ODK_EXCEPTIONS entries. */ + +#define OEX_FPU_MIN 0x1f /* FPE's which MUST be enabled. */ +#define OEX_FPU_MAX 0x1f00 /* FPE's which MAY be enabled. */ +#define OEX_PAGE0 0x10000 /* page zero must be mapped. */ +#define OEX_SMM 0x20000 /* Force sequential memory mode? */ +#define OEX_FPDBUG 0x40000 /* Force floating point debug mode? */ +#define OEX_PRECISEFP OEX_FPDBUG +#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults? */ + +#define OEX_FPU_INVAL 0x10 +#define OEX_FPU_DIV0 0x08 +#define OEX_FPU_OFLO 0x04 +#define OEX_FPU_UFLO 0x02 +#define OEX_FPU_INEX 0x01 + +/* Masks for `info' in Elf_Options for an ODK_HWPATCH entry. */ + +#define OHW_R4KEOP 0x1 /* R4000 end-of-page patch. */ +#define OHW_R8KPFETCH 0x2 /* may need R8000 prefetch patch. */ +#define OHW_R5KEOP 0x4 /* R5000 end-of-page patch. */ +#define OHW_R5KCVTL 0x8 /* R5000 cvt.[ds].l bug. clean=1. */ + +#define OPAD_PREFIX 0x1 +#define OPAD_POSTFIX 0x2 +#define OPAD_SYMBOL 0x4 + +/* Entry found in `.options' section. */ + +typedef struct +{ + Elf32_Word hwp_flags1; /* Extra flags. */ + Elf32_Word hwp_flags2; /* Extra flags. */ +} Elf_Options_Hw; + +/* Masks for `info' in ElfOptions for ODK_HWAND and ODK_HWOR entries. */ + +#define OHWA0_R4KEOP_CHECKED 0x00000001 +#define OHWA1_R4KEOP_CLEAN 0x00000002 + +/* MIPS relocs. */ + +#define R_MIPS_NONE 0 /* No reloc */ +#define R_MIPS_16 1 /* Direct 16 bit */ +#define R_MIPS_32 2 /* Direct 32 bit */ +#define R_MIPS_REL32 3 /* PC relative 32 bit */ +#define R_MIPS_26 4 /* Direct 26 bit shifted */ +#define R_MIPS_HI16 5 /* High 16 bit */ +#define R_MIPS_LO16 6 /* Low 16 bit */ +#define R_MIPS_GPREL16 7 /* GP relative 16 bit */ +#define R_MIPS_LITERAL 8 /* 16 bit literal entry */ +#define R_MIPS_GOT16 9 /* 16 bit GOT entry */ +#define R_MIPS_PC16 10 /* PC relative 16 bit */ +#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ +#define R_MIPS_GPREL32 12 /* GP relative 32 bit */ + +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 +#define R_MIPS_JALR 37 +/* Keep this the last entry. */ +#define R_MIPS_NUM 38 + +/* Legal values for p_type field of Elf32_Phdr. */ + +#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ +#define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ +#define PT_MIPS_OPTIONS 0x70000002 + +/* Special program header types. */ + +#define PF_MIPS_LOCAL 0x10000000 + +/* Legal values for d_tag field of Elf32_Dyn. */ + +#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ +#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ +#define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */ +#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ +#define DT_MIPS_FLAGS 0x70000005 /* Flags */ +#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ +#define DT_MIPS_MSYM 0x70000007 +#define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ +#define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ +#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ +#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */ +#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */ +#define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */ +#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ +#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ +#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ +#define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ +#define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in + DT_MIPS_DELTA_CLASS. */ +#define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in + DT_MIPS_DELTA_INSTANCE. */ +#define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in + DT_MIPS_DELTA_RELOC. */ +#define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta + relocations refer to. */ +#define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in + DT_MIPS_DELTA_SYM. */ +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the + class declaration. */ +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in + DT_MIPS_DELTA_CLASSSYM. */ +#define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */ +#define DT_MIPS_PIXIE_INIT 0x70000023 +#define DT_MIPS_SYMBOL_LIB 0x70000024 +#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 +#define DT_MIPS_LOCAL_GOTIDX 0x70000026 +#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 +#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 +#define DT_MIPS_OPTIONS 0x70000029 /* Address of .options. */ +#define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */ +#define DT_MIPS_DYNSTR_ALIGN 0x7000002b +#define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */ +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve + function stored in GOT. */ +#define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added + by rld on dlopen() calls. */ +#define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ +#define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ +#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ +#define DT_MIPS_NUM 0x32 + +/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ + +#define RHF_NONE 0 /* No flags */ +#define RHF_QUICKSTART (1 << 0) /* Use quickstart */ +#define RHF_NOTPOT (1 << 1) /* Hash size not power of 2 */ +#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) /* Ignore LD_LIBRARY_PATH */ +#define RHF_NO_MOVE (1 << 3) +#define RHF_SGI_ONLY (1 << 4) +#define RHF_GUARANTEE_INIT (1 << 5) +#define RHF_DELTA_C_PLUS_PLUS (1 << 6) +#define RHF_GUARANTEE_START_INIT (1 << 7) +#define RHF_PIXIE (1 << 8) +#define RHF_DEFAULT_DELAY_LOAD (1 << 9) +#define RHF_REQUICKSTART (1 << 10) +#define RHF_REQUICKSTARTED (1 << 11) +#define RHF_CORD (1 << 12) +#define RHF_NO_UNRES_UNDEF (1 << 13) +#define RHF_RLD_ORDER_SAFE (1 << 14) + +/* Entries found in sections of type SHT_MIPS_LIBLIST. */ + +typedef struct +{ + Elf32_Word l_name; /* Name (string table index) */ + Elf32_Word l_time_stamp; /* Timestamp */ + Elf32_Word l_checksum; /* Checksum */ + Elf32_Word l_version; /* Interface version */ + Elf32_Word l_flags; /* Flags */ +} Elf32_Lib; + +typedef struct +{ + Elf64_Word l_name; /* Name (string table index) */ + Elf64_Word l_time_stamp; /* Timestamp */ + Elf64_Word l_checksum; /* Checksum */ + Elf64_Word l_version; /* Interface version */ + Elf64_Word l_flags; /* Flags */ +} Elf64_Lib; + + +/* Legal values for l_flags. */ + +#define LL_NONE 0 +#define LL_EXACT_MATCH (1 << 0) /* Require exact match */ +#define LL_IGNORE_INT_VER (1 << 1) /* Ignore interface version */ +#define LL_REQUIRE_MINOR (1 << 2) +#define LL_EXPORTS (1 << 3) +#define LL_DELAY_LOAD (1 << 4) +#define LL_DELTA (1 << 5) + +/* Entries found in sections of type SHT_MIPS_CONFLICT. */ + +typedef Elf32_Addr Elf32_Conflict; + + +/* HPPA specific definitions. */ + +/* Legal values for e_flags field of Elf32_Ehdr. */ + +#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */ +#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */ +#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */ +#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */ +#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch + prediction. */ +#define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */ +#define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */ + +/* Defined values for `e_flags & EF_PARISC_ARCH' are: */ + +#define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */ +#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ +#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ + +/* Additional section indeces. */ + +#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared + symbols in ANSI C. */ +#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */ + +/* Legal values for sh_type field of Elf32_Shdr. */ + +#define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */ +#define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */ +#define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */ + +/* Legal values for sh_flags field of Elf32_Shdr. */ + +#define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */ +#define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */ +#define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */ + +/* Legal values for ST_TYPE subfield of st_info (symbol type). */ + +#define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */ + +#define STT_HP_OPAQUE (STT_LOOS + 0x1) +#define STT_HP_STUB (STT_LOOS + 0x2) + +/* HPPA relocs. */ + +#define R_PARISC_NONE 0 /* No reloc. */ +#define R_PARISC_DIR32 1 /* Direct 32-bit reference. */ +#define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */ +#define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */ +#define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */ +#define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */ +#define R_PARISC_PCREL32 9 /* 32-bit rel. address. */ +#define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */ +#define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */ +#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ +#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ +#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ +#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */ +#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */ +#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */ +#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */ +#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */ +#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */ +#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */ +#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */ +#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */ +#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */ +#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ +#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ +#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ +#define R_PARISC_FPTR64 64 /* 64 bits function address. */ +#define R_PARISC_PLABEL32 65 /* 32 bits function address. */ +#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ +#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ +#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ +#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ +#define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */ +#define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */ +#define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */ +#define R_PARISC_DIR64 80 /* 64 bits of eff. address. */ +#define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */ +#define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */ +#define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */ +#define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */ +#define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */ +#define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */ +#define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */ +#define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */ +#define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */ +#define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */ +#define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */ +#define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */ +#define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */ +#define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */ +#define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */ +#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ +#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ +#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ +#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ +#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ +#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ +#define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */ +#define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */ +#define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */ +#define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */ +#define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */ +#define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */ +#define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */ +#define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */ +#define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */ +#define R_PARISC_LORESERVE 128 +#define R_PARISC_COPY 128 /* Copy relocation. */ +#define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */ +#define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */ +#define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */ +#define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */ +#define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */ +#define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */ +#define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/ +#define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */ +#define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */ +#define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */ +#define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */ +#define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */ +#define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */ +#define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */ +#define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */ +#define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/ +#define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/ +#define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */ +#define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */ +#define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */ +#define R_PARISC_HIRESERVE 255 + +/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ + +#define PT_HP_TLS (PT_LOOS + 0x0) +#define PT_HP_CORE_NONE (PT_LOOS + 0x1) +#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) +#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) +#define PT_HP_CORE_COMM (PT_LOOS + 0x4) +#define PT_HP_CORE_PROC (PT_LOOS + 0x5) +#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) +#define PT_HP_CORE_STACK (PT_LOOS + 0x7) +#define PT_HP_CORE_SHM (PT_LOOS + 0x8) +#define PT_HP_CORE_MMF (PT_LOOS + 0x9) +#define PT_HP_PARALLEL (PT_LOOS + 0x10) +#define PT_HP_FASTBIND (PT_LOOS + 0x11) +#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) +#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) +#define PT_HP_STACK (PT_LOOS + 0x14) + +#define PT_PARISC_ARCHEXT 0x70000000 +#define PT_PARISC_UNWIND 0x70000001 + +/* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */ + +#define PF_PARISC_SBP 0x08000000 + +#define PF_HP_PAGE_SIZE 0x00100000 +#define PF_HP_FAR_SHARED 0x00200000 +#define PF_HP_NEAR_SHARED 0x00400000 +#define PF_HP_CODE 0x01000000 +#define PF_HP_MODIFY 0x02000000 +#define PF_HP_LAZYSWAP 0x04000000 +#define PF_HP_SBP 0x08000000 + + +/* Alpha specific definitions. */ + +/* Legal values for e_flags field of Elf64_Ehdr. */ + +#define EF_ALPHA_32BIT 1 /* All addresses must be < 2GB. */ +#define EF_ALPHA_CANRELAX 2 /* Relocations for relaxing exist. */ + +/* Legal values for sh_type field of Elf64_Shdr. */ + +/* These two are primerily concerned with ECOFF debugging info. */ +#define SHT_ALPHA_DEBUG 0x70000001 +#define SHT_ALPHA_REGINFO 0x70000002 + +/* Legal values for sh_flags field of Elf64_Shdr. */ + +#define SHF_ALPHA_GPREL 0x10000000 + +/* Legal values for st_other field of Elf64_Sym. */ +#define STO_ALPHA_NOPV 0x80 /* No PV required. */ +#define STO_ALPHA_STD_GPLOAD 0x88 /* PV only used for initial ldgp. */ + +/* Alpha relocs. */ + +#define R_ALPHA_NONE 0 /* No reloc */ +#define R_ALPHA_REFLONG 1 /* Direct 32 bit */ +#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */ +#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */ +#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */ +#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */ +#define R_ALPHA_GPDISP 6 /* Add displacement to GP */ +#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */ +#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */ +#define R_ALPHA_SREL16 9 /* PC relative 16 bit */ +#define R_ALPHA_SREL32 10 /* PC relative 32 bit */ +#define R_ALPHA_SREL64 11 /* PC relative 64 bit */ +#define R_ALPHA_OP_PUSH 12 /* OP stack push */ +#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */ +#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */ +#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */ +#define R_ALPHA_GPVALUE 16 +#define R_ALPHA_GPRELHIGH 17 +#define R_ALPHA_GPRELLOW 18 +#define R_ALPHA_IMMED_GP_16 19 +#define R_ALPHA_IMMED_GP_HI32 20 +#define R_ALPHA_IMMED_SCN_HI32 21 +#define R_ALPHA_IMMED_BR_HI32 22 +#define R_ALPHA_IMMED_LO32 23 +#define R_ALPHA_COPY 24 /* Copy symbol at runtime */ +#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ +#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ +#define R_ALPHA_RELATIVE 27 /* Adjust by program base */ +/* Keep this the last entry. */ +#define R_ALPHA_NUM 28 + + +/* PowerPC specific declarations */ + +/* Values for Elf32/64_Ehdr.e_flags. */ +#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */ + +/* Cygnus local bits below */ +#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ +#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib + flag */ + +/* PowerPC relocations defined by the ABIs */ +#define R_PPC_NONE 0 +#define R_PPC_ADDR32 1 /* 32bit absolute address */ +#define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ +#define R_PPC_ADDR16 3 /* 16bit absolute address */ +#define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ +#define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ +#define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ +#define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ +#define R_PPC_ADDR14_BRTAKEN 8 +#define R_PPC_ADDR14_BRNTAKEN 9 +#define R_PPC_REL24 10 /* PC relative 26 bit */ +#define R_PPC_REL14 11 /* PC relative 16 bit */ +#define R_PPC_REL14_BRTAKEN 12 +#define R_PPC_REL14_BRNTAKEN 13 +#define R_PPC_GOT16 14 +#define R_PPC_GOT16_LO 15 +#define R_PPC_GOT16_HI 16 +#define R_PPC_GOT16_HA 17 +#define R_PPC_PLTREL24 18 +#define R_PPC_COPY 19 +#define R_PPC_GLOB_DAT 20 +#define R_PPC_JMP_SLOT 21 +#define R_PPC_RELATIVE 22 +#define R_PPC_LOCAL24PC 23 +#define R_PPC_UADDR32 24 +#define R_PPC_UADDR16 25 +#define R_PPC_REL32 26 +#define R_PPC_PLT32 27 +#define R_PPC_PLTREL32 28 +#define R_PPC_PLT16_LO 29 +#define R_PPC_PLT16_HI 30 +#define R_PPC_PLT16_HA 31 +#define R_PPC_SDAREL16 32 +#define R_PPC_SECTOFF 33 +#define R_PPC_SECTOFF_LO 34 +#define R_PPC_SECTOFF_HI 35 +#define R_PPC_SECTOFF_HA 36 +/* Keep this the last entry. */ +#define R_PPC_NUM 37 + +/* The remaining relocs are from the Embedded ELF ABI, and are not + in the SVR4 ELF ABI. */ +#define R_PPC_EMB_NADDR32 101 +#define R_PPC_EMB_NADDR16 102 +#define R_PPC_EMB_NADDR16_LO 103 +#define R_PPC_EMB_NADDR16_HI 104 +#define R_PPC_EMB_NADDR16_HA 105 +#define R_PPC_EMB_SDAI16 106 +#define R_PPC_EMB_SDA2I16 107 +#define R_PPC_EMB_SDA2REL 108 +#define R_PPC_EMB_SDA21 109 /* 16 bit offset in SDA */ +#define R_PPC_EMB_MRKREF 110 +#define R_PPC_EMB_RELSEC16 111 +#define R_PPC_EMB_RELST_LO 112 +#define R_PPC_EMB_RELST_HI 113 +#define R_PPC_EMB_RELST_HA 114 +#define R_PPC_EMB_BIT_FLD 115 +#define R_PPC_EMB_RELSDA 116 /* 16 bit relative offset in SDA */ + +/* Diab tool relocations. */ +#define R_PPC_DIAB_SDA21_LO 180 /* like EMB_SDA21, but lower 16 bit */ +#define R_PPC_DIAB_SDA21_HI 181 /* like EMB_SDA21, but high 16 bit */ +#define R_PPC_DIAB_SDA21_HA 182 /* like EMB_SDA21, adjusted high 16 */ +#define R_PPC_DIAB_RELSDA_LO 183 /* like EMB_RELSDA, but lower 16 bit */ +#define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */ +#define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */ + +/* This is a phony reloc to handle any old fashioned TOC16 references + that may still be in object files. */ +#define R_PPC_TOC16 255 + + +/* ARM specific declarations */ + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_ARM_RELEXEC 0x01 +#define EF_ARM_HASENTRY 0x02 +#define EF_ARM_INTERWORK 0x04 +#define EF_ARM_APCS_26 0x08 +#define EF_ARM_APCS_FLOAT 0x10 +#define EF_ARM_PIC 0x20 +#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */ +#define EF_ARM_NEW_ABI 0x80 +#define EF_ARM_OLD_ABI 0x100 + +/* Other constants defined in the ARM ELF spec. version B-01. */ +/* NB. These conflict with values defined above. */ +#define EF_ARM_SYMSARESORTED 0x04 +#define EF_ARM_DYNSYMSUSESEGIDX 0x08 +#define EF_ARM_MAPSYMSFIRST 0x10 +#define EF_ARM_EABIMASK 0XFF000000 + +#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) +#define EF_ARM_EABI_UNKNOWN 0x00000000 +#define EF_ARM_EABI_VER1 0x01000000 +#define EF_ARM_EABI_VER2 0x02000000 + +/* Additional symbol types for Thumb */ +#define STT_ARM_TFUNC 0xd + +/* ARM-specific values for sh_flags */ +#define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */ +#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined + in the input to a link step */ + +/* ARM-specific program header flags */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location + addressed by the static base */ + +/* ARM relocs. */ +#define R_ARM_NONE 0 /* No reloc */ +#define R_ARM_PC24 1 /* PC relative 26 bit branch */ +#define R_ARM_ABS32 2 /* Direct 32 bit */ +#define R_ARM_REL32 3 /* PC relative 32 bit */ +#define R_ARM_PC13 4 +#define R_ARM_ABS16 5 /* Direct 16 bit */ +#define R_ARM_ABS12 6 /* Direct 12 bit */ +#define R_ARM_THM_ABS5 7 +#define R_ARM_ABS8 8 /* Direct 8 bit */ +#define R_ARM_SBREL32 9 +#define R_ARM_THM_PC22 10 +#define R_ARM_THM_PC8 11 +#define R_ARM_AMP_VCALL9 12 +#define R_ARM_SWI24 13 +#define R_ARM_THM_SWI8 14 +#define R_ARM_XPC25 15 +#define R_ARM_THM_XPC22 16 +#define R_ARM_COPY 20 /* Copy symbol at runtime */ +#define R_ARM_GLOB_DAT 21 /* Create GOT entry */ +#define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ +#define R_ARM_RELATIVE 23 /* Adjust by program base */ +#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ +#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ +#define R_ARM_GOT32 26 /* 32 bit GOT entry */ +#define R_ARM_PLT32 27 /* 32 bit PLT address */ +#define R_ARM_ALU_PCREL_7_0 32 +#define R_ARM_ALU_PCREL_15_8 33 +#define R_ARM_ALU_PCREL_23_15 34 +#define R_ARM_LDR_SBREL_11_0 35 +#define R_ARM_ALU_SBREL_19_12 36 +#define R_ARM_ALU_SBREL_27_20 37 +#define R_ARM_GNU_VTENTRY 100 +#define R_ARM_GNU_VTINHERIT 101 +#define R_ARM_THM_PC11 102 /* thumb unconditional branch */ +#define R_ARM_THM_PC9 103 /* thumb conditional branch */ +#define R_ARM_RXPC25 249 +#define R_ARM_RSBREL32 250 +#define R_ARM_THM_RPC22 251 +#define R_ARM_RREL32 252 +#define R_ARM_RABS22 253 +#define R_ARM_RPC24 254 +#define R_ARM_RBASE 255 +/* Keep this the last entry. */ +#define R_ARM_NUM 256 + +/* IA-64 specific declarations. */ + +/* Processor specific flags for the Ehdr e_flags field. */ +#define EF_IA_64_MASKOS 0x0000000f /* os-specific flags */ +#define EF_IA_64_ABI64 0x00000010 /* 64-bit ABI */ +#define EF_IA_64_ARCH 0xff000000 /* arch. version mask */ + +/* Processor specific values for the Phdr p_type field. */ +#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */ +#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */ + +/* Processor specific flags for the Phdr p_flags field. */ +#define PF_IA_64_NORECOV 0x80000000 /* spec insns w/o recovery */ + +/* Processor specific values for the Shdr sh_type field. */ +#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */ +#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */ + +/* Processor specific flags for the Shdr sh_flags field. */ +#define SHF_IA_64_SHORT 0x10000000 /* section near gp */ +#define SHF_IA_64_NORECOV 0x20000000 /* spec insns w/o recovery */ + +/* Processor specific values for the Dyn d_tag field. */ +#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) +#define DT_IA_64_NUM 1 + +/* IA-64 relocations. */ +#define R_IA64_NONE 0x00 /* none */ +#define R_IA64_IMM14 0x21 /* symbol + addend, add imm14 */ +#define R_IA64_IMM22 0x22 /* symbol + addend, add imm22 */ +#define R_IA64_IMM64 0x23 /* symbol + addend, mov imm64 */ +#define R_IA64_DIR32MSB 0x24 /* symbol + addend, data4 MSB */ +#define R_IA64_DIR32LSB 0x25 /* symbol + addend, data4 LSB */ +#define R_IA64_DIR64MSB 0x26 /* symbol + addend, data8 MSB */ +#define R_IA64_DIR64LSB 0x27 /* symbol + addend, data8 LSB */ +#define R_IA64_GPREL22 0x2a /* @gprel(sym + add), add imm22 */ +#define R_IA64_GPREL64I 0x2b /* @gprel(sym + add), mov imm64 */ +#define R_IA64_GPREL32MSB 0x2c /* @gprel(sym + add), data4 MSB */ +#define R_IA64_GPREL32LSB 0x2d /* @gprel(sym + add), data4 LSB */ +#define R_IA64_GPREL64MSB 0x2e /* @gprel(sym + add), data8 MSB */ +#define R_IA64_GPREL64LSB 0x2f /* @gprel(sym + add), data8 LSB */ +#define R_IA64_LTOFF22 0x32 /* @ltoff(sym + add), add imm22 */ +#define R_IA64_LTOFF64I 0x33 /* @ltoff(sym + add), mov imm64 */ +#define R_IA64_PLTOFF22 0x3a /* @pltoff(sym + add), add imm22 */ +#define R_IA64_PLTOFF64I 0x3b /* @pltoff(sym + add), mov imm64 */ +#define R_IA64_PLTOFF64MSB 0x3e /* @pltoff(sym + add), data8 MSB */ +#define R_IA64_PLTOFF64LSB 0x3f /* @pltoff(sym + add), data8 LSB */ +#define R_IA64_FPTR64I 0x43 /* @fptr(sym + add), mov imm64 */ +#define R_IA64_FPTR32MSB 0x44 /* @fptr(sym + add), data4 MSB */ +#define R_IA64_FPTR32LSB 0x45 /* @fptr(sym + add), data4 LSB */ +#define R_IA64_FPTR64MSB 0x46 /* @fptr(sym + add), data8 MSB */ +#define R_IA64_FPTR64LSB 0x47 /* @fptr(sym + add), data8 LSB */ +#define R_IA64_PCREL60B 0x48 /* @pcrel(sym + add), brl */ +#define R_IA64_PCREL21B 0x49 /* @pcrel(sym + add), ptb, call */ +#define R_IA64_PCREL21M 0x4a /* @pcrel(sym + add), chk.s */ +#define R_IA64_PCREL21F 0x4b /* @pcrel(sym + add), fchkf */ +#define R_IA64_PCREL32MSB 0x4c /* @pcrel(sym + add), data4 MSB */ +#define R_IA64_PCREL32LSB 0x4d /* @pcrel(sym + add), data4 LSB */ +#define R_IA64_PCREL64MSB 0x4e /* @pcrel(sym + add), data8 MSB */ +#define R_IA64_PCREL64LSB 0x4f /* @pcrel(sym + add), data8 LSB */ +#define R_IA64_LTOFF_FPTR22 0x52 /* @ltoff(@fptr(s+a)), imm22 */ +#define R_IA64_LTOFF_FPTR64I 0x53 /* @ltoff(@fptr(s+a)), imm64 */ +#define R_IA64_LTOFF_FPTR32MSB 0x54 /* @ltoff(@fptr(s+a)), data4 MSB */ +#define R_IA64_LTOFF_FPTR32LSB 0x55 /* @ltoff(@fptr(s+a)), data4 LSB */ +#define R_IA64_LTOFF_FPTR64MSB 0x56 /* @ltoff(@fptr(s+a)), data8 MSB */ +#define R_IA64_LTOFF_FPTR64LSB 0x57 /* @ltoff(@fptr(s+a)), data8 LSB */ +#define R_IA64_SEGREL32MSB 0x5c /* @segrel(sym + add), data4 MSB */ +#define R_IA64_SEGREL32LSB 0x5d /* @segrel(sym + add), data4 LSB */ +#define R_IA64_SEGREL64MSB 0x5e /* @segrel(sym + add), data8 MSB */ +#define R_IA64_SEGREL64LSB 0x5f /* @segrel(sym + add), data8 LSB */ +#define R_IA64_SECREL32MSB 0x64 /* @secrel(sym + add), data4 MSB */ +#define R_IA64_SECREL32LSB 0x65 /* @secrel(sym + add), data4 LSB */ +#define R_IA64_SECREL64MSB 0x66 /* @secrel(sym + add), data8 MSB */ +#define R_IA64_SECREL64LSB 0x67 /* @secrel(sym + add), data8 LSB */ +#define R_IA64_REL32MSB 0x6c /* data 4 + REL */ +#define R_IA64_REL32LSB 0x6d /* data 4 + REL */ +#define R_IA64_REL64MSB 0x6e /* data 8 + REL */ +#define R_IA64_REL64LSB 0x6f /* data 8 + REL */ +#define R_IA64_LTV32MSB 0x74 /* symbol + addend, data4 MSB */ +#define R_IA64_LTV32LSB 0x75 /* symbol + addend, data4 LSB */ +#define R_IA64_LTV64MSB 0x76 /* symbol + addend, data8 MSB */ +#define R_IA64_LTV64LSB 0x77 /* symbol + addend, data8 LSB */ +#define R_IA64_PCREL21BI 0x79 /* @pcrel(sym + add), 21bit inst */ +#define R_IA64_PCREL22 0x7a /* @pcrel(sym + add), 22bit inst */ +#define R_IA64_PCREL64I 0x7b /* @pcrel(sym + add), 64bit inst */ +#define R_IA64_IPLTMSB 0x80 /* dynamic reloc, imported PLT, MSB */ +#define R_IA64_IPLTLSB 0x81 /* dynamic reloc, imported PLT, LSB */ +#define R_IA64_COPY 0x84 /* copy relocation */ +#define R_IA64_SUB 0x85 /* Addend and symbol difference */ +#define R_IA64_LTOFF22X 0x86 /* LTOFF22, relaxable. */ +#define R_IA64_LDXMOV 0x87 /* Use of LTOFF22X. */ +#define R_IA64_TPREL14 0x91 /* @tprel(sym + add), imm14 */ +#define R_IA64_TPREL22 0x92 /* @tprel(sym + add), imm22 */ +#define R_IA64_TPREL64I 0x93 /* @tprel(sym + add), imm64 */ +#define R_IA64_TPREL64MSB 0x96 /* @tprel(sym + add), data8 MSB */ +#define R_IA64_TPREL64LSB 0x97 /* @tprel(sym + add), data8 LSB */ +#define R_IA64_LTOFF_TPREL22 0x9a /* @ltoff(@tprel(s+a)), imm2 */ +#define R_IA64_DTPMOD64MSB 0xa6 /* @dtpmod(sym + add), data8 MSB */ +#define R_IA64_DTPMOD64LSB 0xa7 /* @dtpmod(sym + add), data8 LSB */ +#define R_IA64_LTOFF_DTPMOD22 0xaa /* @ltoff(@dtpmod(sym + add)), imm22 */ +#define R_IA64_DTPREL14 0xb1 /* @dtprel(sym + add), imm14 */ +#define R_IA64_DTPREL22 0xb2 /* @dtprel(sym + add), imm22 */ +#define R_IA64_DTPREL64I 0xb3 /* @dtprel(sym + add), imm64 */ +#define R_IA64_DTPREL32MSB 0xb4 /* @dtprel(sym + add), data4 MSB */ +#define R_IA64_DTPREL32LSB 0xb5 /* @dtprel(sym + add), data4 LSB */ +#define R_IA64_DTPREL64MSB 0xb6 /* @dtprel(sym + add), data8 MSB */ +#define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */ +#define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */ + +/* SH specific declarations */ + +/* SH relocs. */ +#define R_SH_NONE 0 +#define R_SH_DIR32 1 +#define R_SH_REL32 2 +#define R_SH_DIR8WPN 3 +#define R_SH_IND12W 4 +#define R_SH_DIR8WPL 5 +#define R_SH_DIR8WPZ 6 +#define R_SH_DIR8BP 7 +#define R_SH_DIR8W 8 +#define R_SH_DIR8L 9 +#define R_SH_SWITCH16 25 +#define R_SH_SWITCH32 26 +#define R_SH_USES 27 +#define R_SH_COUNT 28 +#define R_SH_ALIGN 29 +#define R_SH_CODE 30 +#define R_SH_DATA 31 +#define R_SH_LABEL 32 +#define R_SH_SWITCH8 33 +#define R_SH_GNU_VTINHERIT 34 +#define R_SH_GNU_VTENTRY 35 +#define R_SH_GOT32 160 +#define R_SH_PLT32 161 +#define R_SH_COPY 162 +#define R_SH_GLOB_DAT 163 +#define R_SH_JMP_SLOT 164 +#define R_SH_RELATIVE 165 +#define R_SH_GOTOFF 166 +#define R_SH_GOTPC 167 +/* Keep this the last entry. */ +#define R_SH_NUM 256 + +/* Additional s390 relocs */ + +#define R_390_NONE 0 /* No reloc. */ +#define R_390_8 1 /* Direct 8 bit. */ +#define R_390_12 2 /* Direct 12 bit. */ +#define R_390_16 3 /* Direct 16 bit. */ +#define R_390_32 4 /* Direct 32 bit. */ +#define R_390_PC32 5 /* PC relative 32 bit. */ +#define R_390_GOT12 6 /* 12 bit GOT offset. */ +#define R_390_GOT32 7 /* 32 bit GOT offset. */ +#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ +#define R_390_COPY 9 /* Copy symbol at runtime. */ +#define R_390_GLOB_DAT 10 /* Create GOT entry. */ +#define R_390_JMP_SLOT 11 /* Create PLT entry. */ +#define R_390_RELATIVE 12 /* Adjust by program base. */ +#define R_390_GOTOFF 13 /* 32 bit offset to GOT. */ +#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ +#define R_390_GOT16 15 /* 16 bit GOT offset. */ +#define R_390_PC16 16 /* PC relative 16 bit. */ +#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ +#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ +#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ +#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ +#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ +#define R_390_64 22 /* Direct 64 bit. */ +#define R_390_PC64 23 /* PC relative 64 bit. */ +#define R_390_GOT64 24 /* 64 bit GOT offset. */ +#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ +#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ + +/* Keep this the last entry. */ +#define R_390_NUM 19 + +/* CRIS relocations. */ +#define R_CRIS_NONE 0 +#define R_CRIS_8 1 +#define R_CRIS_16 2 +#define R_CRIS_32 3 +#define R_CRIS_8_PCREL 4 +#define R_CRIS_16_PCREL 5 +#define R_CRIS_32_PCREL 6 +#define R_CRIS_GNU_VTINHERIT 7 +#define R_CRIS_GNU_VTENTRY 8 +#define R_CRIS_COPY 9 +#define R_CRIS_GLOB_DAT 10 +#define R_CRIS_JUMP_SLOT 11 +#define R_CRIS_RELATIVE 12 +#define R_CRIS_16_GOT 13 +#define R_CRIS_32_GOT 14 +#define R_CRIS_16_GOTPLT 15 +#define R_CRIS_32_GOTPLT 16 +#define R_CRIS_32_GOTREL 17 +#define R_CRIS_32_PLT_GOTREL 18 +#define R_CRIS_32_PLT_PCREL 19 + +#define R_CRIS_NUM 20 + +#endif /* elf.h */ diff --git a/contrib/media/updf/include/emu_layer/fs.h b/contrib/media/updf/include/emu_layer/fs.h new file mode 100644 index 0000000000..8d7f9e89a3 --- /dev/null +++ b/contrib/media/updf/include/emu_layer/fs.h @@ -0,0 +1,54 @@ +#ifndef __EMULAYER_FS_H +#define __EMULAYER_FS_H + +#include +#include + +#define MAX_EMUFS_HANDLES 64 + +typedef struct __emu_FILE emu_FILE; + +typedef struct { + int (* read)(emu_FILE * filp,unsigned long size,char * buf); + int (* write)(emu_FILE * filp,unsigned long size,char * buf); + int (* seek)(emu_FILE * filp,int offset,int whence); + int (* open)(emu_FILE * filp); + int (* close)(emu_FILE * filp); + int (* stat)(emu_FILE * filp,struct stat * statp); + int (* sync)(emu_FILE * filp); +} emu_FILE_operations_t; + +struct __emu_FILE +{ + int f_handle; + char * f_path; + unsigned long f_pos; + unsigned long f_size; + int f_flags; + int f_mode; + emu_FILE_operations_t * f_op; + void * f_priv; +}; + +struct __emu_VMOUNT +{ + char * mpnt; + int (* preopen_file)(emu_FILE * filp); + struct __emu_VMOUNT * m_next; +}; + +void init_emufs(void); +struct __emu_VMOUNT * EMU_find_best_mount(char * fpath); +extern emu_FILE * EMU_file_table[MAX_EMUFS_HANDLES]; +emu_FILE * EMU_get_empty_filp(char * forpath); +void EMU_put_filp(int h); +int EMU_open(const char * fname,int mode); +int EMU_close(int handle); +int EMU_read(int handle,char * buf,int count); +int EMU_write(int handle,char * buf,int count); +int EMU_lseek(int handle,int off,int whence); +int EMU_fstat(int handle, struct stat *statbuf); +int EMU_filelength(int fp); +int EMU_flush(int fp); + +#endif diff --git a/contrib/media/updf/include/emu_layer/layer.h b/contrib/media/updf/include/emu_layer/layer.h new file mode 100644 index 0000000000..43b166d76a --- /dev/null +++ b/contrib/media/updf/include/emu_layer/layer.h @@ -0,0 +1 @@ +void init_emu_layer(void); diff --git a/contrib/media/updf/include/endian.h b/contrib/media/updf/include/endian.h new file mode 100644 index 0000000000..6a40cf5d26 --- /dev/null +++ b/contrib/media/updf/include/endian.h @@ -0,0 +1,29 @@ +#ifndef _ENDIAN_H +#define _ENDIAN_H 1 + +#include + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + +#include + +#ifndef __FLOAT_WORD_ORDER +#define __FLOAT_WORD_ORDER __BYTE_ORDER +#endif + +#ifdef __USE_BSD +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#define BIG_ENDIAN __BIG_ENDIAN +#define PDP_ENDIAN __PDP_ENDIAN +#define BYTE_ORDER __BYTE_ORDER +#endif + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __LONG_LONG_PAIR(HI, LO) LO, HI +#elif __BYTE_ORDER == __BIG_ENDIAN +#define __LONG_LONG_PAIR(HI, LO) HI, LO +#endif + +#endif diff --git a/contrib/media/updf/include/errno.h b/contrib/media/updf/include/errno.h new file mode 100644 index 0000000000..5c07f3631e --- /dev/null +++ b/contrib/media/updf/include/errno.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_errno_h_ +#define __dj_include_errno_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#define EDOM 1 +#define ERANGE 2 + +extern int errno; + +#ifndef __STRICT_ANSI__ +//#define ENOTSUP 45 +#define E2BIG 3 +#define EACCES 4 +#define EAGAIN 5 +#define EBADF 6 +#define EBUSY 7 +#define ECHILD 8 +#define EDEADLK 9 +#define EEXIST 10 +#define EFAULT 11 +#define EFBIG 12 +#define EINTR 13 +#define EINVAL 14 +#define EIO 15 +#define EISDIR 16 +#define EMFILE 17 +#define EMLINK 18 +#define ENAMETOOLONG 19 +#define ENFILE 20 +#define ENODEV 21 +#define ENOENT 22 +#define ENOEXEC 23 +#define ENOLCK 24 +#define ENOMEM 25 +#define ENOSPC 26 +#define ENOSYS 27 +#define ENOTDIR 28 +#define ENOTEMPTY 29 +#define ENOTTY 30 +#define ENXIO 31 +#define EPERM 32 +#define EPIPE 33 +#define EROFS 34 +#define ESPIPE 35 +#define ESRCH 36 +#define EXDEV 37 + +#ifndef _POSIX_SOURCE + +#define ENMFILE 38 + +extern char * sys_errlist[]; +extern int sys_nerr; +extern const char * __sys_errlist[]; +extern int __sys_nerr; +extern int _doserrno; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_errno_h_ */ diff --git a/contrib/media/updf/include/errors.h b/contrib/media/updf/include/errors.h new file mode 100644 index 0000000000..6cab633328 --- /dev/null +++ b/contrib/media/updf/include/errors.h @@ -0,0 +1,33 @@ + +#ifndef __errors_h__ +#define __errors_h__ + +void CheckArgType(LispInt aArgNr, LispPtr& aArguments, LispEnvironment& aEnvironment, LispInt aError); +#define CHK_ARG(_pred,_argnr) {if (!(_pred)) CheckArgType(_argnr,aArguments, aEnvironment,KLispErrInvalidArg);} +#define CHK_ARG_CORE(_pred,_argnr) {if (!(_pred)) CheckArgType(_argnr,ARGUMENT(0),aEnvironment,KLispErrInvalidArg);} +#define CHK_ISLIST(_pred,_argnr) {if (!InternalIsList(_pred)) CheckArgType(_argnr,aArguments, aEnvironment,KLispErrNotList);} +#define CHK_ISLIST_CORE(_pred,_argnr) {if (!InternalIsList(_pred)) CheckArgType(_argnr,ARGUMENT(0),aEnvironment,KLispErrNotList);} +#define CHK_ISSTRING(_pred,_argnr) {if (!InternalIsString((_pred)->String())) CheckArgType(_argnr,aArguments, aEnvironment,KLispErrNotString);} +#define CHK_ISSTRING_CORE(_pred,_argnr) {if (!InternalIsString((_pred)->String())) CheckArgType(_argnr,ARGUMENT(0),aEnvironment,KLispErrNotString);} + +void CheckNrArgs(LispInt n, LispPtr& aArguments, LispEnvironment& aEnvironment); +#define TESTARGS(_n) CheckNrArgs(_n,aArguments,aEnvironment) + +void CheckFuncGeneric(LispInt aError,LispPtr& aArguments,LispEnvironment& aEnvironment); +void CheckFuncGeneric(LispInt aError,LispEnvironment& aEnvironment); +#define CHK(_pred,_err) {if (!(_pred)) CheckFuncGeneric(_err,aArguments, aEnvironment);} +#define CHK_CORE(_pred,_err) {if (!(_pred)) CheckFuncGeneric(_err,ARGUMENT(0),aEnvironment);} +#define CHK2(_pred,_err) {if (!(_pred)) CheckFuncGeneric(_err,aEnvironment);} + +char *GenericErrorBuf(); // called (only) from errors.cpp and LispEnvironment::ErrorString() +void RaiseError(char* str,...); + +/* +#define TESTARGS(_n) \ + { \ + LispInt nrArguments = InternalListLength(aArguments); \ + Check(nrArguments == _n,KLispErrWrongNumberOfArgs); \ + } +*/ + +#endif diff --git a/contrib/media/updf/include/eti.h b/contrib/media/updf/include/eti.h new file mode 100644 index 0000000000..a45d0b9cc1 --- /dev/null +++ b/contrib/media/updf/include/eti.h @@ -0,0 +1,52 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#ifndef _ETI_ERRNO_H_ +#define _ETI_ERRNO_H_ + +#define E_OK (0) +#define E_SYSTEM_ERROR (-1) +#define E_BAD_ARGUMENT (-2) +#define E_POSTED (-3) +#define E_CONNECTED (-4) +#define E_BAD_STATE (-5) +#define E_NO_ROOM (-6) +#define E_NOT_POSTED (-7) +#define E_UNKNOWN_COMMAND (-8) +#define E_NO_MATCH (-9) +#define E_NOT_SELECTABLE (-10) +#define E_NOT_CONNECTED (-11) +#define E_REQUEST_DENIED (-12) +#define E_INVALID_FIELD (-13) +#define E_CURRENT (-14) + +#endif diff --git a/contrib/media/updf/include/evalfunc.h b/contrib/media/updf/include/evalfunc.h new file mode 100644 index 0000000000..3a5cdfa745 --- /dev/null +++ b/contrib/media/updf/include/evalfunc.h @@ -0,0 +1,18 @@ + +#ifndef __evalfuncbase_h__ +#define __evalfuncbase_h__ + +#include "yacasbase.h" + +// class EvalFuncBase defines the interface to 'something that can +// evaluate' +class LispEnvironment; +class EvalFuncBase : public YacasBase +{ +public: + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, + LispPtr& aArguments)=0; + virtual ~EvalFuncBase() {} +}; + +#endif diff --git a/contrib/media/updf/include/event.h b/contrib/media/updf/include/event.h new file mode 100644 index 0000000000..11910b0e4b --- /dev/null +++ b/contrib/media/updf/include/event.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __EVENT_H +#define __EVENT_H +/** +@file event.h +@brief Implementation of a event callback system + +The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user. +*/ + +#define EVT_ERROR 1 /**< Error event type */ +#define EVT_WARNING 2 /**< Warning event type */ +#define EVT_INFO 4 /**< Debug event type */ + +/** @defgroup EVENT EVENT - Implementation of a event callback system */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Write formatted data to a string and send the string to a user callback. +@param cinfo Codec context info +@param event_type Event type or callback to use to send the message +@param fmt Format-control string (plus optionnal arguments) +@return Returns true if successful, returns false otherwise +*/ +bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __EVENT_H */ diff --git a/contrib/media/updf/include/exception b/contrib/media/updf/include/exception new file mode 100644 index 0000000000..3676a73148 --- /dev/null +++ b/contrib/media/updf/include/exception @@ -0,0 +1,67 @@ +// Exception Handling support header for -*- C++ -*- + +// Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation +// +// This file is part of GNU CC. +// +// GNU CC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// GNU CC 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 GNU CC; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef __EXCEPTION__ +#define __EXCEPTION__ + +extern "C++" { + +namespace std +{ + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + virtual const char* what() const throw(); + }; + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + virtual ~bad_exception() throw(); + }; + + typedef void (*terminate_handler) (); + typedef void (*unexpected_handler) (); + + terminate_handler set_terminate(terminate_handler) throw(); + void terminate() __attribute__ ((__noreturn__)); + + unexpected_handler set_unexpected(unexpected_handler) throw(); + void unexpected() __attribute__ ((__noreturn__)); + + bool uncaught_exception() throw(); +} // namespace std + +} // extern "C++" + +#endif diff --git a/contrib/media/updf/include/ext/bvector b/contrib/media/updf/include/ext/bvector new file mode 100644 index 0000000000..32a06d21be --- /dev/null +++ b/contrib/media/updf/include/ext/bvector @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __SGI_STL_BVECTOR_H +#define __SGI_STL_BVECTOR_H + + +#include +#include + +#ifdef __STL_USE_NAMESPACES + +using __STD::bit_vector; + +#endif /* __STL_USE_NAMESPACES */ + +#endif /* __SGI_STL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: + + diff --git a/contrib/media/updf/include/ext/hash_map b/contrib/media/updf/include/ext/hash_map new file mode 100644 index 0000000000..8386cb91c1 --- /dev/null +++ b/contrib/media/updf/include/ext/hash_map @@ -0,0 +1,407 @@ +/* + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_HASH_MAP_H +#define __SGI_STL_INTERNAL_HASH_MAP_H + +#include +#include + +namespace std +{ + +// Forward declaration of equality operator; needed for friend declaration. + +template , + class _EqualKey = equal_to<_Key>, + class _Alloc = allocator<_Tp> > +class hash_map; + +template +inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&, + const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&); + +template +class hash_map +{ +private: + typedef hashtable,_Key,_HashFcn, + _Select1st >,_EqualKey,_Alloc> _Ht; + _Ht _M_ht; + +public: + typedef typename _Ht::key_type key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_funct() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +public: + hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) {} + explicit hash_map(size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} + hash_map(size_type __n, const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) {} + hash_map(size_type __n, const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + template + hash_map(_InputIterator __f, _InputIterator __l) + : _M_ht(100, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_map(_InputIterator __f, _InputIterator __l, size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_map(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_map(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } + +public: + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(hash_map& __hs) { _M_ht.swap(__hs._M_ht); } + + template + friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&, + const hash_map<_K1, _T1, _HF, _EqK, _Al>&); + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + +public: + pair insert(const value_type& __obj) + { return _M_ht.insert_unique(__obj); } + template + void insert(_InputIterator __f, _InputIterator __l) + { _M_ht.insert_unique(__f,__l); } + pair insert_noresize(const value_type& __obj) + { return _M_ht.insert_unique_noresize(__obj); } + + iterator find(const key_type& __key) { return _M_ht.find(__key); } + const_iterator find(const key_type& __key) const + { return _M_ht.find(__key); } + + _Tp& operator[](const key_type& __key) { + return _M_ht.find_or_insert(value_type(__key, _Tp())).second; + } + + size_type count(const key_type& __key) const { return _M_ht.count(__key); } + + pair equal_range(const key_type& __key) + { return _M_ht.equal_range(__key); } + pair + equal_range(const key_type& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(iterator __it) { _M_ht.erase(__it); } + void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + + void resize(size_type __hint) { _M_ht.resize(__hint); } + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type elems_in_bucket(size_type __n) const + { return _M_ht.elems_in_bucket(__n); } +}; + +template +inline bool +operator==(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1, + const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) +{ + return __hm1._M_ht == __hm2._M_ht; +} + +template +inline bool +operator!=(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1, + const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) { + return !(__hm1 == __hm2); +} + +template +inline void +swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1, + hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) +{ + __hm1.swap(__hm2); +} + +// Forward declaration of equality operator; needed for friend declaration. + +template , + class _EqualKey = equal_to<_Key>, + class _Alloc = allocator<_Tp> > +class hash_multimap; + +template +inline bool +operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1, + const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2); + +template +class hash_multimap +{ + // concept requirements + __glibcpp_class_requires(_Key, _SGIAssignableConcept); + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + __glibcpp_class_requires3(_HashFcn, size_t, _Key, _UnaryFunctionConcept); + __glibcpp_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept); + +private: + typedef hashtable, _Key, _HashFcn, + _Select1st >, _EqualKey, _Alloc> + _Ht; + _Ht _M_ht; + +public: + typedef typename _Ht::key_type key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_funct() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +public: + hash_multimap() : _M_ht(100, hasher(), key_equal(), allocator_type()) {} + explicit hash_multimap(size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} + hash_multimap(size_type __n, const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) {} + hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + template + hash_multimap(_InputIterator __f, _InputIterator __l) + : _M_ht(100, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } + +public: + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(hash_multimap& __hs) { _M_ht.swap(__hs._M_ht); } + + template + friend bool operator== (const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&, + const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&); + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + +public: + iterator insert(const value_type& __obj) + { return _M_ht.insert_equal(__obj); } + template + void insert(_InputIterator __f, _InputIterator __l) + { _M_ht.insert_equal(__f,__l); } + iterator insert_noresize(const value_type& __obj) + { return _M_ht.insert_equal_noresize(__obj); } + + iterator find(const key_type& __key) { return _M_ht.find(__key); } + const_iterator find(const key_type& __key) const + { return _M_ht.find(__key); } + + size_type count(const key_type& __key) const { return _M_ht.count(__key); } + + pair equal_range(const key_type& __key) + { return _M_ht.equal_range(__key); } + pair + equal_range(const key_type& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(iterator __it) { _M_ht.erase(__it); } + void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + +public: + void resize(size_type __hint) { _M_ht.resize(__hint); } + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type elems_in_bucket(size_type __n) const + { return _M_ht.elems_in_bucket(__n); } +}; + +template +inline bool +operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1, + const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2) +{ + return __hm1._M_ht == __hm2._M_ht; +} + +template +inline bool +operator!=(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1, + const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2) { + return !(__hm1 == __hm2); +} + +template +inline void +swap(hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1, + hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) +{ + __hm1.swap(__hm2); +} + + +// Specialization of insert_iterator so that it will work for hash_map +// and hash_multimap. + +template +class insert_iterator > { +protected: + typedef hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->insert(__value); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +class insert_iterator > { +protected: + typedef hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->insert(__value); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_HASH_MAP_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/hash_set b/contrib/media/updf/include/ext/hash_set new file mode 100644 index 0000000000..a6568e135a --- /dev/null +++ b/contrib/media/updf/include/ext/hash_set @@ -0,0 +1,396 @@ +/* + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_HASH_SET_H +#define __SGI_STL_INTERNAL_HASH_SET_H + +#include +#include + +namespace std +{ + +// Forward declaration of equality operator; needed for friend declaration. + +template , + class _EqualKey = equal_to<_Value>, + class _Alloc = allocator<_Value> > +class hash_set; + +template +inline bool +operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2); + +template +class hash_set +{ + // concept requirements + __glibcpp_class_requires(_Value, _SGIAssignableConcept); + __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept); + __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept); + +private: + typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, + _EqualKey, _Alloc> _Ht; + _Ht _M_ht; + +public: + typedef typename _Ht::key_type key_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::const_pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::const_reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::const_iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_funct() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +public: + hash_set() + : _M_ht(100, hasher(), key_equal(), allocator_type()) {} + explicit hash_set(size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} + hash_set(size_type __n, const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) {} + hash_set(size_type __n, const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + template + hash_set(_InputIterator __f, _InputIterator __l) + : _M_ht(100, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_set(_InputIterator __f, _InputIterator __l, size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_set(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) + { _M_ht.insert_unique(__f, __l); } + template + hash_set(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } + +public: + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(hash_set& __hs) { _M_ht.swap(__hs._M_ht); } + + template + friend bool operator== (const hash_set<_Val, _HF, _EqK, _Al>&, + const hash_set<_Val, _HF, _EqK, _Al>&); + + iterator begin() const { return _M_ht.begin(); } + iterator end() const { return _M_ht.end(); } + +public: + pair insert(const value_type& __obj) + { + pair __p = _M_ht.insert_unique(__obj); + return pair(__p.first, __p.second); + } + template + void insert(_InputIterator __f, _InputIterator __l) + { _M_ht.insert_unique(__f,__l); } + pair insert_noresize(const value_type& __obj) + { + pair __p = + _M_ht.insert_unique_noresize(__obj); + return pair(__p.first, __p.second); + } + + iterator find(const key_type& __key) const { return _M_ht.find(__key); } + + size_type count(const key_type& __key) const { return _M_ht.count(__key); } + + pair equal_range(const key_type& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(iterator __it) { _M_ht.erase(__it); } + void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + +public: + void resize(size_type __hint) { _M_ht.resize(__hint); } + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type elems_in_bucket(size_type __n) const + { return _M_ht.elems_in_bucket(__n); } +}; + +template +inline bool +operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2) +{ + return __hs1._M_ht == __hs2._M_ht; +} + +template +inline bool +operator!=(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2) { + return !(__hs1 == __hs2); +} + +template +inline void +swap(hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, + hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) +{ + __hs1.swap(__hs2); +} + + +template , + class _EqualKey = equal_to<_Value>, + class _Alloc = allocator<_Value> > +class hash_multiset; + +template +inline bool +operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2); + + +template +class hash_multiset +{ + // concept requirements + __glibcpp_class_requires(_Value, _SGIAssignableConcept); + __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept); + __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept); + +private: + typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, + _EqualKey, _Alloc> _Ht; + _Ht _M_ht; + +public: + typedef typename _Ht::key_type key_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::const_pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::const_reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::const_iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_funct() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +public: + hash_multiset() + : _M_ht(100, hasher(), key_equal(), allocator_type()) {} + explicit hash_multiset(size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} + hash_multiset(size_type __n, const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) {} + hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + template + hash_multiset(_InputIterator __f, _InputIterator __l) + : _M_ht(100, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n) + : _M_ht(__n, hasher(), key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf) + : _M_ht(__n, __hf, key_equal(), allocator_type()) + { _M_ht.insert_equal(__f, __l); } + template + hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, + const hasher& __hf, const key_equal& __eql, + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } + +public: + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(hash_multiset& hs) { _M_ht.swap(hs._M_ht); } + + template + friend bool operator== (const hash_multiset<_Val, _HF, _EqK, _Al>&, + const hash_multiset<_Val, _HF, _EqK, _Al>&); + + iterator begin() const { return _M_ht.begin(); } + iterator end() const { return _M_ht.end(); } + +public: + iterator insert(const value_type& __obj) + { return _M_ht.insert_equal(__obj); } + template + void insert(_InputIterator __f, _InputIterator __l) + { _M_ht.insert_equal(__f,__l); } + iterator insert_noresize(const value_type& __obj) + { return _M_ht.insert_equal_noresize(__obj); } + + iterator find(const key_type& __key) const { return _M_ht.find(__key); } + + size_type count(const key_type& __key) const { return _M_ht.count(__key); } + + pair equal_range(const key_type& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(iterator __it) { _M_ht.erase(__it); } + void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + +public: + void resize(size_type __hint) { _M_ht.resize(__hint); } + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type elems_in_bucket(size_type __n) const + { return _M_ht.elems_in_bucket(__n); } +}; + +template +inline bool +operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) +{ + return __hs1._M_ht == __hs2._M_ht; +} + +template +inline bool +operator!=(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, + const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) { + return !(__hs1 == __hs2); +} + +template +inline void +swap(hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, + hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) { + __hs1.swap(__hs2); +} + +// Specialization of insert_iterator so that it will work for hash_set +// and hash_multiset. + +template +class insert_iterator > { +protected: + typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container; + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->insert(__value); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +class insert_iterator > { +protected: + typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container; + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + container->insert(__value); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_HASH_SET_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/rope b/contrib/media/updf/include/ext/rope new file mode 100644 index 0000000000..3779defea2 --- /dev/null +++ b/contrib/media/updf/include/ext/rope @@ -0,0 +1,32 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __SGI_STL_ROPE +#define __SGI_STL_ROPE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* __SGI_STL_ROPE */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/ropeimpl.h b/contrib/media/updf/include/ext/ropeimpl.h new file mode 100644 index 0000000000..7f790f6421 --- /dev/null +++ b/contrib/media/updf/include/ext/ropeimpl.h @@ -0,0 +1,1509 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#include +#include + +#ifdef __STL_USE_EXCEPTIONS +# include +#endif + +namespace std +{ + +// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf +// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct. +// Results in a valid buf_ptr if the iterator can be legitimately +// dereferenced. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf( + _Rope_iterator_base<_CharT,_Alloc>& __x) +{ + const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index]; + size_t __leaf_pos = __x._M_leaf_pos; + size_t __pos = __x._M_current_pos; + + switch(__leaf->_M_tag) { + case _RopeRep::_S_leaf: + __x._M_buf_start = + ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data; + __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); + __x._M_buf_end = __x._M_buf_start + __leaf->_M_size; + break; + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + size_t __len = _S_iterator_buf_len; + size_t __buf_start_pos = __leaf_pos; + size_t __leaf_end = __leaf_pos + __leaf->_M_size; + char_producer<_CharT>* __fn = + ((_Rope_RopeFunction<_CharT,_Alloc>*)__leaf)->_M_fn; + + if (__buf_start_pos + __len <= __pos) { + __buf_start_pos = __pos - __len/4; + if (__buf_start_pos + __len > __leaf_end) { + __buf_start_pos = __leaf_end - __len; + } + } + if (__buf_start_pos + __len > __leaf_end) { + __len = __leaf_end - __buf_start_pos; + } + (*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf); + __x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos); + __x._M_buf_start = __x._M_tmp_buf; + __x._M_buf_end = __x._M_tmp_buf + __len; + } + break; + default: + __stl_assert(0); + } +} + +// Set path and buffer inside a rope iterator. We assume that +// pos and root are already set. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache +(_Rope_iterator_base<_CharT,_Alloc>& __x) +{ + const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1]; + const _RopeRep* __curr_rope; + int __curr_depth = -1; /* index into path */ + size_t __curr_start_pos = 0; + size_t __pos = __x._M_current_pos; + unsigned char __dirns = 0; // Bit vector marking right turns in the path + + __stl_assert(__pos <= __x._M_root->_M_size); + if (__pos >= __x._M_root->_M_size) { + __x._M_buf_ptr = 0; + return; + } + __curr_rope = __x._M_root; + if (0 != __curr_rope->_M_c_string) { + /* Treat the root as a leaf. */ + __x._M_buf_start = __curr_rope->_M_c_string; + __x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size; + __x._M_buf_ptr = __curr_rope->_M_c_string + __pos; + __x._M_path_end[0] = __curr_rope; + __x._M_leaf_index = 0; + __x._M_leaf_pos = 0; + return; + } + for(;;) { + ++__curr_depth; + __stl_assert(__curr_depth <= _RopeRep::_S_max_rope_depth); + __path[__curr_depth] = __curr_rope; + switch(__curr_rope->_M_tag) { + case _RopeRep::_S_leaf: + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + __x._M_leaf_pos = __curr_start_pos; + goto done; + case _RopeRep::_S_concat: + { + _Rope_RopeConcatenation<_CharT,_Alloc>* __c = + (_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size; + + __dirns <<= 1; + if (__pos >= __curr_start_pos + __left_len) { + __dirns |= 1; + __curr_rope = __c->_M_right; + __curr_start_pos += __left_len; + } else { + __curr_rope = __left; + } + } + break; + } + } + done: + // Copy last section of path into _M_path_end. + { + int __i = -1; + int __j = __curr_depth + 1 - _S_path_cache_len; + + if (__j < 0) __j = 0; + while (__j <= __curr_depth) { + __x._M_path_end[++__i] = __path[__j++]; + } + __x._M_leaf_index = __i; + } + __x._M_path_directions = __dirns; + _S_setbuf(__x); +} + +// Specialized version of the above. Assumes that +// the path cache is valid for the previous position. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr +(_Rope_iterator_base<_CharT,_Alloc>& __x) +{ + int __current_index = __x._M_leaf_index; + const _RopeRep* __current_node = __x._M_path_end[__current_index]; + size_t __len = __current_node->_M_size; + size_t __node_start_pos = __x._M_leaf_pos; + unsigned char __dirns = __x._M_path_directions; + _Rope_RopeConcatenation<_CharT,_Alloc>* __c; + + __stl_assert(__x._M_current_pos <= __x._M_root->_M_size); + if (__x._M_current_pos - __node_start_pos < __len) { + /* More stuff in this leaf, we just didn't cache it. */ + _S_setbuf(__x); + return; + } + __stl_assert(__node_start_pos + __len == __x._M_current_pos); + // node_start_pos is starting position of last_node. + while (--__current_index >= 0) { + if (!(__dirns & 1) /* Path turned left */) + break; + __current_node = __x._M_path_end[__current_index]; + __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; + // Otherwise we were in the right child. Thus we should pop + // the concatenation node. + __node_start_pos -= __c->_M_left->_M_size; + __dirns >>= 1; + } + if (__current_index < 0) { + // We underflowed the cache. Punt. + _S_setcache(__x); + return; + } + __current_node = __x._M_path_end[__current_index]; + __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; + // current_node is a concatenation node. We are positioned on the first + // character in its right child. + // node_start_pos is starting position of current_node. + __node_start_pos += __c->_M_left->_M_size; + __current_node = __c->_M_right; + __x._M_path_end[++__current_index] = __current_node; + __dirns |= 1; + while (_RopeRep::_S_concat == __current_node->_M_tag) { + ++__current_index; + if (_S_path_cache_len == __current_index) { + int __i; + for (__i = 0; __i < _S_path_cache_len-1; __i++) { + __x._M_path_end[__i] = __x._M_path_end[__i+1]; + } + --__current_index; + } + __current_node = + ((_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node)->_M_left; + __x._M_path_end[__current_index] = __current_node; + __dirns <<= 1; + // node_start_pos is unchanged. + } + __x._M_leaf_index = __current_index; + __x._M_leaf_pos = __node_start_pos; + __x._M_path_directions = __dirns; + _S_setbuf(__x); +} + +template +void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) { + _M_current_pos += __n; + if (0 != _M_buf_ptr) { + size_t __chars_left = _M_buf_end - _M_buf_ptr; + if (__chars_left > __n) { + _M_buf_ptr += __n; + } else if (__chars_left == __n) { + _M_buf_ptr += __n; + _S_setcache_for_incr(*this); + } else { + _M_buf_ptr = 0; + } + } +} + +template +void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) { + if (0 != _M_buf_ptr) { + size_t __chars_left = _M_buf_ptr - _M_buf_start; + if (__chars_left >= __n) { + _M_buf_ptr -= __n; + } else { + _M_buf_ptr = 0; + } + } + _M_current_pos -= __n; +} + +template +void _Rope_iterator<_CharT,_Alloc>::_M_check() { + if (_M_root_rope->_M_tree_ptr != _M_root) { + // _Rope was modified. Get things fixed up. + _RopeRep::_S_unref(_M_root); + _M_root = _M_root_rope->_M_tree_ptr; + _RopeRep::_S_ref(_M_root); + _M_buf_ptr = 0; + } +} + +template +inline +_Rope_const_iterator<_CharT, _Alloc>::_Rope_const_iterator( + const _Rope_iterator<_CharT,_Alloc>& __x) +: _Rope_iterator_base<_CharT,_Alloc>(__x) +{ } + +template +inline _Rope_iterator<_CharT,_Alloc>::_Rope_iterator( + rope<_CharT,_Alloc>& __r, size_t __pos) +: _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos), + _M_root_rope(&__r) +{ + _RopeRep::_S_ref(_M_root); +} + +template +inline size_t +rope<_CharT,_Alloc>::_S_char_ptr_len(const _CharT* __s) +{ + const _CharT* __p = __s; + + while (!_S_is0(*__p)) { ++__p; } + return (__p - __s); +} + + +#ifndef __GC + +template +inline void _Rope_RopeRep<_CharT,_Alloc>::_M_free_c_string() +{ + _CharT* __cstr = _M_c_string; + if (0 != __cstr) { + size_t __size = _M_size + 1; + destroy(__cstr, __cstr + __size); + _Data_deallocate(__cstr, __size); + } +} + + +template + inline void _Rope_RopeRep<_CharT,_Alloc>::_S_free_string(_CharT* __s, + size_t __n, + allocator_type __a) +{ + if (!_S_is_basic_char_type((_CharT*)0)) { + destroy(__s, __s + __n); + } +// This has to be a static member, so this gets a bit messy + __a.deallocate( + __s, _Rope_RopeLeaf<_CharT,_Alloc>::_S_rounded_up_size(__n)); +} + + +// There are several reasons for not doing this with virtual destructors +// and a class specific delete operator: +// - A class specific delete operator can't easily get access to +// allocator instances if we need them. +// - Any virtual function would need a 4 or byte vtable pointer; +// this only requires a one byte tag per object. +template +void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() +{ + switch(_M_tag) { + case _S_leaf: + { + _Rope_RopeLeaf<_CharT,_Alloc>* __l + = (_Rope_RopeLeaf<_CharT,_Alloc>*)this; + __l->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf(); + _L_deallocate(__l, 1); + break; + } + case _S_concat: + { + _Rope_RopeConcatenation<_CharT,_Alloc>* __c + = (_Rope_RopeConcatenation<_CharT,_Alloc>*)this; + __c->_Rope_RopeConcatenation<_CharT,_Alloc>:: + ~_Rope_RopeConcatenation(); + _C_deallocate(__c, 1); + break; + } + case _S_function: + { + _Rope_RopeFunction<_CharT,_Alloc>* __f + = (_Rope_RopeFunction<_CharT,_Alloc>*)this; + __f->_Rope_RopeFunction<_CharT,_Alloc>::~_Rope_RopeFunction(); + _F_deallocate(__f, 1); + break; + } + case _S_substringfn: + { + _Rope_RopeSubstring<_CharT,_Alloc>* __ss = + (_Rope_RopeSubstring<_CharT,_Alloc>*)this; + __ss->_Rope_RopeSubstring<_CharT,_Alloc>:: + ~_Rope_RopeSubstring(); + _S_deallocate(__ss, 1); + break; + } + } +} +#else + +template + inline void _Rope_RopeRep<_CharT,_Alloc>::_S_free_string + (const _CharT*, size_t, allocator_type) +{} + +#endif + + +// Concatenate a C string onto a leaf rope by copying the rope data. +// Used for short ropes. +template +rope<_CharT,_Alloc>::_RopeLeaf* +rope<_CharT,_Alloc>::_S_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __len) +{ + size_t __old_len = __r->_M_size; + _CharT* __new_data = (_CharT*) + _Data_allocate(_S_rounded_up_size(__old_len + __len)); + _RopeLeaf* __result; + + uninitialized_copy_n(__r->_M_data, __old_len, __new_data); + uninitialized_copy_n(__iter, __len, __new_data + __old_len); + _S_cond_store_eos(__new_data[__old_len + __len]); + __STL_TRY { + __result = _S_new_RopeLeaf(__new_data, __old_len + __len, + __r->get_allocator()); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len, + __r->get_allocator())); + return __result; +} + +#ifndef __GC +// As above, but it's OK to clobber original if refcount is 1 +template +rope<_CharT,_Alloc>::_RopeLeaf* +rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __len) +{ + __stl_assert(__r->_M_ref_count >= 1); + if (__r->_M_ref_count > 1) + return _S_leaf_concat_char_iter(__r, __iter, __len); + size_t __old_len = __r->_M_size; + if (_S_allocated_capacity(__old_len) >= __old_len + __len) { + // The space has been partially initialized for the standard + // character types. But that doesn't matter for those types. + uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len); + if (_S_is_basic_char_type((_CharT*)0)) { + _S_cond_store_eos(__r->_M_data[__old_len + __len]); + __stl_assert(__r->_M_c_string == __r->_M_data); + } else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) { + __r->_M_free_c_string(); + __r->_M_c_string = 0; + } + __r->_M_size = __old_len + __len; + __stl_assert(__r->_M_ref_count == 1); + __r->_M_ref_count = 2; + return __r; + } else { + _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len); + __stl_assert(__result->_M_ref_count == 1); + return __result; + } +} +#endif + +// Assumes left and right are not 0. +// Does not increment (nor decrement on exception) child reference counts. +// Result has ref count 1. +template +rope<_CharT,_Alloc>::_RopeRep* +rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right) +{ + _RopeConcatenation* __result = + _S_new_RopeConcatenation(__left, __right, __left->get_allocator()); + size_t __depth = __result->_M_depth; + + __stl_assert(__left->get_allocator() == __right->get_allocator()); + if (__depth > 20 && (__result->_M_size < 1000 || + __depth > _RopeRep::_S_max_rope_depth)) { + _RopeRep* __balanced; + + __STL_TRY { + __balanced = _S_balance(__result); +# ifndef __GC + if (__result != __balanced) { + __stl_assert(1 == __result->_M_ref_count + && 1 == __balanced->_M_ref_count); + } +# endif + __result->_M_unref_nonnil(); + } + __STL_UNWIND((_C_deallocate(__result,1))); + // In case of exception, we need to deallocate + // otherwise dangling result node. But caller + // still owns its children. Thus unref is + // inappropriate. + return __balanced; + } else { + return __result; + } +} + +template +rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter + (_RopeRep* __r, const _CharT*__s, size_t __slen) +{ + _RopeRep* __result; + if (0 == __slen) { + _S_ref(__r); + return __r; + } + if (0 == __r) + return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, + __r->get_allocator()); + if (_RopeRep::_S_leaf == __r->_M_tag && + __r->_M_size + __slen <= _S_copy_max) { + __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); +# ifndef __GC + __stl_assert(1 == __result->_M_ref_count); +# endif + return __result; + } + if (_RopeRep::_S_concat == __r->_M_tag + && _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) { + _RopeLeaf* __right = + (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); + if (__right->_M_size + __slen <= _S_copy_max) { + _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left; + _RopeRep* __nright = + _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen); + __left->_M_ref_nonnil(); + __STL_TRY { + __result = _S_tree_concat(__left, __nright); + } + __STL_UNWIND(_S_unref(__left); _S_unref(__nright)); +# ifndef __GC + __stl_assert(1 == __result->_M_ref_count); +# endif + return __result; + } + } + _RopeRep* __nright = + __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); + __STL_TRY { + __r->_M_ref_nonnil(); + __result = _S_tree_concat(__r, __nright); + } + __STL_UNWIND(_S_unref(__r); _S_unref(__nright)); +# ifndef __GC + __stl_assert(1 == __result->_M_ref_count); +# endif + return __result; +} + +#ifndef __GC +template +rope<_CharT,_Alloc>::_RopeRep* +rope<_CharT,_Alloc>::_S_destr_concat_char_iter( + _RopeRep* __r, const _CharT* __s, size_t __slen) +{ + _RopeRep* __result; + if (0 == __r) + return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, + __r->get_allocator()); + size_t __count = __r->_M_ref_count; + size_t __orig_size = __r->_M_size; + __stl_assert(__count >= 1); + if (__count > 1) return _S_concat_char_iter(__r, __s, __slen); + if (0 == __slen) { + __r->_M_ref_count = 2; // One more than before + return __r; + } + if (__orig_size + __slen <= _S_copy_max && + _RopeRep::_S_leaf == __r->_M_tag) { + __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); + return __result; + } + if (_RopeRep::_S_concat == __r->_M_tag) { + _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right); + if (_RopeRep::_S_leaf == __right->_M_tag + && __right->_M_size + __slen <= _S_copy_max) { + _RopeRep* __new_right = + _S_destr_leaf_concat_char_iter(__right, __s, __slen); + if (__right == __new_right) { + __stl_assert(__new_right->_M_ref_count == 2); + __new_right->_M_ref_count = 1; + } else { + __stl_assert(__new_right->_M_ref_count >= 1); + __right->_M_unref_nonnil(); + } + __stl_assert(__r->_M_ref_count == 1); + __r->_M_ref_count = 2; // One more than before. + ((_RopeConcatenation*)__r)->_M_right = __new_right; + __r->_M_size = __orig_size + __slen; + if (0 != __r->_M_c_string) { + __r->_M_free_c_string(); + __r->_M_c_string = 0; + } + return __r; + } + } + _RopeRep* __right = + __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); + __r->_M_ref_nonnil(); + __STL_TRY { + __result = _S_tree_concat(__r, __right); + } + __STL_UNWIND(_S_unref(__r); _S_unref(__right)) + __stl_assert(1 == __result->_M_ref_count); + return __result; +} +#endif /* !__GC */ + +template +rope<_CharT,_Alloc>::_RopeRep* +rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right) +{ + if (0 == __left) { + _S_ref(__right); + return __right; + } + if (0 == __right) { + __left->_M_ref_nonnil(); + return __left; + } + if (_RopeRep::_S_leaf == __right->_M_tag) { + if (_RopeRep::_S_leaf == __left->_M_tag) { + if (__right->_M_size + __left->_M_size <= _S_copy_max) { + return _S_leaf_concat_char_iter((_RopeLeaf*)__left, + ((_RopeLeaf*)__right)->_M_data, + __right->_M_size); + } + } else if (_RopeRep::_S_concat == __left->_M_tag + && _RopeRep::_S_leaf == + ((_RopeConcatenation*)__left)->_M_right->_M_tag) { + _RopeLeaf* __leftright = + (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); + if (__leftright->_M_size + __right->_M_size <= _S_copy_max) { + _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left; + _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright, + ((_RopeLeaf*)__right)->_M_data, + __right->_M_size); + __leftleft->_M_ref_nonnil(); + __STL_TRY { + return(_S_tree_concat(__leftleft, __rest)); + } + __STL_UNWIND(_S_unref(__leftleft); _S_unref(__rest)) + } + } + } + __left->_M_ref_nonnil(); + __right->_M_ref_nonnil(); + __STL_TRY { + return(_S_tree_concat(__left, __right)); + } + __STL_UNWIND(_S_unref(__left); _S_unref(__right)); +} + +template +rope<_CharT,_Alloc>::_RopeRep* +rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base, + size_t __start, size_t __endp1) +{ + if (0 == __base) return 0; + size_t __len = __base->_M_size; + size_t __adj_endp1; + const size_t __lazy_threshold = 128; + + if (__endp1 >= __len) { + if (0 == __start) { + __base->_M_ref_nonnil(); + return __base; + } else { + __adj_endp1 = __len; + } + } else { + __adj_endp1 = __endp1; + } + switch(__base->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__base; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + size_t __left_len = __left->_M_size; + _RopeRep* __result; + + if (__adj_endp1 <= __left_len) { + return _S_substring(__left, __start, __endp1); + } else if (__start >= __left_len) { + return _S_substring(__right, __start - __left_len, + __adj_endp1 - __left_len); + } + _Self_destruct_ptr __left_result( + _S_substring(__left, __start, __left_len)); + _Self_destruct_ptr __right_result( + _S_substring(__right, 0, __endp1 - __left_len)); + __result = _S_concat(__left_result, __right_result); +# ifndef __GC + __stl_assert(1 == __result->_M_ref_count); +# endif + return __result; + } + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__base; + _RopeLeaf* __result; + size_t __result_len; + if (__start >= __adj_endp1) return 0; + __result_len = __adj_endp1 - __start; + if (__result_len > __lazy_threshold) goto lazy; +# ifdef __GC + const _CharT* __section = __l->_M_data + __start; + __result = _S_new_RopeLeaf(__section, __result_len, + __base->get_allocator()); + __result->_M_c_string = 0; // Not eos terminated. +# else + // We should sometimes create substring node instead. + __result = __STL_ROPE_FROM_UNOWNED_CHAR_PTR( + __l->_M_data + __start, __result_len, + __base->get_allocator()); +# endif + return __result; + } + case _RopeRep::_S_substringfn: + // Avoid introducing multiple layers of substring nodes. + { + _RopeSubstring* __old = (_RopeSubstring*)__base; + size_t __result_len; + if (__start >= __adj_endp1) return 0; + __result_len = __adj_endp1 - __start; + if (__result_len > __lazy_threshold) { + _RopeSubstring* __result = + _S_new_RopeSubstring(__old->_M_base, + __start + __old->_M_start, + __adj_endp1 - __start, + __base->get_allocator()); + return __result; + + } // *** else fall through: *** + } + case _RopeRep::_S_function: + { + _RopeFunction* __f = (_RopeFunction*)__base; + _CharT* __section; + size_t __result_len; + if (__start >= __adj_endp1) return 0; + __result_len = __adj_endp1 - __start; + + if (__result_len > __lazy_threshold) goto lazy; + __section = (_CharT*) + _Data_allocate(_S_rounded_up_size(__result_len)); + __STL_TRY { + (*(__f->_M_fn))(__start, __result_len, __section); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING( + __section, __result_len, __base->get_allocator())); + _S_cond_store_eos(__section[__result_len]); + return _S_new_RopeLeaf(__section, __result_len, + __base->get_allocator()); + } + } + /*NOTREACHED*/ + __stl_assert(false); + lazy: + { + // Create substring node. + return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start, + __base->get_allocator()); + } +} + +template +class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> { + private: + _CharT* _M_buf_ptr; + public: + + _Rope_flatten_char_consumer(_CharT* __buffer) { + _M_buf_ptr = __buffer; + }; + ~_Rope_flatten_char_consumer() {} + bool operator() (const _CharT* __leaf, size_t __n) { + uninitialized_copy_n(__leaf, __n, _M_buf_ptr); + _M_buf_ptr += __n; + return true; + } +}; + +template +class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> { + private: + _CharT _M_pattern; + public: + size_t _M_count; // Number of nonmatching characters + _Rope_find_char_char_consumer(_CharT __p) + : _M_pattern(__p), _M_count(0) {} + ~_Rope_find_char_char_consumer() {} + bool operator() (const _CharT* __leaf, size_t __n) { + size_t __i; + for (__i = 0; __i < __n; __i++) { + if (__leaf[__i] == _M_pattern) { + _M_count += __i; return false; + } + } + _M_count += __n; return true; + } +}; + + template + // Here _CharT is both the stream and rope character type. +class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> { + private: + typedef basic_ostream<_CharT,_Traits> _Insert_ostream; + _Insert_ostream& _M_o; + public: + _Rope_insert_char_consumer(_Insert_ostream& __writer) + : _M_o(__writer) {}; + ~_Rope_insert_char_consumer() { }; + // Caller is presumed to own the ostream + bool operator() (const _CharT* __leaf, size_t __n); + // Returns true to continue traversal. +}; + +template +bool _Rope_insert_char_consumer<_CharT, _Traits>::operator() + (const _CharT* __leaf, size_t __n) +{ + size_t __i; + // We assume that formatting is set up correctly for each element. + for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]); + return true; +} + +template +bool rope<_CharT, _Alloc>::_S_apply_to_pieces( + _Rope_char_consumer<_CharT>& __c, + const _RopeRep* __r, + size_t __begin, size_t __end) +{ + if (0 == __r) return true; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __conc = (_RopeConcatenation*)__r; + _RopeRep* __left = __conc->_M_left; + size_t __left_len = __left->_M_size; + if (__begin < __left_len) { + size_t __left_end = min(__left_len, __end); + if (!_S_apply_to_pieces(__c, __left, __begin, __left_end)) + return false; + } + if (__end > __left_len) { + _RopeRep* __right = __conc->_M_right; + size_t __right_start = max(__left_len, __begin); + if (!_S_apply_to_pieces(__c, __right, + __right_start - __left_len, + __end - __left_len)) { + return false; + } + } + } + return true; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return __c(__l->_M_data + __begin, __end - __begin); + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + _RopeFunction* __f = (_RopeFunction*)__r; + size_t __len = __end - __begin; + bool __result; + _CharT* __buffer = + (_CharT*)alloc::allocate(__len * sizeof(_CharT)); + __STL_TRY { + (*(__f->_M_fn))(__begin, __len, __buffer); + __result = __c(__buffer, __len); + alloc::deallocate(__buffer, __len * sizeof(_CharT)); + } + __STL_UNWIND((alloc::deallocate(__buffer, + __len * sizeof(_CharT)))) + return __result; + } + default: + __stl_assert(false); + /*NOTREACHED*/ + return false; + } +} + + template + inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n) +{ + char __f = __o.fill(); + size_t __i; + + for (__i = 0; __i < __n; __i++) __o.put(__f); +} + + +template inline bool _Rope_is_simple(_CharT*) { return false; } +inline bool _Rope_is_simple(char*) { return true; } +inline bool _Rope_is_simple(wchar_t*) { return true; } + +template +basic_ostream<_CharT, _Traits>& operator<< (basic_ostream<_CharT, _Traits>& __o, + const rope<_CharT, _Alloc>& __r) +{ + size_t __w = __o.width(); + bool __left = bool(__o.flags() & ios::left); + size_t __pad_len; + size_t __rope_len = __r.size(); + _Rope_insert_char_consumer<_CharT, _Traits> __c(__o); + bool __is_simple = _Rope_is_simple((_CharT*)0); + + if (__rope_len < __w) { + __pad_len = __w - __rope_len; + } else { + __pad_len = 0; + } + if (!__is_simple) __o.width(__w/__rope_len); + __STL_TRY { + if (__is_simple && !__left && __pad_len > 0) { + _Rope_fill(__o, __pad_len); + } + __r.apply_to_pieces(0, __r.size(), __c); + if (__is_simple && __left && __pad_len > 0) { + _Rope_fill(__o, __pad_len); + } + if (!__is_simple) + __o.width(__w); + } + __STL_UNWIND(if (!__is_simple) __o.width(__w)) + return __o; +} + +template +_CharT* +rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, + size_t __start, size_t __len, + _CharT* __buffer) +{ + _Rope_flatten_char_consumer<_CharT> __c(__buffer); + _S_apply_to_pieces(__c, __r, __start, __start + __len); + return(__buffer + __len); +} + +template +size_t +rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const +{ + _Rope_find_char_char_consumer<_CharT> __c(__pattern); + _S_apply_to_pieces(__c, _M_tree_ptr, __start, size()); + size_type __result_pos = __start + __c._M_count; +# ifndef __STL_OLD_ROPE_SEMANTICS + if (__result_pos == size()) __result_pos = npos; +# endif + return __result_pos; +} + +template +_CharT* +rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, _CharT* __buffer) +{ + if (0 == __r) return __buffer; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + _CharT* __rest = _S_flatten(__left, __buffer); + return _S_flatten(__right, __rest); + } + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return copy_n(__l->_M_data, __l->_M_size, __buffer).second; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + // We dont yet do anything with substring nodes. + // This needs to be fixed before ropefiles will work well. + { + _RopeFunction* __f = (_RopeFunction*)__r; + (*(__f->_M_fn))(0, __f->_M_size, __buffer); + return __buffer + __f->_M_size; + } + default: + __stl_assert(false); + /*NOTREACHED*/ + return 0; + } +} + + +// This needs work for _CharT != char +template +void +rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent) +{ + for (int __i = 0; __i < __indent; __i++) putchar(' '); + if (0 == __r) { + printf("NULL\n"); return; + } + if (_RopeRep::_S_concat == __r->_M_tag) { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + +# ifdef __GC + printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n", + __r, __r->_M_depth, __r->_M_size, __r->_M_is_balanced? "" : "not"); +# else + printf("Concatenation %p (rc = %ld, depth = %d, " + "len = %ld, %s balanced)\n", + __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size, + __r->_M_is_balanced? "" : "not"); +# endif + _S_dump(__left, __indent + 2); + _S_dump(__right, __indent + 2); + return; + } else { + char* __kind; + + switch (__r->_M_tag) { + case _RopeRep::_S_leaf: + __kind = "Leaf"; + break; + case _RopeRep::_S_function: + __kind = "Function"; + break; + case _RopeRep::_S_substringfn: + __kind = "Function representing substring"; + break; + default: + __kind = "(corrupted kind field!)"; + } +# ifdef __GC + printf("%s %p (depth = %d, len = %ld) ", + __kind, __r, __r->_M_depth, __r->_M_size); +# else + printf("%s %p (rc = %ld, depth = %d, len = %ld) ", + __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size); +# endif + if (_S_is_one_byte_char_type((_CharT*)0)) { + const int __max_len = 40; + _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len)); + _CharT __buffer[__max_len + 1]; + bool __too_big = __r->_M_size > __prefix->_M_size; + + _S_flatten(__prefix, __buffer); + __buffer[__prefix->_M_size] = _S_eos((_CharT*)0); + printf("%s%s\n", + (char*)__buffer, __too_big? "...\n" : "\n"); + } else { + printf("\n"); + } + } +} + +template +const unsigned long +rope<_CharT,_Alloc>::_S_min_len[ + _Rope_RopeRep<_CharT,_Alloc>::_S_max_rope_depth + 1] = { +/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, +/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, +/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, +/* 18 */6765, /* 19 */10946, /* 20 */17711, /* 21 */28657, /* 22 */46368, +/* 23 */75025, /* 24 */121393, /* 25 */196418, /* 26 */317811, +/* 27 */514229, /* 28 */832040, /* 29 */1346269, /* 30 */2178309, +/* 31 */3524578, /* 32 */5702887, /* 33 */9227465, /* 34 */14930352, +/* 35 */24157817, /* 36 */39088169, /* 37 */63245986, /* 38 */102334155, +/* 39 */165580141, /* 40 */267914296, /* 41 */433494437, +/* 42 */701408733, /* 43 */1134903170, /* 44 */1836311903, +/* 45 */2971215073u }; +// These are Fibonacci numbers < 2**32. + +template +rope<_CharT,_Alloc>::_RopeRep* +rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) +{ + _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1]; + _RopeRep* __result = 0; + int __i; + // Invariant: + // The concatenation of forest in descending order is equal to __r. + // __forest[__i]._M_size >= _S_min_len[__i] + // __forest[__i]._M_depth = __i + // References from forest are included in refcount. + + for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) + __forest[__i] = 0; + __STL_TRY { + _S_add_to_forest(__r, __forest); + for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__result); +# endif + __result = _S_concat(__forest[__i], __result); + __forest[__i]->_M_unref_nonnil(); +# if !defined(__GC) && defined(__STL_USE_EXCEPTIONS) + __forest[__i] = 0; +# endif + } + } + __STL_UNWIND(for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++) + _S_unref(__forest[__i])) + if (__result->_M_depth > _RopeRep::_S_max_rope_depth) { +# ifdef __STL_USE_EXCEPTIONS + __STL_THROW(length_error("rope too long")); +# else + abort(); +# endif + } + return(__result); +} + + +template +void +rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest) +{ + if (__r->_M_is_balanced) { + _S_add_leaf_to_forest(__r, __forest); + return; + } + __stl_assert(__r->_M_tag == _RopeRep::_S_concat); + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + + _S_add_to_forest(__c->_M_left, __forest); + _S_add_to_forest(__c->_M_right, __forest); + } +} + + +template +void +rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest) +{ + _RopeRep* __insertee; // included in refcount + _RopeRep* __too_tiny = 0; // included in refcount + int __i; // forest[0..__i-1] is empty + size_t __s = __r->_M_size; + + for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) { + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__too_tiny); +# endif + __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny); + __forest[__i]->_M_unref_nonnil(); + __forest[__i] = 0; + } + } + { +# ifndef __GC + _Self_destruct_ptr __old(__too_tiny); +# endif + __insertee = _S_concat_and_set_balanced(__too_tiny, __r); + } + // Too_tiny dead, and no longer included in refcount. + // Insertee is live and included. + __stl_assert(_S_is_almost_balanced(__insertee)); + __stl_assert(__insertee->_M_depth <= __r->_M_depth + 1); + for (;; ++__i) { + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__insertee); +# endif + __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee); + __forest[__i]->_M_unref_nonnil(); + __forest[__i] = 0; + __stl_assert(_S_is_almost_balanced(__insertee)); + } + __stl_assert(_S_min_len[__i] <= __insertee->_M_size); + __stl_assert(__forest[__i] == 0); + if (__i == _RopeRep::_S_max_rope_depth || + __insertee->_M_size < _S_min_len[__i+1]) { + __forest[__i] = __insertee; + // refcount is OK since __insertee is now dead. + return; + } + } +} + +template +_CharT +rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i) +{ + __GC_CONST _CharT* __cstr = __r->_M_c_string; + + __stl_assert(__i < __r->_M_size); + if (0 != __cstr) return __cstr[__i]; + for(;;) { + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size; + + if (__i >= __left_len) { + __i -= __left_len; + __r = __c->_M_right; + } else { + __r = __left; + } + } + break; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return __l->_M_data[__i]; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + _RopeFunction* __f = (_RopeFunction*)__r; + _CharT __result; + + (*(__f->_M_fn))(__i, 1, &__result); + return __result; + } + } + } +} + +# ifndef __GC +// Return a uniquely referenced character slot for the given +// position, or 0 if that's not possible. +template +_CharT* +rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) +{ + _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth]; + size_t __csptr = 0; + + for(;;) { + if (__r->_M_ref_count > 1) return 0; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size; + + if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c; + if (__i >= __left_len) { + __i -= __left_len; + __r = __c->_M_right; + } else { + __r = __left; + } + } + break; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) + __clrstack[__csptr++] = __l; + while (__csptr > 0) { + -- __csptr; + _RopeRep* __d = __clrstack[__csptr]; + __d->_M_free_c_string(); + __d->_M_c_string = 0; + } + return __l->_M_data + __i; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + return 0; + } + } +} +# endif /* __GC */ + +// The following could be implemented trivially using +// lexicographical_compare_3way. +// We do a little more work to avoid dealing with rope iterators for +// flat strings. +template +int +rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left, + const _RopeRep* __right) +{ + size_t __left_len; + size_t __right_len; + + if (0 == __right) return 0 != __left; + if (0 == __left) return -1; + __left_len = __left->_M_size; + __right_len = __right->_M_size; + if (_RopeRep::_S_leaf == __left->_M_tag) { + _RopeLeaf* __l = (_RopeLeaf*) __left; + if (_RopeRep::_S_leaf == __right->_M_tag) { + _RopeLeaf* __r = (_RopeLeaf*) __right; + return lexicographical_compare_3way( + __l->_M_data, __l->_M_data + __left_len, + __r->_M_data, __r->_M_data + __right_len); + } else { + const_iterator __rstart(__right, 0); + const_iterator __rend(__right, __right_len); + return lexicographical_compare_3way( + __l->_M_data, __l->_M_data + __left_len, + __rstart, __rend); + } + } else { + const_iterator __lstart(__left, 0); + const_iterator __lend(__left, __left_len); + if (_RopeRep::_S_leaf == __right->_M_tag) { + _RopeLeaf* __r = (_RopeLeaf*) __right; + return lexicographical_compare_3way( + __lstart, __lend, + __r->_M_data, __r->_M_data + __right_len); + } else { + const_iterator __rstart(__right, 0); + const_iterator __rend(__right, __right_len); + return lexicographical_compare_3way( + __lstart, __lend, + __rstart, __rend); + } + } +} + +// Assignment to reference proxies. +template +_Rope_char_ref_proxy<_CharT, _Alloc>& +_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) { + _RopeRep* __old = _M_root->_M_tree_ptr; +# ifndef __GC + // First check for the case in which everything is uniquely + // referenced. In that case we can do this destructively. + _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos); + if (0 != __ptr) { + *__ptr = __c; + return *this; + } +# endif + _Self_destruct_ptr __left( + _My_rope::_S_substring(__old, 0, _M_pos)); + _Self_destruct_ptr __right( + _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size)); + _Self_destruct_ptr __result_left( + _My_rope::_S_destr_concat_char_iter(__left, &__c, 1)); + +# ifndef __GC + __stl_assert(__left == __result_left || 1 == __result_left->_M_ref_count); +# endif + _RopeRep* __result = + _My_rope::_S_concat(__result_left, __right); +# ifndef __GC + __stl_assert(1 <= __result->_M_ref_count); + _RopeRep::_S_unref(__old); +# endif + _M_root->_M_tree_ptr = __result; + return *this; +} + +template +inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const +{ + if (_M_current_valid) { + return _M_current; + } else { + return _My_rope::_S_fetch(_M_root->_M_tree_ptr, _M_pos); + } +} +template +_Rope_char_ptr_proxy<_CharT, _Alloc> +_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const { + return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this); +} + +template +rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c, + const allocator_type& __a) +: _Base(__a) +{ + rope<_CharT,_Alloc> __result; + const size_t __exponentiate_threshold = 32; + size_t __exponent; + size_t __rest; + _CharT* __rest_buffer; + _RopeRep* __remainder; + rope<_CharT,_Alloc> __remainder_rope; + + if (0 == __n) + return; + + __exponent = __n / __exponentiate_threshold; + __rest = __n % __exponentiate_threshold; + if (0 == __rest) { + __remainder = 0; + } else { + __rest_buffer = _Data_allocate(_S_rounded_up_size(__rest)); + uninitialized_fill_n(__rest_buffer, __rest, __c); + _S_cond_store_eos(__rest_buffer[__rest]); + __STL_TRY { + __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__rest_buffer, __rest, __a)) + } + __remainder_rope._M_tree_ptr = __remainder; + if (__exponent != 0) { + _CharT* __base_buffer = + _Data_allocate(_S_rounded_up_size(__exponentiate_threshold)); + _RopeLeaf* __base_leaf; + rope __base_rope; + uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c); + _S_cond_store_eos(__base_buffer[__exponentiate_threshold]); + __STL_TRY { + __base_leaf = _S_new_RopeLeaf(__base_buffer, + __exponentiate_threshold, __a); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__base_buffer, + __exponentiate_threshold, __a)) + __base_rope._M_tree_ptr = __base_leaf; + if (1 == __exponent) { + __result = __base_rope; +# ifndef __GC + __stl_assert(2 == __result._M_tree_ptr->_M_ref_count); + // One each for base_rope and __result +# endif + } else { + __result = power(__base_rope, __exponent, + _Rope_Concat_fn<_CharT,_Alloc>()); + } + if (0 != __remainder) { + __result += __remainder_rope; + } + } else { + __result = __remainder_rope; + } + _M_tree_ptr = __result._M_tree_ptr; + _M_tree_ptr->_M_ref_nonnil(); +} + +template + _CharT rope<_CharT,_Alloc>::_S_empty_c_str[1]; + +template +const _CharT* rope<_CharT,_Alloc>::c_str() const { + if (0 == _M_tree_ptr) { + _S_empty_c_str[0] = _S_eos((_CharT*)0); // Possibly redundant, + // but probably fast. + return _S_empty_c_str; + } + __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string; + if (0 != __old_c_string) return(__old_c_string); + size_t __s = size(); + _CharT* __result = _Data_allocate(__s + 1); + _S_flatten(_M_tree_ptr, __result); + __result[__s] = _S_eos((_CharT*)0); +# ifdef __GC + _M_tree_ptr->_M_c_string = __result; +# else + if ((__old_c_string = (__GC_CONST _CharT*) + _Atomic_swap((unsigned long *)(&(_M_tree_ptr->_M_c_string)), + (unsigned long)__result)) != 0) { + // It must have been added in the interim. Hence it had to have been + // separately allocated. Deallocate the old copy, since we just + // replaced it. + destroy(__old_c_string, __old_c_string + __s + 1); + _Data_deallocate(__old_c_string, __s + 1); + } +# endif + return(__result); +} + +template +const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() { + if (0 == _M_tree_ptr) { + _S_empty_c_str[0] = _S_eos((_CharT*)0); + return _S_empty_c_str; + } + __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string; + if (_RopeRep::_S_leaf == _M_tree_ptr->_M_tag && 0 != __old_c_string) { + return(__old_c_string); + } + size_t __s = size(); + _CharT* __result = _Data_allocate(_S_rounded_up_size(__s)); + _S_flatten(_M_tree_ptr, __result); + __result[__s] = _S_eos((_CharT*)0); + _M_tree_ptr->_M_unref_nonnil(); + _M_tree_ptr = _S_new_RopeLeaf(__result, __s, get_allocator()); + return(__result); +} + +// Algorithm specializations. More should be added. + +template // was templated on CharT and Alloc +void // VC++ workaround +_Rope_rotate(_Rope_iterator __first, + _Rope_iterator __middle, + _Rope_iterator __last) +{ + typedef typename _Rope_iterator::value_type _CharT; + typedef typename _Rope_iterator::_allocator_type _Alloc; + + __stl_assert(__first.container() == __middle.container() + && __middle.container() == __last.container()); + rope<_CharT,_Alloc>& __r(__first.container()); + rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index()); + rope<_CharT,_Alloc> __suffix = + __r.substr(__last.index(), __r.size() - __last.index()); + rope<_CharT,_Alloc> __part1 = + __r.substr(__middle.index(), __last.index() - __middle.index()); + rope<_CharT,_Alloc> __part2 = + __r.substr(__first.index(), __middle.index() - __first.index()); + __r = __prefix; + __r += __part1; + __r += __part2; + __r += __suffix; +} + +#if !defined(__GNUC__) +// Appears to confuse g++ +inline void rotate(_Rope_iterator __first, + _Rope_iterator __middle, + _Rope_iterator __last) { + _Rope_rotate(__first, __middle, __last); +} +#endif + +# if 0 +// Probably not useful for several reasons: +// - for SGIs 7.1 compiler and probably some others, +// this forces lots of rope instantiations, creating a +// code bloat and compile time problem. (Fixed in 7.2.) +// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive +// for unicode strings. Unsigned short may be a better character +// type. +inline void rotate( + _Rope_iterator __first, + _Rope_iterator __middle, + _Rope_iterator __last) { + _Rope_rotate(__first, __middle, __last); +} +# endif + +} // namespace std + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/slist b/contrib/media/updf/include/ext/slist new file mode 100644 index 0000000000..5dc3fd141d --- /dev/null +++ b/contrib/media/updf/include/ext/slist @@ -0,0 +1,903 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_SLIST_H +#define __SGI_STL_INTERNAL_SLIST_H + +#include +#include +#include +#include +#include + +namespace std +{ + +struct _Slist_node_base +{ + _Slist_node_base* _M_next; +}; + +inline _Slist_node_base* +__slist_make_link(_Slist_node_base* __prev_node, + _Slist_node_base* __new_node) +{ + __new_node->_M_next = __prev_node->_M_next; + __prev_node->_M_next = __new_node; + return __new_node; +} + +inline _Slist_node_base* +__slist_previous(_Slist_node_base* __head, + const _Slist_node_base* __node) +{ + while (__head && __head->_M_next != __node) + __head = __head->_M_next; + return __head; +} + +inline const _Slist_node_base* +__slist_previous(const _Slist_node_base* __head, + const _Slist_node_base* __node) +{ + while (__head && __head->_M_next != __node) + __head = __head->_M_next; + return __head; +} + +inline void __slist_splice_after(_Slist_node_base* __pos, + _Slist_node_base* __before_first, + _Slist_node_base* __before_last) +{ + if (__pos != __before_first && __pos != __before_last) { + _Slist_node_base* __first = __before_first->_M_next; + _Slist_node_base* __after = __pos->_M_next; + __before_first->_M_next = __before_last->_M_next; + __pos->_M_next = __first; + __before_last->_M_next = __after; + } +} + +inline void +__slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __head) +{ + _Slist_node_base* __before_last = __slist_previous(__head, 0); + if (__before_last != __head) { + _Slist_node_base* __after = __pos->_M_next; + __pos->_M_next = __head->_M_next; + __head->_M_next = 0; + __before_last->_M_next = __after; + } +} + +inline _Slist_node_base* __slist_reverse(_Slist_node_base* __node) +{ + _Slist_node_base* __result = __node; + __node = __node->_M_next; + __result->_M_next = 0; + while(__node) { + _Slist_node_base* __next = __node->_M_next; + __node->_M_next = __result; + __result = __node; + __node = __next; + } + return __result; +} + +inline size_t __slist_size(_Slist_node_base* __node) +{ + size_t __result = 0; + for ( ; __node != 0; __node = __node->_M_next) + ++__result; + return __result; +} + +template +struct _Slist_node : public _Slist_node_base +{ + _Tp _M_data; +}; + +struct _Slist_iterator_base +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef forward_iterator_tag iterator_category; + + _Slist_node_base* _M_node; + + _Slist_iterator_base(_Slist_node_base* __x) : _M_node(__x) {} + void _M_incr() { _M_node = _M_node->_M_next; } + + bool operator==(const _Slist_iterator_base& __x) const { + return _M_node == __x._M_node; + } + bool operator!=(const _Slist_iterator_base& __x) const { + return _M_node != __x._M_node; + } +}; + +template +struct _Slist_iterator : public _Slist_iterator_base +{ + typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + typedef _Slist_iterator<_Tp, _Ref, _Ptr> _Self; + + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef _Slist_node<_Tp> _Node; + + _Slist_iterator(_Node* __x) : _Slist_iterator_base(__x) {} + _Slist_iterator() : _Slist_iterator_base(0) {} + _Slist_iterator(const iterator& __x) : _Slist_iterator_base(__x._M_node) {} + + reference operator*() const { return ((_Node*) _M_node)->_M_data; } + pointer operator->() const { return &(operator*()); } + + _Self& operator++() + { + _M_incr(); + return *this; + } + _Self operator++(int) + { + _Self __tmp = *this; + _M_incr(); + return __tmp; + } +}; + + +// Base class that encapsulates details of allocators. Three cases: +// an ordinary standard-conforming allocator, a standard-conforming +// allocator with no non-static data, and an SGI-style allocator. +// This complexity is necessary only because we're worrying about backward +// compatibility and because we want to avoid wasting storage on an +// allocator instance if it isn't necessary. + +// Base for general standard-conforming allocators. +template +class _Slist_alloc_base { +public: + typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_node_allocator; } + + _Slist_alloc_base(const allocator_type& __a) : _M_node_allocator(__a) {} + +protected: + _Slist_node<_Tp>* _M_get_node() + { return _M_node_allocator.allocate(1); } + void _M_put_node(_Slist_node<_Tp>* __p) + { _M_node_allocator.deallocate(__p, 1); } + +protected: + typename _Alloc_traits<_Slist_node<_Tp>,_Allocator>::allocator_type + _M_node_allocator; + _Slist_node_base _M_head; +}; + +// Specialization for instanceless allocators. +template +class _Slist_alloc_base<_Tp,_Allocator, true> { +public: + typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Slist_alloc_base(const allocator_type&) {} + +protected: + typedef typename _Alloc_traits<_Slist_node<_Tp>, _Allocator>::_Alloc_type + _Alloc_type; + _Slist_node<_Tp>* _M_get_node() { return _Alloc_type::allocate(1); } + void _M_put_node(_Slist_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); } + +protected: + _Slist_node_base _M_head; +}; + + +template +struct _Slist_base + : public _Slist_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> +{ + typedef _Slist_alloc_base<_Tp, _Alloc, + _Alloc_traits<_Tp, _Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + + _Slist_base(const allocator_type& __a) + : _Base(__a) { this->_M_head._M_next = 0; } + ~_Slist_base() { _M_erase_after(&this->_M_head, 0); } + +protected: + + _Slist_node_base* _M_erase_after(_Slist_node_base* __pos) + { + _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next); + _Slist_node_base* __next_next = __next->_M_next; + __pos->_M_next = __next_next; + destroy(&__next->_M_data); + _M_put_node(__next); + return __next_next; + } + _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*); +}; + +template +_Slist_node_base* +_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, + _Slist_node_base* __last_node) { + _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next); + while (__cur != __last_node) { + _Slist_node<_Tp>* __tmp = __cur; + __cur = (_Slist_node<_Tp>*) __cur->_M_next; + destroy(&__tmp->_M_data); + _M_put_node(__tmp); + } + __before_first->_M_next = __last_node; + return __last_node; +} + +template > +class slist : private _Slist_base<_Tp,_Alloc> +{ + // concept requirements + __glibcpp_class_requires(_Tp, _SGIAssignableConcept); + +private: + typedef _Slist_base<_Tp,_Alloc> _Base; +public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + + typedef typename _Base::allocator_type allocator_type; + allocator_type get_allocator() const { return _Base::get_allocator(); } + +private: + typedef _Slist_node<_Tp> _Node; + typedef _Slist_node_base _Node_base; + typedef _Slist_iterator_base _Iterator_base; + + _Node* _M_create_node(const value_type& __x) { + _Node* __node = this->_M_get_node(); + __STL_TRY { + construct(&__node->_M_data, __x); + __node->_M_next = 0; + } + __STL_UNWIND(this->_M_put_node(__node)); + return __node; + } + + _Node* _M_create_node() { + _Node* __node = this->_M_get_node(); + __STL_TRY { + construct(&__node->_M_data); + __node->_M_next = 0; + } + __STL_UNWIND(this->_M_put_node(__node)); + return __node; + } + +public: + explicit slist(const allocator_type& __a = allocator_type()) : _Base(__a) {} + + slist(size_type __n, const value_type& __x, + const allocator_type& __a = allocator_type()) : _Base(__a) + { _M_insert_after_fill(&this->_M_head, __n, __x); } + + explicit slist(size_type __n) : _Base(allocator_type()) + { _M_insert_after_fill(&this->_M_head, __n, value_type()); } + + // We don't need any dispatching tricks here, because _M_insert_after_range + // already does them. + template + slist(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) : _Base(__a) + { _M_insert_after_range(&this->_M_head, __first, __last); } + + slist(const slist& __x) : _Base(__x.get_allocator()) + { _M_insert_after_range(&this->_M_head, __x.begin(), __x.end()); } + + slist& operator= (const slist& __x); + + ~slist() {} + +public: + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void assign(size_type __n, const _Tp& __val) + { _M_fill_assign(__n, __val); } + + void _M_fill_assign(size_type __n, const _Tp& __val); + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_type) __n, (_Tp) __val); } + + template + void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + +public: + + iterator begin() { return iterator((_Node*)this->_M_head._M_next); } + const_iterator begin() const + { return const_iterator((_Node*)this->_M_head._M_next);} + + iterator end() { return iterator(0); } + const_iterator end() const { return const_iterator(0); } + + // Experimental new feature: before_begin() returns a + // non-dereferenceable iterator that, when incremented, yields + // begin(). This iterator may be used as the argument to + // insert_after, erase_after, etc. Note that even for an empty + // slist, before_begin() is not the same iterator as end(). It + // is always necessary to increment before_begin() at least once to + // obtain end(). + iterator before_begin() { return iterator((_Node*) &this->_M_head); } + const_iterator before_begin() const + { return const_iterator((_Node*) &this->_M_head); } + + size_type size() const { return __slist_size(this->_M_head._M_next); } + + size_type max_size() const { return size_type(-1); } + + bool empty() const { return this->_M_head._M_next == 0; } + + void swap(slist& __x) + { std::swap(this->_M_head._M_next, __x._M_head._M_next); } + +public: + + reference front() { return ((_Node*) this->_M_head._M_next)->_M_data; } + const_reference front() const + { return ((_Node*) this->_M_head._M_next)->_M_data; } + void push_front(const value_type& __x) { + __slist_make_link(&this->_M_head, _M_create_node(__x)); + } + void push_front() { __slist_make_link(&this->_M_head, _M_create_node()); } + void pop_front() { + _Node* __node = (_Node*) this->_M_head._M_next; + this->_M_head._M_next = __node->_M_next; + destroy(&__node->_M_data); + this->_M_put_node(__node); + } + + iterator previous(const_iterator __pos) { + return iterator((_Node*) __slist_previous(&this->_M_head, __pos._M_node)); + } + const_iterator previous(const_iterator __pos) const { + return const_iterator((_Node*) __slist_previous(&this->_M_head, + __pos._M_node)); + } + +private: + _Node* _M_insert_after(_Node_base* __pos, const value_type& __x) { + return (_Node*) (__slist_make_link(__pos, _M_create_node(__x))); + } + + _Node* _M_insert_after(_Node_base* __pos) { + return (_Node*) (__slist_make_link(__pos, _M_create_node())); + } + + void _M_insert_after_fill(_Node_base* __pos, + size_type __n, const value_type& __x) { + for (size_type __i = 0; __i < __n; ++__i) + __pos = __slist_make_link(__pos, _M_create_node(__x)); + } + + // Check whether it's an integral type. If so, it's not an iterator. + template + void _M_insert_after_range(_Node_base* __pos, + _InIter __first, _InIter __last) { + typedef typename _Is_integer<_InIter>::_Integral _Integral; + _M_insert_after_range(__pos, __first, __last, _Integral()); + } + + template + void _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x, + __true_type) { + _M_insert_after_fill(__pos, __n, __x); + } + + template + void _M_insert_after_range(_Node_base* __pos, + _InIter __first, _InIter __last, + __false_type) { + while (__first != __last) { + __pos = __slist_make_link(__pos, _M_create_node(*__first)); + ++__first; + } + } + +public: + + iterator insert_after(iterator __pos, const value_type& __x) { + return iterator(_M_insert_after(__pos._M_node, __x)); + } + + iterator insert_after(iterator __pos) { + return insert_after(__pos, value_type()); + } + + void insert_after(iterator __pos, size_type __n, const value_type& __x) { + _M_insert_after_fill(__pos._M_node, __n, __x); + } + + // We don't need any dispatching tricks here, because _M_insert_after_range + // already does them. + template + void insert_after(iterator __pos, _InIter __first, _InIter __last) { + _M_insert_after_range(__pos._M_node, __first, __last); + } + + iterator insert(iterator __pos, const value_type& __x) { + return iterator(_M_insert_after(__slist_previous(&this->_M_head, + __pos._M_node), + __x)); + } + + iterator insert(iterator __pos) { + return iterator(_M_insert_after(__slist_previous(&this->_M_head, + __pos._M_node), + value_type())); + } + + void insert(iterator __pos, size_type __n, const value_type& __x) { + _M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node), + __n, __x); + } + + // We don't need any dispatching tricks here, because _M_insert_after_range + // already does them. + template + void insert(iterator __pos, _InIter __first, _InIter __last) { + _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node), + __first, __last); + } + +public: + iterator erase_after(iterator __pos) { + return iterator((_Node*) this->_M_erase_after(__pos._M_node)); + } + iterator erase_after(iterator __before_first, iterator __last) { + return iterator((_Node*) this->_M_erase_after(__before_first._M_node, + __last._M_node)); + } + + iterator erase(iterator __pos) { + return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head, + __pos._M_node)); + } + iterator erase(iterator __first, iterator __last) { + return (_Node*) this->_M_erase_after( + __slist_previous(&this->_M_head, __first._M_node), __last._M_node); + } + + void resize(size_type new_size, const _Tp& __x); + void resize(size_type new_size) { resize(new_size, _Tp()); } + void clear() { this->_M_erase_after(&this->_M_head, 0); } + +public: + // Moves the range [__before_first + 1, __before_last + 1) to *this, + // inserting it immediately after __pos. This is constant time. + void splice_after(iterator __pos, + iterator __before_first, iterator __before_last) + { + if (__before_first != __before_last) + __slist_splice_after(__pos._M_node, __before_first._M_node, + __before_last._M_node); + } + + // Moves the element that follows __prev to *this, inserting it immediately + // after __pos. This is constant time. + void splice_after(iterator __pos, iterator __prev) + { + __slist_splice_after(__pos._M_node, + __prev._M_node, __prev._M_node->_M_next); + } + + + // Removes all of the elements from the list __x to *this, inserting + // them immediately after __pos. __x must not be *this. Complexity: + // linear in __x.size(). + void splice_after(iterator __pos, slist& __x) + { + __slist_splice_after(__pos._M_node, &__x._M_head); + } + + // Linear in distance(begin(), __pos), and linear in __x.size(). + void splice(iterator __pos, slist& __x) { + if (__x._M_head._M_next) + __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), + &__x._M_head, __slist_previous(&__x._M_head, 0)); + } + + // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i). + void splice(iterator __pos, slist& __x, iterator __i) { + __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), + __slist_previous(&__x._M_head, __i._M_node), + __i._M_node); + } + + // Linear in distance(begin(), __pos), in distance(__x.begin(), __first), + // and in distance(__first, __last). + void splice(iterator __pos, slist& __x, iterator __first, iterator __last) + { + if (__first != __last) + __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), + __slist_previous(&__x._M_head, __first._M_node), + __slist_previous(__first._M_node, __last._M_node)); + } + +public: + void reverse() { + if (this->_M_head._M_next) + this->_M_head._M_next = __slist_reverse(this->_M_head._M_next); + } + + void remove(const _Tp& __val); + void unique(); + void merge(slist& __x); + void sort(); + + template + void remove_if(_Predicate __pred); + + template + void unique(_BinaryPredicate __pred); + + template + void merge(slist&, _StrictWeakOrdering); + + template + void sort(_StrictWeakOrdering __comp); +}; + +template +slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x) +{ + if (&__x != this) { + _Node_base* __p1 = &this->_M_head; + _Node* __n1 = (_Node*) this->_M_head._M_next; + const _Node* __n2 = (const _Node*) __x._M_head._M_next; + while (__n1 && __n2) { + __n1->_M_data = __n2->_M_data; + __p1 = __n1; + __n1 = (_Node*) __n1->_M_next; + __n2 = (const _Node*) __n2->_M_next; + } + if (__n2 == 0) + this->_M_erase_after(__p1, 0); + else + _M_insert_after_range(__p1, const_iterator((_Node*)__n2), + const_iterator(0)); + } + return *this; +} + +template +void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { + _Node_base* __prev = &this->_M_head; + _Node* __node = (_Node*) this->_M_head._M_next; + for ( ; __node != 0 && __n > 0 ; --__n) { + __node->_M_data = __val; + __prev = __node; + __node = (_Node*) __node->_M_next; + } + if (__n > 0) + _M_insert_after_fill(__prev, __n, __val); + else + this->_M_erase_after(__prev, 0); +} + +template template +void +slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last, + __false_type) +{ + _Node_base* __prev = &this->_M_head; + _Node* __node = (_Node*) this->_M_head._M_next; + while (__node != 0 && __first != __last) { + __node->_M_data = *__first; + __prev = __node; + __node = (_Node*) __node->_M_next; + ++__first; + } + if (__first != __last) + _M_insert_after_range(__prev, __first, __last); + else + this->_M_erase_after(__prev, 0); +} + +template +inline bool +operator==(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) +{ + typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator; + const_iterator __end1 = _SL1.end(); + const_iterator __end2 = _SL2.end(); + + const_iterator __i1 = _SL1.begin(); + const_iterator __i2 = _SL2.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; +} + + +template +inline bool +operator<(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) +{ + return lexicographical_compare(_SL1.begin(), _SL1.end(), + _SL2.begin(), _SL2.end()); +} + +template +inline bool +operator!=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) { + return !(_SL1 == _SL2); +} + +template +inline bool +operator>(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) { + return _SL2 < _SL1; +} + +template +inline bool +operator<=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) { + return !(_SL2 < _SL1); +} + +template +inline bool +operator>=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) { + return !(_SL1 < _SL2); +} + +template +inline void swap(slist<_Tp,_Alloc>& __x, slist<_Tp,_Alloc>& __y) { + __x.swap(__y); +} + + +template +void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x) +{ + _Node_base* __cur = &this->_M_head; + while (__cur->_M_next != 0 && __len > 0) { + --__len; + __cur = __cur->_M_next; + } + if (__cur->_M_next) + this->_M_erase_after(__cur, 0); + else + _M_insert_after_fill(__cur, __len, __x); +} + +template +void slist<_Tp,_Alloc>::remove(const _Tp& __val) +{ + _Node_base* __cur = &this->_M_head; + while (__cur && __cur->_M_next) { + if (((_Node*) __cur->_M_next)->_M_data == __val) + this->_M_erase_after(__cur); + else + __cur = __cur->_M_next; + } +} + +template +void slist<_Tp,_Alloc>::unique() +{ + _Node_base* __cur = this->_M_head._M_next; + if (__cur) { + while (__cur->_M_next) { + if (((_Node*)__cur)->_M_data == + ((_Node*)(__cur->_M_next))->_M_data) + this->_M_erase_after(__cur); + else + __cur = __cur->_M_next; + } + } +} + +template +void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x) +{ + _Node_base* __n1 = &this->_M_head; + while (__n1->_M_next && __x._M_head._M_next) { + if (((_Node*) __x._M_head._M_next)->_M_data < + ((_Node*) __n1->_M_next)->_M_data) + __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next); + __n1 = __n1->_M_next; + } + if (__x._M_head._M_next) { + __n1->_M_next = __x._M_head._M_next; + __x._M_head._M_next = 0; + } +} + +template +void slist<_Tp,_Alloc>::sort() +{ + if (this->_M_head._M_next && this->_M_head._M_next->_M_next) { + slist __carry; + slist __counter[64]; + int __fill = 0; + while (!empty()) { + __slist_splice_after(&__carry._M_head, + &this->_M_head, this->_M_head._M_next); + int __i = 0; + while (__i < __fill && !__counter[__i].empty()) { + __counter[__i].merge(__carry); + __carry.swap(__counter[__i]); + ++__i; + } + __carry.swap(__counter[__i]); + if (__i == __fill) + ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + __counter[__i].merge(__counter[__i-1]); + this->swap(__counter[__fill-1]); + } +} + +template +template +void slist<_Tp,_Alloc>::remove_if(_Predicate __pred) +{ + _Node_base* __cur = &this->_M_head; + while (__cur->_M_next) { + if (__pred(((_Node*) __cur->_M_next)->_M_data)) + this->_M_erase_after(__cur); + else + __cur = __cur->_M_next; + } +} + +template template +void slist<_Tp,_Alloc>::unique(_BinaryPredicate __pred) +{ + _Node* __cur = (_Node*) this->_M_head._M_next; + if (__cur) { + while (__cur->_M_next) { + if (__pred(((_Node*)__cur)->_M_data, + ((_Node*)(__cur->_M_next))->_M_data)) + this->_M_erase_after(__cur); + else + __cur = (_Node*) __cur->_M_next; + } + } +} + +template template +void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x, + _StrictWeakOrdering __comp) +{ + _Node_base* __n1 = &this->_M_head; + while (__n1->_M_next && __x._M_head._M_next) { + if (__comp(((_Node*) __x._M_head._M_next)->_M_data, + ((_Node*) __n1->_M_next)->_M_data)) + __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next); + __n1 = __n1->_M_next; + } + if (__x._M_head._M_next) { + __n1->_M_next = __x._M_head._M_next; + __x._M_head._M_next = 0; + } +} + +template template +void slist<_Tp,_Alloc>::sort(_StrictWeakOrdering __comp) +{ + if (this->_M_head._M_next && this->_M_head._M_next->_M_next) { + slist __carry; + slist __counter[64]; + int __fill = 0; + while (!empty()) { + __slist_splice_after(&__carry._M_head, + &this->_M_head, this->_M_head._M_next); + int __i = 0; + while (__i < __fill && !__counter[__i].empty()) { + __counter[__i].merge(__carry, __comp); + __carry.swap(__counter[__i]); + ++__i; + } + __carry.swap(__counter[__i]); + if (__i == __fill) + ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + __counter[__i].merge(__counter[__i-1], __comp); + this->swap(__counter[__fill-1]); + } +} + +// Specialization of insert_iterator so that insertions will be constant +// time rather than linear time. + +template +class insert_iterator > { +protected: + typedef slist<_Tp, _Alloc> _Container; + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x) { + if (__i == __x.begin()) + iter = __x.before_begin(); + else + iter = __x.previous(__i); + } + + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __value) { + iter = container->insert_after(iter, __value); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_SLIST_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/stl_bvector.h b/contrib/media/updf/include/ext/stl_bvector.h new file mode 100644 index 0000000000..9078701289 --- /dev/null +++ b/contrib/media/updf/include/ext/stl_bvector.h @@ -0,0 +1,896 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_BVECTOR_H +#define __SGI_STL_INTERNAL_BVECTOR_H + +__STL_BEGIN_NAMESPACE + +static const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int)); + +#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) +#pragma set woff 1174 +#pragma set woff 1375 +#endif + +struct _Bit_reference { + unsigned int* _M_p; + unsigned int _M_mask; + _Bit_reference(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_mask(__y) {} + +public: + _Bit_reference() : _M_p(0), _M_mask(0) {} + operator bool() const { return !(!(*_M_p & _M_mask)); } + _Bit_reference& operator=(bool __x) + { + if (__x) *_M_p |= _M_mask; + else *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool operator<(const _Bit_reference& __x) const { + return !bool(*this) && bool(__x); + } + void flip() { *_M_p ^= _M_mask; } +}; + +inline void swap(_Bit_reference __x, _Bit_reference __y) +{ + bool __tmp = __x; + __x = __y; + __y = __tmp; +} + +struct _Bit_iterator_base : public random_access_iterator +{ + unsigned int* _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) {} + + void _M_bump_up() { + if (_M_offset++ == __WORD_BIT - 1) { + _M_offset = 0; + ++_M_p; + } + } + void _M_bump_down() { + if (_M_offset-- == 0) { + _M_offset = __WORD_BIT - 1; + --_M_p; + } + } + + void _M_incr(ptrdiff_t __i) { + difference_type __n = __i + _M_offset; + _M_p += __n / __WORD_BIT; + __n = __n % __WORD_BIT; + if (__n < 0) { + _M_offset = (unsigned int) __n + __WORD_BIT; + --_M_p; + } else + _M_offset = (unsigned int) __n; + } + + bool operator==(const _Bit_iterator_base& __i) const { + return _M_p == __i._M_p && _M_offset == __i._M_offset; + } + bool operator<(const _Bit_iterator_base& __i) const { + return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool operator!=(const _Bit_iterator_base& __i) const { + return !(*this == __i); + } + bool operator>(const _Bit_iterator_base& __i) const { + return __i < *this; + } + bool operator<=(const _Bit_iterator_base& __i) const { + return !(__i < *this); + } + bool operator>=(const _Bit_iterator_base& __i) const { + return !(*this < __i); + } +}; + +inline ptrdiff_t +operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __WORD_BIT * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset; +} + + +struct _Bit_iterator : public _Bit_iterator_base +{ + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + + reference operator*() const { return reference(_M_p, 1U << _M_offset); } + iterator& operator++() { + _M_bump_up(); + return *this; + } + iterator operator++(int) { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& operator--() { + _M_bump_down(); + return *this; + } + iterator operator--(int) { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + iterator operator+(difference_type __i) const { + iterator __tmp = *this; + return __tmp += __i; + } + iterator operator-(difference_type __i) const { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference operator[](difference_type __i) { return *(*this + __i); } +}; + +inline _Bit_iterator +operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } + + +struct _Bit_const_iterator : public _Bit_iterator_base +{ + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_const_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) {} + + const_reference operator*() const { + return _Bit_reference(_M_p, 1U << _M_offset); + } + const_iterator& operator++() { + _M_bump_up(); + return *this; + } + const_iterator operator++(int) { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& operator--() { + _M_bump_down(); + return *this; + } + const_iterator operator--(int) { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + const_iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + const_iterator operator+(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator operator-(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference operator[](difference_type __i) { + return *(*this + __i); + } +}; + +inline _Bit_const_iterator +operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } + + +// Bit-vector base class, which encapsulates the difference between +// old SGI-style allocators and standard-conforming allocators. + +#ifdef __STL_USE_STD_ALLOCATORS + +// Base class for ordinary allocators. +template +class _Bvector_alloc_base { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + + _Bvector_alloc_base(const allocator_type& __a) + : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + unsigned int* _M_bit_alloc(size_t __n) + { return _M_data_allocator.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _M_data_allocator.deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + typename _Alloc_traits::allocator_type + _M_data_allocator; + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +// Specialization for instanceless allocators. +template +class _Bvector_alloc_base<_Allocator, true> { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Bvector_alloc_base(const allocator_type&) + : _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + typedef typename _Alloc_traits::_Alloc_type + _Alloc_type; + + unsigned int* _M_bit_alloc(size_t __n) + { return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _Alloc_type::deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +template +class _Bvector_base + : public _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> +{ + typedef _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> + _Base; +public: + typedef typename _Base::allocator_type allocator_type; + + _Bvector_base(const allocator_type& __a) : _Base(__a) {} + ~_Bvector_base() { _Base::_M_deallocate(); } +}; + +#else /* __STL_USE_STD_ALLOCATORS */ + +template +class _Bvector_base +{ +public: + typedef _Alloc allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Bvector_base(const allocator_type&) + : _M_start(), _M_finish(), _M_end_of_storage(0) {} + ~_Bvector_base() { _M_deallocate(); } + +protected: + typedef simple_alloc _Alloc_type; + + unsigned int* _M_bit_alloc(size_t __n) + { return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _Alloc_type::deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +#endif /* __STL_USE_STD_ALLOCATORS */ + +// The next few lines are confusing. What we're doing is declaring a +// partial specialization of vector if we have the necessary +// compiler support. Otherwise, we define a class bit_vector which uses +// the default allocator. + +#if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && !defined(__STL_NO_BOOL) +# define __SGI_STL_VECBOOL_TEMPLATE +# define __BVECTOR vector +# define __VECTOR vector +# define __BVECTOR_BASE _Bvector_base<_Alloc> +# define __BVECTOR_TMPL_LIST template + __STL_END_NAMESPACE +# include + __STL_BEGIN_NAMESPACE +#else /* __STL_CLASS_PARTIAL_SPECIALIZATION && !__STL_NO_BOOL */ +# undef __SGI_STL_VECBOOL_TEMPLATE +# define __BVECTOR bit_vector +# define __VECTOR bit_vector +# define __BVECTOR_BASE _Bvector_base<__STL_DEFAULT_ALLOCATOR(bool) > +# define __BVECTOR_TMPL_LIST +#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION && !__STL_NO_BOOL */ + + +__BVECTOR_TMPL_LIST +class __BVECTOR : public __BVECTOR_BASE +{ +public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + +#ifdef __STL_CLASS_PARTIAL_SPECIALIZATION + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; +#else /* __STL_CLASS_PARTIAL_SPECIALIZATION */ + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator + reverse_iterator; +#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */ + + typedef typename __BVECTOR_BASE::allocator_type allocator_type; + allocator_type get_allocator() const { + return __BVECTOR_BASE::get_allocator(); + } + +protected: +#ifdef __STL_USE_NAMESPACES + using __BVECTOR_BASE::_M_bit_alloc; + using __BVECTOR_BASE::_M_deallocate; + using __BVECTOR_BASE::_M_start; + using __BVECTOR_BASE::_M_finish; + using __BVECTOR_BASE::_M_end_of_storage; +#endif /* __STL_USE_NAMESPACES */ + +protected: + void _M_initialize(size_type __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + _M_finish = _M_start + difference_type(__n); + } + void _M_insert_aux(iterator __position, bool __x) { + if (_M_finish._M_p != _M_end_of_storage) { + copy_backward(__position, _M_finish, _M_finish + 1); + *__position = __x; + ++_M_finish; + } + else { + size_type __len = size() ? 2 * size() : __WORD_BIT; + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + *__i++ = __x; + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + +#ifdef __STL_MEMBER_TEMPLATES + template + void _M_initialize_range(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + _M_start = iterator(); + _M_finish = iterator(); + _M_end_of_storage = 0; + for ( ; __first != __last; ++__first) + push_back(*__first); + } + + template + void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize(__n); + copy(__first, __last, _M_start); + } + + template + void _M_insert_range(iterator __pos, + _InputIterator __first, _InputIterator __last, + input_iterator_tag) { + for ( ; __first != __last; ++__first) { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void _M_insert_range(iterator __position, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + if (__first != __last) { + size_type __n = 0; + distance(__first, __last, __n); + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + copy(__first, __last, __position); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + } + +#endif /* __STL_MEMBER_TEMPLATES */ + +public: + iterator begin() { return _M_start; } + const_iterator begin() const { return _M_start; } + iterator end() { return _M_finish; } + const_iterator end() const { return _M_finish; } + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + size_type size() const { return size_type(end() - begin()); } + size_type max_size() const { return size_type(-1); } + size_type capacity() const { + return size_type(const_iterator(_M_end_of_storage, 0) - begin()); + } + bool empty() const { return begin() == end(); } + + reference operator[](size_type __n) + { return *(begin() + difference_type(__n)); } + const_reference operator[](size_type __n) const + { return *(begin() + difference_type(__n)); } + +#ifdef __STL_THROW_RANGE_ERRORS + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __throw_range_error("vector"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } +#endif /* __STL_THROW_RANGE_ERRORS */ + + explicit __VECTOR(const allocator_type& __a = allocator_type()) + : __BVECTOR_BASE(__a) {} + + __VECTOR(size_type __n, bool __value, + const allocator_type& __a = allocator_type()) + : __BVECTOR_BASE(__a) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0); + } + + explicit __VECTOR(size_type __n) + : __BVECTOR_BASE(allocator_type()) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, 0); + } + + __VECTOR(const __VECTOR& __x) : __BVECTOR_BASE(__x.get_allocator()) { + _M_initialize(__x.size()); + copy(__x.begin(), __x.end(), _M_start); + } + +#ifdef __STL_MEMBER_TEMPLATES + + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + + template + void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) { + _M_initialize_range(__first, __last, __ITERATOR_CATEGORY(__first)); + } + + template + __VECTOR(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : __BVECTOR_BASE(__a) + { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + +#else /* __STL_MEMBER_TEMPLATES */ + + __VECTOR(const_iterator __first, const_iterator __last, + const allocator_type& __a = allocator_type()) + : __BVECTOR_BASE(__a) + { + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize(__n); + copy(__first, __last, _M_start); + } + __VECTOR(const bool* __first, const bool* __last, + const allocator_type& __a = allocator_type()) + : __BVECTOR_BASE(__a) + { + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize(__n); + copy(__first, __last, _M_start); + } + +#endif /* __STL_MEMBER_TEMPLATES */ + + ~__VECTOR() { } + + __VECTOR& operator=(const __VECTOR& __x) { + if (&__x == this) return *this; + if (__x.size() > capacity()) { + _M_deallocate(); + _M_initialize(__x.size()); + } + copy(__x.begin(), __x.end(), begin()); + _M_finish = begin() + difference_type(__x.size()); + return *this; + } + + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void _M_fill_assign(size_t __n, bool __x) { + if (__n > size()) { + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else { + erase(begin() + __n, end()); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + } + + void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } + +#ifdef __STL_MEMBER_TEMPLATES + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_t) __n, (bool) __val); } + + template + void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) + { _M_assign_aux(__first, __last, __ITERATOR_CATEGORY(__first)); } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + iterator __cur = begin(); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); + } + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __len = 0; + distance(__first, __last, __len); + if (__len < size()) + erase(copy(__first, __last, begin()), end()); + else { + _ForwardIterator __mid = __first; + advance(__mid, size()); + copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + +#endif /* __STL_MEMBER_TEMPLATES */ + + void reserve(size_type __n) { + if (capacity() < __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_finish = copy(begin(), end(), iterator(__q, 0)); + _M_deallocate(); + _M_start = iterator(__q, 0); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + } + } + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + void push_back(bool __x) { + if (_M_finish._M_p != _M_end_of_storage) + *_M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void swap(__BVECTOR& __x) { + __STD::swap(_M_start, __x._M_start); + __STD::swap(_M_finish, __x._M_finish); + __STD::swap(_M_end_of_storage, __x._M_end_of_storage); + } + iterator insert(iterator __position, bool __x = bool()) { + difference_type __n = __position - begin(); + if (_M_finish._M_p != _M_end_of_storage && __position == end()) + *_M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + +#ifdef __STL_MEMBER_TEMPLATES + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) { + _M_fill_insert(__pos, __n, __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) { + _M_insert_range(__pos, __first, __last, __ITERATOR_CATEGORY(__first)); + } + + template + void insert(iterator __position, + _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + +#else /* __STL_MEMBER_TEMPLATES */ + void insert(iterator __position, + const_iterator __first, const_iterator __last) { + if (__first == __last) return; + size_type __n = 0; + distance(__first, __last, __n); + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + __n); + copy(__first, __last, __position); + _M_finish += __n; + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, const bool* __first, const bool* __last) { + if (__first == __last) return; + size_type __n = 0; + distance(__first, __last, __n); + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + __n); + copy(__first, __last, __position); + _M_finish += __n; + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } +#endif /* __STL_MEMBER_TEMPLATES */ + + void _M_fill_insert(iterator __position, size_type __n, bool __x) { + if (__n == 0) return; + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + fill(__position, __position + difference_type(__n), __x); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + fill_n(__i, __n, __x); + _M_finish = copy(__position, end(), __i + difference_type(__n)); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, size_type __n, bool __x) { + _M_fill_insert(__position, __n, __x); + } + + void pop_back() { --_M_finish; } + iterator erase(iterator __position) { + if (__position + 1 != end()) + copy(__position + 1, end(), __position); + --_M_finish; + return __position; + } + iterator erase(iterator __first, iterator __last) { + _M_finish = copy(__last, end(), __first); + return __first; + } + void resize(size_type __new_size, bool __x = bool()) { + if (__new_size < size()) + erase(begin() + difference_type(__new_size), end()); + else + insert(end(), __new_size - size(), __x); + } + void flip() { + for (unsigned int* __p = _M_start._M_p; __p != _M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void clear() { erase(begin(), end()); } +}; + +#ifdef __SGI_STL_VECBOOL_TEMPLATE + +// This typedef is non-standard. It is provided for backward compatibility. +typedef vector bit_vector; + +#else /* __SGI_STL_VECBOOL_TEMPLATE */ + +inline void swap(bit_vector& __x, bit_vector& __y) { + __x.swap(__y); +} + +inline bool +operator==(const bit_vector& __x, const bit_vector& __y) +{ + return (__x.size() == __y.size() && + equal(__x.begin(), __x.end(), __y.begin())); +} + +inline bool +operator!=(const bit_vector& __x, const bit_vector& __y) +{ + return !(__x == __y); +} + +inline bool +operator<(const bit_vector& __x, const bit_vector& __y) +{ + return lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); +} + +inline bool operator>(const bit_vector& __x, const bit_vector& __y) +{ + return __y < __x; +} + +inline bool operator<=(const bit_vector& __x, const bit_vector& __y) +{ + return !(__y < __x); +} + +inline bool operator>=(const bit_vector& __x, const bit_vector& __y) +{ + return !(__x < __y); +} + +#endif /* __SGI_STL_VECBOOL_TEMPLATE */ + +#undef __SGI_STL_VECBOOL_TEMPLATE +#undef __BVECTOR +#undef __VECTOR +#undef __BVECTOR_BASE +#undef __BVECTOR_TMPL_LIST + +#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) +#pragma reset woff 1174 +#pragma reset woff 1375 +#endif + +__STL_END_NAMESPACE + +#endif /* __SGI_STL_INTERNAL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/stl_hash_fun.h b/contrib/media/updf/include/ext/stl_hash_fun.h new file mode 100644 index 0000000000..f5260b0129 --- /dev/null +++ b/contrib/media/updf/include/ext/stl_hash_fun.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _CPP_BITS_STL_HASH_FUN_H +#define _CPP_BITS_STL_HASH_FUN_H 1 + +#include + +namespace std +{ + +template struct hash { }; + +inline size_t __stl_hash_string(const char* __s) +{ + unsigned long __h = 0; + for ( ; *__s; ++__s) + __h = 5*__h + *__s; + + return size_t(__h); +} + +template<> struct hash +{ + size_t operator()(const char* __s) const { return __stl_hash_string(__s); } +}; + +template<> struct hash +{ + size_t operator()(const char* __s) const { return __stl_hash_string(__s); } +}; + +template<> struct hash { + size_t operator()(char __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(unsigned char __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(unsigned char __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(short __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(unsigned short __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(int __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(unsigned int __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(long __x) const { return __x; } +}; +template<> struct hash { + size_t operator()(unsigned long __x) const { return __x; } +}; + +} // namespace std + +#endif /* _CPP_BITS_STL_HASH_FUN_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/stl_hashtable.h b/contrib/media/updf/include/ext/stl_hashtable.h new file mode 100644 index 0000000000..aa87ba56ee --- /dev/null +++ b/contrib/media/updf/include/ext/stl_hashtable.h @@ -0,0 +1,937 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_HASHTABLE_H +#define __SGI_STL_INTERNAL_HASHTABLE_H + +// Hashtable class, used to implement the hashed associative containers +// hash_set, hash_map, hash_multiset, and hash_multimap. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std +{ + +template +struct _Hashtable_node +{ + _Hashtable_node* _M_next; + _Val _M_val; +}; + +template +class hashtable; + +template +struct _Hashtable_iterator; + +template +struct _Hashtable_const_iterator; + +template +struct _Hashtable_iterator { + typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc> + _Hashtable; + typedef _Hashtable_iterator<_Val, _Key, _HashFcn, + _ExtractKey, _EqualKey, _Alloc> + iterator; + typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, + _ExtractKey, _EqualKey, _Alloc> + const_iterator; + typedef _Hashtable_node<_Val> _Node; + + typedef forward_iterator_tag iterator_category; + typedef _Val value_type; + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef _Val& reference; + typedef _Val* pointer; + + _Node* _M_cur; + _Hashtable* _M_ht; + + _Hashtable_iterator(_Node* __n, _Hashtable* __tab) + : _M_cur(__n), _M_ht(__tab) {} + _Hashtable_iterator() {} + reference operator*() const { return _M_cur->_M_val; } + pointer operator->() const { return &(operator*()); } + iterator& operator++(); + iterator operator++(int); + bool operator==(const iterator& __it) const + { return _M_cur == __it._M_cur; } + bool operator!=(const iterator& __it) const + { return _M_cur != __it._M_cur; } +}; + + +template +struct _Hashtable_const_iterator { + typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc> + _Hashtable; + typedef _Hashtable_iterator<_Val,_Key,_HashFcn, + _ExtractKey,_EqualKey,_Alloc> + iterator; + typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, + _ExtractKey, _EqualKey, _Alloc> + const_iterator; + typedef _Hashtable_node<_Val> _Node; + + typedef forward_iterator_tag iterator_category; + typedef _Val value_type; + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef const _Val& reference; + typedef const _Val* pointer; + + const _Node* _M_cur; + const _Hashtable* _M_ht; + + _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab) + : _M_cur(__n), _M_ht(__tab) {} + _Hashtable_const_iterator() {} + _Hashtable_const_iterator(const iterator& __it) + : _M_cur(__it._M_cur), _M_ht(__it._M_ht) {} + reference operator*() const { return _M_cur->_M_val; } + pointer operator->() const { return &(operator*()); } + const_iterator& operator++(); + const_iterator operator++(int); + bool operator==(const const_iterator& __it) const + { return _M_cur == __it._M_cur; } + bool operator!=(const const_iterator& __it) const + { return _M_cur != __it._M_cur; } +}; + +// Note: assumes long is at least 32 bits. +enum { __stl_num_primes = 28 }; + +static const unsigned long __stl_prime_list[__stl_num_primes] = +{ + 53ul, 97ul, 193ul, 389ul, 769ul, + 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, + 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, + 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, + 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, + 1610612741ul, 3221225473ul, 4294967291ul +}; + +inline unsigned long __stl_next_prime(unsigned long __n) +{ + const unsigned long* __first = __stl_prime_list; + const unsigned long* __last = __stl_prime_list + (int)__stl_num_primes; + const unsigned long* pos = lower_bound(__first, __last, __n); + return pos == __last ? *(__last - 1) : *pos; +} + +// Forward declaration of operator==. + +template +class hashtable; + +template +bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1, + const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2); + + +// Hashtables handle allocators a bit differently than other containers +// do. If we're using standard-conforming allocators, then a hashtable +// unconditionally has a member variable to hold its allocator, even if +// it so happens that all instances of the allocator type are identical. +// This is because, for hashtables, this extra storage is negligible. +// Additionally, a base class wouldn't serve any other purposes; it +// wouldn't, for example, simplify the exception-handling code. + +template +class hashtable { +public: + typedef _Key key_type; + typedef _Val value_type; + typedef _HashFcn hasher; + typedef _EqualKey key_equal; + + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + + hasher hash_funct() const { return _M_hash; } + key_equal key_eq() const { return _M_equals; } + +private: + typedef _Hashtable_node<_Val> _Node; + +public: + typedef typename _Alloc_traits<_Val,_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return _M_node_allocator; } +private: + typename _Alloc_traits<_Node, _Alloc>::allocator_type _M_node_allocator; + _Node* _M_get_node() { return _M_node_allocator.allocate(1); } + void _M_put_node(_Node* __p) { _M_node_allocator.deallocate(__p, 1); } + +private: + hasher _M_hash; + key_equal _M_equals; + _ExtractKey _M_get_key; + vector<_Node*,_Alloc> _M_buckets; + size_type _M_num_elements; + +public: + typedef _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc> + iterator; + typedef _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey, + _Alloc> + const_iterator; + + friend struct + _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>; + friend struct + _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>; + +public: + hashtable(size_type __n, + const _HashFcn& __hf, + const _EqualKey& __eql, + const _ExtractKey& __ext, + const allocator_type& __a = allocator_type()) + : _M_node_allocator(__a), + _M_hash(__hf), + _M_equals(__eql), + _M_get_key(__ext), + _M_buckets(__a), + _M_num_elements(0) + { + _M_initialize_buckets(__n); + } + + hashtable(size_type __n, + const _HashFcn& __hf, + const _EqualKey& __eql, + const allocator_type& __a = allocator_type()) + : _M_node_allocator(__a), + _M_hash(__hf), + _M_equals(__eql), + _M_get_key(_ExtractKey()), + _M_buckets(__a), + _M_num_elements(0) + { + _M_initialize_buckets(__n); + } + + hashtable(const hashtable& __ht) + : _M_node_allocator(__ht.get_allocator()), + _M_hash(__ht._M_hash), + _M_equals(__ht._M_equals), + _M_get_key(__ht._M_get_key), + _M_buckets(__ht.get_allocator()), + _M_num_elements(0) + { + _M_copy_from(__ht); + } + + hashtable& operator= (const hashtable& __ht) + { + if (&__ht != this) { + clear(); + _M_hash = __ht._M_hash; + _M_equals = __ht._M_equals; + _M_get_key = __ht._M_get_key; + _M_copy_from(__ht); + } + return *this; + } + + ~hashtable() { clear(); } + + size_type size() const { return _M_num_elements; } + size_type max_size() const { return size_type(-1); } + bool empty() const { return size() == 0; } + + void swap(hashtable& __ht) + { + std::swap(_M_hash, __ht._M_hash); + std::swap(_M_equals, __ht._M_equals); + std::swap(_M_get_key, __ht._M_get_key); + _M_buckets.swap(__ht._M_buckets); + std::swap(_M_num_elements, __ht._M_num_elements); + } + + iterator begin() + { + for (size_type __n = 0; __n < _M_buckets.size(); ++__n) + if (_M_buckets[__n]) + return iterator(_M_buckets[__n], this); + return end(); + } + + iterator end() { return iterator(0, this); } + + const_iterator begin() const + { + for (size_type __n = 0; __n < _M_buckets.size(); ++__n) + if (_M_buckets[__n]) + return const_iterator(_M_buckets[__n], this); + return end(); + } + + const_iterator end() const { return const_iterator(0, this); } + + template + friend bool operator== (const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&, + const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&); +public: + + size_type bucket_count() const { return _M_buckets.size(); } + + size_type max_bucket_count() const + { return __stl_prime_list[(int)__stl_num_primes - 1]; } + + size_type elems_in_bucket(size_type __bucket) const + { + size_type __result = 0; + for (_Node* __cur = _M_buckets[__bucket]; __cur; __cur = __cur->_M_next) + __result += 1; + return __result; + } + + pair insert_unique(const value_type& __obj) + { + resize(_M_num_elements + 1); + return insert_unique_noresize(__obj); + } + + iterator insert_equal(const value_type& __obj) + { + resize(_M_num_elements + 1); + return insert_equal_noresize(__obj); + } + + pair insert_unique_noresize(const value_type& __obj); + iterator insert_equal_noresize(const value_type& __obj); + + template + void insert_unique(_InputIterator __f, _InputIterator __l) + { + insert_unique(__f, __l, __iterator_category(__f)); + } + + template + void insert_equal(_InputIterator __f, _InputIterator __l) + { + insert_equal(__f, __l, __iterator_category(__f)); + } + + template + void insert_unique(_InputIterator __f, _InputIterator __l, + input_iterator_tag) + { + for ( ; __f != __l; ++__f) + insert_unique(*__f); + } + + template + void insert_equal(_InputIterator __f, _InputIterator __l, + input_iterator_tag) + { + for ( ; __f != __l; ++__f) + insert_equal(*__f); + } + + template + void insert_unique(_ForwardIterator __f, _ForwardIterator __l, + forward_iterator_tag) + { + size_type __n = 0; + distance(__f, __l, __n); + resize(_M_num_elements + __n); + for ( ; __n > 0; --__n, ++__f) + insert_unique_noresize(*__f); + } + + template + void insert_equal(_ForwardIterator __f, _ForwardIterator __l, + forward_iterator_tag) + { + size_type __n = 0; + distance(__f, __l, __n); + resize(_M_num_elements + __n); + for ( ; __n > 0; --__n, ++__f) + insert_equal_noresize(*__f); + } + + reference find_or_insert(const value_type& __obj); + + iterator find(const key_type& __key) + { + size_type __n = _M_bkt_num_key(__key); + _Node* __first; + for ( __first = _M_buckets[__n]; + __first && !_M_equals(_M_get_key(__first->_M_val), __key); + __first = __first->_M_next) + {} + return iterator(__first, this); + } + + const_iterator find(const key_type& __key) const + { + size_type __n = _M_bkt_num_key(__key); + const _Node* __first; + for ( __first = _M_buckets[__n]; + __first && !_M_equals(_M_get_key(__first->_M_val), __key); + __first = __first->_M_next) + {} + return const_iterator(__first, this); + } + + size_type count(const key_type& __key) const + { + const size_type __n = _M_bkt_num_key(__key); + size_type __result = 0; + + for (const _Node* __cur = _M_buckets[__n]; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), __key)) + ++__result; + return __result; + } + + pair + equal_range(const key_type& __key); + + pair + equal_range(const key_type& __key) const; + + size_type erase(const key_type& __key); + void erase(const iterator& __it); + void erase(iterator __first, iterator __last); + + void erase(const const_iterator& __it); + void erase(const_iterator __first, const_iterator __last); + + void resize(size_type __num_elements_hint); + void clear(); + +private: + size_type _M_next_size(size_type __n) const + { return __stl_next_prime(__n); } + + void _M_initialize_buckets(size_type __n) + { + const size_type __n_buckets = _M_next_size(__n); + _M_buckets.reserve(__n_buckets); + _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0); + _M_num_elements = 0; + } + + size_type _M_bkt_num_key(const key_type& __key) const + { + return _M_bkt_num_key(__key, _M_buckets.size()); + } + + size_type _M_bkt_num(const value_type& __obj) const + { + return _M_bkt_num_key(_M_get_key(__obj)); + } + + size_type _M_bkt_num_key(const key_type& __key, size_t __n) const + { + return _M_hash(__key) % __n; + } + + size_type _M_bkt_num(const value_type& __obj, size_t __n) const + { + return _M_bkt_num_key(_M_get_key(__obj), __n); + } + + _Node* _M_new_node(const value_type& __obj) + { + _Node* __n = _M_get_node(); + __n->_M_next = 0; + __STL_TRY { + construct(&__n->_M_val, __obj); + return __n; + } + __STL_UNWIND(_M_put_node(__n)); + } + + void _M_delete_node(_Node* __n) + { + destroy(&__n->_M_val); + _M_put_node(__n); + } + + void _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last); + void _M_erase_bucket(const size_type __n, _Node* __last); + + void _M_copy_from(const hashtable& __ht); + +}; + +template +_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& +_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++() +{ + const _Node* __old = _M_cur; + _M_cur = _M_cur->_M_next; + if (!_M_cur) { + size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); + while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) + _M_cur = _M_ht->_M_buckets[__bucket]; + } + return *this; +} + +template +inline _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All> +_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int) +{ + iterator __tmp = *this; + ++*this; + return __tmp; +} + +template +_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& +_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++() +{ + const _Node* __old = _M_cur; + _M_cur = _M_cur->_M_next; + if (!_M_cur) { + size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); + while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) + _M_cur = _M_ht->_M_buckets[__bucket]; + } + return *this; +} + +template +inline _Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All> +_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int) +{ + const_iterator __tmp = *this; + ++*this; + return __tmp; +} + +template +bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1, + const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2) +{ + typedef typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::_Node _Node; + if (__ht1._M_buckets.size() != __ht2._M_buckets.size()) + return false; + for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n) { + _Node* __cur1 = __ht1._M_buckets[__n]; + _Node* __cur2 = __ht2._M_buckets[__n]; + for ( ; __cur1 && __cur2 && __cur1->_M_val == __cur2->_M_val; + __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next) + {} + if (__cur1 || __cur2) + return false; + } + return true; +} + +template +inline bool operator!=(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1, + const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2) { + return !(__ht1 == __ht2); +} + +template +inline void swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1, + hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2) { + __ht1.swap(__ht2); +} + + +template +pair::iterator, bool> +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::insert_unique_noresize(const value_type& __obj) +{ + const size_type __n = _M_bkt_num(__obj); + _Node* __first = _M_buckets[__n]; + + for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) + return pair(iterator(__cur, this), false); + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements; + return pair(iterator(__tmp, this), true); +} + +template +typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::insert_equal_noresize(const value_type& __obj) +{ + const size_type __n = _M_bkt_num(__obj); + _Node* __first = _M_buckets[__n]; + + for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) { + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __cur->_M_next; + __cur->_M_next = __tmp; + ++_M_num_elements; + return iterator(__tmp, this); + } + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements; + return iterator(__tmp, this); +} + +template +typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::reference +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::find_or_insert(const value_type& __obj) +{ + resize(_M_num_elements + 1); + + size_type __n = _M_bkt_num(__obj); + _Node* __first = _M_buckets[__n]; + + for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) + return __cur->_M_val; + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements; + return __tmp->_M_val; +} + +template +pair::iterator, + typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator> +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key) +{ + typedef pair _Pii; + const size_type __n = _M_bkt_num_key(__key); + + for (_Node* __first = _M_buckets[__n]; __first; __first = __first->_M_next) + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next) + if (!_M_equals(_M_get_key(__cur->_M_val), __key)) + return _Pii(iterator(__first, this), iterator(__cur, this)); + for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) + if (_M_buckets[__m]) + return _Pii(iterator(__first, this), + iterator(_M_buckets[__m], this)); + return _Pii(iterator(__first, this), end()); + } + return _Pii(end(), end()); +} + +template +pair::const_iterator, + typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator> +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::equal_range(const key_type& __key) const +{ + typedef pair _Pii; + const size_type __n = _M_bkt_num_key(__key); + + for (const _Node* __first = _M_buckets[__n] ; + __first; + __first = __first->_M_next) { + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + for (const _Node* __cur = __first->_M_next; + __cur; + __cur = __cur->_M_next) + if (!_M_equals(_M_get_key(__cur->_M_val), __key)) + return _Pii(const_iterator(__first, this), + const_iterator(__cur, this)); + for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) + if (_M_buckets[__m]) + return _Pii(const_iterator(__first, this), + const_iterator(_M_buckets[__m], this)); + return _Pii(const_iterator(__first, this), end()); + } + } + return _Pii(end(), end()); +} + +template +typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::size_type +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const key_type& __key) +{ + const size_type __n = _M_bkt_num_key(__key); + _Node* __first = _M_buckets[__n]; + size_type __erased = 0; + + if (__first) { + _Node* __cur = __first; + _Node* __next = __cur->_M_next; + while (__next) { + if (_M_equals(_M_get_key(__next->_M_val), __key)) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + __next = __cur->_M_next; + ++__erased; + --_M_num_elements; + } + else { + __cur = __next; + __next = __cur->_M_next; + } + } + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + _M_buckets[__n] = __first->_M_next; + _M_delete_node(__first); + ++__erased; + --_M_num_elements; + } + } + return __erased; +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const iterator& __it) +{ + _Node* __p = __it._M_cur; + if (__p) { + const size_type __n = _M_bkt_num(__p->_M_val); + _Node* __cur = _M_buckets[__n]; + + if (__cur == __p) { + _M_buckets[__n] = __cur->_M_next; + _M_delete_node(__cur); + --_M_num_elements; + } + else { + _Node* __next = __cur->_M_next; + while (__next) { + if (__next == __p) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + --_M_num_elements; + break; + } + else { + __cur = __next; + __next = __cur->_M_next; + } + } + } + } +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::erase(iterator __first, iterator __last) +{ + size_type __f_bucket = __first._M_cur ? + _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size(); + size_type __l_bucket = __last._M_cur ? + _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size(); + + if (__first._M_cur == __last._M_cur) + return; + else if (__f_bucket == __l_bucket) + _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur); + else { + _M_erase_bucket(__f_bucket, __first._M_cur, 0); + for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n) + _M_erase_bucket(__n, 0); + if (__l_bucket != _M_buckets.size()) + _M_erase_bucket(__l_bucket, __last._M_cur); + } +} + +template +inline void +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const_iterator __first, + const_iterator __last) +{ + erase(iterator(const_cast<_Node*>(__first._M_cur), + const_cast(__first._M_ht)), + iterator(const_cast<_Node*>(__last._M_cur), + const_cast(__last._M_ht))); +} + +template +inline void +hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const const_iterator& __it) +{ + erase(iterator(const_cast<_Node*>(__it._M_cur), + const_cast(__it._M_ht))); +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::resize(size_type __num_elements_hint) +{ + const size_type __old_n = _M_buckets.size(); + if (__num_elements_hint > __old_n) { + const size_type __n = _M_next_size(__num_elements_hint); + if (__n > __old_n) { + vector<_Node*, _All> __tmp(__n, (_Node*)(0), + _M_buckets.get_allocator()); + __STL_TRY { + for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) { + _Node* __first = _M_buckets[__bucket]; + while (__first) { + size_type __new_bucket = _M_bkt_num(__first->_M_val, __n); + _M_buckets[__bucket] = __first->_M_next; + __first->_M_next = __tmp[__new_bucket]; + __tmp[__new_bucket] = __first; + __first = _M_buckets[__bucket]; + } + } + _M_buckets.swap(__tmp); + } +# ifdef __STL_USE_EXCEPTIONS + catch(...) { + for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) { + while (__tmp[__bucket]) { + _Node* __next = __tmp[__bucket]->_M_next; + _M_delete_node(__tmp[__bucket]); + __tmp[__bucket] = __next; + } + } + throw; + } +# endif /* __STL_USE_EXCEPTIONS */ + } + } +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last) +{ + _Node* __cur = _M_buckets[__n]; + if (__cur == __first) + _M_erase_bucket(__n, __last); + else { + _Node* __next; + for (__next = __cur->_M_next; + __next != __first; + __cur = __next, __next = __cur->_M_next) + ; + while (__next != __last) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + __next = __cur->_M_next; + --_M_num_elements; + } + } +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::_M_erase_bucket(const size_type __n, _Node* __last) +{ + _Node* __cur = _M_buckets[__n]; + while (__cur != __last) { + _Node* __next = __cur->_M_next; + _M_delete_node(__cur); + __cur = __next; + _M_buckets[__n] = __cur; + --_M_num_elements; + } +} + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::clear() +{ + for (size_type __i = 0; __i < _M_buckets.size(); ++__i) { + _Node* __cur = _M_buckets[__i]; + while (__cur != 0) { + _Node* __next = __cur->_M_next; + _M_delete_node(__cur); + __cur = __next; + } + _M_buckets[__i] = 0; + } + _M_num_elements = 0; +} + + +template +void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> + ::_M_copy_from(const hashtable& __ht) +{ + _M_buckets.clear(); + _M_buckets.reserve(__ht._M_buckets.size()); + _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0); + __STL_TRY { + for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { + const _Node* __cur = __ht._M_buckets[__i]; + if (__cur) { + _Node* __local_copy = _M_new_node(__cur->_M_val); + _M_buckets[__i] = __local_copy; + + for (_Node* __next = __cur->_M_next; + __next; + __cur = __next, __next = __cur->_M_next) { + __local_copy->_M_next = _M_new_node(__next->_M_val); + __local_copy = __local_copy->_M_next; + } + } + } + _M_num_elements = __ht._M_num_elements; + } + __STL_UNWIND(clear()); +} + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_HASHTABLE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/stl_rope.h b/contrib/media/updf/include/ext/stl_rope.h new file mode 100644 index 0000000000..d3d3ccf449 --- /dev/null +++ b/contrib/media/updf/include/ext/stl_rope.h @@ -0,0 +1,2459 @@ +/* + * Copyright (c) 1997-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +// rope<_CharT,_Alloc> is a sequence of _CharT. +// Ropes appear to be mutable, but update operations +// really copy enough of the data structure to leave the original +// valid. Thus ropes can be logically copied by just copying +// a pointer value. + +#ifndef __SGI_STL_INTERNAL_ROPE_H +# define __SGI_STL_INTERNAL_ROPE_H + +# ifdef __GC +# define __GC_CONST const +# else +# include +# define __GC_CONST // constant except for deallocation +# endif +# ifdef __STL_SGI_THREADS +# include +# endif + +namespace std +{ + +// The _S_eos function is used for those functions that +// convert to/from C-like strings to detect the end of the string. + +// The end-of-C-string character. +// This is what the draft standard says it should be. +template +inline _CharT _S_eos(_CharT*) { return _CharT(); } + +// Test for basic character types. +// For basic character types leaves having a trailing eos. +template +inline bool _S_is_basic_char_type(_CharT*) { return false; } +template +inline bool _S_is_one_byte_char_type(_CharT*) { return false; } + +inline bool _S_is_basic_char_type(char*) { return true; } +inline bool _S_is_one_byte_char_type(char*) { return true; } +inline bool _S_is_basic_char_type(wchar_t*) { return true; } + +// Store an eos iff _CharT is a basic character type. +// Do not reference _S_eos if it isn't. +template +inline void _S_cond_store_eos(_CharT&) {} + +inline void _S_cond_store_eos(char& __c) { __c = 0; } +inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; } + +// char_producers are logically functions that generate a section of +// a string. These can be convereted to ropes. The resulting rope +// invokes the char_producer on demand. This allows, for example, +// files to be viewed as ropes without reading the entire file. +template +class char_producer { + public: + virtual ~char_producer() {}; + virtual void operator()(size_t __start_pos, size_t __len, + _CharT* __buffer) = 0; + // Buffer should really be an arbitrary output iterator. + // That way we could flatten directly into an ostream, etc. + // This is thoroughly impossible, since iterator types don't + // have runtime descriptions. +}; + +// Sequence buffers: +// +// Sequence must provide an append operation that appends an +// array to the sequence. Sequence buffers are useful only if +// appending an entire array is cheaper than appending element by element. +// This is true for many string representations. +// This should perhaps inherit from ostream +// and be implemented correspondingly, so that they can be used +// for formatted. For the sake of portability, we don't do this yet. +// +// For now, sequence buffers behave as output iterators. But they also +// behave a little like basic_ostringstream and a +// little like containers. + +template +class sequence_buffer : public output_iterator { + public: + typedef typename _Sequence::value_type value_type; + protected: + _Sequence* _M_prefix; + value_type _M_buffer[_Buf_sz]; + size_t _M_buf_count; + public: + void flush() { + _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count); + _M_buf_count = 0; + } + ~sequence_buffer() { flush(); } + sequence_buffer() : _M_prefix(0), _M_buf_count(0) {} + sequence_buffer(const sequence_buffer& __x) { + _M_prefix = __x._M_prefix; + _M_buf_count = __x._M_buf_count; + copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); + } + sequence_buffer(sequence_buffer& __x) { + __x.flush(); + _M_prefix = __x._M_prefix; + _M_buf_count = 0; + } + sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {} + sequence_buffer& operator= (sequence_buffer& __x) { + __x.flush(); + _M_prefix = __x._M_prefix; + _M_buf_count = 0; + return *this; + } + sequence_buffer& operator= (const sequence_buffer& __x) { + _M_prefix = __x._M_prefix; + _M_buf_count = __x._M_buf_count; + copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); + return *this; + } + void push_back(value_type __x) + { + if (_M_buf_count < _Buf_sz) { + _M_buffer[_M_buf_count] = __x; + ++_M_buf_count; + } else { + flush(); + _M_buffer[0] = __x; + _M_buf_count = 1; + } + } + void append(value_type* __s, size_t __len) + { + if (__len + _M_buf_count <= _Buf_sz) { + size_t __i = _M_buf_count; + size_t __j = 0; + for (; __j < __len; __i++, __j++) { + _M_buffer[__i] = __s[__j]; + } + _M_buf_count += __len; + } else if (0 == _M_buf_count) { + _M_prefix->append(__s, __s + __len); + } else { + flush(); + append(__s, __len); + } + } + sequence_buffer& write(value_type* __s, size_t __len) + { + append(__s, __len); + return *this; + } + sequence_buffer& put(value_type __x) + { + push_back(__x); + return *this; + } + sequence_buffer& operator=(const value_type& __rhs) + { + push_back(__rhs); + return *this; + } + sequence_buffer& operator*() { return *this; } + sequence_buffer& operator++() { return *this; } + sequence_buffer& operator++(int) { return *this; } +}; + +// The following should be treated as private, at least for now. +template +class _Rope_char_consumer { + public: + // If we had member templates, these should not be virtual. + // For now we need to use run-time parametrization where + // compile-time would do. Hence this should all be private + // for now. + // The symmetry with char_producer is accidental and temporary. + virtual ~_Rope_char_consumer() {}; + virtual bool operator()(const _CharT* __buffer, size_t __len) = 0; +}; + +// First a lot of forward declarations. The standard seems to require +// much stricter "declaration before use" than many of the implementations +// that preceded it. +template > class rope; +template struct _Rope_RopeConcatenation; +template struct _Rope_RopeLeaf; +template struct _Rope_RopeFunction; +template struct _Rope_RopeSubstring; +template class _Rope_iterator; +template class _Rope_const_iterator; +template class _Rope_char_ref_proxy; +template class _Rope_char_ptr_proxy; + +template +bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, + const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y); + +template +_Rope_const_iterator<_CharT,_Alloc> operator- + (const _Rope_const_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n); + +template +_Rope_const_iterator<_CharT,_Alloc> operator+ + (const _Rope_const_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n); + +template +_Rope_const_iterator<_CharT,_Alloc> operator+ + (ptrdiff_t __n, + const _Rope_const_iterator<_CharT,_Alloc>& __x); + +template +bool operator== + (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y); + +template +bool operator< + (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y); + +template +ptrdiff_t operator- + (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y); + +template +_Rope_iterator<_CharT,_Alloc> operator- + (const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n); + +template +_Rope_iterator<_CharT,_Alloc> operator+ + (const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n); + +template +_Rope_iterator<_CharT,_Alloc> operator+ + (ptrdiff_t __n, + const _Rope_iterator<_CharT,_Alloc>& __x); + +template +bool operator== + (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y); + +template +bool operator< + (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y); + +template +ptrdiff_t operator- + (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y); + +template +rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right); + +template +rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left, + const _CharT* __right); + +template +rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left, + _CharT __right); + +// Some helpers, so we can use power on ropes. +// See below for why this isn't local to the implementation. + +// This uses a nonstandard refcount convention. +// The result has refcount 0. +template +struct _Rope_Concat_fn + : public binary_function, rope<_CharT,_Alloc>, + rope<_CharT,_Alloc> > { + rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x, + const rope<_CharT,_Alloc>& __y) { + return __x + __y; + } +}; + +template +inline +rope<_CharT,_Alloc> +identity_element(_Rope_Concat_fn<_CharT, _Alloc>) +{ + return rope<_CharT,_Alloc>(); +} + + +// +// What follows should really be local to rope. Unfortunately, +// that doesn't work, since it makes it impossible to define generic +// equality on rope iterators. According to the draft standard, the +// template parameters for such an equality operator cannot be inferred +// from the occurence of a member class as a parameter. +// (SGI compilers in fact allow this, but the __result wouldn't be +// portable.) +// Similarly, some of the static member functions are member functions +// only to avoid polluting the global namespace, and to circumvent +// restrictions on type inference for template functions. +// + +// +// The internal data structure for representing a rope. This is +// private to the implementation. A rope is really just a pointer +// to one of these. +// +// A few basic functions for manipulating this data structure +// are members of _RopeRep. Most of the more complex algorithms +// are implemented as rope members. +// +// Some of the static member functions of _RopeRep have identically +// named functions in rope that simply invoke the _RopeRep versions. +// +// A macro to introduce various allocation and deallocation functions +// These need to be defined differently depending on whether or not +// we are using standard conforming allocators, and whether the allocator +// instances have real state. Thus this macro is invoked repeatedly +// with different definitions of __ROPE_DEFINE_ALLOC. +// __ROPE_DEFINE_ALLOC(type,name) defines +// type * name_allocate(size_t) and +// void name_deallocate(tipe *, size_t) +// Both functions may or may not be static. + +#define __ROPE_DEFINE_ALLOCS(__a) \ + __ROPE_DEFINE_ALLOC(_CharT,_Data) /* character data */ \ + typedef _Rope_RopeConcatenation<_CharT,__a> __C; \ + __ROPE_DEFINE_ALLOC(__C,_C) \ + typedef _Rope_RopeLeaf<_CharT,__a> __L; \ + __ROPE_DEFINE_ALLOC(__L,_L) \ + typedef _Rope_RopeFunction<_CharT,__a> __F; \ + __ROPE_DEFINE_ALLOC(__F,_F) \ + typedef _Rope_RopeSubstring<_CharT,__a> __S; \ + __ROPE_DEFINE_ALLOC(__S,_S) + +// Internal rope nodes potentially store a copy of the allocator +// instance used to allocate them. This is mostly redundant. +// But the alternative would be to pass allocator instances around +// in some form to nearly all internal functions, since any pointer +// assignment may result in a zero reference count and thus require +// deallocation. +// The _Rope_rep_base class encapsulates +// the differences between SGI-style allocators and standard-conforming +// allocators. + +#define __STATIC_IF_SGI_ALLOC /* not static */ + +// Base class for ordinary allocators. +template +class _Rope_rep_alloc_base { +public: + typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + _Rope_rep_alloc_base(size_t __size, const allocator_type& __a) + : _M_size(__size), _M_data_allocator(__a) {} + size_t _M_size; // This is here only to avoid wasting space + // for an otherwise empty base class. + + +protected: + allocator_type _M_data_allocator; + +# define __ROPE_DEFINE_ALLOC(_Tp, __name) \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \ + /*static*/ _Tp * __name##_allocate(size_t __n) \ + { return __name##Allocator(_M_data_allocator).allocate(__n); } \ + void __name##_deallocate(_Tp* __p, size_t __n) \ + { __name##Allocator(_M_data_allocator).deallocate(__p, __n); } + __ROPE_DEFINE_ALLOCS(_Allocator); +# undef __ROPE_DEFINE_ALLOC +}; + +// Specialization for allocators that have the property that we don't +// actually have to store an allocator object. +template +class _Rope_rep_alloc_base<_CharT,_Allocator,true> { +public: + typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + _Rope_rep_alloc_base(size_t __size, const allocator_type&) + : _M_size(__size) {} + size_t _M_size; + +protected: + +# define __ROPE_DEFINE_ALLOC(_Tp, __name) \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::_Alloc_type __name##Alloc; \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \ + static _Tp* __name##_allocate(size_t __n) \ + { return __name##Alloc::allocate(__n); } \ + void __name##_deallocate(_Tp *__p, size_t __n) \ + { __name##Alloc::deallocate(__p, __n); } + __ROPE_DEFINE_ALLOCS(_Allocator); +# undef __ROPE_DEFINE_ALLOC +}; + +template +struct _Rope_rep_base + : public _Rope_rep_alloc_base<_CharT,_Alloc, + _Alloc_traits<_CharT,_Alloc>::_S_instanceless> +{ + typedef _Rope_rep_alloc_base<_CharT,_Alloc, + _Alloc_traits<_CharT,_Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + _Rope_rep_base(size_t __size, const allocator_type& __a) + : _Base(__size, __a) {} +}; + + +template +struct _Rope_RopeRep : public _Rope_rep_base<_CharT,_Alloc> +# ifndef __GC + , _Refcount_Base +# endif +{ + public: + enum { _S_max_rope_depth = 45 }; + enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; + _Tag _M_tag:8; + bool _M_is_balanced:8; + unsigned char _M_depth; + __GC_CONST _CharT* _M_c_string; + /* Flattened version of string, if needed. */ + /* typically 0. */ + /* If it's not 0, then the memory is owned */ + /* by this node. */ + /* In the case of a leaf, this may point to */ + /* the same memory as the data field. */ + typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type + allocator_type; + _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t __size, + allocator_type __a) + : _Rope_rep_base<_CharT,_Alloc>(__size, __a), +# ifndef __GC + _Refcount_Base(1), +# endif + _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0) + { } +# ifdef __GC + void _M_incr () {} +# endif + static void _S_free_string(__GC_CONST _CharT*, size_t __len, + allocator_type __a); +# define __STL_FREE_STRING(__s, __l, __a) _S_free_string(__s, __l, __a); + // Deallocate data section of a leaf. + // This shouldn't be a member function. + // But its hard to do anything else at the + // moment, because it's templatized w.r.t. + // an allocator. + // Does nothing if __GC is defined. +# ifndef __GC + void _M_free_c_string(); + void _M_free_tree(); + // Deallocate t. Assumes t is not 0. + void _M_unref_nonnil() + { + if (0 == _M_decr()) _M_free_tree(); + } + void _M_ref_nonnil() + { + _M_incr(); + } + static void _S_unref(_Rope_RopeRep* __t) + { + if (0 != __t) { + __t->_M_unref_nonnil(); + } + } + static void _S_ref(_Rope_RopeRep* __t) + { + if (0 != __t) __t->_M_incr(); + } + static void _S_free_if_unref(_Rope_RopeRep* __t) + { + if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree(); + } +# else /* __GC */ + void _M_unref_nonnil() {} + void _M_ref_nonnil() {} + static void _S_unref(_Rope_RopeRep*) {} + static void _S_ref(_Rope_RopeRep*) {} + static void _S_free_if_unref(_Rope_RopeRep*) {} +# endif + +}; + +template +struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> { + public: + // Apparently needed by VC++ + // The data fields of leaves are allocated with some + // extra space, to accomodate future growth and for basic + // character types, to hold a trailing eos character. + enum { _S_alloc_granularity = 8 }; + static size_t _S_rounded_up_size(size_t __n) { + size_t __size_with_eos; + + if (_S_is_basic_char_type((_CharT*)0)) { + __size_with_eos = __n + 1; + } else { + __size_with_eos = __n; + } +# ifdef __GC + return __size_with_eos; +# else + // Allow slop for in-place expansion. + return (__size_with_eos + _S_alloc_granularity-1) + &~ (_S_alloc_granularity-1); +# endif + } + __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */ + /* The allocated size is */ + /* _S_rounded_up_size(size), except */ + /* in the GC case, in which it */ + /* doesn't matter. */ + typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type + allocator_type; + _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a) + : _Rope_RopeRep<_CharT,_Alloc>(_S_leaf, 0, true, __size, __a), + _M_data(__d) + { + __stl_assert(__size > 0); + if (_S_is_basic_char_type((_CharT *)0)) { + // already eos terminated. + _M_c_string = __d; + } + } + // The constructor assumes that d has been allocated with + // the proper allocator and the properly padded size. + // In contrast, the destructor deallocates the data: +# ifndef __GC + ~_Rope_RopeLeaf() { + if (_M_data != _M_c_string) { + _M_free_c_string(); + } + __STL_FREE_STRING(_M_data, _M_size, get_allocator()); + } +# endif +}; + +template +struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> { + public: + _Rope_RopeRep<_CharT,_Alloc>* _M_left; + _Rope_RopeRep<_CharT,_Alloc>* _M_right; + typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type + allocator_type; + _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l, + _Rope_RopeRep<_CharT,_Alloc>* __r, + allocator_type __a) + + : _Rope_RopeRep<_CharT,_Alloc>(_S_concat, + max(__l->_M_depth, __r->_M_depth) + 1, + false, + __l->_M_size + __r->_M_size, __a), + _M_left(__l), _M_right(__r) + {} +# ifndef __GC + ~_Rope_RopeConcatenation() { + _M_free_c_string(); + _M_left->_M_unref_nonnil(); + _M_right->_M_unref_nonnil(); + } +# endif +}; + +template +struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> { + public: + char_producer<_CharT>* _M_fn; +# ifndef __GC + bool _M_delete_when_done; // Char_producer is owned by the + // rope and should be explicitly + // deleted when the rope becomes + // inaccessible. +# else + // In the GC case, we either register the rope for + // finalization, or not. Thus the field is unnecessary; + // the information is stored in the collector data structures. + // We do need a finalization procedure to be invoked by the + // collector. + static void _S_fn_finalization_proc(void * __tree, void *) { + delete ((_Rope_RopeFunction *)__tree) -> _M_fn; + } +# endif + typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type + allocator_type; + _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size, + bool __d, allocator_type __a) + : _Rope_RopeRep<_CharT,_Alloc>(_S_function, 0, true, __size, __a) + , _M_fn(__f) +# ifndef __GC + , _M_delete_when_done(__d) +# endif + { + __stl_assert(__size > 0); +# ifdef __GC + if (__d) { + GC_REGISTER_FINALIZER( + this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0); + } +# endif + } +# ifndef __GC + ~_Rope_RopeFunction() { + _M_free_c_string(); + if (_M_delete_when_done) { + delete _M_fn; + } + } +# endif +}; +// Substring results are usually represented using just +// concatenation nodes. But in the case of very long flat ropes +// or ropes with a functional representation that isn't practical. +// In that case, we represent the __result as a special case of +// RopeFunction, whose char_producer points back to the rope itself. +// In all cases except repeated substring operations and +// deallocation, we treat the __result as a RopeFunction. +template +struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>, + public char_producer<_CharT> { + public: + // XXX this whole class should be rewritten. + _Rope_RopeRep<_CharT,_Alloc>* _M_base; // not 0 + size_t _M_start; + virtual void operator()(size_t __start_pos, size_t __req_len, + _CharT* __buffer) { + switch(_M_base->_M_tag) { + case _S_function: + case _S_substringfn: + { + char_producer<_CharT>* __fn = + ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; + __stl_assert(__start_pos + __req_len <= _M_size); + __stl_assert(_M_start + _M_size <= _M_base->_M_size); + (*__fn)(__start_pos + _M_start, __req_len, __buffer); + } + break; + case _S_leaf: + { + __GC_CONST _CharT* __s = + ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; + uninitialized_copy_n(__s + __start_pos + _M_start, __req_len, + __buffer); + } + break; + default: + __stl_assert(false); + } + } + typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type + allocator_type; + _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, + size_t __l, allocator_type __a) + : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a), + char_producer<_CharT>(), + _M_base(__b), + _M_start(__s) + { + __stl_assert(__l > 0); + __stl_assert(__s + __l <= __b->_M_size); +# ifndef __GC + _M_base->_M_ref_nonnil(); +# endif + _M_tag = _S_substringfn; + } + virtual ~_Rope_RopeSubstring() + { +# ifndef __GC + _M_base->_M_unref_nonnil(); + // _M_free_c_string(); -- done by parent class +# endif + } +}; + + +// Self-destructing pointers to Rope_rep. +// These are not conventional smart pointers. Their +// only purpose in life is to ensure that unref is called +// on the pointer either at normal exit or if an exception +// is raised. It is the caller's responsibility to +// adjust reference counts when these pointers are initialized +// or assigned to. (This convention significantly reduces +// the number of potentially expensive reference count +// updates.) +#ifndef __GC + template + struct _Rope_self_destruct_ptr { + _Rope_RopeRep<_CharT,_Alloc>* _M_ptr; + ~_Rope_self_destruct_ptr() + { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); } +# ifdef __STL_USE_EXCEPTIONS + _Rope_self_destruct_ptr() : _M_ptr(0) {}; +# else + _Rope_self_destruct_ptr() {}; +# endif + _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {} + _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; } + _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; } + operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; } + _Rope_self_destruct_ptr& operator= (_Rope_RopeRep<_CharT,_Alloc>* __x) + { _M_ptr = __x; return *this; } + }; +#endif + +// Dereferencing a nonconst iterator has to return something +// that behaves almost like a reference. It's not possible to +// return an actual reference since assignment requires extra +// work. And we would get into the same problems as with the +// CD2 version of basic_string. +template +class _Rope_char_ref_proxy { + friend class rope<_CharT,_Alloc>; + friend class _Rope_iterator<_CharT,_Alloc>; + friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; +# ifdef __GC + typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; +# else + typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; +# endif + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + typedef rope<_CharT,_Alloc> _My_rope; + size_t _M_pos; + _CharT _M_current; + bool _M_current_valid; + _My_rope* _M_root; // The whole rope. + public: + _Rope_char_ref_proxy(_My_rope* __r, size_t __p) + : _M_pos(__p), _M_current_valid(false), _M_root(__r) {} + _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x) + : _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {} + // Don't preserve cache if the reference can outlive the + // expression. We claim that's not possible without calling + // a copy constructor or generating reference to a proxy + // reference. We declare the latter to have undefined semantics. + _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c) + : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} + inline operator _CharT () const; + _Rope_char_ref_proxy& operator= (_CharT __c); + _Rope_char_ptr_proxy<_CharT,_Alloc> operator& () const; + _Rope_char_ref_proxy& operator= (const _Rope_char_ref_proxy& __c) { + return operator=((_CharT)__c); + } +}; + +template +inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, + _Rope_char_ref_proxy <_CharT, __Alloc > __b) { + _CharT __tmp = __a; + __a = __b; + __b = __tmp; +} + +template +class _Rope_char_ptr_proxy { + // XXX this class should be rewritten. + friend class _Rope_char_ref_proxy<_CharT,_Alloc>; + size_t _M_pos; + rope<_CharT,_Alloc>* _M_root; // The whole rope. + public: + _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) + : _M_pos(__x._M_pos), _M_root(__x._M_root) {} + _Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x) + : _M_pos(__x._M_pos), _M_root(__x._M_root) {} + _Rope_char_ptr_proxy() {} + _Rope_char_ptr_proxy(_CharT* __x) : _M_root(0), _M_pos(0) { + __stl_assert(0 == __x); + } + _Rope_char_ptr_proxy& + operator= (const _Rope_char_ptr_proxy& __x) { + _M_pos = __x._M_pos; + _M_root = __x._M_root; + return *this; + } + template + friend bool operator== (const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __x, + const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __y); + _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const { + return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos); + } +}; + + +// Rope iterators: +// Unlike in the C version, we cache only part of the stack +// for rope iterators, since they must be efficiently copyable. +// When we run out of cache, we have to reconstruct the iterator +// value. +// Pointers from iterators are not included in reference counts. +// Iterators are assumed to be thread private. Ropes can +// be shared. + +template +class _Rope_iterator_base + : public random_access_iterator<_CharT, ptrdiff_t> { + friend class rope<_CharT,_Alloc>; + public: + typedef _Alloc _allocator_type; // used in _Rope_rotate, VC++ workaround + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // Borland doesnt want this to be protected. + protected: + enum { _S_path_cache_len = 4 }; // Must be <= 9. + enum { _S_iterator_buf_len = 15 }; + size_t _M_current_pos; + _RopeRep* _M_root; // The whole rope. + size_t _M_leaf_pos; // Starting position for current leaf + __GC_CONST _CharT* _M_buf_start; + // Buffer possibly + // containing current char. + __GC_CONST _CharT* _M_buf_ptr; + // Pointer to current char in buffer. + // != 0 ==> buffer valid. + __GC_CONST _CharT* _M_buf_end; + // One past __last valid char in buffer. + // What follows is the path cache. We go out of our + // way to make this compact. + // Path_end contains the bottom section of the path from + // the root to the current leaf. + const _RopeRep* _M_path_end[_S_path_cache_len]; + int _M_leaf_index; // Last valid __pos in path_end; + // _M_path_end[0] ... _M_path_end[leaf_index-1] + // point to concatenation nodes. + unsigned char _M_path_directions; + // (path_directions >> __i) & 1 is 1 + // iff we got from _M_path_end[leaf_index - __i - 1] + // to _M_path_end[leaf_index - __i] by going to the + // __right. Assumes path_cache_len <= 9. + _CharT _M_tmp_buf[_S_iterator_buf_len]; + // Short buffer for surrounding chars. + // This is useful primarily for + // RopeFunctions. We put the buffer + // here to avoid locking in the + // multithreaded case. + // The cached path is generally assumed to be valid + // only if the buffer is valid. + static void _S_setbuf(_Rope_iterator_base& __x); + // Set buffer contents given + // path cache. + static void _S_setcache(_Rope_iterator_base& __x); + // Set buffer contents and + // path cache. + static void _S_setcache_for_incr(_Rope_iterator_base& __x); + // As above, but assumes path + // cache is valid for previous posn. + _Rope_iterator_base() {} + _Rope_iterator_base(_RopeRep* __root, size_t __pos) + : _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) {} + void _M_incr(size_t __n); + void _M_decr(size_t __n); + public: + size_t index() const { return _M_current_pos; } + _Rope_iterator_base(const _Rope_iterator_base& __x) { + if (0 != __x._M_buf_ptr) { + *this = __x; + } else { + _M_current_pos = __x._M_current_pos; + _M_root = __x._M_root; + _M_buf_ptr = 0; + } + } +}; + +template class _Rope_iterator; + +template +class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> { + friend class rope<_CharT,_Alloc>; + protected: + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // The one from the base class may not be directly visible. + _Rope_const_iterator(const _RopeRep* __root, size_t __pos): + _Rope_iterator_base<_CharT,_Alloc>( + const_cast<_RopeRep*>(__root), __pos) + // Only nonconst iterators modify root ref count + {} + public: + typedef _CharT reference; // Really a value. Returning a reference + // Would be a mess, since it would have + // to be included in refcount. + typedef const _CharT* pointer; + + public: + _Rope_const_iterator() {}; + _Rope_const_iterator(const _Rope_const_iterator& __x) : + _Rope_iterator_base<_CharT,_Alloc>(__x) { } + _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x); + _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) : + _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos) {} + _Rope_const_iterator& operator= (const _Rope_const_iterator& __x) { + if (0 != __x._M_buf_ptr) { + *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x; + } else { + _M_current_pos = __x._M_current_pos; + _M_root = __x._M_root; + _M_buf_ptr = 0; + } + return(*this); + } + reference operator*() { + if (0 == _M_buf_ptr) _S_setcache(*this); + return *_M_buf_ptr; + } + _Rope_const_iterator& operator++() { + __GC_CONST _CharT* __next; + if (0 != _M_buf_ptr && (__next = _M_buf_ptr + 1) < _M_buf_end) { + _M_buf_ptr = __next; + ++_M_current_pos; + } else { + _M_incr(1); + } + return *this; + } + _Rope_const_iterator& operator+=(ptrdiff_t __n) { + if (__n >= 0) { + _M_incr(__n); + } else { + _M_decr(-__n); + } + return *this; + } + _Rope_const_iterator& operator--() { + _M_decr(1); + return *this; + } + _Rope_const_iterator& operator-=(ptrdiff_t __n) { + if (__n >= 0) { + _M_decr(__n); + } else { + _M_incr(-__n); + } + return *this; + } + _Rope_const_iterator operator++(int) { + size_t __old_pos = _M_current_pos; + _M_incr(1); + return _Rope_const_iterator<_CharT,_Alloc>(_M_root, __old_pos); + // This makes a subsequent dereference expensive. + // Perhaps we should instead copy the iterator + // if it has a valid cache? + } + _Rope_const_iterator operator--(int) { + size_t __old_pos = _M_current_pos; + _M_decr(1); + return _Rope_const_iterator<_CharT,_Alloc>(_M_root, __old_pos); + } + template + friend _Rope_const_iterator<_CharT2,_Alloc2> operator- + (const _Rope_const_iterator<_CharT2,_Alloc2>& __x, + ptrdiff_t __n); + template + friend _Rope_const_iterator<_CharT2,_Alloc2> operator+ + (const _Rope_const_iterator<_CharT2,_Alloc2>& __x, + ptrdiff_t __n); + template + friend _Rope_const_iterator<_CharT2,_Alloc2> operator+ + (ptrdiff_t __n, + const _Rope_const_iterator<_CharT2,_Alloc2>& __x); + reference operator[](size_t __n) { + return rope<_CharT,_Alloc>::_S_fetch(_M_root, _M_current_pos + __n); + } + + template + friend bool operator== + (const _Rope_const_iterator<_CharT2,_Alloc2>& __x, + const _Rope_const_iterator<_CharT2,_Alloc2>& __y); + template + friend bool operator< + (const _Rope_const_iterator<_CharT2,_Alloc2>& __x, + const _Rope_const_iterator<_CharT2,_Alloc2>& __y); + template + friend ptrdiff_t operator- + (const _Rope_const_iterator<_CharT2,_Alloc2>& __x, + const _Rope_const_iterator<_CharT2,_Alloc2>& __y); +}; + +template +class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> { + friend class rope<_CharT,_Alloc>; + protected: + rope<_CharT,_Alloc>* _M_root_rope; + // root is treated as a cached version of this, + // and is used to detect changes to the underlying + // rope. + // Root is included in the reference count. + // This is necessary so that we can detect changes reliably. + // Unfortunately, it requires careful bookkeeping for the + // nonGC case. + _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos) + : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr, __pos), + _M_root_rope(__r) + { _RopeRep::_S_ref(_M_root); if (!(__r -> empty()))_S_setcache(*this); } + + void _M_check(); + public: + typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; + typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer; + + public: + rope<_CharT,_Alloc>& container() { return *_M_root_rope; } + _Rope_iterator() { + _M_root = 0; // Needed for reference counting. + }; + _Rope_iterator(const _Rope_iterator& __x) : + _Rope_iterator_base<_CharT,_Alloc>(__x) { + _M_root_rope = __x._M_root_rope; + _RopeRep::_S_ref(_M_root); + } + _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos); + ~_Rope_iterator() { + _RopeRep::_S_unref(_M_root); + } + _Rope_iterator& operator= (const _Rope_iterator& __x) { + _RopeRep* __old = _M_root; + + _RopeRep::_S_ref(__x._M_root); + if (0 != __x._M_buf_ptr) { + _M_root_rope = __x._M_root_rope; + *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x; + } else { + _M_current_pos = __x._M_current_pos; + _M_root = __x._M_root; + _M_root_rope = __x._M_root_rope; + _M_buf_ptr = 0; + } + _RopeRep::_S_unref(__old); + return(*this); + } + reference operator*() { + _M_check(); + if (0 == _M_buf_ptr) { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, _M_current_pos); + } else { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, _M_current_pos, *_M_buf_ptr); + } + } + _Rope_iterator& operator++() { + _M_incr(1); + return *this; + } + _Rope_iterator& operator+=(ptrdiff_t __n) { + if (__n >= 0) { + _M_incr(__n); + } else { + _M_decr(-__n); + } + return *this; + } + _Rope_iterator& operator--() { + _M_decr(1); + return *this; + } + _Rope_iterator& operator-=(ptrdiff_t __n) { + if (__n >= 0) { + _M_decr(__n); + } else { + _M_incr(-__n); + } + return *this; + } + _Rope_iterator operator++(int) { + size_t __old_pos = _M_current_pos; + _M_incr(1); + return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); + } + _Rope_iterator operator--(int) { + size_t __old_pos = _M_current_pos; + _M_decr(1); + return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); + } + reference operator[](ptrdiff_t __n) { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, _M_current_pos + __n); + } + + template + friend bool operator== + (const _Rope_iterator<_CharT2,_Alloc2>& __x, + const _Rope_iterator<_CharT2,_Alloc2>& __y); + template + friend bool operator< + (const _Rope_iterator<_CharT2,_Alloc2>& __x, + const _Rope_iterator<_CharT2,_Alloc2>& __y); + template + friend ptrdiff_t operator- + (const _Rope_iterator<_CharT2,_Alloc2>& __x, + const _Rope_iterator<_CharT2,_Alloc2>& __y); + template + friend _Rope_iterator<_CharT2,_Alloc2> operator- + (const _Rope_iterator<_CharT2,_Alloc2>& __x, + ptrdiff_t __n); + template + friend _Rope_iterator<_CharT2,_Alloc2> operator+ + (const _Rope_iterator<_CharT2,_Alloc2>& __x, + ptrdiff_t __n); + template + friend _Rope_iterator<_CharT2,_Alloc2> operator+ + (ptrdiff_t __n, + const _Rope_iterator<_CharT2,_Alloc2>& __x); +}; + +// The rope base class encapsulates +// the differences between SGI-style allocators and standard-conforming +// allocators. + +// Base class for ordinary allocators. +template +class _Rope_alloc_base { +public: + typedef _Rope_RopeRep<_CharT,_Allocator> _RopeRep; + typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + _Rope_alloc_base(_RopeRep *__t, const allocator_type& __a) + : _M_tree_ptr(__t), _M_data_allocator(__a) {} + _Rope_alloc_base(const allocator_type& __a) + : _M_data_allocator(__a) {} + +protected: + // The only data members of a rope: + allocator_type _M_data_allocator; + _RopeRep* _M_tree_ptr; + +# define __ROPE_DEFINE_ALLOC(_Tp, __name) \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \ + _Tp* __name##_allocate(size_t __n) const \ + { return __name##Allocator(_M_data_allocator).allocate(__n); } \ + void __name##_deallocate(_Tp *__p, size_t __n) const \ + { __name##Allocator(_M_data_allocator).deallocate(__p, __n); } + __ROPE_DEFINE_ALLOCS(_Allocator) +# undef __ROPE_DEFINE_ALLOC +}; + +// Specialization for allocators that have the property that we don't +// actually have to store an allocator object. +template +class _Rope_alloc_base<_CharT,_Allocator,true> { +public: + typedef _Rope_RopeRep<_CharT,_Allocator> _RopeRep; + typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + _Rope_alloc_base(_RopeRep *__t, const allocator_type&) + : _M_tree_ptr(__t) {} + _Rope_alloc_base(const allocator_type&) {} + +protected: + // The only data member of a rope: + _RopeRep *_M_tree_ptr; + +# define __ROPE_DEFINE_ALLOC(_Tp, __name) \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::_Alloc_type __name##Alloc; \ + typedef typename \ + _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \ + static _Tp* __name##_allocate(size_t __n) \ + { return __name##Alloc::allocate(__n); } \ + static void __name##_deallocate(_Tp *__p, size_t __n) \ + { __name##Alloc::deallocate(__p, __n); } + __ROPE_DEFINE_ALLOCS(_Allocator) +# undef __ROPE_DEFINE_ALLOC +}; + +template +struct _Rope_base + : public _Rope_alloc_base<_CharT,_Alloc, + _Alloc_traits<_CharT,_Alloc>::_S_instanceless> +{ + typedef _Rope_alloc_base<_CharT,_Alloc, + _Alloc_traits<_CharT,_Alloc>::_S_instanceless> + _Base; + typedef typename _Base::allocator_type allocator_type; + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // The one in _Base may not be visible due to template rules. + _Rope_base(_RopeRep* __t, const allocator_type& __a) : _Base(__t, __a) {} + _Rope_base(const allocator_type& __a) : _Base(__a) {} +}; + + +template +class rope : public _Rope_base<_CharT,_Alloc> { + public: + typedef _CharT value_type; + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef _CharT const_reference; + typedef const _CharT* const_pointer; + typedef _Rope_iterator<_CharT,_Alloc> iterator; + typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator; + typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; + typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer; + + friend class _Rope_iterator<_CharT,_Alloc>; + friend class _Rope_const_iterator<_CharT,_Alloc>; + friend struct _Rope_RopeRep<_CharT,_Alloc>; + friend class _Rope_iterator_base<_CharT,_Alloc>; + friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; + friend class _Rope_char_ref_proxy<_CharT,_Alloc>; + friend struct _Rope_RopeSubstring<_CharT,_Alloc>; + + protected: + typedef _Rope_base<_CharT,_Alloc> _Base; + typedef typename _Base::allocator_type allocator_type; + using _Base::_M_tree_ptr; + typedef __GC_CONST _CharT* _Cstrptr; + + static _CharT _S_empty_c_str[1]; + + static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); } + enum { _S_copy_max = 23 }; + // For strings shorter than _S_copy_max, we copy to + // concatenate. + + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation; + typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf; + typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction; + typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring; + + // Retrieve a character at the indicated position. + static _CharT _S_fetch(_RopeRep* __r, size_type __pos); + +# ifndef __GC + // Obtain a pointer to the character at the indicated position. + // The pointer can be used to change the character. + // If such a pointer cannot be produced, as is frequently the + // case, 0 is returned instead. + // (Returns nonzero only if all nodes in the path have a refcount + // of 1.) + static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos); +# endif + + static bool _S_apply_to_pieces( + // should be template parameter + _Rope_char_consumer<_CharT>& __c, + const _RopeRep* __r, + size_t __begin, size_t __end); + // begin and end are assumed to be in range. + +# ifndef __GC + static void _S_unref(_RopeRep* __t) + { + _RopeRep::_S_unref(__t); + } + static void _S_ref(_RopeRep* __t) + { + _RopeRep::_S_ref(__t); + } +# else /* __GC */ + static void _S_unref(_RopeRep*) {} + static void _S_ref(_RopeRep*) {} +# endif + + +# ifdef __GC + typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; +# else + typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; +# endif + + // _Result is counted in refcount. + static _RopeRep* _S_substring(_RopeRep* __base, + size_t __start, size_t __endp1); + + static _RopeRep* _S_concat_char_iter(_RopeRep* __r, + const _CharT* __iter, size_t __slen); + // Concatenate rope and char ptr, copying __s. + // Should really take an arbitrary iterator. + // Result is counted in refcount. + static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r, + const _CharT* __iter, size_t __slen) + // As above, but one reference to __r is about to be + // destroyed. Thus the pieces may be recycled if all + // relevent reference counts are 1. +# ifdef __GC + // We can't really do anything since refcounts are unavailable. + { return _S_concat_char_iter(__r, __iter, __slen); } +# else + ; +# endif + + static _RopeRep* _S_concat(_RopeRep* __left, _RopeRep* __right); + // General concatenation on _RopeRep. _Result + // has refcount of 1. Adjusts argument refcounts. + + public: + void apply_to_pieces( size_t __begin, size_t __end, + _Rope_char_consumer<_CharT>& __c) const { + _S_apply_to_pieces(__c, _M_tree_ptr, __begin, __end); + } + + + protected: + + static size_t _S_rounded_up_size(size_t __n) { + return _RopeLeaf::_S_rounded_up_size(__n); + } + + static size_t _S_allocated_capacity(size_t __n) { + if (_S_is_basic_char_type((_CharT*)0)) { + return _S_rounded_up_size(__n) - 1; + } else { + return _S_rounded_up_size(__n); + } + } + + // Allocate and construct a RopeLeaf using the supplied allocator + // Takes ownership of s instead of copying. + static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s, + size_t __size, allocator_type __a) + { + _RopeLeaf* __space = _LAllocator(__a).allocate(1); + return new(__space) _RopeLeaf(__s, __size, __a); + } + + static _RopeConcatenation* _S_new_RopeConcatenation( + _RopeRep* __left, _RopeRep* __right, + allocator_type __a) + { + _RopeConcatenation* __space = _CAllocator(__a).allocate(1); + return new(__space) _RopeConcatenation(__left, __right, __a); + } + + static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f, + size_t __size, bool __d, allocator_type __a) + { + _RopeFunction* __space = _FAllocator(__a).allocate(1); + return new(__space) _RopeFunction(__f, __size, __d, __a); + } + + static _RopeSubstring* _S_new_RopeSubstring( + _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, + size_t __l, allocator_type __a) + { + _RopeSubstring* __space = _SAllocator(__a).allocate(1); + return new(__space) _RopeSubstring(__b, __s, __l, __a); + } + + static + _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s, + size_t __size, allocator_type __a) +# define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \ + _S_RopeLeaf_from_unowned_char_ptr(__s, __size, __a) + { + if (0 == __size) return 0; + _CharT* __buf = __a.allocate(_S_rounded_up_size(__size)); + + uninitialized_copy_n(__s, __size, __buf); + _S_cond_store_eos(__buf[__size]); + __STL_TRY { + return _S_new_RopeLeaf(__buf, __size, __a); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__buf, __size, __a)) + } + + + // Concatenation of nonempty strings. + // Always builds a concatenation node. + // Rebalances if the result is too deep. + // Result has refcount 1. + // Does not increment left and right ref counts even though + // they are referenced. + static _RopeRep* + _S_tree_concat(_RopeRep* __left, _RopeRep* __right); + + // Concatenation helper functions + static _RopeLeaf* + _S_leaf_concat_char_iter(_RopeLeaf* __r, + const _CharT* __iter, size_t __slen); + // Concatenate by copying leaf. + // should take an arbitrary iterator + // result has refcount 1. +# ifndef __GC + static _RopeLeaf* _S_destr_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __slen); + // A version that potentially clobbers __r if __r->_M_ref_count == 1. +# endif + + private: + + static size_t _S_char_ptr_len(const _CharT* __s); + // slightly generalized strlen + + rope(_RopeRep* __t, const allocator_type& __a = allocator_type()) + : _Base(__t,__a) { } + + + // Copy __r to the _CharT buffer. + // Returns __buffer + __r->_M_size. + // Assumes that buffer is uninitialized. + static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer); + + // Again, with explicit starting position and length. + // Assumes that buffer is uninitialized. + static _CharT* _S_flatten(_RopeRep* __r, + size_t __start, size_t __len, + _CharT* __buffer); + + static const unsigned long + _S_min_len[_RopeRep::_S_max_rope_depth + 1]; + + static bool _S_is_balanced(_RopeRep* __r) + { return (__r->_M_size >= _S_min_len[__r->_M_depth]); } + + static bool _S_is_almost_balanced(_RopeRep* __r) + { return (__r->_M_depth == 0 || + __r->_M_size >= _S_min_len[__r->_M_depth - 1]); } + + static bool _S_is_roughly_balanced(_RopeRep* __r) + { return (__r->_M_depth <= 1 || + __r->_M_size >= _S_min_len[__r->_M_depth - 2]); } + + // Assumes the result is not empty. + static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left, + _RopeRep* __right) + { + _RopeRep* __result = _S_concat(__left, __right); + if (_S_is_balanced(__result)) __result->_M_is_balanced = true; + return __result; + } + + // The basic rebalancing operation. Logically copies the + // rope. The result has refcount of 1. The client will + // usually decrement the reference count of __r. + // The result is within height 2 of balanced by the above + // definition. + static _RopeRep* _S_balance(_RopeRep* __r); + + // Add all unbalanced subtrees to the forest of balanceed trees. + // Used only by balance. + static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest); + + // Add __r to forest, assuming __r is already balanced. + static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest); + + // Print to stdout, exposing structure + static void _S_dump(_RopeRep* __r, int __indent = 0); + + // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp. + static int _S_compare(const _RopeRep* __x, const _RopeRep* __y); + + public: + bool empty() const { return 0 == _M_tree_ptr; } + + // Comparison member function. This is public only for those + // clients that need a ternary comparison. Others + // should use the comparison operators below. + int compare(const rope& __y) const { + return _S_compare(_M_tree_ptr, __y._M_tree_ptr); + } + + rope(const _CharT* __s, const allocator_type& __a = allocator_type()) + : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s), + __a),__a) + { } + + rope(const _CharT* __s, size_t __len, + const allocator_type& __a = allocator_type()) + : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a), __a) + { } + + // Should perhaps be templatized with respect to the iterator type + // and use Sequence_buffer. (It should perhaps use sequence_buffer + // even now.) + rope(const _CharT *__s, const _CharT *__e, + const allocator_type& __a = allocator_type()) + : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a), __a) + { } + + rope(const const_iterator& __s, const const_iterator& __e, + const allocator_type& __a = allocator_type()) + : _Base(_S_substring(__s._M_root, __s._M_current_pos, + __e._M_current_pos), __a) + { } + + rope(const iterator& __s, const iterator& __e, + const allocator_type& __a = allocator_type()) + : _Base(_S_substring(__s._M_root, __s._M_current_pos, + __e._M_current_pos), __a) + { } + + rope(_CharT __c, const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _CharT* __buf = _Data_allocate(_S_rounded_up_size(1)); + + construct(__buf, __c); + __STL_TRY { + _M_tree_ptr = _S_new_RopeLeaf(__buf, 1, __a); + } + __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__buf, 1, __a)) + } + + rope(size_t __n, _CharT __c, + const allocator_type& __a = allocator_type()); + + rope(const allocator_type& __a = allocator_type()) + : _Base(0, __a) {} + + // Construct a rope from a function that can compute its members + rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_tree_ptr = (0 == __len) ? + 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a); + } + + rope(const rope& __x, const allocator_type& __a = allocator_type()) + : _Base(__x._M_tree_ptr, __a) + { + _S_ref(_M_tree_ptr); + } + + ~rope() + { + _S_unref(_M_tree_ptr); + } + + rope& operator=(const rope& __x) + { + _RopeRep* __old = _M_tree_ptr; + __stl_assert(get_allocator() == __x.get_allocator()); + _M_tree_ptr = __x._M_tree_ptr; + _S_ref(_M_tree_ptr); + _S_unref(__old); + return(*this); + } + + void clear() + { + _S_unref(_M_tree_ptr); + _M_tree_ptr = 0; + } + + void push_back(_CharT __x) + { + _RopeRep* __old = _M_tree_ptr; + _M_tree_ptr = _S_destr_concat_char_iter(_M_tree_ptr, &__x, 1); + _S_unref(__old); + } + + void pop_back() + { + _RopeRep* __old = _M_tree_ptr; + _M_tree_ptr = + _S_substring(_M_tree_ptr, 0, _M_tree_ptr->_M_size - 1); + _S_unref(__old); + } + + _CharT back() const + { + return _S_fetch(_M_tree_ptr, _M_tree_ptr->_M_size - 1); + } + + void push_front(_CharT __x) + { + _RopeRep* __old = _M_tree_ptr; + _RopeRep* __left = + __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, get_allocator()); + __STL_TRY { + _M_tree_ptr = _S_concat(__left, _M_tree_ptr); + _S_unref(__old); + _S_unref(__left); + } + __STL_UNWIND(_S_unref(__left)) + } + + void pop_front() + { + _RopeRep* __old = _M_tree_ptr; + _M_tree_ptr = _S_substring(_M_tree_ptr, 1, _M_tree_ptr->_M_size); + _S_unref(__old); + } + + _CharT front() const + { + return _S_fetch(_M_tree_ptr, 0); + } + + void balance() + { + _RopeRep* __old = _M_tree_ptr; + _M_tree_ptr = _S_balance(_M_tree_ptr); + _S_unref(__old); + } + + void copy(_CharT* __buffer) const { + destroy(__buffer, __buffer + size()); + _S_flatten(_M_tree_ptr, __buffer); + } + + // This is the copy function from the standard, but + // with the arguments reordered to make it consistent with the + // rest of the interface. + // Note that this guaranteed not to compile if the draft standard + // order is assumed. + size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const + { + size_t __size = size(); + size_t __len = (__pos + __n > __size? __size - __pos : __n); + + destroy(__buffer, __buffer + __len); + _S_flatten(_M_tree_ptr, __pos, __len, __buffer); + return __len; + } + + // Print to stdout, exposing structure. May be useful for + // performance debugging. + void dump() { + _S_dump(_M_tree_ptr); + } + + // Convert to 0 terminated string in new allocated memory. + // Embedded 0s in the input do not terminate the copy. + const _CharT* c_str() const; + + // As above, but lso use the flattened representation as the + // the new rope representation. + const _CharT* replace_with_c_str(); + + // Reclaim memory for the c_str generated flattened string. + // Intentionally undocumented, since it's hard to say when this + // is safe for multiple threads. + void delete_c_str () { + if (0 == _M_tree_ptr) return; + if (_RopeRep::_S_leaf == _M_tree_ptr->_M_tag && + ((_RopeLeaf*)_M_tree_ptr)->_M_data == + _M_tree_ptr->_M_c_string) { + // Representation shared + return; + } +# ifndef __GC + _M_tree_ptr->_M_free_c_string(); +# endif + _M_tree_ptr->_M_c_string = 0; + } + + _CharT operator[] (size_type __pos) const { + return _S_fetch(_M_tree_ptr, __pos); + } + + _CharT at(size_type __pos) const { + // if (__pos >= size()) throw out_of_range; // XXX + return (*this)[__pos]; + } + + const_iterator begin() const { + return(const_iterator(_M_tree_ptr, 0)); + } + + // An easy way to get a const iterator from a non-const container. + const_iterator const_begin() const { + return(const_iterator(_M_tree_ptr, 0)); + } + + const_iterator end() const { + return(const_iterator(_M_tree_ptr, size())); + } + + const_iterator const_end() const { + return(const_iterator(_M_tree_ptr, size())); + } + + size_type size() const { + return(0 == _M_tree_ptr? 0 : _M_tree_ptr->_M_size); + } + + size_type length() const { + return size(); + } + + size_type max_size() const { + return _S_min_len[_RopeRep::_S_max_rope_depth-1] - 1; + // Guarantees that the result can be sufficirntly + // balanced. Longer ropes will probably still work, + // but it's harder to make guarantees. + } + + typedef reverse_iterator const_reverse_iterator; + + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + + const_reverse_iterator const_rbegin() const { + return const_reverse_iterator(end()); + } + + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + const_reverse_iterator const_rend() const { + return const_reverse_iterator(begin()); + } + + template + friend rope<_CharT2,_Alloc2> + operator+ (const rope<_CharT2,_Alloc2>& __left, + const rope<_CharT2,_Alloc2>& __right); + + template + friend rope<_CharT2,_Alloc2> + operator+ (const rope<_CharT2,_Alloc2>& __left, + const _CharT2* __right); + + template + friend rope<_CharT2,_Alloc2> + operator+ (const rope<_CharT2,_Alloc2>& __left, _CharT2 __right); + // The symmetric cases are intentionally omitted, since they're presumed + // to be less common, and we don't handle them as well. + + // The following should really be templatized. + // The first argument should be an input iterator or + // forward iterator with value_type _CharT. + rope& append(const _CharT* __iter, size_t __n) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr, __iter, __n); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + return *this; + } + + rope& append(const _CharT* __c_string) { + size_t __len = _S_char_ptr_len(__c_string); + append(__c_string, __len); + return(*this); + } + + rope& append(const _CharT* __s, const _CharT* __e) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr, __s, __e - __s); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + return *this; + } + + rope& append(const_iterator __s, const_iterator __e) { + __stl_assert(__s._M_root == __e._M_root); + __stl_assert(get_allocator() == __s._M_root->get_allocator()); + _Self_destruct_ptr __appendee(_S_substring( + __s._M_root, __s._M_current_pos, __e._M_current_pos)); + _RopeRep* __result = + _S_concat(_M_tree_ptr, (_RopeRep*)__appendee); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + return *this; + } + + rope& append(_CharT __c) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr, &__c, 1); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + return *this; + } + + rope& append() { return append(_CharT()); } // XXX why? + + rope& append(const rope& __y) { + __stl_assert(__y.get_allocator() == get_allocator()); + _RopeRep* __result = _S_concat(_M_tree_ptr, __y._M_tree_ptr); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + return *this; + } + + rope& append(size_t __n, _CharT __c) { + rope<_CharT,_Alloc> __last(__n, __c); + return append(__last); + } + + void swap(rope& __b) { + __stl_assert(get_allocator() == __b.get_allocator()); + _RopeRep* __tmp = _M_tree_ptr; + _M_tree_ptr = __b._M_tree_ptr; + __b._M_tree_ptr = __tmp; + } + + + protected: + // Result is included in refcount. + static _RopeRep* replace(_RopeRep* __old, size_t __pos1, + size_t __pos2, _RopeRep* __r) { + if (0 == __old) { _S_ref(__r); return __r; } + _Self_destruct_ptr __left( + _S_substring(__old, 0, __pos1)); + _Self_destruct_ptr __right( + _S_substring(__old, __pos2, __old->_M_size)); + _RopeRep* __result; + + __stl_assert(__old->get_allocator() == __r->get_allocator()); + if (0 == __r) { + __result = _S_concat(__left, __right); + } else { + _Self_destruct_ptr __left_result(_S_concat(__left, __r)); + __result = _S_concat(__left_result, __right); + } + return __result; + } + + public: + void insert(size_t __p, const rope& __r) { + _RopeRep* __result = + replace(_M_tree_ptr, __p, __p, __r._M_tree_ptr); + __stl_assert(get_allocator() == __r.get_allocator()); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + } + + void insert(size_t __p, size_t __n, _CharT __c) { + rope<_CharT,_Alloc> __r(__n,__c); + insert(__p, __r); + } + + void insert(size_t __p, const _CharT* __i, size_t __n) { + _Self_destruct_ptr __left(_S_substring(_M_tree_ptr, 0, __p)); + _Self_destruct_ptr __right(_S_substring(_M_tree_ptr, __p, size())); + _Self_destruct_ptr __left_result( + _S_concat_char_iter(__left, __i, __n)); + // _S_ destr_concat_char_iter should be safe here. + // But as it stands it's probably not a win, since __left + // is likely to have additional references. + _RopeRep* __result = _S_concat(__left_result, __right); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + } + + void insert(size_t __p, const _CharT* __c_string) { + insert(__p, __c_string, _S_char_ptr_len(__c_string)); + } + + void insert(size_t __p, _CharT __c) { + insert(__p, &__c, 1); + } + + void insert(size_t __p) { + _CharT __c = _CharT(); + insert(__p, &__c, 1); + } + + void insert(size_t __p, const _CharT* __i, const _CharT* __j) { + rope __r(__i, __j); + insert(__p, __r); + } + + void insert(size_t __p, const const_iterator& __i, + const const_iterator& __j) { + rope __r(__i, __j); + insert(__p, __r); + } + + void insert(size_t __p, const iterator& __i, + const iterator& __j) { + rope __r(__i, __j); + insert(__p, __r); + } + + // (position, length) versions of replace operations: + + void replace(size_t __p, size_t __n, const rope& __r) { + _RopeRep* __result = + replace(_M_tree_ptr, __p, __p + __n, __r._M_tree_ptr); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + } + + void replace(size_t __p, size_t __n, + const _CharT* __i, size_t __i_len) { + rope __r(__i, __i_len); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, _CharT __c) { + rope __r(__c); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, const _CharT* __c_string) { + rope __r(__c_string); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const _CharT* __i, const _CharT* __j) { + rope __r(__i, __j); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const const_iterator& __i, const const_iterator& __j) { + rope __r(__i, __j); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const iterator& __i, const iterator& __j) { + rope __r(__i, __j); + replace(__p, __n, __r); + } + + // Single character variants: + void replace(size_t __p, _CharT __c) { + iterator __i(this, __p); + *__i = __c; + } + + void replace(size_t __p, const rope& __r) { + replace(__p, 1, __r); + } + + void replace(size_t __p, const _CharT* __i, size_t __i_len) { + replace(__p, 1, __i, __i_len); + } + + void replace(size_t __p, const _CharT* __c_string) { + replace(__p, 1, __c_string); + } + + void replace(size_t __p, const _CharT* __i, const _CharT* __j) { + replace(__p, 1, __i, __j); + } + + void replace(size_t __p, const const_iterator& __i, + const const_iterator& __j) { + replace(__p, 1, __i, __j); + } + + void replace(size_t __p, const iterator& __i, + const iterator& __j) { + replace(__p, 1, __i, __j); + } + + // Erase, (position, size) variant. + void erase(size_t __p, size_t __n) { + _RopeRep* __result = replace(_M_tree_ptr, __p, __p + __n, 0); + _S_unref(_M_tree_ptr); + _M_tree_ptr = __result; + } + + // Erase, single character + void erase(size_t __p) { + erase(__p, __p + 1); + } + + // Insert, iterator variants. + iterator insert(const iterator& __p, const rope& __r) + { insert(__p.index(), __r); return __p; } + iterator insert(const iterator& __p, size_t __n, _CharT __c) + { insert(__p.index(), __n, __c); return __p; } + iterator insert(const iterator& __p, _CharT __c) + { insert(__p.index(), __c); return __p; } + iterator insert(const iterator& __p ) + { insert(__p.index()); return __p; } + iterator insert(const iterator& __p, const _CharT* c_string) + { insert(__p.index(), c_string); return __p; } + iterator insert(const iterator& __p, const _CharT* __i, size_t __n) + { insert(__p.index(), __i, __n); return __p; } + iterator insert(const iterator& __p, const _CharT* __i, + const _CharT* __j) + { insert(__p.index(), __i, __j); return __p; } + iterator insert(const iterator& __p, + const const_iterator& __i, const const_iterator& __j) + { insert(__p.index(), __i, __j); return __p; } + iterator insert(const iterator& __p, + const iterator& __i, const iterator& __j) + { insert(__p.index(), __i, __j); return __p; } + + // Replace, range variants. + void replace(const iterator& __p, const iterator& __q, + const rope& __r) + { replace(__p.index(), __q.index() - __p.index(), __r); } + void replace(const iterator& __p, const iterator& __q, _CharT __c) + { replace(__p.index(), __q.index() - __p.index(), __c); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __c_string) + { replace(__p.index(), __q.index() - __p.index(), __c_string); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __i, size_t __n) + { replace(__p.index(), __q.index() - __p.index(), __i, __n); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __i, const _CharT* __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + void replace(const iterator& __p, const iterator& __q, + const const_iterator& __i, const const_iterator& __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + void replace(const iterator& __p, const iterator& __q, + const iterator& __i, const iterator& __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + + // Replace, iterator variants. + void replace(const iterator& __p, const rope& __r) + { replace(__p.index(), __r); } + void replace(const iterator& __p, _CharT __c) + { replace(__p.index(), __c); } + void replace(const iterator& __p, const _CharT* __c_string) + { replace(__p.index(), __c_string); } + void replace(const iterator& __p, const _CharT* __i, size_t __n) + { replace(__p.index(), __i, __n); } + void replace(const iterator& __p, const _CharT* __i, const _CharT* __j) + { replace(__p.index(), __i, __j); } + void replace(const iterator& __p, const_iterator __i, + const_iterator __j) + { replace(__p.index(), __i, __j); } + void replace(const iterator& __p, iterator __i, iterator __j) + { replace(__p.index(), __i, __j); } + + // Iterator and range variants of erase + iterator erase(const iterator& __p, const iterator& __q) { + size_t __p_index = __p.index(); + erase(__p_index, __q.index() - __p_index); + return iterator(this, __p_index); + } + iterator erase(const iterator& __p) { + size_t __p_index = __p.index(); + erase(__p_index, 1); + return iterator(this, __p_index); + } + + rope substr(size_t __start, size_t __len = 1) const { + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr, __start, __start + __len)); + } + + rope substr(iterator __start, iterator __end) const { + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr, __start.index(), __end.index())); + } + + rope substr(iterator __start) const { + size_t __pos = __start.index(); + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr, __pos, __pos + 1)); + } + + rope substr(const_iterator __start, const_iterator __end) const { + // This might eventually take advantage of the cache in the + // iterator. + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr, __start.index(), __end.index())); + } + + rope<_CharT,_Alloc> substr(const_iterator __start) { + size_t __pos = __start.index(); + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr, __pos, __pos + 1)); + } + + static const size_type npos; + + size_type find(_CharT __c, size_type __pos = 0) const; + size_type find(const _CharT* __s, size_type __pos = 0) const { + size_type __result_pos; + const_iterator __result = search(const_begin() + __pos, const_end(), + __s, __s + _S_char_ptr_len(__s)); + __result_pos = __result.index(); +# ifndef __STL_OLD_ROPE_SEMANTICS + if (__result_pos == size()) __result_pos = npos; +# endif + return __result_pos; + } + + iterator mutable_begin() { + return(iterator(this, 0)); + } + + iterator mutable_end() { + return(iterator(this, size())); + } + + typedef reverse_iterator reverse_iterator; + + reverse_iterator mutable_rbegin() { + return reverse_iterator(mutable_end()); + } + + reverse_iterator mutable_rend() { + return reverse_iterator(mutable_begin()); + } + + reference mutable_reference_at(size_type __pos) { + return reference(this, __pos); + } + +# ifdef __STD_STUFF + reference operator[] (size_type __pos) { + return _char_ref_proxy(this, __pos); + } + + reference at(size_type __pos) { + // if (__pos >= size()) throw out_of_range; // XXX + return (*this)[__pos]; + } + + void resize(size_type __n, _CharT __c) {} + void resize(size_type __n) {} + void reserve(size_type __res_arg = 0) {} + size_type capacity() const { + return max_size(); + } + + // Stuff below this line is dangerous because it's error prone. + // I would really like to get rid of it. + // copy function with funny arg ordering. + size_type copy(_CharT* __buffer, size_type __n, + size_type __pos = 0) const { + return copy(__pos, __n, __buffer); + } + + iterator end() { return mutable_end(); } + + iterator begin() { return mutable_begin(); } + + reverse_iterator rend() { return mutable_rend(); } + + reverse_iterator rbegin() { return mutable_rbegin(); } + +# else + + const_iterator end() { return const_end(); } + + const_iterator begin() { return const_begin(); } + + const_reverse_iterator rend() { return const_rend(); } + + const_reverse_iterator rbegin() { return const_rbegin(); } + +# endif + +}; + +template +const rope<_CharT, _Alloc>::size_type rope<_CharT, _Alloc>::npos = + (size_type)(-1); + +template +inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos == __y._M_current_pos && + __x._M_root == __y._M_root); +} + +template +inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos < __y._M_current_pos); +} + +template +inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; +} + +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos - __n); +} + +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos + __n); +} + +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos + __n); +} + +template +inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos == __y._M_current_pos && + __x._M_root_rope == __y._M_root_rope); +} + +template +inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos < __y._M_current_pos); +} + +template +inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; +} + +template +inline _Rope_iterator<_CharT,_Alloc> +operator-(const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos - __n); +} + +template +inline _Rope_iterator<_CharT,_Alloc> +operator+(const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos + __n); +} + +template +inline _Rope_iterator<_CharT,_Alloc> +operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos + __n); +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) +{ + __stl_assert(__left.get_allocator() == __right.get_allocator()); + return rope<_CharT,_Alloc>( + rope<_CharT,_Alloc>::_S_concat(__left._M_tree_ptr, __right._M_tree_ptr)); + // Inlining this should make it possible to keep __left and + // __right in registers. +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) +{ + __left.append(__right); + return __left; +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, + const _CharT* __right) { + size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right); + return rope<_CharT,_Alloc>( + rope<_CharT,_Alloc>::_S_concat_char_iter( + __left._M_tree_ptr, __right, __rlen)); +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, + const _CharT* __right) { + __left.append(__right); + return __left; +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, _CharT __right) { + return rope<_CharT,_Alloc>( + rope<_CharT,_Alloc>::_S_concat_char_iter( + __left._M_tree_ptr, &__right, 1)); +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, _CharT __right) { + __left.append(__right); + return __left; +} + +template +bool +operator< (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) { + return __left.compare(__right) < 0; +} + +template +bool +operator== (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) { + return __left.compare(__right) == 0; +} + +template +inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, + const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { + return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root); +} + +template +inline bool +operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool +operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool +operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool +operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, + const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +basic_ostream<_CharT, _Traits>& operator<< + (basic_ostream<_CharT, _Traits>& __o, + const rope<_CharT, _Alloc>& __r); + +typedef rope crope; +typedef rope wrope; + +inline crope::reference __mutable_reference_at(crope& __c, size_t __i) +{ + return __c.mutable_reference_at(__i); +} + +inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i) +{ + return __c.mutable_reference_at(__i); +} + +template +inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) { + __x.swap(__y); +} + +// Hash functions should probably be revisited later: +template<> struct hash +{ + size_t operator()(const crope& __str) const + { + size_t __size = __str.size(); + + if (0 == __size) return 0; + return 13*__str[0] + 5*__str[__size - 1] + __size; + } +}; + + +template<> struct hash +{ + size_t operator()(const wrope& __str) const + { + size_t __size = __str.size(); + + if (0 == __size) return 0; + return 13*__str[0] + 5*__str[__size - 1] + __size; + } +}; + +} // namespace std + +# include + +# endif /* __SGI_STL_INTERNAL_ROPE_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/ext/tree b/contrib/media/updf/include/ext/tree new file mode 100644 index 0000000000..f6faf976e3 --- /dev/null +++ b/contrib/media/updf/include/ext/tree @@ -0,0 +1,23 @@ + +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _CPP_EXT_TREE +#define _CPP_EXT_TREE 1 +#include +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/contrib/media/updf/include/extern.h b/contrib/media/updf/include/extern.h new file mode 100644 index 0000000000..a9106f9ff2 --- /dev/null +++ b/contrib/media/updf/include/extern.h @@ -0,0 +1,148 @@ +/*- + * Copyright (c) 1994, 2000 The Regents of the University of California. + * All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)extern.h 8.3 (Berkeley) 10/9/94 + */ + +struct timeval; +struct fd_set; + +void abort_remote __P((FILE *)); +void abortpt __P(()); +void abortrecv __P(()); +void abortsend __P(()); +void account __P((int, char **)); +int another __P((int *, char ***, char *)); +void blkfree __P((char **)); +void cd __P((int, char **)); +void cdup __P((int, char **)); +void changetype __P((int, int)); +void cmdabort __P(()); +void cmdscanner __P((int)); +int command __P((const char *fmt, ...)); +int confirm __P((char *, char *)); +FILE *dataconn __P((char *)); +void delete __P((int, char **)); +void disconnect __P((int, char **)); +void do_chmod __P((int, char **)); +void do_umask __P((int, char **)); +void domacro __P((int, char **)); +char *domap __P((char *)); +void doproxy __P((int, char **)); +char *dotrans __P((char *)); +void fatal __P((char *)); +void get __P((int, char **)); +struct cmd *getcmd __P((char *)); +int getit __P((int, char **, int, char *)); +int getreply __P((int)); +char *globulize __P((char *)); +char *gunique __P((char *)); +void help __P((int, char **)); +char *hookup __P((char *, int)); +void site_idle __P((int, char **)); +int initconn __P((void)); +void intr __P(()); +void lcd __P((int, char **)); +int login __P((char *)); +void lostpeer __P(()); +void ls __P((int, char **)); +void mabort __P((int)); +void macdef __P((int, char **)); +void makeargv __P((void)); +void makedir __P((int, char **)); +void mdelete __P((int, char **)); +void mget __P((int, char **)); +void mls __P((int, char **)); +void modtime __P((int, char **)); +void mput __P((int, char **)); +char *onoff __P((int)); +void newer __P((int, char **)); +void proxabort __P(()); +void proxtrans __P((char *, char *, char *)); +void psabort __P(()); +void pswitch __P((int)); +void ptransfer __P((char *, long, struct timeval *, struct timeval *)); +void put __P((int, char **)); +void pwd __P((int, char **)); +void quit __P((int, char **)); +void quote __P((int, char **)); +void quote1 __P((char *, int, char **)); +void recvrequest __P((char *, char *, char *, char *, int)); +void reget __P((int, char **)); +char *remglob __P((char **, int)); +void removedir __P((int, char **)); +void renamefile __P((int, char **)); +void reset __P((int, char **)); +void restart __P((int, char **)); +void rmthelp __P((int, char **)); +void rmtstatus __P((int, char **)); +int ruserpass __P((char *, char **, char **, char **)); +void sendrequest __P((char *, char *, char *, int)); +void setascii __P((int, char **)); +void setbell __P((int, char **)); +void setbinary __P((int, char **)); +void setcase __P((int, char **)); +void setcr __P((int, char **)); +void setdebug __P((int, char **)); +void setform __P((int, char **)); +void setftmode __P((int, char **)); +void setglob __P((int, char **)); +void sethash __P((int, char **)); +void setnmap __P((int, char **)); +void setntrans __P((int, char **)); +void setpassive __P((int, char **)); +void setpeer __P((int, char **)); +void setport __P((int, char **)); +void setprompt __P((int, char **)); +void setrunique __P((int, char **)); +void setstruct __P((int, char **)); +void setsunique __P((int, char **)); +void settenex __P((int, char **)); +void settrace __P((int, char **)); +void settype __P((int, char **)); +void setverbose __P((int, char **)); +void shell __P((int, char **)); +void site __P((int, char **)); +void sizecmd __P((int, char **)); +char *slurpstring __P((void)); +void status __P((int, char **)); +void syst __P((int, char **)); +void tvsub __P((struct timeval *, struct timeval *, struct timeval *)); +void user __P((int, char **)); + +extern jmp_buf abortprox; +extern int abrtflag; +extern struct cmd cmdtab[]; +extern FILE *cout; +extern int data; +extern char *home; +extern jmp_buf jabort; +extern int proxy; +extern char reply_string[]; +extern off_t restart_point; +extern int NCMDS; diff --git a/contrib/media/updf/include/externs.h b/contrib/media/updf/include/externs.h new file mode 100644 index 0000000000..3a6a3aec72 --- /dev/null +++ b/contrib/media/updf/include/externs.h @@ -0,0 +1,489 @@ +/* + * Copyright (c) 1988, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)externs.h 8.3 (Berkeley) 5/30/95 + */ + +#ifndef BSD +# define BSD 43 +#endif + +#ifdef HAVE_TERMIOS_H +#define USE_TERMIO +#else /* !HAVE_TERMIOS_H */ +#ifdef HAVE_TERMIO_H +#define USE_TERMIO +#define SYSV_TERMIO +#endif +#endif /* HAVE_TERMIOS_H */ + +/* + * ucb stdio.h defines BSD as something wierd + */ +#if defined(sun) && defined(__svr4__) +#define BSD 43 +#endif + +#ifndef USE_TERMIO +# if BSD > 43 || defined(SYSV_TERMIO) +# define USE_TERMIO +# endif +#endif + +#include +#include +#if defined(CRAY) && !defined(NO_BSD_SETJMP) +#include +#endif +#include +#ifdef HAVE_SYS_FILIO_H +#include +#endif +#ifdef CRAY +# include +#endif /* CRAY */ +#ifdef USE_TERMIO +# ifndef VINTR +# ifdef SYSV_TERMIO +# include +# else +# include +# endif +# endif +#endif +#if defined(NO_CC_T) || !defined(USE_TERMIO) +# if !defined(USE_TERMIO) +typedef char cc_t; +# else +typedef unsigned char cc_t; +# endif +#endif + +#if defined (USE_TERMIO) && !defined (SYSV_TERMIO) +# define termio termios +#endif + +#ifndef NO_STRING_H +#include +#else +#include +#endif + +#ifndef _POSIX_VDISABLE +# ifdef sun +# include /* pick up VDISABLE definition, maybe */ +# endif +# ifdef VDISABLE +# define _POSIX_VDISABLE VDISABLE +# else +# define _POSIX_VDISABLE ((cc_t)'\377') +# endif +#endif + +#define SUBBUFSIZE 256 + +#ifndef CRAY +# ifndef errno +extern int errno; /* outside this world */ +# endif +#endif /* !CRAY */ + +#ifndef __P +# ifdef __STDC__ +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +extern int + autologin, /* Autologin enabled */ + skiprc, /* Don't process the ~/.telnetrc file */ + eight, /* use eight bit mode (binary in and/or out */ + flushout, /* flush output */ + connected, /* Are we connected to the other side? */ + globalmode, /* Mode tty should be in */ + In3270, /* Are we in 3270 mode? */ + telnetport, /* Are we connected to the telnet port? */ + localflow, /* Flow control handled locally */ + restartany, /* If flow control, restart output on any character */ + localchars, /* we recognize interrupt/quit */ + donelclchars, /* the user has set "localchars" */ + showoptions, + net, /* Network file descriptor */ + tin, /* Terminal input file descriptor */ + tout, /* Terminal output file descriptor */ + crlf, /* Should '\r' be mapped to (or )? */ + autoflush, /* flush output when interrupting? */ + autosynch, /* send interrupt characters with SYNCH? */ + SYNCHing, /* Is the stream in telnet SYNCH mode? */ + donebinarytoggle, /* the user has put us in binary */ + dontlecho, /* do we suppress local echoing right now? */ + crmod, + netdata, /* Print out network data flow */ + prettydump, /* Print "netdata" output in user readable format */ +#if defined(TN3270) + cursesdata, /* Print out curses data flow */ + apitrace, /* Trace API transactions */ +#endif /* defined(TN3270) */ + termdata, /* Print out terminal data flow */ + debug; /* Debug level */ + +extern cc_t escape; /* Escape to command mode */ +extern cc_t rlogin; /* Rlogin mode escape character */ +#ifdef KLUDGELINEMODE +extern cc_t echoc; /* Toggle local echoing */ +#endif + +extern char + *prompt; /* Prompt for command. */ + +extern char + doopt[], + dont[], + will[], + wont[], + options[], /* All the little options */ + *hostname; /* Who are we connected to? */ +#ifdef ENCRYPTION +extern void (*encrypt_output) P((unsigned char *, int)); +extern int (*decrypt_input) P((int)); +#endif /* ENCRYPTION */ + +/* + * We keep track of each side of the option negotiation. + */ + +#define MY_STATE_WILL 0x01 +#define MY_WANT_STATE_WILL 0x02 +#define MY_STATE_DO 0x04 +#define MY_WANT_STATE_DO 0x08 + +/* + * Macros to check the current state of things + */ + +#define my_state_is_do(opt) (options[opt]&MY_STATE_DO) +#define my_state_is_will(opt) (options[opt]&MY_STATE_WILL) +#define my_want_state_is_do(opt) (options[opt]&MY_WANT_STATE_DO) +#define my_want_state_is_will(opt) (options[opt]&MY_WANT_STATE_WILL) + +#define my_state_is_dont(opt) (!my_state_is_do(opt)) +#define my_state_is_wont(opt) (!my_state_is_will(opt)) +#define my_want_state_is_dont(opt) (!my_want_state_is_do(opt)) +#define my_want_state_is_wont(opt) (!my_want_state_is_will(opt)) + +#define set_my_state_do(opt) {options[opt] |= MY_STATE_DO;} +#define set_my_state_will(opt) {options[opt] |= MY_STATE_WILL;} +#define set_my_want_state_do(opt) {options[opt] |= MY_WANT_STATE_DO;} +#define set_my_want_state_will(opt) {options[opt] |= MY_WANT_STATE_WILL;} + +#define set_my_state_dont(opt) {options[opt] &= ~MY_STATE_DO;} +#define set_my_state_wont(opt) {options[opt] &= ~MY_STATE_WILL;} +#define set_my_want_state_dont(opt) {options[opt] &= ~MY_WANT_STATE_DO;} +#define set_my_want_state_wont(opt) {options[opt] &= ~MY_WANT_STATE_WILL;} + +/* + * Make everything symetrical + */ + +#define HIS_STATE_WILL MY_STATE_DO +#define HIS_WANT_STATE_WILL MY_WANT_STATE_DO +#define HIS_STATE_DO MY_STATE_WILL +#define HIS_WANT_STATE_DO MY_WANT_STATE_WILL + +#define his_state_is_do my_state_is_will +#define his_state_is_will my_state_is_do +#define his_want_state_is_do my_want_state_is_will +#define his_want_state_is_will my_want_state_is_do + +#define his_state_is_dont my_state_is_wont +#define his_state_is_wont my_state_is_dont +#define his_want_state_is_dont my_want_state_is_wont +#define his_want_state_is_wont my_want_state_is_dont + +#define set_his_state_do set_my_state_will +#define set_his_state_will set_my_state_do +#define set_his_want_state_do set_my_want_state_will +#define set_his_want_state_will set_my_want_state_do + +#define set_his_state_dont set_my_state_wont +#define set_his_state_wont set_my_state_dont +#define set_his_want_state_dont set_my_want_state_wont +#define set_his_want_state_wont set_my_want_state_dont + + +extern FILE + *NetTrace; /* Where debugging output goes */ +extern unsigned char + NetTraceFile[]; /* Name of file where debugging output goes */ +extern void + SetNetTrace __P((char *)); /* Function to change where debugging goes */ + +extern jmp_buf + peerdied, + toplevel; /* For error conditions. */ + +extern void + command __P((int, char *, int)), + Dump __P((char, unsigned char *, int)), + init_3270 __P((void)), + printoption __P((char *, int, int)), + printsub __P((char, unsigned char *, int)), + sendnaws __P((void)), + setconnmode __P((int)), + setcommandmode __P((void)), + setneturg __P((void)), + sys_telnet_init __P((void)), + telnet __P((char *)), + tel_enter_binary __P((int)), + TerminalFlushOutput __P((void)), + TerminalNewMode __P((int)), + TerminalRestoreState __P((void)), + TerminalSaveState __P((void)), + tninit __P((void)), + upcase __P((char *)), + willoption __P((int)), + wontoption __P((int)); + +extern void + send_do __P((int, int)), + send_dont __P((int, int)), + send_will __P((int, int)), + send_wont __P((int, int)); + +extern void + lm_will __P((unsigned char *, int)), + lm_wont __P((unsigned char *, int)), + lm_do __P((unsigned char *, int)), + lm_dont __P((unsigned char *, int)), + lm_mode __P((unsigned char *, int, int)); + +extern void + slc_init __P((void)), + slcstate __P((void)), + slc_mode_export __P((void)), + slc_mode_import __P((int)), + slc_import __P((int)), + slc_export __P((void)), + slc __P((unsigned char *, int)), + slc_check __P((void)), + slc_start_reply __P((void)), + slc_add_reply __P((unsigned char, unsigned char, cc_t)), + slc_end_reply __P((void)); +extern int + slc_update __P((void)); + +extern void + env_opt __P((unsigned char *, int)), + env_opt_start __P((void)), + env_opt_start_info __P((void)), + env_opt_add __P((unsigned char *)), + env_opt_end __P((int)); + +extern unsigned char + *env_default __P((int, int)), + *env_getvalue __P((unsigned char *)); + +extern int + get_status __P((void)), + dosynch __P((void)); + +extern cc_t + *tcval __P((int)); + +#ifndef USE_TERMIO + +extern struct tchars ntc; +extern struct ltchars nltc; +extern struct sgttyb nttyb; + +# define termEofChar ntc.t_eofc +# define termEraseChar nttyb.sg_erase +# define termFlushChar nltc.t_flushc +# define termIntChar ntc.t_intrc +# define termKillChar nttyb.sg_kill +# define termLiteralNextChar nltc.t_lnextc +# define termQuitChar ntc.t_quitc +# define termSuspChar nltc.t_suspc +# define termRprntChar nltc.t_rprntc +# define termWerasChar nltc.t_werasc +# define termStartChar ntc.t_startc +# define termStopChar ntc.t_stopc +# define termForw1Char ntc.t_brkc +extern cc_t termForw2Char; +extern cc_t termAytChar; + +# define termEofCharp (cc_t *)&ntc.t_eofc +# define termEraseCharp (cc_t *)&nttyb.sg_erase +# define termFlushCharp (cc_t *)&nltc.t_flushc +# define termIntCharp (cc_t *)&ntc.t_intrc +# define termKillCharp (cc_t *)&nttyb.sg_kill +# define termLiteralNextCharp (cc_t *)&nltc.t_lnextc +# define termQuitCharp (cc_t *)&ntc.t_quitc +# define termSuspCharp (cc_t *)&nltc.t_suspc +# define termRprntCharp (cc_t *)&nltc.t_rprntc +# define termWerasCharp (cc_t *)&nltc.t_werasc +# define termStartCharp (cc_t *)&ntc.t_startc +# define termStopCharp (cc_t *)&ntc.t_stopc +# define termForw1Charp (cc_t *)&ntc.t_brkc +# define termForw2Charp (cc_t *)&termForw2Char +# define termAytCharp (cc_t *)&termAytChar + +# else + +extern struct termio new_tc; + +# define termEofChar new_tc.c_cc[VEOF] +# define termEraseChar new_tc.c_cc[VERASE] +# define termIntChar new_tc.c_cc[VINTR] +# define termKillChar new_tc.c_cc[VKILL] +# define termQuitChar new_tc.c_cc[VQUIT] + +# ifndef VSUSP +extern cc_t termSuspChar; +# else +# define termSuspChar new_tc.c_cc[VSUSP] +# endif +# if defined(VFLUSHO) && !defined(VDISCARD) +# define VDISCARD VFLUSHO +# endif +# ifndef VDISCARD +extern cc_t termFlushChar; +# else +# define termFlushChar new_tc.c_cc[VDISCARD] +# endif +# ifndef VWERASE +extern cc_t termWerasChar; +# else +# define termWerasChar new_tc.c_cc[VWERASE] +# endif +# ifndef VREPRINT +extern cc_t termRprntChar; +# else +# define termRprntChar new_tc.c_cc[VREPRINT] +# endif +# ifndef VLNEXT +extern cc_t termLiteralNextChar; +# else +# define termLiteralNextChar new_tc.c_cc[VLNEXT] +# endif +# ifndef VSTART +extern cc_t termStartChar; +# else +# define termStartChar new_tc.c_cc[VSTART] +# endif +# ifndef VSTOP +extern cc_t termStopChar; +# else +# define termStopChar new_tc.c_cc[VSTOP] +# endif +# ifndef VEOL +extern cc_t termForw1Char; +# else +# define termForw1Char new_tc.c_cc[VEOL] +# endif +# ifndef VEOL2 +extern cc_t termForw2Char; +# else +# define termForw2Char new_tc.c_cc[VEOL] +# endif +# ifndef VSTATUS +extern cc_t termAytChar; +#else +# define termAytChar new_tc.c_cc[VSTATUS] +#endif + +# if !defined(CRAY) || defined(__STDC__) +# define termEofCharp &termEofChar +# define termEraseCharp &termEraseChar +# define termIntCharp &termIntChar +# define termKillCharp &termKillChar +# define termQuitCharp &termQuitChar +# define termSuspCharp &termSuspChar +# define termFlushCharp &termFlushChar +# define termWerasCharp &termWerasChar +# define termRprntCharp &termRprntChar +# define termLiteralNextCharp &termLiteralNextChar +# define termStartCharp &termStartChar +# define termStopCharp &termStopChar +# define termForw1Charp &termForw1Char +# define termForw2Charp &termForw2Char +# define termAytCharp &termAytChar +# else + /* Work around a compiler bug */ +# define termEofCharp 0 +# define termEraseCharp 0 +# define termIntCharp 0 +# define termKillCharp 0 +# define termQuitCharp 0 +# define termSuspCharp 0 +# define termFlushCharp 0 +# define termWerasCharp 0 +# define termRprntCharp 0 +# define termLiteralNextCharp 0 +# define termStartCharp 0 +# define termStopCharp 0 +# define termForw1Charp 0 +# define termForw2Charp 0 +# define termAytCharp 0 +# endif +#endif + + +/* Ring buffer structures which are shared */ + +extern Ring + netoring, + netiring, + ttyoring, + ttyiring; + +/* Tn3270 section */ +#if defined(TN3270) + +extern int + HaveInput, /* Whether an asynchronous I/O indication came in */ + noasynchtty, /* Don't do signals on I/O (SIGURG, SIGIO) */ + noasynchnet, /* Don't do signals on I/O (SIGURG, SIGIO) */ + sigiocount, /* Count of SIGIO receptions */ + shell_active; /* Subshell is active */ + +extern char + *Ibackp, /* Oldest byte of 3270 data */ + Ibuf[], /* 3270 buffer */ + *Ifrontp, /* Where next 3270 byte goes */ + tline[], + *transcom; /* Transparent command */ + +extern int + settranscom __P((int, char**)); + +extern void + inputAvailable __P((int)); +#endif /* defined(TN3270) */ diff --git a/contrib/media/updf/include/fcntl.h b/contrib/media/updf/include/fcntl.h new file mode 100644 index 0000000000..519136b5cd --- /dev/null +++ b/contrib/media/updf/include/fcntl.h @@ -0,0 +1,120 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_fcntl_h_ +#define __dj_include_fcntl_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define FD_CLOEXEC 0x0001 + +#define F_DUPFD 1 +#define F_GETFD 2 +#define F_GETFL 3 +#define F_GETLK 4 +#define F_SETFD 5 +#define F_SETFL 6 +#define F_SETLK 7 +#define F_SETLKW 8 + +#define F_UNLCK 0 +#define F_RDLCK 1 +#define F_WRLCK 2 + +#define O_RDONLY 0x0000 +#define O_WRONLY 0x0001 +#define O_RDWR 0x0002 +#define O_ACCMODE 0x0003 + +#define O_BINARY 0x0004 /* must fit in char, reserved by dos */ +#define O_TEXT 0x0008 /* must fit in char, reserved by dos */ +#define O_NOINHERIT 0x0080 /* DOS-specific */ + +#define O_CREAT 0x0100 /* second byte, away from DOS bits */ +#define O_EXCL 0x0200 +#define O_NOCTTY 0x0400 +#define O_TRUNC 0x0800 +#define O_APPEND 0x1000 +#define O_NONBLOCK 0x2000 + +#include + +struct flock { + off_t l_len; + pid_t l_pid; + off_t l_start; + short l_type; + short l_whence; +}; + +extern int _fmode; /* O_TEXT or O_BINARY */ + +int open(const char *_path, int _oflag, ...); +int creat(const char *_path, mode_t _mode); +int fcntl(int _fildes, int _cmd, ...); + +#define SH_COMPAT 0x0000 +#define SH_DENYRW 0x0010 +#define SH_DENYWR 0x0020 +#define SH_DENYRD 0x0030 +#define SH_DENYNO 0x0040 + +#define _SH_COMPAT SH_COMPAT +#define _SH_DENYRW SH_DENYRW +#define _SH_DENYWR SH_DENYWR +#define _SH_DENYRD SH_DENYRD +#define _SH_DENYNO SH_DENYNO + +extern int __djgpp_share_flags; + +#define S_IREAD S_IRUSR +#define S_IWRITE S_IWUSR +#define S_IEXEC S_IXUSR + +/* + * For compatibility with other DOS C compilers. + */ + +#define _O_RDONLY O_RDONLY +#define _O_WRONLY O_WRONLY +#define _O_RDWR O_RDWR +#define _O_APPEND O_APPEND +#define _O_CREAT O_CREAT +#define _O_TRUNC O_TRUNC +#define _O_EXCL O_EXCL +#define _O_TEXT O_TEXT +#define _O_BINARY O_BINARY +#define _O_NOINHERIT O_NOINHERIT + +/* + * Support for advanced filesystems (Windows 9x VFAT, NTFS, LFN etc.) + */ + +#define _FILESYS_UNKNOWN 0x80000000U +#define _FILESYS_CASE_SENSITIVE 0x0001 +#define _FILESYS_CASE_PRESERVED 0x0002 +#define _FILESYS_UNICODE 0x0004 +#define _FILESYS_LFN_SUPPORTED 0x4000 +#define _FILESYS_VOL_COMPRESSED 0x8000 + +unsigned _get_volume_info (const char *_path, int *_max_file_len, int *_max_path_len, char *_filesystype); +char _use_lfn (const char *_path); +char *_lfn_gen_short_fname (const char *_long_fname, char *_short_fname); + +#define _LFN_CTIME 1 +#define _LFN_ATIME 2 + +unsigned _lfn_get_ftime (int _handle, int _which); + +char _preserve_fncase (void); + +#ifndef _USE_LFN +#define _USE_LFN _use_lfn(0) /* assume it's the same on ALL drives */ +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_fcntl_h_ */ diff --git a/contrib/media/updf/include/fdset.h b/contrib/media/updf/include/fdset.h new file mode 100644 index 0000000000..21086580e0 --- /dev/null +++ b/contrib/media/updf/include/fdset.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)fdset.h 8.1 (Berkeley) 6/6/93 + */ + +/* + * The following is defined just in case someone should want to run + * this telnet on a 4.2 system. + * + */ + +#ifndef FD_SETSIZE + +#define FD_SET(n, p) ((p)->fds_bits[0] |= (1<<(n))) +#define FD_CLR(n, p) ((p)->fds_bits[0] &= ~(1<<(n))) +#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1<<(n))) +#define FD_ZERO(p) ((p)->fds_bits[0] = 0) + +#endif diff --git a/contrib/media/updf/include/features.h b/contrib/media/updf/include/features.h new file mode 100644 index 0000000000..e44723a9f1 --- /dev/null +++ b/contrib/media/updf/include/features.h @@ -0,0 +1,191 @@ +#ifndef _FEATURES_H +#define _FEATURES_H 1 + +#undef __USE_ISOC99 +#undef __USE_POSIX +#undef __USE_POSIX2 +#undef __USE_POSIX199309 +#undef __USE_POSIX199506 +#undef __USE_XOPEN +#undef __USE_XOPEN_EXTENDED +#undef __USE_UNIX98 +#undef __USE_XOPEN2K +#undef __USE_LARGEFILE +#undef __USE_LARGEFILE64 +#undef __USE_FILE_OFFSET64 +#undef __USE_BSD +#undef __USE_SVID +#undef __USE_MISC +#undef __USE_GNU +#undef __USE_REENTRANT +#undef __FAVOR_BSD +#undef __KERNEL_STRICT_NAMES + +#ifndef _LOOSE_KERNEL_NAMES +#define __KERNEL_STRICT_NAMES +#endif + +#define __USE_ANSI 1 + +#if defined _BSD_SOURCE && \ + !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ + defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ + defined _GNU_SOURCE || defined _SVID_SOURCE) +# define __FAVOR_BSD 1 +#endif + +#ifdef _GNU_SOURCE +# undef _ISOC99_SOURCE +# define _ISOC99_SOURCE 1 +# undef _POSIX_SOURCE +# define _POSIX_SOURCE 1 +# undef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 199506L +# undef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +# undef _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED 1 +# undef _LARGEFILE64_SOURCE +# define _LARGEFILE64_SOURCE 1 +# undef _BSD_SOURCE +# define _BSD_SOURCE 1 +# undef _SVID_SOURCE +# define _SVID_SOURCE 1 +#endif + +#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \ + !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \ + !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \ + !defined _BSD_SOURCE && !defined _SVID_SOURCE) +# define _BSD_SOURCE 1 +# define _SVID_SOURCE 1 +#endif + +#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) +# define __USE_ISOC99 1 +#endif + +#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \ + !defined _POSIX_C_SOURCE) +# define _POSIX_SOURCE 1 +# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 +# define _POSIX_C_SOURCE 2 +# else +# define _POSIX_C_SOURCE 199506L +# endif +#endif + +#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE +# define __USE_POSIX 1 +#endif + +#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE +# define __USE_POSIX2 1 +#endif + +#if (_POSIX_C_SOURCE - 0) >= 199309L +# define __USE_POSIX199309 1 +#endif + +#if (_POSIX_C_SOURCE - 0) >= 199506L +# define __USE_POSIX199506 1 +#endif + +#ifdef _XOPEN_SOURCE +# define __USE_XOPEN 1 +# if (_XOPEN_SOURCE - 0) >= 500 +# define __USE_XOPEN_EXTENDED 1 +# define __USE_UNIX98 1 +# undef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# if (_XOPEN_SOURCE - 0) >= 600 +# define __USE_XOPEN2K 1 +# undef __USE_ISOC99 +# define __USE_ISOC99 1 +# endif +# else +# ifdef _XOPEN_SOURCE_EXTENDED +# define __USE_XOPEN_EXTENDED 1 +# endif +# endif +#endif + +#ifdef _LARGEFILE_SOURCE +# define __USE_LARGEFILE 1 +#endif + +#ifdef _LARGEFILE64_SOURCE +# define __USE_LARGEFILE64 1 +#endif + +#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +# define __USE_FILE_OFFSET64 1 +#endif + +#if defined _BSD_SOURCE || defined _SVID_SOURCE +# define __USE_MISC 1 +#endif + +#ifdef _BSD_SOURCE +# define __USE_BSD 1 +#endif + +#ifdef _SVID_SOURCE +# define __USE_SVID 1 +#endif + +#ifdef _GNU_SOURCE +# define __USE_GNU 1 +#endif + +#if defined _REENTRANT || defined _THREAD_SAFE +# define __USE_REENTRANT 1 +#endif + +#define __STDC_IEC_559__ 1 +#define __STDC_IEC_559_COMPLEX__ 1 + +#define __STDC_ISO_10646__ 200009L + +#undef __GNU_LIBRARY__ +#define __GNU_LIBRARY__ 6 + +#define __GLIBC__ 2 +#define __GLIBC_MINOR__ 2 + +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +# define __GNUC_PREREQ(maj, min) 0 +#endif + +#define __GLIBC_PREREQ(maj, min) \ + ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + +# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT +# define __USE_LARGEFILE 1 +# define __USE_LARGEFILE64 1 +# endif + +#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ + && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ +# define __USE_EXTERN_INLINES 1 +#endif + +/* This is here only because every header file already includes this one. */ +#ifndef _LIBC +/* Get the definitions of all the appropriate `__stub_FUNCTION' symbols. + contains `#define __stub_FUNCTION' when FUNCTION is a stub + which will always return failure (and set errno to ENOSYS). + + We avoid including when compiling the C library itself to + avoid a dependency loop. stubs.h depends on every object file. If + this #include were done for the library source code, then every object + file would depend on stubs.h. */ + +# include +#endif + +#endif /* features.h */ diff --git a/contrib/media/updf/include/file.h b/contrib/media/updf/include/file.h new file mode 100644 index 0000000000..5aa8458737 --- /dev/null +++ b/contrib/media/updf/include/file.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_file_h_ +#define __dj_include_file_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_file_h_ */ diff --git a/contrib/media/updf/include/filescanner.h b/contrib/media/updf/include/filescanner.h new file mode 100644 index 0000000000..12816c8c00 --- /dev/null +++ b/contrib/media/updf/include/filescanner.h @@ -0,0 +1,89 @@ + +#ifndef __filescanner_h__ +#define __filescanner_h__ + +#ifdef WIN32 +#include +#include +#define DIRSEP "\\" +#endif + +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_DIRENT_H +#define _GCC_BUILD_ +#include +#define DIRSEP "/" +#endif //HAVE_DIRENT_H + +#include +#include "lispassert.h" + +class CFileNode +{ +public: + inline CFileNode() : iIsDir(0),iName(""),iDir("") {}; + inline void Set(int aIsDir,char* aName) + { + iIsDir = aIsDir; + iName = aName; + strcpy(iFullName,iDir); + if (strlen(iDir)) + strcat(iFullName,DIRSEP); + strcat(iFullName,aName); + } + inline int IsDirectory() {return iIsDir;}; + inline char* FullName() {return iFullName;}; + inline void SetRoot(char* aDir) {iDir=aDir;}; +private: + int iIsDir; + char *iName; + char iFullName[500]; + char* iDir; +}; + +class CFileScanner +{ +public: + CFileScanner(); + ~CFileScanner(); + CFileNode* First(char* base,char* dir); + CFileNode* Next(); +private: + CFileScanner(const CFileScanner& aFileScanner) + : iCurNode() +#ifdef _GCC_BUILD_ + ,dp(NULL),entry(NULL),statbuf() +#endif + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + CFileScanner& operator=(const CFileScanner& aFileScanner) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +private: + CFileNode iCurNode; + + char fulldir[500]; + +#ifdef _GCC_BUILD_ + DIR *dp; + struct dirent* entry; + struct stat statbuf; +#endif + +#ifdef WIN32 + long handle; + struct _finddata_t info; + int first; +#endif +}; + +#endif // __scanfiles_h__ diff --git a/contrib/media/updf/include/fix.h b/contrib/media/updf/include/fix.h new file mode 100644 index 0000000000..bcb2acb54c --- /dev/null +++ b/contrib/media/updf/include/fix.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __FIX_H +#define __FIX_H + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define int64 __int64 +#else +#define int64 long long +#endif + +/** +@file fix.h +@brief Implementation of operations of specific multiplication (FIX) + +The functions in FIX.H have for goal to realize specific multiplication. +*/ + +/** @defgroup FIX FIX - Implementation of operations of specific multiplication */ +/*@{*/ + +/** +Multiply two fixed-precision rational numbers. +@param a +@param b +@return Returns a * b +*/ +static INLINE int fix_mul(int a, int b) { + int64 temp = (int64) a * (int64) b ; + temp += temp & 4096; + return (int) (temp >> 13) ; +} + +/*@}*/ + +#endif /* __FIX_H */ diff --git a/contrib/media/updf/include/float.h b/contrib/media/updf/include/float.h new file mode 100644 index 0000000000..ab1320041e --- /dev/null +++ b/contrib/media/updf/include/float.h @@ -0,0 +1,116 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_float_h_ +#define __dj_include_float_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +extern float __dj_float_epsilon; +extern float __dj_float_max; +extern float __dj_float_min; + +#define FLT_DIG 6 +#define FLT_EPSILON __dj_float_epsilon +#define FLT_MANT_DIG 24 +#define FLT_MAX __dj_float_max +#define FLT_MAX_10_EXP 38 +#define FLT_MAX_EXP 128 +#define FLT_MIN __dj_float_min +#define FLT_MIN_10_EXP (-37) +#define FLT_MIN_EXP (-125) +#define FLT_RADIX 2 +#define FLT_ROUNDS 1 + +extern double __dj_double_epsilon; +extern double __dj_double_max; +extern double __dj_double_min; + +#define DBL_DIG 15 +#define DBL_EPSILON __dj_double_epsilon +#define DBL_MANT_DIG 53 +#define DBL_MAX __dj_double_max +#define DBL_MAX_10_EXP 308 +#define DBL_MAX_EXP 1024 +#define DBL_MIN __dj_double_min +#define DBL_MIN_10_EXP (-307) +#define DBL_MIN_EXP (-1021) + +extern long double __dj_long_double_epsilon; +extern long double __dj_long_double_max; +extern long double __dj_long_double_min; + +#define LDBL_DIG 18 +#define LDBL_EPSILON __dj_long_double_epsilon +#define LDBL_MANT_DIG 64 +#define LDBL_MAX __dj_long_double_max +#define LDBL_MAX_10_EXP 4932 +#define LDBL_MAX_EXP 16384 +#define LDBL_MIN __dj_long_double_min +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MIN_EXP (-16381) + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* These indicate the results of the last operation */ +#define SW_INVALID 0x0001 /* Invalid operation */ +#define SW_DENORMAL 0x0002 /* Denormalized operand */ +#define SW_ZERODIVIDE 0x0004 /* Division by zero */ +#define SW_OVERFLOW 0x0008 /* Overflow */ +#define SW_UNDERFLOW 0x0010 /* Underflow (computational) */ +#define SW_INEXACT 0x0020 /* Precision (computational) */ +#define SW_STACKFAULT 0x0040 /* Stack Fault (over/under flow) */ +#define SW_ERRORSUMMARY 0x0080 /* Error summary */ +#define SW_COND 0x4700 /* Condition Code */ +#define SW_C0 0x0100 /* Condition 0 bit */ +#define SW_C1 0x0200 /* Condition 1 bit (also 0=stack underflow, 1=stack overflow) */ +#define SW_C2 0x0400 /* Condition 2 bit */ +#define SW_C3 0x4000 /* Condition 3 bit */ +#define SW_TOP 0x3800 /* Top of stack */ +#define SW_TOP_SHIFT 11 /* Shift to move TOS to LSB */ +#define SW_BUSY 0x8000 /* FPU busy */ + +#define MCW_EM 0x003f /* Exception masks (0=fault, 1=handle) */ +#define EM_INVALID 0x0001 /* Invalid operation */ +#define EM_DENORMAL 0x0002 /* Denormalized operand */ +#define EM_ZERODIVIDE 0x0004 /* Division by zero */ +#define EM_OVERFLOW 0x0008 /* Overflow */ +#define EM_UNDERFLOW 0x0010 /* Underflow */ +#define EM_INEXACT 0x0020 /* Precision */ + +#define MCW_PC 0x0300 /* precision control */ +#define PC_24 0x0000 /* 24 bits (single precision) */ +#define PC_53 0x0200 /* 53 bits (double precision) */ +#define PC_64 0x0300 /* 64 bits (extended precision) */ + +#define MCW_RC 0x0c00 /* Rounding control */ +#define RC_NEAR 0x0000 /* Round to nearest or even */ +#define RC_DOWN 0x0400 /* Round towards -Inf */ +#define RC_UP 0x0800 /* Round towards +Inf */ +#define RC_CHOP 0x0c00 /* Truncate towards zero */ + +#define MCW_IC 0x1000 /* obsolete; i486 is always affine */ +#define IC_AFFINE 0x1000 /* -Inf < +Inf */ +#define IC_PROJECTIVE 0x0000 /* -Inf == +Inf */ + +unsigned int _clear87(void); +unsigned int _control87(unsigned int newcw, unsigned int mask); +void _fpreset(void); +unsigned int _status87(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_float_h_ */ diff --git a/contrib/media/updf/include/floatingpoint.h b/contrib/media/updf/include/floatingpoint.h new file mode 100644 index 0000000000..347d2047d3 --- /dev/null +++ b/contrib/media/updf/include/floatingpoint.h @@ -0,0 +1 @@ +/* empty file to please silly code in iolib.c and opcode.c */ diff --git a/contrib/media/updf/include/fnmatch.h b/contrib/media/updf/include/fnmatch.h new file mode 100644 index 0000000000..35b9658683 --- /dev/null +++ b/contrib/media/updf/include/fnmatch.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_fnmatch_h_ +#define __dj_include_fnmatch_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#define FNM_NOESCAPE 0x01 +#define FNM_PATHNAME 0x02 +#define FNM_PERIOD 0x04 + +#define FNM_NOMATCH 1 +#define FNM_ERROR 2 + +int fnmatch(const char *_pattern, const char *_string, int _flags); + +#ifndef _POSIX_SOURCE + +#define FNM_NOCASE 0x08 +#define FNM_CASEFOLD FNM_NOCASE /* compatibility with GNU fnmatch */ +#define FNM_IGNORECASE FNM_NOCASE /* compatibility with Solaris */ + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_fnmatch_h_ */ diff --git a/contrib/media/updf/include/form.h b/contrib/media/updf/include/form.h new file mode 100644 index 0000000000..77fd9506ca --- /dev/null +++ b/contrib/media/updf/include/form.h @@ -0,0 +1,388 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#ifndef FORM_H +#define FORM_H + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +typedef int Form_Options; +typedef int Field_Options; + + /********** + * _PAGE * + **********/ + +typedef struct { + short pmin; /* index of first field on page */ + short pmax; /* index of last field on page */ + short smin; /* index of top leftmost field on page */ + short smax; /* index of bottom rightmost field on page */ +} _PAGE; + + /********** + * FIELD * + **********/ + +typedef struct fieldnode { + unsigned short status; /* flags */ + short rows; /* size in rows */ + short cols; /* size in cols */ + short frow; /* first row */ + short fcol; /* first col */ + int drows; /* dynamic rows */ + int dcols; /* dynamic cols */ + int maxgrow; /* maximum field growth */ + int nrow; /* offscreen rows */ + short nbuf; /* additional buffers */ + short just; /* justification */ + short page; /* page on form */ + short index; /* into form -> field */ + int pad; /* pad character */ + chtype fore; /* foreground attribute */ + chtype back; /* background attribute */ + Field_Options opts; /* options */ + struct fieldnode * snext; /* sorted order pointer */ + struct fieldnode * sprev; /* sorted order pointer */ + struct fieldnode * link; /* linked field chain */ + struct formnode * form; /* containing form */ + struct typenode * type; /* field type */ + void * arg; /* argument for type */ + char * buf; /* field buffers */ + void * usrptr; /* user pointer */ +} FIELD; + + /************** + * FIELDTYPE * + **************/ + +typedef struct typenode { + unsigned short status; /* flags */ + long ref; /* reference count */ + struct typenode * left; /* ptr to operand for | */ + struct typenode * right; /* ptr to operand for | */ + + void* (*makearg)(va_list *); /* make fieldtype arg */ + void* (*copyarg)(const void *); /* copy fieldtype arg */ + void (*freearg)(void *); /* free fieldtype arg */ + + bool (*fcheck)(FIELD *,const void *); /* field validation */ + bool (*ccheck)(int,const void *); /* character validation */ + + bool (*next)(FIELD *,const void *); /* enumerate next value */ + bool (*prev)(FIELD *,const void *); /* enumerate prev value */ + +} FIELDTYPE; + + /********* + * FORM * + *********/ + +typedef struct formnode { + unsigned short status; /* flags */ + short rows; /* size in rows */ + short cols; /* size in cols */ + int currow; /* current row in field window*/ + int curcol; /* current col in field window*/ + int toprow; /* in scrollable field window */ + int begincol; /* in horiz. scrollable field */ + short maxfield; /* number of fields */ + short maxpage; /* number of pages */ + short curpage; /* index into page */ + Form_Options opts; /* options */ + WINDOW * win; /* window */ + WINDOW * sub; /* subwindow */ + WINDOW * w; /* window for current field */ + FIELD ** field; /* field [maxfield] */ + FIELD * current; /* current field */ + _PAGE * page; /* page [maxpage] */ + void * usrptr; /* user pointer */ + + void (*forminit)(struct formnode *); + void (*formterm)(struct formnode *); + void (*fieldinit)(struct formnode *); + void (*fieldterm)(struct formnode *); + +} FORM; + +typedef void (*Form_Hook)(FORM *); + + /*************************** + * miscellaneous #defines * + ***************************/ + +/* field justification */ +#define NO_JUSTIFICATION (0) +#define JUSTIFY_LEFT (1) +#define JUSTIFY_CENTER (2) +#define JUSTIFY_RIGHT (3) + +/* field options */ +#define O_VISIBLE (0x0001) +#define O_ACTIVE (0x0002) +#define O_PUBLIC (0x0004) +#define O_EDIT (0x0008) +#define O_WRAP (0x0010) +#define O_BLANK (0x0020) +#define O_AUTOSKIP (0x0040) +#define O_NULLOK (0x0080) +#define O_PASSOK (0x0100) +#define O_STATIC (0x0200) + +/* form options */ +#define O_NL_OVERLOAD (0x0001) +#define O_BS_OVERLOAD (0x0002) + +/* form driver commands */ +#define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */ +#define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */ +#define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */ +#define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */ + +#define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */ +#define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */ +#define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */ +#define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */ +#define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */ +#define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */ +#define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */ +#define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */ +#define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */ +#define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */ +#define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */ +#define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */ + +#define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */ +#define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */ +#define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */ +#define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */ +#define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */ +#define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */ +#define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */ +#define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */ +#define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */ +#define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */ +#define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */ +#define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */ +#define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */ +#define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */ + +#define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */ +#define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */ +#define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */ +#define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */ +#define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */ +#define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */ +#define REQ_DEL_WORD (KEY_MAX + 37) /* delete line at cursor */ +#define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */ +#define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */ +#define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */ +#define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */ +#define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */ +#define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */ +#define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */ +#define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */ +#define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */ +#define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */ +#define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */ +#define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */ +#define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */ +#define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */ +#define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */ +#define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */ +#define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */ + +#define REQ_VALIDATION (KEY_MAX + 55) /* validate field */ +#define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */ +#define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */ + +#define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */ +#define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */ + +#if defined(MAX_COMMAND) +# if (MAX_FORM_COMMAND > MAX_COMMAND) +# error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND +# elif (MAX_COMMAND != (KEY_MAX + 128)) +# error Something is wrong -- MAX_COMMAND is already inconsistently defined. +# endif +#else +# define MAX_COMMAND (KEY_MAX + 128) +#endif + + /************************* + * standard field types * + *************************/ +extern FIELDTYPE *TYPE_ALPHA, + *TYPE_ALNUM, + *TYPE_ENUM, + *TYPE_INTEGER, + *TYPE_NUMERIC, + *TYPE_REGEXP; + + /************************************ + * built-in additional field types * + * They are not defined in SVr4 * + ************************************/ +extern FIELDTYPE *TYPE_IPV4; /* Internet IP Version 4 address */ + + /*********************** + * Default objects * + ***********************/ +extern FORM *_nc_Default_Form; +extern FIELD *_nc_Default_Field; + + + /*********************** + * FIELDTYPE routines * + ***********************/ +extern FIELDTYPE + *new_fieldtype( + bool (* const field_check)(FIELD *,const void *), + bool (* const char_check)(int,const void *)), + *link_fieldtype(FIELDTYPE *,FIELDTYPE *); + +extern int free_fieldtype(FIELDTYPE *), + set_fieldtype_arg(FIELDTYPE *, + void * (* const make_arg)(va_list *), + void * (* const copy_arg)(const void *), + void (* const free_arg)(void *)), + set_fieldtype_choice (FIELDTYPE *, + bool (* const next_choice)(FIELD *,const void *), + bool (* const prev_choice)(FIELD *,const void *)); + + /******************* + * FIELD routines * + *******************/ +extern FIELD *new_field(int,int,int,int,int,int), + *dup_field(FIELD *,int,int), + *link_field(FIELD *,int,int); + +extern int free_field(FIELD *), + field_info(const FIELD *,int *,int *,int *,int *,int *,int *), + dynamic_field_info(const FIELD *,int *,int *,int *), + set_max_field( FIELD *,int), + move_field(FIELD *,int,int), + set_field_type(FIELD *,FIELDTYPE *,...), + set_new_page(FIELD *,bool), + set_field_just(FIELD *,int), + field_just(const FIELD *), + set_field_fore(FIELD *,chtype), + set_field_back(FIELD *,chtype), + set_field_pad(FIELD *,int), + field_pad(const FIELD *), + set_field_buffer(FIELD *,int,const char *), + set_field_status(FIELD *,bool), + set_field_userptr(FIELD *, void *), + set_field_opts(FIELD *,Field_Options), + field_opts_on(FIELD *,Field_Options), + field_opts_off(FIELD *,Field_Options); + +extern chtype field_fore(const FIELD *), + field_back(const FIELD *); + +extern bool new_page(const FIELD *), + field_status(const FIELD *); + +extern void *field_arg(const FIELD *); + +extern void *field_userptr(const FIELD *); + +extern FIELDTYPE + *field_type(const FIELD *); + +extern char* field_buffer(const FIELD *,int); + +extern Field_Options + field_opts(const FIELD *); + + /****************** + * FORM routines * + ******************/ +extern FORM *new_form(FIELD **); + +extern FIELD **form_fields(const FORM *), + *current_field(const FORM *); + +extern WINDOW *form_win(const FORM *), + *form_sub(const FORM *); + +extern Form_Hook + form_init(const FORM *), + form_term(const FORM *), + field_init(const FORM *), + field_term(const FORM *); + +extern int free_form(FORM *), + set_form_fields(FORM *,FIELD **), + field_count(const FORM *), + set_form_win(FORM *,WINDOW *), + set_form_sub(FORM *,WINDOW *), + set_current_field(FORM *,FIELD *), + field_index(const FIELD *), + set_form_page(FORM *,int), + form_page(const FORM *), + scale_form(const FORM *,int *,int *), + set_form_init(FORM *,Form_Hook), + set_form_term(FORM *,Form_Hook), + set_field_init(FORM *,Form_Hook), + set_field_term(FORM *,Form_Hook), + post_form(FORM *), + unpost_form(FORM *), + pos_form_cursor(FORM *), + form_driver(FORM *,int), + set_form_userptr(FORM *,void *), + set_form_opts(FORM *,Form_Options), + form_opts_on(FORM *,Form_Options), + form_opts_off(FORM *,Form_Options), + form_request_by_name(const char *); + +extern const char + *form_request_name(int); + +extern void *form_userptr(const FORM *); + +extern Form_Options + form_opts(const FORM *); + +extern bool data_ahead(const FORM *), + data_behind(const FORM *); + +#ifdef __cplusplus + } +#endif + +#endif /* FORM_H */ diff --git a/contrib/media/updf/include/freetype/config/ftconfig.h b/contrib/media/updf/include/freetype/config/ftconfig.h new file mode 100644 index 0000000000..cbe30f2689 --- /dev/null +++ b/contrib/media/updf/include/freetype/config/ftconfig.h @@ -0,0 +1,528 @@ +/***************************************************************************/ +/* */ +/* ftconfig.h */ +/* */ +/* ANSI-specific configuration file (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This header file contains a number of macro definitions that are used */ + /* by the rest of the engine. Most of the macros here are automatically */ + /* determined at compile time, and you should not need to change it to */ + /* port FreeType, except to compile the library with a non-ANSI */ + /* compiler. */ + /* */ + /* Note however that if some specific modifications are needed, we */ + /* advise you to place a modified copy in your build directory. */ + /* */ + /* The build directory is usually `freetype/builds/', and */ + /* contains system-specific files that are always included first when */ + /* building the library. */ + /* */ + /* This ANSI version should stay in `include/freetype/config'. */ + /* */ + /*************************************************************************/ + +#ifndef __FTCONFIG_H__ +#define __FTCONFIG_H__ + +#include +#include FT_CONFIG_OPTIONS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ + /* */ + /* These macros can be toggled to suit a specific system. The current */ + /* ones are defaults used to compile FreeType in an ANSI C environment */ + /* (16bit compilers are also supported). Copy this file to your own */ + /* `freetype/builds/' directory, and edit it to port the engine. */ + /* */ + /*************************************************************************/ + + + /* There are systems (like the Texas Instruments 'C54x) where a `char' */ + /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ + /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ + /* is probably unexpected. */ + /* */ + /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ + /* `char' type. */ + +#ifndef FT_CHAR_BIT +#define FT_CHAR_BIT CHAR_BIT +#endif + + + /* The size of an `int' type. */ +#if FT_UINT_MAX == 0xFFFFUL +#define FT_SIZEOF_INT (16 / FT_CHAR_BIT) +#elif FT_UINT_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_INT (32 / FT_CHAR_BIT) +#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_INT (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `int' type!" +#endif + + /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ + /* DM642) is recognized but avoided. */ +#if FT_ULONG_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `long' type!" +#endif + + + /* Preferred alignment of data */ +#define FT_ALIGNMENT 8 + + + /* FT_UNUSED is a macro used to indicate that a given parameter is not */ + /* used -- this is only used to get rid of unpleasant compiler warnings */ +#ifndef FT_UNUSED +#define FT_UNUSED( arg ) ( (arg) = (arg) ) +#endif + + + /*************************************************************************/ + /* */ + /* AUTOMATIC CONFIGURATION MACROS */ + /* */ + /* These macros are computed from the ones defined above. Don't touch */ + /* their definition, unless you know precisely what you are doing. No */ + /* porter should need to mess with them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Mac support */ + /* */ + /* This is the only necessary change, so it is defined here instead */ + /* providing a new configuration file. */ + /* */ +#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ + ( defined( __MWERKS__ ) && defined( macintosh ) ) + /* no Carbon frameworks for 64bit 10.4.x */ +#include "AvailabilityMacros.h" +#if defined( __LP64__ ) && \ + ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) +#define DARWIN_NO_CARBON 1 +#else +#define FT_MACINTOSH 1 +#endif + +#elif defined( __SC__ ) || defined( __MRC__ ) + /* Classic MacOS compilers */ +#include "ConditionalMacros.h" +#if TARGET_OS_MAC +#define FT_MACINTOSH 1 +#endif + +#endif + + + /*************************************************************************/ + /* */ + /*
*/ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ + /* */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ + /* */ + typedef unsigned short FT_UInt16; + + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + /* */ + +#endif + +#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) + + typedef signed int FT_Int32; + typedef unsigned int FT_UInt32; + +#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) + + typedef signed long FT_Int32; + typedef unsigned long FT_UInt32; + +#else +#error "no 32bit type found -- please check your configuration files" +#endif + + + /* look up an integer type that is at least 32 bits */ +#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) + + typedef int FT_Fast; + typedef unsigned int FT_UFast; + +#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT) + + typedef long FT_Fast; + typedef unsigned long FT_UFast; + +#endif + + + /* determine whether we have a 64-bit int type for platforms without */ + /* Autoconf */ +#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) + + /* FT_LONG64 must be defined if a 64-bit type is available */ +#define FT_LONG64 +#define FT_INT64 long + +#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __BORLANDC__ ) /* Borland C++ */ + + /* XXXX: We should probably check the value of __BORLANDC__ in order */ + /* to test the compiler version. */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __WATCOMC__ ) /* Watcom C++ */ + + /* Watcom doesn't provide 64-bit data types */ + +#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ + +#define FT_LONG64 +#define FT_INT64 long long int + +#elif defined( __GNUC__ ) + + /* GCC provides the `long long' type */ +#define FT_LONG64 +#define FT_INT64 long long int + +#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ + + + /*************************************************************************/ + /* */ + /* A 64-bit data type will create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ + /* is defined. You can however ignore this rule by defining the */ + /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#ifdef __STDC__ + + /* undefine the 64-bit macros in strict ANSI compilation mode */ +#undef FT_LONG64 +#undef FT_INT64 + +#endif /* __STDC__ */ + +#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ + + +#define FT_BEGIN_STMNT do { +#define FT_END_STMNT } while ( 0 ) +#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT + + +#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER + /* Provide assembler fragments for performance-critical functions. */ + /* These must be defined `static __inline__' with GCC. */ + +#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm + + /* documentation is in freetype.h */ + + static __inline FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + __asm + { + smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ + mov a, t, asr #31 /* a = (hi >> 31) */ + add a, a, #0x8000 /* a += 0x8000 */ + adds t2, t2, a /* t2 += a */ + adc t, t, #0 /* t += carry */ + mov a, t2, lsr #16 /* a = t2 >> 16 */ + orr a, a, t, lsl #16 /* a |= t << 16 */ + } + return a; + } + +#endif /* __CC_ARM || __ARMCC__ */ + + +#ifdef __GNUC__ + +#if defined( __arm__ ) && !defined( __thumb__ ) && \ + !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + asm __volatile__ ( + "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ + "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ + "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ + "adds %1, %1, %0\n\t" /* %1 += %0 */ + "adc %2, %2, #0\n\t" /* %2 += carry */ + "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ + "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ + : "=r"(a), "=&r"(t2), "=&r"(t) + : "r"(a), "r"(b) ); + return a; + } + +#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ + +#if defined( __i386__ ) +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + + __asm__ __volatile__ ( + "imul %%edx\n" + "movl %%edx, %%ecx\n" + "sarl $31, %%ecx\n" + "addl $0x8000, %%ecx\n" + "addl %%ecx, %%eax\n" + "adcl $0, %%edx\n" + "shrl $16, %%eax\n" + "shll $16, %%edx\n" + "addl %%edx, %%eax\n" + : "=a"(result), "=d"(b) + : "a"(a), "d"(b) + : "%ecx", "cc" ); + return result; + } + +#endif /* i386 */ + +#endif /* __GNUC__ */ + +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + + +#ifdef FT_CONFIG_OPTION_INLINE_MULFIX +#ifdef FT_MULFIX_ASSEMBLER +#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER +#endif +#endif + + +#ifdef FT_MAKE_OPTION_SINGLE_OBJECT + +#define FT_LOCAL( x ) static x +#define FT_LOCAL_DEF( x ) static x + +#else + +#ifdef __cplusplus +#define FT_LOCAL( x ) extern "C" x +#define FT_LOCAL_DEF( x ) extern "C" x +#else +#define FT_LOCAL( x ) extern x +#define FT_LOCAL_DEF( x ) x +#endif + +#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ + + +#ifndef FT_BASE + +#ifdef __cplusplus +#define FT_BASE( x ) extern "C" x +#else +#define FT_BASE( x ) extern x +#endif + +#endif /* !FT_BASE */ + + +#ifndef FT_BASE_DEF + +#ifdef __cplusplus +#define FT_BASE_DEF( x ) x +#else +#define FT_BASE_DEF( x ) x +#endif + +#endif /* !FT_BASE_DEF */ + + +#ifndef FT_EXPORT + +#ifdef __cplusplus +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif /* !FT_EXPORT */ + + +#ifndef FT_EXPORT_DEF + +#ifdef __cplusplus +#define FT_EXPORT_DEF( x ) extern "C" x +#else +#define FT_EXPORT_DEF( x ) extern x +#endif + +#endif /* !FT_EXPORT_DEF */ + + +#ifndef FT_EXPORT_VAR + +#ifdef __cplusplus +#define FT_EXPORT_VAR( x ) extern "C" x +#else +#define FT_EXPORT_VAR( x ) extern x +#endif + +#endif /* !FT_EXPORT_VAR */ + + /* The following macros are needed to compile the library with a */ + /* C++ compiler and with 16bit compilers. */ + /* */ + + /* This is special. Within C++, you must specify `extern "C"' for */ + /* functions which are used via function pointers, and you also */ + /* must do that for structures which contain function pointers to */ + /* assure C linkage -- it's not possible to have (local) anonymous */ + /* functions which are accessed by (global) function pointers. */ + /* */ + /* */ + /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* */ + /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ + /* contains pointers to callback functions. */ + /* */ + /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ + /* that contains pointers to callback functions. */ + /* */ + /* */ + /* Some 16bit compilers have to redefine these macros to insert */ + /* the infamous `_cdecl' or `__fastcall' declarations. */ + /* */ +#ifndef FT_CALLBACK_DEF +#ifdef __cplusplus +#define FT_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_CALLBACK_DEF( x ) static x +#endif +#endif /* FT_CALLBACK_DEF */ + +#ifndef FT_CALLBACK_TABLE +#ifdef __cplusplus +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" +#else +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF /* nothing */ +#endif +#endif /* FT_CALLBACK_TABLE */ + + +FT_END_HEADER + + +#endif /* __FTCONFIG_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/config/ftheader.h b/contrib/media/updf/include/freetype/config/ftheader.h new file mode 100644 index 0000000000..b63945dcbd --- /dev/null +++ b/contrib/media/updf/include/freetype/config/ftheader.h @@ -0,0 +1,780 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __FT_HEADER_H__ +#define __FT_HEADER_H__ + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_BEGIN_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_END_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /*
*/ + /* header_file_macros */ + /* */ + /* */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> +#endif + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <freetype/fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <freetype/ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <freetype/ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <freetype/ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <freetype/ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <freetype/ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <freetype/ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <freetype/ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `glyph image' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for @FT_Glyph elements. You can also + * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to + * store small glyph bitmaps, as it will use less memory. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * glyph image-related cache declarations. + * + */ +#define FT_CACHE_IMAGE_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_SMALL_BITMAPS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `small bitmaps' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for small glyph bitmaps in a relatively + * memory-efficient way. You can also use the API defined in + * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, + * including scalable outlines. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * small bitmaps-related cache declarations. + * + */ +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_CHARMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `charmap' API of the FreeType~2 cache sub-system. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * charmap-based cache declarations. + * + */ +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <freetype/ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <freetype/ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <freetype/ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <freetype/ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <freetype/ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_XFREE86_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to the XFree86 and + * X.Org X11 servers. + */ +#define FT_XFREE86_H <freetype/ftxf86.h> + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_UNPATENTED_HINTING_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <freetype/ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <freetype/ftadvanc.h> + + + /* */ + +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> + + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> + + +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + +#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> + + + /* + * Include internal headers definitions from <freetype/internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + +#endif /* __FT2_BUILD_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/config/ftmodule.h b/contrib/media/updf/include/freetype/config/ftmodule.h new file mode 100644 index 0000000000..a9dcdda5f2 --- /dev/null +++ b/contrib/media/updf/include/freetype/config/ftmodule.h @@ -0,0 +1,26 @@ +/* + * This file registers the FreeType modules compiled into the library. + * + * If you use GNU make, this file IS NOT USED! Instead, it is created in + * the objects directory (normally `<topdir>/objs/') based on information + * from `<topdir>/modules.cfg'. + * + * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile + * FreeType without GNU make. + * + */ + +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) + +/* EOF */ diff --git a/contrib/media/updf/include/freetype/config/ftoption.h b/contrib/media/updf/include/freetype/config/ftoption.h new file mode 100644 index 0000000000..2b46259c15 --- /dev/null +++ b/contrib/media/updf/include/freetype/config/ftoption.h @@ -0,0 +1,733 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOPTION_H__ +#define __FTOPTION_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory `builds/<system>' by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <freetype/config/ftheader.h> */ + /* */ + /* will use `$BUILD/myftoptions.h' instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <freetype/config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Uncomment the line below if you want to activate sub-pixel rendering */ + /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ + /* */ + /* Note that this feature is covered by several Microsoft patents */ + /* and should not be activated in any default build of the library. */ + /* */ + /* This macro has no impact on the FreeType API, only on its */ + /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ + /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ + /* the original size in case this macro isn't defined; however, each */ + /* triplet of subpixels has R=G=B. */ + /* */ + /* This is done to allow FreeType clients to run unmodified, forcing */ + /* them to display normal gray-level anti-aliased glyphs. */ + /* */ +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file `ftconfig.h' either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ +#undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* If this macro is defined, do not try to use an assembler version of */ + /* performance-critical functions (e.g. FT_MulFix). You should only do */ + /* that to verify that the assembler function works properly, or to */ + /* execute benchmark tests of the various implementations. */ +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ + + + /*************************************************************************/ + /* */ + /* If this macro is defined, try to use an inlined assembler version of */ + /* the `FT_MulFix' function, which is a `hotspot' when loading and */ + /* hinting glyphs, and which should be executed as fast as possible. */ + /* */ + /* Note that if your compiler or CPU is not supported, this will default */ + /* to the standard and portable implementation found in `ftcalc.c'. */ + /* */ +#define FT_CONFIG_OPTION_INLINE_MULFIX + + + /*************************************************************************/ + /* */ + /* LZW-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `compress' program. This is mostly used to parse many of the PCF */ + /* files that come with various X11 distributions. The implementation */ + /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ + /* (see src/lzw/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_LZW + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. See also */ + /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ + /* */ +#define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's `ftgzip' component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_EXPORT(x) extern x */ +/* #define FT_EXPORT_DEF(x) x */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `psnames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `psnames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthesize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthesize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ +#define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Guessing methods to access embedded resource forks */ + /* */ + /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ + /* GNU/Linux). */ + /* */ + /* Resource forks which include fonts data are stored sometimes in */ + /* locations which users or developers don't expected. In some cases, */ + /* resource forks start with some offset from the head of a file. In */ + /* other cases, the actual resource fork is stored in file different */ + /* from what the user specifies. If this option is activated, */ + /* FreeType tries to guess whether such offsets or different file */ + /* names must be used. */ + /* */ + /* Note that normal, direct access of resource forks is controlled via */ + /* the FT_CONFIG_OPTION_MAC_FONTS option. */ + /* */ +#ifdef FT_CONFIG_OPTION_MAC_FONTS +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK +#endif + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This is required by clients supporting document formats which */ + /* supply font data incrementally as the document is parsed, such */ + /* as the Ghostscript interpreter for the PostScript language. */ + /* */ +#define FT_CONFIG_OPTION_INCREMENTAL + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ + /* This must be greater than 4KByte if you use FreeType to rasterize */ + /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ + /* allocation of the render pool. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_LEVEL_ERROR */ +/* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Position Independent Code */ + /* */ + /* If this macro is set (which is _not_ the default), FreeType2 will */ + /* avoid creating constants that require address fixups. Instead the */ + /* constants will be moved into a struct and additional intialization */ + /* code will be used. */ + /* */ + /* Setting this macro is needed for systems that prohibit address */ + /* fixups, such as BREW. */ + /* */ +/* #define FT_CONFIG_OPTION_PIC */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `freetype/ftsnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ + /* of the TrueType bytecode interpreter is used that doesn't implement */ + /* any of the patented opcodes and algorithms. The patents related to */ + /* TrueType hinting have expired worldwide since May 2010; this option */ + /* is now deprecated. */ + /* */ + /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ + /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ + /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ + /* */ + /* This macro is only useful for a small number of font files (mostly */ + /* for Asian scripts) that require bytecode interpretation to properly */ + /* load glyphs. For all other fonts, this produces unpleasant results, */ + /* thus the unpatented interpreter is never used to load glyphs from */ + /* TrueType fonts unless one of the following two options is used. */ + /* */ + /* - The unpatented interpreter is explicitly activated by the user */ + /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ + /* when opening the FT_Face. */ + /* */ + /* - FreeType detects that the FT_Face corresponds to one of the */ + /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */ + /* contains a hard-coded list of font names and other matching */ + /* parameters (see function `tt_face_init' in file */ + /* `src/truetype/ttobjs.c'). */ + /* */ + /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */ + /* */ + /* { */ + /* FT_Parameter parameter; */ + /* FT_Open_Args open_args; */ + /* */ + /* */ + /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */ + /* */ + /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ + /* open_args.pathname = my_font_pathname; */ + /* open_args.num_params = 1; */ + /* open_args.params = ¶meter; */ + /* */ + /* error = FT_Open_Face( library, &open_args, index, &face ); */ + /* ... */ + /* } */ + /* */ +/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ + /* bytecode interpreter with a huge switch statement, rather than a call */ + /* table. This results in smaller and faster code for a number of */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scaling */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ + /* support for Apple's distortable font technology (fvar, gvar, cvar, */ + /* and avar tables). This has many similarities to Type 1 Multiple */ + /* Masters support. */ + /* */ +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ + /* an embedded `BDF ' table within SFNT-based bitmap formats. */ + /* */ +#define TT_CONFIG_OPTION_BDF + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ + /* support. */ + /* */ +#define AF_CONFIG_OPTION_CJK + + /*************************************************************************/ + /* */ + /* Compile autofit module with Indic script support. */ + /* */ +#define AF_CONFIG_OPTION_INDIC + + /* */ + + + /* + * Define this variable if you want to keep the layout of internal + * structures that was used prior to FreeType 2.2. This also compiles in + * a few obsolete functions to avoid linking problems on typical Unix + * distributions. + * + * For embedded systems or building a new distribution from scratch, it + * is recommended to disable the macro since it reduces the library's code + * size and activates a few memory-saving optimizations as well. + */ +#define FT_CONFIG_OPTION_OLD_INTERNALS + + + /* + * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), + * we restrict the number of charmaps in a font. The current API of + * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API + * takes charcode only. To determine the passed value is for cmap_index + * or charcode, the possible cmap_index is restricted not to exceed + * the minimum possible charcode by a rogue client. It is also very + * unlikely that a rogue client is interested in Unicode values 0 to 15. + * + * NOTE: The original threshold was 4 deduced from popular number of + * cmap subtables in UCS-4 TrueType fonts, but now it is not + * irregular for OpenType fonts to have more than 4 subtables, + * because variation selector subtables are available for Apple + * and Microsoft platforms. + */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_MAX_CHARMAP_CACHEABLE 15 +#endif + + + /* + * This macro is defined if either unpatented or native TrueType + * hinting is requested by the definitions above. + */ +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER +#undef TT_CONFIG_OPTION_UNPATENTED_HINTING +#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING +#define TT_USE_BYTECODE_INTERPRETER +#endif + +FT_END_HEADER + + +#endif /* __FTOPTION_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/config/ftstdlib.h b/contrib/media/updf/include/freetype/config/ftstdlib.h new file mode 100644 index 0000000000..30ec14e74e --- /dev/null +++ b/contrib/media/updf/include/freetype/config/ftstdlib.h @@ -0,0 +1,173 @@ +/***************************************************************************/ +/* */ +/* ftstdlib.h */ +/* */ +/* ANSI-specific library and header configuration file (specification */ +/* only). */ +/* */ +/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to group all #includes to the ANSI C library that */ + /* FreeType normally requires. It also defines macros to rename the */ + /* standard functions within the FreeType source code. */ + /* */ + /* Load a file which defines __FTSTDLIB_H__ before this one to override */ + /* it. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSTDLIB_H__ +#define __FTSTDLIB_H__ + + +#include <stddef.h> + +#define ft_ptrdiff_t ptrdiff_t + + + /**********************************************************************/ + /* */ + /* integer limits */ + /* */ + /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ + /* of `int' and `long' in bytes at compile-time. So far, this works */ + /* for all platforms the library has been tested on. */ + /* */ + /* Note that on the extremely rare platforms that do not provide */ + /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ + /* old Crays where `int' is 36 bits), we do not make any guarantee */ + /* about the correct behaviour of FT2 with all fonts. */ + /* */ + /* In these case, `ftconfig.h' will refuse to compile anyway with a */ + /* message like `couldn't find 32-bit type' or something similar. */ + /* */ + /**********************************************************************/ + + +#include <limits.h> + +#define FT_CHAR_BIT CHAR_BIT +#define FT_INT_MAX INT_MAX +#define FT_INT_MIN INT_MIN +#define FT_UINT_MAX UINT_MAX +#define FT_ULONG_MAX ULONG_MAX + + + /**********************************************************************/ + /* */ + /* character and string processing */ + /* */ + /**********************************************************************/ + + +#include <string.h> + +#define ft_memchr memchr +#define ft_memcmp memcmp +#define ft_memcpy memcpy +#define ft_memmove memmove +#define ft_memset memset +#define ft_strcat strcat +#define ft_strcmp strcmp +#define ft_strcpy strcpy +#define ft_strlen strlen +#define ft_strncmp strncmp +#define ft_strncpy strncpy +#define ft_strrchr strrchr +#define ft_strstr strstr + + + /**********************************************************************/ + /* */ + /* file handling */ + /* */ + /**********************************************************************/ + + +#include <stdio.h> + +#define FT_FILE FILE +#define ft_fclose fclose +#define ft_fopen fopen +#define ft_fread fread +#define ft_fseek fseek +#define ft_ftell ftell +#define ft_sprintf sprintf + + + /**********************************************************************/ + /* */ + /* sorting */ + /* */ + /**********************************************************************/ + + +#include <stdlib.h> + +#define ft_qsort qsort + + + /**********************************************************************/ + /* */ + /* memory allocation */ + /* */ + /**********************************************************************/ + + +#define ft_scalloc calloc +#define ft_sfree free +#define ft_smalloc malloc +#define ft_srealloc realloc + + + /**********************************************************************/ + /* */ + /* miscellaneous */ + /* */ + /**********************************************************************/ + + +#define ft_atol atol +#define ft_labs labs + + + /**********************************************************************/ + /* */ + /* execution control */ + /* */ + /**********************************************************************/ + + +#include <setjmp.h> + +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ + /* jmp_buf is defined as a macro */ + /* on certain platforms */ + +#define ft_longjmp longjmp +#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */ + + + /* the following is only used for debugging purposes, i.e., if */ + /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ + +#include <stdarg.h> + + +#endif /* __FTSTDLIB_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/freetype.h b/contrib/media/updf/include/freetype/freetype.h new file mode 100644 index 0000000000..70c39008b8 --- /dev/null +++ b/contrib/media/updf/include/freetype/freetype.h @@ -0,0 +1,3919 @@ +/***************************************************************************/ +/* */ +/* freetype.h */ +/* */ +/* FreeType high-level API and common types (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FT_FREETYPE_H +#error "`ft2build.h' hasn't been included yet!" +#error "Please always use macros to include FreeType header files." +#error "Example:" +#error " #include <ft2build.h>" +#error " #include FT_FREETYPE_H" +#endif + + +#ifndef __FREETYPE_H__ +#define __FREETYPE_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_ERRORS_H +#include FT_TYPES_H + + +FT_BEGIN_HEADER + + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* user_allocation */ + /* */ + /* <Title> */ + /* User allocation */ + /* */ + /* <Abstract> */ + /* How client applications should allocate FreeType data structures. */ + /* */ + /* <Description> */ + /* FreeType assumes that structures allocated by the user and passed */ + /* as arguments are zeroed out except for the actual data. In other */ + /* words, it is recommended to use `calloc' (or variants of it) */ + /* instead of `malloc' for allocation. */ + /* */ + /*************************************************************************/ + + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S I C T Y P E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /* <Title> */ + /* Base Interface */ + /* */ + /* <Abstract> */ + /* The FreeType~2 base font interface. */ + /* */ + /* <Description> */ + /* This section describes the public high-level API of FreeType~2. */ + /* */ + /* <Order> */ + /* FT_Library */ + /* FT_Face */ + /* FT_Size */ + /* FT_GlyphSlot */ + /* FT_CharMap */ + /* FT_Encoding */ + /* */ + /* FT_FaceRec */ + /* */ + /* FT_FACE_FLAG_SCALABLE */ + /* FT_FACE_FLAG_FIXED_SIZES */ + /* FT_FACE_FLAG_FIXED_WIDTH */ + /* FT_FACE_FLAG_HORIZONTAL */ + /* FT_FACE_FLAG_VERTICAL */ + /* FT_FACE_FLAG_SFNT */ + /* FT_FACE_FLAG_KERNING */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS */ + /* FT_FACE_FLAG_GLYPH_NAMES */ + /* FT_FACE_FLAG_EXTERNAL_STREAM */ + /* FT_FACE_FLAG_FAST_GLYPHS */ + /* FT_FACE_FLAG_HINTER */ + /* */ + /* FT_STYLE_FLAG_BOLD */ + /* FT_STYLE_FLAG_ITALIC */ + /* */ + /* FT_SizeRec */ + /* FT_Size_Metrics */ + /* */ + /* FT_GlyphSlotRec */ + /* FT_Glyph_Metrics */ + /* FT_SubGlyph */ + /* */ + /* FT_Bitmap_Size */ + /* */ + /* FT_Init_FreeType */ + /* FT_Done_FreeType */ + /* */ + /* FT_New_Face */ + /* FT_Done_Face */ + /* FT_New_Memory_Face */ + /* FT_Open_Face */ + /* FT_Open_Args */ + /* FT_Parameter */ + /* FT_Attach_File */ + /* FT_Attach_Stream */ + /* */ + /* FT_Set_Char_Size */ + /* FT_Set_Pixel_Sizes */ + /* FT_Request_Size */ + /* FT_Select_Size */ + /* FT_Size_Request_Type */ + /* FT_Size_Request */ + /* FT_Set_Transform */ + /* FT_Load_Glyph */ + /* FT_Get_Char_Index */ + /* FT_Get_Name_Index */ + /* FT_Load_Char */ + /* */ + /* FT_OPEN_MEMORY */ + /* FT_OPEN_STREAM */ + /* FT_OPEN_PATHNAME */ + /* FT_OPEN_DRIVER */ + /* FT_OPEN_PARAMS */ + /* */ + /* FT_LOAD_DEFAULT */ + /* FT_LOAD_RENDER */ + /* FT_LOAD_MONOCHROME */ + /* FT_LOAD_LINEAR_DESIGN */ + /* FT_LOAD_NO_SCALE */ + /* FT_LOAD_NO_HINTING */ + /* FT_LOAD_NO_BITMAP */ + /* FT_LOAD_CROP_BITMAP */ + /* */ + /* FT_LOAD_VERTICAL_LAYOUT */ + /* FT_LOAD_IGNORE_TRANSFORM */ + /* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */ + /* FT_LOAD_FORCE_AUTOHINT */ + /* FT_LOAD_NO_RECURSE */ + /* FT_LOAD_PEDANTIC */ + /* */ + /* FT_LOAD_TARGET_NORMAL */ + /* FT_LOAD_TARGET_LIGHT */ + /* FT_LOAD_TARGET_MONO */ + /* FT_LOAD_TARGET_LCD */ + /* FT_LOAD_TARGET_LCD_V */ + /* */ + /* FT_Render_Glyph */ + /* FT_Render_Mode */ + /* FT_Get_Kerning */ + /* FT_Kerning_Mode */ + /* FT_Get_Track_Kerning */ + /* FT_Get_Glyph_Name */ + /* FT_Get_Postscript_Name */ + /* */ + /* FT_CharMapRec */ + /* FT_Select_Charmap */ + /* FT_Set_Charmap */ + /* FT_Get_Charmap_Index */ + /* */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */ + /* FT_FSTYPE_EDITABLE_EMBEDDING */ + /* FT_FSTYPE_NO_SUBSETTING */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */ + /* */ + /* FT_Get_FSType_Flags */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Glyph_Metrics */ + /* */ + /* <Description> */ + /* A structure used to model the metrics of a single glyph. The */ + /* values are expressed in 26.6 fractional pixel format; if the flag */ + /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ + /* are expressed in font units instead. */ + /* */ + /* <Fields> */ + /* width :: */ + /* The glyph's width. */ + /* */ + /* height :: */ + /* The glyph's height. */ + /* */ + /* horiBearingX :: */ + /* Left side bearing for horizontal layout. */ + /* */ + /* horiBearingY :: */ + /* Top side bearing for horizontal layout. */ + /* */ + /* horiAdvance :: */ + /* Advance width for horizontal layout. */ + /* */ + /* vertBearingX :: */ + /* Left side bearing for vertical layout. */ + /* */ + /* vertBearingY :: */ + /* Top side bearing for vertical layout. */ + /* */ + /* vertAdvance :: */ + /* Advance height for vertical layout. */ + /* */ + /* <Note> */ + /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ + /* dimensions of the hinted glyph (in case hinting is applicable). */ + /* */ + typedef struct FT_Glyph_Metrics_ + { + FT_Pos width; + FT_Pos height; + + FT_Pos horiBearingX; + FT_Pos horiBearingY; + FT_Pos horiAdvance; + + FT_Pos vertBearingX; + FT_Pos vertBearingY; + FT_Pos vertAdvance; + + } FT_Glyph_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap_Size */ + /* */ + /* <Description> */ + /* This structure models the metrics of a bitmap strike (i.e., a set */ + /* of glyphs for a given point size and resolution) in a bitmap font. */ + /* It is used for the `available_sizes' field of @FT_Face. */ + /* */ + /* <Fields> */ + /* height :: The vertical distance, in pixels, between two */ + /* consecutive baselines. It is always positive. */ + /* */ + /* width :: The average width, in pixels, of all glyphs in the */ + /* strike. */ + /* */ + /* size :: The nominal size of the strike in 26.6 fractional */ + /* points. This field is not very useful. */ + /* */ + /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ + /* pixels. */ + /* */ + /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ + /* pixels. */ + /* */ + /* <Note> */ + /* Windows FNT: */ + /* The nominal size given in a FNT font is not reliable. Thus when */ + /* the driver finds it incorrect, it sets `size' to some calculated */ + /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ + /* height given in the font, respectively. */ + /* */ + /* TrueType embedded bitmaps: */ + /* `size', `width', and `height' values are not contained in the */ + /* bitmap strike itself. They are computed from the global font */ + /* parameters. */ + /* */ + typedef struct FT_Bitmap_Size_ + { + FT_Short height; + FT_Short width; + + FT_Pos size; + + FT_Pos x_ppem; + FT_Pos y_ppem; + + } FT_Bitmap_Size; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Library */ + /* */ + /* <Description> */ + /* A handle to a FreeType library instance. Each `library' is */ + /* completely independent from the others; it is the `root' of a set */ + /* of objects like fonts, faces, sizes, etc. */ + /* */ + /* It also embeds a memory manager (see @FT_Memory), as well as a */ + /* scan-line converter object (see @FT_Raster). */ + /* */ + /* For multi-threading applications each thread should have its own */ + /* FT_Library object. */ + /* */ + /* <Note> */ + /* Library objects are normally created by @FT_Init_FreeType, and */ + /* destroyed with @FT_Done_FreeType. */ + /* */ + typedef struct FT_LibraryRec_ *FT_Library; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Module */ + /* */ + /* <Description> */ + /* A handle to a given FreeType module object. Each module can be a */ + /* font driver, a renderer, or anything else that provides services */ + /* to the formers. */ + /* */ + typedef struct FT_ModuleRec_* FT_Module; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Driver */ + /* */ + /* <Description> */ + /* A handle to a given FreeType font driver object. Each font driver */ + /* is a special module capable of creating faces from font files. */ + /* */ + typedef struct FT_DriverRec_* FT_Driver; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Renderer */ + /* */ + /* <Description> */ + /* A handle to a given FreeType renderer. A renderer is a special */ + /* module in charge of converting a glyph image to a bitmap, when */ + /* necessary. Each renderer supports a given glyph image format, and */ + /* one or more target surface depths. */ + /* */ + typedef struct FT_RendererRec_* FT_Renderer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face */ + /* */ + /* <Description> */ + /* A handle to a given typographic face object. A face object models */ + /* a given typeface, in a given style. */ + /* */ + /* <Note> */ + /* Each face object also owns a single @FT_GlyphSlot object, as well */ + /* as one or more @FT_Size objects. */ + /* */ + /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ + /* a given filepathname or a custom input stream. */ + /* */ + /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ + /* */ + /* <Also> */ + /* See @FT_FaceRec for the publicly accessible fields of a given face */ + /* object. */ + /* */ + typedef struct FT_FaceRec_* FT_Face; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size */ + /* */ + /* <Description> */ + /* A handle to an object used to model a face scaled to a given */ + /* character size. */ + /* */ + /* <Note> */ + /* Each @FT_Face has an _active_ @FT_Size object that is used by */ + /* functions like @FT_Load_Glyph to determine the scaling */ + /* transformation which is used to load and hint glyphs and metrics. */ + /* */ + /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ + /* @FT_Request_Size or even @FT_Select_Size to change the content */ + /* (i.e., the scaling values) of the active @FT_Size. */ + /* */ + /* You can use @FT_New_Size to create additional size objects for a */ + /* given @FT_Face, but they won't be used by other functions until */ + /* you activate it through @FT_Activate_Size. Only one size can be */ + /* activated at any given time per face. */ + /* */ + /* <Also> */ + /* See @FT_SizeRec for the publicly accessible fields of a given size */ + /* object. */ + /* */ + typedef struct FT_SizeRec_* FT_Size; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_GlyphSlot */ + /* */ + /* <Description> */ + /* A handle to a given `glyph slot'. A slot is a container where it */ + /* is possible to load any of the glyphs contained in its parent */ + /* face. */ + /* */ + /* In other words, each time you call @FT_Load_Glyph or */ + /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ + /* i.e., the glyph's metrics, its image (bitmap or outline), and */ + /* other control information. */ + /* */ + /* <Also> */ + /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ + /* */ + typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_CharMap */ + /* */ + /* <Description> */ + /* A handle to a given character map. A charmap is used to translate */ + /* character codes in a given encoding into glyph indexes for its */ + /* parent's face. Some font formats may provide several charmaps per */ + /* font. */ + /* */ + /* Each face object owns zero or more charmaps, but only one of them */ + /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ + /* */ + /* The list of available charmaps in a face is available through the */ + /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ + /* */ + /* The currently active charmap is available as `face->charmap'. */ + /* You should call @FT_Set_Charmap to change it. */ + /* */ + /* <Note> */ + /* When a new face is created (either through @FT_New_Face or */ + /* @FT_Open_Face), the library looks for a Unicode charmap within */ + /* the list and automatically activates it. */ + /* */ + /* <Also> */ + /* See @FT_CharMapRec for the publicly accessible fields of a given */ + /* character map. */ + /* */ + typedef struct FT_CharMapRec_* FT_CharMap; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_ENC_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags into an unsigned long. It is */ + /* used to define `encoding' identifiers (see @FT_Encoding). */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_ENC_TAG( value, a, b, c, d ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ + +#ifndef FT_ENC_TAG +#define FT_ENC_TAG( value, a, b, c, d ) \ + value = ( ( (FT_UInt32)(a) << 24 ) | \ + ( (FT_UInt32)(b) << 16 ) | \ + ( (FT_UInt32)(c) << 8 ) | \ + (FT_UInt32)(d) ) + +#endif /* FT_ENC_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Encoding */ + /* */ + /* <Description> */ + /* An enumeration used to specify character sets supported by */ + /* charmaps. Used in the @FT_Select_Charmap API function. */ + /* */ + /* <Note> */ + /* Despite the name, this enumeration lists specific character */ + /* repertories (i.e., charsets), and not text encoding methods (e.g., */ + /* UTF-8, UTF-16, etc.). */ + /* */ + /* Other encodings might be defined in the future. */ + /* */ + /* <Values> */ + /* FT_ENCODING_NONE :: */ + /* The encoding value~0 is reserved. */ + /* */ + /* FT_ENCODING_UNICODE :: */ + /* Corresponds to the Unicode character set. This value covers */ + /* all versions of the Unicode repertoire, including ASCII and */ + /* Latin-1. Most fonts include a Unicode charmap, but not all */ + /* of them. */ + /* */ + /* For example, if you want to access Unicode value U+1F028 (and */ + /* the font contains it), use value 0x1F028 as the input value for */ + /* @FT_Get_Char_Index. */ + /* */ + /* FT_ENCODING_MS_SYMBOL :: */ + /* Corresponds to the Microsoft Symbol encoding, used to encode */ + /* mathematical symbols in the 32..255 character code range. For */ + /* more information, see `http://www.ceviz.net/symbol.htm'. */ + /* */ + /* FT_ENCODING_SJIS :: */ + /* Corresponds to Japanese SJIS encoding. More info at */ + /* at `http://langsupport.japanreference.com/encoding.shtml'. */ + /* See note on multi-byte encodings below. */ + /* */ + /* FT_ENCODING_GB2312 :: */ + /* Corresponds to an encoding system for Simplified Chinese as used */ + /* used in mainland China. */ + /* */ + /* FT_ENCODING_BIG5 :: */ + /* Corresponds to an encoding system for Traditional Chinese as */ + /* used in Taiwan and Hong Kong. */ + /* */ + /* FT_ENCODING_WANSUNG :: */ + /* Corresponds to the Korean encoding system known as Wansung. */ + /* For more information see */ + /* `http://www.microsoft.com/typography/unicode/949.txt'. */ + /* */ + /* FT_ENCODING_JOHAB :: */ + /* The Korean standard character set (KS~C 5601-1992), which */ + /* corresponds to MS Windows code page 1361. This character set */ + /* includes all possible Hangeul character combinations. */ + /* */ + /* FT_ENCODING_ADOBE_LATIN_1 :: */ + /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ + /* PostScript font. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_STANDARD :: */ + /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_EXPERT :: */ + /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_CUSTOM :: */ + /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_APPLE_ROMAN :: */ + /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ + /* and OpenType fonts contain a charmap for this encoding, since */ + /* older versions of Mac OS are able to use it. */ + /* */ + /* FT_ENCODING_OLD_LATIN_2 :: */ + /* This value is deprecated and was never used nor reported by */ + /* FreeType. Don't use or test for it. */ + /* */ + /* FT_ENCODING_MS_SJIS :: */ + /* Same as FT_ENCODING_SJIS. Deprecated. */ + /* */ + /* FT_ENCODING_MS_GB2312 :: */ + /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* */ + /* FT_ENCODING_MS_BIG5 :: */ + /* Same as FT_ENCODING_BIG5. Deprecated. */ + /* */ + /* FT_ENCODING_MS_WANSUNG :: */ + /* Same as FT_ENCODING_WANSUNG. Deprecated. */ + /* */ + /* FT_ENCODING_MS_JOHAB :: */ + /* Same as FT_ENCODING_JOHAB. Deprecated. */ + /* */ + /* <Note> */ + /* By default, FreeType automatically synthesizes a Unicode charmap */ + /* for PostScript fonts, using their glyph names dictionaries. */ + /* However, it also reports the encodings defined explicitly in the */ + /* font file, for the cases when they are needed, with the Adobe */ + /* values as well. */ + /* */ + /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ + /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ + /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ + /* which encoding is really present. If, for example, the */ + /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ + /* the font is encoded in KOI8-R. */ + /* */ + /* FT_ENCODING_NONE is always set (with a single exception) by the */ + /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ + /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ + /* which encoding is really present. For example, */ + /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ + /* Russian). */ + /* */ + /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ + /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ + /* FT_ENCODING_APPLE_ROMAN). */ + /* */ + /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ + /* @FT_Get_CMap_Language_ID to query the Mac language ID which may */ + /* be needed to be able to distinguish Apple encoding variants. See */ + /* */ + /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */ + /* */ + /* to get an idea how to do that. Basically, if the language ID */ + /* is~0, don't use it, otherwise subtract 1 from the language ID. */ + /* Then examine `encoding_id'. If, for example, `encoding_id' is */ + /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ + /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ + /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* variant the Arabic encoding. */ + /* */ + typedef enum FT_Encoding_ + { + FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), + + FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), + FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), + + FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), + FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), + FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), + FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), + + /* for backwards compatibility */ + FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, + FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, + FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, + FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, + + FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), + + FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), + + FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) + + } FT_Encoding; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_encoding_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated; use the corresponding @FT_Encoding */ + /* values instead. */ + /* */ +#define ft_encoding_none FT_ENCODING_NONE +#define ft_encoding_unicode FT_ENCODING_UNICODE +#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL +#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 +#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB + +#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD +#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT +#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM +#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_CharMapRec */ + /* */ + /* <Description> */ + /* The base charmap structure. */ + /* */ + /* <Fields> */ + /* face :: A handle to the parent face object. */ + /* */ + /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ + /* this with @FT_Select_Charmap. */ + /* */ + /* platform_id :: An ID number describing the platform for the */ + /* following encoding ID. This comes directly from */ + /* the TrueType specification and should be emulated */ + /* for other formats. */ + /* */ + /* encoding_id :: A platform specific encoding number. This also */ + /* comes from the TrueType specification and should be */ + /* emulated similarly. */ + /* */ + typedef struct FT_CharMapRec_ + { + FT_Face face; + FT_Encoding encoding; + FT_UShort platform_id; + FT_UShort encoding_id; + + } FT_CharMapRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S E O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ + /* model private data of a given @FT_Face object. */ + /* */ + /* This structure might change between releases of FreeType~2 and is */ + /* not generally available to client applications. */ + /* */ + typedef struct FT_Face_InternalRec_* FT_Face_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_FaceRec */ + /* */ + /* <Description> */ + /* FreeType root face class structure. A face object models a */ + /* typeface in a font file. */ + /* */ + /* <Fields> */ + /* num_faces :: The number of faces in the font file. Some */ + /* font formats can have multiple faces in */ + /* a font file. */ + /* */ + /* face_index :: The index of the face in the font file. It */ + /* is set to~0 if there is only one face in */ + /* the font file. */ + /* */ + /* face_flags :: A set of bit flags that give important */ + /* information about the face; see */ + /* @FT_FACE_FLAG_XXX for the details. */ + /* */ + /* style_flags :: A set of bit flags indicating the style of */ + /* the face; see @FT_STYLE_FLAG_XXX for the */ + /* details. */ + /* */ + /* num_glyphs :: The number of glyphs in the face. If the */ + /* face is scalable and has sbits (see */ + /* `num_fixed_sizes'), it is set to the number */ + /* of outline glyphs. */ + /* */ + /* For CID-keyed fonts, this value gives the */ + /* highest CID used in the font. */ + /* */ + /* family_name :: The face's family name. This is an ASCII */ + /* string, usually in English, which describes */ + /* the typeface's family (like `Times New */ + /* Roman', `Bodoni', `Garamond', etc). This */ + /* is a least common denominator used to list */ + /* fonts. Some formats (TrueType & OpenType) */ + /* provide localized and Unicode versions of */ + /* this string. Applications should use the */ + /* format specific interface to access them. */ + /* Can be NULL (e.g., in fonts embedded in a */ + /* PDF file). */ + /* */ + /* style_name :: The face's style name. This is an ASCII */ + /* string, usually in English, which describes */ + /* the typeface's style (like `Italic', */ + /* `Bold', `Condensed', etc). Not all font */ + /* formats provide a style name, so this field */ + /* is optional, and can be set to NULL. As */ + /* for `family_name', some formats provide */ + /* localized and Unicode versions of this */ + /* string. Applications should use the format */ + /* specific interface to access them. */ + /* */ + /* num_fixed_sizes :: The number of bitmap strikes in the face. */ + /* Even if the face is scalable, there might */ + /* still be bitmap strikes, which are called */ + /* `sbits' in that case. */ + /* */ + /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ + /* strikes in the face. It is set to NULL if */ + /* there is no bitmap strike. */ + /* */ + /* num_charmaps :: The number of charmaps in the face. */ + /* */ + /* charmaps :: An array of the charmaps of the face. */ + /* */ + /* generic :: A field reserved for client uses. See the */ + /* @FT_Generic type description. */ + /* */ + /* bbox :: The font bounding box. Coordinates are */ + /* expressed in font units (see */ + /* `units_per_EM'). The box is large enough */ + /* to contain any glyph from the font. Thus, */ + /* `bbox.yMax' can be seen as the `maximal */ + /* ascender', and `bbox.yMin' as the `minimal */ + /* descender'. Only relevant for scalable */ + /* formats. */ + /* */ + /* Note that the bounding box might be off by */ + /* (at least) one pixel for hinted fonts. See */ + /* @FT_Size_Metrics for further discussion. */ + /* */ + /* units_per_EM :: The number of font units per EM square for */ + /* this face. This is typically 2048 for */ + /* TrueType fonts, and 1000 for Type~1 fonts. */ + /* Only relevant for scalable formats. */ + /* */ + /* ascender :: The typographic ascender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMax'. Only relevant for scalable */ + /* formats. */ + /* */ + /* descender :: The typographic descender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMin'. Note that this field is */ + /* usually negative. Only relevant for */ + /* scalable formats. */ + /* */ + /* height :: The height is the vertical distance */ + /* between two consecutive baselines, */ + /* expressed in font units. It is always */ + /* positive. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_width :: The maximal advance width, in font units, */ + /* for all glyphs in this face. This can be */ + /* used to make word wrapping computations */ + /* faster. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_height :: The maximal advance height, in font units, */ + /* for all glyphs in this face. This is only */ + /* relevant for vertical layouts, and is set */ + /* to `height' for fonts that do not provide */ + /* vertical metrics. Only relevant for */ + /* scalable formats. */ + /* */ + /* underline_position :: The position, in font units, of the */ + /* underline line for this face. It is the */ + /* center of the underlining stem. Only */ + /* relevant for scalable formats. */ + /* */ + /* underline_thickness :: The thickness, in font units, of the */ + /* underline for this face. Only relevant for */ + /* scalable formats. */ + /* */ + /* glyph :: The face's associated glyph slot(s). */ + /* */ + /* size :: The current active size for this face. */ + /* */ + /* charmap :: The current active charmap for this face. */ + /* */ + /* <Note> */ + /* Fields may be changed after a call to @FT_Attach_File or */ + /* @FT_Attach_Stream. */ + /* */ + typedef struct FT_FaceRec_ + { + FT_Long num_faces; + FT_Long face_index; + + FT_Long face_flags; + FT_Long style_flags; + + FT_Long num_glyphs; + + FT_String* family_name; + FT_String* style_name; + + FT_Int num_fixed_sizes; + FT_Bitmap_Size* available_sizes; + + FT_Int num_charmaps; + FT_CharMap* charmaps; + + FT_Generic generic; + + /*# The following member variables (down to `underline_thickness') */ + /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ + /*# for bitmap fonts. */ + FT_BBox bbox; + + FT_UShort units_per_EM; + FT_Short ascender; + FT_Short descender; + FT_Short height; + + FT_Short max_advance_width; + FT_Short max_advance_height; + + FT_Short underline_position; + FT_Short underline_thickness; + + FT_GlyphSlot glyph; + FT_Size size; + FT_CharMap charmap; + + /*@private begin */ + + FT_Driver driver; + FT_Memory memory; + FT_Stream stream; + + FT_ListRec sizes_list; + + FT_Generic autohint; + void* extensions; + + FT_Face_Internal internal; + + /*@private end */ + + } FT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FACE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `face_flags' field of the */ + /* @FT_FaceRec structure. They inform client applications of */ + /* properties of the corresponding face. */ + /* */ + /* <Values> */ + /* FT_FACE_FLAG_SCALABLE :: */ + /* Indicates that the face contains outline glyphs. This doesn't */ + /* prevent bitmap strikes, i.e., a face can have both this and */ + /* and @FT_FACE_FLAG_FIXED_SIZES set. */ + /* */ + /* FT_FACE_FLAG_FIXED_SIZES :: */ + /* Indicates that the face contains bitmap strikes. See also the */ + /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ + /* */ + /* FT_FACE_FLAG_FIXED_WIDTH :: */ + /* Indicates that the face contains fixed-width characters (like */ + /* Courier, Lucido, MonoType, etc.). */ + /* */ + /* FT_FACE_FLAG_SFNT :: */ + /* Indicates that the face uses the `sfnt' storage scheme. For */ + /* now, this means TrueType and OpenType. */ + /* */ + /* FT_FACE_FLAG_HORIZONTAL :: */ + /* Indicates that the face contains horizontal glyph metrics. This */ + /* should be set for all common formats. */ + /* */ + /* FT_FACE_FLAG_VERTICAL :: */ + /* Indicates that the face contains vertical glyph metrics. This */ + /* is only available in some formats, not all of them. */ + /* */ + /* FT_FACE_FLAG_KERNING :: */ + /* Indicates that the face contains kerning information. If set, */ + /* the kerning distance can be retrieved through the function */ + /* @FT_Get_Kerning. Otherwise the function always return the */ + /* vector (0,0). Note that FreeType doesn't handle kerning data */ + /* from the `GPOS' table (as present in some OpenType fonts). */ + /* */ + /* FT_FACE_FLAG_FAST_GLYPHS :: */ + /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ + /* */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ + /* Indicates that the font contains multiple masters and is capable */ + /* of interpolating between them. See the multiple-masters */ + /* specific API for details. */ + /* */ + /* FT_FACE_FLAG_GLYPH_NAMES :: */ + /* Indicates that the font contains glyph names that can be */ + /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ + /* fonts contain broken glyph name tables. Use the function */ + /* @FT_Has_PS_Glyph_Names when needed. */ + /* */ + /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ + /* Used internally by FreeType to indicate that a face's stream was */ + /* provided by the client application and should not be destroyed */ + /* when @FT_Done_Face is called. Don't read or test this flag. */ + /* */ + /* FT_FACE_FLAG_HINTER :: */ + /* Set if the font driver has a hinting machine of its own. For */ + /* example, with TrueType fonts, it makes sense to use data from */ + /* the SFNT `gasp' table only if the native TrueType hinting engine */ + /* (with the bytecode interpreter) is available and active. */ + /* */ + /* FT_FACE_FLAG_CID_KEYED :: */ + /* Set if the font is CID-keyed. In that case, the font is not */ + /* accessed by glyph indices but by CID values. For subsetted */ + /* CID-keyed fonts this has the consequence that not all index */ + /* values are a valid argument to FT_Load_Glyph. Only the CID */ + /* values for which corresponding glyphs in the subsetted font */ + /* exist make FT_Load_Glyph return successfully; in all other cases */ + /* you get an `FT_Err_Invalid_Argument' error. */ + /* */ + /* Note that CID-keyed fonts which are in an SFNT wrapper don't */ + /* have this flag set since the glyphs are accessed in the normal */ + /* way (using contiguous indices); the `CID-ness' isn't visible to */ + /* the application. */ + /* */ + /* FT_FACE_FLAG_TRICKY :: */ + /* Set if the font is `tricky', this is, it always needs the */ + /* font format's native hinting engine to get a reasonable result. */ + /* A typical example is the Chinese font `mingli.ttf' which uses */ + /* TrueType bytecode instructions to move and scale all of its */ + /* subglyphs. */ + /* */ + /* It is not possible to autohint such fonts using */ + /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ + /* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */ + /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ + /* probably never want this except for demonstration purposes. */ + /* */ + /* Currently, there are six TrueType fonts in the list of tricky */ + /* fonts; they are hard-coded in file `ttobjs.c'. */ + /* */ +#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) +#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) +#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) +#define FT_FACE_FLAG_SFNT ( 1L << 3 ) +#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) +#define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) +#define FT_FACE_FLAG_KERNING ( 1L << 6 ) +#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) +#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) +#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) +#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) +#define FT_FACE_FLAG_HINTER ( 1L << 11 ) +#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) +#define FT_FACE_FLAG_TRICKY ( 1L << 13 ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_HORIZONTAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * horizontal metrics (this is true for all font formats though). + * + * @also: + * @FT_HAS_VERTICAL can be used to check for vertical metrics. + * + */ +#define FT_HAS_HORIZONTAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_HORIZONTAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_VERTICAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains vertical + * metrics. + * + */ +#define FT_HAS_VERTICAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_VERTICAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_KERNING( face ) + * + * @description: + * A macro that returns true whenever a face object contains kerning + * data that can be accessed with @FT_Get_Kerning. + * + */ +#define FT_HAS_KERNING( face ) \ + ( face->face_flags & FT_FACE_FLAG_KERNING ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SCALABLE( face ) + * + * @description: + * A macro that returns true whenever a face object contains a scalable + * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, + * and PFR font formats. + * + */ +#define FT_IS_SCALABLE( face ) \ + ( face->face_flags & FT_FACE_FLAG_SCALABLE ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SFNT( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font + * whose format is based on the SFNT storage scheme. This usually + * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded + * bitmap fonts. + * + * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and + * @FT_TRUETYPE_TABLES_H are available. + * + */ +#define FT_IS_SFNT( face ) \ + ( face->face_flags & FT_FACE_FLAG_SFNT ) + + + /************************************************************************* + * + * @macro: + * FT_IS_FIXED_WIDTH( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font face + * that contains fixed-width (or `monospace', `fixed-pitch', etc.) + * glyphs. + * + */ +#define FT_IS_FIXED_WIDTH( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FIXED_SIZES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * embedded bitmaps. See the `available_sizes' field of the + * @FT_FaceRec structure. + * + */ +#define FT_HAS_FIXED_SIZES( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FAST_GLYPHS( face ) + * + * @description: + * Deprecated. + * + */ +#define FT_HAS_FAST_GLYPHS( face ) 0 + + + /************************************************************************* + * + * @macro: + * FT_HAS_GLYPH_NAMES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some glyph + * names that can be accessed through @FT_Get_Glyph_Name. + * + */ +#define FT_HAS_GLYPH_NAMES( face ) \ + ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_MULTIPLE_MASTERS( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H + * are then available to choose the exact design you want. + * + */ +#define FT_HAS_MULTIPLE_MASTERS( face ) \ + ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) + + + /************************************************************************* + * + * @macro: + * FT_IS_CID_KEYED( face ) + * + * @description: + * A macro that returns true whenever a face object contains a CID-keyed + * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more + * details. + * + * If this macro is true, all functions defined in @FT_CID_H are + * available. + * + */ +#define FT_IS_CID_KEYED( face ) \ + ( face->face_flags & FT_FACE_FLAG_CID_KEYED ) + + + /************************************************************************* + * + * @macro: + * FT_IS_TRICKY( face ) + * + * @description: + * A macro that returns true whenever a face represents a `tricky' font. + * See the discussion of @FT_FACE_FLAG_TRICKY for more details. + * + */ +#define FT_IS_TRICKY( face ) \ + ( face->face_flags & FT_FACE_FLAG_TRICKY ) + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_STYLE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit-flags used to indicate the style of a given face. */ + /* These are used in the `style_flags' field of @FT_FaceRec. */ + /* */ + /* <Values> */ + /* FT_STYLE_FLAG_ITALIC :: */ + /* Indicates that a given face style is italic or oblique. */ + /* */ + /* FT_STYLE_FLAG_BOLD :: */ + /* Indicates that a given face is bold. */ + /* */ + /* <Note> */ + /* The style information as provided by FreeType is very basic. More */ + /* details are beyond the scope and should be done on a higher level */ + /* (for example, by analyzing various fields of the `OS/2' table in */ + /* SFNT based fonts). */ + /* */ +#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) +#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ + /* model private data of a given @FT_Size object. */ + /* */ + typedef struct FT_Size_InternalRec_* FT_Size_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Metrics */ + /* */ + /* <Description> */ + /* The size metrics structure gives the metrics of a size object. */ + /* */ + /* <Fields> */ + /* x_ppem :: The width of the scaled EM square in pixels, hence */ + /* the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal width'. */ + /* */ + /* y_ppem :: The height of the scaled EM square in pixels, */ + /* hence the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal height'. */ + /* */ + /* x_scale :: A 16.16 fractional scaling value used to convert */ + /* horizontal metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* y_scale :: A 16.16 fractional scaling value used to convert */ + /* vertical metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* ascender :: The ascender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* descender :: The descender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* height :: The height in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* max_advance :: The maximal advance width in 26.6 fractional */ + /* pixels. See @FT_FaceRec for the details. */ + /* */ + /* <Note> */ + /* The scaling values, if relevant, are determined first during a */ + /* size changing operation. The remaining fields are then set by the */ + /* driver. For scalable formats, they are usually set to scaled */ + /* values of the corresponding fields in @FT_FaceRec. */ + /* */ + /* Note that due to glyph hinting, these values might not be exact */ + /* for certain fonts. Thus they must be treated as unreliable */ + /* with an error margin of at least one pixel! */ + /* */ + /* Indeed, the only way to get the exact metrics is to render _all_ */ + /* glyphs. As this would be a definite performance hit, it is up to */ + /* client applications to perform such computations. */ + /* */ + /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ + /* */ + typedef struct FT_Size_Metrics_ + { + FT_UShort x_ppem; /* horizontal pixels per EM */ + FT_UShort y_ppem; /* vertical pixels per EM */ + + FT_Fixed x_scale; /* scaling values used to convert font */ + FT_Fixed y_scale; /* units to 26.6 fractional pixels */ + + FT_Pos ascender; /* ascender in 26.6 frac. pixels */ + FT_Pos descender; /* descender in 26.6 frac. pixels */ + FT_Pos height; /* text height in 26.6 frac. pixels */ + FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ + + } FT_Size_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SizeRec */ + /* */ + /* <Description> */ + /* FreeType root size class structure. A size object models a face */ + /* object at a given size. */ + /* */ + /* <Fields> */ + /* face :: Handle to the parent face object. */ + /* */ + /* generic :: A typeless pointer, which is unused by the FreeType */ + /* library or any of its drivers. It can be used by */ + /* client applications to link their own data to each size */ + /* object. */ + /* */ + /* metrics :: Metrics for this size object. This field is read-only. */ + /* */ + typedef struct FT_SizeRec_ + { + FT_Face face; /* parent face object */ + FT_Generic generic; /* generic pointer for client uses */ + FT_Size_Metrics metrics; /* size metrics */ + FT_Size_Internal internal; + + } FT_SizeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SubGlyph */ + /* */ + /* <Description> */ + /* The subglyph structure is an internal object used to describe */ + /* subglyphs (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The subglyph implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + /* You can however retrieve subglyph information with */ + /* @FT_Get_SubGlyph_Info. */ + /* */ + typedef struct FT_SubGlyphRec_* FT_SubGlyph; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Slot_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ + /* model private data of a given @FT_GlyphSlot object. */ + /* */ + typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphSlotRec */ + /* */ + /* <Description> */ + /* FreeType root glyph slot class structure. A glyph slot is a */ + /* container where individual glyphs can be loaded, be they in */ + /* outline or bitmap format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library instance */ + /* this slot belongs to. */ + /* */ + /* face :: A handle to the parent face object. */ + /* */ + /* next :: In some cases (like some font tools), several */ + /* glyph slots per face object can be a good */ + /* thing. As this is rare, the glyph slots are */ + /* listed through a direct, single-linked list */ + /* using its `next' field. */ + /* */ + /* generic :: A typeless pointer which is unused by the */ + /* FreeType library or any of its drivers. It */ + /* can be used by client applications to link */ + /* their own data to each glyph slot object. */ + /* */ + /* metrics :: The metrics of the last loaded glyph in the */ + /* slot. The returned values depend on the last */ + /* load flags (see the @FT_Load_Glyph API */ + /* function) and can be expressed either in 26.6 */ + /* fractional pixels or font units. */ + /* */ + /* Note that even when the glyph image is */ + /* transformed, the metrics are not. */ + /* */ + /* linearHoriAdvance :: The advance width of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* linearVertAdvance :: The advance height of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* advance :: This shorthand is, depending on */ + /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ + /* advance width for the glyph (in 26.6 */ + /* fractional pixel format). As specified with */ + /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ + /* `horiAdvance' or the `vertAdvance' value of */ + /* `metrics' field. */ + /* */ + /* format :: This field indicates the format of the image */ + /* contained in the glyph slot. Typically */ + /* @FT_GLYPH_FORMAT_BITMAP, */ + /* @FT_GLYPH_FORMAT_OUTLINE, or */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ + /* possible. */ + /* */ + /* bitmap :: This field is used as a bitmap descriptor */ + /* when the slot format is */ + /* @FT_GLYPH_FORMAT_BITMAP. Note that the */ + /* address and content of the bitmap buffer can */ + /* change between calls of @FT_Load_Glyph and a */ + /* few other functions. */ + /* */ + /* bitmap_left :: This is the bitmap's left bearing expressed */ + /* in integer pixels. Of course, this is only */ + /* valid if the format is */ + /* @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* bitmap_top :: This is the bitmap's top bearing expressed in */ + /* integer pixels. Remember that this is the */ + /* distance from the baseline to the top-most */ + /* glyph scanline, upwards y~coordinates being */ + /* *positive*. */ + /* */ + /* outline :: The outline descriptor for the current glyph */ + /* image if its format is */ + /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ + /* loaded, `outline' can be transformed, */ + /* distorted, embolded, etc. However, it must */ + /* not be freed. */ + /* */ + /* num_subglyphs :: The number of subglyphs in a composite glyph. */ + /* This field is only valid for the composite */ + /* glyph format that should normally only be */ + /* loaded with the @FT_LOAD_NO_RECURSE flag. */ + /* For now this is internal to FreeType. */ + /* */ + /* subglyphs :: An array of subglyph descriptors for */ + /* composite glyphs. There are `num_subglyphs' */ + /* elements in there. Currently internal to */ + /* FreeType. */ + /* */ + /* control_data :: Certain font drivers can also return the */ + /* control data for a given glyph image (e.g. */ + /* TrueType bytecode, Type~1 charstrings, etc.). */ + /* This field is a pointer to such data. */ + /* */ + /* control_len :: This is the length in bytes of the control */ + /* data. */ + /* */ + /* other :: Really wicked formats can use this pointer to */ + /* present their own glyph image to client */ + /* applications. Note that the application */ + /* needs to know about the image format. */ + /* */ + /* lsb_delta :: The difference between hinted and unhinted */ + /* left side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* rsb_delta :: The difference between hinted and unhinted */ + /* right side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* <Note> */ + /* If @FT_Load_Glyph is called with default flags (see */ + /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ + /* its native format (e.g., an outline glyph for TrueType and Type~1 */ + /* formats). */ + /* */ + /* This image can later be converted into a bitmap by calling */ + /* @FT_Render_Glyph. This function finds the current renderer for */ + /* the native image's format, then invokes it. */ + /* */ + /* The renderer is in charge of transforming the native image through */ + /* the slot's face transformation fields, then converting it into a */ + /* bitmap that is returned in `slot->bitmap'. */ + /* */ + /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ + /* to specify the position of the bitmap relative to the current pen */ + /* position (e.g., coordinates (0,0) on the baseline). Of course, */ + /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* <Note> */ + /* Here a small pseudo code fragment which shows how to use */ + /* `lsb_delta' and `rsb_delta': */ + /* */ + /* { */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* <compute kern between current and previous glyph and add it to */ + /* `origin_x'> */ + /* */ + /* <load glyph with `FT_Load_Glyph'> */ + /* */ + /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ + /* origin_x -= 64; */ + /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ + /* origin_x += 64; */ + /* */ + /* prev_rsb_delta = face->glyph->rsb_delta; */ + /* */ + /* <save glyph image, or render glyph, or ...> */ + /* */ + /* origin_x += face->glyph->advance.x; */ + /* endfor */ + /* } */ + /* */ + typedef struct FT_GlyphSlotRec_ + { + FT_Library library; + FT_Face face; + FT_GlyphSlot next; + FT_UInt reserved; /* retained for binary compatibility */ + FT_Generic generic; + + FT_Glyph_Metrics metrics; + FT_Fixed linearHoriAdvance; + FT_Fixed linearVertAdvance; + FT_Vector advance; + + FT_Glyph_Format format; + + FT_Bitmap bitmap; + FT_Int bitmap_left; + FT_Int bitmap_top; + + FT_Outline outline; + + FT_UInt num_subglyphs; + FT_SubGlyph subglyphs; + + void* control_data; + long control_len; + + FT_Pos lsb_delta; + FT_Pos rsb_delta; + + void* other; + + FT_Slot_Internal internal; + + } FT_GlyphSlotRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* F U N C T I O N S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Init_FreeType */ + /* */ + /* <Description> */ + /* Initialize a new FreeType library object. The set of modules */ + /* that are registered by this function is determined at build time. */ + /* */ + /* <Output> */ + /* alibrary :: A handle to a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case you want to provide your own memory allocating routines, */ + /* use @FT_New_Library instead, followed by a call to */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Init_FreeType( FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_FreeType */ + /* */ + /* <Description> */ + /* Destroy a given FreeType library object and all of its children, */ + /* including resources, drivers, faces, sizes, etc. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_FreeType( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OPEN_XXX */ + /* */ + /* <Description> */ + /* A list of bit-field constants used within the `flags' field of the */ + /* @FT_Open_Args structure. */ + /* */ + /* <Values> */ + /* FT_OPEN_MEMORY :: This is a memory-based stream. */ + /* */ + /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ + /* */ + /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ + /* name. */ + /* */ + /* FT_OPEN_DRIVER :: Use the `driver' field. */ + /* */ + /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ + /* */ + /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */ + /* */ + /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */ + /* */ + /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */ + /* */ + /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */ + /* */ + /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */ + /* */ + /* <Note> */ + /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ + /* flags are mutually exclusive. */ + /* */ +#define FT_OPEN_MEMORY 0x1 +#define FT_OPEN_STREAM 0x2 +#define FT_OPEN_PATHNAME 0x4 +#define FT_OPEN_DRIVER 0x8 +#define FT_OPEN_PARAMS 0x10 + +#define ft_open_memory FT_OPEN_MEMORY /* deprecated */ +#define ft_open_stream FT_OPEN_STREAM /* deprecated */ +#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */ +#define ft_open_driver FT_OPEN_DRIVER /* deprecated */ +#define ft_open_params FT_OPEN_PARAMS /* deprecated */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Parameter */ + /* */ + /* <Description> */ + /* A simple structure used to pass more or less generic parameters to */ + /* @FT_Open_Face. */ + /* */ + /* <Fields> */ + /* tag :: A four-byte identification tag. */ + /* */ + /* data :: A pointer to the parameter data. */ + /* */ + /* <Note> */ + /* The ID and function of parameters are driver-specific. See the */ + /* various FT_PARAM_TAG_XXX flags for more information. */ + /* */ + typedef struct FT_Parameter_ + { + FT_ULong tag; + FT_Pointer data; + + } FT_Parameter; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Open_Args */ + /* */ + /* <Description> */ + /* A structure used to indicate how to open a new font file or */ + /* stream. A pointer to such a structure can be used as a parameter */ + /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ + /* */ + /* <Fields> */ + /* flags :: A set of bit flags indicating how to use the */ + /* structure. */ + /* */ + /* memory_base :: The first byte of the file in memory. */ + /* */ + /* memory_size :: The size in bytes of the file in memory. */ + /* */ + /* pathname :: A pointer to an 8-bit file pathname. */ + /* */ + /* stream :: A handle to a source stream object. */ + /* */ + /* driver :: This field is exclusively used by @FT_Open_Face; */ + /* it simply specifies the font driver to use to open */ + /* the face. If set to~0, FreeType tries to load the */ + /* face with each one of the drivers in its list. */ + /* */ + /* num_params :: The number of extra parameters. */ + /* */ + /* params :: Extra parameters passed to the font driver when */ + /* opening a new face. */ + /* */ + /* <Note> */ + /* The stream type is determined by the contents of `flags' which */ + /* are tested in the following order by @FT_Open_Face: */ + /* */ + /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */ + /* memory file of `memory_size' bytes, located at `memory_address'. */ + /* The data are are not copied, and the client is responsible for */ + /* releasing and destroying them _after_ the corresponding call to */ + /* @FT_Done_Face. */ + /* */ + /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */ + /* custom input stream `stream' is used. */ + /* */ + /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */ + /* is a normal file and use `pathname' to open it. */ + /* */ + /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to */ + /* open the file with the driver whose handler is in `driver'. */ + /* */ + /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */ + /* `num_params' and `params' is used. They are ignored otherwise. */ + /* */ + /* Ideally, both the `pathname' and `params' fields should be tagged */ + /* as `const'; this is missing for API backwards compatibility. In */ + /* other words, applications should treat them as read-only. */ + /* */ + typedef struct FT_Open_Args_ + { + FT_UInt flags; + const FT_Byte* memory_base; + FT_Long memory_size; + FT_String* pathname; + FT_Stream stream; + FT_Module driver; + FT_Int num_params; + FT_Parameter* params; + + } FT_Open_Args; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font by its pathname. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* pathname :: A path to the font file. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face( FT_Library library, + const char* filepathname, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font which has been */ + /* loaded into memory. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* file_base :: A pointer to the beginning of the font data. */ + /* */ + /* file_size :: The size of the memory chunk used by the font data. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You must not deallocate the memory before calling @FT_Done_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Memory_Face( FT_Library library, + const FT_Byte* file_base, + FT_Long file_size, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Open_Face */ + /* */ + /* <Description> */ + /* Create a face object from a given resource described by */ + /* @FT_Open_Args. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* args :: A pointer to an `FT_Open_Args' structure which must */ + /* be filled by the caller. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See note below. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Unlike FreeType 1.x, this function automatically creates a glyph */ + /* slot for the face object which can be accessed directly through */ + /* `face->glyph'. */ + /* */ + /* FT_Open_Face can be used to quickly check whether the font */ + /* format of a given font resource is supported by FreeType. If the */ + /* `face_index' field is negative, the function's return value is~0 */ + /* if the font format is recognized, or non-zero otherwise; */ + /* the function returns a more or less empty face handle in `*aface' */ + /* (if `aface' isn't NULL). The only useful field in this special */ + /* case is `face->num_faces' which gives the number of faces within */ + /* the font file. After examination, the returned @FT_Face structure */ + /* should be deallocated with a call to @FT_Done_Face. */ + /* */ + /* Each new face object created with this function also owns a */ + /* default @FT_Size object, accessible as `face->size'. */ + /* */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Open_Face( FT_Library library, + const FT_Open_Args* args, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_File */ + /* */ + /* <Description> */ + /* This function calls @FT_Attach_Stream to attach a file. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* filepathname :: The pathname. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_File( FT_Face face, + const char* filepathname ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_Stream */ + /* */ + /* <Description> */ + /* `Attach' data to a face object. Normally, this is used to read */ + /* additional information for the face object. For example, you can */ + /* attach an AFM file that comes with a Type~1 font to get the */ + /* kerning values and other metrics. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* parameters :: A pointer to @FT_Open_Args which must be filled by */ + /* the caller. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The meaning of the `attach' (i.e., what really happens when the */ + /* new file is read) is not fixed by FreeType itself. It really */ + /* depends on the font format (and thus the font driver). */ + /* */ + /* Client applications are expected to know what they are doing */ + /* when invoking this function. Most drivers simply do not implement */ + /* file attachments. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_Stream( FT_Face face, + FT_Open_Args* parameters ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Face */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Face structure */ + /* is created. This function increments the counter. @FT_Done_Face */ + /* then only destroys a face if the counter is~1, otherwise it simply */ + /* decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures which */ + /* reference @FT_Face objects. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Face */ + /* */ + /* <Description> */ + /* Discard a given face object, as well as all of its child slots and */ + /* sizes. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Size */ + /* */ + /* <Description> */ + /* Select a bitmap strike. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* strike_index :: The index of the bitmap strike in the */ + /* `available_sizes' field of @FT_FaceRec structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Size( FT_Face face, + FT_Int strike_index ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Size_Request_Type */ + /* */ + /* <Description> */ + /* An enumeration type that lists the supported size request types. */ + /* */ + /* <Values> */ + /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ + /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ + /* used to determine both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ + /* The real dimension. The sum of the the `Ascender' and (minus */ + /* of) the `Descender' fields of @FT_FaceRec are used to determine */ + /* both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_BBOX :: */ + /* The font bounding box. The width and height of the `bbox' field */ + /* of @FT_FaceRec are used to determine the horizontal and vertical */ + /* scaling value, respectively. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_CELL :: */ + /* The `max_advance_width' field of @FT_FaceRec is used to */ + /* determine the horizontal scaling value; the vertical scaling */ + /* value is determined the same way as */ + /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ + /* values are set to the smaller one. This type is useful if you */ + /* want to specify the font size for, say, a window of a given */ + /* dimension and 80x24 cells. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_SCALES :: */ + /* Specify the scaling values directly. */ + /* */ + /* <Note> */ + /* The above descriptions only apply to scalable formats. For bitmap */ + /* formats, the behaviour is up to the driver. */ + /* */ + /* See the note section of @FT_Size_Metrics if you wonder how size */ + /* requesting relates to scaling values. */ + /* */ + typedef enum FT_Size_Request_Type_ + { + FT_SIZE_REQUEST_TYPE_NOMINAL, + FT_SIZE_REQUEST_TYPE_REAL_DIM, + FT_SIZE_REQUEST_TYPE_BBOX, + FT_SIZE_REQUEST_TYPE_CELL, + FT_SIZE_REQUEST_TYPE_SCALES, + + FT_SIZE_REQUEST_TYPE_MAX + + } FT_Size_Request_Type; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_RequestRec */ + /* */ + /* <Description> */ + /* A structure used to model a size request. */ + /* */ + /* <Fields> */ + /* type :: See @FT_Size_Request_Type. */ + /* */ + /* width :: The desired width. */ + /* */ + /* height :: The desired height. */ + /* */ + /* horiResolution :: The horizontal resolution. If set to zero, */ + /* `width' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* vertResolution :: The vertical resolution. If set to zero, */ + /* `height' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* <Note> */ + /* If `width' is zero, then the horizontal scaling value is set equal */ + /* to the vertical scaling value, and vice versa. */ + /* */ + typedef struct FT_Size_RequestRec_ + { + FT_Size_Request_Type type; + FT_Long width; + FT_Long height; + FT_UInt horiResolution; + FT_UInt vertResolution; + + } FT_Size_RequestRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Request */ + /* */ + /* <Description> */ + /* A handle to a size request structure. */ + /* */ + typedef struct FT_Size_RequestRec_ *FT_Size_Request; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Request_Size */ + /* */ + /* <Description> */ + /* Resize the scale of the active @FT_Size object in a face. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* req :: A pointer to a @FT_Size_RequestRec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Although drivers may select the bitmap strike matching the */ + /* request, you should not rely on this if you intend to select a */ + /* particular bitmap strike. Use @FT_Select_Size instead in that */ + /* case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Request_Size( FT_Face face, + FT_Size_Request req ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Char_Size */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in points). */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* char_width :: The nominal width, in 26.6 fractional points. */ + /* */ + /* char_height :: The nominal height, in 26.6 fractional points. */ + /* */ + /* horz_resolution :: The horizontal resolution in dpi. */ + /* */ + /* vert_resolution :: The vertical resolution in dpi. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If either the character width or height is zero, it is set equal */ + /* to the other value. */ + /* */ + /* If either the horizontal or vertical resolution is zero, it is set */ + /* equal to the other value. */ + /* */ + /* A character width or height smaller than 1pt is set to 1pt; if */ + /* both resolution values are zero, they are set to 72dpi. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Char_Size( FT_Face face, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Pixel_Sizes */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in pixels). */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Input> */ + /* pixel_width :: The nominal width, in pixels. */ + /* */ + /* pixel_height :: The nominal height, in pixels. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Pixel_Sizes( FT_Face face, + FT_UInt pixel_width, + FT_UInt pixel_height ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Glyph */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object. */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* glyph_index :: The index of the glyph in the font file. For */ + /* CID-keyed fonts (either in PS or in CFF format) */ + /* this argument specifies the CID value. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The loaded glyph may be transformed. See @FT_Set_Transform for */ + /* the details. */ + /* */ + /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ + /* returned for invalid CID values (this is, for CID values which */ + /* don't have a corresponding glyph in the font). See the discussion */ + /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Glyph( FT_Face face, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Char */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object, according to its character code. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* char_code :: The glyph's character code, according to the */ + /* current charmap used in the face. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Char( FT_Face face, + FT_ULong char_code, + FT_Int32 load_flags ); + + + /************************************************************************* + * + * @enum: + * FT_LOAD_XXX + * + * @description: + * A list of bit-field constants used with @FT_Load_Glyph to indicate + * what kind of operations to perform during glyph loading. + * + * @values: + * FT_LOAD_DEFAULT :: + * Corresponding to~0, this value is used as the default glyph load + * operation. In this case, the following happens: + * + * 1. FreeType looks for a bitmap for the glyph corresponding to the + * face's current size. If one is found, the function returns. + * The bitmap data can be accessed from the glyph slot (see note + * below). + * + * 2. If no embedded bitmap is searched or found, FreeType looks for a + * scalable outline. If one is found, it is loaded from the font + * file, scaled to device pixels, then `hinted' to the pixel grid + * in order to optimize it. The outline data can be accessed from + * the glyph slot (see note below). + * + * Note that by default, the glyph loader doesn't render outlines into + * bitmaps. The following flags are used to modify this default + * behaviour to more specific and useful cases. + * + * FT_LOAD_NO_SCALE :: + * Don't scale the outline glyph loaded, but keep it in font units. + * + * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and + * unsets @FT_LOAD_RENDER. + * + * FT_LOAD_NO_HINTING :: + * Disable hinting. This generally generates `blurrier' bitmap glyph + * when the glyph is rendered in any of the anti-aliased modes. See + * also the note below. + * + * This flag is implied by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_RENDER :: + * Call @FT_Render_Glyph after the glyph is loaded. By default, the + * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be + * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. + * + * This flag is unset by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_NO_BITMAP :: + * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this + * flag. + * + * @FT_LOAD_NO_SCALE always sets this flag. + * + * FT_LOAD_VERTICAL_LAYOUT :: + * Load the glyph for vertical text layout. _Don't_ use it as it is + * problematic currently. + * + * FT_LOAD_FORCE_AUTOHINT :: + * Indicates that the auto-hinter is preferred over the font's native + * hinter. See also the note below. + * + * FT_LOAD_CROP_BITMAP :: + * Indicates that the font driver should crop the loaded bitmap glyph + * (i.e., remove all space around its black bits). Not all drivers + * implement this. + * + * FT_LOAD_PEDANTIC :: + * Indicates that the font driver should perform pedantic verifications + * during glyph loading. This is mostly used to detect broken glyphs + * in fonts. By default, FreeType tries to handle broken fonts also. + * + * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: + * Indicates that the font driver should ignore the global advance + * width defined in the font. By default, that value is used as the + * advance width for all glyphs when the face has + * @FT_FACE_FLAG_FIXED_WIDTH set. + * + * This flag exists for historical reasons (to support buggy CJK + * fonts). + * + * FT_LOAD_NO_RECURSE :: + * This flag is only used internally. It merely indicates that the + * font driver should not load composite glyphs recursively. Instead, + * it should set the `num_subglyph' and `subglyphs' values of the + * glyph slot accordingly, and set `glyph->format' to + * @FT_GLYPH_FORMAT_COMPOSITE. + * + * The description of sub-glyphs is not available to client + * applications for now. + * + * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. + * + * FT_LOAD_IGNORE_TRANSFORM :: + * Indicates that the transform matrix set by @FT_Set_Transform should + * be ignored. + * + * FT_LOAD_MONOCHROME :: + * This flag is used with @FT_LOAD_RENDER to indicate that you want to + * render an outline glyph to a 1-bit monochrome bitmap glyph, with + * 8~pixels packed into each byte of the bitmap data. + * + * Note that this has no effect on the hinting algorithm used. You + * should rather use @FT_LOAD_TARGET_MONO so that the + * monochrome-optimized hinting algorithm is used. + * + * FT_LOAD_LINEAR_DESIGN :: + * Indicates that the `linearHoriAdvance' and `linearVertAdvance' + * fields of @FT_GlyphSlotRec should be kept in font units. See + * @FT_GlyphSlotRec for details. + * + * FT_LOAD_NO_AUTOHINT :: + * Disable auto-hinter. See also the note below. + * + * @note: + * By default, hinting is enabled and the font's native hinter (see + * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can + * disable hinting by setting @FT_LOAD_NO_HINTING or change the + * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set + * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be + * used at all. + * + * See the description of @FT_FACE_FLAG_TRICKY for a special exception + * (affecting only a handful of Asian fonts). + * + * Besides deciding which hinter to use, you can also decide which + * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. + * + */ +#define FT_LOAD_DEFAULT 0x0 +#define FT_LOAD_NO_SCALE 0x1 +#define FT_LOAD_NO_HINTING 0x2 +#define FT_LOAD_RENDER 0x4 +#define FT_LOAD_NO_BITMAP 0x8 +#define FT_LOAD_VERTICAL_LAYOUT 0x10 +#define FT_LOAD_FORCE_AUTOHINT 0x20 +#define FT_LOAD_CROP_BITMAP 0x40 +#define FT_LOAD_PEDANTIC 0x80 +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200 +#define FT_LOAD_NO_RECURSE 0x400 +#define FT_LOAD_IGNORE_TRANSFORM 0x800 +#define FT_LOAD_MONOCHROME 0x1000 +#define FT_LOAD_LINEAR_DESIGN 0x2000 +#define FT_LOAD_NO_AUTOHINT 0x8000U + + /* */ + + /* used internally only by certain font drivers! */ +#define FT_LOAD_ADVANCE_ONLY 0x100 +#define FT_LOAD_SBITS_ONLY 0x4000 + + + /************************************************************************** + * + * @enum: + * FT_LOAD_TARGET_XXX + * + * @description: + * A list of values that are used to select a specific hinting algorithm + * to use by the hinter. You should OR one of these values to your + * `load_flags' when calling @FT_Load_Glyph. + * + * Note that font's native hinters may ignore the hinting algorithm you + * have specified (e.g., the TrueType bytecode interpreter). You can set + * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. + * + * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it + * always implies @FT_LOAD_FORCE_AUTOHINT. + * + * @values: + * FT_LOAD_TARGET_NORMAL :: + * This corresponds to the default hinting algorithm, optimized for + * standard gray-level rendering. For monochrome output, use + * @FT_LOAD_TARGET_MONO instead. + * + * FT_LOAD_TARGET_LIGHT :: + * A lighter hinting algorithm for non-monochrome modes. Many + * generated glyphs are more fuzzy but better resemble its original + * shape. A bit like rendering on Mac OS~X. + * + * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT. + * + * FT_LOAD_TARGET_MONO :: + * Strong hinting algorithm that should only be used for monochrome + * output. The result is probably unpleasant if the glyph is rendered + * in non-monochrome modes. + * + * FT_LOAD_TARGET_LCD :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally + * decimated LCD displays. + * + * FT_LOAD_TARGET_LCD_V :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically + * decimated LCD displays. + * + * @note: + * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your + * `load_flags'. They can't be ORed. + * + * If @FT_LOAD_RENDER is also set, the glyph is rendered in the + * corresponding mode (i.e., the mode which matches the used algorithm + * best) unless @FT_LOAD_MONOCHROME is set. + * + * You can use a hinting algorithm that doesn't correspond to the same + * rendering mode. As an example, it is possible to use the `light' + * hinting algorithm and have the results rendered in horizontal LCD + * pixel mode, with code like + * + * { + * FT_Load_Glyph( face, glyph_index, + * load_flags | FT_LOAD_TARGET_LIGHT ); + * + * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); + * } + * + */ +#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) + +#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) +#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) +#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) +#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) +#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) + + + /************************************************************************** + * + * @macro: + * FT_LOAD_TARGET_MODE + * + * @description: + * Return the @FT_Render_Mode corresponding to a given + * @FT_LOAD_TARGET_XXX value. + * + */ +#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Transform */ + /* */ + /* <Description> */ + /* A function used to set the transformation that is applied to glyph */ + /* images when they are loaded into a glyph slot through */ + /* @FT_Load_Glyph. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ + /* the identity matrix. */ + /* delta :: A pointer to the translation vector. Use~0 for the null */ + /* vector. */ + /* */ + /* <Note> */ + /* The transformation is only applied to scalable image formats after */ + /* the glyph has been loaded. It means that hinting is unaltered by */ + /* the transformation and is performed on the character size given in */ + /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ + /* */ + /* Note that this also transforms the `face.glyph.advance' field, but */ + /* *not* the values in `face.glyph.metrics'. */ + /* */ + FT_EXPORT( void ) + FT_Set_Transform( FT_Face face, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Render_Mode */ + /* */ + /* <Description> */ + /* An enumeration type that lists the render modes supported by */ + /* FreeType~2. Each mode corresponds to a specific type of scanline */ + /* conversion performed on the outline. */ + /* */ + /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ + /* field in the @FT_GlyphSlotRec structure gives the format of the */ + /* returned bitmap. */ + /* */ + /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */ + /* */ + /* <Values> */ + /* FT_RENDER_MODE_NORMAL :: */ + /* This is the default render mode; it corresponds to 8-bit */ + /* anti-aliased bitmaps. */ + /* */ + /* FT_RENDER_MODE_LIGHT :: */ + /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ + /* defined as a separate value because render modes are also used */ + /* indirectly to define hinting algorithm selectors. See */ + /* @FT_LOAD_TARGET_XXX for details. */ + /* */ + /* FT_RENDER_MODE_MONO :: */ + /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ + /* opacity). */ + /* */ + /* FT_RENDER_MODE_LCD :: */ + /* This mode corresponds to horizontal RGB and BGR sub-pixel */ + /* displays like LCD screens. It produces 8-bit bitmaps that are */ + /* 3~times the width of the original glyph outline in pixels, and */ + /* which use the @FT_PIXEL_MODE_LCD mode. */ + /* */ + /* FT_RENDER_MODE_LCD_V :: */ + /* This mode corresponds to vertical RGB and BGR sub-pixel displays */ + /* (like PDA screens, rotated LCD displays, etc.). It produces */ + /* 8-bit bitmaps that are 3~times the height of the original */ + /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ + /* */ + /* <Note> */ + /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ + /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ + /* (not active in the default builds). It is up to the caller to */ + /* either call @FT_Library_SetLcdFilter (if available) or do the */ + /* filtering itself. */ + /* */ + /* The selected render mode only affects vector glyphs of a font. */ + /* Embedded bitmaps often have a different pixel mode like */ + /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ + /* them into 8-bit pixmaps. */ + /* */ + typedef enum FT_Render_Mode_ + { + FT_RENDER_MODE_NORMAL = 0, + FT_RENDER_MODE_LIGHT, + FT_RENDER_MODE_MONO, + FT_RENDER_MODE_LCD, + FT_RENDER_MODE_LCD_V, + + FT_RENDER_MODE_MAX + + } FT_Render_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_render_mode_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated. Use the corresponding */ + /* @FT_Render_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */ + /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */ + /* */ +#define ft_render_mode_normal FT_RENDER_MODE_NORMAL +#define ft_render_mode_mono FT_RENDER_MODE_MONO + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Render_Glyph */ + /* */ + /* <Description> */ + /* Convert a given glyph image to a bitmap. It does so by inspecting */ + /* the glyph image format, finding the relevant renderer, and */ + /* invoking it. */ + /* */ + /* <InOut> */ + /* slot :: A handle to the glyph slot containing the image to */ + /* convert. */ + /* */ + /* <Input> */ + /* render_mode :: This is the render mode used to render the glyph */ + /* image into a bitmap. See @FT_Render_Mode for a */ + /* list of possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Render_Glyph( FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Kerning_Mode */ + /* */ + /* <Description> */ + /* An enumeration used to specify which kerning values to return in */ + /* @FT_Get_Kerning. */ + /* */ + /* <Values> */ + /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */ + /* distances (value is~0). */ + /* */ + /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */ + /* distances. */ + /* */ + /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ + /* units. */ + /* */ + typedef enum FT_Kerning_Mode_ + { + FT_KERNING_DEFAULT = 0, + FT_KERNING_UNFITTED, + FT_KERNING_UNSCALED + + } FT_Kerning_Mode; + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_default */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */ + /* instead. */ + /* */ +#define ft_kerning_default FT_KERNING_DEFAULT + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_unfitted */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */ + /* instead. */ + /* */ +#define ft_kerning_unfitted FT_KERNING_UNFITTED + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_unscaled */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */ + /* instead. */ + /* */ +#define ft_kerning_unscaled FT_KERNING_UNSCALED + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Kerning */ + /* */ + /* <Description> */ + /* Return the kerning vector between two glyphs of a same face. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* left_glyph :: The index of the left glyph in the kern pair. */ + /* */ + /* right_glyph :: The index of the right glyph in the kern pair. */ + /* */ + /* kern_mode :: See @FT_Kerning_Mode for more information. */ + /* Determines the scale and dimension of the returned */ + /* kerning vector. */ + /* */ + /* <Output> */ + /* akerning :: The kerning vector. This is either in font units */ + /* or in pixels (26.6 format) for scalable formats, */ + /* and in pixels for fixed-sizes formats. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Only horizontal layouts (left-to-right & right-to-left) are */ + /* supported by this method. Other layouts, or more sophisticated */ + /* kernings, are out of the scope of this API function -- they can be */ + /* implemented through format-specific interfaces. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Kerning( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_UInt kern_mode, + FT_Vector *akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Track_Kerning */ + /* */ + /* <Description> */ + /* Return the track kerning for a given face object at a given size. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* point_size :: The point size in 16.16 fractional points. */ + /* */ + /* degree :: The degree of tightness. */ + /* */ + /* <Output> */ + /* akerning :: The kerning in 16.16 fractional points. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Track_Kerning( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII name of a given glyph in a face. This only */ + /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* buffer_max :: The maximal number of bytes available in the */ + /* buffer. */ + /* */ + /* <Output> */ + /* buffer :: A pointer to a target buffer where the name is */ + /* copied to. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error is returned if the face doesn't provide glyph names or if */ + /* the glyph index is invalid. In all cases of failure, the first */ + /* byte of `buffer' is set to~0 to indicate an empty name. */ + /* */ + /* The glyph name is truncated to fit within the buffer if it is too */ + /* long. The returned string is always zero-terminated. */ + /* */ + /* This function is not compiled within the library if the config */ + /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */ + /* `include/freetype/config/ftoptions.h'. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph_Name( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Postscript_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII PostScript name of a given face, if available. */ + /* This only works with PostScript and TrueType fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to the face's PostScript name. NULL if unavailable. */ + /* */ + /* <Note> */ + /* The returned pointer is owned by the face and is destroyed with */ + /* it. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_Postscript_Name( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap by its encoding tag (as listed in */ + /* `freetype.h'). */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* encoding :: A handle to the selected encoding. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if no charmap in the face */ + /* corresponds to the encoding queried here. */ + /* */ + /* Because many fonts contain more than a single cmap for Unicode */ + /* encoding, this function has some special code to select the one */ + /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */ + /* is preferred to a UCS-2 cmap). It is thus preferable to */ + /* @FT_Set_Charmap in this case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Charmap( FT_Face face, + FT_Encoding encoding ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap for character code to glyph index mapping. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* charmap :: A handle to the selected charmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if the charmap is not part of */ + /* the face (i.e., if it is not listed in the `face->charmaps' */ + /* table). */ + /* */ + /* It also fails if a type~14 charmap is selected. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Charmap( FT_Face face, + FT_CharMap charmap ); + + + /************************************************************************* + * + * @function: + * FT_Get_Charmap_Index + * + * @description: + * Retrieve index of a given charmap. + * + * @input: + * charmap :: + * A handle to a charmap. + * + * @return: + * The index into the array of character maps within the face to which + * `charmap' belongs. If an error occurs, -1 is returned. + * + */ + FT_EXPORT( FT_Int ) + FT_Get_Charmap_Index( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Char_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code. This function */ + /* uses a charmap object to do the mapping. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* charcode :: The character code. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Char_Index( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_First_Char */ + /* */ + /* <Description> */ + /* This function is used to return the first character code in the */ + /* current charmap of a given face. It also returns the */ + /* corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of first character code. 0~if charmap is */ + /* empty. */ + /* */ + /* <Return> */ + /* The charmap's first character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_Next_Char to be able to */ + /* parse all character codes available in a given charmap. The code */ + /* should look like this: */ + /* */ + /* { */ + /* FT_ULong charcode; */ + /* FT_UInt gindex; */ + /* */ + /* */ + /* charcode = FT_Get_First_Char( face, &gindex ); */ + /* while ( gindex != 0 ) */ + /* { */ + /* ... do something with (charcode,gindex) pair ... */ + /* */ + /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ + /* } */ + /* } */ + /* */ + /* Note that `*agindex' is set to~0 if the charmap is empty. The */ + /* result itself can be~0 in two cases: if the charmap is empty or */ + /* if the value~0 is the first valid character code. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_First_Char( FT_Face face, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Next_Char */ + /* */ + /* <Description> */ + /* This function is used to return the next character code in the */ + /* current charmap of a given face following the value `char_code', */ + /* as well as the corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* char_code :: The starting character code. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of next character code. 0~if charmap */ + /* is empty. */ + /* */ + /* <Return> */ + /* The charmap's next character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_First_Char to walk */ + /* over all character codes available in a given charmap. See the */ + /* note for this function for a simple code example. */ + /* */ + /* Note that `*agindex' is set to~0 when there are no more codes in */ + /* the charmap. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_Next_Char( FT_Face face, + FT_ULong char_code, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Name_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given glyph name. This function uses */ + /* driver specific objects to do the translation. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* glyph_name :: The glyph name. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Name_Index( FT_Face face, + FT_String* glyph_name ); + + + /************************************************************************* + * + * @macro: + * FT_SUBGLYPH_FLAG_XXX + * + * @description: + * A list of constants used to describe subglyphs. Please refer to the + * TrueType specification for the meaning of the various flags. + * + * @values: + * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: + * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: + * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: + * FT_SUBGLYPH_FLAG_SCALE :: + * FT_SUBGLYPH_FLAG_XY_SCALE :: + * FT_SUBGLYPH_FLAG_2X2 :: + * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: + * + */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 + + + /************************************************************************* + * + * @func: + * FT_Get_SubGlyph_Info + * + * @description: + * Retrieve a description of a given subglyph. Only use it if + * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is + * returned otherwise. + * + * @input: + * glyph :: + * The source glyph slot. + * + * sub_index :: + * The index of the subglyph. Must be less than + * `glyph->num_subglyphs'. + * + * @output: + * p_index :: + * The glyph index of the subglyph. + * + * p_flags :: + * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. + * + * p_arg1 :: + * The subglyph's first argument (if any). + * + * p_arg2 :: + * The subglyph's second argument (if any). + * + * p_transform :: + * The subglyph transformation (if any). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be + * interpreted depending on the flags returned in `*p_flags'. See the + * TrueType specification for details. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, + FT_UInt sub_index, + FT_Int *p_index, + FT_UInt *p_flags, + FT_Int *p_arg1, + FT_Int *p_arg2, + FT_Matrix *p_transform ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FSTYPE_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `fsType' field of the OS/2 table */ + /* in a TrueType or OpenType font and the `FSType' entry in a */ + /* PostScript font. These bit flags are returned by */ + /* @FT_Get_FSType_Flags; they inform client applications of embedding */ + /* and subsetting restrictions associated with a font. */ + /* */ + /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ + /* more details. */ + /* */ + /* <Values> */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ + /* Fonts with no fsType bit set may be embedded and permanently */ + /* installed on the remote system by an application. */ + /* */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ + /* Fonts that have only this bit set must not be modified, embedded */ + /* or exchanged in any manner without first obtaining permission of */ + /* the font software copyright owner. */ + /* */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ + /* If this bit is set, the font may be embedded and temporarily */ + /* loaded on the remote system. Documents containing Preview & */ + /* Print fonts must be opened `read-only'; no edits can be applied */ + /* to the document. */ + /* */ + /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ + /* If this bit is set, the font may be embedded but must only be */ + /* installed temporarily on other systems. In contrast to Preview */ + /* & Print fonts, documents containing editable fonts may be opened */ + /* for reading, editing is permitted, and changes may be saved. */ + /* */ + /* FT_FSTYPE_NO_SUBSETTING :: */ + /* If this bit is set, the font may not be subsetted prior to */ + /* embedding. */ + /* */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ + /* If this bit is set, only bitmaps contained in the font may be */ + /* embedded; no outline data may be embedded. If there are no */ + /* bitmaps available in the font, then the font is unembeddable. */ + /* */ + /* <Note> */ + /* While the fsType flags can indicate that a font may be embedded, a */ + /* license with the font vendor may be separately required to use the */ + /* font in this way. */ + /* */ +#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 +#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 +#define FT_FSTYPE_NO_SUBSETTING 0x0100 +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_FSType_Flags */ + /* */ + /* <Description> */ + /* Return the fsType flags for a font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* The fsType flags, @FT_FSTYPE_XXX. */ + /* */ + /* <Note> */ + /* Use this function rather than directly reading the `fs_type' field */ + /* in the @PS_FontInfoRec structure which is only guaranteed to */ + /* return the correct results for Type~1 fonts. */ + /* */ + FT_EXPORT( FT_UShort ) + FT_Get_FSType_Flags( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_variants */ + /* */ + /* <Title> */ + /* Glyph Variants */ + /* */ + /* <Abstract> */ + /* The FreeType~2 interface to Unicode Ideographic Variation */ + /* Sequences (IVS), using the SFNT cmap format~14. */ + /* */ + /* <Description> */ + /* Many CJK characters have variant forms. They are a sort of grey */ + /* area somewhere between being totally irrelevant and semantically */ + /* distinct; for this reason, the Unicode consortium decided to */ + /* introduce Ideographic Variation Sequences (IVS), consisting of a */ + /* Unicode base character and one of 240 variant selectors */ + /* (U+E0100-U+E01EF), instead of further extending the already huge */ + /* code range for CJK characters. */ + /* */ + /* An IVS is registered and unique; for further details please refer */ + /* to Unicode Technical Report #37, the Ideographic Variation */ + /* Database. To date (October 2007), the character with the most */ + /* variants is U+908A, having 8~such IVS. */ + /* */ + /* Adobe and MS decided to support IVS with a new cmap subtable */ + /* (format~14). It is an odd subtable because it is not a mapping of */ + /* input code points to glyphs, but contains lists of all variants */ + /* supported by the font. */ + /* */ + /* A variant may be either `default' or `non-default'. A default */ + /* variant is the one you will get for that code point if you look it */ + /* up in the standard Unicode cmap. A non-default variant is a */ + /* different glyph. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIndex */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code as modified by */ + /* the variation selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character code point in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode code point of the variation selector. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means either `undefined character code', or */ + /* `undefined selector code', or `no variation selector cmap */ + /* subtable', or `current CharMap is not Unicode'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + /* This function is only meaningful if */ + /* a) the font has a variation selector cmap sub table, */ + /* and */ + /* b) the current charmap has a Unicode encoding. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Face_GetCharVariantIndex( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIsDefault */ + /* */ + /* <Description> */ + /* Check whether this variant of this Unicode character is the one to */ + /* be found in the `cmap'. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode codepoint of the variation selector. */ + /* */ + /* <Return> */ + /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ + /* variation selector cmap, or -1 if it is not a variant. */ + /* */ + /* <Note> */ + /* This function is only meaningful if the font has a variation */ + /* selector cmap subtable. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_Int ) + FT_Face_GetCharVariantIsDefault( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantSelectors */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* in the font. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to an array of selector code points, or NULL if there is */ + /* no valid variant selector cmap subtable. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantSelectors( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantsOfChar */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* for the specified character code. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* <Return> */ + /* A pointer to an array of variant selector code points which are */ + /* active for the given character, or NULL if the corresponding list */ + /* is empty. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantsOfChar( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharsOfVariant */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode character codes found for */ + /* the specified variant selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* variantSelector :: */ + /* The variant selector code point in Unicode. */ + /* */ + /* <Return> */ + /* A list of all the code points which are specified by this selector */ + /* (both default and non-default codes are returned) or NULL if there */ + /* is no valid cmap or the variant selector is invalid. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetCharsOfVariant( FT_Face face, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /* <Title> */ + /* Computations */ + /* */ + /* <Abstract> */ + /* Crunching fixed numbers and vectors. */ + /* */ + /* <Description> */ + /* This section contains various functions used to perform */ + /* computations on 16.16 fixed-float numbers or 2d vectors. */ + /* */ + /* <Order> */ + /* FT_MulDiv */ + /* FT_MulFix */ + /* FT_DivFix */ + /* FT_RoundFix */ + /* FT_CeilFix */ + /* FT_FloorFix */ + /* FT_Vector_Transform */ + /* FT_Matrix_Multiply */ + /* FT_Matrix_Invert */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation `(a*b)/c' */ + /* with maximal accuracy (it uses a 64-bit intermediate integer */ + /* whenever necessary). */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulDiv( FT_Long a, + FT_Long b, + FT_Long c ); + + + /* */ + + /* The following #if 0 ... #endif is for the documentation formatter, */ + /* hiding the internal `FT_MULFIX_INLINED' macro. */ + +#if 0 + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */ + /* used to multiply a given value by a 16.16 fixed float factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*b)/0x10000'. */ + /* */ + /* <Note> */ + /* This function has been optimized for the case where the absolute */ + /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ + /* As this happens mainly when scaling from notional units to */ + /* fractional pixels in FreeType, it resulted in noticeable speed */ + /* improvements between versions 2.x and 1.x. */ + /* */ + /* As a conclusion, always try to place a 16.16 factor as the */ + /* _second_ argument of this function; this can make a great */ + /* difference. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); + + /* */ +#endif + +#ifdef FT_MULFIX_INLINED +#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) +#else + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); +#endif + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_DivFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */ + /* used to divide a given value by a 16.16 fixed float factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*0x10000)/b'. */ + /* */ + /* <Note> */ + /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */ + /* 32~bits, then the division is computed directly. Otherwise, we */ + /* use a specialized version of @FT_MulDiv. */ + /* */ + FT_EXPORT( FT_Long ) + FT_DivFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_RoundFix */ + /* */ + /* <Description> */ + /* A very simple function used to round a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number to be rounded. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x8000) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_RoundFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_CeilFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the ceiling function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the ceiling function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x10000 - 1) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_CeilFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FloorFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the floor function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the floor function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `a & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_FloorFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Vector_Transform */ + /* */ + /* <Description> */ + /* Transform a single vector through a 2x2 matrix. */ + /* */ + /* <InOut> */ + /* vector :: The target vector to transform. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the source 2x2 matrix. */ + /* */ + /* <Note> */ + /* The result is undefined if either `vector' or `matrix' is invalid. */ + /* */ + FT_EXPORT( void ) + FT_Vector_Transform( FT_Vector* vec, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* version */ + /* */ + /* <Title> */ + /* FreeType Version */ + /* */ + /* <Abstract> */ + /* Functions and macros related to FreeType versions. */ + /* */ + /* <Description> */ + /* Note that those functions and macros are of limited use because */ + /* even a new release of FreeType with only documentation changes */ + /* increases the version number. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FREETYPE_XXX + * + * @description: + * These three macros identify the FreeType source code version. + * Use @FT_Library_Version to access them at runtime. + * + * @values: + * FREETYPE_MAJOR :: The major version number. + * FREETYPE_MINOR :: The minor version number. + * FREETYPE_PATCH :: The patch level. + * + * @note: + * The version number of FreeType if built as a dynamic link library + * with the `libtool' package is _not_ controlled by these three + * macros. + * + */ +#define FREETYPE_MAJOR 2 +#define FREETYPE_MINOR 4 +#define FREETYPE_PATCH 4 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Library_Version */ + /* */ + /* <Description> */ + /* Return the version of the FreeType library being used. This is */ + /* useful when dynamically linking to the library, since one cannot */ + /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ + /* @FREETYPE_PATCH. */ + /* */ + /* <Input> */ + /* library :: A source library handle. */ + /* */ + /* <Output> */ + /* amajor :: The major version number. */ + /* */ + /* aminor :: The minor version number. */ + /* */ + /* apatch :: The patch version number. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' argument is because */ + /* certain programs implement library initialization in a custom way */ + /* that doesn't use @FT_Init_FreeType. */ + /* */ + /* In such cases, the library version might not be available before */ + /* the library object has been created. */ + /* */ + FT_EXPORT( void ) + FT_Library_Version( FT_Library library, + FT_Int *amajor, + FT_Int *aminor, + FT_Int *apatch ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_CheckTrueTypePatents */ + /* */ + /* <Description> */ + /* Parse all bytecode instructions of a TrueType font file to check */ + /* whether any of the patented opcodes are used. This is only useful */ + /* if you want to be able to use the unpatented hinter with */ + /* fonts that do *not* use these opcodes. */ + /* */ + /* Note that this function parses *all* glyph instructions in the */ + /* font file, which may be slow. */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* <Return> */ + /* 1~if this is a TrueType font that uses one of the patented */ + /* opcodes, 0~otherwise. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_CheckTrueTypePatents( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* <Description> */ + /* Enable or disable the unpatented hinter for a given face. */ + /* Only enable it if you have determined that the face doesn't */ + /* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* value :: New boolean setting. */ + /* */ + /* <Return> */ + /* The old setting value. This will always be false if this is not */ + /* an SFNT font, or if the unpatented hinter is not compiled in this */ + /* instance of the library. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_SetUnpatentedHinting( FT_Face face, + FT_Bool value ); + + /* */ + + +FT_END_HEADER + +#endif /* __FREETYPE_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ft2build.h b/contrib/media/updf/include/freetype/ft2build.h new file mode 100644 index 0000000000..211b54db44 --- /dev/null +++ b/contrib/media/updf/include/freetype/ft2build.h @@ -0,0 +1,39 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* (Generic version) */ +/* */ +/* Copyright 1996-2001, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file corresponds to the default `ft2build.h' file for */ + /* FreeType 2. It uses the `freetype' include root. */ + /* */ + /* Note that specific platforms might use a different configuration. */ + /* See builds/unix/ft2unix.h for an example. */ + /* */ + /*************************************************************************/ + + +#ifndef __FT2_BUILD_GENERIC_H__ +#define __FT2_BUILD_GENERIC_H__ + +#include "ftheader.h" + +#endif /* __FT2_BUILD_GENERIC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ft_conf.h b/contrib/media/updf/include/freetype/ft_conf.h new file mode 100755 index 0000000000..a663816605 --- /dev/null +++ b/contrib/media/updf/include/freetype/ft_conf.h @@ -0,0 +1,130 @@ +/* This file is part of the FreeType project */ + +/* ft_conf.h for MSDOS */ + + +/* we need the following because there are some typedefs in this file */ + +#ifndef FT_CONF_H +#define FT_CONF_H + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE + +/* Define if you have the valloc function. */ +#undef HAVE_VALLOC + +/* Define if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H + +/* Define if you have the <unistd.h> header file. */ +#if defined( __EMX__ ) || defined( __DJGPP__ ) || defined( __GO32__ ) +/* some compilers are known to have <unistd.h>; */ +/* add yours if needed, and report to us the update. */ +#define HAVE_UNISTD_H +#else +/* most MS-DOS compilers lack <unistd.h> */ +#undef HAVE_UNISTD_H +#endif + +/* Define if you need <conio.h> for console I/O functions. */ +#ifdef __EMX__ +#define HAVE_CONIO_H +#endif + +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the <libintl.h> header file. */ +#undef HAVE_LIBINTL_H + +/* Define if you have the libintl library. */ +#undef HAVE_LIBINTL + +#define HAVE_PRINT_FUNCTION 1 + +#define Print( format, ap ) + +#include <limits.h> +#if UINT_MAX == 0xFFFF +#define SIZEOF_INT 2 +#elif UINT_MAX == 0xFFFFFFFF +#define SIZEOF_INT 4 +#else +#error "Unsupported number of bytes in `int' type!" +#endif + +#define SIZEOF_LONG 4 + + +#define TT_CONFIG_OPTION_EXTEND_ENGINE + +#define TT_CONFIG_OPTION_GRAY_SCALING + +#undef TT_CONFIG_OPTION_NO_INTERPRETER + +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + +#undef TT_CONFIG_OPTION_STATIC_INTERPRETER + +#undef TT_CONFIG_OPTION_STATIC_RASTER + +#undef TT_CONFIG_OPTION_THREAD_SAFE + +#undef DEBUG_LEVEL_TRACE +#undef DEBUG_LEVEL_ERROR + + +#if SIZEOF_INT == 4 + + typedef signed int TT_Int32; + typedef unsigned int TT_Word32; + +#elif SIZEOF_LONG == 4 + + typedef signed long TT_Int32; + typedef unsigned long TT_Word32; + +#else +#error "no 32bit type found" +#endif + +#if SIZEOF_LONG == 8 + +/* LONG64 must be defined when a 64-bit type is available */ +/* INT64 must then be defined to this type.. */ +#define LONG64 +#define INT64 long + +#else + +/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ +/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ +/* will produce many -ansi warnings during library compilation. */ +#ifdef TT_USE_LONG_LONG + +#define LONG64 +#define INT64 long long + +#endif /* TT_USE_LONG_LONG */ +#endif + +#endif /* FT_CONF_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftadvanc.h b/contrib/media/updf/include/freetype/ftadvanc.h new file mode 100644 index 0000000000..b2451bec42 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftadvanc.h @@ -0,0 +1,179 @@ +/***************************************************************************/ +/* */ +/* ftadvanc.h */ +/* */ +/* Quick computation of advance widths (specification only). */ +/* */ +/* Copyright 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTADVANC_H__ +#define __FTADVANC_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * quick_advance + * + * @title: + * Quick retrieval of advance values + * + * @abstract: + * Retrieve horizontal and vertical advance values without processing + * glyph outlines, if possible. + * + * @description: + * This section contains functions to quickly extract advance values + * without handling glyph outlines, if possible. + */ + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_ADVANCE_FLAG_FAST_ONLY */ + /* */ + /* <Description> */ + /* A bit-flag to be OR-ed with the `flags' parameter of the */ + /* @FT_Get_Advance and @FT_Get_Advances functions. */ + /* */ + /* If set, it indicates that you want these functions to fail if the */ + /* corresponding hinting mode or font driver doesn't allow for very */ + /* quick advance computation. */ + /* */ + /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */ + /* or light-hinted can have their advance width computed very */ + /* quickly. */ + /* */ + /* Normal and bytecode hinted modes, which require loading, scaling, */ + /* and hinting of the glyph outline, are extremely slow by */ + /* comparison. */ + /* */ +#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advance */ + /* */ + /* <Description> */ + /* Retrieve the advance value of a given glyph outline in an */ + /* @FT_Face. By default, the unhinted advance is returned in font */ + /* units. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph, used to determine what kind */ + /* of advances you need. */ + /* <Output> */ + /* padvance :: The advance value, in either font units or 16.16 */ + /* format. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ + /* vertical advance corresponding to a vertical layout. */ + /* Otherwise, it is the horizontal advance in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* A scaled advance is returned in 16.16 format but isn't transformed */ + /* by the affine transformation specified by @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advance( FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags, + FT_Fixed *padvance ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advances */ + /* */ + /* <Description> */ + /* Retrieve the advance values of several glyph outlines in an */ + /* @FT_Face. By default, the unhinted advances are returned in font */ + /* units. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* start :: The first glyph index. */ + /* */ + /* count :: The number of advance values you want to retrieve. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph. */ + /* */ + /* <Output> */ + /* padvance :: The advances, in either font units or 16.16 format. */ + /* This array must contain at least `count' elements. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ + /* vertical advances corresponding to a vertical layout. */ + /* Otherwise, they are the horizontal advances in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* Scaled advances are returned in 16.16 format but aren't */ + /* transformed by the affine transformation specified by */ + /* @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advances( FT_Face face, + FT_UInt start, + FT_UInt count, + FT_Int32 load_flags, + FT_Fixed *padvances ); + +/* */ + + +FT_END_HEADER + +#endif /* __FTADVANC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftbbox.h b/contrib/media/updf/include/freetype/ftbbox.h new file mode 100644 index 0000000000..01fe3fb0d1 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftbbox.h @@ -0,0 +1,94 @@ +/***************************************************************************/ +/* */ +/* ftbbox.h */ +/* */ +/* FreeType exact bbox computation (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This component has a _single_ role: to compute exact outline bounding */ + /* boxes. */ + /* */ + /* It is separated from the rest of the engine for various technical */ + /* reasons. It may well be integrated in `ftoutln' later. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTBBOX_H__ +#define __FTBBOX_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_BBox */ + /* */ + /* <Description> */ + /* Compute the exact bounding box of an outline. This is slower */ + /* than computing the control box. However, it uses an advanced */ + /* algorithm which returns _very_ quickly when the two boxes */ + /* coincide. Otherwise, the outline Bézier arcs are traversed to */ + /* extract their extrema. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline. */ + /* */ + /* <Output> */ + /* abbox :: The outline's exact bounding box. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_BBox( FT_Outline* outline, + FT_BBox *abbox ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTBBOX_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftbdf.h b/contrib/media/updf/include/freetype/ftbdf.h new file mode 100644 index 0000000000..4f8baf8401 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftbdf.h @@ -0,0 +1,209 @@ +/***************************************************************************/ +/* */ +/* ftbdf.h */ +/* */ +/* FreeType API for accessing BDF-specific strings (specification). */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBDF_H__ +#define __FTBDF_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bdf_fonts */ + /* */ + /* <Title> */ + /* BDF and PCF Files */ + /* */ + /* <Abstract> */ + /* BDF and PCF specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions specific to BDF */ + /* and PCF fonts. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_PropertyType + * + * @description: + * A list of BDF property types. + * + * @values: + * BDF_PROPERTY_TYPE_NONE :: + * Value~0 is used to indicate a missing property. + * + * BDF_PROPERTY_TYPE_ATOM :: + * Property is a string atom. + * + * BDF_PROPERTY_TYPE_INTEGER :: + * Property is a 32-bit signed integer. + * + * BDF_PROPERTY_TYPE_CARDINAL :: + * Property is a 32-bit unsigned integer. + */ + typedef enum BDF_PropertyType_ + { + BDF_PROPERTY_TYPE_NONE = 0, + BDF_PROPERTY_TYPE_ATOM = 1, + BDF_PROPERTY_TYPE_INTEGER = 2, + BDF_PROPERTY_TYPE_CARDINAL = 3 + + } BDF_PropertyType; + + + /********************************************************************** + * + * @type: + * BDF_Property + * + * @description: + * A handle to a @BDF_PropertyRec structure to model a given + * BDF/PCF property. + */ + typedef struct BDF_PropertyRec_* BDF_Property; + + + /********************************************************************** + * + * @struct: + * BDF_PropertyRec + * + * @description: + * This structure models a given BDF/PCF property. + * + * @fields: + * type :: + * The property type. + * + * u.atom :: + * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. + * + * u.integer :: + * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. + * + * u.cardinal :: + * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. + */ + typedef struct BDF_PropertyRec_ + { + BDF_PropertyType type; + union { + const char* atom; + FT_Int32 integer; + FT_UInt32 cardinal; + + } u; + + } BDF_PropertyRec; + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Charset_ID + * + * @description: + * Retrieve a BDF font character set identity, according to + * the BDF specification. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * acharset_encoding :: + * Charset encoding, as a C~string, owned by the face. + * + * acharset_registry :: + * Charset registry, as a C~string, owned by the face. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with BDF faces, returning an error otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Charset_ID( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Property + * + * @description: + * Retrieve a BDF property from a BDF or PCF font file. + * + * @input: + * face :: A handle to the input face. + * + * name :: The property name. + * + * @output: + * aproperty :: The property. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function works with BDF _and_ PCF fonts. It returns an error + * otherwise. It also returns an error if the property is not in the + * font. + * + * A `property' is a either key-value pair within the STARTPROPERTIES + * ... ENDPROPERTIES block of a BDF font or a key-value pair from the + * `info->props' array within a `FontRec' structure of a PCF font. + * + * Integer properties are always stored as `signed' within PCF fonts; + * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value + * for BDF fonts only. + * + * In case of error, `aproperty->type' is always set to + * @BDF_PROPERTY_TYPE_NONE. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Property( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + /* */ + +FT_END_HEADER + +#endif /* __FTBDF_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftbitmap.h b/contrib/media/updf/include/freetype/ftbitmap.h new file mode 100644 index 0000000000..92742369ba --- /dev/null +++ b/contrib/media/updf/include/freetype/ftbitmap.h @@ -0,0 +1,227 @@ +/***************************************************************************/ +/* */ +/* ftbitmap.h */ +/* */ +/* FreeType utility functions for bitmaps (specification). */ +/* */ +/* Copyright 2004, 2005, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBITMAP_H__ +#define __FTBITMAP_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bitmap_handling */ + /* */ + /* <Title> */ + /* Bitmap Handling */ + /* */ + /* <Abstract> */ + /* Handling FT_Bitmap objects. */ + /* */ + /* <Description> */ + /* This section contains functions for converting FT_Bitmap objects. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_New */ + /* */ + /* <Description> */ + /* Initialize a pointer to an @FT_Bitmap structure. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the bitmap structure. */ + /* */ + FT_EXPORT( void ) + FT_Bitmap_New( FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Copy */ + /* */ + /* <Description> */ + /* Copy a bitmap into another one. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: A handle to the source bitmap. */ + /* */ + /* <Output> */ + /* target :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Copy( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Embolden */ + /* */ + /* <Description> */ + /* Embolden a bitmap. The new bitmap will be about `xStrength' */ + /* pixels wider and `yStrength' pixels higher. The left and bottom */ + /* borders are kept unchanged. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* xStrength :: How strong the glyph is emboldened horizontally. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* yStrength :: How strong the glyph is emboldened vertically. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* <InOut> */ + /* bitmap :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The current implementation restricts `xStrength' to be less than */ + /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ + /* */ + /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ + /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Embolden( FT_Library library, + FT_Bitmap* bitmap, + FT_Pos xStrength, + FT_Pos yStrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Convert */ + /* */ + /* <Description> */ + /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */ + /* bitmap object with depth 8bpp, making the number of used bytes per */ + /* line (a.k.a. the `pitch') a multiple of `alignment'. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: The source bitmap. */ + /* */ + /* alignment :: The pitch of the bitmap is a multiple of this */ + /* parameter. Common values are 1, 2, or 4. */ + /* */ + /* <Output> */ + /* target :: The target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* It is possible to call @FT_Bitmap_Convert multiple times without */ + /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ + /* */ + /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ + /* */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Convert( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target, + FT_Int alignment ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GlyphSlot_Own_Bitmap */ + /* */ + /* <Description> */ + /* Make sure that a glyph slot owns `slot->bitmap'. */ + /* */ + /* <Input> */ + /* slot :: The glyph slot. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function is to be used in combination with */ + /* @FT_Bitmap_Embolden. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Done */ + /* */ + /* <Description> */ + /* Destroy a bitmap object created with @FT_Bitmap_New. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* bitmap :: The bitmap object to be freed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Done( FT_Library library, + FT_Bitmap *bitmap ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTBITMAP_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftcache.h b/contrib/media/updf/include/freetype/ftcache.h new file mode 100644 index 0000000000..6af5306228 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftcache.h @@ -0,0 +1,1140 @@ +/***************************************************************************/ +/* */ +/* ftcache.h */ +/* */ +/* FreeType Cache subsystem (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCACHE_H__ +#define __FTCACHE_H__ + + +#include <ft2build.h> +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************* + * + * <Section> + * cache_subsystem + * + * <Title> + * Cache Sub-System + * + * <Abstract> + * How to cache face, size, and glyph data with FreeType~2. + * + * <Description> + * This section describes the FreeType~2 cache sub-system, which is used + * to limit the number of concurrently opened @FT_Face and @FT_Size + * objects, as well as caching information like character maps and glyph + * images while limiting their maximum memory usage. + * + * Note that all types and functions begin with the `FTC_' prefix. + * + * The cache is highly portable and thus doesn't know anything about the + * fonts installed on your system, or how to access them. This implies + * the following scheme: + * + * First, available or installed font faces are uniquely identified by + * @FTC_FaceID values, provided to the cache by the client. Note that + * the cache only stores and compares these values, and doesn't try to + * interpret them in any way. + * + * Second, the cache calls, only when needed, a client-provided function + * to convert an @FTC_FaceID into a new @FT_Face object. The latter is + * then completely managed by the cache, including its termination + * through @FT_Done_Face. To monitor termination of face objects, the + * finalizer callback in the `generic' field of the @FT_Face object can + * be used, which might also be used to store the @FTC_FaceID of the + * face. + * + * Clients are free to map face IDs to anything else. The most simple + * usage is to associate them to a (pathname,face_index) pair that is + * used to call @FT_New_Face. However, more complex schemes are also + * possible. + * + * Note that for the cache to work correctly, the face ID values must be + * *persistent*, which means that the contents they point to should not + * change at runtime, or that their value should not become invalid. + * + * If this is unavoidable (e.g., when a font is uninstalled at runtime), + * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let + * the cache get rid of any references to the old @FTC_FaceID it may + * keep internally. Failure to do so will lead to incorrect behaviour + * or even crashes. + * + * To use the cache, start with calling @FTC_Manager_New to create a new + * @FTC_Manager object, which models a single cache instance. You can + * then look up @FT_Face and @FT_Size objects with + * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. + * + * If you want to use the charmap caching, call @FTC_CMapCache_New, then + * later use @FTC_CMapCache_Lookup to perform the equivalent of + * @FT_Get_Char_Index, only much faster. + * + * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then + * later use @FTC_ImageCache_Lookup to retrieve the corresponding + * @FT_Glyph objects from the cache. + * + * If you need lots of small bitmaps, it is much more memory efficient + * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This + * returns @FTC_SBitRec structures, which are used to store small + * bitmaps directly. (A small bitmap is one whose metrics and + * dimensions all fit into 8-bit integers). + * + * We hope to also provide a kerning cache in the near future. + * + * + * <Order> + * FTC_Manager + * FTC_FaceID + * FTC_Face_Requester + * + * FTC_Manager_New + * FTC_Manager_Reset + * FTC_Manager_Done + * FTC_Manager_LookupFace + * FTC_Manager_LookupSize + * FTC_Manager_RemoveFaceID + * + * FTC_Node + * FTC_Node_Unref + * + * FTC_ImageCache + * FTC_ImageCache_New + * FTC_ImageCache_Lookup + * + * FTC_SBit + * FTC_SBitCache + * FTC_SBitCache_New + * FTC_SBitCache_Lookup + * + * FTC_CMapCache + * FTC_CMapCache_New + * FTC_CMapCache_Lookup + * + *************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** BASIC TYPE DEFINITIONS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: FTC_FaceID + * + * @description: + * An opaque pointer type that is used to identity face objects. The + * contents of such objects is application-dependent. + * + * These pointers are typically used to point to a user-defined + * structure containing a font file path, and face index. + * + * @note: + * Never use NULL as a valid @FTC_FaceID. + * + * Face IDs are passed by the client to the cache manager, which calls, + * when needed, the @FTC_Face_Requester to translate them into new + * @FT_Face objects. + * + * If the content of a given face ID changes at runtime, or if the value + * becomes invalid (e.g., when uninstalling a font), you should + * immediately call @FTC_Manager_RemoveFaceID before any other cache + * function. + * + * Failure to do so will result in incorrect behaviour or even + * memory leaks and crashes. + */ + typedef FT_Pointer FTC_FaceID; + + + /************************************************************************ + * + * @functype: + * FTC_Face_Requester + * + * @description: + * A callback function provided by client applications. It is used by + * the cache manager to translate a given @FTC_FaceID into a new valid + * @FT_Face object, on demand. + * + * <Input> + * face_id :: + * The face ID to resolve. + * + * library :: + * A handle to a FreeType library object. + * + * req_data :: + * Application-provided request data (see note below). + * + * <Output> + * aface :: + * A new @FT_Face handle. + * + * <Return> + * FreeType error code. 0~means success. + * + * <Note> + * The third parameter `req_data' is the same as the one passed by the + * client when @FTC_Manager_New is called. + * + * The face requester should not perform funny things on the returned + * face object, like creating a new @FT_Size for it, or setting a + * transformation through @FT_Set_Transform! + */ + typedef FT_Error + (*FTC_Face_Requester)( FTC_FaceID face_id, + FT_Library library, + FT_Pointer request_data, + FT_Face* aface ); + + /* */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* these macros are incompatible with LLP64, should not be used */ + +#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) + +#define FTC_FACE_ID_HASH( i ) \ + ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ + ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** CACHE MANAGER OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Manager */ + /* */ + /* <Description> */ + /* This object corresponds to one instance of the cache-subsystem. */ + /* It is used to cache one or more @FT_Face objects, along with */ + /* corresponding @FT_Size objects. */ + /* */ + /* The manager intentionally limits the total number of opened */ + /* @FT_Face and @FT_Size objects to control memory usage. See the */ + /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ + /* */ + /* The manager is also used to cache `nodes' of various types while */ + /* limiting their total memory usage. */ + /* */ + /* All limitations are enforced by keeping lists of managed objects */ + /* in most-recently-used order, and flushing old nodes to make room */ + /* for new ones. */ + /* */ + typedef struct FTC_ManagerRec_* FTC_Manager; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Node */ + /* */ + /* <Description> */ + /* An opaque handle to a cache node object. Each cache node is */ + /* reference-counted. A node with a count of~0 might be flushed */ + /* out of a full cache whenever a lookup request is performed. */ + /* */ + /* If you look up nodes, you have the ability to `acquire' them, */ + /* i.e., to increment their reference count. This will prevent the */ + /* node from being flushed out of the cache until you explicitly */ + /* `release' it (see @FTC_Node_Unref). */ + /* */ + /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ + /* */ + typedef struct FTC_NodeRec_* FTC_Node; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_New */ + /* */ + /* <Description> */ + /* Create a new cache manager. */ + /* */ + /* <Input> */ + /* library :: The parent FreeType library handle to use. */ + /* */ + /* max_faces :: Maximum number of opened @FT_Face objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ + /* Use~0 for defaults. Note that this value does not */ + /* account for managed @FT_Face and @FT_Size objects. */ + /* */ + /* requester :: An application-provided callback used to translate */ + /* face IDs into real @FT_Face objects. */ + /* */ + /* req_data :: A generic pointer that is passed to the requester */ + /* each time it is called (see @FTC_Face_Requester). */ + /* */ + /* <Output> */ + /* amanager :: A handle to a new manager object. 0~in case of */ + /* failure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_New( FT_Library library, + FT_UInt max_faces, + FT_UInt max_sizes, + FT_ULong max_bytes, + FTC_Face_Requester requester, + FT_Pointer req_data, + FTC_Manager *amanager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Reset */ + /* */ + /* <Description> */ + /* Empty a given cache manager. This simply gets rid of all the */ + /* currently cached @FT_Face and @FT_Size objects within the manager. */ + /* */ + /* <InOut> */ + /* manager :: A handle to the manager. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Reset( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Done */ + /* */ + /* <Description> */ + /* Destroy a given manager after emptying it. */ + /* */ + /* <Input> */ + /* manager :: A handle to the target cache manager object. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Done( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupFace */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Face object that corresponds to a given face ID */ + /* through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* face_id :: The ID of the face object. */ + /* */ + /* <Output> */ + /* aface :: A handle to the face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Face object is always owned by the manager. You */ + /* should never try to discard it yourself. */ + /* */ + /* The @FT_Face object doesn't necessarily have a current size object */ + /* (i.e., face->size can be 0). If you need a specific `font size', */ + /* use @FTC_Manager_LookupSize instead. */ + /* */ + /* Never change the face's transformation matrix (i.e., never call */ + /* the @FT_Set_Transform function) on a returned face! If you need */ + /* to transform glyphs, do it yourself after glyph loading. */ + /* */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory was available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupFace( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_ScalerRec */ + /* */ + /* <Description> */ + /* A structure used to describe a given character size in either */ + /* pixels or points to the cache manager. See */ + /* @FTC_Manager_LookupSize. */ + /* */ + /* <Fields> */ + /* face_id :: The source face ID. */ + /* */ + /* width :: The character width. */ + /* */ + /* height :: The character height. */ + /* */ + /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ + /* interpreted as integer pixel character sizes. */ + /* Otherwise, they are expressed as 1/64th of points. */ + /* */ + /* x_res :: Only used when `pixel' is value~0 to indicate the */ + /* horizontal resolution in dpi. */ + /* */ + /* y_res :: Only used when `pixel' is value~0 to indicate the */ + /* vertical resolution in dpi. */ + /* */ + /* <Note> */ + /* This type is mainly used to retrieve @FT_Size objects through the */ + /* cache manager. */ + /* */ + typedef struct FTC_ScalerRec_ + { + FTC_FaceID face_id; + FT_UInt width; + FT_UInt height; + FT_Int pixel; + FT_UInt x_res; + FT_UInt y_res; + + } FTC_ScalerRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_Scaler */ + /* */ + /* <Description> */ + /* A handle to an @FTC_ScalerRec structure. */ + /* */ + typedef struct FTC_ScalerRec_* FTC_Scaler; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupSize */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Size object that corresponds to a given */ + /* @FTC_ScalerRec pointer through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* scaler :: A scaler handle. */ + /* */ + /* <Output> */ + /* asize :: A handle to the size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Size object is always owned by the manager. You */ + /* should never try to discard it by yourself. */ + /* */ + /* You can access the parent @FT_Face object simply as `size->face' */ + /* if you need it. Note that this object is also owned by the */ + /* manager. */ + /* */ + /* <Note> */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory is available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupSize( FTC_Manager manager, + FTC_Scaler scaler, + FT_Size *asize ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Node_Unref */ + /* */ + /* <Description> */ + /* Decrement a cache node's internal reference count. When the count */ + /* reaches 0, it is not destroyed but becomes eligible for subsequent */ + /* cache flushes. */ + /* */ + /* <Input> */ + /* node :: The cache node handle. */ + /* */ + /* manager :: The cache manager handle. */ + /* */ + FT_EXPORT( void ) + FTC_Node_Unref( FTC_Node node, + FTC_Manager manager ); + + + /************************************************************************* + * + * @function: + * FTC_Manager_RemoveFaceID + * + * @description: + * A special function used to indicate to the cache manager that + * a given @FTC_FaceID is no longer valid, either because its + * content changed, or because it was deallocated or uninstalled. + * + * @input: + * manager :: + * The cache manager handle. + * + * face_id :: + * The @FTC_FaceID to be removed. + * + * @note: + * This function flushes all nodes from the cache corresponding to this + * `face_id', with the exception of nodes with a non-null reference + * count. + * + * Such nodes are however modified internally so as to never appear + * in later lookups with the same `face_id' value, and to be immediately + * destroyed when released by all their users. + * + */ + FT_EXPORT( void ) + FTC_Manager_RemoveFaceID( FTC_Manager manager, + FTC_FaceID face_id ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * FTC_CMapCache + * + * @description: + * An opaque handle used to model a charmap cache. This cache is to + * hold character codes -> glyph indices mappings. + * + */ + typedef struct FTC_CMapCacheRec_* FTC_CMapCache; + + + /************************************************************************* + * + * @function: + * FTC_CMapCache_New + * + * @description: + * Create a new charmap cache. + * + * @input: + * manager :: + * A handle to the cache manager. + * + * @output: + * acache :: + * A new cache handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Like all other caches, this one will be destroyed with the cache + * manager. + * + */ + FT_EXPORT( FT_Error ) + FTC_CMapCache_New( FTC_Manager manager, + FTC_CMapCache *acache ); + + + /************************************************************************ + * + * @function: + * FTC_CMapCache_Lookup + * + * @description: + * Translate a character code into a glyph index, using the charmap + * cache. + * + * @input: + * cache :: + * A charmap cache handle. + * + * face_id :: + * The source face ID. + * + * cmap_index :: + * The index of the charmap in the source face. Any negative value + * means to use the cache @FT_Face's default charmap. + * + * char_code :: + * The character code (in the corresponding charmap). + * + * @return: + * Glyph index. 0~means `no glyph'. + * + */ + FT_EXPORT( FT_UInt ) + FTC_CMapCache_Lookup( FTC_CMapCache cache, + FTC_FaceID face_id, + FT_Int cmap_index, + FT_UInt32 char_code ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** IMAGE CACHE OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @struct: + * FTC_ImageTypeRec + * + * @description: + * A structure used to model the type of images in a glyph cache. + * + * @fields: + * face_id :: + * The face ID. + * + * width :: + * The width in pixels. + * + * height :: + * The height in pixels. + * + * flags :: + * The load flags, as in @FT_Load_Glyph. + * + */ + typedef struct FTC_ImageTypeRec_ + { + FTC_FaceID face_id; + FT_Int width; + FT_Int height; + FT_Int32 flags; + + } FTC_ImageTypeRec; + + + /************************************************************************* + * + * @type: + * FTC_ImageType + * + * @description: + * A handle to an @FTC_ImageTypeRec structure. + * + */ + typedef struct FTC_ImageTypeRec_* FTC_ImageType; + + + /* */ + + +#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ + ( (d1)->face_id == (d2)->face_id && \ + (d1)->width == (d2)->width && \ + (d1)->flags == (d2)->flags ) + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* this macro is incompatible with LLP64, should not be used */ + +#define FTC_IMAGE_TYPE_HASH( d ) \ + (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ + ( (d)->width << 8 ) ^ (d)->height ^ \ + ( (d)->flags << 4 ) ) + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_ImageCache */ + /* */ + /* <Description> */ + /* A handle to an glyph image cache object. They are designed to */ + /* hold many distinct glyph images while not exceeding a certain */ + /* memory threshold. */ + /* */ + typedef struct FTC_ImageCacheRec_* FTC_ImageCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_New */ + /* */ + /* <Description> */ + /* Create a new glyph image cache. */ + /* */ + /* <Input> */ + /* manager :: The parent manager for the image cache. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new glyph image cache object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_New( FTC_Manager manager, + FTC_ImageCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_Lookup */ + /* */ + /* <Description> */ + /* Retrieve a given glyph image from a glyph image cache. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* type :: A pointer to a glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_Lookup( FTC_ImageCache cache, + FTC_ImageType type, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* scaler :: A pointer to a scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ + /* glyphs; you should always use the FreeType cache API instead. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_LookupScaler( FTC_ImageCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBit */ + /* */ + /* <Description> */ + /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ + /* structure for details. */ + /* */ + typedef struct FTC_SBitRec_* FTC_SBit; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_SBitRec */ + /* */ + /* <Description> */ + /* A very compact structure used to describe a small glyph bitmap. */ + /* */ + /* <Fields> */ + /* width :: The bitmap width in pixels. */ + /* */ + /* height :: The bitmap height in pixels. */ + /* */ + /* left :: The horizontal distance from the pen position to the */ + /* left bitmap border (a.k.a. `left side bearing', or */ + /* `lsb'). */ + /* */ + /* top :: The vertical distance from the pen position (on the */ + /* baseline) to the upper bitmap border (a.k.a. `top */ + /* side bearing'). The distance is positive for upwards */ + /* y~coordinates. */ + /* */ + /* format :: The format of the glyph bitmap (monochrome or gray). */ + /* */ + /* max_grays :: Maximum gray level value (in the range 1 to~255). */ + /* */ + /* pitch :: The number of bytes per bitmap line. May be positive */ + /* or negative. */ + /* */ + /* xadvance :: The horizontal advance width in pixels. */ + /* */ + /* yadvance :: The vertical advance height in pixels. */ + /* */ + /* buffer :: A pointer to the bitmap pixels. */ + /* */ + typedef struct FTC_SBitRec_ + { + FT_Byte width; + FT_Byte height; + FT_Char left; + FT_Char top; + + FT_Byte format; + FT_Byte max_grays; + FT_Short pitch; + FT_Char xadvance; + FT_Char yadvance; + + FT_Byte* buffer; + + } FTC_SBitRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBitCache */ + /* */ + /* <Description> */ + /* A handle to a small bitmap cache. These are special cache objects */ + /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ + /* much more efficient way than the traditional glyph image cache */ + /* implemented by @FTC_ImageCache. */ + /* */ + typedef struct FTC_SBitCacheRec_* FTC_SBitCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_New */ + /* */ + /* <Description> */ + /* Create a new cache to store small glyph bitmaps. */ + /* */ + /* <Input> */ + /* manager :: A handle to the source cache manager. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new sbit cache. NULL in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_New( FTC_Manager manager, + FTC_SBitCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_Lookup */ + /* */ + /* <Description> */ + /* Look up a given small glyph bitmap in a given sbit cache and */ + /* `lock' it to prevent its flushing from the cache until needed. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* type :: A pointer to the glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_Lookup( FTC_SBitCache cache, + FTC_ImageType type, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* scaler :: A pointer to the scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_LookupScaler( FTC_SBitCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /* */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*@***********************************************************************/ + /* */ + /* <Struct> */ + /* FTC_FontRec */ + /* */ + /* <Description> */ + /* A simple structure used to describe a given `font' to the cache */ + /* manager. Note that a `font' is the combination of a given face */ + /* with a given character size. */ + /* */ + /* <Fields> */ + /* face_id :: The ID of the face to use. */ + /* */ + /* pix_width :: The character width in integer pixels. */ + /* */ + /* pix_height :: The character height in integer pixels. */ + /* */ + typedef struct FTC_FontRec_ + { + FTC_FaceID face_id; + FT_UShort pix_width; + FT_UShort pix_height; + + } FTC_FontRec; + + + /* */ + + +#define FTC_FONT_COMPARE( f1, f2 ) \ + ( (f1)->face_id == (f2)->face_id && \ + (f1)->pix_width == (f2)->pix_width && \ + (f1)->pix_height == (f2)->pix_height ) + + /* this macro is incompatible with LLP64, should not be used */ +#define FTC_FONT_HASH( f ) \ + (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ + ((f)->pix_width << 8) ^ \ + ((f)->pix_height) ) + + typedef FTC_FontRec* FTC_Font; + + + FT_EXPORT( FT_Error ) + FTC_Manager_Lookup_Face( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + FT_EXPORT( FT_Error ) + FTC_Manager_Lookup_Size( FTC_Manager manager, + FTC_Font font, + FT_Face *aface, + FT_Size *asize ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /* */ + +FT_END_HEADER + +#endif /* __FTCACHE_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftchapters.h b/contrib/media/updf/include/freetype/ftchapters.h new file mode 100644 index 0000000000..7775a6bb00 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftchapters.h @@ -0,0 +1,103 @@ +/***************************************************************************/ +/* */ +/* This file defines the structure of the FreeType reference. */ +/* It is used by the python script which generates the HTML files. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* general_remarks */ +/* */ +/* <Title> */ +/* General Remarks */ +/* */ +/* <Sections> */ +/* user_allocation */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* core_api */ +/* */ +/* <Title> */ +/* Core API */ +/* */ +/* <Sections> */ +/* version */ +/* basic_types */ +/* base_interface */ +/* glyph_variants */ +/* glyph_management */ +/* mac_specific */ +/* sizes_management */ +/* header_file_macros */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* format_specific */ +/* */ +/* <Title> */ +/* Format-Specific API */ +/* */ +/* <Sections> */ +/* multiple_masters */ +/* truetype_tables */ +/* type1_tables */ +/* sfnt_names */ +/* bdf_fonts */ +/* cid_fonts */ +/* pfr_fonts */ +/* winfnt_fonts */ +/* font_formats */ +/* gasp_table */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* cache_subsystem */ +/* */ +/* <Title> */ +/* Cache Sub-System */ +/* */ +/* <Sections> */ +/* cache_subsystem */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* support_api */ +/* */ +/* <Title> */ +/* Support API */ +/* */ +/* <Sections> */ +/* computations */ +/* list_processing */ +/* outline_processing */ +/* quick_advance */ +/* bitmap_handling */ +/* raster */ +/* glyph_stroker */ +/* system_interface */ +/* module_management */ +/* gzip */ +/* lzw */ +/* lcd_filtering */ +/* */ +/***************************************************************************/ diff --git a/contrib/media/updf/include/freetype/ftcid.h b/contrib/media/updf/include/freetype/ftcid.h new file mode 100644 index 0000000000..203a30caf8 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftcid.h @@ -0,0 +1,166 @@ +/***************************************************************************/ +/* */ +/* ftcid.h */ +/* */ +/* FreeType API for accessing CID font information (specification). */ +/* */ +/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCID_H__ +#define __FTCID_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cid_fonts */ + /* */ + /* <Title> */ + /* CID Fonts */ + /* */ + /* <Abstract> */ + /* CID-keyed font specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of CID-keyed font specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Registry_Ordering_Supplement + * + * @description: + * Retrieve the Registry/Ordering/Supplement triple (also known as the + * "R/O/S") from a CID-keyed font. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * registry :: + * The registry, as a C~string, owned by the face. + * + * ordering :: + * The ordering, as a C~string, owned by the face. + * + * supplement :: + * The supplement. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces, returning an error + * otherwise. + * + * @since: + * 2.3.6 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Is_Internally_CID_Keyed + * + * @description: + * Retrieve the type of the input face, CID keyed or not. In + * constrast to the @FT_IS_CID_KEYED macro this function returns + * successfully also for CID-keyed fonts in an SNFT wrapper. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * is_cid :: + * The type of the face as an @FT_Bool. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, + FT_Bool *is_cid ); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_From_Glyph_Index + * + * @description: + * Retrieve the CID of the input glyph index. + * + * @input: + * face :: + * A handle to the input face. + * + * glyph_index :: + * The input glyph index. + * + * @output: + * cid :: + * The CID as an @FT_UInt. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_From_Glyph_Index( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + /* */ + +FT_END_HEADER + +#endif /* __FTCID_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/fterrdef.h b/contrib/media/updf/include/freetype/fterrdef.h new file mode 100644 index 0000000000..bf52220603 --- /dev/null +++ b/contrib/media/updf/include/freetype/fterrdef.h @@ -0,0 +1,244 @@ +/***************************************************************************/ +/* */ +/* fterrdef.h */ +/* */ +/* FreeType error codes (specification). */ +/* */ +/* Copyright 2002, 2004, 2006, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST OF ERROR CODES/MESSAGES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + + /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */ + /* including this file. */ + + + /* generic errors */ + + FT_NOERRORDEF_( Ok, 0x00, \ + "no error" ) + + FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ + "cannot open resource" ) + FT_ERRORDEF_( Unknown_File_Format, 0x02, \ + "unknown file format" ) + FT_ERRORDEF_( Invalid_File_Format, 0x03, \ + "broken file" ) + FT_ERRORDEF_( Invalid_Version, 0x04, \ + "invalid FreeType version" ) + FT_ERRORDEF_( Lower_Module_Version, 0x05, \ + "module version is too low" ) + FT_ERRORDEF_( Invalid_Argument, 0x06, \ + "invalid argument" ) + FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ + "unimplemented feature" ) + FT_ERRORDEF_( Invalid_Table, 0x08, \ + "broken table" ) + FT_ERRORDEF_( Invalid_Offset, 0x09, \ + "broken offset within table" ) + FT_ERRORDEF_( Array_Too_Large, 0x0A, \ + "array allocation size too large" ) + + /* glyph/character errors */ + + FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ + "invalid glyph index" ) + FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ + "invalid character code" ) + FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ + "unsupported glyph image format" ) + FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ + "cannot render this glyph format" ) + FT_ERRORDEF_( Invalid_Outline, 0x14, \ + "invalid outline" ) + FT_ERRORDEF_( Invalid_Composite, 0x15, \ + "invalid composite glyph" ) + FT_ERRORDEF_( Too_Many_Hints, 0x16, \ + "too many hints" ) + FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ + "invalid pixel size" ) + + /* handle errors */ + + FT_ERRORDEF_( Invalid_Handle, 0x20, \ + "invalid object handle" ) + FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ + "invalid library handle" ) + FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ + "invalid module handle" ) + FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ + "invalid face handle" ) + FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ + "invalid size handle" ) + FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ + "invalid glyph slot handle" ) + FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ + "invalid charmap handle" ) + FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ + "invalid cache manager handle" ) + FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ + "invalid stream handle" ) + + /* driver errors */ + + FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ + "too many modules" ) + FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ + "too many extensions" ) + + /* memory errors */ + + FT_ERRORDEF_( Out_Of_Memory, 0x40, \ + "out of memory" ) + FT_ERRORDEF_( Unlisted_Object, 0x41, \ + "unlisted object" ) + + /* stream errors */ + + FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ + "cannot open stream" ) + FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ + "invalid stream seek" ) + FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ + "invalid stream skip" ) + FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ + "invalid stream read" ) + FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ + "invalid stream operation" ) + FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ + "invalid frame operation" ) + FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ + "nested frame access" ) + FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ + "invalid frame read" ) + + /* raster errors */ + + FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ + "raster uninitialized" ) + FT_ERRORDEF_( Raster_Corrupted, 0x61, \ + "raster corrupted" ) + FT_ERRORDEF_( Raster_Overflow, 0x62, \ + "raster overflow" ) + FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ + "negative height while rastering" ) + + /* cache errors */ + + FT_ERRORDEF_( Too_Many_Caches, 0x70, \ + "too many registered caches" ) + + /* TrueType and SFNT errors */ + + FT_ERRORDEF_( Invalid_Opcode, 0x80, \ + "invalid opcode" ) + FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ + "too few arguments" ) + FT_ERRORDEF_( Stack_Overflow, 0x82, \ + "stack overflow" ) + FT_ERRORDEF_( Code_Overflow, 0x83, \ + "code overflow" ) + FT_ERRORDEF_( Bad_Argument, 0x84, \ + "bad argument" ) + FT_ERRORDEF_( Divide_By_Zero, 0x85, \ + "division by zero" ) + FT_ERRORDEF_( Invalid_Reference, 0x86, \ + "invalid reference" ) + FT_ERRORDEF_( Debug_OpCode, 0x87, \ + "found debug opcode" ) + FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ + "found ENDF opcode in execution stream" ) + FT_ERRORDEF_( Nested_DEFS, 0x89, \ + "nested DEFS" ) + FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ + "invalid code range" ) + FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ + "execution context too long" ) + FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ + "too many function definitions" ) + FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ + "too many instruction definitions" ) + FT_ERRORDEF_( Table_Missing, 0x8E, \ + "SFNT font table missing" ) + FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ + "horizontal header (hhea) table missing" ) + FT_ERRORDEF_( Locations_Missing, 0x90, \ + "locations (loca) table missing" ) + FT_ERRORDEF_( Name_Table_Missing, 0x91, \ + "name table missing" ) + FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ + "character map (cmap) table missing" ) + FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ + "horizontal metrics (hmtx) table missing" ) + FT_ERRORDEF_( Post_Table_Missing, 0x94, \ + "PostScript (post) table missing" ) + FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ + "invalid horizontal metrics" ) + FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ + "invalid character map (cmap) format" ) + FT_ERRORDEF_( Invalid_PPem, 0x97, \ + "invalid ppem value" ) + FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ + "invalid vertical metrics" ) + FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ + "could not find context" ) + FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ + "invalid PostScript (post) table format" ) + FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ + "invalid PostScript (post) table" ) + + /* CFF, CID, and Type 1 errors */ + + FT_ERRORDEF_( Syntax_Error, 0xA0, \ + "opcode syntax error" ) + FT_ERRORDEF_( Stack_Underflow, 0xA1, \ + "argument stack underflow" ) + FT_ERRORDEF_( Ignore, 0xA2, \ + "ignore" ) + FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ + "no Unicode glyph name found" ) + + + /* BDF errors */ + + FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ + "`STARTFONT' field missing" ) + FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ + "`FONT' field missing" ) + FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ + "`SIZE' field missing" ) + FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \ + "`FONTBOUNDINGBOX' field missing" ) + FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \ + "`CHARS' field missing" ) + FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \ + "`STARTCHAR' field missing" ) + FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \ + "`ENCODING' field missing" ) + FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \ + "`BBX' field missing" ) + FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \ + "`BBX' too big" ) + FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \ + "Font header corrupted or missing fields" ) + FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \ + "Font glyphs corrupted or missing fields" ) + + +/* END */ diff --git a/contrib/media/updf/include/freetype/fterrid.h b/contrib/media/updf/include/freetype/fterrid.h new file mode 100755 index 0000000000..0444e6f470 --- /dev/null +++ b/contrib/media/updf/include/freetype/fterrid.h @@ -0,0 +1,161 @@ +/******************************************************************* + * + * fterrid.h + * + * TrueType Error ID definitions + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ + +#ifndef FREETYPE_H +#error "Don't include this file! Use freetype.h instead." +#endif + +#ifndef FTERRID_H +#define FTERRID_H + + /************************ error codes declaration **************/ + + /* The error codes are grouped in 'classes' used to indicate the */ + /* 'level' at which the error happened. */ + /* The class is given by an error code's high byte. */ + + + /* ------------- Success is always 0 -------- */ + +#define TT_Err_Ok 0 + + + /* -------- High-level API error codes ------ */ + +#define TT_Err_Invalid_Face_Handle 0x001 +#define TT_Err_Invalid_Instance_Handle 0x002 +#define TT_Err_Invalid_Glyph_Handle 0x003 +#define TT_Err_Invalid_CharMap_Handle 0x004 +#define TT_Err_Invalid_Result_Address 0x005 +#define TT_Err_Invalid_Glyph_Index 0x006 +#define TT_Err_Invalid_Argument 0x007 +#define TT_Err_Could_Not_Open_File 0x008 +#define TT_Err_File_Is_Not_Collection 0x009 + +#define TT_Err_Table_Missing 0x00A +#define TT_Err_Invalid_Horiz_Metrics 0x00B +#define TT_Err_Invalid_CharMap_Format 0x00C +#define TT_Err_Invalid_PPem 0x00D +#define TT_Err_Invalid_Vert_Metrics 0x00E + +#define TT_Err_Invalid_File_Format 0x010 + +#define TT_Err_Invalid_Engine 0x020 +#define TT_Err_Too_Many_Extensions 0x021 +#define TT_Err_Extensions_Unsupported 0x022 +#define TT_Err_Invalid_Extension_Id 0x023 + +#define TT_Err_No_Vertical_Data 0x030 + +#define TT_Err_Max_Profile_Missing 0x080 +#define TT_Err_Header_Table_Missing 0x081 +#define TT_Err_Horiz_Header_Missing 0x082 +#define TT_Err_Locations_Missing 0x083 +#define TT_Err_Name_Table_Missing 0x084 +#define TT_Err_CMap_Table_Missing 0x085 +#define TT_Err_Hmtx_Table_Missing 0x086 +#define TT_Err_OS2_Table_Missing 0x087 +#define TT_Err_Post_Table_Missing 0x088 +#define TT_Err_Glyf_Table_Missing 0x089 + + + /* -------- Memory component error codes ---- */ + + /* this error indicates that an operation cannot */ + /* be performed due to memory exhaustion. */ + +#define TT_Err_Out_Of_Memory 0x100 + + + /* -------- File component error codes ------ */ + + /* these error codes indicate that the file could */ + /* not be accessed properly. Usually, this means */ + /* a broken font file! */ + +#define TT_Err_Invalid_File_Offset 0x200 +#define TT_Err_Invalid_File_Read 0x201 +#define TT_Err_Invalid_Frame_Access 0x202 + + + /* -------- Glyph loader error codes -------- */ + + /* Produced only by the glyph loader, these error */ + /* codes indicate a broken glyph in a font file. */ + +#define TT_Err_Too_Many_Points 0x300 +#define TT_Err_Too_Many_Contours 0x301 +#define TT_Err_Invalid_Composite 0x302 +#define TT_Err_Too_Many_Ins 0x303 + + + /* --- bytecode interpreter error codes ----- */ + + /* These error codes are produced by the TrueType */ + /* bytecode interpreter. They usually indicate a */ + /* broken font file, a broken glyph within a font */ + /* file, or a bug in the interpreter! */ + +#define TT_Err_Invalid_Opcode 0x400 +#define TT_Err_Too_Few_Arguments 0x401 +#define TT_Err_Stack_Overflow 0x402 +#define TT_Err_Code_Overflow 0x403 +#define TT_Err_Bad_Argument 0x404 +#define TT_Err_Divide_By_Zero 0x405 +#define TT_Err_Storage_Overflow 0x406 +#define TT_Err_Cvt_Overflow 0x407 +#define TT_Err_Invalid_Reference 0x408 +#define TT_Err_Invalid_Distance 0x409 +#define TT_Err_Interpolate_Twilight 0x40A +#define TT_Err_Debug_OpCode 0x40B +#define TT_Err_ENDF_In_Exec_Stream 0x40C +#define TT_Err_Out_Of_CodeRanges 0x40D +#define TT_Err_Nested_DEFS 0x40E +#define TT_Err_Invalid_CodeRange 0x40F +#define TT_Err_Invalid_Displacement 0x410 +#define TT_Err_Execution_Too_Long 0x411 + + + /* ------ internal failure error codes ----- */ + + /* These error codes are produced when an incoherent */ + /* library state has been detected. These reflect a */ + /* severe bug in the engine! (Or a major overwrite */ + /* of your application into the library's data.) */ + +#define TT_Err_Nested_Frame_Access 0x500 +#define TT_Err_Invalid_Cache_List 0x501 +#define TT_Err_Could_Not_Find_Context 0x502 +#define TT_Err_Unlisted_Object 0x503 + + + /* ---- scan-line converter error codes ----- */ + + /* These error codes are produced by the raster component. */ + /* They indicate that an outline structure was incoherently */ + /* setup, or that you're trying to render an horribly */ + /* complex glyph! */ + +#define TT_Err_Raster_Pool_Overflow 0x600 +#define TT_Err_Raster_Negative_Height 0x601 +#define TT_Err_Raster_Invalid_Value 0x602 +#define TT_Err_Raster_Not_Initialized 0x603 + +#endif /* FTERRID_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/fterrors.h b/contrib/media/updf/include/freetype/fterrors.h new file mode 100644 index 0000000000..6600dadd0d --- /dev/null +++ b/contrib/media/updf/include/freetype/fterrors.h @@ -0,0 +1,206 @@ +/***************************************************************************/ +/* */ +/* fterrors.h */ +/* */ +/* FreeType error code handling (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This special header file is used to define the handling of FT2 */ + /* enumeration constants. It can also be used to generate error message */ + /* strings with a small macro trick explained below. */ + /* */ + /* I - Error Formats */ + /* ----------------- */ + /* */ + /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ + /* defined in ftoption.h in order to make the higher byte indicate */ + /* the module where the error has happened (this is not compatible */ + /* with standard builds of FreeType 2). You can then use the macro */ + /* FT_ERROR_BASE macro to extract the generic error code from an */ + /* FT_Error value. */ + /* */ + /* */ + /* II - Error Message strings */ + /* -------------------------- */ + /* */ + /* The error definitions below are made through special macros that */ + /* allow client applications to build a table of error message strings */ + /* if they need it. The strings are not included in a normal build of */ + /* FreeType 2 to save space (most client applications do not use */ + /* them). */ + /* */ + /* To do so, you have to define the following macros before including */ + /* this file: */ + /* */ + /* FT_ERROR_START_LIST :: */ + /* This macro is called before anything else to define the start of */ + /* the error list. It is followed by several FT_ERROR_DEF calls */ + /* (see below). */ + /* */ + /* FT_ERROR_DEF( e, v, s ) :: */ + /* This macro is called to define one single error. */ + /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */ + /* `v' is the error numerical value. */ + /* `s' is the corresponding error string. */ + /* */ + /* FT_ERROR_END_LIST :: */ + /* This macro ends the list. */ + /* */ + /* Additionally, you have to undefine __FTERRORS_H__ before #including */ + /* this file. */ + /* */ + /* Here is a simple example: */ + /* */ + /* { */ + /* #undef __FTERRORS_H__ */ + /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ + /* #define FT_ERROR_START_LIST { */ + /* #define FT_ERROR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int err_code; */ + /* const char* err_msg; */ + /* } ft_errors[] = */ + /* */ + /* #include FT_ERRORS_H */ + /* } */ + /* */ + /*************************************************************************/ + + +#ifndef __FTERRORS_H__ +#define __FTERRORS_H__ + + + /* include module base error codes */ +#include FT_MODULE_ERRORS_H + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#undef FT_ERR_XCAT +#undef FT_ERR_CAT + +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) + + + /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ + /* By default, we use `FT_Err_'. */ + /* */ +#ifndef FT_ERR_PREFIX +#define FT_ERR_PREFIX FT_Err_ +#endif + + + /* FT_ERR_BASE is used as the base for module-specific errors. */ + /* */ +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS + +#ifndef FT_ERR_BASE +#define FT_ERR_BASE FT_Mod_Err_Base +#endif + +#else + +#undef FT_ERR_BASE +#define FT_ERR_BASE 0 + +#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ + + + /* If FT_ERRORDEF is not defined, we need to define a simple */ + /* enumeration type. */ + /* */ +#ifndef FT_ERRORDEF + +#define FT_ERRORDEF( e, v, s ) e = v, +#define FT_ERROR_START_LIST enum { +#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_ERRORDEF */ + + + /* this macro is used to define an error */ +#define FT_ERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) + + /* this is only used for <module>_Err_Ok, which must be 0! */ +#define FT_NOERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) + + +#ifdef FT_ERROR_START_LIST + FT_ERROR_START_LIST +#endif + + + /* now include the error codes */ +#include FT_ERROR_DEFINITIONS_H + + +#ifdef FT_ERROR_END_LIST + FT_ERROR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SIMPLE CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_ERROR_START_LIST +#undef FT_ERROR_END_LIST + +#undef FT_ERRORDEF +#undef FT_ERRORDEF_ +#undef FT_NOERRORDEF_ + +#undef FT_NEED_EXTERN_C +#undef FT_ERR_CONCAT +#undef FT_ERR_BASE + + /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ +#ifndef FT_KEEP_ERR_PREFIX +#undef FT_ERR_PREFIX +#endif + +#endif /* __FTERRORS_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftgasp.h b/contrib/media/updf/include/freetype/ftgasp.h new file mode 100644 index 0000000000..91a769e520 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftgasp.h @@ -0,0 +1,120 @@ +/***************************************************************************/ +/* */ +/* ftgasp.h */ +/* */ +/* Access of TrueType's `gasp' table (specification). */ +/* */ +/* Copyright 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef _FT_GASP_H_ +#define _FT_GASP_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + + /*************************************************************************** + * + * @section: + * gasp_table + * + * @title: + * Gasp Table + * + * @abstract: + * Retrieving TrueType `gasp' table entries. + * + * @description: + * The function @FT_Get_Gasp can be used to query a TrueType or OpenType + * font for specific entries in its `gasp' table, if any. This is + * mainly useful when implementing native TrueType hinting with the + * bytecode interpreter to duplicate the Windows text rendering results. + */ + + /************************************************************************* + * + * @enum: + * FT_GASP_XXX + * + * @description: + * A list of values and/or bit-flags returned by the @FT_Get_Gasp + * function. + * + * @values: + * FT_GASP_NO_TABLE :: + * This special value means that there is no GASP table in this face. + * It is up to the client to decide what to do. + * + * FT_GASP_DO_GRIDFIT :: + * Grid-fitting and hinting should be performed at the specified ppem. + * This *really* means TrueType bytecode interpretation. + * + * FT_GASP_DO_GRAY :: + * Anti-aliased rendering should be performed at the specified ppem. + * + * FT_GASP_SYMMETRIC_SMOOTHING :: + * Smoothing along multiple axes must be used with ClearType. + * + * FT_GASP_SYMMETRIC_GRIDFIT :: + * Grid-fitting must be used with ClearType's symmetric smoothing. + * + * @note: + * `ClearType' is Microsoft's implementation of LCD rendering, partly + * protected by patents. + * + * @since: + * 2.3.0 + */ +#define FT_GASP_NO_TABLE -1 +#define FT_GASP_DO_GRIDFIT 0x01 +#define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_SMOOTHING 0x08 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 + + + /************************************************************************* + * + * @func: + * FT_Get_Gasp + * + * @description: + * Read the `gasp' table from a TrueType or OpenType font file and + * return the entry corresponding to a given character pixel size. + * + * @input: + * face :: The source face handle. + * ppem :: The vertical character pixel size. + * + * @return: + * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no + * `gasp' table in the face. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Int ) + FT_Get_Gasp( FT_Face face, + FT_UInt ppem ); + +/* */ + +#endif /* _FT_GASP_H_ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftglyph.h b/contrib/media/updf/include/freetype/ftglyph.h new file mode 100644 index 0000000000..0b8f0c0444 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftglyph.h @@ -0,0 +1,613 @@ +/***************************************************************************/ +/* */ +/* ftglyph.h */ +/* */ +/* FreeType convenience functions to handle glyphs (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of several convenience functions */ + /* that can be used by client applications to easily retrieve glyph */ + /* bitmaps and outlines from a given face. */ + /* */ + /* These functions should be optional if you are writing a font server */ + /* or text layout engine on top of FreeType. However, they are pretty */ + /* handy for many other simple uses of the library. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTGLYPH_H__ +#define __FTGLYPH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_management */ + /* */ + /* <Title> */ + /* Glyph Management */ + /* */ + /* <Abstract> */ + /* Generic interface to manage individual glyph data. */ + /* */ + /* <Description> */ + /* This section contains definitions used to manage glyph data */ + /* through generic FT_Glyph objects. Each of them can contain a */ + /* bitmap, a vector outline, or even images in other formats. */ + /* */ + /*************************************************************************/ + + + /* forward declaration to a private type */ + typedef struct FT_Glyph_Class_ FT_Glyph_Class; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Glyph */ + /* */ + /* <Description> */ + /* Handle to an object used to model generic glyph images. It is a */ + /* pointer to the @FT_GlyphRec structure and can contain a glyph */ + /* bitmap or pointer. */ + /* */ + /* <Note> */ + /* Glyph objects are not owned by the library. You must thus release */ + /* them manually (through @FT_Done_Glyph) _before_ calling */ + /* @FT_Done_FreeType. */ + /* */ + typedef struct FT_GlyphRec_* FT_Glyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphRec */ + /* */ + /* <Description> */ + /* The root glyph structure contains a given glyph image plus its */ + /* advance width in 16.16 fixed float format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library object. */ + /* */ + /* clazz :: A pointer to the glyph's class. Private. */ + /* */ + /* format :: The format of the glyph's image. */ + /* */ + /* advance :: A 16.16 vector that gives the glyph's advance width. */ + /* */ + typedef struct FT_GlyphRec_ + { + FT_Library library; + const FT_Glyph_Class* clazz; + FT_Glyph_Format format; + FT_Vector advance; + + } FT_GlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_BitmapGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model a bitmap glyph image. This is */ + /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ + /* */ + typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BitmapGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for bitmap glyph images. This really is a */ + /* `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* left :: The left-side bearing, i.e., the horizontal distance */ + /* from the current pen position to the left border of the */ + /* glyph bitmap. */ + /* */ + /* top :: The top-side bearing, i.e., the vertical distance from */ + /* the current pen position to the top border of the glyph */ + /* bitmap. This distance is positive for upwards~y! */ + /* */ + /* bitmap :: A descriptor for the bitmap. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ + /* the bitmap's contents easily. */ + /* */ + /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ + /* and is thus created and destroyed with it. */ + /* */ + typedef struct FT_BitmapGlyphRec_ + { + FT_GlyphRec root; + FT_Int left; + FT_Int top; + FT_Bitmap bitmap; + + } FT_BitmapGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_OutlineGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model an outline glyph image. This */ + /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ + /* */ + typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_OutlineGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for outline (vectorial) glyph images. This */ + /* really is a `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* outline :: A descriptor for the outline. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ + /* the outline's content easily. */ + /* */ + /* As the outline is extracted from a glyph slot, its coordinates are */ + /* expressed normally in 26.6 pixels, unless the flag */ + /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ + /* */ + /* The outline's tables are always owned by the object and are */ + /* destroyed with it. */ + /* */ + typedef struct FT_OutlineGlyphRec_ + { + FT_GlyphRec root; + FT_Outline outline; + + } FT_OutlineGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph */ + /* */ + /* <Description> */ + /* A function used to extract a glyph image from a slot. Note that */ + /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* slot :: A handle to the source glyph slot. */ + /* */ + /* <Output> */ + /* aglyph :: A handle to the glyph object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph( FT_GlyphSlot slot, + FT_Glyph *aglyph ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Copy */ + /* */ + /* <Description> */ + /* A function used to copy a glyph image. Note that the created */ + /* @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* source :: A handle to the source glyph object. */ + /* */ + /* <Output> */ + /* target :: A handle to the target glyph object. 0~in case of */ + /* error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Copy( FT_Glyph source, + FT_Glyph *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Transform */ + /* */ + /* <Description> */ + /* Transform a glyph image if its format is scalable. */ + /* */ + /* <InOut> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to a 2x2 matrix to apply. */ + /* */ + /* delta :: A pointer to a 2d vector to apply. Coordinates are */ + /* expressed in 1/64th of a pixel. */ + /* */ + /* <Return> */ + /* FreeType error code (if not 0, the glyph format is not scalable). */ + /* */ + /* <Note> */ + /* The 2x2 transformation matrix is also applied to the glyph's */ + /* advance vector. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Transform( FT_Glyph glyph, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_BBox_Mode */ + /* */ + /* <Description> */ + /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ + /* */ + /* <Values> */ + /* FT_GLYPH_BBOX_UNSCALED :: */ + /* Return unscaled font units. */ + /* */ + /* FT_GLYPH_BBOX_SUBPIXELS :: */ + /* Return unfitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_GRIDFIT :: */ + /* Return grid-fitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_TRUNCATE :: */ + /* Return coordinates in integer pixels. */ + /* */ + /* FT_GLYPH_BBOX_PIXELS :: */ + /* Return grid-fitted pixel coordinates. */ + /* */ + typedef enum FT_Glyph_BBox_Mode_ + { + FT_GLYPH_BBOX_UNSCALED = 0, + FT_GLYPH_BBOX_SUBPIXELS = 0, + FT_GLYPH_BBOX_GRIDFIT = 1, + FT_GLYPH_BBOX_TRUNCATE = 2, + FT_GLYPH_BBOX_PIXELS = 3 + + } FT_Glyph_BBox_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_glyph_bbox_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated. Use the corresponding */ + /* @FT_Glyph_BBox_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */ + /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */ + /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */ + /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */ + /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */ + /* */ +#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED +#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS +#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT +#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE +#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Get_CBox */ + /* */ + /* <Description> */ + /* Return a glyph's `control box'. The control box encloses all the */ + /* outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* which contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the source glyph object. */ + /* */ + /* mode :: The mode which indicates how to interpret the returned */ + /* bounding box values. */ + /* */ + /* <Output> */ + /* acbox :: The glyph coordinate bounding box. Coordinates are */ + /* expressed in 1/64th of pixels if it is grid-fitted. */ + /* */ + /* <Note> */ + /* Coordinates are relative to the glyph origin, using the y~upwards */ + /* convention. */ + /* */ + /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ + /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ + /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ + /* is another name for this constant. */ + /* */ + /* Note that the maximum coordinates are exclusive, which means that */ + /* one can compute the width and height of the glyph image (be it in */ + /* integer or 26.6 pixels) as: */ + /* */ + /* { */ + /* width = bbox.xMax - bbox.xMin; */ + /* height = bbox.yMax - bbox.yMin; */ + /* } */ + /* */ + /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ + /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ + /* which corresponds to: */ + /* */ + /* { */ + /* bbox.xMin = FLOOR(bbox.xMin); */ + /* bbox.yMin = FLOOR(bbox.yMin); */ + /* bbox.xMax = CEILING(bbox.xMax); */ + /* bbox.yMax = CEILING(bbox.yMax); */ + /* } */ + /* */ + /* To get the bbox in pixel coordinates, set `bbox_mode' to */ + /* @FT_GLYPH_BBOX_TRUNCATE. */ + /* */ + /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ + /* to @FT_GLYPH_BBOX_PIXELS. */ + /* */ + FT_EXPORT( void ) + FT_Glyph_Get_CBox( FT_Glyph glyph, + FT_UInt bbox_mode, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_To_Bitmap */ + /* */ + /* <Description> */ + /* Convert a given glyph object to a bitmap glyph object. */ + /* */ + /* <InOut> */ + /* the_glyph :: A pointer to a handle to the target glyph. */ + /* */ + /* <Input> */ + /* render_mode :: An enumeration that describes how the data is */ + /* rendered. */ + /* */ + /* origin :: A pointer to a vector used to translate the glyph */ + /* image before rendering. Can be~0 (if no */ + /* translation). The origin is expressed in */ + /* 26.6 pixels. */ + /* */ + /* destroy :: A boolean that indicates that the original glyph */ + /* image should be destroyed by this function. It is */ + /* never destroyed in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does nothing if the glyph format isn't scalable. */ + /* */ + /* The glyph image is translated with the `origin' vector before */ + /* rendering. */ + /* */ + /* The first parameter is a pointer to an @FT_Glyph handle, that will */ + /* be _replaced_ by this function (with newly allocated data). */ + /* Typically, you would use (omitting error handling): */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyph; */ + /* FT_BitmapGlyph glyph_bitmap; */ + /* */ + /* */ + /* // load glyph */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ + /* */ + /* // extract glyph image */ + /* error = FT_Get_Glyph( face->glyph, &glyph ); */ + /* */ + /* // convert to a bitmap (default render mode + destroying old) */ + /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ + /* { */ + /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ + /* 0, 1 ); */ + /* if ( error ) // `glyph' unchanged */ + /* ... */ + /* } */ + /* */ + /* // access bitmap content by typecasting */ + /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ + /* */ + /* // do funny stuff with it, like blitting/drawing */ + /* ... */ + /* */ + /* // discard glyph image (bitmap or not) */ + /* FT_Done_Glyph( glyph ); */ + /* } */ + /* */ + /* */ + /* Here another example, again without error handling: */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyphs[MAX_GLYPHS] */ + /* */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ + /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* { */ + /* FT_Glyph bitmap = glyphs[idx]; */ + /* */ + /* */ + /* ... */ + /* */ + /* // after this call, `bitmap' no longer points into */ + /* // the `glyphs' array (and the old value isn't destroyed) */ + /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ + /* */ + /* ... */ + /* */ + /* FT_Done_Glyph( bitmap ); */ + /* } */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* FT_Done_Glyph( glyphs[idx] ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, + FT_Render_Mode render_mode, + FT_Vector* origin, + FT_Bool destroy ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Glyph */ + /* */ + /* <Description> */ + /* Destroy a given glyph. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + FT_EXPORT( void ) + FT_Done_Glyph( FT_Glyph glyph ); + + /* */ + + + /* other helpful functions */ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Multiply */ + /* */ + /* <Description> */ + /* Perform the matrix operation `b = a*b'. */ + /* */ + /* <Input> */ + /* a :: A pointer to matrix `a'. */ + /* */ + /* <InOut> */ + /* b :: A pointer to matrix `b'. */ + /* */ + /* <Note> */ + /* The result is undefined if either `a' or `b' is zero. */ + /* */ + FT_EXPORT( void ) + FT_Matrix_Multiply( const FT_Matrix* a, + FT_Matrix* b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Invert */ + /* */ + /* <Description> */ + /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ + /* */ + /* <InOut> */ + /* matrix :: A pointer to the target matrix. Remains untouched in */ + /* case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Matrix_Invert( FT_Matrix* matrix ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTGLYPH_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftgxval.h b/contrib/media/updf/include/freetype/ftgxval.h new file mode 100644 index 0000000000..497015c101 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftgxval.h @@ -0,0 +1,358 @@ +/***************************************************************************/ +/* */ +/* ftgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004, 2005, 2006 by */ +/* Masatake YAMATO, Redhat K.K, */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGXVAL_H__ +#define __FTGXVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gx_validation */ + /* */ + /* <Title> */ + /* TrueTypeGX/AAT Validation */ + /* */ + /* <Abstract> */ + /* An API to validate TrueTypeGX/AAT tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ + /* trak, prop, lcar). */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* Warning: Use FT_VALIDATE_XXX to validate a table. */ + /* Following definitions are for gxvalid developers. */ + /* */ + /* */ + /*************************************************************************/ + +#define FT_VALIDATE_feat_INDEX 0 +#define FT_VALIDATE_mort_INDEX 1 +#define FT_VALIDATE_morx_INDEX 2 +#define FT_VALIDATE_bsln_INDEX 3 +#define FT_VALIDATE_just_INDEX 4 +#define FT_VALIDATE_kern_INDEX 5 +#define FT_VALIDATE_opbd_INDEX 6 +#define FT_VALIDATE_trak_INDEX 7 +#define FT_VALIDATE_prop_INDEX 8 +#define FT_VALIDATE_lcar_INDEX 9 +#define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX + + + /************************************************************************* + * + * @macro: + * FT_VALIDATE_GX_LENGTH + * + * @description: + * The number of tables checked in this module. Use it as a parameter + * for the `table-length' argument of function @FT_TrueTypeGX_Validate. + */ +#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1) + + /* */ + + /* Up to 0x1000 is used by otvalid. + Ox2xxx is reserved for feature OT extension. */ +#define FT_VALIDATE_GX_START 0x4000 +#define FT_VALIDATE_GX_BITFIELD( tag ) \ + ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_GXXXX + * + * @description: + * A list of bit-field constants used with @FT_TrueTypeGX_Validate to + * indicate which TrueTypeGX/AAT Type tables should be validated. + * + * @values: + * FT_VALIDATE_feat :: + * Validate `feat' table. + * + * FT_VALIDATE_mort :: + * Validate `mort' table. + * + * FT_VALIDATE_morx :: + * Validate `morx' table. + * + * FT_VALIDATE_bsln :: + * Validate `bsln' table. + * + * FT_VALIDATE_just :: + * Validate `just' table. + * + * FT_VALIDATE_kern :: + * Validate `kern' table. + * + * FT_VALIDATE_opbd :: + * Validate `opbd' table. + * + * FT_VALIDATE_trak :: + * Validate `trak' table. + * + * FT_VALIDATE_prop :: + * Validate `prop' table. + * + * FT_VALIDATE_lcar :: + * Validate `lcar' table. + * + * FT_VALIDATE_GX :: + * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, + * opbd, trak, prop and lcar). + * + */ + +#define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) +#define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) +#define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) +#define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) +#define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) +#define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) +#define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) +#define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) +#define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) +#define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) + +#define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ + FT_VALIDATE_mort | \ + FT_VALIDATE_morx | \ + FT_VALIDATE_bsln | \ + FT_VALIDATE_just | \ + FT_VALIDATE_kern | \ + FT_VALIDATE_opbd | \ + FT_VALIDATE_trak | \ + FT_VALIDATE_prop | \ + FT_VALIDATE_lcar ) + + + /* */ + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Validate + * + * @description: + * Validate various TrueTypeGX tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the tables to be validated. See + * @FT_VALIDATE_GXXXX for possible values. + * + * table_length :: + * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH + * should be passed. + * + * @output: + * tables :: + * The array where all validated sfnt tables are stored. + * The array itself must be allocated by a client. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with TrueTypeGX fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the buffers pointed to by + * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value + * indicates that the table either doesn't exist in the font, the + * application hasn't asked for validation, or the validator doesn't have + * the ability to validate the sfnt table. + */ + FT_EXPORT( FT_Error ) + FT_TrueTypeGX_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + /* */ + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Free + * + * @description: + * Free the buffer allocated by TrueTypeGX validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer allocated by + * @FT_TrueTypeGX_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_TrueTypeGX_Validate only. + */ + FT_EXPORT( void ) + FT_TrueTypeGX_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_CKERNXXX + * + * @description: + * A list of bit-field constants used with @FT_ClassicKern_Validate + * to indicate the classic kern dialect or dialects. If the selected + * type doesn't fit, @FT_ClassicKern_Validate regards the table as + * invalid. + * + * @values: + * FT_VALIDATE_MS :: + * Handle the `kern' table as a classic Microsoft kern table. + * + * FT_VALIDATE_APPLE :: + * Handle the `kern' table as a classic Apple kern table. + * + * FT_VALIDATE_CKERN :: + * Handle the `kern' as either classic Apple or Microsoft kern table. + */ +#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) +#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) + +#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) + + + /* */ + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Validate + * + * @description: + * Validate classic (16-bit format) kern table to assure that the offsets + * and indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without error + * checking (which can be quite time consuming). + * + * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both + * the new 32-bit format and the classic 16-bit format, while + * FT_ClassicKern_Validate only supports the classic 16-bit format. + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the dialect to be validated. See + * @FT_VALIDATE_CKERNXXX for possible values. + * + * @output: + * ckern_table :: + * A pointer to the kern table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * After use, the application should deallocate the buffers pointed to by + * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value + * indicates that the table doesn't exist in the font. + */ + FT_EXPORT( FT_Error ) + FT_ClassicKern_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *ckern_table ); + + + /* */ + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Free + * + * @description: + * Free the buffer allocated by classic Kern validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_ClassicKern_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_ClassicKern_Validate only. + */ + FT_EXPORT( void ) + FT_ClassicKern_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTGXVAL_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftgzip.h b/contrib/media/updf/include/freetype/ftgzip.h new file mode 100644 index 0000000000..acbc4f0327 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftgzip.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftgzip.h */ +/* */ +/* Gzip-compressed stream support. */ +/* */ +/* Copyright 2002, 2003, 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGZIP_H__ +#define __FTGZIP_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gzip */ + /* */ + /* <Title> */ + /* GZIP Streams */ + /* */ + /* <Abstract> */ + /* Using gzip-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Gzip-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenGzip + * + * @description: + * Open a new stream to parse gzip-compressed font files. This is + * mainly used to support the compressed `*.pcf.gz' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, gzip compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a gzipped stream from + * it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenGzip( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGZIP_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftheader.h b/contrib/media/updf/include/freetype/ftheader.h new file mode 100644 index 0000000000..b63945dcbd --- /dev/null +++ b/contrib/media/updf/include/freetype/ftheader.h @@ -0,0 +1,780 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __FT_HEADER_H__ +#define __FT_HEADER_H__ + + + /*@***********************************************************************/ + /* */ + /* <Macro> */ + /* FT_BEGIN_HEADER */ + /* */ + /* <Description> */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* <Macro> */ + /* FT_END_HEADER */ + /* */ + /* <Description> */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* header_file_macros */ + /* */ + /* <Title> */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> +#endif + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <freetype/fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <freetype/ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <freetype/ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <freetype/ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <freetype/ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <freetype/ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <freetype/ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <freetype/ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `glyph image' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for @FT_Glyph elements. You can also + * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to + * store small glyph bitmaps, as it will use less memory. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * glyph image-related cache declarations. + * + */ +#define FT_CACHE_IMAGE_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_SMALL_BITMAPS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `small bitmaps' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for small glyph bitmaps in a relatively + * memory-efficient way. You can also use the API defined in + * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, + * including scalable outlines. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * small bitmaps-related cache declarations. + * + */ +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_CHARMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `charmap' API of the FreeType~2 cache sub-system. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * charmap-based cache declarations. + * + */ +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <freetype/ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <freetype/ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <freetype/ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <freetype/ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <freetype/ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_XFREE86_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to the XFree86 and + * X.Org X11 servers. + */ +#define FT_XFREE86_H <freetype/ftxf86.h> + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_UNPATENTED_HINTING_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <freetype/ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <freetype/ftadvanc.h> + + + /* */ + +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> + + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> + + +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + +#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> + + + /* + * Include internal headers definitions from <freetype/internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + +#endif /* __FT2_BUILD_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftimage.h b/contrib/media/updf/include/freetype/ftimage.h new file mode 100644 index 0000000000..04b5e04f7b --- /dev/null +++ b/contrib/media/updf/include/freetype/ftimage.h @@ -0,0 +1,1313 @@ +/***************************************************************************/ +/* */ +/* ftimage.h */ +/* */ +/* FreeType glyph image formats and default raster interface */ +/* (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Note: A `raster' is simply a scan-line converter, used to render */ + /* FT_Outlines into FT_Bitmaps. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTIMAGE_H__ +#define __FTIMAGE_H__ + + + /* _STANDALONE_ is from ftgrays.c */ +#ifndef _STANDALONE_ +#include <ft2build.h> +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pos */ + /* */ + /* <Description> */ + /* The type FT_Pos is used to store vectorial coordinates. Depending */ + /* on the context, these can represent distances in integer font */ + /* units, or 16.16, or 26.6 fixed float pixel coordinates. */ + /* */ + typedef signed long FT_Pos; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Vector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector; coordinates are of */ + /* the FT_Pos type. */ + /* */ + /* <Fields> */ + /* x :: The horizontal coordinate. */ + /* y :: The vertical coordinate. */ + /* */ + typedef struct FT_Vector_ + { + FT_Pos x; + FT_Pos y; + + } FT_Vector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BBox */ + /* */ + /* <Description> */ + /* A structure used to hold an outline's bounding box, i.e., the */ + /* coordinates of its extrema in the horizontal and vertical */ + /* directions. */ + /* */ + /* <Fields> */ + /* xMin :: The horizontal minimum (left-most). */ + /* */ + /* yMin :: The vertical minimum (bottom-most). */ + /* */ + /* xMax :: The horizontal maximum (right-most). */ + /* */ + /* yMax :: The vertical maximum (top-most). */ + /* */ + /* <Note> */ + /* The bounding box is specified with the coordinates of the lower */ + /* left and the upper right corner. In PostScript, those values are */ + /* often called (llx,lly) and (urx,ury), respectively. */ + /* */ + /* If `yMin' is negative, this value gives the glyph's descender. */ + /* Otherwise, the glyph doesn't descend below the baseline. */ + /* Similarly, if `ymax' is positive, this value gives the glyph's */ + /* ascender. */ + /* */ + /* `xMin' gives the horizontal distance from the glyph's origin to */ + /* the left edge of the glyph's bounding box. If `xMin' is negative, */ + /* the glyph extends to the left of the origin. */ + /* */ + typedef struct FT_BBox_ + { + FT_Pos xMin, yMin; + FT_Pos xMax, yMax; + + } FT_BBox; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Pixel_Mode */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of pixels in a */ + /* given bitmap. Note that additional formats may be added in the */ + /* future. */ + /* */ + /* <Values> */ + /* FT_PIXEL_MODE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_PIXEL_MODE_MONO :: */ + /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ + /* are stored in most-significant order (MSB), which means that */ + /* the left-most pixel in a byte has value 128. */ + /* */ + /* FT_PIXEL_MODE_GRAY :: */ + /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ + /* images. Each pixel is stored in one byte. Note that the number */ + /* of `gray' levels is stored in the `num_grays' field of the */ + /* @FT_Bitmap structure (it generally is 256). */ + /* */ + /* FT_PIXEL_MODE_GRAY2 :: */ + /* A 2-bit per pixel bitmap, used to represent embedded */ + /* anti-aliased bitmaps in font files according to the OpenType */ + /* specification. We haven't found a single font using this */ + /* format, however. */ + /* */ + /* FT_PIXEL_MODE_GRAY4 :: */ + /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ + /* bitmaps in font files according to the OpenType specification. */ + /* We haven't found a single font using this format, however. */ + /* */ + /* FT_PIXEL_MODE_LCD :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on LCD displays; the bitmap is three times */ + /* wider than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD. */ + /* */ + /* FT_PIXEL_MODE_LCD_V :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on rotated LCD displays; the bitmap is three */ + /* times taller than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD_V. */ + /* */ + typedef enum FT_Pixel_Mode_ + { + FT_PIXEL_MODE_NONE = 0, + FT_PIXEL_MODE_MONO, + FT_PIXEL_MODE_GRAY, + FT_PIXEL_MODE_GRAY2, + FT_PIXEL_MODE_GRAY4, + FT_PIXEL_MODE_LCD, + FT_PIXEL_MODE_LCD_V, + + FT_PIXEL_MODE_MAX /* do not remove */ + + } FT_Pixel_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_pixel_mode_xxx */ + /* */ + /* <Description> */ + /* A list of deprecated constants. Use the corresponding */ + /* @FT_Pixel_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */ + /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */ + /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */ + /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */ + /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */ + /* */ +#define ft_pixel_mode_none FT_PIXEL_MODE_NONE +#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO +#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY +#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 +#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 + + /* */ + +#if 0 + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Palette_Mode */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */ + /* */ + /* An enumeration type to describe the format of a bitmap palette, */ + /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ + /* */ + /* <Values> */ + /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */ + /* records. */ + /* */ + /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */ + /* records. */ + /* */ + /* <Note> */ + /* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */ + /* FreeType, these types are not handled by the library itself. */ + /* */ + typedef enum FT_Palette_Mode_ + { + ft_palette_mode_rgb = 0, + ft_palette_mode_rgba, + + ft_palette_mode_max /* do not remove */ + + } FT_Palette_Mode; + + /* */ + +#endif + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap */ + /* */ + /* <Description> */ + /* A structure used to describe a bitmap or pixmap to the raster. */ + /* Note that we now manage pixmaps of various depths through the */ + /* `pixel_mode' field. */ + /* */ + /* <Fields> */ + /* rows :: The number of bitmap rows. */ + /* */ + /* width :: The number of pixels in bitmap row. */ + /* */ + /* pitch :: The pitch's absolute value is the number of bytes */ + /* taken by one bitmap row, including padding. */ + /* However, the pitch is positive when the bitmap has */ + /* a `down' flow, and negative when it has an `up' */ + /* flow. In all cases, the pitch is an offset to add */ + /* to a bitmap pointer in order to go down one row. */ + /* */ + /* Note that `padding' means the alignment of a */ + /* bitmap to a byte border, and FreeType functions */ + /* normally align to the smallest possible integer */ + /* value. */ + /* */ + /* For the B/W rasterizer, `pitch' is always an even */ + /* number. */ + /* */ + /* To change the pitch of a bitmap (say, to make it a */ + /* multiple of 4), use @FT_Bitmap_Convert. */ + /* Alternatively, you might use callback functions to */ + /* directly render to the application's surface; see */ + /* the file `example2.cpp' in the tutorial for a */ + /* demonstration. */ + /* */ + /* buffer :: A typeless pointer to the bitmap buffer. This */ + /* value should be aligned on 32-bit boundaries in */ + /* most cases. */ + /* */ + /* num_grays :: This field is only used with */ + /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ + /* levels used in the bitmap. */ + /* */ + /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ + /* See @FT_Pixel_Mode for possible values. */ + /* */ + /* palette_mode :: This field is intended for paletted pixel modes; */ + /* it indicates how the palette is stored. Not */ + /* used currently. */ + /* */ + /* palette :: A typeless pointer to the bitmap palette; this */ + /* field is intended for paletted pixel modes. Not */ + /* used currently. */ + /* */ + /* <Note> */ + /* For now, the only pixel modes supported by FreeType are mono and */ + /* grays. However, drivers might be added in the future to support */ + /* more `colorful' options. */ + /* */ + typedef struct FT_Bitmap_ + { + int rows; + int width; + int pitch; + unsigned char* buffer; + short num_grays; + char pixel_mode; + char palette_mode; + void* palette; + + } FT_Bitmap; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline */ + /* */ + /* <Description> */ + /* This structure is used to describe an outline to the scan-line */ + /* converter. */ + /* */ + /* <Fields> */ + /* n_contours :: The number of contours in the outline. */ + /* */ + /* n_points :: The number of points in the outline. */ + /* */ + /* points :: A pointer to an array of `n_points' @FT_Vector */ + /* elements, giving the outline's point coordinates. */ + /* */ + /* tags :: A pointer to an array of `n_points' chars, giving */ + /* each outline point's type. */ + /* */ + /* If bit~0 is unset, the point is `off' the curve, */ + /* i.e., a Bézier control point, while it is `on' if */ + /* set. */ + /* */ + /* Bit~1 is meaningful for `off' points only. If set, */ + /* it indicates a third-order Bézier arc control point; */ + /* and a second-order control point if unset. */ + /* */ + /* If bit~2 is set, bits 5-7 contain the drop-out mode */ + /* (as defined in the OpenType specification; the value */ + /* is the same as the argument to the SCANMODE */ + /* instruction). */ + /* */ + /* Bits 3 and~4 are reserved for internal purposes. */ + /* */ + /* contours :: An array of `n_contours' shorts, giving the end */ + /* point of each contour within the outline. For */ + /* example, the first contour is defined by the points */ + /* `0' to `contours[0]', the second one is defined by */ + /* the points `contours[0]+1' to `contours[1]', etc. */ + /* */ + /* flags :: A set of bit flags used to characterize the outline */ + /* and give hints to the scan-converter and hinter on */ + /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */ + /* */ + /* <Note> */ + /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ + /* first point of each contour. The drop-out mode as given with */ + /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ + /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ + /* */ + typedef struct FT_Outline_ + { + short n_contours; /* number of contours in glyph */ + short n_points; /* number of points in the glyph */ + + FT_Vector* points; /* the outline's points */ + char* tags; /* the points flags */ + short* contours; /* the contour end points */ + + int flags; /* outline masks */ + + } FT_Outline; + + /* Following limits must be consistent with */ + /* FT_Outline.{n_contours,n_points} */ +#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX +#define FT_OUTLINE_POINTS_MAX SHRT_MAX + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OUTLINE_FLAGS */ + /* */ + /* <Description> */ + /* A list of bit-field constants use for the flags in an outline's */ + /* `flags' field. */ + /* */ + /* <Values> */ + /* FT_OUTLINE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_OUTLINE_OWNER :: */ + /* If set, this flag indicates that the outline's field arrays */ + /* (i.e., `points', `flags', and `contours') are `owned' by the */ + /* outline object, and should thus be freed when it is destroyed. */ + /* */ + /* FT_OUTLINE_EVEN_ODD_FILL :: */ + /* By default, outlines are filled using the non-zero winding rule. */ + /* If set to 1, the outline will be filled using the even-odd fill */ + /* rule (only works with the smooth rasterizer). */ + /* */ + /* FT_OUTLINE_REVERSE_FILL :: */ + /* By default, outside contours of an outline are oriented in */ + /* clock-wise direction, as defined in the TrueType specification. */ + /* This flag is set if the outline uses the opposite direction */ + /* (typically for Type~1 fonts). This flag is ignored by the scan */ + /* converter. */ + /* */ + /* FT_OUTLINE_IGNORE_DROPOUTS :: */ + /* By default, the scan converter will try to detect drop-outs in */ + /* an outline and correct the glyph bitmap to ensure consistent */ + /* shape continuity. If set, this flag hints the scan-line */ + /* converter to ignore such cases. See below for more information. */ + /* */ + /* FT_OUTLINE_SMART_DROPOUTS :: */ + /* Select smart dropout control. If unset, use simple dropout */ + /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ + /* below for more information. */ + /* */ + /* FT_OUTLINE_INCLUDE_STUBS :: */ + /* If set, turn pixels on for `stubs', otherwise exclude them. */ + /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ + /* more information. */ + /* */ + /* FT_OUTLINE_HIGH_PRECISION :: */ + /* This flag indicates that the scan-line converter should try to */ + /* convert this outline to bitmaps with the highest possible */ + /* quality. It is typically set for small character sizes. Note */ + /* that this is only a hint that might be completely ignored by a */ + /* given scan-converter. */ + /* */ + /* FT_OUTLINE_SINGLE_PASS :: */ + /* This flag is set to force a given scan-converter to only use a */ + /* single pass over the outline to render a bitmap glyph image. */ + /* Normally, it is set for very large character sizes. It is only */ + /* a hint that might be completely ignored by a given */ + /* scan-converter. */ + /* */ + /* <Note> */ + /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ + /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ + /* rasterizer. */ + /* */ + /* There exists a second mechanism to pass the drop-out mode to the */ + /* B/W rasterizer; see the `tags' field in @FT_Outline. */ + /* */ + /* Please refer to the description of the `SCANTYPE' instruction in */ + /* the OpenType specification (in file `ttinst1.doc') how simple */ + /* drop-outs, smart drop-outs, and stubs are defined. */ + /* */ +#define FT_OUTLINE_NONE 0x0 +#define FT_OUTLINE_OWNER 0x1 +#define FT_OUTLINE_EVEN_ODD_FILL 0x2 +#define FT_OUTLINE_REVERSE_FILL 0x4 +#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 +#define FT_OUTLINE_SMART_DROPOUTS 0x10 +#define FT_OUTLINE_INCLUDE_STUBS 0x20 + +#define FT_OUTLINE_HIGH_PRECISION 0x100 +#define FT_OUTLINE_SINGLE_PASS 0x200 + + + /************************************************************************* + * + * @enum: + * ft_outline_flags + * + * @description: + * These constants are deprecated. Please use the corresponding + * @FT_OUTLINE_FLAGS values. + * + * @values: + * ft_outline_none :: See @FT_OUTLINE_NONE. + * ft_outline_owner :: See @FT_OUTLINE_OWNER. + * ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL. + * ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL. + * ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS. + * ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION. + * ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS. + */ +#define ft_outline_none FT_OUTLINE_NONE +#define ft_outline_owner FT_OUTLINE_OWNER +#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL +#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL +#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS +#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION +#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS + + /* */ + +#define FT_CURVE_TAG( flag ) ( flag & 3 ) + +#define FT_CURVE_TAG_ON 1 +#define FT_CURVE_TAG_CONIC 0 +#define FT_CURVE_TAG_CUBIC 2 + +#define FT_CURVE_TAG_HAS_SCANMODE 4 + +#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ +#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ + +#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ + FT_CURVE_TAG_TOUCH_Y ) + +#define FT_Curve_Tag_On FT_CURVE_TAG_ON +#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC +#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC +#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X +#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_MoveToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `move */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `move to' is emitted to start a new contour in an outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `move to'. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_MoveToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_LineToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `line */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `line to' is emitted to indicate a segment in the outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `line to'. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_LineToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_LineTo_Func FT_Outline_LineToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_ConicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `conic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `conic to' is emitted to indicate a second-order Bézier arc in */ + /* the outline. */ + /* */ + /* <Input> */ + /* control :: An intermediate control point between the last position */ + /* and the new target in `to'. */ + /* */ + /* to :: A pointer to the target end point of the conic arc. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_ConicToFunc)( const FT_Vector* control, + const FT_Vector* to, + void* user ); + +#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_CubicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `cubic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ + /* */ + /* <Input> */ + /* control1 :: A pointer to the first Bézier control point. */ + /* */ + /* control2 :: A pointer to the second Bézier control point. */ + /* */ + /* to :: A pointer to the target end point. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_CubicToFunc)( const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to, + void* user ); + +#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline_Funcs */ + /* */ + /* <Description> */ + /* A structure to hold various function pointers used during outline */ + /* decomposition in order to emit segments, conic, and cubic Béziers. */ + /* */ + /* <Fields> */ + /* move_to :: The `move to' emitter. */ + /* */ + /* line_to :: The segment emitter. */ + /* */ + /* conic_to :: The second-order Bézier arc emitter. */ + /* */ + /* cubic_to :: The third-order Bézier arc emitter. */ + /* */ + /* shift :: The shift that is applied to coordinates before they */ + /* are sent to the emitter. */ + /* */ + /* delta :: The delta that is applied to coordinates before they */ + /* are sent to the emitter, but after the shift. */ + /* */ + /* <Note> */ + /* The point coordinates sent to the emitters are the transformed */ + /* version of the original coordinates (this is important for high */ + /* accuracy during scan-conversion). The transformation is simple: */ + /* */ + /* { */ + /* x' = (x << shift) - delta */ + /* y' = (x << shift) - delta */ + /* } */ + /* */ + /* Set the values of `shift' and `delta' to~0 to get the original */ + /* point coordinates. */ + /* */ + typedef struct FT_Outline_Funcs_ + { + FT_Outline_MoveToFunc move_to; + FT_Outline_LineToFunc line_to; + FT_Outline_ConicToFunc conic_to; + FT_Outline_CubicToFunc cubic_to; + + int shift; + FT_Pos delta; + + } FT_Outline_Funcs; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_IMAGE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags to an unsigned long type. */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ +#ifndef FT_IMAGE_TAG +#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ + value = ( ( (unsigned long)_x1 << 24 ) | \ + ( (unsigned long)_x2 << 16 ) | \ + ( (unsigned long)_x3 << 8 ) | \ + (unsigned long)_x4 ) +#endif /* FT_IMAGE_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_Format */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of a given glyph */ + /* image. Note that this version of FreeType only supports two image */ + /* formats, even though future font drivers will be able to register */ + /* their own format. */ + /* */ + /* <Values> */ + /* FT_GLYPH_FORMAT_NONE :: */ + /* The value~0 is reserved. */ + /* */ + /* FT_GLYPH_FORMAT_COMPOSITE :: */ + /* The glyph image is a composite of several other images. This */ + /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ + /* report compound glyphs (like accented characters). */ + /* */ + /* FT_GLYPH_FORMAT_BITMAP :: */ + /* The glyph image is a bitmap, and can be described as an */ + /* @FT_Bitmap. You generally need to access the `bitmap' field of */ + /* the @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_OUTLINE :: */ + /* The glyph image is a vectorial outline made of line segments */ + /* and Bézier arcs; it can be described as an @FT_Outline; you */ + /* generally want to access the `outline' field of the */ + /* @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_PLOTTER :: */ + /* The glyph image is a vectorial path with no inside and outside */ + /* contours. Some Type~1 fonts, like those in the Hershey family, */ + /* contain glyphs in this format. These are described as */ + /* @FT_Outline, but FreeType isn't currently capable of rendering */ + /* them correctly. */ + /* */ + typedef enum FT_Glyph_Format_ + { + FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), + + FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) + + } FT_Glyph_Format; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_glyph_format_xxx */ + /* */ + /* <Description> */ + /* A list of deprecated constants. Use the corresponding */ + /* @FT_Glyph_Format values instead. */ + /* */ + /* <Values> */ + /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */ + /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */ + /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */ + /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */ + /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */ + /* */ +#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE +#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE +#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP +#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE +#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** R A S T E R D E F I N I T I O N S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* A raster is a scan converter, in charge of rendering an outline into */ + /* a a bitmap. This section contains the public API for rasters. */ + /* */ + /* Note that in FreeType 2, all rasters are now encapsulated within */ + /* specific modules called `renderers'. See `freetype/ftrender.h' for */ + /* more details on renderers. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* raster */ + /* */ + /* <Title> */ + /* Scanline Converter */ + /* */ + /* <Abstract> */ + /* How vectorial outlines are converted into bitmaps and pixmaps. */ + /* */ + /* <Description> */ + /* This section contains technical definitions. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Raster */ + /* */ + /* <Description> */ + /* A handle (pointer) to a raster object. Each object can be used */ + /* independently to convert an outline into a bitmap or pixmap. */ + /* */ + typedef struct FT_RasterRec_* FT_Raster; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Span */ + /* */ + /* <Description> */ + /* A structure used to model a single span of gray (or black) pixels */ + /* when rendering a monochrome or anti-aliased bitmap. */ + /* */ + /* <Fields> */ + /* x :: The span's horizontal start position. */ + /* */ + /* len :: The span's length in pixels. */ + /* */ + /* coverage :: The span color/coverage, ranging from 0 (background) */ + /* to 255 (foreground). Only used for anti-aliased */ + /* rendering. */ + /* */ + /* <Note> */ + /* This structure is used by the span drawing callback type named */ + /* @FT_SpanFunc which takes the y~coordinate of the span as a */ + /* a parameter. */ + /* */ + /* The coverage value is always between 0 and 255. If you want less */ + /* gray values, the callback function has to reduce them. */ + /* */ + typedef struct FT_Span_ + { + short x; + unsigned short len; + unsigned char coverage; + + } FT_Span; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_SpanFunc */ + /* */ + /* <Description> */ + /* A function used as a call-back by the anti-aliased renderer in */ + /* order to let client applications draw themselves the gray pixel */ + /* spans on each scan line. */ + /* */ + /* <Input> */ + /* y :: The scanline's y~coordinate. */ + /* */ + /* count :: The number of spans to draw on this scanline. */ + /* */ + /* spans :: A table of `count' spans to draw on the scanline. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Note> */ + /* This callback allows client applications to directly render the */ + /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ + /* */ + /* This can be used to write anti-aliased outlines directly to a */ + /* given background bitmap, and even perform translucency. */ + /* */ + /* Note that the `count' field cannot be greater than a fixed value */ + /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */ + /* `ftoption.h'. By default, this value is set to~32, which means */ + /* that if there are more than 32~spans on a given scanline, the */ + /* callback is called several times with the same `y' parameter in */ + /* order to draw all callbacks. */ + /* */ + /* Otherwise, the callback is only called once per scan-line, and */ + /* only for those scanlines that do have `gray' pixels on them. */ + /* */ + typedef void + (*FT_SpanFunc)( int y, + int count, + const FT_Span* spans, + void* user ); + +#define FT_Raster_Span_Func FT_SpanFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitTest_Func */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ + /* */ + /* A function used as a call-back by the monochrome scan-converter */ + /* to test whether a given target pixel is already set to the drawing */ + /* `color'. These tests are crucial to implement drop-out control */ + /* per-se the TrueType spec. */ + /* */ + /* <Input> */ + /* y :: The pixel's y~coordinate. */ + /* */ + /* x :: The pixel's x~coordinate. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Return> */ + /* 1~if the pixel is `set', 0~otherwise. */ + /* */ + typedef int + (*FT_Raster_BitTest_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitSet_Func */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ + /* */ + /* A function used as a call-back by the monochrome scan-converter */ + /* to set an individual target pixel. This is crucial to implement */ + /* drop-out control according to the TrueType specification. */ + /* */ + /* <Input> */ + /* y :: The pixel's y~coordinate. */ + /* */ + /* x :: The pixel's x~coordinate. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Return> */ + /* 1~if the pixel is `set', 0~otherwise. */ + /* */ + typedef void + (*FT_Raster_BitSet_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flag constants as used in the `flags' field of a */ + /* @FT_Raster_Params structure. */ + /* */ + /* <Values> */ + /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ + /* */ + /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ + /* anti-aliased glyph image should be */ + /* generated. Otherwise, it will be */ + /* monochrome (1-bit). */ + /* */ + /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ + /* rendering. In this mode, client */ + /* applications must provide their own span */ + /* callback. This lets them directly */ + /* draw or compose over an existing bitmap. */ + /* If this bit is not set, the target */ + /* pixmap's buffer _must_ be zeroed before */ + /* rendering. */ + /* */ + /* Note that for now, direct rendering is */ + /* only possible with anti-aliased glyphs. */ + /* */ + /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ + /* rendering mode. If set, the output will */ + /* be clipped to a box specified in the */ + /* `clip_box' field of the */ + /* @FT_Raster_Params structure. */ + /* */ + /* Note that by default, the glyph bitmap */ + /* is clipped to the target pixmap, except */ + /* in direct rendering mode where all spans */ + /* are generated if no clipping box is set. */ + /* */ +#define FT_RASTER_FLAG_DEFAULT 0x0 +#define FT_RASTER_FLAG_AA 0x1 +#define FT_RASTER_FLAG_DIRECT 0x2 +#define FT_RASTER_FLAG_CLIP 0x4 + + /* deprecated */ +#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT +#define ft_raster_flag_aa FT_RASTER_FLAG_AA +#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT +#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Params */ + /* */ + /* <Description> */ + /* A structure to hold the arguments used by a raster's render */ + /* function. */ + /* */ + /* <Fields> */ + /* target :: The target bitmap. */ + /* */ + /* source :: A pointer to the source glyph image (e.g., an */ + /* @FT_Outline). */ + /* */ + /* flags :: The rendering flags. */ + /* */ + /* gray_spans :: The gray span drawing callback. */ + /* */ + /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */ + /* */ + /* bit_test :: The bit test callback. UNIMPLEMENTED! */ + /* */ + /* bit_set :: The bit set callback. UNIMPLEMENTED! */ + /* */ + /* user :: User-supplied data that is passed to each drawing */ + /* callback. */ + /* */ + /* clip_box :: An optional clipping box. It is only used in */ + /* direct rendering mode. Note that coordinates here */ + /* should be expressed in _integer_ pixels (and not in */ + /* 26.6 fixed-point units). */ + /* */ + /* <Note> */ + /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ + /* bit flag is set in the `flags' field, otherwise a monochrome */ + /* bitmap is generated. */ + /* */ + /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ + /* raster will call the `gray_spans' callback to draw gray pixel */ + /* spans, in the case of an aa glyph bitmap, it will call */ + /* `black_spans', and `bit_test' and `bit_set' in the case of a */ + /* monochrome bitmap. This allows direct composition over a */ + /* pre-existing bitmap through user-provided callbacks to perform the */ + /* span drawing/composition. */ + /* */ + /* Note that the `bit_test' and `bit_set' callbacks are required when */ + /* rendering a monochrome bitmap, as they are crucial to implement */ + /* correct drop-out control as defined in the TrueType specification. */ + /* */ + typedef struct FT_Raster_Params_ + { + const FT_Bitmap* target; + const void* source; + int flags; + FT_SpanFunc gray_spans; + FT_SpanFunc black_spans; /* doesn't work! */ + FT_Raster_BitTest_Func bit_test; /* doesn't work! */ + FT_Raster_BitSet_Func bit_set; /* doesn't work! */ + void* user; + FT_BBox clip_box; + + } FT_Raster_Params; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_NewFunc */ + /* */ + /* <Description> */ + /* A function used to create a new raster object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory allocator. */ + /* */ + /* <Output> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `memory' parameter is a typeless pointer in order to avoid */ + /* un-wanted dependencies on the rest of the FreeType code. In */ + /* practice, it is an @FT_Memory object, i.e., a handle to the */ + /* standard FreeType memory allocator. However, this field can be */ + /* completely ignored by a given raster implementation. */ + /* */ + typedef int + (*FT_Raster_NewFunc)( void* memory, + FT_Raster* raster ); + +#define FT_Raster_New_Func FT_Raster_NewFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_DoneFunc */ + /* */ + /* <Description> */ + /* A function used to destroy a given raster object. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + typedef void + (*FT_Raster_DoneFunc)( FT_Raster raster ); + +#define FT_Raster_Done_Func FT_Raster_DoneFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_ResetFunc */ + /* */ + /* <Description> */ + /* FreeType provides an area of memory called the `render pool', */ + /* available to all registered rasters. This pool can be freely used */ + /* during a given scan-conversion but is shared by all rasters. Its */ + /* content is thus transient. */ + /* */ + /* This function is called each time the render pool changes, or just */ + /* after a new raster object is created. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* pool_base :: The address in memory of the render pool. */ + /* */ + /* pool_size :: The size in bytes of the render pool. */ + /* */ + /* <Note> */ + /* Rasters can ignore the render pool and rely on dynamic memory */ + /* allocation if they want to (a handle to the memory allocator is */ + /* passed to the raster constructor). However, this is not */ + /* recommended for efficiency purposes. */ + /* */ + typedef void + (*FT_Raster_ResetFunc)( FT_Raster raster, + unsigned char* pool_base, + unsigned long pool_size ); + +#define FT_Raster_Reset_Func FT_Raster_ResetFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_SetModeFunc */ + /* */ + /* <Description> */ + /* This function is a generic facility to change modes or attributes */ + /* in a given raster. This can be used for debugging purposes, or */ + /* simply to allow implementation-specific `features' in a given */ + /* raster module. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* mode :: A 4-byte tag used to name the mode or property. */ + /* */ + /* args :: A pointer to the new mode/property to use. */ + /* */ + typedef int + (*FT_Raster_SetModeFunc)( FT_Raster raster, + unsigned long mode, + void* args ); + +#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_RenderFunc */ + /* */ + /* <Description> */ + /* Invoke a given raster to scan-convert a given glyph image into a */ + /* target bitmap. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* store the rendering parameters. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The exact format of the source image depends on the raster's glyph */ + /* format defined in its @FT_Raster_Funcs structure. It can be an */ + /* @FT_Outline or anything else in order to support a large array of */ + /* glyph formats. */ + /* */ + /* Note also that the render function can fail and return a */ + /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ + /* not support direct composition. */ + /* */ + /* XXX: For now, the standard raster doesn't support direct */ + /* composition but this should change for the final release (see */ + /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ + /* for examples of distinct implementations which support direct */ + /* composition). */ + /* */ + typedef int + (*FT_Raster_RenderFunc)( FT_Raster raster, + const FT_Raster_Params* params ); + +#define FT_Raster_Render_Func FT_Raster_RenderFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Funcs */ + /* */ + /* <Description> */ + /* A structure used to describe a given raster class to the library. */ + /* */ + /* <Fields> */ + /* glyph_format :: The supported glyph format for this raster. */ + /* */ + /* raster_new :: The raster constructor. */ + /* */ + /* raster_reset :: Used to reset the render pool within the raster. */ + /* */ + /* raster_render :: A function to render a glyph into a given bitmap. */ + /* */ + /* raster_done :: The raster destructor. */ + /* */ + typedef struct FT_Raster_Funcs_ + { + FT_Glyph_Format glyph_format; + FT_Raster_NewFunc raster_new; + FT_Raster_ResetFunc raster_reset; + FT_Raster_SetModeFunc raster_set_mode; + FT_Raster_RenderFunc raster_render; + FT_Raster_DoneFunc raster_done; + + } FT_Raster_Funcs; + + + /* */ + + +FT_END_HEADER + +#endif /* __FTIMAGE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftincrem.h b/contrib/media/updf/include/freetype/ftincrem.h new file mode 100644 index 0000000000..aaf689ff16 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftincrem.h @@ -0,0 +1,353 @@ +/***************************************************************************/ +/* */ +/* ftincrem.h */ +/* */ +/* FreeType incremental loading (specification). */ +/* */ +/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTINCREM_H__ +#define __FTINCREM_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * incremental + * + * @title: + * Incremental Loading + * + * @abstract: + * Custom Glyph Loading. + * + * @description: + * This section contains various functions used to perform so-called + * `incremental' glyph loading. This is a mode where all glyphs loaded + * from a given @FT_Face are provided by the client application, + * + * Apart from that, all other tables are loaded normally from the font + * file. This mode is useful when FreeType is used within another + * engine, e.g., a PostScript Imaging Processor. + * + * To enable this mode, you must use @FT_Open_Face, passing an + * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an + * @FT_Incremental_Interface value. See the comments for + * @FT_Incremental_InterfaceRec for an example. + * + */ + + + /*************************************************************************** + * + * @type: + * FT_Incremental + * + * @description: + * An opaque type describing a user-provided object used to implement + * `incremental' glyph loading within FreeType. This is used to support + * embedded fonts in certain environments (e.g., PostScript interpreters), + * where the glyph data isn't in the font file, or must be overridden by + * different values. + * + * @note: + * It is up to client applications to create and implement @FT_Incremental + * objects, as long as they provide implementations for the methods + * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc + * and @FT_Incremental_GetGlyphMetricsFunc. + * + * See the description of @FT_Incremental_InterfaceRec to understand how + * to use incremental objects with FreeType. + * + */ + typedef struct FT_IncrementalRec_* FT_Incremental; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_MetricsRec + * + * @description: + * A small structure used to contain the basic glyph metrics returned + * by the @FT_Incremental_GetGlyphMetricsFunc method. + * + * @fields: + * bearing_x :: + * Left bearing, in font units. + * + * bearing_y :: + * Top bearing, in font units. + * + * advance :: + * Horizontal component of glyph advance, in font units. + * + * advance_v :: + * Vertical component of glyph advance, in font units. + * + * @note: + * These correspond to horizontal or vertical metrics depending on the + * value of the `vertical' argument to the function + * @FT_Incremental_GetGlyphMetricsFunc. + * + */ + typedef struct FT_Incremental_MetricsRec_ + { + FT_Long bearing_x; + FT_Long bearing_y; + FT_Long advance; + FT_Long advance_v; /* since 2.3.12 */ + + } FT_Incremental_MetricsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_Metrics + * + * @description: + * A handle to an @FT_Incremental_MetricsRec structure. + * + */ + typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphDataFunc + * + * @description: + * A function called by FreeType to access a given glyph's data bytes + * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is + * enabled. + * + * Note that the format of the glyph's data bytes depends on the font + * file format. For TrueType, it must correspond to the raw bytes within + * the `glyf' table. For PostScript formats, it must correspond to the + * *unencrypted* charstring bytes, without any `lenIV' header. It is + * undefined for any other format. + * + * @input: + * incremental :: + * Handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * @output: + * adata :: + * A structure describing the returned glyph data bytes (which will be + * accessed as a read-only byte block). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If this function returns successfully the method + * @FT_Incremental_FreeGlyphDataFunc will be called later to release + * the data bytes. + * + * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for + * compound glyphs. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Data* adata ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_FreeGlyphDataFunc + * + * @description: + * A function used to release the glyph data bytes returned by a + * successful call to @FT_Incremental_GetGlyphDataFunc. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * data :: + * A structure describing the glyph data bytes (which will be accessed + * as a read-only byte block). + * + */ + typedef void + (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, + FT_Data* data ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphMetricsFunc + * + * @description: + * A function used to retrieve the basic metrics of a given glyph index + * before accessing its data. This is necessary because, in certain + * formats like TrueType, the metrics are stored in a different place from + * the glyph images proper. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * vertical :: + * If true, return vertical metrics. + * + * ametrics :: + * This parameter is used for both input and output. + * The original glyph metrics, if any, in font units. If metrics are + * not available all the values must be set to zero. + * + * @output: + * ametrics :: + * The replacement glyph metrics in font units. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphMetricsFunc) + ( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Bool vertical, + FT_Incremental_MetricsRec *ametrics ); + + + /************************************************************************** + * + * @struct: + * FT_Incremental_FuncsRec + * + * @description: + * A table of functions for accessing fonts that load data + * incrementally. Used in @FT_Incremental_InterfaceRec. + * + * @fields: + * get_glyph_data :: + * The function to get glyph data. Must not be null. + * + * free_glyph_data :: + * The function to release glyph data. Must not be null. + * + * get_glyph_metrics :: + * The function to get glyph metrics. May be null if the font does + * not provide overriding glyph metrics. + * + */ + typedef struct FT_Incremental_FuncsRec_ + { + FT_Incremental_GetGlyphDataFunc get_glyph_data; + FT_Incremental_FreeGlyphDataFunc free_glyph_data; + FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; + + } FT_Incremental_FuncsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_InterfaceRec + * + * @description: + * A structure to be used with @FT_Open_Face to indicate that the user + * wants to support incremental glyph loading. You should use it with + * @FT_PARAM_TAG_INCREMENTAL as in the following example: + * + * { + * FT_Incremental_InterfaceRec inc_int; + * FT_Parameter parameter; + * FT_Open_Args open_args; + * + * + * // set up incremental descriptor + * inc_int.funcs = my_funcs; + * inc_int.object = my_object; + * + * // set up optional parameter + * parameter.tag = FT_PARAM_TAG_INCREMENTAL; + * parameter.data = &inc_int; + * + * // set up FT_Open_Args structure + * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; + * open_args.pathname = my_font_pathname; + * open_args.num_params = 1; + * open_args.params = ¶meter; // we use one optional argument + * + * // open the font + * error = FT_Open_Face( library, &open_args, index, &face ); + * ... + * } + * + */ + typedef struct FT_Incremental_InterfaceRec_ + { + const FT_Incremental_FuncsRec* funcs; + FT_Incremental object; + + } FT_Incremental_InterfaceRec; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_Interface + * + * @description: + * A pointer to an @FT_Incremental_InterfaceRec structure. + * + */ + typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_INCREMENTAL + * + * @description: + * A constant used as the tag of @FT_Parameter structures to indicate + * an incremental loading object to be used by FreeType. + * + */ +#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) + + /* */ + +FT_END_HEADER + +#endif /* __FTINCREM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftlcdfil.h b/contrib/media/updf/include/freetype/ftlcdfil.h new file mode 100644 index 0000000000..0b55ebee65 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftlcdfil.h @@ -0,0 +1,213 @@ +/***************************************************************************/ +/* */ +/* ftlcdfil.h */ +/* */ +/* FreeType API for color filtering of subpixel bitmap glyphs */ +/* (specification). */ +/* */ +/* Copyright 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_LCD_FILTER_H__ +#define __FT_LCD_FILTER_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * lcd_filtering + * + * @title: + * LCD Filtering + * + * @abstract: + * Reduce color fringes of LCD-optimized bitmaps. + * + * @description: + * The @FT_Library_SetLcdFilter API can be used to specify a low-pass + * filter which is then applied to LCD-optimized bitmaps generated + * through @FT_Render_Glyph. This is useful to reduce color fringes + * which would occur with unfiltered rendering. + * + * Note that no filter is active by default, and that this function is + * *not* implemented in default builds of the library. You need to + * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file + * in order to activate it. + */ + + + /**************************************************************************** + * + * @enum: + * FT_LcdFilter + * + * @description: + * A list of values to identify various types of LCD filters. + * + * @values: + * FT_LCD_FILTER_NONE :: + * Do not perform filtering. When used with subpixel rendering, this + * results in sometimes severe color fringes. + * + * FT_LCD_FILTER_DEFAULT :: + * The default filter reduces color fringes considerably, at the cost + * of a slight blurriness in the output. + * + * FT_LCD_FILTER_LIGHT :: + * The light filter is a variant that produces less blurriness at the + * cost of slightly more color fringes than the default one. It might + * be better, depending on taste, your monitor, or your personal vision. + * + * FT_LCD_FILTER_LEGACY :: + * This filter corresponds to the original libXft color filter. It + * provides high contrast output but can exhibit really bad color + * fringes if glyphs are not extremely well hinted to the pixel grid. + * In other words, it only works well if the TrueType bytecode + * interpreter is enabled *and* high-quality hinted fonts are used. + * + * This filter is only provided for comparison purposes, and might be + * disabled or stay unsupported in the future. + * + * @since: + * 2.3.0 + */ + typedef enum FT_LcdFilter_ + { + FT_LCD_FILTER_NONE = 0, + FT_LCD_FILTER_DEFAULT = 1, + FT_LCD_FILTER_LIGHT = 2, + FT_LCD_FILTER_LEGACY = 16, + + FT_LCD_FILTER_MAX /* do not remove */ + + } FT_LcdFilter; + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilter + * + * @description: + * This function is used to apply color filtering to LCD decimated + * bitmaps, like the ones used when calling @FT_Render_Glyph with + * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. + * + * @input: + * library :: + * A handle to the target library instance. + * + * filter :: + * The filter type. + * + * You can use @FT_LCD_FILTER_NONE here to disable this feature, or + * @FT_LCD_FILTER_DEFAULT to use a default filter that should work + * well on most LCD screens. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This feature is always disabled by default. Clients must make an + * explicit call to this function with a `filter' value other than + * @FT_LCD_FILTER_NONE in order to enable it. + * + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, + * @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char. + * + * It does _not_ affect the output of @FT_Outline_Render and + * @FT_Outline_Get_Bitmap. + * + * If this feature is activated, the dimensions of LCD glyph bitmaps are + * either larger or taller than the dimensions of the corresponding + * outline with regards to the pixel grid. For example, for + * @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and + * up to 3~pixels to the right. + * + * The bitmap offset values are adjusted correctly, so clients shouldn't + * need to modify their layout and glyph positioning code when enabling + * the filter. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilter( FT_Library library, + FT_LcdFilter filter ); + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilterWeights + * + * @description: + * Use this function to override the filter weights selected by + * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple + * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10, + * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and + * FT_LCD_FILTER_LEGACY. + * + * @input: + * library :: + * A handle to the target library instance. + * + * weights :: + * A pointer to an array; the function copies the first five bytes and + * uses them to specify the filter weights. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * This function must be called after @FT_Library_SetLcdFilter to have + * any effect. + * + * @since: + * 2.4.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilterWeights( FT_Library library, + unsigned char *weights ); + + /* */ + + +FT_END_HEADER + +#endif /* __FT_LCD_FILTER_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftlist.h b/contrib/media/updf/include/freetype/ftlist.h new file mode 100644 index 0000000000..bb6f7f119d --- /dev/null +++ b/contrib/media/updf/include/freetype/ftlist.h @@ -0,0 +1,277 @@ +/***************************************************************************/ +/* */ +/* ftlist.h */ +/* */ +/* Generic list support for FreeType (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file implements functions relative to list processing. Its */ + /* data structures are defined in `freetype.h'. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTLIST_H__ +#define __FTLIST_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /* <Title> */ + /* List Processing */ + /* */ + /* <Abstract> */ + /* Simple management of lists. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to list */ + /* processing using doubly-linked nodes. */ + /* */ + /* <Order> */ + /* FT_List */ + /* FT_ListNode */ + /* FT_ListRec */ + /* FT_ListNodeRec */ + /* */ + /* FT_List_Add */ + /* FT_List_Insert */ + /* FT_List_Find */ + /* FT_List_Remove */ + /* FT_List_Up */ + /* FT_List_Iterate */ + /* FT_List_Iterator */ + /* FT_List_Finalize */ + /* FT_List_Destructor */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Find */ + /* */ + /* <Description> */ + /* Find the list node for a given listed object. */ + /* */ + /* <Input> */ + /* list :: A pointer to the parent list. */ + /* data :: The address of the listed object. */ + /* */ + /* <Return> */ + /* List node. NULL if it wasn't found. */ + /* */ + FT_EXPORT( FT_ListNode ) + FT_List_Find( FT_List list, + void* data ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Add */ + /* */ + /* <Description> */ + /* Append an element to the end of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to append. */ + /* */ + FT_EXPORT( void ) + FT_List_Add( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Insert */ + /* */ + /* <Description> */ + /* Insert an element at the head of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to parent list. */ + /* node :: The node to insert. */ + /* */ + FT_EXPORT( void ) + FT_List_Insert( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Remove */ + /* */ + /* <Description> */ + /* Remove a node from a list. This function doesn't check whether */ + /* the node is in the list! */ + /* */ + /* <Input> */ + /* node :: The node to remove. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* */ + FT_EXPORT( void ) + FT_List_Remove( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Up */ + /* */ + /* <Description> */ + /* Move a node to the head/top of a list. Used to maintain LRU */ + /* lists. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to move. */ + /* */ + FT_EXPORT( void ) + FT_List_Up( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Iterator */ + /* */ + /* <Description> */ + /* An FT_List iterator function which is called during a list parse */ + /* by @FT_List_Iterate. */ + /* */ + /* <Input> */ + /* node :: The current iteration list node. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. */ + /* Can be used to point to the iteration's state. */ + /* */ + typedef FT_Error + (*FT_List_Iterator)( FT_ListNode node, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Iterate */ + /* */ + /* <Description> */ + /* Parse a list and calls a given iterator function on each element. */ + /* Note that parsing is stopped as soon as one of the iterator calls */ + /* returns a non-zero value. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* iterator :: An iterator function, called on each node of the list. */ + /* user :: A user-supplied field which is passed as the second */ + /* argument to the iterator. */ + /* */ + /* <Return> */ + /* The result (a FreeType error code) of the last iterator call. */ + /* */ + FT_EXPORT( FT_Error ) + FT_List_Iterate( FT_List list, + FT_List_Iterator iterator, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Destructor */ + /* */ + /* <Description> */ + /* An @FT_List iterator function which is called during a list */ + /* finalization by @FT_List_Finalize to destroy all elements in a */ + /* given list. */ + /* */ + /* <Input> */ + /* system :: The current system object. */ + /* */ + /* data :: The current object to destroy. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ + /* be used to point to the iteration's state. */ + /* */ + typedef void + (*FT_List_Destructor)( FT_Memory memory, + void* data, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Finalize */ + /* */ + /* <Description> */ + /* Destroy all elements in the list as well as the list itself. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* */ + /* destroy :: A list destructor that will be applied to each element */ + /* of the list. */ + /* */ + /* memory :: The current memory object which handles deallocation. */ + /* */ + /* user :: A user-supplied field which is passed as the last */ + /* argument to the destructor. */ + /* */ + /* <Note> */ + /* This function expects that all nodes added by @FT_List_Add or */ + /* @FT_List_Insert have been dynamically allocated. */ + /* */ + FT_EXPORT( void ) + FT_List_Finalize( FT_List list, + FT_List_Destructor destroy, + FT_Memory memory, + void* user ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTLIST_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftlzw.h b/contrib/media/updf/include/freetype/ftlzw.h new file mode 100644 index 0000000000..00d40169a7 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftlzw.h @@ -0,0 +1,99 @@ +/***************************************************************************/ +/* */ +/* ftlzw.h */ +/* */ +/* LZW-compressed stream support. */ +/* */ +/* Copyright 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTLZW_H__ +#define __FTLZW_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* lzw */ + /* */ + /* <Title> */ + /* LZW Streams */ + /* */ + /* <Abstract> */ + /* Using LZW-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of LZW-specific functions. */ + /* */ + /*************************************************************************/ + + /************************************************************************ + * + * @function: + * FT_Stream_OpenLZW + * + * @description: + * Open a new stream to parse LZW-compressed font files. This is + * mainly used to support the compressed `*.pcf.Z' fonts that come + * with XFree86. + * + * @input: + * stream :: The target embedding stream. + * + * source :: The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream + * + * In certain builds of the library, LZW compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a LZW stream from it + * and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with LZW support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenLZW( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTLZW_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftmac.h b/contrib/media/updf/include/freetype/ftmac.h new file mode 100644 index 0000000000..ab5bab5170 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftmac.h @@ -0,0 +1,274 @@ +/***************************************************************************/ +/* */ +/* ftmac.h */ +/* */ +/* Additional Mac-specific API. */ +/* */ +/* Copyright 1996-2001, 2004, 2006, 2007 by */ +/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* NOTE: Include this file after <freetype/freetype.h> and after any */ +/* Mac-specific headers (because this header uses Mac types such as */ +/* Handle, FSSpec, FSRef, etc.) */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMAC_H__ +#define __FTMAC_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + +/* gcc-3.4.1 and later can warn about functions tagged as deprecated */ +#ifndef FT_DEPRECATED_ATTRIBUTE +#if defined(__GNUC__) && \ + ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define FT_DEPRECATED_ATTRIBUTE +#endif +#endif + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* mac_specific */ + /* */ + /* <Title> */ + /* Mac Specific Interface */ + /* */ + /* <Abstract> */ + /* Only available on the Macintosh. */ + /* */ + /* <Description> */ + /* The following definitions are only available if FreeType is */ + /* compiled on a Macintosh. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FOND */ + /* */ + /* <Description> */ + /* Create a new face object from a FOND resource. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* fond :: A FOND resource. */ + /* */ + /* face_index :: Only supported for the -1 `sanity check' special */ + /* case. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Notes> */ + /* This function can be used to create @FT_Face objects from fonts */ + /* that are installed in the system as follows. */ + /* */ + /* { */ + /* fond = GetResource( 'FOND', fontName ); */ + /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FOND( FT_Library library, + Handle fond, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font (e.g., Times New Roman */ + /* Bold). */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_ATS_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFilePath_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return a pathname of the disk file and face index for given font */ + /* name which is handled by ATS framework. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* path :: Buffer to store pathname of the file. For passing */ + /* to @FT_New_Face. The client must allocate this */ + /* buffer before calling this function. */ + /* */ + /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ + /* */ + /* face_index :: Index of the face. For passing to @FT_New_Face. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, + UInt8* path, + UInt32 maxPathSize, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSSpec */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSSpec to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSSpec to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ + /* it accepts an FSSpec instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSSpec( FT_Library library, + const FSSpec *spec, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSRef */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSRef to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSRef to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ + /* it accepts an FSRef instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSRef( FT_Library library, + const FSRef *ref, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + /* */ + + +FT_END_HEADER + + +#endif /* __FTMAC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftmm.h b/contrib/media/updf/include/freetype/ftmm.h new file mode 100644 index 0000000000..3aefb9e4f2 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftmm.h @@ -0,0 +1,378 @@ +/***************************************************************************/ +/* */ +/* ftmm.h */ +/* */ +/* FreeType Multiple Master font interface (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMM_H__ +#define __FTMM_H__ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* multiple_masters */ + /* */ + /* <Title> */ + /* Multiple Masters */ + /* */ + /* <Abstract> */ + /* How to manage Multiple Masters fonts. */ + /* */ + /* <Description> */ + /* The following types and functions are used to manage Multiple */ + /* Master fonts, i.e., the selection of specific design instances by */ + /* setting design axis coordinates. */ + /* */ + /* George Williams has extended this interface to make it work with */ + /* both Type~1 Multiple Masters fonts and GX distortable (var) */ + /* fonts. Some of these routines only work with MM fonts, others */ + /* will work with both types. They are similar enough that a */ + /* consistent interface makes sense. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters fonts. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + typedef struct FT_MM_Axis_ + { + FT_String* name; + FT_Long minimum; + FT_Long maximum; + + } FT_MM_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Multi_Master */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* font. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* num_axis :: Number of axes. Cannot exceed~4. */ + /* */ + /* num_designs :: Number of designs; should be normally 2^num_axis */ + /* even though the Type~1 specification strangely */ + /* allows for intermediate designs to be present. This */ + /* number cannot exceed~16. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* */ + typedef struct FT_Multi_Master_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_MM_Axis axis[T1_MAX_MM_AXIS]; + + } FT_Multi_Master; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters and GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* Not always meaningful for GX. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* def :: The axis's default design coordinate. */ + /* FreeType computes meaningful default values for MM; it */ + /* is then an integer value, not in 16.16 format. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + /* tag :: The axis's tag (the GX equivalent to `name'). */ + /* FreeType provides default values for MM if possible. */ + /* */ + /* strid :: The entry in `name' table (another GX version of */ + /* `name'). */ + /* Not meaningful for MM. */ + /* */ + typedef struct FT_Var_Axis_ + { + FT_String* name; + + FT_Fixed minimum; + FT_Fixed def; + FT_Fixed maximum; + + FT_ULong tag; + FT_UInt strid; + + } FT_Var_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Named_Style */ + /* */ + /* <Description> */ + /* A simple structure used to model a named style in a GX var font. */ + /* */ + /* This structure can't be used for MM fonts. */ + /* */ + /* <Fields> */ + /* coords :: The design coordinates for this style. */ + /* This is an array with one entry for each axis. */ + /* */ + /* strid :: The entry in `name' table identifying this style. */ + /* */ + typedef struct FT_Var_Named_Style_ + { + FT_Fixed* coords; + FT_UInt strid; + + } FT_Var_Named_Style; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Var */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* or GX var distortable font. */ + /* */ + /* Some fields are specific to one format and not to the other. */ + /* */ + /* <Fields> */ + /* num_axis :: The number of axes. The maximum value is~4 for */ + /* MM; no limit in GX. */ + /* */ + /* num_designs :: The number of designs; should be normally */ + /* 2^num_axis for MM fonts. Not meaningful for GX */ + /* (where every glyph could have a different */ + /* number of designs). */ + /* */ + /* num_namedstyles :: The number of named styles; only meaningful for */ + /* GX which allows certain design coordinates to */ + /* have a string ID (in the `name' table) */ + /* associated with them. The font can tell the */ + /* user that, for example, Weight=1.5 is `Bold'. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* GX fonts contain slightly more data than MM. */ + /* */ + /* namedstyles :: A table of named styles. */ + /* Only meaningful with GX. */ + /* */ + typedef struct FT_MM_Var_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_UInt num_namedstyles; + FT_Var_Axis* axis; + FT_Var_Named_Style* namedstyle; + + } FT_MM_Var; + + + /* */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Multi_Master */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master descriptor of a given font. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Multi_Master( FT_Face face, + FT_Multi_Master *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_MM_Var */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master/GX var descriptor of a given font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters/GX var descriptor. */ + /* Allocates a data structure, which the user must free */ + /* (a single call to FT_FREE will do it). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_MM_Var( FT_Face face, + FT_MM_Var* *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters fonts, choose an interpolated font design */ + /* through design coordinates. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Master or GX Var fonts, choose an interpolated font */ + /* design through design coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Blend_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters and GX var fonts, choose an interpolated font */ + /* design through normalized blend coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: The design coordinates array (each element must be */ + /* between 0 and 1.0). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Blend_Coordinates */ + /* */ + /* <Description> */ + /* This is another name of @FT_Set_MM_Blend_Coordinates. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTMM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftmodapi.h b/contrib/media/updf/include/freetype/ftmodapi.h new file mode 100644 index 0000000000..8f2e017947 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftmodapi.h @@ -0,0 +1,483 @@ +/***************************************************************************/ +/* */ +/* ftmodapi.h */ +/* */ +/* FreeType modules public interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMODAPI_H__ +#define __FTMODAPI_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /* <Title> */ + /* Module Management */ + /* */ + /* <Abstract> */ + /* How to add, upgrade, and remove modules from FreeType. */ + /* */ + /* <Description> */ + /* The definitions below are used to manage modules within FreeType. */ + /* Modules can be added, upgraded, and removed at runtime. */ + /* */ + /*************************************************************************/ + + + /* module bit flags */ +#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ +#define FT_MODULE_RENDERER 2 /* this module is a renderer */ +#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ +#define FT_MODULE_STYLER 8 /* this module is a styler */ + +#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ + /* scalable fonts */ +#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ + /* support vector outlines */ +#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ + /* own hinter */ + + + /* deprecated values */ +#define ft_module_font_driver FT_MODULE_FONT_DRIVER +#define ft_module_renderer FT_MODULE_RENDERER +#define ft_module_hinter FT_MODULE_HINTER +#define ft_module_styler FT_MODULE_STYLER + +#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE +#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES +#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER + + + typedef FT_Pointer FT_Module_Interface; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Constructor */ + /* */ + /* <Description> */ + /* A function used to initialize (not create) a new module object. */ + /* */ + /* <Input> */ + /* module :: The module to initialize. */ + /* */ + typedef FT_Error + (*FT_Module_Constructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destructor */ + /* */ + /* <Description> */ + /* A function used to finalize (not destroy) a given module object. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + typedef void + (*FT_Module_Destructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Requester */ + /* */ + /* <Description> */ + /* A function used to query a given module for a specific interface. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + /* name :: The name of the interface in the module. */ + /* */ + typedef FT_Module_Interface + (*FT_Module_Requester)( FT_Module module, + const char* name ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Module_Class */ + /* */ + /* <Description> */ + /* The module class descriptor. */ + /* */ + /* <Fields> */ + /* module_flags :: Bit flags describing the module. */ + /* */ + /* module_size :: The size of one module object/instance in */ + /* bytes. */ + /* */ + /* module_name :: The name of the module. */ + /* */ + /* module_version :: The version, as a 16.16 fixed number */ + /* (major.minor). */ + /* */ + /* module_requires :: The version of FreeType this module requires, */ + /* as a 16.16 fixed number (major.minor). Starts */ + /* at version 2.0, i.e., 0x20000. */ + /* */ + /* module_init :: The initializing function. */ + /* */ + /* module_done :: The finalizing function. */ + /* */ + /* get_interface :: The interface requesting function. */ + /* */ + typedef struct FT_Module_Class_ + { + FT_ULong module_flags; + FT_Long module_size; + const FT_String* module_name; + FT_Fixed module_version; + FT_Fixed module_requires; + + const void* module_interface; + + FT_Module_Constructor module_init; + FT_Module_Destructor module_done; + FT_Module_Requester get_interface; + + } FT_Module_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Module */ + /* */ + /* <Description> */ + /* Add a new module to a given library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* clazz :: A pointer to class descriptor for the module. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Add_Module( FT_Library library, + const FT_Module_Class* clazz ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module */ + /* */ + /* <Description> */ + /* Find a module by its name. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module handle. 0~if none was found. */ + /* */ + /* <Note> */ + /* FreeType's internal modules aren't documented very well, and you */ + /* should look up the source code for details. */ + /* */ + FT_EXPORT( FT_Module ) + FT_Get_Module( FT_Library library, + const char* module_name ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Remove_Module */ + /* */ + /* <Description> */ + /* Remove a given module from a library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to a library object. */ + /* */ + /* <Input> */ + /* module :: A handle to a module object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The module object is destroyed by the function in case of success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Remove_Module( FT_Library library, + FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Library */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Library */ + /* structure is created. This function increments the counter. */ + /* @FT_Done_Library then only destroys a library if the counter is~1, */ + /* otherwise it simply decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures which */ + /* reference @FT_Library objects. */ + /* */ + /* <Input> */ + /* library :: A handle to a target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Library( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Library */ + /* */ + /* <Description> */ + /* This function is used to create a new FreeType library instance */ + /* from a given memory object. It is thus possible to use libraries */ + /* with distinct memory allocators within the same program. */ + /* */ + /* Normally, you would call this function (followed by a call to */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ + /* instead of @FT_Init_FreeType to initialize the FreeType library. */ + /* */ + /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ + /* library instance. */ + /* */ + /* <Input> */ + /* memory :: A handle to the original memory object. */ + /* */ + /* <Output> */ + /* alibrary :: A pointer to handle of a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Library( FT_Memory memory, + FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Library */ + /* */ + /* <Description> */ + /* Discard a given library object. This closes all drivers and */ + /* discards all resource objects. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Library( FT_Library library ); + +/* */ + + typedef void + (*FT_DebugHook_Func)( void* arg ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Debug_Hook */ + /* */ + /* <Description> */ + /* Set a debug hook function for debugging the interpreter of a font */ + /* format. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* hook_index :: The index of the debug hook. You should use the */ + /* values defined in `ftobjs.h', e.g., */ + /* `FT_DEBUG_HOOK_TRUETYPE'. */ + /* */ + /* debug_hook :: The function used to debug the interpreter. */ + /* */ + /* <Note> */ + /* Currently, four debug hook slots are available, but only two (for */ + /* the TrueType and the Type~1 interpreter) are defined. */ + /* */ + /* Since the internal headers of FreeType are no longer installed, */ + /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ + /* This is a bug and will be fixed in a forthcoming release. */ + /* */ + FT_EXPORT( void ) + FT_Set_Debug_Hook( FT_Library library, + FT_UInt hook_index, + FT_DebugHook_Func debug_hook ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Default_Modules */ + /* */ + /* <Description> */ + /* Add the set of default drivers to a given library object. */ + /* This is only useful when you create a library object with */ + /* @FT_New_Library (usually to plug a custom memory manager). */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Add_Default_Modules( FT_Library library ); + + + + /************************************************************************** + * + * @section: + * truetype_engine + * + * @title: + * The TrueType Engine + * + * @abstract: + * TrueType bytecode support. + * + * @description: + * This section contains a function used to query the level of TrueType + * bytecode support compiled in this version of the library. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_TrueTypeEngineType + * + * @description: + * A list of values describing which kind of TrueType bytecode + * engine is implemented in a given FT_Library instance. It is used + * by the @FT_Get_TrueType_Engine_Type function. + * + * @values: + * FT_TRUETYPE_ENGINE_TYPE_NONE :: + * The library doesn't implement any kind of bytecode interpreter. + * + * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: + * The library implements a bytecode interpreter that doesn't + * support the patented operations of the TrueType virtual machine. + * + * Its main use is to load certain Asian fonts which position and + * scale glyph components with bytecode instructions. It produces + * bad output for most other fonts. + * + * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: + * The library implements a bytecode interpreter that covers + * the full instruction set of the TrueType virtual machine (this + * was governed by patents until May 2010, hence the name). + * + * @since: + * 2.2 + * + */ + typedef enum FT_TrueTypeEngineType_ + { + FT_TRUETYPE_ENGINE_TYPE_NONE = 0, + FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, + FT_TRUETYPE_ENGINE_TYPE_PATENTED + + } FT_TrueTypeEngineType; + + + /************************************************************************** + * + * @func: + * FT_Get_TrueType_Engine_Type + * + * @description: + * Return an @FT_TrueTypeEngineType value to indicate which level of + * the TrueType virtual machine a given library instance supports. + * + * @input: + * library :: + * A library instance. + * + * @return: + * A value indicating which level is supported. + * + * @since: + * 2.2 + * + */ + FT_EXPORT( FT_TrueTypeEngineType ) + FT_Get_TrueType_Engine_Type( FT_Library library ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTMODAPI_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftmoderr.h b/contrib/media/updf/include/freetype/ftmoderr.h new file mode 100644 index 0000000000..b0115dd0dd --- /dev/null +++ b/contrib/media/updf/include/freetype/ftmoderr.h @@ -0,0 +1,155 @@ +/***************************************************************************/ +/* */ +/* ftmoderr.h */ +/* */ +/* FreeType module error offsets (specification). */ +/* */ +/* Copyright 2001, 2002, 2003, 2004, 2005 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to define the FreeType module error offsets. */ + /* */ + /* The lower byte gives the error code, the higher byte gives the */ + /* module. The base module has error offset 0. For example, the error */ + /* `FT_Err_Invalid_File_Format' has value 0x003, the error */ + /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */ + /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */ + /* */ + /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */ + /* to make the higher byte always zero (disabling the module error */ + /* mechanism). */ + /* */ + /* It can also be used to create a module error message table easily */ + /* with something like */ + /* */ + /* { */ + /* #undef __FTMODERR_H__ */ + /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ + /* #define FT_MODERR_START_LIST { */ + /* #define FT_MODERR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int mod_err_offset; */ + /* const char* mod_err_msg */ + /* } ft_mod_errors[] = */ + /* */ + /* #include FT_MODULE_ERRORS_H */ + /* } */ + /* */ + /* To use such a table, all errors must be ANDed with 0xFF00 to remove */ + /* the error code. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTMODERR_H__ +#define __FTMODERR_H__ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#ifndef FT_MODERRDEF + +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, +#else +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, +#endif + +#define FT_MODERR_START_LIST enum { +#define FT_MODERR_END_LIST FT_Mod_Err_Max }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_MODERRDEF */ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST MODULE ERROR BASES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_MODERR_START_LIST + FT_MODERR_START_LIST +#endif + + + FT_MODERRDEF( Base, 0x000, "base module" ) + FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) + FT_MODERRDEF( BDF, 0x200, "BDF module" ) + FT_MODERRDEF( Cache, 0x300, "cache module" ) + FT_MODERRDEF( CFF, 0x400, "CFF module" ) + FT_MODERRDEF( CID, 0x500, "CID module" ) + FT_MODERRDEF( Gzip, 0x600, "Gzip module" ) + FT_MODERRDEF( LZW, 0x700, "LZW module" ) + FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" ) + FT_MODERRDEF( PCF, 0x900, "PCF module" ) + FT_MODERRDEF( PFR, 0xA00, "PFR module" ) + FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" ) + FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" ) + FT_MODERRDEF( PSnames, 0xD00, "PS names module" ) + FT_MODERRDEF( Raster, 0xE00, "raster module" ) + FT_MODERRDEF( SFNT, 0xF00, "SFNT module" ) + FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" ) + FT_MODERRDEF( TrueType, 0x1100, "TrueType module" ) + FT_MODERRDEF( Type1, 0x1200, "Type 1 module" ) + FT_MODERRDEF( Type42, 0x1300, "Type 42 module" ) + FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" ) + + +#ifdef FT_MODERR_END_LIST + FT_MODERR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_MODERR_START_LIST +#undef FT_MODERR_END_LIST +#undef FT_MODERRDEF +#undef FT_NEED_EXTERN_C + + +#endif /* __FTMODERR_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftnameid.h b/contrib/media/updf/include/freetype/ftnameid.h new file mode 100755 index 0000000000..5d51234b8c --- /dev/null +++ b/contrib/media/updf/include/freetype/ftnameid.h @@ -0,0 +1,628 @@ +/******************************************************************* + * + * ftnameid.h + * + * TrueType Name ID definitions + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ + +#ifndef FREETYPE_H +#error "Don't include this file! Use freetype.h instead." +#endif + +#ifndef FTNAMEID_H +#define FTNAMEID_H + +/* + * possible values for the 'Platform' identifier code in the name + * records of the TTF "name" table + */ + +#define TT_PLATFORM_APPLE_UNICODE 0 +#define TT_PLATFORM_MACINTOSH 1 +#define TT_PLATFORM_ISO 2 +#define TT_PLATFORM_MICROSOFT 3 + + +/* + * possible values of the platform specific encoding identifier field in + * the name records of the TTF "name" table when the 'Platform' identifier + * code is TT_PLATFORM_APPLE_UNICODE + */ + +#define TT_APPLE_ID_DEFAULT 0 +#define TT_APPLE_ID_UNICODE_1_1 1 +#define TT_APPLE_ID_ISO_10646 2 +#define TT_APPLE_ID_UNICODE_2_0 3 + + +/* + * possible values of the platform specific encoding identifier field in + * the name records of the TTF "name" table when the 'Platform' identifier + * code is TT_PLATFORM_MACINTOSH + */ + +#define TT_MAC_ID_ROMAN 0 +#define TT_MAC_ID_JAPANESE 1 +#define TT_MAC_ID_TRADITIONAL_CHINESE 2 +#define TT_MAC_ID_KOREAN 3 +#define TT_MAC_ID_ARABIC 4 +#define TT_MAC_ID_HEBREW 5 +#define TT_MAC_ID_GREEK 6 +#define TT_MAC_ID_RUSSIAN 7 +#define TT_MAC_ID_RSYMBOL 8 +#define TT_MAC_ID_DEVANAGARI 9 +#define TT_MAC_ID_GURMUKHI 10 +#define TT_MAC_ID_GUJARATI 11 +#define TT_MAC_ID_ORIYA 12 +#define TT_MAC_ID_BENGALI 13 +#define TT_MAC_ID_TAMIL 14 +#define TT_MAC_ID_TELUGU 15 +#define TT_MAC_ID_KANNADA 16 +#define TT_MAC_ID_MALAYALAM 17 +#define TT_MAC_ID_SINHALESE 18 +#define TT_MAC_ID_BURMESE 19 +#define TT_MAC_ID_KHMER 20 +#define TT_MAC_ID_THAI 21 +#define TT_MAC_ID_LAOTIAN 22 +#define TT_MAC_ID_GEORGIAN 23 +#define TT_MAC_ID_ARMENIAN 24 +#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 +#define TT_MAC_ID_TIBETAN 26 +#define TT_MAC_ID_MONGOLIAN 27 +#define TT_MAC_ID_GEEZ 28 +#define TT_MAC_ID_SLAVIC 29 +#define TT_MAC_ID_VIETNAMESE 30 +#define TT_MAC_ID_SINDHI 31 +#define TT_MAC_ID_UNINTERP 32 + + +/* + * possible values of the platform specific encoding identifier field in + * the name records of the TTF "name" table when the 'Platform' identifier + * code is TT_PLATFORM_ISO + */ + +#define TT_ISO_ID_7BIT_ASCII 0 +#define TT_ISO_ID_10646 1 +#define TT_ISO_ID_8859_1 2 + + +/* + * possible values of the platform specific encoding identifier field in + * the name records of the TTF "name" table when the 'Platform' identifier + * code is TT_PLATFORM_MICROSOFT + */ + +#define TT_MS_ID_SYMBOL_CS 0 +#define TT_MS_ID_UNICODE_CS 1 +#define TT_MS_ID_SJIS 2 +#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_BIG_5 4 +#define TT_MS_ID_WANSUNG 5 +#define TT_MS_ID_JOHAB 6 + + + +/* + * possible values of the language identifier field in the name records of + * the TTF "name" table when the 'Platform' identifier code is + * TT_PLATFORM_MACINTOSH + * + * the canonical source for the Apple assigned Language ID's is at + * http://fonts.apple.com/TTRefMan/RM06/Chap6name.html + */ + +#define TT_MAC_LANGID_ENGLISH 0 +#define TT_MAC_LANGID_FRENCH 1 +#define TT_MAC_LANGID_GERMAN 2 +#define TT_MAC_LANGID_ITALIAN 3 +#define TT_MAC_LANGID_DUTCH 4 +#define TT_MAC_LANGID_SWEDISH 5 +#define TT_MAC_LANGID_SPANISH 6 +#define TT_MAC_LANGID_DANISH 7 +#define TT_MAC_LANGID_PORTUGUESE 8 +#define TT_MAC_LANGID_NORWEGIAN 9 +#define TT_MAC_LANGID_HEBREW 10 +#define TT_MAC_LANGID_JAPANESE 11 +#define TT_MAC_LANGID_ARABIC 12 +#define TT_MAC_LANGID_FINNISH 13 +#define TT_MAC_LANGID_GREEK 14 +#define TT_MAC_LANGID_ICELANDIC 15 +#define TT_MAC_LANGID_MALTESE 16 +#define TT_MAC_LANGID_TURKISH 17 +#define TT_MAC_LANGID_CROATIAN 18 +#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 +#define TT_MAC_LANGID_URDU 20 +#define TT_MAC_LANGID_HINDI 21 +#define TT_MAC_LANGID_THAI 22 +#define TT_MAC_LANGID_KOREAN 23 +#define TT_MAC_LANGID_LITHUANIAN 24 +#define TT_MAC_LANGID_POLISH 25 +#define TT_MAC_LANGID_HUNGARIAN 26 +#define TT_MAC_LANGID_ESTONIAN 27 +#define TT_MAC_LANGID_LETTISH 28 +#define TT_MAC_LANGID_SAAMISK 29 +#define TT_MAC_LANGID_FAEROESE 30 +#define TT_MAC_LANGID_FARSI 31 +#define TT_MAC_LANGID_RUSSIAN 32 +#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 +#define TT_MAC_LANGID_FLEMISH 34 +#define TT_MAC_LANGID_IRISH 35 +#define TT_MAC_LANGID_ALBANIAN 36 +#define TT_MAC_LANGID_ROMANIAN 37 +#define TT_MAC_LANGID_CZECH 38 +#define TT_MAC_LANGID_SLOVAK 39 +#define TT_MAC_LANGID_SLOVENIAN 40 +#define TT_MAC_LANGID_YIDDISH 41 +#define TT_MAC_LANGID_SERBIAN 42 +#define TT_MAC_LANGID_MACEDONIAN 43 +#define TT_MAC_LANGID_BULGARIAN 44 +#define TT_MAC_LANGID_UKRAINIAN 45 +#define TT_MAC_LANGID_BYELORUSSIAN 46 +#define TT_MAC_LANGID_UZBEK 47 +#define TT_MAC_LANGID_KAZAKH 48 +#define TT_MAC_LANGID_AZERBAIJANI 49 +#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 +#define TT_MAC_LANGID_ARMENIAN 51 +#define TT_MAC_LANGID_GEORGIAN 52 +#define TT_MAC_LANGID_MOLDAVIAN 53 +#define TT_MAC_LANGID_KIRGHIZ 54 +#define TT_MAC_LANGID_TAJIKI 55 +#define TT_MAC_LANGID_TURKMEN 56 +#define TT_MAC_LANGID_MONGOLIAN 57 +#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 +#define TT_MAC_LANGID_PASHTO 59 +#define TT_MAC_LANGID_KURDISH 60 +#define TT_MAC_LANGID_KASHMIRI 61 +#define TT_MAC_LANGID_SINDHI 62 +#define TT_MAC_LANGID_TIBETAN 63 +#define TT_MAC_LANGID_NEPALI 64 +#define TT_MAC_LANGID_SANSKRIT 65 +#define TT_MAC_LANGID_MARATHI 66 +#define TT_MAC_LANGID_BENGALI 67 +#define TT_MAC_LANGID_ASSAMESE 68 +#define TT_MAC_LANGID_GUJARATI 69 +#define TT_MAC_LANGID_PUNJABI 70 +#define TT_MAC_LANGID_ORIYA 71 +#define TT_MAC_LANGID_MALAYALAM 72 +#define TT_MAC_LANGID_KANNADA 73 +#define TT_MAC_LANGID_TAMIL 74 +#define TT_MAC_LANGID_TELUGU 75 +#define TT_MAC_LANGID_SINHALESE 76 +#define TT_MAC_LANGID_BURMESE 77 +#define TT_MAC_LANGID_KHMER 78 +#define TT_MAC_LANGID_LAO 79 +#define TT_MAC_LANGID_VIETNAMESE 80 +#define TT_MAC_LANGID_INDONESIAN 81 +#define TT_MAC_LANGID_TAGALOG 82 +#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 +#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 +#define TT_MAC_LANGID_AMHARIC 85 +#define TT_MAC_LANGID_TIGRINYA 86 +#define TT_MAC_LANGID_GALLA 87 +#define TT_MAC_LANGID_SOMALI 88 +#define TT_MAC_LANGID_SWAHILI 89 +#define TT_MAC_LANGID_RUANDA 90 +#define TT_MAC_LANGID_RUNDI 91 +#define TT_MAC_LANGID_CHEWA 92 +#define TT_MAC_LANGID_MALAGASY 93 +#define TT_MAC_LANGID_ESPERANTO 94 +#define TT_MAC_LANGID_WELSH 128 +#define TT_MAC_LANGID_BASQUE 129 +#define TT_MAC_LANGID_CATALAN 130 +#define TT_MAC_LANGID_LATIN 131 +#define TT_MAC_LANGID_QUECHUA 132 +#define TT_MAC_LANGID_GUARANI 133 +#define TT_MAC_LANGID_AYMARA 134 +#define TT_MAC_LANGID_TATAR 135 +#define TT_MAC_LANGID_UIGHUR 136 +#define TT_MAC_LANGID_DZONGKHA 137 +#define TT_MAC_LANGID_JAVANESE 138 +#define TT_MAC_LANGID_SUNDANESE 139 +#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 +#define TT_MAC_LANGID_IRISH_GAELIC 141 +#define TT_MAC_LANGID_BRETON 142 +#define TT_MAC_LANGID_INUKTITUT 143 + + +/* + * possible values of the language identifier field in the name records of + * the TTF "name" table when the 'Platform' identifier code is + * TT_PLATFORM_MICROSOFT + * + * the canonical source for the MS assigned LCID's is at + * http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt + */ + +#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 +#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 +#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 +#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 +#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 +#define TT_MS_LANGID_ARABIC_OMAN 0x2001 +#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 +#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 +#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 +#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 +#define TT_MS_LANGID_ARABIC_UAE 0x3801 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 +#define TT_MS_LANGID_ARABIC_QATAR 0x4001 +#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 +#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 +#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 +#define TT_MS_LANGID_CHINESE_PRC 0x0804 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 +#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 +#define TT_MS_LANGID_CHINESE_MACAU 0x1404 +#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 +#define TT_MS_LANGID_DANISH_DENMARK 0x0406 +#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 +#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 +#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GREEK_GREECE 0x0408 +#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 +#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 +#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 +#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 +#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 +#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 +#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 +#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 +#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a +#define TT_MS_LANGID_SPANISH_MEXICO 0x080a +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a +#define TT_MS_LANGID_SPANISH_PANAMA 0x180a +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a +#define TT_MS_LANGID_SPANISH_PERU 0x280a +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a +#define TT_MS_LANGID_SPANISH_CHILE 0x340a +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a +#define TT_MS_LANGID_FINNISH_FINLAND 0x040b +#define TT_MS_LANGID_FRENCH_FRANCE 0x040c +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c +#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c +#define TT_MS_LANGID_FRENCH_MONACO 0x180c +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f +#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 +#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 +#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 +#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 +#define TT_MS_LANGID_POLISH_POLAND 0x0415 +#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 +#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d +#define TT_MS_LANGID_THAI_THAILAND 0x041e +#define TT_MS_LANGID_TURKISH_TURKEY 0x041f +#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 +#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 +#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 +#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 +#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 +#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 +#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0428 +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c +#define TT_MS_LANGID_BASQUE_SPAIN 0x042d +#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 +#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 +#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 +#define TT_MS_LANGID_HINDI_INDIA 0x0439 +#define TT_MS_LANGID_MALTESE_MALTA 0x043a +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e +#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f +#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 +#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_BENGALI_INDIA 0x0445 +#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 +#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 +#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_TAMIL_INDIA 0x0449 +#define TT_MS_LANGID_TELUGU_INDIA 0x044a +#define TT_MS_LANGID_KANNADA_INDIA 0x044b +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d +#define TT_MS_LANGID_MARATHI_INDIA 0x044e +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f +#define TT_MS_LANGID_KONKANI_INDIA 0x0457 + + +/* + * possible values of the 'Name' identifier field in the name records of + * the TTF "name" table. These values are platform independent. + */ + +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 +/* the following values are from the OpenType spec */ +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 +/* number 15 is reserved */ +#define TT_NAME_ID_PREFERRED_FAMILY 16 +#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 + + +/* + * Bit Mask values for the Unicode Ranges from the TTF "OS2 " table. + */ + +/* General Scripts Area */ + +/* Bit 0 C0 Controls and Basic Latin */ +#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0000-U+007F */ +/* Bit 1 C1 Controls and Latin-1 Supplement */ +#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ +/* Bit 2 Latin Extended-A */ +#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ +/* Bit 3 Latin Extended-B */ +#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ +/* Bit 4 IPA Extensions */ +#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ +/* Bit 5 Spacing Modifier Letters */ +#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ +/* Bit 6 Combining Diacritical Marks */ +#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ +/* Bit 7 Greek */ +#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ +/* Bit 8 is reserved (was: Greek Symbols and Coptic) */ +/* Bit 9 Cyrillic */ +#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ +/* Bit 10 Armenian */ +#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ +/* Bit 11 Hebrew */ +#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ +/* Bit 12 is reserved (was: Hebrew Extended) */ +/* Bit 13 Arabic */ +#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ +/* Bit 14 is reserved (was: Arabic Extended) */ +/* Bit 15 Devanagari */ +#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ +/* Bit 16 Bengali */ +#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ +/* Bit 17 Gurmukhi */ +#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ +/* Bit 18 Gujarati */ +#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ +/* Bit 19 Oriya */ +#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ +/* Bit 20 Tamil */ +#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ +/* Bit 21 Telugu */ +#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ +/* Bit 22 Kannada */ +#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ +/* Bit 23 Malayalam */ +#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ +/* Bit 24 Thai */ +#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ +/* Bit 25 Lao */ +#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ +/* Bit 26 Georgian */ +#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ +/* Bit 27 is reserved (was Georgian Extended) */ +/* Bit 28 Hangul Jamo */ +#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ +/* Bit 29 Latin Extended Additional */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ +/* Bit 30 Greek Extended */ +#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ + +/* Symbols Area */ + +/* Bit 31 General Punctuation */ +#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ +/* Bit 32 Superscripts And Subscripts */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ +/* Bit 33 Currency Symbols */ +#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ +/* Bit 34 Combining Diacritical Marks For Symbols */ +#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ +/* Bit 35 Letterlike Symbols */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ +/* Bit 36 Number Forms */ +#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ +/* Bit 37 Arrows */ +#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ +/* Bit 38 Mathematical Operators */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ +/* Bit 39 Miscellaneous Technical */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ +/* Bit 40 Control Pictures */ +#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ +/* Bit 41 Optical Character Recognition */ +#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ +/* Bit 42 Enclosed Alphanumerics */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ +/* Bit 43 Box Drawing */ +#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ +/* Bit 44 Block Elements */ +#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ +/* Bit 45 Geometric Shapes */ +#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ +/* Bit 46 Miscellaneous Symbols */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ +/* Bit 47 Dingbats */ +#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ + +/* CJK Phonetics and Symbols Area */ + +/* Bit 48 CJK Symbols And Punctuation */ +#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ +/* Bit 49 Hiragana */ +#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ +/* Bit 50 Katakana */ +#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ +/* Bit 51 Bopomofo */ +#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ +/* Bit 52 Hangul Compatibility Jamo */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ +/* Bit 53 CJK Miscellaneous */ +#define TT_UCR_CJK_MISC (1L << 21) /* U+3190-U+319F */ +/* Bit 54 Enclosed CJK Letters And Months */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ +/* Bit 55 CJK Compatibility */ +#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ + +/* Hangul Syllables Area */ + +/* Bit 56 Hangul */ +#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ + +/* Surrogates Area */ + +/* Bit 57 Surrogates */ +#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DFFF */ +/* Bit 58 is reserved for Unicode SubRanges */ + +/* CJK Ideographs Area */ + +/* Bit 59 CJK Unified Ideographs */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ + +/* Private Use Area */ + +/* Bit 60 Private Use */ +#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ + +/* Compatibility Area and Specials */ + +/* Bit 61 CJK Compatibility Ideographs */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */ +/* Bit 62 Alphabetic Presentation Forms */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ +/* Bit 63 Arabic Presentation Forms-A */ +#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FSFF */ +/* Bit 64 Combining Half Marks */ +#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ +/* Bit 65 CJK Compatibility Forms */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE30-U+FE4F */ +/* Bit 66 Small Form Variants */ +#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ +/* Bit 67 Arabic Presentation Forms-B */ +#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFF */ +/* Bit 68 Halfwidth And Fullwidth Forms */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ +/* Bit 69 Specials */ +#define TT_UCR_SPECIALS (1L << 5) /* U+FEFF, + U+FFF0-U+FFFF */ +/* Bit 70 Tibetan */ +#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FBF */ + + +/* Some compilers have a very limited length of identifiers. */ +#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) +#define HAVE_LIMIT_ON_IDENTS +#endif + +#ifndef HAVE_LIMIT_ON_IDENTS + +/* + * Here some alias #defines in order to be clearer. + * + * These are not always #defined to stay within the 31 character limit + * which some compilers have. + * + * Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern + * Borland compilers (read: from BC++ 3.1 on) can increase this limit. + * If you get a warning with such a compiler, use the -i40 switch. + */ + +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ + TT_UCR_ARABIC_PRESENTATIONS_A +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ + TT_UCR_ARABIC_PRESENTATIONS_B + +#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ + TT_UCR_COMBINING_DIACRITICS +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + TT_UCR_COMBINING_DIACRITICS_SYMB + +#endif /* ndef HAVE_LIMIT_ON_IDENTS */ + +#endif /* FTNAMEID_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftotval.h b/contrib/media/updf/include/freetype/ftotval.h new file mode 100644 index 0000000000..027f2e8865 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftotval.h @@ -0,0 +1,203 @@ +/***************************************************************************/ +/* */ +/* ftotval.h */ +/* */ +/* FreeType API for validating OpenType tables (specification). */ +/* */ +/* Copyright 2004, 2005, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* */ +/* Warning: This module might be moved to a different library in the */ +/* future to avoid a tight dependency between FreeType and the */ +/* OpenType specification. */ +/* */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOTVAL_H__ +#define __FTOTVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* ot_validation */ + /* */ + /* <Title> */ + /* OpenType Validation */ + /* */ + /* <Abstract> */ + /* An API to validate OpenType tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_OTXXX + * + * @description: + * A list of bit-field constants used with @FT_OpenType_Validate to + * indicate which OpenType tables should be validated. + * + * @values: + * FT_VALIDATE_BASE :: + * Validate BASE table. + * + * FT_VALIDATE_GDEF :: + * Validate GDEF table. + * + * FT_VALIDATE_GPOS :: + * Validate GPOS table. + * + * FT_VALIDATE_GSUB :: + * Validate GSUB table. + * + * FT_VALIDATE_JSTF :: + * Validate JSTF table. + * + * FT_VALIDATE_MATH :: + * Validate MATH table. + * + * FT_VALIDATE_OT :: + * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). + * + */ +#define FT_VALIDATE_BASE 0x0100 +#define FT_VALIDATE_GDEF 0x0200 +#define FT_VALIDATE_GPOS 0x0400 +#define FT_VALIDATE_GSUB 0x0800 +#define FT_VALIDATE_JSTF 0x1000 +#define FT_VALIDATE_MATH 0x2000 + +#define FT_VALIDATE_OT FT_VALIDATE_BASE | \ + FT_VALIDATE_GDEF | \ + FT_VALIDATE_GPOS | \ + FT_VALIDATE_GSUB | \ + FT_VALIDATE_JSTF | \ + FT_VALIDATE_MATH + + /* */ + + /********************************************************************** + * + * @function: + * FT_OpenType_Validate + * + * @description: + * Validate various OpenType tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the tables to be validated. See + * @FT_VALIDATE_OTXXX for possible values. + * + * @output: + * BASE_table :: + * A pointer to the BASE table. + * + * GDEF_table :: + * A pointer to the GDEF table. + * + * GPOS_table :: + * A pointer to the GPOS table. + * + * GSUB_table :: + * A pointer to the GSUB table. + * + * JSTF_table :: + * A pointer to the JSTF table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with OpenType fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the five tables with + * @FT_OpenType_Free. A NULL value indicates that the table either + * doesn't exist in the font, or the application hasn't asked for + * validation. + */ + FT_EXPORT( FT_Error ) + FT_OpenType_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *BASE_table, + FT_Bytes *GDEF_table, + FT_Bytes *GPOS_table, + FT_Bytes *GSUB_table, + FT_Bytes *JSTF_table ); + + /* */ + + /********************************************************************** + * + * @function: + * FT_OpenType_Free + * + * @description: + * Free the buffer allocated by OpenType validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_OpenType_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_OpenType_Validate only. + */ + FT_EXPORT( void ) + FT_OpenType_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTOTVAL_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftoutln.h b/contrib/media/updf/include/freetype/ftoutln.h new file mode 100644 index 0000000000..2829a05ca3 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftoutln.h @@ -0,0 +1,537 @@ +/***************************************************************************/ +/* */ +/* ftoutln.h */ +/* */ +/* Support for the FT_Outline type used to store glyph shapes of */ +/* most scalable font formats (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOUTLN_H__ +#define __FTOUTLN_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /* <Title> */ + /* Outline Processing */ + /* */ + /* <Abstract> */ + /* Functions to create, transform, and render vectorial glyph images. */ + /* */ + /* <Description> */ + /* This section contains routines used to create and destroy scalable */ + /* glyph images known as `outlines'. These can also be measured, */ + /* transformed, and converted into bitmaps and pixmaps. */ + /* */ + /* <Order> */ + /* FT_Outline */ + /* FT_OUTLINE_FLAGS */ + /* FT_Outline_New */ + /* FT_Outline_Done */ + /* FT_Outline_Copy */ + /* FT_Outline_Translate */ + /* FT_Outline_Transform */ + /* FT_Outline_Embolden */ + /* FT_Outline_Reverse */ + /* FT_Outline_Check */ + /* */ + /* FT_Outline_Get_CBox */ + /* FT_Outline_Get_BBox */ + /* */ + /* FT_Outline_Get_Bitmap */ + /* FT_Outline_Render */ + /* */ + /* FT_Outline_Decompose */ + /* FT_Outline_Funcs */ + /* FT_Outline_MoveTo_Func */ + /* FT_Outline_LineTo_Func */ + /* FT_Outline_ConicTo_Func */ + /* FT_Outline_CubicTo_Func */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Decompose */ + /* */ + /* <Description> */ + /* Walk over an outline's structure to decompose it into individual */ + /* segments and Bézier arcs. This function also emits `move to' */ + /* operations to indicate the start of new contours in the outline. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source target. */ + /* */ + /* func_interface :: A table of `emitters', i.e., function pointers */ + /* called during decomposition to indicate path */ + /* operations. */ + /* */ + /* <InOut> */ + /* user :: A typeless pointer which is passed to each */ + /* emitter during the decomposition. It can be */ + /* used to store the state during the */ + /* decomposition. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Decompose( FT_Outline* outline, + const FT_Outline_Funcs* func_interface, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_New */ + /* */ + /* <Description> */ + /* Create a new outline of a given size. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object from where the */ + /* outline is allocated. Note however that the new */ + /* outline will *not* necessarily be *freed*, when */ + /* destroying the library, by @FT_Done_FreeType. */ + /* */ + /* numPoints :: The maximal number of points within the outline. */ + /* */ + /* numContours :: The maximal number of contours within the outline. */ + /* */ + /* <Output> */ + /* anoutline :: A handle to the new outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' parameter is simply */ + /* to use the library's memory allocator. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_New_Internal( FT_Memory memory, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Done */ + /* */ + /* <Description> */ + /* Destroy an outline created with @FT_Outline_New. */ + /* */ + /* <Input> */ + /* library :: A handle of the library object used to allocate the */ + /* outline. */ + /* */ + /* outline :: A pointer to the outline object to be discarded. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the outline's `owner' field is not set, only the outline */ + /* descriptor will be released. */ + /* */ + /* The reason why this function takes an `library' parameter is */ + /* simply to use ft_mem_free(). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_Done_Internal( FT_Memory memory, + FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Check */ + /* */ + /* <Description> */ + /* Check the contents of an outline descriptor. */ + /* */ + /* <Input> */ + /* outline :: A handle to a source outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Check( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_CBox */ + /* */ + /* <Description> */ + /* Return an outline's `control box'. The control box encloses all */ + /* the outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* which contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <Output> */ + /* acbox :: The outline's control box. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Translate */ + /* */ + /* <Description> */ + /* Apply a simple translation to the points of an outline. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* xOffset :: The horizontal offset. */ + /* */ + /* yOffset :: The vertical offset. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Translate( const FT_Outline* outline, + FT_Pos xOffset, + FT_Pos yOffset ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Copy */ + /* */ + /* <Description> */ + /* Copy an outline into another one. Both objects must have the */ + /* same sizes (number of points & number of contours) when this */ + /* function is called. */ + /* */ + /* <Input> */ + /* source :: A handle to the source outline. */ + /* */ + /* <Output> */ + /* target :: A handle to the target outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Transform */ + /* */ + /* <Description> */ + /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ + /* for applying rotations, slanting, flipping, etc. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation matrix. */ + /* */ + /* <Note> */ + /* You can use @FT_Outline_Translate if you need to translate the */ + /* outline's points. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Transform( const FT_Outline* outline, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Embolden */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be at most 4~times */ + /* `strength' pixels wider and higher. You may think of the left and */ + /* bottom borders as unchanged. */ + /* */ + /* Negative `strength' values to reduce the outline thickness are */ + /* possible also. */ + /* */ + /* <InOut> */ + /* outline :: A handle to the target outline. */ + /* */ + /* <Input> */ + /* strength :: How strong the glyph is emboldened. Expressed in */ + /* 26.6 pixel format. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The used algorithm to increase or decrease the thickness of the */ + /* glyph doesn't change the number of points; this means that certain */ + /* situations like acute angles or intersections are sometimes */ + /* handled incorrectly. */ + /* */ + /* If you need `better' metrics values you should call */ + /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */ + /* */ + /* Example call: */ + /* */ + /* { */ + /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ + /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */ + /* FT_Outline_Embolden( &face->slot->outline, strength ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Embolden( FT_Outline* outline, + FT_Pos strength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Reverse */ + /* */ + /* <Description> */ + /* Reverse the drawing direction of an outline. This is used to */ + /* ensure consistent fill conventions for mirrored glyphs. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Note> */ + /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ + /* the outline's `flags' field. */ + /* */ + /* It shouldn't be used by a normal client application, unless it */ + /* knows what it is doing. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Reverse( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_Bitmap */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap. The outline's image is simply */ + /* OR-ed to the target bitmap. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the target bitmap descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does NOT CREATE the bitmap, it only renders an */ + /* outline image within the one you pass to it! Consequently, the */ + /* various fields in `abitmap' should be set accordingly. */ + /* */ + /* It will use the raster corresponding to the default glyph format. */ + /* */ + /* The value of the `num_grays' field in `abitmap' is ignored. If */ + /* you select the gray-level rasterizer, and you want less than 256 */ + /* gray levels, you have to use @FT_Outline_Render directly. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Render */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap using the current scan-convert. */ + /* This function uses an @FT_Raster_Params structure as an argument, */ + /* allowing advanced features like direct composition, translucency, */ + /* etc. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* describe the rendering operation. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should know what you are doing and how @FT_Raster_Params works */ + /* to use this function. */ + /* */ + /* The field `params.source' will be set to `outline' before the scan */ + /* converter is called, which means that the value you give to it is */ + /* actually ignored. */ + /* */ + /* The gray-level rasterizer always uses 256 gray levels. If you */ + /* want less gray levels, you have to provide your own span callback. */ + /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ + /* @FT_Raster_Params structure for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Render( FT_Library library, + FT_Outline* outline, + FT_Raster_Params* params ); + + + /************************************************************************** + * + * @enum: + * FT_Orientation + * + * @description: + * A list of values used to describe an outline's contour orientation. + * + * The TrueType and PostScript specifications use different conventions + * to determine whether outline contours should be filled or unfilled. + * + * @values: + * FT_ORIENTATION_TRUETYPE :: + * According to the TrueType specification, clockwise contours must + * be filled, and counter-clockwise ones must be unfilled. + * + * FT_ORIENTATION_POSTSCRIPT :: + * According to the PostScript specification, counter-clockwise contours + * must be filled, and clockwise ones must be unfilled. + * + * FT_ORIENTATION_FILL_RIGHT :: + * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to + * remember that in TrueType, everything that is to the right of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_FILL_LEFT :: + * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to + * remember that in PostScript, everything that is to the left of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_NONE :: + * The orientation cannot be determined. That is, different parts of + * the glyph have different orientation. + * + */ + typedef enum FT_Orientation_ + { + FT_ORIENTATION_TRUETYPE = 0, + FT_ORIENTATION_POSTSCRIPT = 1, + FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, + FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, + FT_ORIENTATION_NONE + + } FT_Orientation; + + + /************************************************************************** + * + * @function: + * FT_Outline_Get_Orientation + * + * @description: + * This function analyzes a glyph outline and tries to compute its + * fill orientation (see @FT_Orientation). This is done by computing + * the direction of each global horizontal and/or vertical extrema + * within the outline. + * + * Note that this will return @FT_ORIENTATION_TRUETYPE for empty + * outlines. + * + * @input: + * outline :: + * A handle to the source outline. + * + * @return: + * The orientation. + * + */ + FT_EXPORT( FT_Orientation ) + FT_Outline_Get_Orientation( FT_Outline* outline ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTOUTLN_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftpfr.h b/contrib/media/updf/include/freetype/ftpfr.h new file mode 100644 index 0000000000..0b7b7d427c --- /dev/null +++ b/contrib/media/updf/include/freetype/ftpfr.h @@ -0,0 +1,172 @@ +/***************************************************************************/ +/* */ +/* ftpfr.h */ +/* */ +/* FreeType API for accessing PFR-specific data (specification only). */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTPFR_H__ +#define __FTPFR_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* pfr_fonts */ + /* */ + /* <Title> */ + /* PFR Fonts */ + /* */ + /* <Abstract> */ + /* PFR/TrueDoc specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of PFR-specific functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Metrics + * + * @description: + * Return the outline and metrics resolutions of a given PFR face. + * + * @input: + * face :: Handle to the input face. It can be a non-PFR face. + * + * @output: + * aoutline_resolution :: + * Outline resolution. This is equivalent to `face->units_per_EM' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_resolution :: + * Metrics resolution. This is equivalent to `outline_resolution' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_x_scale :: + * A 16.16 fixed-point number used to scale distance expressed + * in metrics units to device sub-pixels. This is equivalent to + * `face->size->x_scale', but for metrics only. Optional (parameter + * can be NULL). + * + * ametrics_y_scale :: + * Same as `ametrics_x_scale' but for the vertical direction. + * optional (parameter can be NULL). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If the input face is not a PFR, this function will return an error. + * However, in all cases, it will return valid values. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Metrics( FT_Face face, + FT_UInt *aoutline_resolution, + FT_UInt *ametrics_resolution, + FT_Fixed *ametrics_x_scale, + FT_Fixed *ametrics_y_scale ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Kerning + * + * @description: + * Return the kerning pair corresponding to two glyphs in a PFR face. + * The distance is expressed in metrics units, unlike the result of + * @FT_Get_Kerning. + * + * @input: + * face :: A handle to the input face. + * + * left :: Index of the left glyph. + * + * right :: Index of the right glyph. + * + * @output: + * avector :: A kerning vector. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function always return distances in original PFR metrics + * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED + * mode, which always returns distances converted to outline units. + * + * You can use the value of the `x_scale' and `y_scale' parameters + * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Kerning( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Advance + * + * @description: + * Return a given glyph advance, expressed in original metrics units, + * from a PFR font. + * + * @input: + * face :: A handle to the input face. + * + * gindex :: The glyph index. + * + * @output: + * aadvance :: The glyph advance in metrics units. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics + * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Advance( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTPFR_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftrender.h b/contrib/media/updf/include/freetype/ftrender.h new file mode 100644 index 0000000000..e06a8142e6 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftrender.h @@ -0,0 +1,230 @@ +/***************************************************************************/ +/* */ +/* ftrender.h */ +/* */ +/* FreeType renderer modules public interface (specification). */ +/* */ +/* Copyright 1996-2001, 2005, 2006, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTRENDER_H__ +#define __FTRENDER_H__ + + +#include <ft2build.h> +#include FT_MODULE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + + /* create a new glyph object */ + typedef FT_Error + (*FT_Glyph_InitFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + + /* destroys a given glyph object */ + typedef void + (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); + + typedef void + (*FT_Glyph_TransformFunc)( FT_Glyph glyph, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + typedef void + (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, + FT_BBox* abbox ); + + typedef FT_Error + (*FT_Glyph_CopyFunc)( FT_Glyph source, + FT_Glyph target ); + + typedef FT_Error + (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + +/* deprecated */ +#define FT_Glyph_Init_Func FT_Glyph_InitFunc +#define FT_Glyph_Done_Func FT_Glyph_DoneFunc +#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc +#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc +#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc +#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc + + + struct FT_Glyph_Class_ + { + FT_Long glyph_size; + FT_Glyph_Format glyph_format; + FT_Glyph_InitFunc glyph_init; + FT_Glyph_DoneFunc glyph_done; + FT_Glyph_CopyFunc glyph_copy; + FT_Glyph_TransformFunc glyph_transform; + FT_Glyph_GetBBoxFunc glyph_bbox; + FT_Glyph_PrepareFunc glyph_prepare; + }; + + + typedef FT_Error + (*FT_Renderer_RenderFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_UInt mode, + const FT_Vector* origin ); + + typedef FT_Error + (*FT_Renderer_TransformFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + + typedef void + (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_BBox* cbox ); + + + typedef FT_Error + (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, + FT_ULong mode_tag, + FT_Pointer mode_ptr ); + +/* deprecated identifiers */ +#define FTRenderer_render FT_Renderer_RenderFunc +#define FTRenderer_transform FT_Renderer_TransformFunc +#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc +#define FTRenderer_setMode FT_Renderer_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Renderer_Class */ + /* */ + /* <Description> */ + /* The renderer module class descriptor. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Module_Class fields. */ + /* */ + /* glyph_format :: The glyph image format this renderer handles. */ + /* */ + /* render_glyph :: A method used to render the image that is in a */ + /* given glyph slot into a bitmap. */ + /* */ + /* transform_glyph :: A method used to transform the image that is in */ + /* a given glyph slot. */ + /* */ + /* get_glyph_cbox :: A method used to access the glyph's cbox. */ + /* */ + /* set_mode :: A method used to pass additional parameters. */ + /* */ + /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ + /* This is a pointer to its raster's class. */ + /* */ + typedef struct FT_Renderer_Class_ + { + FT_Module_Class root; + + FT_Glyph_Format glyph_format; + + FT_Renderer_RenderFunc render_glyph; + FT_Renderer_TransformFunc transform_glyph; + FT_Renderer_GetCBoxFunc get_glyph_cbox; + FT_Renderer_SetModeFunc set_mode; + + FT_Raster_Funcs* raster_class; + + } FT_Renderer_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Renderer */ + /* */ + /* <Description> */ + /* Retrieve the current renderer for a given glyph format. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* format :: The glyph format. */ + /* */ + /* <Return> */ + /* A renderer handle. 0~if none found. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ + /* renderer by its name, use @FT_Get_Module. */ + /* */ + FT_EXPORT( FT_Renderer ) + FT_Get_Renderer( FT_Library library, + FT_Glyph_Format format ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Renderer */ + /* */ + /* <Description> */ + /* Set the current renderer to use, and set additional mode. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* renderer :: A handle to the renderer object. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* parameters :: Additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case of success, the renderer will be used to convert glyph */ + /* images in the renderer's known format into bitmaps. */ + /* */ + /* This doesn't change the current renderer for other formats. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Renderer( FT_Library library, + FT_Renderer renderer, + FT_UInt num_params, + FT_Parameter* parameters ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTRENDER_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftsizes.h b/contrib/media/updf/include/freetype/ftsizes.h new file mode 100644 index 0000000000..3e548cc39f --- /dev/null +++ b/contrib/media/updf/include/freetype/ftsizes.h @@ -0,0 +1,159 @@ +/***************************************************************************/ +/* */ +/* ftsizes.h */ +/* */ +/* FreeType size objects management (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Typical application would normally not need to use these functions. */ + /* However, they have been placed in a public API for the rare cases */ + /* where they are needed. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSIZES_H__ +#define __FTSIZES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sizes_management */ + /* */ + /* <Title> */ + /* Size Management */ + /* */ + /* <Abstract> */ + /* Managing multiple sizes per face. */ + /* */ + /* <Description> */ + /* When creating a new face object (e.g., with @FT_New_Face), an */ + /* @FT_Size object is automatically created and used to store all */ + /* pixel-size dependent information, available in the `face->size' */ + /* field. */ + /* */ + /* It is however possible to create more sizes for a given face, */ + /* mostly in order to manage several character pixel sizes of the */ + /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ + /* */ + /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ + /* modify the contents of the current `active' size; you thus need */ + /* to use @FT_Activate_Size to change it. */ + /* */ + /* 99% of applications won't need the functions provided here, */ + /* especially if they use the caching sub-system, so be cautious */ + /* when using these. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Size */ + /* */ + /* <Description> */ + /* Create a new size object from a given face object. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* asize :: A handle to a new size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You need to call @FT_Activate_Size in order to select the new size */ + /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ + /* @FT_Load_Glyph, @FT_Load_Char, etc. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Size( FT_Face face, + FT_Size* size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Size */ + /* */ + /* <Description> */ + /* Discard a given size object. Note that @FT_Done_Face */ + /* automatically discards all size objects allocated with */ + /* @FT_New_Size. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Size( FT_Size size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Activate_Size */ + /* */ + /* <Description> */ + /* Even though it is possible to create several size objects for a */ + /* given face (see @FT_New_Size for details), functions like */ + /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */ + /* activated last to determine the `current character pixel size'. */ + /* */ + /* This function can be used to `activate' a previously created size */ + /* object. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If `face' is the size's parent face object, this function changes */ + /* the value of `face->size' to the input size handle. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Activate_Size( FT_Size size ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTSIZES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftsnames.h b/contrib/media/updf/include/freetype/ftsnames.h new file mode 100644 index 0000000000..485e4e162e --- /dev/null +++ b/contrib/media/updf/include/freetype/ftsnames.h @@ -0,0 +1,200 @@ +/***************************************************************************/ +/* */ +/* ftsnames.h */ +/* */ +/* Simple interface to access SFNT name tables (which are used */ +/* to hold font names, copyright info, notices, etc.) (specification). */ +/* */ +/* This is _not_ used to retrieve glyph names! */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_SFNT_NAMES_H__ +#define __FT_SFNT_NAMES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sfnt_names */ + /* */ + /* <Title> */ + /* SFNT Names */ + /* */ + /* <Abstract> */ + /* Access the names embedded in TrueType and OpenType files. */ + /* */ + /* <Description> */ + /* The TrueType and OpenType specifications allow the inclusion of */ + /* a special `names table' in font files. This table contains */ + /* textual (and internationalized) information regarding the font, */ + /* like family name, copyright, version, etc. */ + /* */ + /* The definitions below are used to access them if available. */ + /* */ + /* Note that this has nothing to do with glyph names! */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntName */ + /* */ + /* <Description> */ + /* A structure used to model an SFNT `name' table entry. */ + /* */ + /* <Fields> */ + /* platform_id :: The platform ID for `string'. */ + /* */ + /* encoding_id :: The encoding ID for `string'. */ + /* */ + /* language_id :: The language ID for `string'. */ + /* */ + /* name_id :: An identifier for `string'. */ + /* */ + /* string :: The `name' string. Note that its format differs */ + /* depending on the (platform,encoding) pair. It can */ + /* be a Pascal String, a UTF-16 one, etc. */ + /* */ + /* Generally speaking, the string is not */ + /* zero-terminated. Please refer to the TrueType */ + /* specification for details. */ + /* */ + /* string_len :: The length of `string' in bytes. */ + /* */ + /* <Note> */ + /* Possible values for `platform_id', `encoding_id', `language_id', */ + /* and `name_id' are given in the file `ttnameid.h'. For details */ + /* please refer to the TrueType or OpenType specification. */ + /* */ + /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ + /* */ + typedef struct FT_SfntName_ + { + FT_UShort platform_id; + FT_UShort encoding_id; + FT_UShort language_id; + FT_UShort name_id; + + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntName; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name_Count */ + /* */ + /* <Description> */ + /* Retrieve the number of name strings in the SFNT `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Return> */ + /* The number of strings in the `name' table. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Sfnt_Name_Count( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name */ + /* */ + /* <Description> */ + /* Retrieve a string of the SFNT `name' table for a given index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* idx :: The index of the `name' string. */ + /* */ + /* <Output> */ + /* aname :: The indexed @FT_SfntName structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `aname' structure is not */ + /* null-terminated. The application should deallocate it if it is no */ + /* longer in use. */ + /* */ + /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ + /* `name' table entries, then do a loop until you get the right */ + /* platform, encoding, and name ID. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_Name( FT_Face face, + FT_UInt idx, + FT_SfntName *aname ); + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred family subfamily names in `name' + * table since OpenType version 1.4. For backwards compatibility with + * legacy systems which has 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred subfamily names in `name' table since + * OpenType version 1.4. For backwards compatibility with legacy + * systems which has 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + /* */ + + +FT_END_HEADER + +#endif /* __FT_SFNT_NAMES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftstroke.h b/contrib/media/updf/include/freetype/ftstroke.h new file mode 100644 index 0000000000..3afb87df88 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftstroke.h @@ -0,0 +1,716 @@ +/***************************************************************************/ +/* */ +/* ftstroke.h */ +/* */ +/* FreeType path stroker (specification). */ +/* */ +/* Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_STROKE_H__ +#define __FT_STROKE_H__ + +#include <ft2build.h> +#include FT_OUTLINE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************ + * + * @section: + * glyph_stroker + * + * @title: + * Glyph Stroker + * + * @abstract: + * Generating bordered and stroked glyphs. + * + * @description: + * This component generates stroked outlines of a given vectorial + * glyph. It also allows you to retrieve the `outside' and/or the + * `inside' borders of the stroke. + * + * This can be useful to generate `bordered' glyph, i.e., glyphs + * displayed with a coloured (and anti-aliased) border around their + * shape. + */ + + + /************************************************************** + * + * @type: + * FT_Stroker + * + * @description: + * Opaque handler to a path stroker object. + */ + typedef struct FT_StrokerRec_* FT_Stroker; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineJoin + * + * @description: + * These values determine how two joining lines are rendered + * in a stroker. + * + * @values: + * FT_STROKER_LINEJOIN_ROUND :: + * Used to render rounded line joins. Circular arcs are used + * to join two lines smoothly. + * + * FT_STROKER_LINEJOIN_BEVEL :: + * Used to render beveled line joins; i.e., the two joining lines + * are extended until they intersect. + * + * FT_STROKER_LINEJOIN_MITER :: + * Same as beveled rendering, except that an additional line + * break is added if the angle between the two joining lines + * is too closed (this is useful to avoid unpleasant spikes + * in beveled rendering). + */ + typedef enum FT_Stroker_LineJoin_ + { + FT_STROKER_LINEJOIN_ROUND = 0, + FT_STROKER_LINEJOIN_BEVEL, + FT_STROKER_LINEJOIN_MITER + + } FT_Stroker_LineJoin; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineCap + * + * @description: + * These values determine how the end of opened sub-paths are + * rendered in a stroke. + * + * @values: + * FT_STROKER_LINECAP_BUTT :: + * The end of lines is rendered as a full stop on the last + * point itself. + * + * FT_STROKER_LINECAP_ROUND :: + * The end of lines is rendered as a half-circle around the + * last point. + * + * FT_STROKER_LINECAP_SQUARE :: + * The end of lines is rendered as a square around the + * last point. + */ + typedef enum FT_Stroker_LineCap_ + { + FT_STROKER_LINECAP_BUTT = 0, + FT_STROKER_LINECAP_ROUND, + FT_STROKER_LINECAP_SQUARE + + } FT_Stroker_LineCap; + + + /************************************************************** + * + * @enum: + * FT_StrokerBorder + * + * @description: + * These values are used to select a given stroke border + * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. + * + * @values: + * FT_STROKER_BORDER_LEFT :: + * Select the left border, relative to the drawing direction. + * + * FT_STROKER_BORDER_RIGHT :: + * Select the right border, relative to the drawing direction. + * + * @note: + * Applications are generally interested in the `inside' and `outside' + * borders. However, there is no direct mapping between these and the + * `left' and `right' ones, since this really depends on the glyph's + * drawing orientation, which varies between font formats. + * + * You can however use @FT_Outline_GetInsideBorder and + * @FT_Outline_GetOutsideBorder to get these. + */ + typedef enum FT_StrokerBorder_ + { + FT_STROKER_BORDER_LEFT = 0, + FT_STROKER_BORDER_RIGHT + + } FT_StrokerBorder; + + + /************************************************************** + * + * @function: + * FT_Outline_GetInsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `inside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetInsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Outline_GetOutsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `outside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetOutsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_New + * + * @description: + * Create a new stroker object. + * + * @input: + * library :: + * FreeType library handle. + * + * @output: + * astroker :: + * A new stroker object handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_New( FT_Library library, + FT_Stroker *astroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Set + * + * @description: + * Reset a stroker object's attributes. + * + * @input: + * stroker :: + * The target stroker handle. + * + * radius :: + * The border radius. + * + * line_cap :: + * The line cap style. + * + * line_join :: + * The line join style. + * + * miter_limit :: + * The miter limit for the FT_STROKER_LINEJOIN_MITER style, + * expressed as 16.16 fixed point value. + * + * @note: + * The radius is expressed in the same units as the outline + * coordinates. + */ + FT_EXPORT( void ) + FT_Stroker_Set( FT_Stroker stroker, + FT_Fixed radius, + FT_Stroker_LineCap line_cap, + FT_Stroker_LineJoin line_join, + FT_Fixed miter_limit ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Rewind + * + * @description: + * Reset a stroker object without changing its attributes. + * You should call this function before beginning a new + * series of calls to @FT_Stroker_BeginSubPath or + * @FT_Stroker_EndSubPath. + * + * @input: + * stroker :: + * The target stroker handle. + */ + FT_EXPORT( void ) + FT_Stroker_Rewind( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ParseOutline + * + * @description: + * A convenience function used to parse a whole outline with + * the stroker. The resulting outline(s) can be retrieved + * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The source outline. + * + * opened :: + * A boolean. If~1, the outline is treated as an open path instead + * of a closed one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `opened' is~0 (the default), the outline is treated as a closed + * path, and the stroker generates two distinct `border' outlines. + * + * If `opened' is~1, the outline is processed as an open path, and the + * stroker generates a single `stroke' outline. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ParseOutline( FT_Stroker stroker, + FT_Outline* outline, + FT_Bool opened ); + + + /************************************************************** + * + * @function: + * FT_Stroker_BeginSubPath + * + * @description: + * Start a new sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the start vector. + * + * open :: + * A boolean. If~1, the sub-path is treated as an open one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function is useful when you need to stroke a path that is + * not stored as an @FT_Outline object. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_BeginSubPath( FT_Stroker stroker, + FT_Vector* to, + FT_Bool open ); + + + /************************************************************** + * + * @function: + * FT_Stroker_EndSubPath + * + * @description: + * Close the current sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function after @FT_Stroker_BeginSubPath. + * If the subpath was not `opened', this function `draws' a + * single line segment to the start position when needed. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_EndSubPath( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_LineTo + * + * @description: + * `Draw' a single line segment in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_LineTo( FT_Stroker stroker, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ConicTo + * + * @description: + * `Draw' a single quadratic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control :: + * A pointer to a Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ConicTo( FT_Stroker stroker, + FT_Vector* control, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_CubicTo + * + * @description: + * `Draw' a single cubic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control1 :: + * A pointer to the first Bézier control point. + * + * control2 :: + * A pointer to second Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_CubicTo( FT_Stroker stroker, + FT_Vector* control1, + FT_Vector* control2, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetBorderCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export one of the `border' or `stroke' + * outlines generated by the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_GetCounts instead if you want to + * retrieve the counts associated to both borders. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetBorderCounts( FT_Stroker stroker, + FT_StrokerBorder border, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ExportBorder + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export the corresponding border to your own @FT_Outline + * structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * outline :: + * The target outline handle. + * + * @note: + * Always call this function after @FT_Stroker_GetBorderCounts to + * get sure that there is enough room in your @FT_Outline object to + * receive all new data. + * + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right' + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_Export instead if you want to + * retrieve all borders at once. + */ + FT_EXPORT( void ) + FT_Stroker_ExportBorder( FT_Stroker stroker, + FT_StrokerBorder border, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export all points/borders from the stroked + * outline/path. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetCounts( FT_Stroker stroker, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Export + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export all borders to your own @FT_Outline structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The target outline handle. + */ + FT_EXPORT( void ) + FT_Stroker_Export( FT_Stroker stroker, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Done + * + * @description: + * Destroy a stroker object. + * + * @input: + * stroker :: + * A stroker handle. Can be NULL. + */ + FT_EXPORT( void ) + FT_Stroker_Done( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Glyph_Stroke + * + * @description: + * Stroke a given outline glyph object with a given stroker. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_Stroke( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool destroy ); + + + /************************************************************** + * + * @function: + * FT_Glyph_StrokeBorder + * + * @description: + * Stroke a given outline glyph object with a given stroker, but + * only return either its inside or outside border. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * inside :: + * A Boolean. If~1, return the inside border, otherwise + * the outside border. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_StrokeBorder( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool inside, + FT_Bool destroy ); + + /* */ + +FT_END_HEADER + +#endif /* __FT_STROKE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftsynth.h b/contrib/media/updf/include/freetype/ftsynth.h new file mode 100644 index 0000000000..a068b7928d --- /dev/null +++ b/contrib/media/updf/include/freetype/ftsynth.h @@ -0,0 +1,80 @@ +/***************************************************************************/ +/* */ +/* ftsynth.h */ +/* */ +/* FreeType synthesizing code for emboldening and slanting */ +/* (specification). */ +/* */ +/* Copyright 2000-2001, 2003, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /********* *********/ + /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ + /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ + /********* FREETYPE DEVELOPMENT TEAM *********/ + /********* *********/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* Main reason for not lifting the functions in this module to a */ + /* `standard' API is that the used parameters for emboldening and */ + /* slanting are not configurable. Consider the functions as a */ + /* code resource which should be copied into the application and */ + /* adapted to the particular needs. */ + + +#ifndef __FTSYNTH_H__ +#define __FTSYNTH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ + /* taste). This function is actually a convenience function, providing */ + /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ + /* */ + /* For emboldened outlines the metrics are estimates only; if you need */ + /* precise values you should call @FT_Outline_Get_CBox. */ + FT_EXPORT( void ) + FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); + + /* Slant an outline glyph to the right by about 12 degrees. */ + FT_EXPORT( void ) + FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); + + /* */ + +FT_END_HEADER + +#endif /* __FTSYNTH_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftsystem.h b/contrib/media/updf/include/freetype/ftsystem.h new file mode 100644 index 0000000000..e07460c55d --- /dev/null +++ b/contrib/media/updf/include/freetype/ftsystem.h @@ -0,0 +1,347 @@ +/***************************************************************************/ +/* */ +/* ftsystem.h */ +/* */ +/* FreeType low-level system interface definition (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2005, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTSYSTEM_H__ +#define __FTSYSTEM_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* system_interface */ + /* */ + /* <Title> */ + /* System Interface */ + /* */ + /* <Abstract> */ + /* How FreeType manages memory and i/o. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to memory */ + /* management and i/o access. You need to understand this */ + /* information if you want to use a custom memory manager or you own */ + /* i/o streams. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* M E M O R Y M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Memory + * + * @description: + * A handle to a given memory manager object, defined with an + * @FT_MemoryRec structure. + * + */ + typedef struct FT_MemoryRec_* FT_Memory; + + + /************************************************************************* + * + * @functype: + * FT_Alloc_Func + * + * @description: + * A function used to allocate `size' bytes from `memory'. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * size :: + * The size in bytes to allocate. + * + * @return: + * Address of new memory block. 0~in case of failure. + * + */ + typedef void* + (*FT_Alloc_Func)( FT_Memory memory, + long size ); + + + /************************************************************************* + * + * @functype: + * FT_Free_Func + * + * @description: + * A function used to release a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * block :: + * The address of the target memory block. + * + */ + typedef void + (*FT_Free_Func)( FT_Memory memory, + void* block ); + + + /************************************************************************* + * + * @functype: + * FT_Realloc_Func + * + * @description: + * A function used to re-allocate a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * cur_size :: + * The block's current size in bytes. + * + * new_size :: + * The block's requested new size. + * + * block :: + * The block's current address. + * + * @return: + * New block address. 0~in case of memory shortage. + * + * @note: + * In case of error, the old block must still be available. + * + */ + typedef void* + (*FT_Realloc_Func)( FT_Memory memory, + long cur_size, + long new_size, + void* block ); + + + /************************************************************************* + * + * @struct: + * FT_MemoryRec + * + * @description: + * A structure used to describe a given memory manager to FreeType~2. + * + * @fields: + * user :: + * A generic typeless pointer for user data. + * + * alloc :: + * A pointer type to an allocation function. + * + * free :: + * A pointer type to an memory freeing function. + * + * realloc :: + * A pointer type to a reallocation function. + * + */ + struct FT_MemoryRec_ + { + void* user; + FT_Alloc_Func alloc; + FT_Free_Func free; + FT_Realloc_Func realloc; + }; + + + /*************************************************************************/ + /* */ + /* I / O M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Stream + * + * @description: + * A handle to an input stream. + * + */ + typedef struct FT_StreamRec_* FT_Stream; + + + /************************************************************************* + * + * @struct: + * FT_StreamDesc + * + * @description: + * A union type used to store either a long or a pointer. This is used + * to store a file descriptor or a `FILE*' in an input stream. + * + */ + typedef union FT_StreamDesc_ + { + long value; + void* pointer; + + } FT_StreamDesc; + + + /************************************************************************* + * + * @functype: + * FT_Stream_IoFunc + * + * @description: + * A function used to seek and read data from a given input stream. + * + * @input: + * stream :: + * A handle to the source stream. + * + * offset :: + * The offset of read in stream (always from start). + * + * buffer :: + * The address of the read buffer. + * + * count :: + * The number of bytes to read from the stream. + * + * @return: + * The number of bytes effectively read by the stream. + * + * @note: + * This function might be called to perform a seek or skip operation + * with a `count' of~0. A non-zero return value then indicates an + * error. + * + */ + typedef unsigned long + (*FT_Stream_IoFunc)( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ); + + + /************************************************************************* + * + * @functype: + * FT_Stream_CloseFunc + * + * @description: + * A function used to close a given input stream. + * + * @input: + * stream :: + * A handle to the target stream. + * + */ + typedef void + (*FT_Stream_CloseFunc)( FT_Stream stream ); + + + /************************************************************************* + * + * @struct: + * FT_StreamRec + * + * @description: + * A structure used to describe an input stream. + * + * @input: + * base :: + * For memory-based streams, this is the address of the first stream + * byte in memory. This field should always be set to NULL for + * disk-based streams. + * + * size :: + * The stream size in bytes. + * + * pos :: + * The current position within the stream. + * + * descriptor :: + * This field is a union that can hold an integer or a pointer. It is + * used by stream implementations to store file descriptors or `FILE*' + * pointers. + * + * pathname :: + * This field is completely ignored by FreeType. However, it is often + * useful during debugging to use it to store the stream's filename + * (where available). + * + * read :: + * The stream's input function. + * + * close :: + * The stream's close function. + * + * memory :: + * The memory manager to use to preload frames. This is set + * internally by FreeType and shouldn't be touched by stream + * implementations. + * + * cursor :: + * This field is set and used internally by FreeType when parsing + * frames. + * + * limit :: + * This field is set and used internally by FreeType when parsing + * frames. + * + */ + typedef struct FT_StreamRec_ + { + unsigned char* base; + unsigned long size; + unsigned long pos; + + FT_StreamDesc descriptor; + FT_StreamDesc pathname; + FT_Stream_IoFunc read; + FT_Stream_CloseFunc close; + + FT_Memory memory; + unsigned char* cursor; + unsigned char* limit; + + } FT_StreamRec; + + + /* */ + + +FT_END_HEADER + +#endif /* __FTSYSTEM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/fttrigon.h b/contrib/media/updf/include/freetype/fttrigon.h new file mode 100644 index 0000000000..6b77d2ee54 --- /dev/null +++ b/contrib/media/updf/include/freetype/fttrigon.h @@ -0,0 +1,350 @@ +/***************************************************************************/ +/* */ +/* fttrigon.h */ +/* */ +/* FreeType trigonometric functions (specification). */ +/* */ +/* Copyright 2001, 2003, 2005, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTRIGON_H__ +#define __FTTRIGON_H__ + +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Angle + * + * @description: + * This type is used to model angle values in FreeType. Note that the + * angle is a 16.16 fixed float value expressed in degrees. + * + */ + typedef FT_Fixed FT_Angle; + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI + * + * @description: + * The angle pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI ( 180L << 16 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_2PI + * + * @description: + * The angle 2*pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI2 + * + * @description: + * The angle pi/2 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI4 + * + * @description: + * The angle pi/4 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) + + + /************************************************************************* + * + * @function: + * FT_Sin + * + * @description: + * Return the sinus of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The sinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Sin( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Cos + * + * @description: + * Return the cosinus of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The cosinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Cos( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Tan + * + * @description: + * Return the tangent of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The tangent value. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Tan( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Atan2 + * + * @description: + * Return the arc-tangent corresponding to a given vector (x,y) in + * the 2d plane. + * + * @input: + * x :: + * The horizontal vector coordinate. + * + * y :: + * The vertical vector coordinate. + * + * @return: + * The arc-tangent value (i.e. angle). + * + */ + FT_EXPORT( FT_Angle ) + FT_Atan2( FT_Fixed x, + FT_Fixed y ); + + + /************************************************************************* + * + * @function: + * FT_Angle_Diff + * + * @description: + * Return the difference between two angles. The result is always + * constrained to the ]-PI..PI] interval. + * + * @input: + * angle1 :: + * First angle. + * + * angle2 :: + * Second angle. + * + * @return: + * Constrained value of `value2-value1'. + * + */ + FT_EXPORT( FT_Angle ) + FT_Angle_Diff( FT_Angle angle1, + FT_Angle angle2 ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Unit + * + * @description: + * Return the unit vector corresponding to a given angle. After the + * call, the value of `vec.x' will be `sin(angle)', and the value of + * `vec.y' will be `cos(angle)'. + * + * This function is useful to retrieve both the sinus and cosinus of a + * given angle quickly. + * + * @output: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The address of angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Unit( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Rotate + * + * @description: + * Rotate a vector by a given angle. + * + * @inout: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The address of angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Rotate( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Length + * + * @description: + * Return the length of a given vector. + * + * @input: + * vec :: + * The address of target vector. + * + * @return: + * The vector length, expressed in the same units that the original + * vector coordinates. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Vector_Length( FT_Vector* vec ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Polarize + * + * @description: + * Compute both the length and angle of a given vector. + * + * @input: + * vec :: + * The address of source vector. + * + * @output: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Polarize( FT_Vector* vec, + FT_Fixed *length, + FT_Angle *angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_From_Polar + * + * @description: + * Compute vector coordinates from a length and angle. + * + * @output: + * vec :: + * The address of source vector. + * + * @input: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_From_Polar( FT_Vector* vec, + FT_Fixed length, + FT_Angle angle ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTTRIGON_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/fttypes.h b/contrib/media/updf/include/freetype/fttypes.h new file mode 100644 index 0000000000..a57ffa69bd --- /dev/null +++ b/contrib/media/updf/include/freetype/fttypes.h @@ -0,0 +1,588 @@ +/***************************************************************************/ +/* */ +/* fttypes.h */ +/* */ +/* FreeType simple types definitions (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTYPES_H__ +#define __FTTYPES_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_SYSTEM_H +#include FT_IMAGE_H + +#include <stddef.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /* <Title> */ + /* Basic Data Types */ + /* */ + /* <Abstract> */ + /* The basic data types defined by the library. */ + /* */ + /* <Description> */ + /* This section contains the basic data types defined by FreeType~2, */ + /* ranging from simple scalar types to bitmap descriptors. More */ + /* font-specific structures are defined in a different section. */ + /* */ + /* <Order> */ + /* FT_Byte */ + /* FT_Bytes */ + /* FT_Char */ + /* FT_Int */ + /* FT_UInt */ + /* FT_Int16 */ + /* FT_UInt16 */ + /* FT_Int32 */ + /* FT_UInt32 */ + /* FT_Short */ + /* FT_UShort */ + /* FT_Long */ + /* FT_ULong */ + /* FT_Bool */ + /* FT_Offset */ + /* FT_PtrDist */ + /* FT_String */ + /* FT_Tag */ + /* FT_Error */ + /* FT_Fixed */ + /* FT_Pointer */ + /* FT_Pos */ + /* FT_Vector */ + /* FT_BBox */ + /* FT_Matrix */ + /* FT_FWord */ + /* FT_UFWord */ + /* FT_F2Dot14 */ + /* FT_UnitVector */ + /* FT_F26Dot6 */ + /* */ + /* */ + /* FT_Generic */ + /* FT_Generic_Finalizer */ + /* */ + /* FT_Bitmap */ + /* FT_Pixel_Mode */ + /* FT_Palette_Mode */ + /* FT_Glyph_Format */ + /* FT_IMAGE_TAG */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bool */ + /* */ + /* <Description> */ + /* A typedef of unsigned char, used for simple booleans. As usual, */ + /* values 1 and~0 represent true and false, respectively. */ + /* */ + typedef unsigned char FT_Bool; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_FWord */ + /* */ + /* <Description> */ + /* A signed 16-bit integer used to store a distance in original font */ + /* units. */ + /* */ + typedef signed short FT_FWord; /* distance in FUnits */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UFWord */ + /* */ + /* <Description> */ + /* An unsigned 16-bit integer used to store a distance in original */ + /* font units. */ + /* */ + typedef unsigned short FT_UFWord; /* unsigned distance */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Char */ + /* */ + /* <Description> */ + /* A simple typedef for the _signed_ char type. */ + /* */ + typedef signed char FT_Char; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Byte */ + /* */ + /* <Description> */ + /* A simple typedef for the _unsigned_ char type. */ + /* */ + typedef unsigned char FT_Byte; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bytes */ + /* */ + /* <Description> */ + /* A typedef for constant memory areas. */ + /* */ + typedef const FT_Byte* FT_Bytes; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Tag */ + /* */ + /* <Description> */ + /* A typedef for 32-bit tags (as used in the SFNT format). */ + /* */ + typedef FT_UInt32 FT_Tag; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_String */ + /* */ + /* <Description> */ + /* A simple typedef for the char type, usually used for strings. */ + /* */ + typedef char FT_String; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Short */ + /* */ + /* <Description> */ + /* A typedef for signed short. */ + /* */ + typedef signed short FT_Short; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UShort */ + /* */ + /* <Description> */ + /* A typedef for unsigned short. */ + /* */ + typedef unsigned short FT_UShort; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Int */ + /* */ + /* <Description> */ + /* A typedef for the int type. */ + /* */ + typedef signed int FT_Int; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UInt */ + /* */ + /* <Description> */ + /* A typedef for the unsigned int type. */ + /* */ + typedef unsigned int FT_UInt; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Long */ + /* */ + /* <Description> */ + /* A typedef for signed long. */ + /* */ + typedef signed long FT_Long; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ULong */ + /* */ + /* <Description> */ + /* A typedef for unsigned long. */ + /* */ + typedef unsigned long FT_ULong; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F2Dot14 */ + /* */ + /* <Description> */ + /* A signed 2.14 fixed float type used for unit vectors. */ + /* */ + typedef signed short FT_F2Dot14; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F26Dot6 */ + /* */ + /* <Description> */ + /* A signed 26.6 fixed float type used for vectorial pixel */ + /* coordinates. */ + /* */ + typedef signed long FT_F26Dot6; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Fixed */ + /* */ + /* <Description> */ + /* This type is used to store 16.16 fixed float values, like scaling */ + /* values or matrix coefficients. */ + /* */ + typedef signed long FT_Fixed; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Error */ + /* */ + /* <Description> */ + /* The FreeType error code type. A value of~0 is always interpreted */ + /* as a successful operation. */ + /* */ + typedef int FT_Error; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pointer */ + /* */ + /* <Description> */ + /* A simple typedef for a typeless pointer. */ + /* */ + typedef void* FT_Pointer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Offset */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ + /* _unsigned_ integer type used to express a file size or position, */ + /* or a memory block size. */ + /* */ + typedef size_t FT_Offset; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_PtrDist */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ + /* largest _signed_ integer type used to express the distance */ + /* between two pointers. */ + /* */ + typedef ft_ptrdiff_t FT_PtrDist; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_UnitVector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector unit vector. Uses */ + /* FT_F2Dot14 types. */ + /* */ + /* <Fields> */ + /* x :: Horizontal coordinate. */ + /* */ + /* y :: Vertical coordinate. */ + /* */ + typedef struct FT_UnitVector_ + { + FT_F2Dot14 x; + FT_F2Dot14 y; + + } FT_UnitVector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Matrix */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2x2 matrix. Coefficients are */ + /* in 16.16 fixed float format. The computation performed is: */ + /* */ + /* { */ + /* x' = x*xx + y*xy */ + /* y' = x*yx + y*yy */ + /* } */ + /* */ + /* <Fields> */ + /* xx :: Matrix coefficient. */ + /* */ + /* xy :: Matrix coefficient. */ + /* */ + /* yx :: Matrix coefficient. */ + /* */ + /* yy :: Matrix coefficient. */ + /* */ + typedef struct FT_Matrix_ + { + FT_Fixed xx, xy; + FT_Fixed yx, yy; + + } FT_Matrix; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Data */ + /* */ + /* <Description> */ + /* Read-only binary data represented as a pointer and a length. */ + /* */ + /* <Fields> */ + /* pointer :: The data. */ + /* */ + /* length :: The length of the data in bytes. */ + /* */ + typedef struct FT_Data_ + { + const FT_Byte* pointer; + FT_Int length; + + } FT_Data; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Generic_Finalizer */ + /* */ + /* <Description> */ + /* Describe a function used to destroy the `client' data of any */ + /* FreeType object. See the description of the @FT_Generic type for */ + /* details of usage. */ + /* */ + /* <Input> */ + /* The address of the FreeType object which is under finalization. */ + /* Its client data is accessed through its `generic' field. */ + /* */ + typedef void (*FT_Generic_Finalizer)(void* object); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Generic */ + /* */ + /* <Description> */ + /* Client applications often need to associate their own data to a */ + /* variety of FreeType core objects. For example, a text layout API */ + /* might want to associate a glyph cache to a given size object. */ + /* */ + /* Most FreeType object contains a `generic' field, of type */ + /* FT_Generic, which usage is left to client applications and font */ + /* servers. */ + /* */ + /* It can be used to store a pointer to client-specific data, as well */ + /* as the address of a `finalizer' function, which will be called by */ + /* FreeType when the object is destroyed (for example, the previous */ + /* client example would put the address of the glyph cache destructor */ + /* in the `finalizer' field). */ + /* */ + /* <Fields> */ + /* data :: A typeless pointer to any client-specified data. This */ + /* field is completely ignored by the FreeType library. */ + /* */ + /* finalizer :: A pointer to a `generic finalizer' function, which */ + /* will be called when the object is destroyed. If this */ + /* field is set to NULL, no code will be called. */ + /* */ + typedef struct FT_Generic_ + { + void* data; + FT_Generic_Finalizer finalizer; + + } FT_Generic; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_MAKE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags which are used to label */ + /* TrueType tables into an unsigned long to be used within FreeType. */ + /* */ + /* <Note> */ + /* The produced values *must* be 32-bit integers. Don't redefine */ + /* this macro. */ + /* */ +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ + (FT_Tag) \ + ( ( (FT_ULong)_x1 << 24 ) | \ + ( (FT_ULong)_x2 << 16 ) | \ + ( (FT_ULong)_x3 << 8 ) | \ + (FT_ULong)_x4 ) + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* L I S T M A N A G E M E N T */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ListNode */ + /* */ + /* <Description> */ + /* Many elements and objects in FreeType are listed through an */ + /* @FT_List record (see @FT_ListRec). As its name suggests, an */ + /* FT_ListNode is a handle to a single list element. */ + /* */ + typedef struct FT_ListNodeRec_* FT_ListNode; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_List */ + /* */ + /* <Description> */ + /* A handle to a list record (see @FT_ListRec). */ + /* */ + typedef struct FT_ListRec_* FT_List; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListNodeRec */ + /* */ + /* <Description> */ + /* A structure used to hold a single list element. */ + /* */ + /* <Fields> */ + /* prev :: The previous element in the list. NULL if first. */ + /* */ + /* next :: The next element in the list. NULL if last. */ + /* */ + /* data :: A typeless pointer to the listed object. */ + /* */ + typedef struct FT_ListNodeRec_ + { + FT_ListNode prev; + FT_ListNode next; + void* data; + + } FT_ListNodeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListRec */ + /* */ + /* <Description> */ + /* A structure used to hold a simple doubly-linked list. These are */ + /* used in many parts of FreeType. */ + /* */ + /* <Fields> */ + /* head :: The head (first element) of doubly-linked list. */ + /* */ + /* tail :: The tail (last element) of doubly-linked list. */ + /* */ + typedef struct FT_ListRec_ + { + FT_ListNode head; + FT_ListNode tail; + + } FT_ListRec; + + + /* */ + +#define FT_IS_EMPTY( list ) ( (list).head == 0 ) + + /* return base error code (without module-specific prefix) */ +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) + + /* return module error code */ +#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) + +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) + +FT_END_HEADER + +#endif /* __FTTYPES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ftwinfnt.h b/contrib/media/updf/include/freetype/ftwinfnt.h new file mode 100644 index 0000000000..ea33353536 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftwinfnt.h @@ -0,0 +1,274 @@ +/***************************************************************************/ +/* */ +/* ftwinfnt.h */ +/* */ +/* FreeType API for accessing Windows fnt-specific data. */ +/* */ +/* Copyright 2003, 2004, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTWINFNT_H__ +#define __FTWINFNT_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* winfnt_fonts */ + /* */ + /* <Title> */ + /* Window FNT Files */ + /* */ + /* <Abstract> */ + /* Windows FNT specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Windows FNT specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FT_WinFNT_ID_XXX + * + * @description: + * A list of valid values for the `charset' byte in + * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX + * encodings (except for cp1361) can be found at ftp://ftp.unicode.org + * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is + * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. + * + * @values: + * FT_WinFNT_ID_DEFAULT :: + * This is used for font enumeration and font creation as a + * `don't care' value. Valid font files don't contain this value. + * When querying for information about the character set of the font + * that is currently selected into a specified device context, this + * return value (of the related Windows API) simply denotes failure. + * + * FT_WinFNT_ID_SYMBOL :: + * There is no known mapping table available. + * + * FT_WinFNT_ID_MAC :: + * Mac Roman encoding. + * + * FT_WinFNT_ID_OEM :: + * From Michael Pöttgen <michael@poettgen.de>: + * + * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM + * is used for the charset of vector fonts, like `modern.fon', + * `roman.fon', and `script.fon' on Windows. + * + * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value + * specifies a character set that is operating-system dependent. + * + * The `IFIMETRICS' documentation from the `Windows Driver + * Development Kit' says: This font supports an OEM-specific + * character set. The OEM character set is system dependent. + * + * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the + * second default codepage that most international versions of + * Windows have. It is one of the OEM codepages from + * + * http://www.microsoft.com/globaldev/reference/cphome.mspx, + * + * and is used for the `DOS boxes', to support legacy applications. + * A German Windows version for example usually uses ANSI codepage + * 1252 and OEM codepage 850. + * + * FT_WinFNT_ID_CP874 :: + * A superset of Thai TIS 620 and ISO 8859-11. + * + * FT_WinFNT_ID_CP932 :: + * A superset of Japanese Shift-JIS (with minor deviations). + * + * FT_WinFNT_ID_CP936 :: + * A superset of simplified Chinese GB 2312-1980 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP949 :: + * A superset of Korean Hangul KS~C 5601-1987 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP950 :: + * A superset of traditional Chinese Big~5 ETen (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP1250 :: + * A superset of East European ISO 8859-2 (with slightly different + * ordering). + * + * FT_WinFNT_ID_CP1251 :: + * A superset of Russian ISO 8859-5 (with different ordering). + * + * FT_WinFNT_ID_CP1252 :: + * ANSI encoding. A superset of ISO 8859-1. + * + * FT_WinFNT_ID_CP1253 :: + * A superset of Greek ISO 8859-7 (with minor modifications). + * + * FT_WinFNT_ID_CP1254 :: + * A superset of Turkish ISO 8859-9. + * + * FT_WinFNT_ID_CP1255 :: + * A superset of Hebrew ISO 8859-8 (with some modifications). + * + * FT_WinFNT_ID_CP1256 :: + * A superset of Arabic ISO 8859-6 (with different ordering). + * + * FT_WinFNT_ID_CP1257 :: + * A superset of Baltic ISO 8859-13 (with some deviations). + * + * FT_WinFNT_ID_CP1258 :: + * For Vietnamese. This encoding doesn't cover all necessary + * characters. + * + * FT_WinFNT_ID_CP1361 :: + * Korean (Johab). + */ + +#define FT_WinFNT_ID_CP1252 0 +#define FT_WinFNT_ID_DEFAULT 1 +#define FT_WinFNT_ID_SYMBOL 2 +#define FT_WinFNT_ID_MAC 77 +#define FT_WinFNT_ID_CP932 128 +#define FT_WinFNT_ID_CP949 129 +#define FT_WinFNT_ID_CP1361 130 +#define FT_WinFNT_ID_CP936 134 +#define FT_WinFNT_ID_CP950 136 +#define FT_WinFNT_ID_CP1253 161 +#define FT_WinFNT_ID_CP1254 162 +#define FT_WinFNT_ID_CP1258 163 +#define FT_WinFNT_ID_CP1255 177 +#define FT_WinFNT_ID_CP1256 178 +#define FT_WinFNT_ID_CP1257 186 +#define FT_WinFNT_ID_CP1251 204 +#define FT_WinFNT_ID_CP874 222 +#define FT_WinFNT_ID_CP1250 238 +#define FT_WinFNT_ID_OEM 255 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_HeaderRec */ + /* */ + /* <Description> */ + /* Windows FNT Header info. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_ + { + FT_UShort version; + FT_ULong file_size; + FT_Byte copyright[60]; + FT_UShort file_type; + FT_UShort nominal_point_size; + FT_UShort vertical_resolution; + FT_UShort horizontal_resolution; + FT_UShort ascent; + FT_UShort internal_leading; + FT_UShort external_leading; + FT_Byte italic; + FT_Byte underline; + FT_Byte strike_out; + FT_UShort weight; + FT_Byte charset; + FT_UShort pixel_width; + FT_UShort pixel_height; + FT_Byte pitch_and_family; + FT_UShort avg_width; + FT_UShort max_width; + FT_Byte first_char; + FT_Byte last_char; + FT_Byte default_char; + FT_Byte break_char; + FT_UShort bytes_per_row; + FT_ULong device_offset; + FT_ULong face_name_offset; + FT_ULong bits_pointer; + FT_ULong bits_offset; + FT_Byte reserved; + FT_ULong flags; + FT_UShort A_space; + FT_UShort B_space; + FT_UShort C_space; + FT_UShort color_table_offset; + FT_ULong reserved1[4]; + + } FT_WinFNT_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_Header */ + /* */ + /* <Description> */ + /* A handle to an @FT_WinFNT_HeaderRec structure. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; + + + /********************************************************************** + * + * @function: + * FT_Get_WinFNT_Header + * + * @description: + * Retrieve a Windows FNT font info header. + * + * @input: + * face :: A handle to the input face. + * + * @output: + * aheader :: The WinFNT header. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with Windows FNT faces, returning an error + * otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_WinFNT_Header( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + + /* */ + +FT_END_HEADER + +#endif /* __FTWINFNT_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/contrib/media/updf/include/freetype/ftxf86.h b/contrib/media/updf/include/freetype/ftxf86.h new file mode 100644 index 0000000000..8c68afdcc5 --- /dev/null +++ b/contrib/media/updf/include/freetype/ftxf86.h @@ -0,0 +1,83 @@ +/***************************************************************************/ +/* */ +/* ftxf86.h */ +/* */ +/* Support functions for X11. */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTXF86_H__ +#define __FTXF86_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* font_formats */ + /* */ + /* <Title> */ + /* Font Formats */ + /* */ + /* <Abstract> */ + /* Getting the font format. */ + /* */ + /* <Description> */ + /* The single function in this section can be used to get the font */ + /* format. Note that this information is not needed normally; */ + /* however, there are special cases (like in PDF devices) where it is */ + /* important to differentiate, in spite of FreeType's uniform API. */ + /* */ + /* This function is in the X11/xf86 namespace for historical reasons */ + /* and in no way depends on that windowing system. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_X11_Font_Format */ + /* */ + /* <Description> */ + /* Return a string describing the format of a given face, using values */ + /* which can be used as an X11 FONT_PROPERTY. Possible values are */ + /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */ + /* `PFR', and `Windows~FNT'. */ + /* */ + /* <Input> */ + /* face :: */ + /* Input face handle. */ + /* */ + /* <Return> */ + /* Font format string. NULL in case of error. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_X11_Font_Format( FT_Face face ); + + /* */ + +FT_END_HEADER + +#endif /* __FTXF86_H__ */ diff --git a/contrib/media/updf/include/freetype/header.h b/contrib/media/updf/include/freetype/header.h new file mode 100755 index 0000000000..ebd5574404 --- /dev/null +++ b/contrib/media/updf/include/freetype/header.h @@ -0,0 +1,49 @@ +/******************************************************************* + * + * Function : + * + * Description : + * + * Input : + * + * Output : + * + * Notes : + * + ******************************************************************/ + +/******************************************************************* + * + * Function : + * + * Description : + * + * Input : None + * + * Output : Error code. + * + ******************************************************************/ + +/******************************************************************* + * + * Function : + * + * Description : + * + ******************************************************************/ + +/******************************************************************* + * + * Component Name (e.g. TTRaster.C) + eventually a version number. + * + * Component Short Description (e.g. Rasterizer). + * + * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ diff --git a/contrib/media/updf/include/freetype/internal/autohint.h b/contrib/media/updf/include/freetype/internal/autohint.h new file mode 100644 index 0000000000..7e3a08a051 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/autohint.h @@ -0,0 +1,231 @@ +/***************************************************************************/ +/* */ +/* autohint.h */ +/* */ +/* High-level `autohint' module-specific interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* The auto-hinter is used to load and automatically hint glyphs if a */ + /* format-specific hinter isn't available. */ + /* */ + /*************************************************************************/ + + +#ifndef __AUTOHINT_H__ +#define __AUTOHINT_H__ + + + /*************************************************************************/ + /* */ + /* A small technical note regarding automatic hinting in order to */ + /* clarify this module interface. */ + /* */ + /* An automatic hinter might compute two kinds of data for a given face: */ + /* */ + /* - global hints: Usually some metrics that describe global properties */ + /* of the face. It is computed by scanning more or less */ + /* aggressively the glyphs in the face, and thus can be */ + /* very slow to compute (even if the size of global */ + /* hints is really small). */ + /* */ + /* - glyph hints: These describe some important features of the glyph */ + /* outline, as well as how to align them. They are */ + /* generally much faster to compute than global hints. */ + /* */ + /* The current FreeType auto-hinter does a pretty good job while */ + /* performing fast computations for both global and glyph hints. */ + /* However, we might be interested in introducing more complex and */ + /* powerful algorithms in the future, like the one described in the John */ + /* D. Hobby paper, which unfortunately requires a lot more horsepower. */ + /* */ + /* Because a sufficiently sophisticated font management system would */ + /* typically implement an LRU cache of opened face objects to reduce */ + /* memory usage, it is a good idea to be able to avoid recomputing */ + /* global hints every time the same face is re-opened. */ + /* */ + /* We thus provide the ability to cache global hints outside of the face */ + /* object, in order to speed up font re-opening time. Of course, this */ + /* feature is purely optional, so most client programs won't even notice */ + /* it. */ + /* */ + /* I initially thought that it would be a good idea to cache the glyph */ + /* hints too. However, my general idea now is that if you really need */ + /* to cache these too, you are simply in need of a new font format, */ + /* where all this information could be stored within the font file and */ + /* decoded on the fly. */ + /* */ + /*************************************************************************/ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + typedef struct FT_AutoHinterRec_ *FT_AutoHinter; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalGetFunc */ + /* */ + /* <Description> */ + /* Retrieves the global hints computed for a given face object the */ + /* resulting data is dissociated from the face and will survive a */ + /* call to FT_Done_Face(). It must be discarded through the API */ + /* FT_AutoHinter_GlobalDoneFunc(). */ + /* */ + /* <Input> */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* global_hints :: A typeless pointer to the global hints. */ + /* */ + /* global_len :: The size in bytes of the global hints. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter, + FT_Face face, + void** global_hints, + long* global_len ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalDoneFunc */ + /* */ + /* <Description> */ + /* Discards the global hints retrieved through */ + /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */ + /* are freed from memory. */ + /* */ + /* <Input> */ + /* hinter :: A handle to the auto-hinter module. */ + /* */ + /* global :: A pointer to retrieved global hints to discard. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter, + void* global ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalResetFunc */ + /* */ + /* <Description> */ + /* This function is used to recompute the global metrics in a given */ + /* font. This is useful when global font data changes (e.g. Multiple */ + /* Masters fonts where blend coordinates change). */ + /* */ + /* <Input> */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the face. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter, + FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlyphLoadFunc */ + /* */ + /* <Description> */ + /* This function is used to load, scale, and automatically hint a */ + /* glyph from a given face. */ + /* */ + /* <Input> */ + /* face :: A handle to the face. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* load_flags :: The load flags. */ + /* */ + /* <Note> */ + /* This function is capable of loading composite glyphs by hinting */ + /* each sub-glyph independently (which improves quality). */ + /* */ + /* It will call the font driver with FT_Load_Glyph(), with */ + /* FT_LOAD_NO_SCALE set. */ + /* */ + typedef FT_Error + (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_AutoHinter_ServiceRec */ + /* */ + /* <Description> */ + /* The auto-hinter module's interface. */ + /* */ + typedef struct FT_AutoHinter_ServiceRec_ + { + FT_AutoHinter_GlobalResetFunc reset_face; + FT_AutoHinter_GlobalGetFunc get_global_hints; + FT_AutoHinter_GlobalDoneFunc done_global_hints; + FT_AutoHinter_GlyphLoadFunc load_glyph; + + } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ + done_global_hints_, load_glyph_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_AutoHinter_ServiceRec class_ = \ + { \ + reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ + done_global_hints_, load_glyph_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_AutoHinter_ServiceRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->reset_face = reset_face_; \ + clazz->get_global_hints = get_global_hints_; \ + clazz->done_global_hints = done_global_hints_; \ + clazz->load_glyph = load_glyph_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __AUTOHINT_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftcalc.h b/contrib/media/updf/include/freetype/internal/ftcalc.h new file mode 100644 index 0000000000..f8b4324777 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftcalc.h @@ -0,0 +1,179 @@ +/***************************************************************************/ +/* */ +/* ftcalc.h */ +/* */ +/* Arithmetic computations (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCALC_H__ +#define __FTCALC_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FixedSqrt */ + /* */ + /* <Description> */ + /* Computes the square root of a 16.16 fixed point value. */ + /* */ + /* <Input> */ + /* x :: The value to compute the root for. */ + /* */ + /* <Return> */ + /* The result of `sqrt(x)'. */ + /* */ + /* <Note> */ + /* This function is not very fast. */ + /* */ + FT_BASE( FT_Int32 ) + FT_SqrtFixed( FT_Int32 x ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Sqrt32 */ + /* */ + /* <Description> */ + /* Computes the square root of an Int32 integer (which will be */ + /* handled as an unsigned long value). */ + /* */ + /* <Input> */ + /* x :: The value to compute the root for. */ + /* */ + /* <Return> */ + /* The result of `sqrt(x)'. */ + /* */ + FT_EXPORT( FT_Int32 ) + FT_Sqrt32( FT_Int32 x ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ + /* */ + /*************************************************************************/ + + +#ifdef TT_USE_BYTECODE_INTERPRETER + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv_No_Round */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation `(a*b)/c' */ + /* (without rounding) with maximal accuracy (it uses a 64-bit */ + /* intermediate integer whenever necessary). */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_BASE( FT_Long ) + FT_MulDiv_No_Round( FT_Long a, + FT_Long b, + FT_Long c ); + +#endif /* TT_USE_BYTECODE_INTERPRETER */ + + + /* + * A variant of FT_Matrix_Multiply which scales its result afterwards. + * The idea is that both `a' and `b' are scaled by factors of 10 so that + * the values are as precise as possible to get a correct result during + * the 64bit multiplication. Let `sa' and `sb' be the scaling factors of + * `a' and `b', respectively, then the scaling factor of the result is + * `sa*sb'. + */ + FT_BASE( void ) + FT_Matrix_Multiply_Scaled( const FT_Matrix* a, + FT_Matrix *b, + FT_Long scaling ); + + + /* + * A variant of FT_Vector_Transform. See comments for + * FT_Matrix_Multiply_Scaled. + */ + + FT_BASE( void ) + FT_Vector_Transform_Scaled( FT_Vector* vector, + const FT_Matrix* matrix, + FT_Long scaling ); + + + /* + * Return -1, 0, or +1, depending on the orientation of a given corner. + * We use the Cartesian coordinate system, with positive vertical values + * going upwards. The function returns +1 if the corner turns to the + * left, -1 to the right, and 0 for undecidable cases. + */ + FT_BASE( FT_Int ) + ft_corner_orientation( FT_Pos in_x, + FT_Pos in_y, + FT_Pos out_x, + FT_Pos out_y ); + + /* + * Return TRUE if a corner is flat or nearly flat. This is equivalent to + * saying that the angle difference between the `in' and `out' vectors is + * very small. + */ + FT_BASE( FT_Int ) + ft_corner_is_flat( FT_Pos in_x, + FT_Pos in_y, + FT_Pos out_x, + FT_Pos out_y ); + + +#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) +#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) +#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) +#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) +#define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) +#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 ) + +#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ + : ( -( ( 32 - (x) ) & -64 ) ) ) + + +FT_END_HEADER + +#endif /* __FTCALC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftdebug.h b/contrib/media/updf/include/freetype/internal/ftdebug.h new file mode 100644 index 0000000000..7baae3531d --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftdebug.h @@ -0,0 +1,250 @@ +/***************************************************************************/ +/* */ +/* ftdebug.h */ +/* */ +/* Debugging and logging component (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/* */ +/* IMPORTANT: A description of FreeType's debugging support can be */ +/* found in `docs/DEBUG.TXT'. Read it if you need to use or */ +/* understand this code. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTDEBUG_H__ +#define __FTDEBUG_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */ + /* is already defined; this simplifies the following #ifdefs */ + /* */ +#ifdef FT_DEBUG_LEVEL_TRACE +#undef FT_DEBUG_LEVEL_ERROR +#define FT_DEBUG_LEVEL_ERROR +#endif + + + /*************************************************************************/ + /* */ + /* Define the trace enums as well as the trace levels array when they */ + /* are needed. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_TRACE + +#define FT_TRACE_DEF( x ) trace_ ## x , + + /* defining the enumeration */ + typedef enum FT_Trace_ + { +#include FT_INTERNAL_TRACE_H + trace_count + + } FT_Trace; + + + /* defining the array of trace levels, provided by `src/base/ftdebug.c' */ + extern int ft_trace_levels[trace_count]; + +#undef FT_TRACE_DEF + +#endif /* FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Define the FT_TRACE macro */ + /* */ + /* IMPORTANT! */ + /* */ + /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */ + /* value before using any TRACE macro. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_TRACE + +#define FT_TRACE( level, varformat ) \ + do \ + { \ + if ( ft_trace_levels[FT_COMPONENT] >= level ) \ + FT_Message varformat; \ + } while ( 0 ) + +#else /* !FT_DEBUG_LEVEL_TRACE */ + +#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */ + +#endif /* !FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Trace_Get_Count */ + /* */ + /* <Description> */ + /* Return the number of available trace components. */ + /* */ + /* <Return> */ + /* The number of trace components. 0 if FreeType 2 is not built with */ + /* FT_DEBUG_LEVEL_TRACE definition. */ + /* */ + /* <Note> */ + /* This function may be useful if you want to access elements of */ + /* the internal `ft_trace_levels' array by an index. */ + /* */ + FT_BASE( FT_Int ) + FT_Trace_Get_Count( void ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Trace_Get_Name */ + /* */ + /* <Description> */ + /* Return the name of a trace component. */ + /* */ + /* <Input> */ + /* The index of the trace component. */ + /* */ + /* <Return> */ + /* The name of the trace component. This is a statically allocated */ + /* C string, so do not free it after use. NULL if FreeType 2 is not */ + /* built with FT_DEBUG_LEVEL_TRACE definition. */ + /* */ + /* <Note> */ + /* Use @FT_Trace_Get_Count to get the number of available trace */ + /* components. */ + /* */ + /* This function may be useful if you want to control FreeType 2's */ + /* debug level in your application. */ + /* */ + FT_BASE( const char * ) + FT_Trace_Get_Name( FT_Int idx ); + + + /*************************************************************************/ + /* */ + /* You need two opening and closing parentheses! */ + /* */ + /* Example: FT_TRACE0(( "Value is %i", foo )) */ + /* */ + /* Output of the FT_TRACEX macros is sent to stderr. */ + /* */ + /*************************************************************************/ + +#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat ) +#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat ) +#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat ) +#define FT_TRACE3( varformat ) FT_TRACE( 3, varformat ) +#define FT_TRACE4( varformat ) FT_TRACE( 4, varformat ) +#define FT_TRACE5( varformat ) FT_TRACE( 5, varformat ) +#define FT_TRACE6( varformat ) FT_TRACE( 6, varformat ) +#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat ) + + + /*************************************************************************/ + /* */ + /* Define the FT_ERROR macro. */ + /* */ + /* Output of this macro is sent to stderr. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#define FT_ERROR( varformat ) FT_Message varformat + +#else /* !FT_DEBUG_LEVEL_ERROR */ + +#define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */ + +#endif /* !FT_DEBUG_LEVEL_ERROR */ + + + /*************************************************************************/ + /* */ + /* Define the FT_ASSERT macro. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#define FT_ASSERT( condition ) \ + do \ + { \ + if ( !( condition ) ) \ + FT_Panic( "assertion failed on line %d of file %s\n", \ + __LINE__, __FILE__ ); \ + } while ( 0 ) + +#else /* !FT_DEBUG_LEVEL_ERROR */ + +#define FT_ASSERT( condition ) do { } while ( 0 ) + +#endif /* !FT_DEBUG_LEVEL_ERROR */ + + + /*************************************************************************/ + /* */ + /* Define `FT_Message' and `FT_Panic' when needed. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#include "stdio.h" /* for vfprintf() */ + + /* print a message */ + FT_BASE( void ) + FT_Message( const char* fmt, + ... ); + + /* print a message and exit */ + FT_BASE( void ) + FT_Panic( const char* fmt, + ... ); + +#endif /* FT_DEBUG_LEVEL_ERROR */ + + + FT_BASE( void ) + ft_debug_init( void ); + + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + + /* We disable the warning `conditional expression is constant' here */ + /* in order to compile cleanly with the maximum level of warnings. */ +#pragma warning( disable : 4127 ) + +#endif /* _MSC_VER */ + + +FT_END_HEADER + +#endif /* __FTDEBUG_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftdriver.h b/contrib/media/updf/include/freetype/internal/ftdriver.h new file mode 100644 index 0000000000..1d06997bd1 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftdriver.h @@ -0,0 +1,422 @@ +/***************************************************************************/ +/* */ +/* ftdriver.h */ +/* */ +/* FreeType font driver interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTDRIVER_H__ +#define __FTDRIVER_H__ + + +#include <ft2build.h> +#include FT_MODULE_H + + +FT_BEGIN_HEADER + + + typedef FT_Error + (*FT_Face_InitFunc)( FT_Stream stream, + FT_Face face, + FT_Int typeface_index, + FT_Int num_params, + FT_Parameter* parameters ); + + typedef void + (*FT_Face_DoneFunc)( FT_Face face ); + + + typedef FT_Error + (*FT_Size_InitFunc)( FT_Size size ); + + typedef void + (*FT_Size_DoneFunc)( FT_Size size ); + + + typedef FT_Error + (*FT_Slot_InitFunc)( FT_GlyphSlot slot ); + + typedef void + (*FT_Slot_DoneFunc)( FT_GlyphSlot slot ); + + + typedef FT_Error + (*FT_Size_RequestFunc)( FT_Size size, + FT_Size_Request req ); + + typedef FT_Error + (*FT_Size_SelectFunc)( FT_Size size, + FT_ULong size_index ); + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + typedef FT_Error + (*FT_Size_ResetPointsFunc)( FT_Size size, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + typedef FT_Error + (*FT_Size_ResetPixelsFunc)( FT_Size size, + FT_UInt pixel_width, + FT_UInt pixel_height ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + typedef FT_Error + (*FT_Slot_LoadFunc)( FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + typedef FT_UInt + (*FT_CharMap_CharIndexFunc)( FT_CharMap charmap, + FT_Long charcode ); + + typedef FT_Long + (*FT_CharMap_CharNextFunc)( FT_CharMap charmap, + FT_Long charcode ); + + + typedef FT_Error + (*FT_Face_GetKerningFunc)( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_Vector* kerning ); + + + typedef FT_Error + (*FT_Face_AttachFunc)( FT_Face face, + FT_Stream stream ); + + + typedef FT_Error + (*FT_Face_GetAdvancesFunc)( FT_Face face, + FT_UInt first, + FT_UInt count, + FT_Int32 flags, + FT_Fixed* advances ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Driver_ClassRec */ + /* */ + /* <Description> */ + /* The font driver class. This structure mostly contains pointers to */ + /* driver methods. */ + /* */ + /* <Fields> */ + /* root :: The parent module. */ + /* */ + /* face_object_size :: The size of a face object in bytes. */ + /* */ + /* size_object_size :: The size of a size object in bytes. */ + /* */ + /* slot_object_size :: The size of a glyph object in bytes. */ + /* */ + /* init_face :: The format-specific face constructor. */ + /* */ + /* done_face :: The format-specific face destructor. */ + /* */ + /* init_size :: The format-specific size constructor. */ + /* */ + /* done_size :: The format-specific size destructor. */ + /* */ + /* init_slot :: The format-specific slot constructor. */ + /* */ + /* done_slot :: The format-specific slot destructor. */ + /* */ + /* */ + /* load_glyph :: A function handle to load a glyph to a slot. */ + /* This field is mandatory! */ + /* */ + /* get_kerning :: A function handle to return the unscaled */ + /* kerning for a given pair of glyphs. Can be */ + /* set to 0 if the format doesn't support */ + /* kerning. */ + /* */ + /* attach_file :: This function handle is used to read */ + /* additional data for a face from another */ + /* file/stream. For example, this can be used to */ + /* add data from AFM or PFM files on a Type 1 */ + /* face, or a CIDMap on a CID-keyed face. */ + /* */ + /* get_advances :: A function handle used to return advance */ + /* widths of `count' glyphs (in font units), */ + /* starting at `first'. The `vertical' flag must */ + /* be set to get vertical advance heights. The */ + /* `advances' buffer is caller-allocated. */ + /* Currently not implemented. The idea of this */ + /* function is to be able to perform */ + /* device-independent text layout without loading */ + /* a single glyph image. */ + /* */ + /* request_size :: A handle to a function used to request the new */ + /* character size. Can be set to 0 if the */ + /* scaling done in the base layer suffices. */ + /* */ + /* select_size :: A handle to a function used to select a new */ + /* fixed size. It is used only if */ + /* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */ + /* to 0 if the scaling done in the base layer */ + /* suffices. */ + /* <Note> */ + /* Most function pointers, with the exception of `load_glyph', can be */ + /* set to 0 to indicate a default behaviour. */ + /* */ + typedef struct FT_Driver_ClassRec_ + { + FT_Module_Class root; + + FT_Long face_object_size; + FT_Long size_object_size; + FT_Long slot_object_size; + + FT_Face_InitFunc init_face; + FT_Face_DoneFunc done_face; + + FT_Size_InitFunc init_size; + FT_Size_DoneFunc done_size; + + FT_Slot_InitFunc init_slot; + FT_Slot_DoneFunc done_slot; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_Size_ResetPointsFunc set_char_sizes; + FT_Size_ResetPixelsFunc set_pixel_sizes; + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + FT_Slot_LoadFunc load_glyph; + + FT_Face_GetKerningFunc get_kerning; + FT_Face_AttachFunc attach_file; + FT_Face_GetAdvancesFunc get_advances; + + /* since version 2.2 */ + FT_Size_RequestFunc request_size; + FT_Size_SelectFunc select_size; + + } FT_Driver_ClassRec, *FT_Driver_Class; + + + /* + * The following functions are used as stubs for `set_char_sizes' and + * `set_pixel_sizes'; the code uses `request_size' and `select_size' + * functions instead. + * + * Implementation is in `src/base/ftobjs.c'. + */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_BASE( FT_Error ) + ft_stub_set_char_sizes( FT_Size size, + FT_F26Dot6 width, + FT_F26Dot6 height, + FT_UInt horz_res, + FT_UInt vert_res ); + + FT_BASE( FT_Error ) + ft_stub_set_pixel_sizes( FT_Size size, + FT_UInt width, + FT_UInt height ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_DRIVER */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Driver_ClassRec stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_DRIVER */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Driver_ClassRec struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ + a_, b_, +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) +#endif + +#define FT_DECLARE_DRIVER(class_) \ + FT_CALLBACK_TABLE \ + const FT_Driver_ClassRec class_; + +#define FT_DEFINE_DRIVER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + face_object_size_, size_object_size_, \ + slot_object_size_, init_face_, done_face_, \ + init_size_, done_size_, init_slot_, done_slot_, \ + old_set_char_sizes_, old_set_pixel_sizes_, \ + load_glyph_, get_kerning_, attach_file_, \ + get_advances_, request_size_, select_size_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Driver_ClassRec class_ = \ + { \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ + init_,done_,get_interface_) \ + \ + face_object_size_, \ + size_object_size_, \ + slot_object_size_, \ + \ + init_face_, \ + done_face_, \ + \ + init_size_, \ + done_size_, \ + \ + init_slot_, \ + done_slot_, \ + \ + FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ + \ + load_glyph_, \ + \ + get_kerning_, \ + attach_file_, \ + get_advances_, \ + \ + request_size_, \ + select_size_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ + clazz->set_char_sizes = a_; \ + clazz->set_pixel_sizes = b_; +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) +#endif + +#define FT_DECLARE_DRIVER(class_) FT_DECLARE_MODULE(class_) + +#define FT_DEFINE_DRIVER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + face_object_size_, size_object_size_, \ + slot_object_size_, init_face_, done_face_, \ + init_size_, done_size_, init_slot_, done_slot_, \ + old_set_char_sizes_, old_set_pixel_sizes_, \ + load_glyph_, get_kerning_, attach_file_, \ + get_advances_, request_size_, select_size_ ) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \ + class_##_pic_free( library ); \ + if ( dclazz ) \ + FT_FREE( dclazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Driver_Class clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ + init_,done_,get_interface_) \ + \ + clazz->face_object_size = face_object_size_; \ + clazz->size_object_size = size_object_size_; \ + clazz->slot_object_size = slot_object_size_; \ + \ + clazz->init_face = init_face_; \ + clazz->done_face = done_face_; \ + \ + clazz->init_size = init_size_; \ + clazz->done_size = done_size_; \ + \ + clazz->init_slot = init_slot_; \ + clazz->done_slot = done_slot_; \ + \ + FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ + \ + clazz->load_glyph = load_glyph_; \ + \ + clazz->get_kerning = get_kerning_; \ + clazz->attach_file = attach_file_; \ + clazz->get_advances = get_advances_; \ + \ + clazz->request_size = request_size_; \ + clazz->select_size = select_size_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + return FT_Err_Ok; \ + } + + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __FTDRIVER_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftgloadr.h b/contrib/media/updf/include/freetype/internal/ftgloadr.h new file mode 100644 index 0000000000..ce4dc6c9cc --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftgloadr.h @@ -0,0 +1,168 @@ +/***************************************************************************/ +/* */ +/* ftgloadr.h */ +/* */ +/* The FreeType glyph loader (specification). */ +/* */ +/* Copyright 2002, 2003, 2005, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGLOADR_H__ +#define __FTGLOADR_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphLoader */ + /* */ + /* <Description> */ + /* The glyph loader is an internal object used to load several glyphs */ + /* together (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The glyph loader implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + typedef struct FT_GlyphLoaderRec_* FT_GlyphLoader ; + + +#if 0 /* moved to freetype.h in version 2.2 */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 +#endif + + + typedef struct FT_SubGlyphRec_ + { + FT_Int index; + FT_UShort flags; + FT_Int arg1; + FT_Int arg2; + FT_Matrix transform; + + } FT_SubGlyphRec; + + + typedef struct FT_GlyphLoadRec_ + { + FT_Outline outline; /* outline */ + FT_Vector* extra_points; /* extra points table */ + FT_Vector* extra_points2; /* second extra points table */ + FT_UInt num_subglyphs; /* number of subglyphs */ + FT_SubGlyph subglyphs; /* subglyphs */ + + } FT_GlyphLoadRec, *FT_GlyphLoad; + + + typedef struct FT_GlyphLoaderRec_ + { + FT_Memory memory; + FT_UInt max_points; + FT_UInt max_contours; + FT_UInt max_subglyphs; + FT_Bool use_extra; + + FT_GlyphLoadRec base; + FT_GlyphLoadRec current; + + void* other; /* for possible future extension? */ + + } FT_GlyphLoaderRec; + + + /* create new empty glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_New( FT_Memory memory, + FT_GlyphLoader *aloader ); + + /* add an extra points table to a glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader ); + + /* destroy a glyph loader */ + FT_BASE( void ) + FT_GlyphLoader_Done( FT_GlyphLoader loader ); + + /* reset a glyph loader (frees everything int it) */ + FT_BASE( void ) + FT_GlyphLoader_Reset( FT_GlyphLoader loader ); + + /* rewind a glyph loader */ + FT_BASE( void ) + FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); + + /* check that there is enough space to add `n_points' and `n_contours' */ + /* to the glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, + FT_UInt n_points, + FT_UInt n_contours ); + + +#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ + ( (_count) == 0 || ((_loader)->base.outline.n_points + \ + (_loader)->current.outline.n_points + \ + (unsigned long)(_count)) <= (_loader)->max_points ) + +#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ + ( (_count) == 0 || ((_loader)->base.outline.n_contours + \ + (_loader)->current.outline.n_contours + \ + (unsigned long)(_count)) <= (_loader)->max_contours ) + +#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \ + ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ + FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ + ? 0 \ + : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) ) + + + /* check that there is enough space to add `n_subs' sub-glyphs to */ + /* a glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, + FT_UInt n_subs ); + + /* prepare a glyph loader, i.e. empty the current glyph */ + FT_BASE( void ) + FT_GlyphLoader_Prepare( FT_GlyphLoader loader ); + + /* add the current glyph to the base glyph */ + FT_BASE( void ) + FT_GlyphLoader_Add( FT_GlyphLoader loader ); + + /* copy points from one glyph loader to another */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CopyPoints( FT_GlyphLoader target, + FT_GlyphLoader source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGLOADR_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftmemory.h b/contrib/media/updf/include/freetype/internal/ftmemory.h new file mode 100644 index 0000000000..026aa63eaa --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftmemory.h @@ -0,0 +1,380 @@ +/***************************************************************************/ +/* */ +/* ftmemory.h */ +/* */ +/* The FreeType memory management macros (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMEMORY_H__ +#define __FTMEMORY_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_TYPES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_SET_ERROR */ + /* */ + /* <Description> */ + /* This macro is used to set an implicit `error' variable to a given */ + /* expression's value (usually a function call), and convert it to a */ + /* boolean which is set whenever the value is != 0. */ + /* */ +#undef FT_SET_ERROR +#define FT_SET_ERROR( expression ) \ + ( ( error = (expression) ) != 0 ) + + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** M E M O R Y ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* + * C++ refuses to handle statements like p = (void*)anything, with `p' a + * typed pointer. Since we don't have a `typeof' operator in standard + * C++, we have to use a template to emulate it. + */ + +#ifdef __cplusplus + + extern "C++" + template <typename T> inline T* + cplusplus_typeof( T*, + void *v ) + { + return static_cast <T*> ( v ); + } + +#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) ) + +#else + +#define FT_ASSIGNP( p, val ) (p) = (val) + +#endif + + + +#ifdef FT_DEBUG_MEMORY + + FT_BASE( const char* ) _ft_debug_file; + FT_BASE( long ) _ft_debug_lineno; + +#define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \ + _ft_debug_lineno = __LINE__, \ + (exp) ) + +#define FT_ASSIGNP_INNER( p, exp ) ( _ft_debug_file = __FILE__, \ + _ft_debug_lineno = __LINE__, \ + FT_ASSIGNP( p, exp ) ) + +#else /* !FT_DEBUG_MEMORY */ + +#define FT_DEBUG_INNER( exp ) (exp) +#define FT_ASSIGNP_INNER( p, exp ) FT_ASSIGNP( p, exp ) + +#endif /* !FT_DEBUG_MEMORY */ + + + /* + * The allocation functions return a pointer, and the error code + * is written to through the `p_error' parameter. See below for + * for documentation. + */ + + FT_BASE( FT_Pointer ) + ft_mem_alloc( FT_Memory memory, + FT_Long size, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qalloc( FT_Memory memory, + FT_Long size, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_realloc( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qrealloc( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, + FT_Error *p_error ); + + FT_BASE( void ) + ft_mem_free( FT_Memory memory, + const void* P ); + + +#define FT_MEM_ALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) ) + +#define FT_MEM_FREE( ptr ) \ + FT_BEGIN_STMNT \ + ft_mem_free( memory, (ptr) ); \ + (ptr) = NULL; \ + FT_END_STMNT + +#define FT_MEM_NEW( ptr ) \ + FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) ) + +#define FT_MEM_REALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, 1, \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, (size), &error ) ) + +#define FT_MEM_QNEW( ptr ) \ + FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) ) + +#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, 1, \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (item_size), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), &error ) ) + +#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (item_size), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), &error ) ) + + +#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 ) + + +#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count ) + +#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count ) + +#define FT_MEM_MOVE( dest, source, count ) ft_memmove( dest, source, count ) + + +#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count ) + +#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) ) + + +#define FT_ARRAY_ZERO( dest, count ) \ + FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) ) + +#define FT_ARRAY_COPY( dest, source, count ) \ + FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) ) + +#define FT_ARRAY_MOVE( dest, source, count ) \ + FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) ) + + + /* + * Return the maximum number of addressable elements in an array. + * We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid + * any problems. + */ +#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) ) + +#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) ) + + + /*************************************************************************/ + /* */ + /* The following functions macros expect that their pointer argument is */ + /* _typed_ in order to automatically compute array element sizes. */ + /* */ + +#define FT_MEM_NEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QNEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + + +#define FT_ALLOC( ptr, size ) \ + FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) ) + +#define FT_REALLOC( ptr, cursz, newsz ) \ + FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) ) + +#define FT_ALLOC_MULT( ptr, count, item_size ) \ + FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) ) + +#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt, \ + newcnt, itmsz ) ) + +#define FT_QALLOC( ptr, size ) \ + FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) ) + +#define FT_QREALLOC( ptr, cursz, newsz ) \ + FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) ) + +#define FT_QALLOC_MULT( ptr, count, item_size ) \ + FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) ) + +#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt, \ + newcnt, itmsz ) ) + +#define FT_FREE( ptr ) FT_MEM_FREE( ptr ) + +#define FT_NEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) ) + +#define FT_NEW_ARRAY( ptr, count ) \ + FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) + +#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \ + FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) + +#define FT_QNEW( ptr ) \ + FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) ) + +#define FT_QNEW_ARRAY( ptr, count ) \ + FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) + +#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \ + FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_BASE( FT_Error ) + FT_Alloc( FT_Memory memory, + FT_Long size, + void* *P ); + + FT_BASE( FT_Error ) + FT_QAlloc( FT_Memory memory, + FT_Long size, + void* *p ); + + FT_BASE( FT_Error ) + FT_Realloc( FT_Memory memory, + FT_Long current, + FT_Long size, + void* *P ); + + FT_BASE( FT_Error ) + FT_QRealloc( FT_Memory memory, + FT_Long current, + FT_Long size, + void* *p ); + + FT_BASE( void ) + FT_Free( FT_Memory memory, + void* *P ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + FT_BASE( FT_Pointer ) + ft_mem_strdup( FT_Memory memory, + const char* str, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_dup( FT_Memory memory, + const void* address, + FT_ULong size, + FT_Error *p_error ); + +#define FT_MEM_STRDUP( dst, str ) \ + (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error ) + +#define FT_STRDUP( dst, str ) \ + FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) ) + +#define FT_MEM_DUP( dst, address, size ) \ + (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error ) + +#define FT_DUP( dst, address, size ) \ + FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) ) + + + /* Return >= 1 if a truncation occurs. */ + /* Return 0 if the source string fits the buffer. */ + /* This is *not* the same as strlcpy(). */ + FT_BASE( FT_Int ) + ft_mem_strcpyn( char* dst, + const char* src, + FT_ULong size ); + +#define FT_STRCPYN( dst, src, size ) \ + ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) ) + + /* */ + + +FT_END_HEADER + +#endif /* __FTMEMORY_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftobjs.h b/contrib/media/updf/include/freetype/internal/ftobjs.h new file mode 100644 index 0000000000..670eb78a84 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftobjs.h @@ -0,0 +1,1428 @@ +/***************************************************************************/ +/* */ +/* ftobjs.h */ +/* */ +/* The FreeType private base classes (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of all internal FreeType classes. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTOBJS_H__ +#define __FTOBJS_H__ + +#include <ft2build.h> +#include FT_RENDER_H +#include FT_SIZES_H +#include FT_LCD_FILTER_H +#include FT_INTERNAL_MEMORY_H +#include FT_INTERNAL_GLYPH_LOADER_H +#include FT_INTERNAL_DRIVER_H +#include FT_INTERNAL_AUTOHINT_H +#include FT_INTERNAL_SERVICE_H +#include FT_INTERNAL_PIC_H + +#ifdef FT_CONFIG_OPTION_INCREMENTAL +#include FT_INCREMENTAL_H +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* Some generic definitions. */ + /* */ +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL (void*)0 +#endif + + + /*************************************************************************/ + /* */ + /* The min and max functions missing in C. As usual, be careful not to */ + /* write things like FT_MIN( a++, b++ ) to avoid side effects. */ + /* */ +#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) ) +#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) ) + +#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) + + +#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) ) +#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n ) +#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n ) + +#define FT_PIX_FLOOR( x ) ( (x) & ~63 ) +#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 ) +#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 ) + + + /* + * Return the highest power of 2 that is <= value; this correspond to + * the highest bit in a given 32-bit value. + */ + FT_BASE( FT_UInt32 ) + ft_highpow2( FT_UInt32 value ); + + + /* + * character classification functions -- since these are used to parse + * font files, we must not use those in <ctypes.h> which are + * locale-dependent + */ +#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U ) + +#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \ + ( (unsigned)(x) - 'a' ) < 6U || \ + ( (unsigned)(x) - 'A' ) < 6U ) + + /* the next two macros assume ASCII representation */ +#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U ) +#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U ) + +#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) ) +#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) ) + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** C H A R M A P S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* handle to internal charmap object */ + typedef struct FT_CMapRec_* FT_CMap; + + /* handle to charmap class structure */ + typedef const struct FT_CMap_ClassRec_* FT_CMap_Class; + + /* internal charmap object structure */ + typedef struct FT_CMapRec_ + { + FT_CharMapRec charmap; + FT_CMap_Class clazz; + + } FT_CMapRec; + + /* typecase any pointer to a charmap handle */ +#define FT_CMAP( x ) ((FT_CMap)( x )) + + /* obvious macros */ +#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id +#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id +#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding +#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face + + + /* class method definitions */ + typedef FT_Error + (*FT_CMap_InitFunc)( FT_CMap cmap, + FT_Pointer init_data ); + + typedef void + (*FT_CMap_DoneFunc)( FT_CMap cmap ); + + typedef FT_UInt + (*FT_CMap_CharIndexFunc)( FT_CMap cmap, + FT_UInt32 char_code ); + + typedef FT_UInt + (*FT_CMap_CharNextFunc)( FT_CMap cmap, + FT_UInt32 *achar_code ); + + typedef FT_UInt + (*FT_CMap_CharVarIndexFunc)( FT_CMap cmap, + FT_CMap unicode_cmap, + FT_UInt32 char_code, + FT_UInt32 variant_selector ); + + typedef FT_Bool + (*FT_CMap_CharVarIsDefaultFunc)( FT_CMap cmap, + FT_UInt32 char_code, + FT_UInt32 variant_selector ); + + typedef FT_UInt32 * + (*FT_CMap_VariantListFunc)( FT_CMap cmap, + FT_Memory mem ); + + typedef FT_UInt32 * + (*FT_CMap_CharVariantListFunc)( FT_CMap cmap, + FT_Memory mem, + FT_UInt32 char_code ); + + typedef FT_UInt32 * + (*FT_CMap_VariantCharListFunc)( FT_CMap cmap, + FT_Memory mem, + FT_UInt32 variant_selector ); + + + typedef struct FT_CMap_ClassRec_ + { + FT_ULong size; + FT_CMap_InitFunc init; + FT_CMap_DoneFunc done; + FT_CMap_CharIndexFunc char_index; + FT_CMap_CharNextFunc char_next; + + /* Subsequent entries are special ones for format 14 -- the variant */ + /* selector subtable which behaves like no other */ + + FT_CMap_CharVarIndexFunc char_var_index; + FT_CMap_CharVarIsDefaultFunc char_var_default; + FT_CMap_VariantListFunc variant_list; + FT_CMap_CharVariantListFunc charvariant_list; + FT_CMap_VariantCharListFunc variantchar_list; + + } FT_CMap_ClassRec; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_CMAP_CLASS(class_) \ + FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; + +#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ + char_next_, char_var_index_, char_var_default_, variant_list_, \ + charvariant_list_, variantchar_list_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_CMap_ClassRec class_ = \ + { \ + size_, init_, done_, char_index_, char_next_, char_var_index_, \ + char_var_default_, variant_list_, charvariant_list_, variantchar_list_ \ + }; +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_CMAP_CLASS(class_) \ + void FT_Init_Class_##class_( FT_Library library, FT_CMap_ClassRec* clazz); + +#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ + char_next_, char_var_index_, char_var_default_, variant_list_, \ + charvariant_list_, variantchar_list_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_CMap_ClassRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->size = size_; \ + clazz->init = init_; \ + clazz->done = done_; \ + clazz->char_index = char_index_; \ + clazz->char_next = char_next_; \ + clazz->char_var_index = char_var_index_; \ + clazz->char_var_default = char_var_default_; \ + clazz->variant_list = variant_list_; \ + clazz->charvariant_list = charvariant_list_; \ + clazz->variantchar_list = variantchar_list_; \ + } +#endif /* FT_CONFIG_OPTION_PIC */ + + /* create a new charmap and add it to charmap->face */ + FT_BASE( FT_Error ) + FT_CMap_New( FT_CMap_Class clazz, + FT_Pointer init_data, + FT_CharMap charmap, + FT_CMap *acmap ); + + /* destroy a charmap and remove it from face's list */ + FT_BASE( void ) + FT_CMap_Done( FT_CMap cmap ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Face_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_Face */ + /* object. These fields may change between different releases of */ + /* FreeType. */ + /* */ + /* <Fields> */ + /* max_points :: */ + /* The maximal number of points used to store the vectorial outline */ + /* of any glyph in this face. If this value cannot be known in */ + /* advance, or if the face isn't scalable, this should be set to 0. */ + /* Only relevant for scalable formats. */ + /* */ + /* max_contours :: */ + /* The maximal number of contours used to store the vectorial */ + /* outline of any glyph in this face. If this value cannot be */ + /* known in advance, or if the face isn't scalable, this should be */ + /* set to 0. Only relevant for scalable formats. */ + /* */ + /* transform_matrix :: */ + /* A 2x2 matrix of 16.16 coefficients used to transform glyph */ + /* outlines after they are loaded from the font. Only used by the */ + /* convenience functions. */ + /* */ + /* transform_delta :: */ + /* A translation vector used to transform glyph outlines after they */ + /* are loaded from the font. Only used by the convenience */ + /* functions. */ + /* */ + /* transform_flags :: */ + /* Some flags used to classify the transform. Only used by the */ + /* convenience functions. */ + /* */ + /* services :: */ + /* A cache for frequently used services. It should be only */ + /* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. */ + /* */ + /* incremental_interface :: */ + /* If non-null, the interface through which glyph data and metrics */ + /* are loaded incrementally for faces that do not provide all of */ + /* this data when first opened. This field exists only if */ + /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ + /* */ + /* ignore_unpatented_hinter :: */ + /* This boolean flag instructs the glyph loader to ignore the */ + /* native font hinter, if one is found. This is exclusively used */ + /* in the case when the unpatented hinter is compiled within the */ + /* library. */ + /* */ + /* refcount :: */ + /* A counter initialized to~1 at the time an @FT_Face structure is */ + /* created. @FT_Reference_Face increments this counter, and */ + /* @FT_Done_Face only destroys a face if the counter is~1, */ + /* otherwise it simply decrements it. */ + /* */ + typedef struct FT_Face_InternalRec_ + { +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_UShort reserved1; + FT_Short reserved2; +#endif + FT_Matrix transform_matrix; + FT_Vector transform_delta; + FT_Int transform_flags; + + FT_ServiceCacheRec services; + +#ifdef FT_CONFIG_OPTION_INCREMENTAL + FT_Incremental_InterfaceRec* incremental_interface; +#endif + + FT_Bool ignore_unpatented_hinter; + FT_UInt refcount; + + } FT_Face_InternalRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Slot_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_GlyphSlot */ + /* object. These fields may change between different releases of */ + /* FreeType. */ + /* */ + /* <Fields> */ + /* loader :: The glyph loader object used to load outlines */ + /* into the glyph slot. */ + /* */ + /* flags :: Possible values are zero or */ + /* FT_GLYPH_OWN_BITMAP. The latter indicates */ + /* that the FT_GlyphSlot structure owns the */ + /* bitmap buffer. */ + /* */ + /* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */ + /* must be transformed through a specific */ + /* font transformation. This is _not_ the same */ + /* as the face transform set through */ + /* FT_Set_Transform(). */ + /* */ + /* glyph_matrix :: The 2x2 matrix corresponding to the glyph */ + /* transformation, if necessary. */ + /* */ + /* glyph_delta :: The 2d translation vector corresponding to */ + /* the glyph transformation, if necessary. */ + /* */ + /* glyph_hints :: Format-specific glyph hints management. */ + /* */ + +#define FT_GLYPH_OWN_BITMAP 0x1 + + typedef struct FT_Slot_InternalRec_ + { + FT_GlyphLoader loader; + FT_UInt flags; + FT_Bool glyph_transformed; + FT_Matrix glyph_matrix; + FT_Vector glyph_delta; + void* glyph_hints; + + } FT_GlyphSlot_InternalRec; + + +#if 0 + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_Size */ + /* object. Currently, it's empty. */ + /* */ + /*************************************************************************/ + + typedef struct FT_Size_InternalRec_ + { + /* empty */ + + } FT_Size_InternalRec; + +#endif + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** M O D U L E S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ModuleRec */ + /* */ + /* <Description> */ + /* A module object instance. */ + /* */ + /* <Fields> */ + /* clazz :: A pointer to the module's class. */ + /* */ + /* library :: A handle to the parent library object. */ + /* */ + /* memory :: A handle to the memory manager. */ + /* */ + /* generic :: A generic structure for user-level extensibility (?). */ + /* */ + typedef struct FT_ModuleRec_ + { + FT_Module_Class* clazz; + FT_Library library; + FT_Memory memory; + FT_Generic generic; + + } FT_ModuleRec; + + + /* typecast an object to a FT_Module */ +#define FT_MODULE( x ) ((FT_Module)( x )) +#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz +#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library +#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory + + +#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_FONT_DRIVER ) + +#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_RENDERER ) + +#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_HINTER ) + +#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_STYLER ) + +#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_SCALABLE ) + +#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_NO_OUTLINES ) + +#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_HAS_HINTER ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module_Interface */ + /* */ + /* <Description> */ + /* Finds a module and returns its specific interface as a typeless */ + /* pointer. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module-specific interface if available, 0 otherwise. */ + /* */ + /* <Note> */ + /* You should better be familiar with FreeType internals to know */ + /* which module to look for, and what its interface is :-) */ + /* */ + FT_BASE( const void* ) + FT_Get_Module_Interface( FT_Library library, + const char* mod_name ); + + FT_BASE( FT_Pointer ) + ft_module_get_service( FT_Module module, + const char* service_id ); + + /* */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* a few macros used to perform easy typecasts with minimal brain damage */ + +#define FT_FACE( x ) ((FT_Face)(x)) +#define FT_SIZE( x ) ((FT_Size)(x)) +#define FT_SLOT( x ) ((FT_GlyphSlot)(x)) + +#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver +#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library +#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory +#define FT_FACE_STREAM( x ) FT_FACE( x )->stream + +#define FT_SIZE_FACE( x ) FT_SIZE( x )->face +#define FT_SLOT_FACE( x ) FT_SLOT( x )->face + +#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph +#define FT_FACE_SIZE( x ) FT_FACE( x )->size + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_GlyphSlot */ + /* */ + /* <Description> */ + /* It is sometimes useful to have more than one glyph slot for a */ + /* given face object. This function is used to create additional */ + /* slots. All of them are automatically discarded when the face is */ + /* destroyed. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* aslot :: A handle to a new glyph slot object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + FT_BASE( FT_Error ) + FT_New_GlyphSlot( FT_Face face, + FT_GlyphSlot *aslot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_GlyphSlot */ + /* */ + /* <Description> */ + /* Destroys a given glyph slot. Remember however that all slots are */ + /* automatically destroyed with its parent. Using this function is */ + /* not always mandatory. */ + /* */ + /* <Input> */ + /* slot :: A handle to a target glyph slot. */ + /* */ + FT_BASE( void ) + FT_Done_GlyphSlot( FT_GlyphSlot slot ); + + /* */ + +#define FT_REQUEST_WIDTH( req ) \ + ( (req)->horiResolution \ + ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \ + : (req)->width ) + +#define FT_REQUEST_HEIGHT( req ) \ + ( (req)->vertResolution \ + ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \ + : (req)->height ) + + + /* Set the metrics according to a bitmap strike. */ + FT_BASE( void ) + FT_Select_Metrics( FT_Face face, + FT_ULong strike_index ); + + + /* Set the metrics according to a size request. */ + FT_BASE( void ) + FT_Request_Metrics( FT_Face face, + FT_Size_Request req ); + + + /* Match a size request against `available_sizes'. */ + FT_BASE( FT_Error ) + FT_Match_Size( FT_Face face, + FT_Size_Request req, + FT_Bool ignore_width, + FT_ULong* size_index ); + + + /* Use the horizontal metrics to synthesize the vertical metrics. */ + /* If `advance' is zero, it is also synthesized. */ + FT_BASE( void ) + ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics, + FT_Pos advance ); + + + /* Free the bitmap of a given glyphslot when needed (i.e., only when it */ + /* was allocated with ft_glyphslot_alloc_bitmap). */ + FT_BASE( void ) + ft_glyphslot_free_bitmap( FT_GlyphSlot slot ); + + + /* Allocate a new bitmap buffer in a glyph slot. */ + FT_BASE( FT_Error ) + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, + FT_ULong size ); + + + /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ + /* will not be freed by a later call to ft_glyphslot_free_bitmap. */ + FT_BASE( void ) + ft_glyphslot_set_bitmap( FT_GlyphSlot slot, + FT_Byte* buffer ); + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** R E N D E R E R S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#define FT_RENDERER( x ) ((FT_Renderer)( x )) +#define FT_GLYPH( x ) ((FT_Glyph)( x )) +#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x )) +#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) + + + typedef struct FT_RendererRec_ + { + FT_ModuleRec root; + FT_Renderer_Class* clazz; + FT_Glyph_Format glyph_format; + FT_Glyph_Class glyph_class; + + FT_Raster raster; + FT_Raster_Render_Func raster_render; + FT_Renderer_RenderFunc render; + + } FT_RendererRec; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** F O N T D R I V E R S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* typecast a module into a driver easily */ +#define FT_DRIVER( x ) ((FT_Driver)(x)) + + /* typecast a module as a driver, and get its driver class */ +#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_DriverRec */ + /* */ + /* <Description> */ + /* The root font driver class. A font driver is responsible for */ + /* managing and loading font files of a given format. */ + /* */ + /* <Fields> */ + /* root :: Contains the fields of the root module class. */ + /* */ + /* clazz :: A pointer to the font driver's class. Note that */ + /* this is NOT root.clazz. `class' wasn't used */ + /* as it is a reserved word in C++. */ + /* */ + /* faces_list :: The list of faces currently opened by this */ + /* driver. */ + /* */ + /* extensions :: A typeless pointer to the driver's extensions */ + /* registry, if they are supported through the */ + /* configuration macro FT_CONFIG_OPTION_EXTENSIONS. */ + /* */ + /* glyph_loader :: The glyph loader for all faces managed by this */ + /* driver. This object isn't defined for unscalable */ + /* formats. */ + /* */ + typedef struct FT_DriverRec_ + { + FT_ModuleRec root; + FT_Driver_Class clazz; + + FT_ListRec faces_list; + void* extensions; + + FT_GlyphLoader glyph_loader; + + } FT_DriverRec; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** L I B R A R I E S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* This hook is used by the TrueType debugger. It must be set to an */ + /* alternate truetype bytecode interpreter function. */ +#define FT_DEBUG_HOOK_TRUETYPE 0 + + + /* Set this debug hook to a non-null pointer to force unpatented hinting */ + /* for all faces when both TT_USE_BYTECODE_INTERPRETER and */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. This is only used */ + /* during debugging. */ +#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1 + + + typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, + FT_Render_Mode render_mode, + FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_LibraryRec */ + /* */ + /* <Description> */ + /* The FreeType library class. This is the root of all FreeType */ + /* data. Use FT_New_Library() to create a library object, and */ + /* FT_Done_Library() to discard it and all child objects. */ + /* */ + /* <Fields> */ + /* memory :: The library's memory object. Manages memory */ + /* allocation. */ + /* */ + /* generic :: Client data variable. Used to extend the */ + /* Library class by higher levels and clients. */ + /* */ + /* version_major :: The major version number of the library. */ + /* */ + /* version_minor :: The minor version number of the library. */ + /* */ + /* version_patch :: The current patch level of the library. */ + /* */ + /* num_modules :: The number of modules currently registered */ + /* within this library. This is set to 0 for new */ + /* libraries. New modules are added through the */ + /* FT_Add_Module() API function. */ + /* */ + /* modules :: A table used to store handles to the currently */ + /* registered modules. Note that each font driver */ + /* contains a list of its opened faces. */ + /* */ + /* renderers :: The list of renderers currently registered */ + /* within the library. */ + /* */ + /* cur_renderer :: The current outline renderer. This is a */ + /* shortcut used to avoid parsing the list on */ + /* each call to FT_Outline_Render(). It is a */ + /* handle to the current renderer for the */ + /* FT_GLYPH_FORMAT_OUTLINE format. */ + /* */ + /* auto_hinter :: XXX */ + /* */ + /* raster_pool :: The raster object's render pool. This can */ + /* ideally be changed dynamically at run-time. */ + /* */ + /* raster_pool_size :: The size of the render pool in bytes. */ + /* */ + /* debug_hooks :: XXX */ + /* */ + /* lcd_filter :: If subpixel rendering is activated, the */ + /* selected LCD filter mode. */ + /* */ + /* lcd_extra :: If subpixel rendering is activated, the number */ + /* of extra pixels needed for the LCD filter. */ + /* */ + /* lcd_weights :: If subpixel rendering is activated, the LCD */ + /* filter weights, if any. */ + /* */ + /* lcd_filter_func :: If subpixel rendering is activated, the LCD */ + /* filtering callback function. */ + /* */ + /* pic_container :: Contains global structs and tables, instead */ + /* of defining them globallly. */ + /* */ + /* refcount :: A counter initialized to~1 at the time an */ + /* @FT_Library structure is created. */ + /* @FT_Reference_Library increments this counter, */ + /* and @FT_Done_Library only destroys a library */ + /* if the counter is~1, otherwise it simply */ + /* decrements it. */ + /* */ + typedef struct FT_LibraryRec_ + { + FT_Memory memory; /* library's memory manager */ + + FT_Generic generic; + + FT_Int version_major; + FT_Int version_minor; + FT_Int version_patch; + + FT_UInt num_modules; + FT_Module modules[FT_MAX_MODULES]; /* module objects */ + + FT_ListRec renderers; /* list of renderers */ + FT_Renderer cur_renderer; /* current outline renderer */ + FT_Module auto_hinter; + + FT_Byte* raster_pool; /* scan-line conversion */ + /* render pool */ + FT_ULong raster_pool_size; /* size of render pool in bytes */ + + FT_DebugHook_Func debug_hooks[4]; + +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_LcdFilter lcd_filter; + FT_Int lcd_extra; /* number of extra pixels */ + FT_Byte lcd_weights[7]; /* filter weights, if any */ + FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ +#endif + +#ifdef FT_CONFIG_OPTION_PIC + FT_PIC_Container pic_container; +#endif + + FT_UInt refcount; + + } FT_LibraryRec; + + + FT_BASE( FT_Renderer ) + FT_Lookup_Renderer( FT_Library library, + FT_Glyph_Format format, + FT_ListNode* node ); + + FT_BASE( FT_Error ) + FT_Render_Glyph_Internal( FT_Library library, + FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + typedef const char* + (*FT_Face_GetPostscriptNameFunc)( FT_Face face ); + + typedef FT_Error + (*FT_Face_GetGlyphNameFunc)( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + typedef FT_UInt + (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, + FT_String* glyph_name ); + + +#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory */ + /* */ + /* <Description> */ + /* Creates a new memory object. */ + /* */ + /* <Return> */ + /* A pointer to the new memory object. 0 in case of error. */ + /* */ + FT_BASE( FT_Memory ) + FT_New_Memory( void ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Memory */ + /* */ + /* <Description> */ + /* Discards memory manager. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* */ + FT_BASE( void ) + FT_Done_Memory( FT_Memory memory ); + +#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ + + + /* Define default raster's interface. The default raster is located in */ + /* `src/base/ftraster.c'. */ + /* */ + /* Client applications can register new rasters through the */ + /* FT_Set_Raster() API. */ + +#ifndef FT_NO_DEFAULT_RASTER + FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; +#endif + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftimage.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_OUTLINE_FUNCS */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Outline_Funcs struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ + cubic_to_, shift_, delta_) \ + static const FT_Outline_Funcs class_ = \ + { \ + move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ + cubic_to_, shift_, delta_) \ + static FT_Error \ + Init_Class_##class_( FT_Outline_Funcs* clazz ) \ + { \ + clazz->move_to = move_to_; \ + clazz->line_to = line_to_; \ + clazz->conic_to = conic_to_; \ + clazz->cubic_to = cubic_to_; \ + clazz->shift = shift_; \ + clazz->delta = delta_; \ + return FT_Err_Ok; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_RASTER_FUNCS */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Raster_Funcs struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ + raster_reset_, raster_set_mode_, \ + raster_render_, raster_done_) \ + const FT_Raster_Funcs class_ = \ + { \ + glyph_format_, raster_new_, raster_reset_, \ + raster_set_mode_, raster_render_, raster_done_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ + raster_reset_, raster_set_mode_, raster_render_, raster_done_) \ + void \ + FT_Init_Class_##class_( FT_Raster_Funcs* clazz ) \ + { \ + clazz->glyph_format = glyph_format_; \ + clazz->raster_new = raster_new_; \ + clazz->raster_reset = raster_reset_; \ + clazz->raster_set_mode = raster_set_mode_; \ + clazz->raster_render = raster_render_; \ + clazz->raster_done = raster_done_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftrender.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_GLYPH */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Glyph_Class struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ + transform_, bbox_, prepare_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Glyph_Class class_ = \ + { \ + size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ + transform_, bbox_, prepare_) \ + void \ + FT_Init_Class_##class_( FT_Glyph_Class* clazz ) \ + { \ + clazz->glyph_size = size_; \ + clazz->glyph_format = format_; \ + clazz->glyph_init = init_; \ + clazz->glyph_done = done_; \ + clazz->glyph_copy = copy_; \ + clazz->glyph_transform = transform_; \ + clazz->glyph_bbox = bbox_; \ + clazz->glyph_prepare = prepare_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_RENDERER */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Renderer_Class stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_RENDERER */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Renderer_Class struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_RENDERER(class_) \ + FT_EXPORT_VAR( const FT_Renderer_Class ) class_; + +#define FT_DEFINE_RENDERER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + glyph_format_, render_glyph_, transform_glyph_, \ + get_glyph_cbox_, set_mode_, raster_class_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Renderer_Class class_ = \ + { \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ + interface_,init_,done_,get_interface_) \ + glyph_format_, \ + \ + render_glyph_, \ + transform_glyph_, \ + get_glyph_cbox_, \ + set_mode_, \ + \ + raster_class_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_) + +#define FT_DEFINE_RENDERER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + glyph_format_, render_glyph_, transform_glyph_, \ + get_glyph_cbox_, set_mode_, raster_class_ ) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ + FT_Memory memory = library->memory; \ + class_##_pic_free( library ); \ + if ( rclazz ) \ + FT_FREE( rclazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Renderer_Class* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ + interface_,init_,done_,get_interface_) \ + \ + clazz->glyph_format = glyph_format_; \ + \ + clazz->render_glyph = render_glyph_; \ + clazz->transform_glyph = transform_glyph_; \ + clazz->get_glyph_cbox = get_glyph_cbox_; \ + clazz->set_mode = set_mode_; \ + \ + clazz->raster_class = raster_class_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + return FT_Err_Ok; \ + } + + + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftmodapi.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#ifdef FT_CONFIG_OPTION_PIC + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Creator */ + /* */ + /* <Description> */ + /* A function used to create (allocate) a new module class object. */ + /* The object's members are initialized, but the module itself is */ + /* not. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* output_class :: Initialized with the newly allocated class. */ + /* */ + typedef FT_Error + (*FT_Module_Creator)( FT_Memory memory, + FT_Module_Class** output_class ); + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destroyer */ + /* */ + /* <Description> */ + /* A function used to destroy (deallocate) a module class object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* clazz :: Module class to destroy. */ + /* */ + typedef void + (*FT_Module_Destroyer)( FT_Memory memory, + FT_Module_Class* clazz ); + +#endif + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_MODULE */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Module_Class stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_MODULE */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Module_Class struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ + /* <Macro> */ + /* FT_DEFINE_ROOT_MODULE */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Module_Class struct inside */ + /* another stract that contains it or in a function that initializes */ + /* that containing stract */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_MODULE(class_) \ + FT_CALLBACK_TABLE \ + const FT_Module_Class class_; \ + +#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ + }, + +#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Module_Class class_ = \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ + }; + + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_MODULE(class_) \ + FT_Error FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ); \ + void FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ); + +#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + clazz->root.module_flags = flags_; \ + clazz->root.module_size = size_; \ + clazz->root.module_name = name_; \ + clazz->root.module_version = version_; \ + clazz->root.module_requires = requires_; \ + \ + clazz->root.module_interface = interface_; \ + \ + clazz->root.module_init = init_; \ + clazz->root.module_done = done_; \ + clazz->root.get_interface = get_interface_; + +#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + class_##_pic_free( library ); \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Module_Class* clazz; \ + FT_Error error; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + clazz->module_flags = flags_; \ + clazz->module_size = size_; \ + clazz->module_name = name_; \ + clazz->module_version = version_; \ + clazz->module_requires = requires_; \ + \ + clazz->module_interface = interface_; \ + \ + clazz->module_init = init_; \ + clazz->module_done = done_; \ + clazz->get_interface = get_interface_; \ + \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + +FT_END_HEADER + +#endif /* __FTOBJS_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftpic.h b/contrib/media/updf/include/freetype/internal/ftpic.h new file mode 100644 index 0000000000..1b31957d70 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftpic.h @@ -0,0 +1,67 @@ +/***************************************************************************/ +/* */ +/* ftpic.h */ +/* */ +/* The FreeType position independent code services (declaration). */ +/* */ +/* Copyright 2009 by */ +/* Oran Agra and Mickey Gabel. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Modules that ordinarily have const global data that need address */ + /* can instead define pointers here. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTPIC_H__ +#define __FTPIC_H__ + + +FT_BEGIN_HEADER + +#ifdef FT_CONFIG_OPTION_PIC + + typedef struct FT_PIC_Container_ + { + /* pic containers for base */ + void* base; + /* pic containers for modules */ + void* autofit; + void* cff; + void* pshinter; + void* psnames; + void* raster; + void* sfnt; + void* smooth; + void* truetype; + } FT_PIC_Container; + + /* Initialize the various function tables, structs, etc. stored in the container. */ + FT_BASE( FT_Error ) + ft_pic_container_init( FT_Library library ); + + + /* Destroy the contents of the container. */ + FT_BASE( void ) + ft_pic_container_destroy( FT_Library library ); + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + +FT_END_HEADER + +#endif /* __FTPIC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftrfork.h b/contrib/media/updf/include/freetype/internal/ftrfork.h new file mode 100644 index 0000000000..aa573c8705 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftrfork.h @@ -0,0 +1,196 @@ +/***************************************************************************/ +/* */ +/* ftrfork.h */ +/* */ +/* Embedded resource forks accessor (specification). */ +/* */ +/* Copyright 2004, 2006, 2007 by */ +/* Masatake YAMATO and Redhat K.K. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* Development of the code in this file is support of */ +/* Information-technology Promotion Agency, Japan. */ +/***************************************************************************/ + + +#ifndef __FTRFORK_H__ +#define __FTRFORK_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + + /* Number of guessing rules supported in `FT_Raccess_Guess'. */ + /* Don't forget to increment the number if you add a new guessing rule. */ +#define FT_RACCESS_N_RULES 9 + + + /* A structure to describe a reference in a resource by its resource ID */ + /* and internal offset. The `POST' resource expects to be concatenated */ + /* by the order of resource IDs instead of its appearance in the file. */ + + typedef struct FT_RFork_Ref_ + { + FT_UShort res_id; + FT_ULong offset; + + } FT_RFork_Ref; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Guess */ + /* */ + /* <Description> */ + /* Guess a file name and offset where the actual resource fork is */ + /* stored. The macro FT_RACCESS_N_RULES holds the number of */ + /* guessing rules; the guessed result for the Nth rule is */ + /* represented as a triplet: a new file name (new_names[N]), a file */ + /* offset (offsets[N]), and an error code (errors[N]). */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* base_name :: */ + /* The (base) file name of the resource fork used for some */ + /* guessing rules. */ + /* */ + /* <Output> */ + /* new_names :: */ + /* An array of guessed file names in which the resource forks may */ + /* exist. If `new_names[N]' is NULL, the guessed file name is */ + /* equal to `base_name'. */ + /* */ + /* offsets :: */ + /* An array of guessed file offsets. `offsets[N]' holds the file */ + /* offset of the possible start of the resource fork in file */ + /* `new_names[N]'. */ + /* */ + /* errors :: */ + /* An array of FreeType error codes. `errors[N]' is the error */ + /* code of Nth guessing rule function. If `errors[N]' is not */ + /* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */ + /* */ + FT_BASE( void ) + FT_Raccess_Guess( FT_Library library, + FT_Stream stream, + char* base_name, + char** new_names, + FT_Long* offsets, + FT_Error* errors ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Get_HeaderInfo */ + /* */ + /* <Description> */ + /* Get the information from the header of resource fork. The */ + /* information includes the file offset where the resource map */ + /* starts, and the file offset where the resource data starts. */ + /* `FT_Raccess_Get_DataOffsets' requires these two data. */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* rfork_offset :: */ + /* The file offset where the resource fork starts. */ + /* */ + /* <Output> */ + /* map_offset :: */ + /* The file offset where the resource map starts. */ + /* */ + /* rdata_pos :: */ + /* The file offset where the resource data starts. */ + /* */ + /* <Return> */ + /* FreeType error code. FT_Err_Ok means success. */ + /* */ + FT_BASE( FT_Error ) + FT_Raccess_Get_HeaderInfo( FT_Library library, + FT_Stream stream, + FT_Long rfork_offset, + FT_Long *map_offset, + FT_Long *rdata_pos ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Get_DataOffsets */ + /* */ + /* <Description> */ + /* Get the data offsets for a tag in a resource fork. Offsets are */ + /* stored in an array because, in some cases, resources in a resource */ + /* fork have the same tag. */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* map_offset :: */ + /* The file offset where the resource map starts. */ + /* */ + /* rdata_pos :: */ + /* The file offset where the resource data starts. */ + /* */ + /* tag :: */ + /* The resource tag. */ + /* */ + /* <Output> */ + /* offsets :: */ + /* The stream offsets for the resource data specified by `tag'. */ + /* This array is allocated by the function, so you have to call */ + /* @ft_mem_free after use. */ + /* */ + /* count :: */ + /* The length of offsets array. */ + /* */ + /* <Return> */ + /* FreeType error code. FT_Err_Ok means success. */ + /* */ + /* <Note> */ + /* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */ + /* value for `map_offset' and `rdata_pos'. */ + /* */ + FT_BASE( FT_Error ) + FT_Raccess_Get_DataOffsets( FT_Library library, + FT_Stream stream, + FT_Long map_offset, + FT_Long rdata_pos, + FT_Long tag, + FT_Long **offsets, + FT_Long *count ); + + +FT_END_HEADER + +#endif /* __FTRFORK_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftserv.h b/contrib/media/updf/include/freetype/internal/ftserv.h new file mode 100644 index 0000000000..569b9f7e0e --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftserv.h @@ -0,0 +1,620 @@ +/***************************************************************************/ +/* */ +/* ftserv.h */ +/* */ +/* The FreeType services (specification only). */ +/* */ +/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Each module can export one or more `services'. Each service is */ + /* identified by a constant string and modeled by a pointer; the latter */ + /* generally corresponds to a structure containing function pointers. */ + /* */ + /* Note that a service's data cannot be a mere function pointer because */ + /* in C it is possible that function pointers might be implemented */ + /* differently than data pointers (e.g. 48 bits instead of 32). */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSERV_H__ +#define __FTSERV_H__ + + +FT_BEGIN_HEADER + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + + /* we disable the warning `conditional expression is constant' here */ + /* in order to compile cleanly with the maximum level of warnings */ +#pragma warning( disable : 4127 ) + +#endif /* _MSC_VER */ + + /* + * @macro: + * FT_FACE_FIND_SERVICE + * + * @description: + * This macro is used to look up a service from a face's driver module. + * + * @input: + * face :: + * The source face handle. + * + * id :: + * A string describing the service as defined in the service's + * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to + * `multi-masters'). It is automatically prefixed with + * `FT_SERVICE_ID_'. + * + * @output: + * ptr :: + * A variable that receives the service pointer. Will be NULL + * if not found. + */ +#ifdef __cplusplus + +#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_ = NULL; \ + FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ + \ + \ + if ( module->clazz->get_interface ) \ + _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ + *_pptr_ = _tmp_; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_ = NULL; \ + \ + if ( module->clazz->get_interface ) \ + _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ + ptr = _tmp_; \ + FT_END_STMNT + +#endif /* !C++ */ + + /* + * @macro: + * FT_FACE_FIND_GLOBAL_SERVICE + * + * @description: + * This macro is used to look up a service from all modules. + * + * @input: + * face :: + * The source face handle. + * + * id :: + * A string describing the service as defined in the service's + * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to + * `multi-masters'). It is automatically prefixed with + * `FT_SERVICE_ID_'. + * + * @output: + * ptr :: + * A variable that receives the service pointer. Will be NULL + * if not found. + */ +#ifdef __cplusplus + +#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_; \ + FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ + \ + \ + _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ + *_pptr_ = _tmp_; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_; \ + \ + \ + _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ + ptr = _tmp_; \ + FT_END_STMNT + +#endif /* !C++ */ + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S E R V I C E D E S C R I P T O R S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * The following structure is used to _describe_ a given service + * to the library. This is useful to build simple static service lists. + */ + typedef struct FT_ServiceDescRec_ + { + const char* serv_id; /* service name */ + const void* serv_data; /* service pointer/data */ + + } FT_ServiceDescRec; + + typedef const FT_ServiceDescRec* FT_ServiceDesc; + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */ + /* */ + /* <Description> */ + /* Used to initialize an array of FT_ServiceDescRec structs. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated array is returned. */ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* */ + /* These functions should be manyally called from the pic_init and */ + /* pic_free functions of your module (see FT_DEFINE_MODULE) */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the array will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {serv_id_5, serv_data_5}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {serv_id_5, serv_data_5}, \ + {serv_id_6, serv_data_6}, \ + {NULL, NULL} \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*2 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = NULL; \ + clazz[1].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*3 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = NULL; \ + clazz[2].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*4 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = NULL; \ + clazz[3].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*5 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = NULL; \ + clazz[4].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, \ + serv_data_4, serv_id_5, serv_data_5) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*6 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = NULL; \ + clazz[5].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*7 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = NULL; \ + clazz[6].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } +#endif /* FT_CONFIG_OPTION_PIC */ + + /* + * Parse a list of FT_ServiceDescRec descriptors and look for + * a specific service by ID. Note that the last element in the + * array must be { NULL, NULL }, and that the function should + * return NULL if the service isn't available. + * + * This function can be used by modules to implement their + * `get_service' method. + */ + FT_BASE( FT_Pointer ) + ft_service_list_lookup( FT_ServiceDesc service_descriptors, + const char* service_id ); + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S E R V I C E S C A C H E *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * This structure is used to store a cache for several frequently used + * services. It is the type of `face->internal->services'. You + * should only use FT_FACE_LOOKUP_SERVICE to access it. + * + * All fields should have the type FT_Pointer to relax compilation + * dependencies. We assume the developer isn't completely stupid. + * + * Each field must be named `service_XXXX' where `XXX' corresponds to + * the correct FT_SERVICE_ID_XXXX macro. See the definition of + * FT_FACE_LOOKUP_SERVICE below how this is implemented. + * + */ + typedef struct FT_ServiceCacheRec_ + { + FT_Pointer service_POSTSCRIPT_FONT_NAME; + FT_Pointer service_MULTI_MASTERS; + FT_Pointer service_GLYPH_DICT; + FT_Pointer service_PFR_METRICS; + FT_Pointer service_WINFNT; + + } FT_ServiceCacheRec, *FT_ServiceCache; + + + /* + * A magic number used within the services cache. + */ +#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */ + + + /* + * @macro: + * FT_FACE_LOOKUP_SERVICE + * + * @description: + * This macro is used to lookup a service from a face's driver module + * using its cache. + * + * @input: + * face:: + * The source face handle containing the cache. + * + * field :: + * The field name in the cache. + * + * id :: + * The service ID. + * + * @output: + * ptr :: + * A variable receiving the service data. NULL if not available. + */ +#ifdef __cplusplus + +#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Pointer svc; \ + FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \ + \ + \ + svc = FT_FACE( face )->internal->services. service_ ## id; \ + if ( svc == FT_SERVICE_UNAVAILABLE ) \ + svc = NULL; \ + else if ( svc == NULL ) \ + { \ + FT_FACE_FIND_SERVICE( face, svc, id ); \ + \ + FT_FACE( face )->internal->services. service_ ## id = \ + (FT_Pointer)( svc != NULL ? svc \ + : FT_SERVICE_UNAVAILABLE ); \ + } \ + *Pptr = svc; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Pointer svc; \ + \ + \ + svc = FT_FACE( face )->internal->services. service_ ## id; \ + if ( svc == FT_SERVICE_UNAVAILABLE ) \ + svc = NULL; \ + else if ( svc == NULL ) \ + { \ + FT_FACE_FIND_SERVICE( face, svc, id ); \ + \ + FT_FACE( face )->internal->services. service_ ## id = \ + (FT_Pointer)( svc != NULL ? svc \ + : FT_SERVICE_UNAVAILABLE ); \ + } \ + ptr = svc; \ + FT_END_STMNT + +#endif /* !C++ */ + + /* + * A macro used to define new service structure types. + */ + +#define FT_DEFINE_SERVICE( name ) \ + typedef struct FT_Service_ ## name ## Rec_ \ + FT_Service_ ## name ## Rec ; \ + typedef struct FT_Service_ ## name ## Rec_ \ + const * FT_Service_ ## name ; \ + struct FT_Service_ ## name ## Rec_ + + /* */ + + /* + * The header files containing the services. + */ + +#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> +#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h> +#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> +#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h> +#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h> +#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> +#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h> +#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h> +#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h> +#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h> +#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> +#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> +#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h> +#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h> +#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h> +#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h> +#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h> + + /* */ + +FT_END_HEADER + +#endif /* __FTSERV_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftstream.h b/contrib/media/updf/include/freetype/internal/ftstream.h new file mode 100644 index 0000000000..a91eb72d96 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftstream.h @@ -0,0 +1,539 @@ +/***************************************************************************/ +/* */ +/* ftstream.h */ +/* */ +/* Stream handling (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTSTREAM_H__ +#define __FTSTREAM_H__ + + +#include <ft2build.h> +#include FT_SYSTEM_H +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + + /* format of an 8-bit frame_op value: */ + /* */ + /* bit 76543210 */ + /* xxxxxxes */ + /* */ + /* s is set to 1 if the value is signed. */ + /* e is set to 1 if the value is little-endian. */ + /* xxx is a command. */ + +#define FT_FRAME_OP_SHIFT 2 +#define FT_FRAME_OP_SIGNED 1 +#define FT_FRAME_OP_LITTLE 2 +#define FT_FRAME_OP_COMMAND( x ) ( x >> FT_FRAME_OP_SHIFT ) + +#define FT_MAKE_FRAME_OP( command, little, sign ) \ + ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign ) + +#define FT_FRAME_OP_END 0 +#define FT_FRAME_OP_START 1 /* start a new frame */ +#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */ +#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */ +#define FT_FRAME_OP_LONG 4 /* read 4-byte value */ +#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */ +#define FT_FRAME_OP_BYTES 6 /* read a bytes sequence */ + + + typedef enum FT_Frame_Op_ + { + ft_frame_end = 0, + ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ), + + ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ), + ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ), + + ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ), + ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ), + ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ), + ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ), + + ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ), + ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ), + ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ), + ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ), + + ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ), + ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ), + ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ), + ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ), + + ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ), + ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 ) + + } FT_Frame_Op; + + + typedef struct FT_Frame_Field_ + { + FT_Byte value; + FT_Byte size; + FT_UShort offset; + + } FT_Frame_Field; + + + /* Construct an FT_Frame_Field out of a structure type and a field name. */ + /* The structure type must be set in the FT_STRUCTURE macro before */ + /* calling the FT_FRAME_START() macro. */ + /* */ +#define FT_FIELD_SIZE( f ) \ + (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f ) + +#define FT_FIELD_SIZE_DELTA( f ) \ + (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] ) + +#define FT_FIELD_OFFSET( f ) \ + (FT_UShort)( offsetof( FT_STRUCTURE, f ) ) + +#define FT_FRAME_FIELD( frame_op, field ) \ + { \ + frame_op, \ + FT_FIELD_SIZE( field ), \ + FT_FIELD_OFFSET( field ) \ + } + +#define FT_MAKE_EMPTY_FIELD( frame_op ) { frame_op, 0, 0 } + +#define FT_FRAME_START( size ) { ft_frame_start, 0, size } +#define FT_FRAME_END { ft_frame_end, 0, 0 } + +#define FT_FRAME_LONG( f ) FT_FRAME_FIELD( ft_frame_long_be, f ) +#define FT_FRAME_ULONG( f ) FT_FRAME_FIELD( ft_frame_ulong_be, f ) +#define FT_FRAME_SHORT( f ) FT_FRAME_FIELD( ft_frame_short_be, f ) +#define FT_FRAME_USHORT( f ) FT_FRAME_FIELD( ft_frame_ushort_be, f ) +#define FT_FRAME_OFF3( f ) FT_FRAME_FIELD( ft_frame_off3_be, f ) +#define FT_FRAME_UOFF3( f ) FT_FRAME_FIELD( ft_frame_uoff3_be, f ) +#define FT_FRAME_BYTE( f ) FT_FRAME_FIELD( ft_frame_byte, f ) +#define FT_FRAME_CHAR( f ) FT_FRAME_FIELD( ft_frame_schar, f ) + +#define FT_FRAME_LONG_LE( f ) FT_FRAME_FIELD( ft_frame_long_le, f ) +#define FT_FRAME_ULONG_LE( f ) FT_FRAME_FIELD( ft_frame_ulong_le, f ) +#define FT_FRAME_SHORT_LE( f ) FT_FRAME_FIELD( ft_frame_short_le, f ) +#define FT_FRAME_USHORT_LE( f ) FT_FRAME_FIELD( ft_frame_ushort_le, f ) +#define FT_FRAME_OFF3_LE( f ) FT_FRAME_FIELD( ft_frame_off3_le, f ) +#define FT_FRAME_UOFF3_LE( f ) FT_FRAME_FIELD( ft_frame_uoff3_le, f ) + +#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 } +#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 } +#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 } + +#define FT_FRAME_BYTES( field, count ) \ + { \ + ft_frame_bytes, \ + count, \ + FT_FIELD_OFFSET( field ) \ + } + +#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 } + + + /*************************************************************************/ + /* */ + /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */ + /* type `char*' or equivalent (1-byte elements). */ + /* */ + +#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] ) +#define FT_INT8_( p, i ) ( ((const FT_Char*)(p))[(i)] ) + +#define FT_INT16( x ) ( (FT_Int16)(x) ) +#define FT_UINT16( x ) ( (FT_UInt16)(x) ) +#define FT_INT32( x ) ( (FT_Int32)(x) ) +#define FT_UINT32( x ) ( (FT_UInt32)(x) ) + +#define FT_BYTE_I16( p, i, s ) ( FT_INT16( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_I32( p, i, s ) ( FT_INT32( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) ) + +#define FT_INT8_I16( p, i, s ) ( FT_INT16( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_U16( p, i, s ) ( FT_UINT16( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_I32( p, i, s ) ( FT_INT32( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_U32( p, i, s ) ( FT_UINT32( FT_INT8_( p, i ) ) << (s) ) + + +#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16( p, 0, 8) | \ + FT_BYTE_I16( p, 1, 0) ) + +#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \ + FT_BYTE_U16( p, 1, 0 ) ) + +#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32( p, 0, 24 ) | \ + FT_BYTE_I32( p, 1, 16 ) | \ + FT_BYTE_I32( p, 2, 8 ) | \ + FT_BYTE_I32( p, 3, 0 ) ) + +#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \ + FT_BYTE_U32( p, 1, 16 ) | \ + FT_BYTE_U32( p, 2, 8 ) | \ + FT_BYTE_U32( p, 3, 0 ) ) + +#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32( p, 0, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 2, 0 ) ) + +#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 2, 0 ) ) + +#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16( p, 1, 8 ) | \ + FT_BYTE_I16( p, 0, 0 ) ) + +#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \ + FT_BYTE_U16( p, 0, 0 ) ) + +#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32( p, 3, 24 ) | \ + FT_BYTE_I32( p, 2, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 0, 0 ) ) + +#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \ + FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) + +#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32( p, 2, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 0, 0 ) ) + +#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) + + +#define FT_NEXT_CHAR( buffer ) \ + ( (signed char)*buffer++ ) + +#define FT_NEXT_BYTE( buffer ) \ + ( (unsigned char)*buffer++ ) + +#define FT_NEXT_SHORT( buffer ) \ + ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) ) + +#define FT_NEXT_USHORT( buffer ) \ + ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) ) + +#define FT_NEXT_OFF3( buffer ) \ + ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) ) + +#define FT_NEXT_UOFF3( buffer ) \ + ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) ) + +#define FT_NEXT_LONG( buffer ) \ + ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) ) + +#define FT_NEXT_ULONG( buffer ) \ + ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) ) + + +#define FT_NEXT_SHORT_LE( buffer ) \ + ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) ) + +#define FT_NEXT_USHORT_LE( buffer ) \ + ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) ) + +#define FT_NEXT_OFF3_LE( buffer ) \ + ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) ) + +#define FT_NEXT_UOFF3_LE( buffer ) \ + ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) ) + +#define FT_NEXT_LONG_LE( buffer ) \ + ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) ) + +#define FT_NEXT_ULONG_LE( buffer ) \ + ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) ) + + + /*************************************************************************/ + /* */ + /* Each GET_xxxx() macro uses an implicit `stream' variable. */ + /* */ +#if 0 +#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor ) + +#define FT_GET_CHAR() FT_GET_MACRO( CHAR ) +#define FT_GET_BYTE() FT_GET_MACRO( BYTE ) +#define FT_GET_SHORT() FT_GET_MACRO( SHORT ) +#define FT_GET_USHORT() FT_GET_MACRO( USHORT ) +#define FT_GET_OFF3() FT_GET_MACRO( OFF3 ) +#define FT_GET_UOFF3() FT_GET_MACRO( UOFF3 ) +#define FT_GET_LONG() FT_GET_MACRO( LONG ) +#define FT_GET_ULONG() FT_GET_MACRO( ULONG ) +#define FT_GET_TAG4() FT_GET_MACRO( ULONG ) + +#define FT_GET_SHORT_LE() FT_GET_MACRO( SHORT_LE ) +#define FT_GET_USHORT_LE() FT_GET_MACRO( USHORT_LE ) +#define FT_GET_LONG_LE() FT_GET_MACRO( LONG_LE ) +#define FT_GET_ULONG_LE() FT_GET_MACRO( ULONG_LE ) + +#else +#define FT_GET_MACRO( func, type ) ( (type)func( stream ) ) + +#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char ) +#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte ) +#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_Short ) +#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_UShort ) +#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_Long ) +#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong ) +#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetLong, FT_Long ) +#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong ) +#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong ) + +#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short ) +#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort ) +#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_Long ) +#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_ULong ) +#endif + +#define FT_READ_MACRO( func, type, var ) \ + ( var = (type)func( stream, &error ), \ + error != FT_Err_Ok ) + +#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var ) +#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var ) +#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_Short, var ) +#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_UShort, var ) +#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_Long, var ) +#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_ULong, var ) +#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_Long, var ) +#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_ULong, var ) + +#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_Short, var ) +#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_UShort, var ) +#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_Long, var ) +#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var ) + + +#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM + + /* initialize a stream for reading a regular system stream */ + FT_BASE( FT_Error ) + FT_Stream_Open( FT_Stream stream, + const char* filepathname ); + +#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ + + + /* create a new (input) stream from an FT_Open_Args structure */ + FT_BASE( FT_Error ) + FT_Stream_New( FT_Library library, + const FT_Open_Args* args, + FT_Stream *astream ); + + /* free a stream */ + FT_BASE( void ) + FT_Stream_Free( FT_Stream stream, + FT_Int external ); + + /* initialize a stream for reading in-memory data */ + FT_BASE( void ) + FT_Stream_OpenMemory( FT_Stream stream, + const FT_Byte* base, + FT_ULong size ); + + /* close a stream (does not destroy the stream structure) */ + FT_BASE( void ) + FT_Stream_Close( FT_Stream stream ); + + + /* seek within a stream. position is relative to start of stream */ + FT_BASE( FT_Error ) + FT_Stream_Seek( FT_Stream stream, + FT_ULong pos ); + + /* skip bytes in a stream */ + FT_BASE( FT_Error ) + FT_Stream_Skip( FT_Stream stream, + FT_Long distance ); + + /* return current stream position */ + FT_BASE( FT_Long ) + FT_Stream_Pos( FT_Stream stream ); + + /* read bytes from a stream into a user-allocated buffer, returns an */ + /* error if not all bytes could be read. */ + FT_BASE( FT_Error ) + FT_Stream_Read( FT_Stream stream, + FT_Byte* buffer, + FT_ULong count ); + + /* read bytes from a stream at a given position */ + FT_BASE( FT_Error ) + FT_Stream_ReadAt( FT_Stream stream, + FT_ULong pos, + FT_Byte* buffer, + FT_ULong count ); + + /* try to read bytes at the end of a stream; return number of bytes */ + /* really available */ + FT_BASE( FT_ULong ) + FT_Stream_TryRead( FT_Stream stream, + FT_Byte* buffer, + FT_ULong count ); + + /* Enter a frame of `count' consecutive bytes in a stream. Returns an */ + /* error if the frame could not be read/accessed. The caller can use */ + /* the FT_Stream_Get_XXX functions to retrieve frame data without */ + /* error checks. */ + /* */ + /* You must _always_ call FT_Stream_ExitFrame() once you have entered */ + /* a stream frame! */ + /* */ + FT_BASE( FT_Error ) + FT_Stream_EnterFrame( FT_Stream stream, + FT_ULong count ); + + /* exit a stream frame */ + FT_BASE( void ) + FT_Stream_ExitFrame( FT_Stream stream ); + + /* Extract a stream frame. If the stream is disk-based, a heap block */ + /* is allocated and the frame bytes are read into it. If the stream */ + /* is memory-based, this function simply set a pointer to the data. */ + /* */ + /* Useful to optimize access to memory-based streams transparently. */ + /* */ + /* All extracted frames must be `freed' with a call to the function */ + /* FT_Stream_ReleaseFrame(). */ + /* */ + FT_BASE( FT_Error ) + FT_Stream_ExtractFrame( FT_Stream stream, + FT_ULong count, + FT_Byte** pbytes ); + + /* release an extract frame (see FT_Stream_ExtractFrame) */ + FT_BASE( void ) + FT_Stream_ReleaseFrame( FT_Stream stream, + FT_Byte** pbytes ); + + /* read a byte from an entered frame */ + FT_BASE( FT_Char ) + FT_Stream_GetChar( FT_Stream stream ); + + /* read a 16-bit big-endian integer from an entered frame */ + FT_BASE( FT_Short ) + FT_Stream_GetShort( FT_Stream stream ); + + /* read a 24-bit big-endian integer from an entered frame */ + FT_BASE( FT_Long ) + FT_Stream_GetOffset( FT_Stream stream ); + + /* read a 32-bit big-endian integer from an entered frame */ + FT_BASE( FT_Long ) + FT_Stream_GetLong( FT_Stream stream ); + + /* read a 16-bit little-endian integer from an entered frame */ + FT_BASE( FT_Short ) + FT_Stream_GetShortLE( FT_Stream stream ); + + /* read a 32-bit little-endian integer from an entered frame */ + FT_BASE( FT_Long ) + FT_Stream_GetLongLE( FT_Stream stream ); + + + /* read a byte from a stream */ + FT_BASE( FT_Char ) + FT_Stream_ReadChar( FT_Stream stream, + FT_Error* error ); + + /* read a 16-bit big-endian integer from a stream */ + FT_BASE( FT_Short ) + FT_Stream_ReadShort( FT_Stream stream, + FT_Error* error ); + + /* read a 24-bit big-endian integer from a stream */ + FT_BASE( FT_Long ) + FT_Stream_ReadOffset( FT_Stream stream, + FT_Error* error ); + + /* read a 32-bit big-endian integer from a stream */ + FT_BASE( FT_Long ) + FT_Stream_ReadLong( FT_Stream stream, + FT_Error* error ); + + /* read a 16-bit little-endian integer from a stream */ + FT_BASE( FT_Short ) + FT_Stream_ReadShortLE( FT_Stream stream, + FT_Error* error ); + + /* read a 32-bit little-endian integer from a stream */ + FT_BASE( FT_Long ) + FT_Stream_ReadLongLE( FT_Stream stream, + FT_Error* error ); + + /* Read a structure from a stream. The structure must be described */ + /* by an array of FT_Frame_Field records. */ + FT_BASE( FT_Error ) + FT_Stream_ReadFields( FT_Stream stream, + const FT_Frame_Field* fields, + void* structure ); + + +#define FT_STREAM_POS() \ + FT_Stream_Pos( stream ) + +#define FT_STREAM_SEEK( position ) \ + FT_SET_ERROR( FT_Stream_Seek( stream, position ) ) + +#define FT_STREAM_SKIP( distance ) \ + FT_SET_ERROR( FT_Stream_Skip( stream, distance ) ) + +#define FT_STREAM_READ( buffer, count ) \ + FT_SET_ERROR( FT_Stream_Read( stream, \ + (FT_Byte*)buffer, \ + count ) ) + +#define FT_STREAM_READ_AT( position, buffer, count ) \ + FT_SET_ERROR( FT_Stream_ReadAt( stream, \ + position, \ + (FT_Byte*)buffer, \ + count ) ) + +#define FT_STREAM_READ_FIELDS( fields, object ) \ + FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) ) + + +#define FT_FRAME_ENTER( size ) \ + FT_SET_ERROR( \ + FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, size ) ) ) + +#define FT_FRAME_EXIT() \ + FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) ) + +#define FT_FRAME_EXTRACT( size, bytes ) \ + FT_SET_ERROR( \ + FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, size, \ + (FT_Byte**)&(bytes) ) ) ) + +#define FT_FRAME_RELEASE( bytes ) \ + FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream, \ + (FT_Byte**)&(bytes) ) ) + + +FT_END_HEADER + +#endif /* __FTSTREAM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/fttrace.h b/contrib/media/updf/include/freetype/internal/fttrace.h new file mode 100644 index 0000000000..e9b383a588 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/fttrace.h @@ -0,0 +1,139 @@ +/***************************************************************************/ +/* */ +/* fttrace.h */ +/* */ +/* Tracing handling (specification only). */ +/* */ +/* Copyright 2002, 2004, 2005, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /* definitions of trace levels for FreeType 2 */ + + /* the first level must always be `trace_any' */ +FT_TRACE_DEF( any ) + + /* base components */ +FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */ +FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */ +FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */ +FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */ +FT_TRACE_DEF( list ) /* list management (ftlist.c) */ +FT_TRACE_DEF( init ) /* initialization (ftinit.c) */ +FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */ +FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */ +FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */ +FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */ + +FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */ +FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */ +FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */ +FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */ +FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */ + + /* Cache sub-system */ +FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */ + + /* SFNT driver components */ +FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */ +FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */ +FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */ +FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */ +FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */ +FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */ +FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */ +FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */ +FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */ + + /* TrueType driver components */ +FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */ +FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */ +FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */ +FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */ +FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */ +FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */ + + /* Type 1 driver components */ +FT_TRACE_DEF( t1afm ) +FT_TRACE_DEF( t1driver ) +FT_TRACE_DEF( t1gload ) +FT_TRACE_DEF( t1hint ) +FT_TRACE_DEF( t1load ) +FT_TRACE_DEF( t1objs ) +FT_TRACE_DEF( t1parse ) + + /* PostScript helper module `psaux' */ +FT_TRACE_DEF( t1decode ) +FT_TRACE_DEF( psobjs ) + + /* PostScript hinting module `pshinter' */ +FT_TRACE_DEF( pshrec ) +FT_TRACE_DEF( pshalgo1 ) +FT_TRACE_DEF( pshalgo2 ) + + /* Type 2 driver components */ +FT_TRACE_DEF( cffdriver ) +FT_TRACE_DEF( cffgload ) +FT_TRACE_DEF( cffload ) +FT_TRACE_DEF( cffobjs ) +FT_TRACE_DEF( cffparse ) + + /* Type 42 driver component */ +FT_TRACE_DEF( t42 ) + + /* CID driver components */ +FT_TRACE_DEF( cidafm ) +FT_TRACE_DEF( ciddriver ) +FT_TRACE_DEF( cidgload ) +FT_TRACE_DEF( cidload ) +FT_TRACE_DEF( cidobjs ) +FT_TRACE_DEF( cidparse ) + + /* Windows font component */ +FT_TRACE_DEF( winfnt ) + + /* PCF font components */ +FT_TRACE_DEF( pcfdriver ) +FT_TRACE_DEF( pcfread ) + + /* BDF font components */ +FT_TRACE_DEF( bdfdriver ) +FT_TRACE_DEF( bdflib ) + + /* PFR font component */ +FT_TRACE_DEF( pfr ) + + /* OpenType validation components */ +FT_TRACE_DEF( otvmodule ) +FT_TRACE_DEF( otvcommon ) +FT_TRACE_DEF( otvbase ) +FT_TRACE_DEF( otvgdef ) +FT_TRACE_DEF( otvgpos ) +FT_TRACE_DEF( otvgsub ) +FT_TRACE_DEF( otvjstf ) +FT_TRACE_DEF( otvmath ) + + /* TrueTypeGX/AAT validation components */ +FT_TRACE_DEF( gxvmodule ) +FT_TRACE_DEF( gxvcommon ) +FT_TRACE_DEF( gxvfeat ) +FT_TRACE_DEF( gxvmort ) +FT_TRACE_DEF( gxvmorx ) +FT_TRACE_DEF( gxvbsln ) +FT_TRACE_DEF( gxvjust ) +FT_TRACE_DEF( gxvkern ) +FT_TRACE_DEF( gxvopbd ) +FT_TRACE_DEF( gxvtrak ) +FT_TRACE_DEF( gxvprop ) +FT_TRACE_DEF( gxvlcar ) + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/ftvalid.h b/contrib/media/updf/include/freetype/internal/ftvalid.h new file mode 100644 index 0000000000..00cd85e7bb --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/ftvalid.h @@ -0,0 +1,150 @@ +/***************************************************************************/ +/* */ +/* ftvalid.h */ +/* */ +/* FreeType validation support (specification). */ +/* */ +/* Copyright 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTVALID_H__ +#define __FTVALID_H__ + +#include <ft2build.h> +#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */ + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** V A L I D A T I O N ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* handle to a validation object */ + typedef struct FT_ValidatorRec_ volatile* FT_Validator; + + + /*************************************************************************/ + /* */ + /* There are three distinct validation levels defined here: */ + /* */ + /* FT_VALIDATE_DEFAULT :: */ + /* A table that passes this validation level can be used reliably by */ + /* FreeType. It generally means that all offsets have been checked to */ + /* prevent out-of-bound reads, that array counts are correct, etc. */ + /* */ + /* FT_VALIDATE_TIGHT :: */ + /* A table that passes this validation level can be used reliably and */ + /* doesn't contain invalid data. For example, a charmap table that */ + /* returns invalid glyph indices will not pass, even though it can */ + /* be used with FreeType in default mode (the library will simply */ + /* return an error later when trying to load the glyph). */ + /* */ + /* It also checks that fields which must be a multiple of 2, 4, or 8, */ + /* don't have incorrect values, etc. */ + /* */ + /* FT_VALIDATE_PARANOID :: */ + /* Only for font debugging. Checks that a table follows the */ + /* specification by 100%. Very few fonts will be able to pass this */ + /* level anyway but it can be useful for certain tools like font */ + /* editors/converters. */ + /* */ + typedef enum FT_ValidationLevel_ + { + FT_VALIDATE_DEFAULT = 0, + FT_VALIDATE_TIGHT, + FT_VALIDATE_PARANOID + + } FT_ValidationLevel; + + + /* validator structure */ + typedef struct FT_ValidatorRec_ + { + const FT_Byte* base; /* address of table in memory */ + const FT_Byte* limit; /* `base' + sizeof(table) in memory */ + FT_ValidationLevel level; /* validation level */ + FT_Error error; /* error returned. 0 means success */ + + ft_jmp_buf jump_buffer; /* used for exception handling */ + + } FT_ValidatorRec; + + +#define FT_VALIDATOR( x ) ((FT_Validator)( x )) + + + FT_BASE( void ) + ft_validator_init( FT_Validator valid, + const FT_Byte* base, + const FT_Byte* limit, + FT_ValidationLevel level ); + + /* Do not use this. It's broken and will cause your validator to crash */ + /* if you run it on an invalid font. */ + FT_BASE( FT_Int ) + ft_validator_run( FT_Validator valid ); + + /* Sets the error field in a validator, then calls `longjmp' to return */ + /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */ + /* error checks within the validation routines. */ + /* */ + FT_BASE( void ) + ft_validator_error( FT_Validator valid, + FT_Error error ); + + + /* Calls ft_validate_error. Assumes that the `valid' local variable */ + /* holds a pointer to the current validator object. */ + /* */ + /* Use preprocessor prescan to pass FT_ERR_PREFIX. */ + /* */ +#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error ) +#define FT_INVALID_( _prefix, _error ) \ + ft_validator_error( valid, _prefix ## _error ) + + /* called when a broken table is detected */ +#define FT_INVALID_TOO_SHORT \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + /* called when an invalid offset is detected */ +#define FT_INVALID_OFFSET \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Offset ) + + /* called when an invalid format/value is detected */ +#define FT_INVALID_FORMAT \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + /* called when an invalid glyph index is detected */ +#define FT_INVALID_GLYPH_ID \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index ) + + /* called when an invalid field value is detected */ +#define FT_INVALID_DATA \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + +FT_END_HEADER + +#endif /* __FTVALID_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/internal.h b/contrib/media/updf/include/freetype/internal/internal.h new file mode 100644 index 0000000000..f500a651c2 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/internal.h @@ -0,0 +1,51 @@ +/***************************************************************************/ +/* */ +/* internal.h */ +/* */ +/* Internal header files (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is automatically included by `ft2build.h'. */ + /* Do not include it manually! */ + /* */ + /*************************************************************************/ + + +#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> +#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h> +#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> +#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> +#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> +#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h> +#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h> +#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h> +#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> +#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h> +#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h> +#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h> +#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h> + +#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h> +#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h> + +#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h> +#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h> +#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h> + +#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h> + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/pcftypes.h b/contrib/media/updf/include/freetype/internal/pcftypes.h new file mode 100644 index 0000000000..382796ffb4 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/pcftypes.h @@ -0,0 +1,56 @@ +/* pcftypes.h + + FreeType font driver for pcf fonts + + Copyright (C) 2000, 2001, 2002 by + Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + + +#ifndef __PCFTYPES_H__ +#define __PCFTYPES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + typedef struct PCF_Public_FaceRec_ + { + FT_FaceRec root; + FT_StreamRec gzip_stream; + FT_Stream gzip_source; + + char* charset_encoding; + char* charset_registry; + + } PCF_Public_FaceRec, *PCF_Public_Face; + + +FT_END_HEADER + +#endif /* __PCFTYPES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/psaux.h b/contrib/media/updf/include/freetype/internal/psaux.h new file mode 100644 index 0000000000..a96e0dfa86 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/psaux.h @@ -0,0 +1,873 @@ +/***************************************************************************/ +/* */ +/* psaux.h */ +/* */ +/* Auxiliary functions and data structures related to PostScript fonts */ +/* (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __PSAUX_H__ +#define __PSAUX_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_TYPE1_TYPES_H +#include FT_SERVICE_POSTSCRIPT_CMAPS_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1_TABLE *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct PS_TableRec_* PS_Table; + typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Table_FuncsRec */ + /* */ + /* <Description> */ + /* A set of function pointers to manage PS_Table objects. */ + /* */ + /* <Fields> */ + /* table_init :: Used to initialize a table. */ + /* */ + /* table_done :: Finalizes resp. destroy a given table. */ + /* */ + /* table_add :: Adds a new object to a table. */ + /* */ + /* table_release :: Releases table data, then finalizes it. */ + /* */ + typedef struct PS_Table_FuncsRec_ + { + FT_Error + (*init)( PS_Table table, + FT_Int count, + FT_Memory memory ); + + void + (*done)( PS_Table table ); + + FT_Error + (*add)( PS_Table table, + FT_Int idx, + void* object, + FT_PtrDist length ); + + void + (*release)( PS_Table table ); + + } PS_Table_FuncsRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_TableRec */ + /* */ + /* <Description> */ + /* A PS_Table is a simple object used to store an array of objects in */ + /* a single memory block. */ + /* */ + /* <Fields> */ + /* block :: The address in memory of the growheap's block. This */ + /* can change between two object adds, due to */ + /* reallocation. */ + /* */ + /* cursor :: The current top of the grow heap within its block. */ + /* */ + /* capacity :: The current size of the heap block. Increments by */ + /* 1kByte chunks. */ + /* */ + /* max_elems :: The maximum number of elements in table. */ + /* */ + /* num_elems :: The current number of elements in table. */ + /* */ + /* elements :: A table of element addresses within the block. */ + /* */ + /* lengths :: A table of element sizes within the block. */ + /* */ + /* memory :: The object used for memory operations */ + /* (alloc/realloc). */ + /* */ + /* funcs :: A table of method pointers for this object. */ + /* */ + typedef struct PS_TableRec_ + { + FT_Byte* block; /* current memory block */ + FT_Offset cursor; /* current cursor in memory block */ + FT_Offset capacity; /* current size of memory block */ + FT_Long init; + + FT_Int max_elems; + FT_Int num_elems; + FT_Byte** elements; /* addresses of table elements */ + FT_PtrDist* lengths; /* lengths of table elements */ + + FT_Memory memory; + PS_Table_FuncsRec funcs; + + } PS_TableRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 FIELDS & TOKENS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PS_ParserRec_* PS_Parser; + + typedef struct T1_TokenRec_* T1_Token; + + typedef struct T1_FieldRec_* T1_Field; + + + /* simple enumeration type used to identify token types */ + typedef enum T1_TokenType_ + { + T1_TOKEN_TYPE_NONE = 0, + T1_TOKEN_TYPE_ANY, + T1_TOKEN_TYPE_STRING, + T1_TOKEN_TYPE_ARRAY, + T1_TOKEN_TYPE_KEY, /* aka `name' */ + + /* do not remove */ + T1_TOKEN_TYPE_MAX + + } T1_TokenType; + + + /* a simple structure used to identify tokens */ + typedef struct T1_TokenRec_ + { + FT_Byte* start; /* first character of token in input stream */ + FT_Byte* limit; /* first character after the token */ + T1_TokenType type; /* type of token */ + + } T1_TokenRec; + + + /* enumeration type used to identify object fields */ + typedef enum T1_FieldType_ + { + T1_FIELD_TYPE_NONE = 0, + T1_FIELD_TYPE_BOOL, + T1_FIELD_TYPE_INTEGER, + T1_FIELD_TYPE_FIXED, + T1_FIELD_TYPE_FIXED_1000, + T1_FIELD_TYPE_STRING, + T1_FIELD_TYPE_KEY, + T1_FIELD_TYPE_BBOX, + T1_FIELD_TYPE_INTEGER_ARRAY, + T1_FIELD_TYPE_FIXED_ARRAY, + T1_FIELD_TYPE_CALLBACK, + + /* do not remove */ + T1_FIELD_TYPE_MAX + + } T1_FieldType; + + + typedef enum T1_FieldLocation_ + { + T1_FIELD_LOCATION_CID_INFO, + T1_FIELD_LOCATION_FONT_DICT, + T1_FIELD_LOCATION_FONT_EXTRA, + T1_FIELD_LOCATION_FONT_INFO, + T1_FIELD_LOCATION_PRIVATE, + T1_FIELD_LOCATION_BBOX, + T1_FIELD_LOCATION_LOADER, + T1_FIELD_LOCATION_FACE, + T1_FIELD_LOCATION_BLEND, + + /* do not remove */ + T1_FIELD_LOCATION_MAX + + } T1_FieldLocation; + + + typedef void + (*T1_Field_ParseFunc)( FT_Face face, + FT_Pointer parser ); + + + /* structure type used to model object fields */ + typedef struct T1_FieldRec_ + { + const char* ident; /* field identifier */ + T1_FieldLocation location; + T1_FieldType type; /* type of field */ + T1_Field_ParseFunc reader; + FT_UInt offset; /* offset of field in object */ + FT_Byte size; /* size of field in bytes */ + FT_UInt array_max; /* maximal number of elements for */ + /* array */ + FT_UInt count_offset; /* offset of element count for */ + /* arrays; must not be zero if in */ + /* use -- in other words, a */ + /* `num_FOO' element must not */ + /* start the used structure if we */ + /* parse a `FOO' array */ + FT_UInt dict; /* where we expect it */ + } T1_FieldRec; + +#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */ +#define T1_FIELD_DICT_PRIVATE ( 1 << 1 ) + + + +#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE( _fname ), \ + 0, 0, \ + _dict \ + }, + +#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \ + { \ + _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \ + (T1_Field_ParseFunc)_reader, \ + 0, 0, \ + 0, 0, \ + _dict \ + }, + +#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE_DELTA( _fname ), \ + _max, \ + FT_FIELD_OFFSET( num_ ## _fname ), \ + _dict \ + }, + +#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE_DELTA( _fname ), \ + _max, 0, \ + _dict \ + }, + + +#define T1_FIELD_BOOL( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict ) + +#define T1_FIELD_NUM( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict ) + +#define T1_FIELD_FIXED( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict ) + +#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \ + _dict ) + +#define T1_FIELD_STRING( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict ) + +#define T1_FIELD_KEY( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict ) + +#define T1_FIELD_BBOX( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict ) + + +#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \ + T1_NEW_CALLBACK_FIELD( _ident, _name, _dict ) + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 PARSER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs; + + typedef struct PS_Parser_FuncsRec_ + { + void + (*init)( PS_Parser parser, + FT_Byte* base, + FT_Byte* limit, + FT_Memory memory ); + + void + (*done)( PS_Parser parser ); + + void + (*skip_spaces)( PS_Parser parser ); + void + (*skip_PS_token)( PS_Parser parser ); + + FT_Long + (*to_int)( PS_Parser parser ); + FT_Fixed + (*to_fixed)( PS_Parser parser, + FT_Int power_ten ); + + FT_Error + (*to_bytes)( PS_Parser parser, + FT_Byte* bytes, + FT_Offset max_bytes, + FT_Long* pnum_bytes, + FT_Bool delimiters ); + + FT_Int + (*to_coord_array)( PS_Parser parser, + FT_Int max_coords, + FT_Short* coords ); + FT_Int + (*to_fixed_array)( PS_Parser parser, + FT_Int max_values, + FT_Fixed* values, + FT_Int power_ten ); + + void + (*to_token)( PS_Parser parser, + T1_Token token ); + void + (*to_token_array)( PS_Parser parser, + T1_Token tokens, + FT_UInt max_tokens, + FT_Int* pnum_tokens ); + + FT_Error + (*load_field)( PS_Parser parser, + const T1_Field field, + void** objects, + FT_UInt max_objects, + FT_ULong* pflags ); + + FT_Error + (*load_field_table)( PS_Parser parser, + const T1_Field field, + void** objects, + FT_UInt max_objects, + FT_ULong* pflags ); + + } PS_Parser_FuncsRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_ParserRec */ + /* */ + /* <Description> */ + /* A PS_Parser is an object used to parse a Type 1 font very quickly. */ + /* */ + /* <Fields> */ + /* cursor :: The current position in the text. */ + /* */ + /* base :: Start of the processed text. */ + /* */ + /* limit :: End of the processed text. */ + /* */ + /* error :: The last error returned. */ + /* */ + /* memory :: The object used for memory operations (alloc/realloc). */ + /* */ + /* funcs :: A table of functions for the parser. */ + /* */ + typedef struct PS_ParserRec_ + { + FT_Byte* cursor; + FT_Byte* base; + FT_Byte* limit; + FT_Error error; + FT_Memory memory; + + PS_Parser_FuncsRec funcs; + + } PS_ParserRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 BUILDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct T1_BuilderRec_* T1_Builder; + + + typedef FT_Error + (*T1_Builder_Check_Points_Func)( T1_Builder builder, + FT_Int count ); + + typedef void + (*T1_Builder_Add_Point_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y, + FT_Byte flag ); + + typedef FT_Error + (*T1_Builder_Add_Point1_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y ); + + typedef FT_Error + (*T1_Builder_Add_Contour_Func)( T1_Builder builder ); + + typedef FT_Error + (*T1_Builder_Start_Point_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y ); + + typedef void + (*T1_Builder_Close_Contour_Func)( T1_Builder builder ); + + + typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs; + + typedef struct T1_Builder_FuncsRec_ + { + void + (*init)( T1_Builder builder, + FT_Face face, + FT_Size size, + FT_GlyphSlot slot, + FT_Bool hinting ); + + void + (*done)( T1_Builder builder ); + + T1_Builder_Check_Points_Func check_points; + T1_Builder_Add_Point_Func add_point; + T1_Builder_Add_Point1_Func add_point1; + T1_Builder_Add_Contour_Func add_contour; + T1_Builder_Start_Point_Func start_point; + T1_Builder_Close_Contour_Func close_contour; + + } T1_Builder_FuncsRec; + + + /* an enumeration type to handle charstring parsing states */ + typedef enum T1_ParseState_ + { + T1_Parse_Start, + T1_Parse_Have_Width, + T1_Parse_Have_Moveto, + T1_Parse_Have_Path + + } T1_ParseState; + + + /*************************************************************************/ + /* */ + /* <Structure> */ + /* T1_BuilderRec */ + /* */ + /* <Description> */ + /* A structure used during glyph loading to store its outline. */ + /* */ + /* <Fields> */ + /* memory :: The current memory object. */ + /* */ + /* face :: The current face object. */ + /* */ + /* glyph :: The current glyph slot. */ + /* */ + /* loader :: XXX */ + /* */ + /* base :: The base glyph outline. */ + /* */ + /* current :: The current glyph outline. */ + /* */ + /* max_points :: maximum points in builder outline */ + /* */ + /* max_contours :: Maximal number of contours in builder outline. */ + /* */ + /* pos_x :: The horizontal translation (if composite glyph). */ + /* */ + /* pos_y :: The vertical translation (if composite glyph). */ + /* */ + /* left_bearing :: The left side bearing point. */ + /* */ + /* advance :: The horizontal advance vector. */ + /* */ + /* bbox :: Unused. */ + /* */ + /* parse_state :: An enumeration which controls the charstring */ + /* parsing state. */ + /* */ + /* load_points :: If this flag is not set, no points are loaded. */ + /* */ + /* no_recurse :: Set but not used. */ + /* */ + /* metrics_only :: A boolean indicating that we only want to compute */ + /* the metrics of a given glyph, not load all of its */ + /* points. */ + /* */ + /* funcs :: An array of function pointers for the builder. */ + /* */ + typedef struct T1_BuilderRec_ + { + FT_Memory memory; + FT_Face face; + FT_GlyphSlot glyph; + FT_GlyphLoader loader; + FT_Outline* base; + FT_Outline* current; + + FT_Pos pos_x; + FT_Pos pos_y; + + FT_Vector left_bearing; + FT_Vector advance; + + FT_BBox bbox; /* bounding box */ + T1_ParseState parse_state; + FT_Bool load_points; + FT_Bool no_recurse; + + FT_Bool metrics_only; + + void* hints_funcs; /* hinter-specific */ + void* hints_globals; /* hinter-specific */ + + T1_Builder_FuncsRec funcs; + + } T1_BuilderRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 DECODER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + +#if 0 + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 8 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 32 + +#endif /* 0 */ + + + typedef struct T1_Decoder_ZoneRec_ + { + FT_Byte* cursor; + FT_Byte* base; + FT_Byte* limit; + + } T1_Decoder_ZoneRec, *T1_Decoder_Zone; + + + typedef struct T1_DecoderRec_* T1_Decoder; + typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs; + + + typedef FT_Error + (*T1_Decoder_Callback)( T1_Decoder decoder, + FT_UInt glyph_index ); + + + typedef struct T1_Decoder_FuncsRec_ + { + FT_Error + (*init)( T1_Decoder decoder, + FT_Face face, + FT_Size size, + FT_GlyphSlot slot, + FT_Byte** glyph_names, + PS_Blend blend, + FT_Bool hinting, + FT_Render_Mode hint_mode, + T1_Decoder_Callback callback ); + + void + (*done)( T1_Decoder decoder ); + + FT_Error + (*parse_charstrings)( T1_Decoder decoder, + FT_Byte* base, + FT_UInt len ); + + } T1_Decoder_FuncsRec; + + + typedef struct T1_DecoderRec_ + { + T1_BuilderRec builder; + + FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS]; + FT_Long* top; + + T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1]; + T1_Decoder_Zone zone; + + FT_Service_PsCMaps psnames; /* for seac */ + FT_UInt num_glyphs; + FT_Byte** glyph_names; + + FT_Int lenIV; /* internal for sub routine calls */ + FT_UInt num_subrs; + FT_Byte** subrs; + FT_PtrDist* subrs_len; /* array of subrs length (optional) */ + + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_Int flex_state; + FT_Int num_flex_vectors; + FT_Vector flex_vectors[7]; + + PS_Blend blend; /* for multiple master support */ + + FT_Render_Mode hint_mode; + + T1_Decoder_Callback parse_callback; + T1_Decoder_FuncsRec funcs; + + FT_Long* buildchar; + FT_UInt len_buildchar; + + FT_Bool seac; + + } T1_DecoderRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** AFM PARSER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct AFM_ParserRec_* AFM_Parser; + + typedef struct AFM_Parser_FuncsRec_ + { + FT_Error + (*init)( AFM_Parser parser, + FT_Memory memory, + FT_Byte* base, + FT_Byte* limit ); + + void + (*done)( AFM_Parser parser ); + + FT_Error + (*parse)( AFM_Parser parser ); + + } AFM_Parser_FuncsRec; + + + typedef struct AFM_StreamRec_* AFM_Stream; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* AFM_ParserRec */ + /* */ + /* <Description> */ + /* An AFM_Parser is a parser for the AFM files. */ + /* */ + /* <Fields> */ + /* memory :: The object used for memory operations (alloc and */ + /* realloc). */ + /* */ + /* stream :: This is an opaque object. */ + /* */ + /* FontInfo :: The result will be stored here. */ + /* */ + /* get_index :: A user provided function to get a glyph index by its */ + /* name. */ + /* */ + typedef struct AFM_ParserRec_ + { + FT_Memory memory; + AFM_Stream stream; + + AFM_FontInfo FontInfo; + + FT_Int + (*get_index)( const char* name, + FT_Offset len, + void* user_data ); + + void* user_data; + + } AFM_ParserRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** TYPE1 CHARMAPS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes; + + typedef struct T1_CMap_ClassesRec_ + { + FT_CMap_Class standard; + FT_CMap_Class expert; + FT_CMap_Class custom; + FT_CMap_Class unicode; + + } T1_CMap_ClassesRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PSAux Module Interface *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PSAux_ServiceRec_ + { + /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */ + const PS_Table_FuncsRec* ps_table_funcs; + const PS_Parser_FuncsRec* ps_parser_funcs; + const T1_Builder_FuncsRec* t1_builder_funcs; + const T1_Decoder_FuncsRec* t1_decoder_funcs; + + void + (*t1_decrypt)( FT_Byte* buffer, + FT_Offset length, + FT_UShort seed ); + + T1_CMap_Classes t1_cmap_classes; + + /* fields after this comment line were added after version 2.1.10 */ + const AFM_Parser_FuncsRec* afm_parser_funcs; + + } PSAux_ServiceRec, *PSAux_Service; + + /* backwards-compatible type definition */ + typedef PSAux_ServiceRec PSAux_Interface; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** Some convenience functions *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + +#define IS_PS_NEWLINE( ch ) \ + ( (ch) == '\r' || \ + (ch) == '\n' ) + +#define IS_PS_SPACE( ch ) \ + ( (ch) == ' ' || \ + IS_PS_NEWLINE( ch ) || \ + (ch) == '\t' || \ + (ch) == '\f' || \ + (ch) == '\0' ) + +#define IS_PS_SPECIAL( ch ) \ + ( (ch) == '/' || \ + (ch) == '(' || (ch) == ')' || \ + (ch) == '<' || (ch) == '>' || \ + (ch) == '[' || (ch) == ']' || \ + (ch) == '{' || (ch) == '}' || \ + (ch) == '%' ) + +#define IS_PS_DELIM( ch ) \ + ( IS_PS_SPACE( ch ) || \ + IS_PS_SPECIAL( ch ) ) + +#define IS_PS_DIGIT( ch ) \ + ( (ch) >= '0' && (ch) <= '9' ) + +#define IS_PS_XDIGIT( ch ) \ + ( IS_PS_DIGIT( ch ) || \ + ( (ch) >= 'A' && (ch) <= 'F' ) || \ + ( (ch) >= 'a' && (ch) <= 'f' ) ) + +#define IS_PS_BASE85( ch ) \ + ( (ch) >= '!' && (ch) <= 'u' ) + +#define IS_PS_TOKEN( cur, limit, token ) \ + ( (char)(cur)[0] == (token)[0] && \ + ( (cur) + sizeof ( (token) ) == (limit) || \ + ( (cur) + sizeof( (token) ) < (limit) && \ + IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \ + ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 ) + + +FT_END_HEADER + +#endif /* __PSAUX_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/pshints.h b/contrib/media/updf/include/freetype/internal/pshints.h new file mode 100644 index 0000000000..0c357651be --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/pshints.h @@ -0,0 +1,712 @@ +/***************************************************************************/ +/* */ +/* pshints.h */ +/* */ +/* Interface to Postscript-specific (Type 1 and Type 2) hints */ +/* recorders (specification only). These are used to support native */ +/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ +/* */ +/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __PSHINTS_H__ +#define __PSHINTS_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** INTERNAL REPRESENTATION OF GLOBALS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PSH_GlobalsRec_* PSH_Globals; + + typedef FT_Error + (*PSH_Globals_NewFunc)( FT_Memory memory, + T1_Private* private_dict, + PSH_Globals* aglobals ); + + typedef FT_Error + (*PSH_Globals_SetScaleFunc)( PSH_Globals globals, + FT_Fixed x_scale, + FT_Fixed y_scale, + FT_Fixed x_delta, + FT_Fixed y_delta ); + + typedef void + (*PSH_Globals_DestroyFunc)( PSH_Globals globals ); + + + typedef struct PSH_Globals_FuncsRec_ + { + PSH_Globals_NewFunc create; + PSH_Globals_SetScaleFunc set_scale; + PSH_Globals_DestroyFunc destroy; + + } PSH_Globals_FuncsRec, *PSH_Globals_Funcs; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PUBLIC TYPE 1 HINTS RECORDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * T1_Hints + * + * @description: + * This is a handle to an opaque structure used to record glyph hints + * from a Type 1 character glyph character string. + * + * The methods used to operate on this object are defined by the + * @T1_Hints_FuncsRec structure. Recording glyph hints is normally + * achieved through the following scheme: + * + * - Open a new hint recording session by calling the `open' method. + * This rewinds the recorder and prepare it for new input. + * + * - For each hint found in the glyph charstring, call the corresponding + * method (`stem', `stem3', or `reset'). Note that these functions do + * not return an error code. + * + * - Close the recording session by calling the `close' method. It + * returns an error code if the hints were invalid or something + * strange happened (e.g., memory shortage). + * + * The hints accumulated in the object can later be used by the + * PostScript hinter. + * + */ + typedef struct T1_HintsRec_* T1_Hints; + + + /************************************************************************* + * + * @type: + * T1_Hints_Funcs + * + * @description: + * A pointer to the @T1_Hints_FuncsRec structure that defines the API of + * a given @T1_Hints object. + * + */ + typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs; + + + /************************************************************************* + * + * @functype: + * T1_Hints_OpenFunc + * + * @description: + * A method of the @T1_Hints class used to prepare it for a new Type 1 + * hints recording session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * @note: + * You should always call the @T1_Hints_CloseFunc method in order to + * close an opened recording session. + * + */ + typedef void + (*T1_Hints_OpenFunc)( T1_Hints hints ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_SetStemFunc + * + * @description: + * A method of the @T1_Hints class used to record a new horizontal or + * vertical stem. This corresponds to the Type 1 `hstem' and `vstem' + * operators. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * dimension :: + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). + * + * coords :: + * Array of 2 coordinates in 16.16 format, used as (position,length) + * stem descriptor. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * `coords[0]' is the absolute stem position (lowest coordinate); + * `coords[1]' is the length. + * + * The length can be negative, in which case it must be either -20 or + * -21. It is interpreted as a `ghost' stem, according to the Type 1 + * specification. + * + * If the length is -21 (corresponding to a bottom ghost stem), then + * the real stem position is `coords[0]+coords[1]'. + * + */ + typedef void + (*T1_Hints_SetStemFunc)( T1_Hints hints, + FT_UInt dimension, + FT_Fixed* coords ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_SetStem3Func + * + * @description: + * A method of the @T1_Hints class used to record three + * counter-controlled horizontal or vertical stems at once. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * dimension :: + * 0 for horizontal stems, 1 for vertical ones. + * + * coords :: + * An array of 6 values in 16.16 format, holding 3 (position,length) + * pairs for the counter-controlled stems. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * The lengths cannot be negative (ghost stems are never + * counter-controlled). + * + */ + typedef void + (*T1_Hints_SetStem3Func)( T1_Hints hints, + FT_UInt dimension, + FT_Fixed* coords ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_ResetFunc + * + * @description: + * A method of the @T1_Hints class used to reset the stems hints in a + * recording session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph in which the + * previously defined hints apply. + * + */ + typedef void + (*T1_Hints_ResetFunc)( T1_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_CloseFunc + * + * @description: + * A method of the @T1_Hints class used to close a hint recording + * session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * The error code is set to indicate that an error occurred during the + * recording session. + * + */ + typedef FT_Error + (*T1_Hints_CloseFunc)( T1_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_ApplyFunc + * + * @description: + * A method of the @T1_Hints class used to apply hints to the + * corresponding glyph outline. Must be called once all hints have been + * recorded. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * outline :: + * A pointer to the target outline descriptor. + * + * globals :: + * The hinter globals for this font. + * + * hint_mode :: + * Hinting information. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * On input, all points within the outline are in font coordinates. On + * output, they are in 1/64th of pixels. + * + * The scaling transformation is taken from the `globals' object which + * must correspond to the same font as the glyph. + * + */ + typedef FT_Error + (*T1_Hints_ApplyFunc)( T1_Hints hints, + FT_Outline* outline, + PSH_Globals globals, + FT_Render_Mode hint_mode ); + + + /************************************************************************* + * + * @struct: + * T1_Hints_FuncsRec + * + * @description: + * The structure used to provide the API to @T1_Hints objects. + * + * @fields: + * hints :: + * A handle to the T1 Hints recorder. + * + * open :: + * The function to open a recording session. + * + * close :: + * The function to close a recording session. + * + * stem :: + * The function to set a simple stem. + * + * stem3 :: + * The function to set counter-controlled stems. + * + * reset :: + * The function to reset stem hints. + * + * apply :: + * The function to apply the hints to the corresponding glyph outline. + * + */ + typedef struct T1_Hints_FuncsRec_ + { + T1_Hints hints; + T1_Hints_OpenFunc open; + T1_Hints_CloseFunc close; + T1_Hints_SetStemFunc stem; + T1_Hints_SetStem3Func stem3; + T1_Hints_ResetFunc reset; + T1_Hints_ApplyFunc apply; + + } T1_Hints_FuncsRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PUBLIC TYPE 2 HINTS RECORDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * T2_Hints + * + * @description: + * This is a handle to an opaque structure used to record glyph hints + * from a Type 2 character glyph character string. + * + * The methods used to operate on this object are defined by the + * @T2_Hints_FuncsRec structure. Recording glyph hints is normally + * achieved through the following scheme: + * + * - Open a new hint recording session by calling the `open' method. + * This rewinds the recorder and prepare it for new input. + * + * - For each hint found in the glyph charstring, call the corresponding + * method (`stems', `hintmask', `counters'). Note that these + * functions do not return an error code. + * + * - Close the recording session by calling the `close' method. It + * returns an error code if the hints were invalid or something + * strange happened (e.g., memory shortage). + * + * The hints accumulated in the object can later be used by the + * Postscript hinter. + * + */ + typedef struct T2_HintsRec_* T2_Hints; + + + /************************************************************************* + * + * @type: + * T2_Hints_Funcs + * + * @description: + * A pointer to the @T2_Hints_FuncsRec structure that defines the API of + * a given @T2_Hints object. + * + */ + typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs; + + + /************************************************************************* + * + * @functype: + * T2_Hints_OpenFunc + * + * @description: + * A method of the @T2_Hints class used to prepare it for a new Type 2 + * hints recording session. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * @note: + * You should always call the @T2_Hints_CloseFunc method in order to + * close an opened recording session. + * + */ + typedef void + (*T2_Hints_OpenFunc)( T2_Hints hints ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_StemsFunc + * + * @description: + * A method of the @T2_Hints class used to set the table of stems in + * either the vertical or horizontal dimension. Equivalent to the + * `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * dimension :: + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). + * + * count :: + * The number of stems. + * + * coords :: + * An array of `count' (position,length) pairs in 16.16 format. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * There are `2*count' elements in the `coords' array. Each even + * element is an absolute position in font units, each odd element is a + * length in font units. + * + * A length can be negative, in which case it must be either -20 or + * -21. It is interpreted as a `ghost' stem, according to the Type 1 + * specification. + * + */ + typedef void + (*T2_Hints_StemsFunc)( T2_Hints hints, + FT_UInt dimension, + FT_UInt count, + FT_Fixed* coordinates ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_MaskFunc + * + * @description: + * A method of the @T2_Hints class used to set a given hintmask (this + * corresponds to the `hintmask' Type 2 operator). + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * The glyph index of the last point to which the previously defined + * or activated hints apply. + * + * bit_count :: + * The number of bits in the hint mask. + * + * bytes :: + * An array of bytes modelling the hint mask. + * + * @note: + * If the hintmask starts the charstring (before any glyph point + * definition), the value of `end_point' should be 0. + * + * `bit_count' is the number of meaningful bits in the `bytes' array; it + * must be equal to the total number of hints defined so far (i.e., + * horizontal+verticals). + * + * The `bytes' array can come directly from the Type 2 charstring and + * respects the same format. + * + */ + typedef void + (*T2_Hints_MaskFunc)( T2_Hints hints, + FT_UInt end_point, + FT_UInt bit_count, + const FT_Byte* bytes ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_CounterFunc + * + * @description: + * A method of the @T2_Hints class used to set a given counter mask + * (this corresponds to the `hintmask' Type 2 operator). + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * A glyph index of the last point to which the previously defined or + * active hints apply. + * + * bit_count :: + * The number of bits in the hint mask. + * + * bytes :: + * An array of bytes modelling the hint mask. + * + * @note: + * If the hintmask starts the charstring (before any glyph point + * definition), the value of `end_point' should be 0. + * + * `bit_count' is the number of meaningful bits in the `bytes' array; it + * must be equal to the total number of hints defined so far (i.e., + * horizontal+verticals). + * + * The `bytes' array can come directly from the Type 2 charstring and + * respects the same format. + * + */ + typedef void + (*T2_Hints_CounterFunc)( T2_Hints hints, + FT_UInt bit_count, + const FT_Byte* bytes ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_CloseFunc + * + * @description: + * A method of the @T2_Hints class used to close a hint recording + * session. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * The error code is set to indicate that an error occurred during the + * recording session. + * + */ + typedef FT_Error + (*T2_Hints_CloseFunc)( T2_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_ApplyFunc + * + * @description: + * A method of the @T2_Hints class used to apply hints to the + * corresponding glyph outline. Must be called after the `close' + * method. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * outline :: + * A pointer to the target outline descriptor. + * + * globals :: + * The hinter globals for this font. + * + * hint_mode :: + * Hinting information. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * On input, all points within the outline are in font coordinates. On + * output, they are in 1/64th of pixels. + * + * The scaling transformation is taken from the `globals' object which + * must correspond to the same font than the glyph. + * + */ + typedef FT_Error + (*T2_Hints_ApplyFunc)( T2_Hints hints, + FT_Outline* outline, + PSH_Globals globals, + FT_Render_Mode hint_mode ); + + + /************************************************************************* + * + * @struct: + * T2_Hints_FuncsRec + * + * @description: + * The structure used to provide the API to @T2_Hints objects. + * + * @fields: + * hints :: + * A handle to the T2 hints recorder object. + * + * open :: + * The function to open a recording session. + * + * close :: + * The function to close a recording session. + * + * stems :: + * The function to set the dimension's stems table. + * + * hintmask :: + * The function to set hint masks. + * + * counter :: + * The function to set counter masks. + * + * apply :: + * The function to apply the hints on the corresponding glyph outline. + * + */ + typedef struct T2_Hints_FuncsRec_ + { + T2_Hints hints; + T2_Hints_OpenFunc open; + T2_Hints_CloseFunc close; + T2_Hints_StemsFunc stems; + T2_Hints_MaskFunc hintmask; + T2_Hints_CounterFunc counter; + T2_Hints_ApplyFunc apply; + + } T2_Hints_FuncsRec; + + + /* */ + + + typedef struct PSHinter_Interface_ + { + PSH_Globals_Funcs (*get_globals_funcs)( FT_Module module ); + T1_Hints_Funcs (*get_t1_funcs) ( FT_Module module ); + T2_Hints_Funcs (*get_t2_funcs) ( FT_Module module ); + + } PSHinter_Interface; + + typedef PSHinter_Interface* PSHinter_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ + get_t1_funcs_, get_t2_funcs_) \ + static const PSHinter_Interface class_ = \ + { \ + get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ + get_t1_funcs_, get_t2_funcs_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + PSHinter_Interface* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_globals_funcs = get_globals_funcs_; \ + clazz->get_t1_funcs = get_t1_funcs_; \ + clazz->get_t2_funcs = get_t2_funcs_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __PSHINTS_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svbdf.h b/contrib/media/updf/include/freetype/internal/services/svbdf.h new file mode 100644 index 0000000000..9264239146 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svbdf.h @@ -0,0 +1,77 @@ +/***************************************************************************/ +/* */ +/* svbdf.h */ +/* */ +/* The FreeType BDF services (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVBDF_H__ +#define __SVBDF_H__ + +#include FT_BDF_H +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_BDF "bdf" + + typedef FT_Error + (*FT_BDF_GetCharsetIdFunc)( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + typedef FT_Error + (*FT_BDF_GetPropertyFunc)( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + + FT_DEFINE_SERVICE( BDF ) + { + FT_BDF_GetCharsetIdFunc get_charset_id; + FT_BDF_GetPropertyFunc get_property; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ + static const FT_Service_BDFRec class_ = \ + { \ + get_charset_id_, get_property_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ + void \ + FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ + { \ + clazz->get_charset_id = get_charset_id_; \ + clazz->get_property = get_property_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVBDF_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svcid.h b/contrib/media/updf/include/freetype/internal/services/svcid.h new file mode 100644 index 0000000000..9b874b5e72 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svcid.h @@ -0,0 +1,83 @@ +/***************************************************************************/ +/* */ +/* svcid.h */ +/* */ +/* The FreeType CID font services (specification). */ +/* */ +/* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVCID_H__ +#define __SVCID_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_CID "CID" + + typedef FT_Error + (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement ); + typedef FT_Error + (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, + FT_Bool *is_cid ); + typedef FT_Error + (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + FT_DEFINE_SERVICE( CID ) + { + FT_CID_GetRegistryOrderingSupplementFunc get_ros; + FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; + FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ + get_is_cid_, get_cid_from_glyph_index_ ) \ + static const FT_Service_CIDRec class_ = \ + { \ + get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ + get_is_cid_, get_cid_from_glyph_index_ ) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_CIDRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_ros = get_ros_; \ + clazz->get_is_cid = get_is_cid_; \ + clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVCID_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svgldict.h b/contrib/media/updf/include/freetype/internal/services/svgldict.h new file mode 100644 index 0000000000..d66a41d5ae --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svgldict.h @@ -0,0 +1,82 @@ +/***************************************************************************/ +/* */ +/* svgldict.h */ +/* */ +/* The FreeType glyph dictionary services (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVGLDICT_H__ +#define __SVGLDICT_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A service used to retrieve glyph names, as well as to find the + * index of a given glyph name in a font. + * + */ + +#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" + + + typedef FT_Error + (*FT_GlyphDict_GetNameFunc)( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + typedef FT_UInt + (*FT_GlyphDict_NameIndexFunc)( FT_Face face, + FT_String* glyph_name ); + + + FT_DEFINE_SERVICE( GlyphDict ) + { + FT_GlyphDict_GetNameFunc get_name; + FT_GlyphDict_NameIndexFunc name_index; /* optional */ + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ + static const FT_Service_GlyphDictRec class_ = \ + { \ + get_name_, name_index_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_GlyphDictRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_name = get_name_; \ + clazz->name_index = name_index_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVGLDICT_H__ */ diff --git a/contrib/media/updf/include/freetype/internal/services/svgxval.h b/contrib/media/updf/include/freetype/internal/services/svgxval.h new file mode 100644 index 0000000000..2cdab50655 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svgxval.h @@ -0,0 +1,72 @@ +/***************************************************************************/ +/* */ +/* svgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004, 2005 by */ +/* Masatake YAMATO, Red Hat K.K., */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVGXVAL_H__ +#define __SVGXVAL_H__ + +#include FT_GX_VALIDATE_H +#include FT_INTERNAL_VALIDATE_H + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" +#define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" + + typedef FT_Error + (*gxv_validate_func)( FT_Face face, + FT_UInt gx_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + typedef FT_Error + (*ckern_validate_func)( FT_Face face, + FT_UInt ckern_flags, + FT_Bytes *ckern_table ); + + + FT_DEFINE_SERVICE( GXvalidate ) + { + gxv_validate_func validate; + }; + + FT_DEFINE_SERVICE( CKERNvalidate ) + { + ckern_validate_func validate; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVGXVAL_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svkern.h b/contrib/media/updf/include/freetype/internal/services/svkern.h new file mode 100644 index 0000000000..1488adf493 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svkern.h @@ -0,0 +1,51 @@ +/***************************************************************************/ +/* */ +/* svkern.h */ +/* */ +/* The FreeType Kerning service (specification). */ +/* */ +/* Copyright 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVKERN_H__ +#define __SVKERN_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + +#define FT_SERVICE_ID_KERNING "kerning" + + + typedef FT_Error + (*FT_Kerning_TrackGetFunc)( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + FT_DEFINE_SERVICE( Kerning ) + { + FT_Kerning_TrackGetFunc get_track; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVKERN_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svmm.h b/contrib/media/updf/include/freetype/internal/services/svmm.h new file mode 100644 index 0000000000..66e1da22f1 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svmm.h @@ -0,0 +1,104 @@ +/***************************************************************************/ +/* */ +/* svmm.h */ +/* */ +/* The FreeType Multiple Masters and GX var services (specification). */ +/* */ +/* Copyright 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVMM_H__ +#define __SVMM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A service used to manage multiple-masters data in a given face. + * + * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H). + * + */ + +#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" + + + typedef FT_Error + (*FT_Get_MM_Func)( FT_Face face, + FT_Multi_Master* master ); + + typedef FT_Error + (*FT_Get_MM_Var_Func)( FT_Face face, + FT_MM_Var* *master ); + + typedef FT_Error + (*FT_Set_MM_Design_Func)( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + typedef FT_Error + (*FT_Set_Var_Design_Func)( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + typedef FT_Error + (*FT_Set_MM_Blend_Func)( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + FT_DEFINE_SERVICE( MultiMasters ) + { + FT_Get_MM_Func get_mm; + FT_Set_MM_Design_Func set_mm_design; + FT_Set_MM_Blend_Func set_mm_blend; + FT_Get_MM_Var_Func get_mm_var; + FT_Set_Var_Design_Func set_var_design; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ + set_mm_blend_, get_mm_var_, set_var_design_) \ + static const FT_Service_MultiMastersRec class_ = \ + { \ + get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ + set_mm_blend_, get_mm_var_, set_var_design_) \ + void \ + FT_Init_Class_##class_( FT_Service_MultiMastersRec* clazz ) \ + { \ + clazz->get_mm = get_mm_; \ + clazz->set_mm_design = set_mm_design_; \ + clazz->set_mm_blend = set_mm_blend_; \ + clazz->get_mm_var = get_mm_var_; \ + clazz->set_var_design = set_var_design_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVMM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svotval.h b/contrib/media/updf/include/freetype/internal/services/svotval.h new file mode 100644 index 0000000000..970bbd5759 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svotval.h @@ -0,0 +1,55 @@ +/***************************************************************************/ +/* */ +/* svotval.h */ +/* */ +/* The FreeType OpenType validation service (specification). */ +/* */ +/* Copyright 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVOTVAL_H__ +#define __SVOTVAL_H__ + +#include FT_OPENTYPE_VALIDATE_H +#include FT_INTERNAL_VALIDATE_H + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" + + + typedef FT_Error + (*otv_validate_func)( FT_Face volatile face, + FT_UInt ot_flags, + FT_Bytes *base, + FT_Bytes *gdef, + FT_Bytes *gpos, + FT_Bytes *gsub, + FT_Bytes *jstf ); + + + FT_DEFINE_SERVICE( OTvalidate ) + { + otv_validate_func validate; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVOTVAL_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svpfr.h b/contrib/media/updf/include/freetype/internal/services/svpfr.h new file mode 100644 index 0000000000..462786f9ce --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svpfr.h @@ -0,0 +1,66 @@ +/***************************************************************************/ +/* */ +/* svpfr.h */ +/* */ +/* Internal PFR service functions (specification). */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPFR_H__ +#define __SVPFR_H__ + +#include FT_PFR_H +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" + + + typedef FT_Error + (*FT_PFR_GetMetricsFunc)( FT_Face face, + FT_UInt *aoutline, + FT_UInt *ametrics, + FT_Fixed *ax_scale, + FT_Fixed *ay_scale ); + + typedef FT_Error + (*FT_PFR_GetKerningFunc)( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + typedef FT_Error + (*FT_PFR_GetAdvanceFunc)( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + + FT_DEFINE_SERVICE( PfrMetrics ) + { + FT_PFR_GetMetricsFunc get_metrics; + FT_PFR_GetKerningFunc get_kerning; + FT_PFR_GetAdvanceFunc get_advance; + + }; + + /* */ + +FT_END_HEADER + +#endif /* __SVPFR_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svpostnm.h b/contrib/media/updf/include/freetype/internal/services/svpostnm.h new file mode 100644 index 0000000000..106c54f853 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svpostnm.h @@ -0,0 +1,79 @@ +/***************************************************************************/ +/* */ +/* svpostnm.h */ +/* */ +/* The FreeType PostScript name services (specification). */ +/* */ +/* Copyright 2003, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPOSTNM_H__ +#define __SVPOSTNM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + /* + * A trivial service used to retrieve the PostScript name of a given + * font when available. The `get_name' field should never be NULL. + * + * The corresponding function can return NULL to indicate that the + * PostScript name is not available. + * + * The name is owned by the face and will be destroyed with it. + */ + +#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" + + + typedef const char* + (*FT_PsName_GetFunc)( FT_Face face ); + + + FT_DEFINE_SERVICE( PsFontName ) + { + FT_PsName_GetFunc get_ps_font_name; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ + static const FT_Service_PsFontNameRec class_ = \ + { \ + get_ps_font_name_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsFontNameRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_ps_font_name = get_ps_font_name_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPOSTNM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svpscmap.h b/contrib/media/updf/include/freetype/internal/services/svpscmap.h new file mode 100644 index 0000000000..961030cc39 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svpscmap.h @@ -0,0 +1,164 @@ +/***************************************************************************/ +/* */ +/* svpscmap.h */ +/* */ +/* The FreeType PostScript charmap service (specification). */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPSCMAP_H__ +#define __SVPSCMAP_H__ + +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps" + + + /* + * Adobe glyph name to unicode value. + */ + typedef FT_UInt32 + (*PS_Unicode_ValueFunc)( const char* glyph_name ); + + /* + * Macintosh name id to glyph name. NULL if invalid index. + */ + typedef const char* + (*PS_Macintosh_NameFunc)( FT_UInt name_index ); + + /* + * Adobe standard string ID to glyph name. NULL if invalid index. + */ + typedef const char* + (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index ); + + + /* + * Simple unicode -> glyph index charmap built from font glyph names + * table. + */ + typedef struct PS_UniMap_ + { + FT_UInt32 unicode; /* bit 31 set: is glyph variant */ + FT_UInt glyph_index; + + } PS_UniMap; + + + typedef struct PS_UnicodesRec_* PS_Unicodes; + + typedef struct PS_UnicodesRec_ + { + FT_CMapRec cmap; + FT_UInt num_maps; + PS_UniMap* maps; + + } PS_UnicodesRec; + + + /* + * A function which returns a glyph name for a given index. Returns + * NULL if invalid index. + */ + typedef const char* + (*PS_GetGlyphNameFunc)( FT_Pointer data, + FT_UInt string_index ); + + /* + * A function used to release the glyph name returned by + * PS_GetGlyphNameFunc, when needed + */ + typedef void + (*PS_FreeGlyphNameFunc)( FT_Pointer data, + const char* name ); + + typedef FT_Error + (*PS_Unicodes_InitFunc)( FT_Memory memory, + PS_Unicodes unicodes, + FT_UInt num_glyphs, + PS_GetGlyphNameFunc get_glyph_name, + PS_FreeGlyphNameFunc free_glyph_name, + FT_Pointer glyph_data ); + + typedef FT_UInt + (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes, + FT_UInt32 unicode ); + + typedef FT_UInt32 + (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes, + FT_UInt32 *unicode ); + + + FT_DEFINE_SERVICE( PsCMaps ) + { + PS_Unicode_ValueFunc unicode_value; + + PS_Unicodes_InitFunc unicodes_init; + PS_Unicodes_CharIndexFunc unicodes_char_index; + PS_Unicodes_CharNextFunc unicodes_char_next; + + PS_Macintosh_NameFunc macintosh_name; + PS_Adobe_Std_StringsFunc adobe_std_strings; + const unsigned short* adobe_std_encoding; + const unsigned short* adobe_expert_encoding; + }; + + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ + static const FT_Service_PsCMapsRec class_ = \ + { \ + unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsCMapsRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->unicode_value = unicode_value_; \ + clazz->unicodes_init = unicodes_init_; \ + clazz->unicodes_char_index = unicodes_char_index_; \ + clazz->unicodes_char_next = unicodes_char_next_; \ + clazz->macintosh_name = macintosh_name_; \ + clazz->adobe_std_strings = adobe_std_strings_; \ + clazz->adobe_std_encoding = adobe_std_encoding_; \ + clazz->adobe_expert_encoding = adobe_expert_encoding_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPSCMAP_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svpsinfo.h b/contrib/media/updf/include/freetype/internal/services/svpsinfo.h new file mode 100644 index 0000000000..91ba91e5dc --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svpsinfo.h @@ -0,0 +1,92 @@ +/***************************************************************************/ +/* */ +/* svpsinfo.h */ +/* */ +/* The FreeType PostScript info service (specification). */ +/* */ +/* Copyright 2003, 2004, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPSINFO_H__ +#define __SVPSINFO_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_INTERNAL_TYPE1_TYPES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" + + + typedef FT_Error + (*PS_GetFontInfoFunc)( FT_Face face, + PS_FontInfoRec* afont_info ); + + typedef FT_Error + (*PS_GetFontExtraFunc)( FT_Face face, + PS_FontExtraRec* afont_extra ); + + typedef FT_Int + (*PS_HasGlyphNamesFunc)( FT_Face face ); + + typedef FT_Error + (*PS_GetFontPrivateFunc)( FT_Face face, + PS_PrivateRec* afont_private ); + + + FT_DEFINE_SERVICE( PsInfo ) + { + PS_GetFontInfoFunc ps_get_font_info; + PS_GetFontExtraFunc ps_get_font_extra; + PS_HasGlyphNamesFunc ps_has_glyph_names; + PS_GetFontPrivateFunc ps_get_font_private; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ + ps_get_font_extra_, has_glyph_names_, get_font_private_) \ + static const FT_Service_PsInfoRec class_ = \ + { \ + get_font_info_, ps_get_font_extra_, has_glyph_names_, \ + get_font_private_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ + ps_get_font_extra_, has_glyph_names_, get_font_private_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsInfoRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->ps_get_font_info = get_font_info_; \ + clazz->ps_get_font_extra = ps_get_font_extra_; \ + clazz->ps_has_glyph_names = has_glyph_names_; \ + clazz->ps_get_font_private = get_font_private_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPSINFO_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svsfnt.h b/contrib/media/updf/include/freetype/internal/services/svsfnt.h new file mode 100644 index 0000000000..30bb1620fe --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svsfnt.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* svsfnt.h */ +/* */ +/* The FreeType SFNT table loading service (specification). */ +/* */ +/* Copyright 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVSFNT_H__ +#define __SVSFNT_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + + /* + * SFNT table loading service. + */ + +#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" + + + /* + * Used to implement FT_Load_Sfnt_Table(). + */ + typedef FT_Error + (*FT_SFNT_TableLoadFunc)( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + /* + * Used to implement FT_Get_Sfnt_Table(). + */ + typedef void* + (*FT_SFNT_TableGetFunc)( FT_Face face, + FT_Sfnt_Tag tag ); + + + /* + * Used to implement FT_Sfnt_Table_Info(). + */ + typedef FT_Error + (*FT_SFNT_TableInfoFunc)( FT_Face face, + FT_UInt idx, + FT_ULong *tag, + FT_ULong *offset, + FT_ULong *length ); + + + FT_DEFINE_SERVICE( SFNT_Table ) + { + FT_SFNT_TableLoadFunc load_table; + FT_SFNT_TableGetFunc get_table; + FT_SFNT_TableInfoFunc table_info; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ + static const FT_Service_SFNT_TableRec class_ = \ + { \ + load_, get_, info_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ + void \ + FT_Init_Class_##class_( FT_Service_SFNT_TableRec* clazz ) \ + { \ + clazz->load_table = load_; \ + clazz->get_table = get_; \ + clazz->table_info = info_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVSFNT_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svttcmap.h b/contrib/media/updf/include/freetype/internal/services/svttcmap.h new file mode 100644 index 0000000000..8af00351d9 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svttcmap.h @@ -0,0 +1,106 @@ +/***************************************************************************/ +/* */ +/* svttcmap.h */ +/* */ +/* The FreeType TrueType/sfnt cmap extra information service. */ +/* */ +/* Copyright 2003 by */ +/* Masatake YAMATO, Redhat K.K. */ +/* */ +/* Copyright 2003, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/* Development of this service is support of + Information-technology Promotion Agency, Japan. */ + +#ifndef __SVTTCMAP_H__ +#define __SVTTCMAP_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_TT_CMAP "tt-cmaps" + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_CMapInfo */ + /* */ + /* <Description> */ + /* A structure used to store TrueType/sfnt specific cmap information */ + /* which is not covered by the generic @FT_CharMap structure. This */ + /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */ + /* */ + /* <Fields> */ + /* language :: */ + /* The language ID used in Mac fonts. Definitions of values are in */ + /* freetype/ttnameid.h. */ + /* */ + /* format :: */ + /* The cmap format. OpenType 1.5 defines the formats 0 (byte */ + /* encoding table), 2~(high-byte mapping through table), 4~(segment */ + /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */ + /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */ + /* coverage), and 14 (Unicode Variation Sequences). */ + /* */ + typedef struct TT_CMapInfo_ + { + FT_ULong language; + FT_Long format; + + } TT_CMapInfo; + + + typedef FT_Error + (*TT_CMap_Info_GetFunc)( FT_CharMap charmap, + TT_CMapInfo *cmap_info ); + + + FT_DEFINE_SERVICE( TTCMaps ) + { + TT_CMap_Info_GetFunc get_cmap_info; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ + static const FT_Service_TTCMapsRec class_ = \ + { \ + get_cmap_info_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_TTCMapsRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_cmap_info = get_cmap_info_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVTTCMAP_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svtteng.h b/contrib/media/updf/include/freetype/internal/services/svtteng.h new file mode 100644 index 0000000000..58e02a6f9d --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svtteng.h @@ -0,0 +1,53 @@ +/***************************************************************************/ +/* */ +/* svtteng.h */ +/* */ +/* The FreeType TrueType engine query service (specification). */ +/* */ +/* Copyright 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVTTENG_H__ +#define __SVTTENG_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_MODULE_H + + +FT_BEGIN_HEADER + + + /* + * SFNT table loading service. + */ + +#define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" + + /* + * Used to implement FT_Get_TrueType_Engine_Type + */ + + FT_DEFINE_SERVICE( TrueTypeEngine ) + { + FT_TrueTypeEngineType engine_type; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVTTENG_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svttglyf.h b/contrib/media/updf/include/freetype/internal/services/svttglyf.h new file mode 100644 index 0000000000..ab2dc9a9fe --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svttglyf.h @@ -0,0 +1,67 @@ +/***************************************************************************/ +/* */ +/* svttglyf.h */ +/* */ +/* The FreeType TrueType glyph service. */ +/* */ +/* Copyright 2007 by David Turner. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __SVTTGLYF_H__ +#define __SVTTGLYF_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_TT_GLYF "tt-glyf" + + + typedef FT_ULong + (*TT_Glyf_GetLocationFunc)( FT_Face face, + FT_UInt gindex, + FT_ULong *psize ); + + FT_DEFINE_SERVICE( TTGlyf ) + { + TT_Glyf_GetLocationFunc get_location; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ + static const FT_Service_TTGlyfRec class_ = \ + { \ + get_location_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ + void \ + FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ + { \ + clazz->get_location = get_location_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVTTGLYF_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svwinfnt.h b/contrib/media/updf/include/freetype/internal/services/svwinfnt.h new file mode 100644 index 0000000000..57f7765d92 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svwinfnt.h @@ -0,0 +1,50 @@ +/***************************************************************************/ +/* */ +/* svwinfnt.h */ +/* */ +/* The FreeType Windows FNT/FONT service (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVWINFNT_H__ +#define __SVWINFNT_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_WINFONTS_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_WINFNT "winfonts" + + typedef FT_Error + (*FT_WinFnt_GetHeaderFunc)( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + + FT_DEFINE_SERVICE( WinFnt ) + { + FT_WinFnt_GetHeaderFunc get_header; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVWINFNT_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/services/svxf86nm.h b/contrib/media/updf/include/freetype/internal/services/svxf86nm.h new file mode 100644 index 0000000000..ca5d884a83 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/services/svxf86nm.h @@ -0,0 +1,55 @@ +/***************************************************************************/ +/* */ +/* svxf86nm.h */ +/* */ +/* The FreeType XFree86 services (specification only). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVXF86NM_H__ +#define __SVXF86NM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A trivial service used to return the name of a face's font driver, + * according to the XFree86 nomenclature. Note that the service data + * is a simple constant string pointer. + */ + +#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" + +#define FT_XF86_FORMAT_TRUETYPE "TrueType" +#define FT_XF86_FORMAT_TYPE_1 "Type 1" +#define FT_XF86_FORMAT_BDF "BDF" +#define FT_XF86_FORMAT_PCF "PCF" +#define FT_XF86_FORMAT_TYPE_42 "Type 42" +#define FT_XF86_FORMAT_CID "CID Type 1" +#define FT_XF86_FORMAT_CFF "CFF" +#define FT_XF86_FORMAT_PFR "PFR" +#define FT_XF86_FORMAT_WINFNT "Windows FNT" + + /* */ + + +FT_END_HEADER + + +#endif /* __SVXF86NM_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/sfnt.h b/contrib/media/updf/include/freetype/internal/sfnt.h new file mode 100644 index 0000000000..6326debd00 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/sfnt.h @@ -0,0 +1,897 @@ +/***************************************************************************/ +/* */ +/* sfnt.h */ +/* */ +/* High-level `sfnt' driver interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SFNT_H__ +#define __SFNT_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_DRIVER_H +#include FT_INTERNAL_TRUETYPE_TYPES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Init_Face_Func */ + /* */ + /* <Description> */ + /* First part of the SFNT face object initialization. This finds */ + /* the face in a SFNT file or collection, and load its format tag in */ + /* face->format_tag. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* face :: A handle to the target face object. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* params :: Optional additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + /* This function recognizes fonts embedded in a `TrueType */ + /* collection'. */ + /* */ + /* Once the format tag has been validated by the font driver, it */ + /* should then call the TT_Load_Face_Func() callback to read the rest */ + /* of the SFNT tables in the object. */ + /* */ + typedef FT_Error + (*TT_Init_Face_Func)( FT_Stream stream, + TT_Face face, + FT_Int face_index, + FT_Int num_params, + FT_Parameter* params ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Face_Func */ + /* */ + /* <Description> */ + /* Second part of the SFNT face object initialization. This loads */ + /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */ + /* face object. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* face :: A handle to the target face object. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* params :: Optional additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function must be called after TT_Init_Face_Func(). */ + /* */ + typedef FT_Error + (*TT_Load_Face_Func)( FT_Stream stream, + TT_Face face, + FT_Int face_index, + FT_Int num_params, + FT_Parameter* params ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Done_Face_Func */ + /* */ + /* <Description> */ + /* A callback used to delete the common SFNT data from a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Note> */ + /* This function does NOT destroy the face object. */ + /* */ + typedef void + (*TT_Done_Face_Func)( TT_Face face ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SFNT_HeaderRec_Func */ + /* */ + /* <Description> */ + /* Loads the header of a SFNT font file. Supports collections. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* <Output> */ + /* sfnt :: The SFNT header. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + /* This function recognizes fonts embedded in a `TrueType */ + /* collection'. */ + /* */ + /* This function checks that the header is valid by looking at the */ + /* values of `search_range', `entry_selector', and `range_shift'. */ + /* */ + typedef FT_Error + (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face, + FT_Stream stream, + FT_Long face_index, + SFNT_Header sfnt ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Directory_Func */ + /* */ + /* <Description> */ + /* Loads the table directory into a face object. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* sfnt :: The SFNT header. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be on the first byte after the 4-byte font */ + /* format tag. This is the case just after a call to */ + /* TT_Load_Format_Tag(). */ + /* */ + typedef FT_Error + (*TT_Load_Directory_Func)( TT_Face face, + FT_Stream stream, + SFNT_Header sfnt ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Any_Func */ + /* */ + /* <Description> */ + /* Load any font table into client memory. */ + /* */ + /* <Input> */ + /* face :: The face object to look for. */ + /* */ + /* tag :: The tag of table to load. Use the value 0 if you want */ + /* to access the whole font file, else set this parameter */ + /* to a valid TrueType table tag that you can forge with */ + /* the MAKE_TT_TAG macro. */ + /* */ + /* offset :: The starting offset in the table (or the file if */ + /* tag == 0). */ + /* */ + /* length :: The address of the decision variable: */ + /* */ + /* If length == NULL: */ + /* Loads the whole table. Returns an error if */ + /* `offset' == 0! */ + /* */ + /* If *length == 0: */ + /* Exits immediately; returning the length of the given */ + /* table or of the font file, depending on the value of */ + /* `tag'. */ + /* */ + /* If *length != 0: */ + /* Loads the next `length' bytes of table or font, */ + /* starting at offset `offset' (in table or font too). */ + /* */ + /* <Output> */ + /* buffer :: The address of target buffer. */ + /* */ + /* <Return> */ + /* TrueType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Load_Any_Func)( TT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte *buffer, + FT_ULong* length ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Find_SBit_Image_Func */ + /* */ + /* <Description> */ + /* Check whether an embedded bitmap (an `sbit') exists for a given */ + /* glyph, at a given strike. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* strike_index :: The current strike index. */ + /* */ + /* <Output> */ + /* arange :: The SBit range containing the glyph index. */ + /* */ + /* astrike :: The SBit strike containing the glyph index. */ + /* */ + /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns */ + /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */ + /* glyph. */ + /* */ + typedef FT_Error + (*TT_Find_SBit_Image_Func)( TT_Face face, + FT_UInt glyph_index, + FT_ULong strike_index, + TT_SBit_Range *arange, + TT_SBit_Strike *astrike, + FT_ULong *aglyph_offset ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SBit_Metrics_Func */ + /* */ + /* <Description> */ + /* Get the big metrics for a given embedded bitmap. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* range :: The SBit range containing the glyph. */ + /* */ + /* <Output> */ + /* big_metrics :: A big SBit metrics structure for the glyph. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be positioned at the glyph's offset within */ + /* the `EBDT' table before the call. */ + /* */ + /* If the image format uses variable metrics, the stream cursor is */ + /* positioned just after the metrics header in the `EBDT' table on */ + /* function exit. */ + /* */ + typedef FT_Error + (*TT_Load_SBit_Metrics_Func)( FT_Stream stream, + TT_SBit_Range range, + TT_SBit_Metrics metrics ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SBit_Image_Func */ + /* */ + /* <Description> */ + /* Load a given glyph sbit image from the font resource. This also */ + /* returns its metrics. */ + /* */ + /* <Input> */ + /* face :: */ + /* The target face object. */ + /* */ + /* strike_index :: */ + /* The strike index. */ + /* */ + /* glyph_index :: */ + /* The current glyph index. */ + /* */ + /* load_flags :: */ + /* The current load flags. */ + /* */ + /* stream :: */ + /* The input stream. */ + /* */ + /* <Output> */ + /* amap :: */ + /* The target pixmap. */ + /* */ + /* ametrics :: */ + /* A big sbit metrics structure for the glyph image. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* glyph sbit exists for the index. */ + /* */ + /* <Note> */ + /* The `map.buffer' field is always freed before the glyph is loaded. */ + /* */ + typedef FT_Error + (*TT_Load_SBit_Image_Func)( TT_Face face, + FT_ULong strike_index, + FT_UInt glyph_index, + FT_UInt load_flags, + FT_Stream stream, + FT_Bitmap *amap, + TT_SBit_MetricsRec *ametrics ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Set_SBit_Strike_OldFunc */ + /* */ + /* <Description> */ + /* Select an sbit strike for a given size request. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* req :: The size request. */ + /* */ + /* <Output> */ + /* astrike_index :: The index of the sbit strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* sbit strike exists for the selected ppem values. */ + /* */ + typedef FT_Error + (*TT_Set_SBit_Strike_OldFunc)( TT_Face face, + FT_UInt x_ppem, + FT_UInt y_ppem, + FT_ULong* astrike_index ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_CharMap_Load_Func */ + /* */ + /* <Description> */ + /* Loads a given TrueType character map into memory. */ + /* */ + /* <Input> */ + /* face :: A handle to the parent face object. */ + /* */ + /* stream :: A handle to the current stream object. */ + /* */ + /* <InOut> */ + /* cmap :: A pointer to a cmap object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The function assumes that the stream is already in use (i.e., */ + /* opened). In case of error, all partially allocated tables are */ + /* released. */ + /* */ + typedef FT_Error + (*TT_CharMap_Load_Func)( TT_Face face, + void* cmap, + FT_Stream input ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_CharMap_Free_Func */ + /* */ + /* <Description> */ + /* Destroys a character mapping table. */ + /* */ + /* <Input> */ + /* face :: A handle to the parent face object. */ + /* */ + /* cmap :: A handle to a cmap object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_CharMap_Free_Func)( TT_Face face, + void* cmap ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Set_SBit_Strike_Func */ + /* */ + /* <Description> */ + /* Select an sbit strike for a given size request. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* req :: The size request. */ + /* */ + /* <Output> */ + /* astrike_index :: The index of the sbit strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* sbit strike exists for the selected ppem values. */ + /* */ + typedef FT_Error + (*TT_Set_SBit_Strike_Func)( TT_Face face, + FT_Size_Request req, + FT_ULong* astrike_index ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Strike_Metrics_Func */ + /* */ + /* <Description> */ + /* Load the metrics of a given strike. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* strike_index :: The strike index. */ + /* */ + /* <Output> */ + /* metrics :: the metrics of the strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* such sbit strike exists. */ + /* */ + typedef FT_Error + (*TT_Load_Strike_Metrics_Func)( TT_Face face, + FT_ULong strike_index, + FT_Size_Metrics* metrics ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Get_PS_Name_Func */ + /* */ + /* <Description> */ + /* Get the PostScript glyph name of a glyph. */ + /* */ + /* <Input> */ + /* idx :: The glyph index. */ + /* */ + /* PSname :: The address of a string pointer. Will be NULL in case */ + /* of error, otherwise it is a pointer to the glyph name. */ + /* */ + /* You must not modify the returned string! */ + /* */ + /* <Output> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Get_PS_Name_Func)( TT_Face face, + FT_UInt idx, + FT_String** PSname ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Metrics_Func */ + /* */ + /* <Description> */ + /* Load a metrics table, which is a table with a horizontal and a */ + /* vertical version. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* vertical :: A boolean flag. If set, load the vertical one. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Load_Metrics_Func)( TT_Face face, + FT_Stream stream, + FT_Bool vertical ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Get_Metrics_Func */ + /* */ + /* <Description> */ + /* Load the horizontal or vertical header in a face object. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* vertical :: A boolean flag. If set, load vertical metrics. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Get_Metrics_Func)( TT_Face face, + FT_Bool vertical, + FT_UInt gindex, + FT_Short* abearing, + FT_UShort* aadvance ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Table_Func */ + /* */ + /* <Description> */ + /* Load a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The function uses `face->goto_table' to seek the stream to the */ + /* start of the table, except while loading the font directory. */ + /* */ + typedef FT_Error + (*TT_Load_Table_Func)( TT_Face face, + FT_Stream stream ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Free_Table_Func */ + /* */ + /* <Description> */ + /* Free a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + typedef void + (*TT_Free_Table_Func)( TT_Face face ); + + + /* + * @functype: + * TT_Face_GetKerningFunc + * + * @description: + * Return the horizontal kerning value between two glyphs. + * + * @input: + * face :: A handle to the source face object. + * left_glyph :: The left glyph index. + * right_glyph :: The right glyph index. + * + * @return: + * The kerning value in font units. + */ + typedef FT_Int + (*TT_Face_GetKerningFunc)( TT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* SFNT_Interface */ + /* */ + /* <Description> */ + /* This structure holds pointers to the functions used to load and */ + /* free the basic tables that are required in a `sfnt' font file. */ + /* */ + /* <Fields> */ + /* Check the various xxx_Func() descriptions for details. */ + /* */ + typedef struct SFNT_Interface_ + { + TT_Loader_GotoTableFunc goto_table; + + TT_Init_Face_Func init_face; + TT_Load_Face_Func load_face; + TT_Done_Face_Func done_face; + FT_Module_Requester get_interface; + + TT_Load_Any_Func load_any; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Load_SFNT_HeaderRec_Func load_sfnt_header; + TT_Load_Directory_Func load_directory; +#endif + + /* these functions are called by `load_face' but they can also */ + /* be called from external modules, if there is a need to do so */ + TT_Load_Table_Func load_head; + TT_Load_Metrics_Func load_hhea; + TT_Load_Table_Func load_cmap; + TT_Load_Table_Func load_maxp; + TT_Load_Table_Func load_os2; + TT_Load_Table_Func load_post; + + TT_Load_Table_Func load_name; + TT_Free_Table_Func free_name; + + /* optional tables */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Load_Table_Func load_hdmx_stub; + TT_Free_Table_Func free_hdmx_stub; +#endif + + /* this field was called `load_kerning' up to version 2.1.10 */ + TT_Load_Table_Func load_kern; + + TT_Load_Table_Func load_gasp; + TT_Load_Table_Func load_pclt; + + /* see `ttload.h'; this field was called `load_bitmap_header' up to */ + /* version 2.1.10 */ + TT_Load_Table_Func load_bhed; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* see `ttsbit.h' */ + TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub; + TT_Load_Table_Func load_sbits_stub; + + /* + * The following two fields appeared in version 2.1.8, and were placed + * between `load_sbits' and `load_sbit_image'. We support them as a + * special exception since they are used by Xfont library within the + * X.Org xserver, and because the probability that other rogue clients + * use the other version 2.1.7 fields below is _extremely_ low. + * + * Note that this forces us to disable an interesting memory-saving + * optimization though... + */ + + TT_Find_SBit_Image_Func find_sbit_image; + TT_Load_SBit_Metrics_Func load_sbit_metrics; + +#endif + + TT_Load_SBit_Image_Func load_sbit_image; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Free_Table_Func free_sbits_stub; +#endif + + /* see `ttpost.h' */ + TT_Get_PS_Name_Func get_psname; + TT_Free_Table_Func free_psnames; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_CharMap_Load_Func load_charmap_stub; + TT_CharMap_Free_Func free_charmap_stub; +#endif + + /* starting here, the structure differs from version 2.1.7 */ + + /* this field was introduced in version 2.1.8, named `get_psname' */ + TT_Face_GetKerningFunc get_kerning; + + /* new elements introduced after version 2.1.10 */ + + /* load the font directory, i.e., the offset table and */ + /* the table directory */ + TT_Load_Table_Func load_font_dir; + TT_Load_Metrics_Func load_hmtx; + + TT_Load_Table_Func load_eblc; + TT_Free_Table_Func free_eblc; + + TT_Set_SBit_Strike_Func set_sbit_strike; + TT_Load_Strike_Metrics_Func load_strike_metrics; + + TT_Get_Metrics_Func get_metrics; + + } SFNT_Interface; + + + /* transitional */ + typedef SFNT_Interface* SFNT_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \ + a, +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) +#endif +#define FT_INTERNAL(a) \ + a, + +#define FT_DEFINE_SFNT_INTERFACE(class_, \ + goto_table_, init_face_, load_face_, done_face_, get_interface_, \ + load_any_, load_sfnt_header_, load_directory_, load_head_, \ + load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ + load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ + load_kern_, load_gasp_, load_pclt_, load_bhed_, \ + set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ + load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ + get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ + get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ + set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ + static const SFNT_Interface class_ = \ + { \ + FT_INTERNAL(goto_table_) \ + FT_INTERNAL(init_face_) \ + FT_INTERNAL(load_face_) \ + FT_INTERNAL(done_face_) \ + FT_INTERNAL(get_interface_) \ + FT_INTERNAL(load_any_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \ + FT_INTERNAL(load_head_) \ + FT_INTERNAL(load_hhea_) \ + FT_INTERNAL(load_cmap_) \ + FT_INTERNAL(load_maxp_) \ + FT_INTERNAL(load_os2_) \ + FT_INTERNAL(load_post_) \ + FT_INTERNAL(load_name_) \ + FT_INTERNAL(free_name_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \ + FT_INTERNAL(load_kern_) \ + FT_INTERNAL(load_gasp_) \ + FT_INTERNAL(load_pclt_) \ + FT_INTERNAL(load_bhed_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \ + FT_INTERNAL(load_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \ + FT_INTERNAL(get_psname_) \ + FT_INTERNAL(free_psnames_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \ + FT_INTERNAL(get_kerning_) \ + FT_INTERNAL(load_font_dir_) \ + FT_INTERNAL(load_hmtx_) \ + FT_INTERNAL(load_eblc_) \ + FT_INTERNAL(free_eblc_) \ + FT_INTERNAL(set_sbit_strike_) \ + FT_INTERNAL(load_strike_metrics_) \ + FT_INTERNAL(get_metrics_) \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \ + clazz->a = a_; +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) +#endif +#define FT_INTERNAL(a, a_) \ + clazz->a = a_; + +#define FT_DEFINE_SFNT_INTERFACE(class_, \ + goto_table_, init_face_, load_face_, done_face_, get_interface_, \ + load_any_, load_sfnt_header_, load_directory_, load_head_, \ + load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ + load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ + load_kern_, load_gasp_, load_pclt_, load_bhed_, \ + set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ + load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ + get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ + get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ + set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ + void \ + FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \ + { \ + FT_UNUSED(library); \ + FT_INTERNAL(goto_table,goto_table_) \ + FT_INTERNAL(init_face,init_face_) \ + FT_INTERNAL(load_face,load_face_) \ + FT_INTERNAL(done_face,done_face_) \ + FT_INTERNAL(get_interface,get_interface_) \ + FT_INTERNAL(load_any,load_any_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \ + FT_INTERNAL(load_head,load_head_) \ + FT_INTERNAL(load_hhea,load_hhea_) \ + FT_INTERNAL(load_cmap,load_cmap_) \ + FT_INTERNAL(load_maxp,load_maxp_) \ + FT_INTERNAL(load_os2,load_os2_) \ + FT_INTERNAL(load_post,load_post_) \ + FT_INTERNAL(load_name,load_name_) \ + FT_INTERNAL(free_name,free_name_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \ + FT_INTERNAL(load_kern,load_kern_) \ + FT_INTERNAL(load_gasp,load_gasp_) \ + FT_INTERNAL(load_pclt,load_pclt_) \ + FT_INTERNAL(load_bhed,load_bhed_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \ + FT_INTERNAL(load_sbit_image,load_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \ + FT_INTERNAL(get_psname,get_psname_) \ + FT_INTERNAL(free_psnames,free_psnames_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \ + FT_INTERNAL(get_kerning,get_kerning_) \ + FT_INTERNAL(load_font_dir,load_font_dir_) \ + FT_INTERNAL(load_hmtx,load_hmtx_) \ + FT_INTERNAL(load_eblc,load_eblc_) \ + FT_INTERNAL(free_eblc,free_eblc_) \ + FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \ + FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \ + FT_INTERNAL(get_metrics,get_metrics_) \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __SFNT_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/t1types.h b/contrib/media/updf/include/freetype/internal/t1types.h new file mode 100644 index 0000000000..5f730637b5 --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/t1types.h @@ -0,0 +1,270 @@ +/***************************************************************************/ +/* */ +/* t1types.h */ +/* */ +/* Basic Type1/Type2 type definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __T1TYPES_H__ +#define __T1TYPES_H__ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H +#include FT_INTERNAL_POSTSCRIPT_HINTS_H +#include FT_INTERNAL_SERVICE_H +#include FT_SERVICE_POSTSCRIPT_CMAPS_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_EncodingRec */ + /* */ + /* <Description> */ + /* A structure modeling a custom encoding. */ + /* */ + /* <Fields> */ + /* num_chars :: The number of character codes in the encoding. */ + /* Usually 256. */ + /* */ + /* code_first :: The lowest valid character code in the encoding. */ + /* */ + /* code_last :: The highest valid character code in the encoding */ + /* + 1. When equal to code_first there are no valid */ + /* character codes. */ + /* */ + /* char_index :: An array of corresponding glyph indices. */ + /* */ + /* char_name :: An array of corresponding glyph names. */ + /* */ + typedef struct T1_EncodingRecRec_ + { + FT_Int num_chars; + FT_Int code_first; + FT_Int code_last; + + FT_UShort* char_index; + FT_String** char_name; + + } T1_EncodingRec, *T1_Encoding; + + + typedef enum T1_EncodingType_ + { + T1_ENCODING_TYPE_NONE = 0, + T1_ENCODING_TYPE_ARRAY, + T1_ENCODING_TYPE_STANDARD, + T1_ENCODING_TYPE_ISOLATIN1, + T1_ENCODING_TYPE_EXPERT + + } T1_EncodingType; + + + /* used to hold extra data of PS_FontInfoRec that + * cannot be stored in the publicly defined structure. + * + * Note these can't be blended with multiple-masters. + */ + typedef struct PS_FontExtraRec_ + { + FT_UShort fs_type; + + } PS_FontExtraRec; + + + typedef struct T1_FontRec_ + { + PS_FontInfoRec font_info; /* font info dictionary */ + PS_FontExtraRec font_extra; /* font info extra fields */ + PS_PrivateRec private_dict; /* private dictionary */ + FT_String* font_name; /* top-level dictionary */ + + T1_EncodingType encoding_type; + T1_EncodingRec encoding; + + FT_Byte* subrs_block; + FT_Byte* charstrings_block; + FT_Byte* glyph_names_block; + + FT_Int num_subrs; + FT_Byte** subrs; + FT_PtrDist* subrs_len; + + FT_Int num_glyphs; + FT_String** glyph_names; /* array of glyph names */ + FT_Byte** charstrings; /* array of glyph charstrings */ + FT_PtrDist* charstrings_len; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + FT_BBox font_bbox; + FT_Long font_id; + + FT_Fixed stroke_width; + + } T1_FontRec, *T1_Font; + + + typedef struct CID_SubrsRec_ + { + FT_UInt num_subrs; + FT_Byte** code; + + } CID_SubrsRec, *CID_Subrs; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** AFM FONT INFORMATION STRUCTURES ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct AFM_TrackKernRec_ + { + FT_Int degree; + FT_Fixed min_ptsize; + FT_Fixed min_kern; + FT_Fixed max_ptsize; + FT_Fixed max_kern; + + } AFM_TrackKernRec, *AFM_TrackKern; + + typedef struct AFM_KernPairRec_ + { + FT_Int index1; + FT_Int index2; + FT_Int x; + FT_Int y; + + } AFM_KernPairRec, *AFM_KernPair; + + typedef struct AFM_FontInfoRec_ + { + FT_Bool IsCIDFont; + FT_BBox FontBBox; + FT_Fixed Ascender; + FT_Fixed Descender; + AFM_TrackKern TrackKerns; /* free if non-NULL */ + FT_Int NumTrackKern; + AFM_KernPair KernPairs; /* free if non-NULL */ + FT_Int NumKernPair; + + } AFM_FontInfoRec, *AFM_FontInfo; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** ORIGINAL T1_FACE CLASS DEFINITION ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct T1_FaceRec_* T1_Face; + typedef struct CID_FaceRec_* CID_Face; + + + typedef struct T1_FaceRec_ + { + FT_FaceRec root; + T1_FontRec type1; + const void* psnames; + const void* psaux; + const void* afm_data; + FT_CharMapRec charmaprecs[2]; + FT_CharMap charmaps[2]; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + PS_Unicodes unicode_map; +#endif + + /* support for Multiple Masters fonts */ + PS_Blend blend; + + /* undocumented, optional: indices of subroutines that express */ + /* the NormalizeDesignVector and the ConvertDesignVector procedure, */ + /* respectively, as Type 2 charstrings; -1 if keywords not present */ + FT_Int ndv_idx; + FT_Int cdv_idx; + + /* undocumented, optional: has the same meaning as len_buildchar */ + /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */ + FT_UInt len_buildchar; + FT_Long* buildchar; + + /* since version 2.1 - interface to PostScript hinter */ + const void* pshinter; + + } T1_FaceRec; + + + typedef struct CID_FaceRec_ + { + FT_FaceRec root; + void* psnames; + void* psaux; + CID_FaceInfoRec cid; + PS_FontExtraRec font_extra; +#if 0 + void* afm_data; +#endif + CID_Subrs subrs; + + /* since version 2.1 - interface to PostScript hinter */ + void* pshinter; + + /* since version 2.1.8, but was originally positioned after `afm_data' */ + FT_Byte* binary_data; /* used if hex data has been converted */ + FT_Stream cid_stream; + + } CID_FaceRec; + + +FT_END_HEADER + +#endif /* __T1TYPES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/internal/tttypes.h b/contrib/media/updf/include/freetype/internal/tttypes.h new file mode 100644 index 0000000000..acbb863b0f --- /dev/null +++ b/contrib/media/updf/include/freetype/internal/tttypes.h @@ -0,0 +1,1543 @@ +/***************************************************************************/ +/* */ +/* tttypes.h */ +/* */ +/* Basic SFNT/TrueType type definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTTYPES_H__ +#define __TTTYPES_H__ + + +#include <ft2build.h> +#include FT_TRUETYPE_TABLES_H +#include FT_INTERNAL_OBJECTS_H + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#include FT_MULTIPLE_MASTERS_H +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TTC_HeaderRec */ + /* */ + /* <Description> */ + /* TrueType collection header. This table contains the offsets of */ + /* the font headers of each distinct TrueType face in the file. */ + /* */ + /* <Fields> */ + /* tag :: Must be `ttc ' to indicate a TrueType collection. */ + /* */ + /* version :: The version number. */ + /* */ + /* count :: The number of faces in the collection. The */ + /* specification says this should be an unsigned long, but */ + /* we use a signed long since we need the value -1 for */ + /* specific purposes. */ + /* */ + /* offsets :: The offsets of the font headers, one per face. */ + /* */ + typedef struct TTC_HeaderRec_ + { + FT_ULong tag; + FT_Fixed version; + FT_Long count; + FT_ULong* offsets; + + } TTC_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* SFNT_HeaderRec */ + /* */ + /* <Description> */ + /* SFNT file format header. */ + /* */ + /* <Fields> */ + /* format_tag :: The font format tag. */ + /* */ + /* num_tables :: The number of tables in file. */ + /* */ + /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */ + /* */ + /* entry_selector :: Must be log2 of `search_range / 16'. */ + /* */ + /* range_shift :: Must be `num_tables * 16 - search_range'. */ + /* */ + typedef struct SFNT_HeaderRec_ + { + FT_ULong format_tag; + FT_UShort num_tables; + FT_UShort search_range; + FT_UShort entry_selector; + FT_UShort range_shift; + + FT_ULong offset; /* not in file */ + + } SFNT_HeaderRec, *SFNT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_TableRec */ + /* */ + /* <Description> */ + /* This structure describes a given table of a TrueType font. */ + /* */ + /* <Fields> */ + /* Tag :: A four-bytes tag describing the table. */ + /* */ + /* CheckSum :: The table checksum. This value can be ignored. */ + /* */ + /* Offset :: The offset of the table from the start of the TrueType */ + /* font in its resource. */ + /* */ + /* Length :: The table length (in bytes). */ + /* */ + typedef struct TT_TableRec_ + { + FT_ULong Tag; /* table type */ + FT_ULong CheckSum; /* table checksum */ + FT_ULong Offset; /* table file offset */ + FT_ULong Length; /* table length */ + + } TT_TableRec, *TT_Table; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_LongMetricsRec */ + /* */ + /* <Description> */ + /* A structure modeling the long metrics of the `hmtx' and `vmtx' */ + /* TrueType tables. The values are expressed in font units. */ + /* */ + /* <Fields> */ + /* advance :: The advance width or height for the glyph. */ + /* */ + /* bearing :: The left-side or top-side bearing for the glyph. */ + /* */ + typedef struct TT_LongMetricsRec_ + { + FT_UShort advance; + FT_Short bearing; + + } TT_LongMetricsRec, *TT_LongMetrics; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* TT_ShortMetrics */ + /* */ + /* <Description> */ + /* A simple type to model the short metrics of the `hmtx' and `vmtx' */ + /* tables. */ + /* */ + typedef FT_Short TT_ShortMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_NameEntryRec */ + /* */ + /* <Description> */ + /* A structure modeling TrueType name records. Name records are used */ + /* to store important strings like family name, style name, */ + /* copyright, etc. in _localized_ versions (i.e., language, encoding, */ + /* etc). */ + /* */ + /* <Fields> */ + /* platformID :: The ID of the name's encoding platform. */ + /* */ + /* encodingID :: The platform-specific ID for the name's encoding. */ + /* */ + /* languageID :: The platform-specific ID for the name's language. */ + /* */ + /* nameID :: The ID specifying what kind of name this is. */ + /* */ + /* stringLength :: The length of the string in bytes. */ + /* */ + /* stringOffset :: The offset to the string in the `name' table. */ + /* */ + /* string :: A pointer to the string's bytes. Note that these */ + /* are usually UTF-16 encoded characters. */ + /* */ + typedef struct TT_NameEntryRec_ + { + FT_UShort platformID; + FT_UShort encodingID; + FT_UShort languageID; + FT_UShort nameID; + FT_UShort stringLength; + FT_ULong stringOffset; + + /* this last field is not defined in the spec */ + /* but used by the FreeType engine */ + + FT_Byte* string; + + } TT_NameEntryRec, *TT_NameEntry; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_NameTableRec */ + /* */ + /* <Description> */ + /* A structure modeling the TrueType name table. */ + /* */ + /* <Fields> */ + /* format :: The format of the name table. */ + /* */ + /* numNameRecords :: The number of names in table. */ + /* */ + /* storageOffset :: The offset of the name table in the `name' */ + /* TrueType table. */ + /* */ + /* names :: An array of name records. */ + /* */ + /* stream :: the file's input stream. */ + /* */ + typedef struct TT_NameTableRec_ + { + FT_UShort format; + FT_UInt numNameRecords; + FT_UInt storageOffset; + TT_NameEntryRec* names; + FT_Stream stream; + + } TT_NameTableRec, *TT_NameTable; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GaspRangeRec */ + /* */ + /* <Description> */ + /* A tiny structure used to model a gasp range according to the */ + /* TrueType specification. */ + /* */ + /* <Fields> */ + /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */ + /* */ + /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */ + /* modes to be used. */ + /* */ + typedef struct TT_GaspRangeRec_ + { + FT_UShort maxPPEM; + FT_UShort gaspFlag; + + } TT_GaspRangeRec, *TT_GaspRange; + + +#define TT_GASP_GRIDFIT 0x01 +#define TT_GASP_DOGRAY 0x02 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GaspRec */ + /* */ + /* <Description> */ + /* A structure modeling the TrueType `gasp' table used to specify */ + /* grid-fitting and anti-aliasing behaviour. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numRanges :: The number of gasp ranges in table. */ + /* */ + /* gaspRanges :: An array of gasp ranges. */ + /* */ + typedef struct TT_Gasp_ + { + FT_UShort version; + FT_UShort numRanges; + TT_GaspRange gaspRanges; + + } TT_GaspRec; + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HdmxEntryRec */ + /* */ + /* <Description> */ + /* A small structure used to model the pre-computed widths of a given */ + /* size. They are found in the `hdmx' table. */ + /* */ + /* <Fields> */ + /* ppem :: The pixels per EM value at which these metrics apply. */ + /* */ + /* max_width :: The maximum advance width for this metric. */ + /* */ + /* widths :: An array of widths. Note: These are 8-bit bytes. */ + /* */ + typedef struct TT_HdmxEntryRec_ + { + FT_Byte ppem; + FT_Byte max_width; + FT_Byte* widths; + + } TT_HdmxEntryRec, *TT_HdmxEntry; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HdmxRec */ + /* */ + /* <Description> */ + /* A structure used to model the `hdmx' table, which contains */ + /* pre-computed widths for a set of given sizes/dimensions. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* num_records :: The number of hdmx records. */ + /* */ + /* records :: An array of hdmx records. */ + /* */ + typedef struct TT_HdmxRec_ + { + FT_UShort version; + FT_Short num_records; + TT_HdmxEntry records; + + } TT_HdmxRec, *TT_Hdmx; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Kern0_PairRec */ + /* */ + /* <Description> */ + /* A structure used to model a kerning pair for the kerning table */ + /* format 0. The engine now loads this table if it finds one in the */ + /* font file. */ + /* */ + /* <Fields> */ + /* left :: The index of the left glyph in pair. */ + /* */ + /* right :: The index of the right glyph in pair. */ + /* */ + /* value :: The kerning distance. A positive value spaces the */ + /* glyphs, a negative one makes them closer. */ + /* */ + typedef struct TT_Kern0_PairRec_ + { + FT_UShort left; /* index of left glyph in pair */ + FT_UShort right; /* index of right glyph in pair */ + FT_FWord value; /* kerning value */ + + } TT_Kern0_PairRec, *TT_Kern0_Pair; + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** EMBEDDED BITMAPS SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_MetricsRec */ + /* */ + /* <Description> */ + /* A structure used to hold the big metrics of a given glyph bitmap */ + /* in a TrueType or OpenType font. These are usually found in the */ + /* `EBDT' (Microsoft) or `bloc' (Apple) table. */ + /* */ + /* <Fields> */ + /* height :: The glyph height in pixels. */ + /* */ + /* width :: The glyph width in pixels. */ + /* */ + /* horiBearingX :: The horizontal left bearing. */ + /* */ + /* horiBearingY :: The horizontal top bearing. */ + /* */ + /* horiAdvance :: The horizontal advance. */ + /* */ + /* vertBearingX :: The vertical left bearing. */ + /* */ + /* vertBearingY :: The vertical top bearing. */ + /* */ + /* vertAdvance :: The vertical advance. */ + /* */ + typedef struct TT_SBit_MetricsRec_ + { + FT_Byte height; + FT_Byte width; + + FT_Char horiBearingX; + FT_Char horiBearingY; + FT_Byte horiAdvance; + + FT_Char vertBearingX; + FT_Char vertBearingY; + FT_Byte vertAdvance; + + } TT_SBit_MetricsRec, *TT_SBit_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_SmallMetricsRec */ + /* */ + /* <Description> */ + /* A structure used to hold the small metrics of a given glyph bitmap */ + /* in a TrueType or OpenType font. These are usually found in the */ + /* `EBDT' (Microsoft) or the `bdat' (Apple) table. */ + /* */ + /* <Fields> */ + /* height :: The glyph height in pixels. */ + /* */ + /* width :: The glyph width in pixels. */ + /* */ + /* bearingX :: The left-side bearing. */ + /* */ + /* bearingY :: The top-side bearing. */ + /* */ + /* advance :: The advance width or height. */ + /* */ + typedef struct TT_SBit_Small_Metrics_ + { + FT_Byte height; + FT_Byte width; + + FT_Char bearingX; + FT_Char bearingY; + FT_Byte advance; + + } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_LineMetricsRec */ + /* */ + /* <Description> */ + /* A structure used to describe the text line metrics of a given */ + /* bitmap strike, for either a horizontal or vertical layout. */ + /* */ + /* <Fields> */ + /* ascender :: The ascender in pixels. */ + /* */ + /* descender :: The descender in pixels. */ + /* */ + /* max_width :: The maximum glyph width in pixels. */ + /* */ + /* caret_slope_enumerator :: Rise of the caret slope, typically set */ + /* to 1 for non-italic fonts. */ + /* */ + /* caret_slope_denominator :: Rise of the caret slope, typically set */ + /* to 0 for non-italic fonts. */ + /* */ + /* caret_offset :: Offset in pixels to move the caret for */ + /* proper positioning. */ + /* */ + /* min_origin_SB :: Minimum of horiBearingX (resp. */ + /* vertBearingY). */ + /* min_advance_SB :: Minimum of */ + /* */ + /* horizontal advance - */ + /* ( horiBearingX + width ) */ + /* */ + /* resp. */ + /* */ + /* vertical advance - */ + /* ( vertBearingY + height ) */ + /* */ + /* max_before_BL :: Maximum of horiBearingY (resp. */ + /* vertBearingY). */ + /* */ + /* min_after_BL :: Minimum of */ + /* */ + /* horiBearingY - height */ + /* */ + /* resp. */ + /* */ + /* vertBearingX - width */ + /* */ + /* pads :: Unused (to make the size of the record */ + /* a multiple of 32 bits. */ + /* */ + typedef struct TT_SBit_LineMetricsRec_ + { + FT_Char ascender; + FT_Char descender; + FT_Byte max_width; + FT_Char caret_slope_numerator; + FT_Char caret_slope_denominator; + FT_Char caret_offset; + FT_Char min_origin_SB; + FT_Char min_advance_SB; + FT_Char max_before_BL; + FT_Char min_after_BL; + FT_Char pads[2]; + + } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_RangeRec */ + /* */ + /* <Description> */ + /* A TrueType/OpenType subIndexTable as defined in the `EBLC' */ + /* (Microsoft) or `bloc' (Apple) tables. */ + /* */ + /* <Fields> */ + /* first_glyph :: The first glyph index in the range. */ + /* */ + /* last_glyph :: The last glyph index in the range. */ + /* */ + /* index_format :: The format of index table. Valid values are 1 */ + /* to 5. */ + /* */ + /* image_format :: The format of `EBDT' image data. */ + /* */ + /* image_offset :: The offset to image data in `EBDT'. */ + /* */ + /* image_size :: For index formats 2 and 5. This is the size in */ + /* bytes of each glyph bitmap. */ + /* */ + /* big_metrics :: For index formats 2 and 5. This is the big */ + /* metrics for each glyph bitmap. */ + /* */ + /* num_glyphs :: For index formats 4 and 5. This is the number of */ + /* glyphs in the code array. */ + /* */ + /* glyph_offsets :: For index formats 1 and 3. */ + /* */ + /* glyph_codes :: For index formats 4 and 5. */ + /* */ + /* table_offset :: The offset of the index table in the `EBLC' */ + /* table. Only used during strike loading. */ + /* */ + typedef struct TT_SBit_RangeRec_ + { + FT_UShort first_glyph; + FT_UShort last_glyph; + + FT_UShort index_format; + FT_UShort image_format; + FT_ULong image_offset; + + FT_ULong image_size; + TT_SBit_MetricsRec metrics; + FT_ULong num_glyphs; + + FT_ULong* glyph_offsets; + FT_UShort* glyph_codes; + + FT_ULong table_offset; + + } TT_SBit_RangeRec, *TT_SBit_Range; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_StrikeRec */ + /* */ + /* <Description> */ + /* A structure used describe a given bitmap strike in the `EBLC' */ + /* (Microsoft) or `bloc' (Apple) tables. */ + /* */ + /* <Fields> */ + /* num_index_ranges :: The number of index ranges. */ + /* */ + /* index_ranges :: An array of glyph index ranges. */ + /* */ + /* color_ref :: Unused. `color_ref' is put in for future */ + /* enhancements, but these fields are already */ + /* in use by other platforms (e.g. Newton). */ + /* For details, please see */ + /* */ + /* http://fonts.apple.com/ */ + /* TTRefMan/RM06/Chap6bloc.html */ + /* */ + /* hori :: The line metrics for horizontal layouts. */ + /* */ + /* vert :: The line metrics for vertical layouts. */ + /* */ + /* start_glyph :: The lowest glyph index for this strike. */ + /* */ + /* end_glyph :: The highest glyph index for this strike. */ + /* */ + /* x_ppem :: The number of horizontal pixels per EM. */ + /* */ + /* y_ppem :: The number of vertical pixels per EM. */ + /* */ + /* bit_depth :: The bit depth. Valid values are 1, 2, 4, */ + /* and 8. */ + /* */ + /* flags :: Is this a vertical or horizontal strike? For */ + /* details, please see */ + /* */ + /* http://fonts.apple.com/ */ + /* TTRefMan/RM06/Chap6bloc.html */ + /* */ + typedef struct TT_SBit_StrikeRec_ + { + FT_Int num_ranges; + TT_SBit_Range sbit_ranges; + FT_ULong ranges_offset; + + FT_ULong color_ref; + + TT_SBit_LineMetricsRec hori; + TT_SBit_LineMetricsRec vert; + + FT_UShort start_glyph; + FT_UShort end_glyph; + + FT_Byte x_ppem; + FT_Byte y_ppem; + + FT_Byte bit_depth; + FT_Char flags; + + } TT_SBit_StrikeRec, *TT_SBit_Strike; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_ComponentRec */ + /* */ + /* <Description> */ + /* A simple structure to describe a compound sbit element. */ + /* */ + /* <Fields> */ + /* glyph_code :: The element's glyph index. */ + /* */ + /* x_offset :: The element's left bearing. */ + /* */ + /* y_offset :: The element's top bearing. */ + /* */ + typedef struct TT_SBit_ComponentRec_ + { + FT_UShort glyph_code; + FT_Char x_offset; + FT_Char y_offset; + + } TT_SBit_ComponentRec, *TT_SBit_Component; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_ScaleRec */ + /* */ + /* <Description> */ + /* A structure used describe a given bitmap scaling table, as defined */ + /* in the `EBSC' table. */ + /* */ + /* <Fields> */ + /* hori :: The horizontal line metrics. */ + /* */ + /* vert :: The vertical line metrics. */ + /* */ + /* x_ppem :: The number of horizontal pixels per EM. */ + /* */ + /* y_ppem :: The number of vertical pixels per EM. */ + /* */ + /* x_ppem_substitute :: Substitution x_ppem value. */ + /* */ + /* y_ppem_substitute :: Substitution y_ppem value. */ + /* */ + typedef struct TT_SBit_ScaleRec_ + { + TT_SBit_LineMetricsRec hori; + TT_SBit_LineMetricsRec vert; + + FT_Byte x_ppem; + FT_Byte y_ppem; + + FT_Byte x_ppem_substitute; + FT_Byte y_ppem_substitute; + + } TT_SBit_ScaleRec, *TT_SBit_Scale; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_20Rec */ + /* */ + /* <Description> */ + /* Postscript names sub-table, format 2.0. Stores the PS name of */ + /* each glyph in the font face. */ + /* */ + /* <Fields> */ + /* num_glyphs :: The number of named glyphs in the table. */ + /* */ + /* num_names :: The number of PS names stored in the table. */ + /* */ + /* glyph_indices :: The indices of the glyphs in the names arrays. */ + /* */ + /* glyph_names :: The PS names not in Mac Encoding. */ + /* */ + typedef struct TT_Post_20Rec_ + { + FT_UShort num_glyphs; + FT_UShort num_names; + FT_UShort* glyph_indices; + FT_Char** glyph_names; + + } TT_Post_20Rec, *TT_Post_20; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_25Rec */ + /* */ + /* <Description> */ + /* Postscript names sub-table, format 2.5. Stores the PS name of */ + /* each glyph in the font face. */ + /* */ + /* <Fields> */ + /* num_glyphs :: The number of glyphs in the table. */ + /* */ + /* offsets :: An array of signed offsets in a normal Mac */ + /* Postscript name encoding. */ + /* */ + typedef struct TT_Post_25_ + { + FT_UShort num_glyphs; + FT_Char* offsets; + + } TT_Post_25Rec, *TT_Post_25; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_NamesRec */ + /* */ + /* <Description> */ + /* Postscript names table, either format 2.0 or 2.5. */ + /* */ + /* <Fields> */ + /* loaded :: A flag to indicate whether the PS names are loaded. */ + /* */ + /* format_20 :: The sub-table used for format 2.0. */ + /* */ + /* format_25 :: The sub-table used for format 2.5. */ + /* */ + typedef struct TT_Post_NamesRec_ + { + FT_Bool loaded; + + union + { + TT_Post_20Rec format_20; + TT_Post_25Rec format_25; + + } names; + + } TT_Post_NamesRec, *TT_Post_Names; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** GX VARIATION TABLE SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + typedef struct GX_BlendRec_ *GX_Blend; +#endif + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * These types are used to support a `BDF ' table that isn't part of the + * official TrueType specification. It is mainly used in SFNT-based + * bitmap fonts that were generated from a set of BDF fonts. + * + * The format of the table is as follows. + * + * USHORT version `BDF ' table version number, should be 0x0001. + * USHORT strikeCount Number of strikes (bitmap sizes) in this table. + * ULONG stringTable Offset (from start of BDF table) to string + * table. + * + * This is followed by an array of `strikeCount' descriptors, having the + * following format. + * + * USHORT ppem Vertical pixels per EM for this strike. + * USHORT numItems Number of items for this strike (properties and + * atoms). Maximum is 255. + * + * This array in turn is followed by `strikeCount' value sets. Each + * `value set' is an array of `numItems' items with the following format. + * + * ULONG item_name Offset in string table to item name. + * USHORT item_type The item type. Possible values are + * 0 => string (e.g., COMMENT) + * 1 => atom (e.g., FONT or even SIZE) + * 2 => int32 + * 3 => uint32 + * 0x10 => A flag to indicate a properties. This + * is ORed with the above values. + * ULONG item_value For strings => Offset into string table without + * the corresponding double quotes. + * For atoms => Offset into string table. + * For integers => Direct value. + * + * All strings in the string table consist of bytes and are + * zero-terminated. + * + */ + +#ifdef TT_CONFIG_OPTION_BDF + + typedef struct TT_BDFRec_ + { + FT_Byte* table; + FT_Byte* table_end; + FT_Byte* strings; + FT_ULong strings_size; + FT_UInt num_strikes; + FT_Bool loaded; + + } TT_BDFRec, *TT_BDF; + +#endif /* TT_CONFIG_OPTION_BDF */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** ORIGINAL TT_FACE CLASS DEFINITION ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This structure/class is defined here because it is common to the */ + /* following formats: TTF, OpenType-TT, and OpenType-CFF. */ + /* */ + /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */ + /* shared between font drivers, and are thus defined in `ttobjs.h'. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* TT_Face */ + /* */ + /* <Description> */ + /* A handle to a TrueType face/font object. A TT_Face encapsulates */ + /* the resolution and scaling independent parts of a TrueType font */ + /* resource. */ + /* */ + /* <Note> */ + /* The TT_Face structure is also used as a `parent class' for the */ + /* OpenType-CFF class (T2_Face). */ + /* */ + typedef struct TT_FaceRec_* TT_Face; + + + /* a function type used for the truetype bytecode interpreter hooks */ + typedef FT_Error + (*TT_Interpreter)( void* exec_context ); + + /* forward declaration */ + typedef struct TT_LoaderRec_* TT_Loader; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_GotoTableFunc */ + /* */ + /* <Description> */ + /* Seeks a stream to the start of a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* tag :: A 4-byte tag used to name the table. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* <Output> */ + /* length :: The length of the table in bytes. Set to 0 if not */ + /* needed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + typedef FT_Error + (*TT_Loader_GotoTableFunc)( TT_Face face, + FT_ULong tag, + FT_Stream stream, + FT_ULong* length ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_StartGlyphFunc */ + /* */ + /* <Description> */ + /* Seeks a stream to the start of a given glyph element, and opens a */ + /* frame for it. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + /* glyph index :: The index of the glyph to access. */ + /* */ + /* offset :: The offset of the glyph according to the */ + /* `locations' table. */ + /* */ + /* byte_count :: The size of the frame in bytes. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function is normally equivalent to FT_STREAM_SEEK(offset) */ + /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */ + /* but alternative formats (e.g. compressed ones) might use something */ + /* different. */ + /* */ + typedef FT_Error + (*TT_Loader_StartGlyphFunc)( TT_Loader loader, + FT_UInt glyph_index, + FT_ULong offset, + FT_UInt byte_count ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_ReadGlyphFunc */ + /* */ + /* <Description> */ + /* Reads one glyph element (its header, a simple glyph, or a */ + /* composite) from the loader's current stream frame. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Loader_ReadGlyphFunc)( TT_Loader loader ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_EndGlyphFunc */ + /* */ + /* <Description> */ + /* Closes the current loader stream frame for the glyph. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + typedef void + (*TT_Loader_EndGlyphFunc)( TT_Loader loader ); + + + /*************************************************************************/ + /* */ + /* TrueType Face Type */ + /* */ + /* <Struct> */ + /* TT_Face */ + /* */ + /* <Description> */ + /* The TrueType face class. These objects model the resolution and */ + /* point-size independent data found in a TrueType font file. */ + /* */ + /* <Fields> */ + /* root :: The base FT_Face structure, managed by the */ + /* base layer. */ + /* */ + /* ttc_header :: The TrueType collection header, used when */ + /* the file is a `ttc' rather than a `ttf'. */ + /* For ordinary font files, the field */ + /* `ttc_header.count' is set to 0. */ + /* */ + /* format_tag :: The font format tag. */ + /* */ + /* num_tables :: The number of TrueType tables in this font */ + /* file. */ + /* */ + /* dir_tables :: The directory of TrueType tables for this */ + /* font file. */ + /* */ + /* header :: The font's font header (`head' table). */ + /* Read on font opening. */ + /* */ + /* horizontal :: The font's horizontal header (`hhea' */ + /* table). This field also contains the */ + /* associated horizontal metrics table */ + /* (`hmtx'). */ + /* */ + /* max_profile :: The font's maximum profile table. Read on */ + /* font opening. Note that some maximum */ + /* values cannot be taken directly from this */ + /* table. We thus define additional fields */ + /* below to hold the computed maxima. */ + /* */ + /* vertical_info :: A boolean which is set when the font file */ + /* contains vertical metrics. If not, the */ + /* value of the `vertical' field is */ + /* undefined. */ + /* */ + /* vertical :: The font's vertical header (`vhea' table). */ + /* This field also contains the associated */ + /* vertical metrics table (`vmtx'), if found. */ + /* IMPORTANT: The contents of this field is */ + /* undefined if the `verticalInfo' field is */ + /* unset. */ + /* */ + /* num_names :: The number of name records within this */ + /* TrueType font. */ + /* */ + /* name_table :: The table of name records (`name'). */ + /* */ + /* os2 :: The font's OS/2 table (`OS/2'). */ + /* */ + /* postscript :: The font's PostScript table (`post' */ + /* table). The PostScript glyph names are */ + /* not loaded by the driver on face opening. */ + /* See the `ttpost' module for more details. */ + /* */ + /* cmap_table :: Address of the face's `cmap' SFNT table */ + /* in memory (it's an extracted frame). */ + /* */ + /* cmap_size :: The size in bytes of the `cmap_table' */ + /* described above. */ + /* */ + /* goto_table :: A function called by each TrueType table */ + /* loader to position a stream's cursor to */ + /* the start of a given table according to */ + /* its tag. It defaults to TT_Goto_Face but */ + /* can be different for strange formats (e.g. */ + /* Type 42). */ + /* */ + /* access_glyph_frame :: A function used to access the frame of a */ + /* given glyph within the face's font file. */ + /* */ + /* forget_glyph_frame :: A function used to forget the frame of a */ + /* given glyph when all data has been loaded. */ + /* */ + /* read_glyph_header :: A function used to read a glyph header. */ + /* It must be called between an `access' and */ + /* `forget'. */ + /* */ + /* read_simple_glyph :: A function used to read a simple glyph. */ + /* It must be called after the header was */ + /* read, and before the `forget'. */ + /* */ + /* read_composite_glyph :: A function used to read a composite glyph. */ + /* It must be called after the header was */ + /* read, and before the `forget'. */ + /* */ + /* sfnt :: A pointer to the SFNT service. */ + /* */ + /* psnames :: A pointer to the PostScript names service. */ + /* */ + /* hdmx :: The face's horizontal device metrics */ + /* (`hdmx' table). This table is optional in */ + /* TrueType/OpenType fonts. */ + /* */ + /* gasp :: The grid-fitting and scaling properties */ + /* table (`gasp'). This table is optional in */ + /* TrueType/OpenType fonts. */ + /* */ + /* pclt :: The `pclt' SFNT table. */ + /* */ + /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */ + /* sizes, embedded in this font. */ + /* */ + /* sbit_strikes :: An array of sbit strikes embedded in this */ + /* font. This table is optional in a */ + /* TrueType/OpenType font. */ + /* */ + /* num_sbit_scales :: The number of sbit scales for this font. */ + /* */ + /* sbit_scales :: Array of sbit scales embedded in this */ + /* font. This table is optional in a */ + /* TrueType/OpenType font. */ + /* */ + /* postscript_names :: A table used to store the Postscript names */ + /* of the glyphs for this font. See the */ + /* file `ttconfig.h' for comments on the */ + /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */ + /* */ + /* num_locations :: The number of glyph locations in this */ + /* TrueType file. This should be */ + /* identical to the number of glyphs. */ + /* Ignored for Type 2 fonts. */ + /* */ + /* glyph_locations :: An array of longs. These are offsets to */ + /* glyph data within the `glyf' table. */ + /* Ignored for Type 2 font faces. */ + /* */ + /* glyf_len :: The length of the `glyf' table. Needed */ + /* for malformed `loca' tables. */ + /* */ + /* font_program_size :: Size in bytecodes of the face's font */ + /* program. 0 if none defined. Ignored for */ + /* Type 2 fonts. */ + /* */ + /* font_program :: The face's font program (bytecode stream) */ + /* executed at load time, also used during */ + /* glyph rendering. Comes from the `fpgm' */ + /* table. Ignored for Type 2 font fonts. */ + /* */ + /* cvt_program_size :: The size in bytecodes of the face's cvt */ + /* program. Ignored for Type 2 fonts. */ + /* */ + /* cvt_program :: The face's cvt program (bytecode stream) */ + /* executed each time an instance/size is */ + /* changed/reset. Comes from the `prep' */ + /* table. Ignored for Type 2 fonts. */ + /* */ + /* cvt_size :: Size of the control value table (in */ + /* entries). Ignored for Type 2 fonts. */ + /* */ + /* cvt :: The face's original control value table. */ + /* Coordinates are expressed in unscaled font */ + /* units. Comes from the `cvt ' table. */ + /* Ignored for Type 2 fonts. */ + /* */ + /* num_kern_pairs :: The number of kerning pairs present in the */ + /* font file. The engine only loads the */ + /* first horizontal format 0 kern table it */ + /* finds in the font file. Ignored for */ + /* Type 2 fonts. */ + /* */ + /* kern_table_index :: The index of the kerning table in the font */ + /* kerning directory. Ignored for Type 2 */ + /* fonts. */ + /* */ + /* interpreter :: A pointer to the TrueType bytecode */ + /* interpreters field is also used to hook */ + /* the debugger in `ttdebug'. */ + /* */ + /* unpatented_hinting :: If true, use only unpatented methods in */ + /* the bytecode interpreter. */ + /* */ + /* doblend :: A boolean which is set if the font should */ + /* be blended (this is for GX var). */ + /* */ + /* blend :: Contains the data needed to control GX */ + /* variation tables (rather like Multiple */ + /* Master data). */ + /* */ + /* extra :: Reserved for third-party font drivers. */ + /* */ + /* postscript_name :: The PS name of the font. Used by the */ + /* postscript name service. */ + /* */ + typedef struct TT_FaceRec_ + { + FT_FaceRec root; + + TTC_HeaderRec ttc_header; + + FT_ULong format_tag; + FT_UShort num_tables; + TT_Table dir_tables; + + TT_Header header; /* TrueType header table */ + TT_HoriHeader horizontal; /* TrueType horizontal header */ + + TT_MaxProfile max_profile; +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_ULong max_components; /* stubbed to 0 */ +#endif + + FT_Bool vertical_info; + TT_VertHeader vertical; /* TT Vertical header, if present */ + + FT_UShort num_names; /* number of name records */ + TT_NameTableRec name_table; /* name table */ + + TT_OS2 os2; /* TrueType OS/2 table */ + TT_Postscript postscript; /* TrueType Postscript table */ + + FT_Byte* cmap_table; /* extracted `cmap' table */ + FT_ULong cmap_size; + + TT_Loader_GotoTableFunc goto_table; + + TT_Loader_StartGlyphFunc access_glyph_frame; + TT_Loader_EndGlyphFunc forget_glyph_frame; + TT_Loader_ReadGlyphFunc read_glyph_header; + TT_Loader_ReadGlyphFunc read_simple_glyph; + TT_Loader_ReadGlyphFunc read_composite_glyph; + + /* a typeless pointer to the SFNT_Interface table used to load */ + /* the basic TrueType tables in the face object */ + void* sfnt; + + /* a typeless pointer to the FT_Service_PsCMapsRec table used to */ + /* handle glyph names <-> unicode & Mac values */ + void* psnames; + + + /***********************************************************************/ + /* */ + /* Optional TrueType/OpenType tables */ + /* */ + /***********************************************************************/ + + /* horizontal device metrics */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_HdmxRec hdmx; +#endif + + /* grid-fitting and scaling table */ + TT_GaspRec gasp; /* the `gasp' table */ + + /* PCL 5 table */ + TT_PCLT pclt; + + /* embedded bitmaps support */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_ULong num_sbit_strikes; + TT_SBit_Strike sbit_strikes; +#endif + + FT_ULong num_sbit_scales; + TT_SBit_Scale sbit_scales; + + /* postscript names table */ + TT_Post_NamesRec postscript_names; + + + /***********************************************************************/ + /* */ + /* TrueType-specific fields (ignored by the OTF-Type2 driver) */ + /* */ + /***********************************************************************/ + + /* the glyph locations */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_UShort num_locations_stub; + FT_Long* glyph_locations_stub; +#endif + + /* the font program, if any */ + FT_ULong font_program_size; + FT_Byte* font_program; + + /* the cvt program, if any */ + FT_ULong cvt_program_size; + FT_Byte* cvt_program; + + /* the original, unscaled, control value table */ + FT_ULong cvt_size; + FT_Short* cvt; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + /* the format 0 kerning table, if any */ + FT_Int num_kern_pairs; + FT_Int kern_table_index; + TT_Kern0_Pair kern_pairs; +#endif + + /* A pointer to the bytecode interpreter to use. This is also */ + /* used to hook the debugger for the `ttdebug' utility. */ + TT_Interpreter interpreter; + +#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + /* Use unpatented hinting only. */ + FT_Bool unpatented_hinting; +#endif + + /***********************************************************************/ + /* */ + /* Other tables or fields. This is used by derivative formats like */ + /* OpenType. */ + /* */ + /***********************************************************************/ + + FT_Generic extra; + + const char* postscript_name; + + /* since version 2.1.8, but was originally placed after */ + /* `glyph_locations_stub' */ + FT_ULong glyf_len; + + /* since version 2.1.8, but was originally placed before `extra' */ +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + FT_Bool doblend; + GX_Blend blend; +#endif + + /* since version 2.2 */ + + FT_Byte* horz_metrics; + FT_ULong horz_metrics_size; + + FT_Byte* vert_metrics; + FT_ULong vert_metrics_size; + + FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */ + FT_Byte* glyph_locations; + + FT_Byte* hdmx_table; + FT_ULong hdmx_table_size; + FT_UInt hdmx_record_count; + FT_ULong hdmx_record_size; + FT_Byte* hdmx_record_sizes; + + FT_Byte* sbit_table; + FT_ULong sbit_table_size; + FT_UInt sbit_num_strikes; + + FT_Byte* kern_table; + FT_ULong kern_table_size; + FT_UInt num_kern_tables; + FT_UInt32 kern_avail_bits; + FT_UInt32 kern_order_bits; + +#ifdef TT_CONFIG_OPTION_BDF + TT_BDFRec bdf; +#endif /* TT_CONFIG_OPTION_BDF */ + + /* since 2.3.0 */ + FT_ULong horz_metrics_offset; + FT_ULong vert_metrics_offset; + + } TT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GlyphZoneRec */ + /* */ + /* <Description> */ + /* A glyph zone is used to load, scale and hint glyph outline */ + /* coordinates. */ + /* */ + /* <Fields> */ + /* memory :: A handle to the memory manager. */ + /* */ + /* max_points :: The maximal size in points of the zone. */ + /* */ + /* max_contours :: Max size in links contours of the zone. */ + /* */ + /* n_points :: The current number of points in the zone. */ + /* */ + /* n_contours :: The current number of contours in the zone. */ + /* */ + /* org :: The original glyph coordinates (font */ + /* units/scaled). */ + /* */ + /* cur :: The current glyph coordinates (scaled/hinted). */ + /* */ + /* tags :: The point control tags. */ + /* */ + /* contours :: The contours end points. */ + /* */ + /* first_point :: Offset of the current subglyph's first point. */ + /* */ + typedef struct TT_GlyphZoneRec_ + { + FT_Memory memory; + FT_UShort max_points; + FT_UShort max_contours; + FT_UShort n_points; /* number of points in zone */ + FT_Short n_contours; /* number of contours */ + + FT_Vector* org; /* original point coordinates */ + FT_Vector* cur; /* current point coordinates */ + FT_Vector* orus; /* original (unscaled) point coordinates */ + + FT_Byte* tags; /* current touch flags */ + FT_UShort* contours; /* contour end points */ + + FT_UShort first_point; /* offset of first (#0) point */ + + } TT_GlyphZoneRec, *TT_GlyphZone; + + + /* handle to execution context */ + typedef struct TT_ExecContextRec_* TT_ExecContext; + + /* glyph loader structure */ + typedef struct TT_LoaderRec_ + { + FT_Face face; + FT_Size size; + FT_GlyphSlot glyph; + FT_GlyphLoader gloader; + + FT_ULong load_flags; + FT_UInt glyph_index; + + FT_Stream stream; + FT_Int byte_len; + + FT_Short n_contours; + FT_BBox bbox; + FT_Int left_bearing; + FT_Int advance; + FT_Int linear; + FT_Bool linear_def; + FT_Bool preserve_pps; + FT_Vector pp1; + FT_Vector pp2; + + FT_ULong glyf_offset; + + /* the zone where we load our glyphs */ + TT_GlyphZoneRec base; + TT_GlyphZoneRec zone; + + TT_ExecContext exec; + FT_Byte* instructions; + FT_ULong ins_pos; + + /* for possible extensibility in other formats */ + void* other; + + /* since version 2.1.8 */ + FT_Int top_bearing; + FT_Int vadvance; + FT_Vector pp3; + FT_Vector pp4; + + /* since version 2.2.1 */ + FT_Byte* cursor; + FT_Byte* limit; + + } TT_LoaderRec; + + +FT_END_HEADER + +#endif /* __TTTYPES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/t1tables.h b/contrib/media/updf/include/freetype/t1tables.h new file mode 100644 index 0000000000..5e2a3934ce --- /dev/null +++ b/contrib/media/updf/include/freetype/t1tables.h @@ -0,0 +1,504 @@ +/***************************************************************************/ +/* */ +/* t1tables.h */ +/* */ +/* Basic Type 1/Type 2 tables definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __T1TABLES_H__ +#define __T1TABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* type1_tables */ + /* */ + /* <Title> */ + /* Type 1 Tables */ + /* */ + /* <Abstract> */ + /* Type~1 (PostScript) specific font tables. */ + /* */ + /* <Description> */ + /* This section contains the definition of Type 1-specific tables, */ + /* including structures related to other PostScript font formats. */ + /* */ + /*************************************************************************/ + + + /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ + /* structures in order to support Multiple Master fonts. */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfoRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* FontInfo dictionary. */ + /* */ + typedef struct PS_FontInfoRec_ + { + FT_String* version; + FT_String* notice; + FT_String* full_name; + FT_String* family_name; + FT_String* weight; + FT_Long italic_angle; + FT_Bool is_fixed_pitch; + FT_Short underline_position; + FT_UShort underline_thickness; + + } PS_FontInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfo */ + /* */ + /* <Description> */ + /* A handle to a @PS_FontInfoRec structure. */ + /* */ + typedef struct PS_FontInfoRec_* PS_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_FontInfo */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_FontInfoRec T1_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_PrivateRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 private dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* Private dictionary. */ + /* */ + typedef struct PS_PrivateRec_ + { + FT_Int unique_id; + FT_Int lenIV; + + FT_Byte num_blue_values; + FT_Byte num_other_blues; + FT_Byte num_family_blues; + FT_Byte num_family_other_blues; + + FT_Short blue_values[14]; + FT_Short other_blues[10]; + + FT_Short family_blues [14]; + FT_Short family_other_blues[10]; + + FT_Fixed blue_scale; + FT_Int blue_shift; + FT_Int blue_fuzz; + + FT_UShort standard_width[1]; + FT_UShort standard_height[1]; + + FT_Byte num_snap_widths; + FT_Byte num_snap_heights; + FT_Bool force_bold; + FT_Bool round_stem_up; + + FT_Short snap_widths [13]; /* including std width */ + FT_Short snap_heights[13]; /* including std height */ + + FT_Fixed expansion_factor; + + FT_Long language_group; + FT_Long password; + + FT_Short min_feature[2]; + + } PS_PrivateRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Private */ + /* */ + /* <Description> */ + /* A handle to a @PS_PrivateRec structure. */ + /* */ + typedef struct PS_PrivateRec_* PS_Private; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_Private */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_PrivateRec T1_Private; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_Blend_Flags */ + /* */ + /* <Description> */ + /* A set of flags used to indicate which fields are present in a */ + /* given blend dictionary (font info or private). Used to support */ + /* Multiple Masters fonts. */ + /* */ + typedef enum T1_Blend_Flags_ + { + /*# required fields in a FontInfo blend dictionary */ + T1_BLEND_UNDERLINE_POSITION = 0, + T1_BLEND_UNDERLINE_THICKNESS, + T1_BLEND_ITALIC_ANGLE, + + /*# required fields in a Private blend dictionary */ + T1_BLEND_BLUE_VALUES, + T1_BLEND_OTHER_BLUES, + T1_BLEND_STANDARD_WIDTH, + T1_BLEND_STANDARD_HEIGHT, + T1_BLEND_STEM_SNAP_WIDTHS, + T1_BLEND_STEM_SNAP_HEIGHTS, + T1_BLEND_BLUE_SCALE, + T1_BLEND_BLUE_SHIFT, + T1_BLEND_FAMILY_BLUES, + T1_BLEND_FAMILY_OTHER_BLUES, + T1_BLEND_FORCE_BOLD, + + /*# never remove */ + T1_BLEND_MAX + + } T1_Blend_Flags; + + /* */ + + + /*# backwards compatible definitions */ +#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION +#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS +#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE +#define t1_blend_blue_values T1_BLEND_BLUE_VALUES +#define t1_blend_other_blues T1_BLEND_OTHER_BLUES +#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH +#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT +#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS +#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS +#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE +#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT +#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES +#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES +#define t1_blend_force_bold T1_BLEND_FORCE_BOLD +#define t1_blend_max T1_BLEND_MAX + + + /* maximum number of Multiple Masters designs, as defined in the spec */ +#define T1_MAX_MM_DESIGNS 16 + + /* maximum number of Multiple Masters axes, as defined in the spec */ +#define T1_MAX_MM_AXIS 4 + + /* maximum number of elements in a design map */ +#define T1_MAX_MM_MAP_POINTS 20 + + + /* this structure is used to store the BlendDesignMap entry for an axis */ + typedef struct PS_DesignMap_ + { + FT_Byte num_points; + FT_Long* design_points; + FT_Fixed* blend_points; + + } PS_DesignMapRec, *PS_DesignMap; + + /* backwards-compatible definition */ + typedef PS_DesignMapRec T1_DesignMap; + + + typedef struct PS_BlendRec_ + { + FT_UInt num_designs; + FT_UInt num_axis; + + FT_String* axis_names[T1_MAX_MM_AXIS]; + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; + + FT_Fixed* weight_vector; + FT_Fixed* default_weight_vector; + + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; + + FT_ULong blend_bitflags; + + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; + + /* since 2.3.0 */ + + /* undocumented, optional: the default design instance; */ + /* corresponds to default_weight_vector -- */ + /* num_default_design_vector == 0 means it is not present */ + /* in the font and associated metrics files */ + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; + FT_UInt num_default_design_vector; + + } PS_BlendRec, *PS_Blend; + + + /* backwards-compatible definition */ + typedef PS_BlendRec T1_Blend; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDictRec */ + /* */ + /* <Description> */ + /* A structure used to represent data in a CID top-level dictionary. */ + /* */ + typedef struct CID_FaceDictRec_ + { + PS_PrivateRec private_dict; + + FT_UInt len_buildchar; + FT_Fixed forcebold_threshold; + FT_Pos stroke_width; + FT_Fixed expansion_factor; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_UInt num_subrs; + FT_ULong subrmap_offset; + FT_Int sd_bytes; + + } CID_FaceDictRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDict */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceDictRec structure. */ + /* */ + typedef struct CID_FaceDictRec_* CID_FaceDict; + + /* */ + + + /* backwards-compatible definition */ + typedef CID_FaceDictRec CID_FontDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfoRec */ + /* */ + /* <Description> */ + /* A structure used to represent CID Face information. */ + /* */ + typedef struct CID_FaceInfoRec_ + { + FT_String* cid_font_name; + FT_Fixed cid_version; + FT_Int cid_font_type; + + FT_String* registry; + FT_String* ordering; + FT_Int supplement; + + PS_FontInfoRec font_info; + FT_BBox font_bbox; + FT_ULong uid_base; + + FT_Int num_xuid; + FT_ULong xuid[16]; + + FT_ULong cidmap_offset; + FT_Int fd_bytes; + FT_Int gd_bytes; + FT_ULong cid_count; + + FT_Int num_dicts; + CID_FaceDict font_dicts; + + FT_ULong data_offset; + + } CID_FaceInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfo */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceInfoRec structure. */ + /* */ + typedef struct CID_FaceInfoRec_* CID_FaceInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_Info */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceInfoRec CID_Info; + + + /************************************************************************ + * + * @function: + * FT_Has_PS_Glyph_Names + * + * @description: + * Return true if a given face provides reliable PostScript glyph + * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, + * except that certain fonts (mostly TrueType) contain incorrect + * glyph name tables. + * + * When this function returns true, the caller is sure that the glyph + * names returned by @FT_Get_Glyph_Name are reliable. + * + * @input: + * face :: + * face handle + * + * @return: + * Boolean. True if glyph names are reliable. + * + */ + FT_EXPORT( FT_Int ) + FT_Has_PS_Glyph_Names( FT_Face face ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Info + * + * @description: + * Retrieve the @PS_FontInfoRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_info :: + * Output font info structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the font info structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function will + * return the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Info( FT_Face face, + PS_FontInfo afont_info ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Private + * + * @description: + * Retrieve the @PS_PrivateRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_private :: + * Output private dictionary structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the @PS_PrivateRec structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Private( FT_Face face, + PS_Private afont_private ); + + /* */ + + +FT_END_HEADER + +#endif /* __T1TABLES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttcache.h b/contrib/media/updf/include/freetype/ttcache.h new file mode 100755 index 0000000000..e6f17c3c6e --- /dev/null +++ b/contrib/media/updf/include/freetype/ttcache.h @@ -0,0 +1,216 @@ +/******************************************************************* + * + * ttcache.h 1.1 + * + * Generic object cache + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * + * This component defines and implements object caches. + * + * An object class is a structure layout that encapsulate one + * given type of data used by the FreeType engine. Each object + * class is completely described by: + * + * - a 'root' or 'leading' structure containing the first + * important fields of the class. The root structure is + * always of fixed size. + * + * It is implemented as a simple C structure, and may + * contain several pointers to sub-tables that can be + * sized and allocated dynamically. + * + * Examples: TFace, TInstance, TGlyph & TExecution_Context + * (defined in 'ttobjs.h') + * + * - we make a difference between 'child' pointers and 'peer' + * pointers. A 'child' pointer points to a sub-table that is + * owned by the object, while a 'peer' pointer points to any + * other kind of data the object isn't responsible for. + * + * An object class is thus usually a 'tree' of 'child' tables. + * + * - each object class needs a constructor and a destructor. + * + * A constructor is a function which receives the address of + * freshly allocated and zeroed object root structure and + * 'builds' all the valid child data that must be associated + * to the object before it becomes 'valid'. + * + * A destructor does the inverse job: given the address of + * a valid object, it must discard all its child data and + * zero its main fields (essentially the pointers and array + * sizes found in the root fields). + * + * + * Important notes: + * + * When the constructor fails to allocate an object, it must + * return immediately with an error code, and not try to release + * what it has previously allocated before the error. The cache + * manager detects the error and calls the destructor on the + * partial object, before returning the error to the caller (along + * with a NULL pointer for the "new" object). + * + * The destructor must thus be able to deal with "partial objects", + * i.e., objects where only part of the child tables are allocated, + * and only release these ones. As the TT_Free() function accepts + * a NULL parameter (and returns successfuly in this case), no check + * is really necessary when using the macro 'FREE()'. + * + * Currently, there is no check in the cache manager to see if a + * destructor fails (double error state!). + * + * This scheme is more compact and more maintanable than the one + * where de-allocation code is duplicated in the constructor + * _and_ the destructor. + * + * + * + * Changes between 1.1 and 1.0: + * + * - introduced the refreshed and finalizer class definition/implementation + * - inserted an engine instance pointer in the cache structure + * + ******************************************************************/ + +#ifndef TTCACHE_H +#define TTCACHE_H + +#include "tttypes.h" +#include "ttconfig.h" +#include "ttmutex.h" + +#ifdef __cplusplus + extern "C" { +#endif + + typedef TT_Error TConstructor( void* object, + void* parent ); + + typedef TT_Error TDestructor ( void* object ); + + typedef TConstructor TRefresher; + typedef TDestructor TFinalizer; + + typedef TConstructor* PConstructor; + typedef TDestructor* PDestructor; + typedef TRefresher* PRefresher; + typedef TFinalizer* PFinalizer; + + + /* A Cache class record holds the data necessary to define */ + /* a cache kind. */ + struct TCache_Class_ + { + ULong object_size; + Long idle_limit; + PConstructor init; + PDestructor done; + PRefresher reset; + PFinalizer finalize; + }; + + typedef struct TCache_Class_ TCache_Class; + typedef TCache_Class* PCache_Class; + + + + /* Simple list node record. A list element is said to be 'unlinked' */ + /* when it doesn't belong to any list. */ + struct TList_Element_; + + typedef struct TList_Element_ TList_Element; + typedef TList_Element* PList_Element; + + struct TList_Element_ + { + PList_Element next; + void* data; + }; + + + /* Simple singly-linked list record - LIFO style, no tail field */ + typedef PList_Element TSingle_List; + + struct TCache_ + { + PEngine_Instance engine; + PCache_Class clazz; /* 'class' is a reserved word in C++ */ + TMutex* lock; + TSingle_List active; + TSingle_List idle; + Long idle_count; + }; + + typedef struct TCache_ TCache; + typedef TCache* PCache; + + /* Returns a new list element, either fresh or recycled. */ + /* Note: the returned element is unlinked. */ + + /* An object cache holds two lists tracking the active and */ + /* idle objects that are currently created and used by the */ + /* engine. It can also be 'protected' by a mutex. */ + + /* Initializes a new cache, of class 'clazz', pointed by 'cache', */ + /* protected by the 'lock' mutex. Set 'lock' to NULL if the cache */ + /* doesn't need protection */ + + LOCAL_DEF + TT_Error Cache_Create( PEngine_Instance engine, + PCache_Class clazz, + TCache* cache, + TMutex* lock ); + + /* Destroys a cache and all its listed objects */ + + LOCAL_DEF + TT_Error Cache_Destroy( TCache* cache ); + + + /* Extracts a new object from the cache */ + + LOCAL_DEF + TT_Error Cache_New( TCache* cache, + void** new_object, + void* parent_object ); + + + /* Returns an object to the cache, or discards it depending */ + /* on the cache class' 'idle_limit' field */ + + LOCAL_DEF + TT_Error Cache_Done( TCache* cache, void* data ); + +#define CACHE_New( _cache, _newobj, _parent ) \ + Cache_New( (TCache*)_cache, (void**)&_newobj, (void*)_parent ) + +#define CACHE_Done( _cache, _obj ) \ + Cache_Done( (TCache*)_cache, (void*)_obj ) + + + + LOCAL_DEF + TT_Error TTCache_Init( PEngine_Instance engine ); + + LOCAL_DEF + TT_Error TTCache_Done( PEngine_Instance engine ); + + +#ifdef __cplusplus + } +#endif + +#endif /* TTCACHE_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttcalc.h b/contrib/media/updf/include/freetype/ttcalc.h new file mode 100755 index 0000000000..9b4c306b0e --- /dev/null +++ b/contrib/media/updf/include/freetype/ttcalc.h @@ -0,0 +1,97 @@ +/******************************************************************* + * + * ttcalc.h + * + * Arithmetic Computations (specification). + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ + +#ifndef TTCALC_H +#define TTCALC_H + +#include "ttconfig.h" +#include "freetype.h" + + +#ifdef __cplusplus + extern "C" { +#endif + +#ifdef LONG64 + + typedef INT64 TT_Int64; + +#define ADD_64( x, y, z ) z = x + y +#define SUB_64( x, y, z ) z = x - y +#define MUL_64( x, y, z ) z = (TT_Int64)(x) * (y) + +#define DIV_64( x, y ) ( (x) / (y) ) + +#define SQRT_64( x ) Sqrt64( x ) +#define SQRT_32( x ) Sqrt32( x ) + + LOCAL_DEF TT_Int32 Sqrt64( TT_Int64 l ); + +#else /* LONG64 */ + + struct TT_Int64_ + { + TT_Word32 lo; + TT_Word32 hi; + }; + + typedef struct TT_Int64_ TT_Int64; + +#define ADD_64( x, y, z ) Add64( &x, &y, &z ) +#define SUB_64( x, y, z ) Sub64( &x, &y, &z ) +#define MUL_64( x, y, z ) MulTo64( x, y, &z ) + +#define DIV_64( x, y ) Div64by32( &x, y ) + +#define SQRT_64( x ) Sqrt64( &x ) +#define SQRT_32( x ) Sqrt32( x ) + + LOCAL_DEF void Add64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); + LOCAL_DEF void Sub64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); + + LOCAL_DEF void MulTo64( TT_Int32 x, TT_Int32 y, TT_Int64* z ); + + LOCAL_DEF TT_Int32 Div64by32( TT_Int64* x, TT_Int32 y ); + + LOCAL_DEF int Order64( TT_Int64* z ); + + LOCAL_DEF TT_Int32 Sqrt64( TT_Int64* l ); + +#endif /* LONG64 */ + + /* The two following functions are now part of the API! */ + + /* TT_Long TT_MulDiv( TT_Long a, TT_Long b, TT_Long c ); */ + /* TT_Long TT_MulFix( TT_Long a, TT_Long b ); */ + + +#define INT_TO_F26DOT6( x ) ( (Long)(x) << 6 ) +#define INT_TO_F2DOT14( x ) ( (Long)(x) << 14 ) +#define INT_TO_FIXED( x ) ( (Long)(x) << 16 ) +#define F2DOT14_TO_FIXED( x ) ( (Long)(x) << 2 ) +#define FLOAT_TO_FIXED( x ) ( (Long)(x * 65536.0) ) + +#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ((x) + 32) & -64) \ + : ( -((32 - (x)) & -64) ) ) + +#ifdef __cplusplus + } +#endif + +#endif /* TTCALC_H */ + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttcmap.h b/contrib/media/updf/include/freetype/ttcmap.h new file mode 100755 index 0000000000..8a1f834d9c --- /dev/null +++ b/contrib/media/updf/include/freetype/ttcmap.h @@ -0,0 +1,169 @@ +/******************************************************************* + * + * ttcmap.h 1.0 + * + * TrueType Character Mappings + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * + ******************************************************************/ + +#ifndef TTCMAP_H +#define TTCMAP_H + +#include "ttconfig.h" +#include "tttypes.h" + + +#ifdef __cplusplus + extern "C" { +#endif + + /* format 0 */ + + struct TCMap0_ + { + PByte glyphIdArray; + }; + + typedef struct TCMap0_ TCMap0; + typedef TCMap0* PCMap0; + + + /* format 2 */ + + struct TCMap2SubHeader_ + { + UShort firstCode; /* first valid low byte */ + UShort entryCount; /* number of valid low bytes */ + Short idDelta; /* delta value to glyphIndex */ + UShort idRangeOffset; /* offset from here to 1st code */ + }; + + typedef struct TCMap2SubHeader_ TCMap2SubHeader; + typedef TCMap2SubHeader* PCMap2SubHeader; + + struct TCMap2_ + { + PUShort subHeaderKeys; + /* high byte mapping table */ + /* value = subHeader index * 8 */ + + PCMap2SubHeader subHeaders; + PUShort glyphIdArray; + UShort numGlyphId; /* control value */ + }; + + typedef struct TCMap2_ TCMap2; + typedef TCMap2* PCMap2; + + + /* format 4 */ + + struct TCMap4Segment_ + { + UShort endCount; + UShort startCount; + Short idDelta; /* in the specs defined as UShort but the + example there gives negative values... */ + UShort idRangeOffset; + }; + + typedef struct TCMap4Segment_ TCMap4Segment; + typedef TCMap4Segment* PCMap4Segment; + + struct TCMap4_ + { + UShort segCountX2; /* number of segments * 2 */ + UShort searchRange; /* these parameters can be used */ + UShort entrySelector; /* for a binary search */ + UShort rangeShift; + + PCMap4Segment segments; + PUShort glyphIdArray; + UShort numGlyphId; /* control value */ + }; + + typedef struct TCMap4_ TCMap4; + typedef TCMap4* PCMap4; + + + /* format 6 */ + + struct TCMap6_ + { + UShort firstCode; /* first character code of subrange */ + UShort entryCount; /* number of character codes in subrange */ + + PUShort glyphIdArray; + }; + + typedef struct TCMap6_ TCMap6; + typedef TCMap6* PCMap6; + + + /* charmap table */ + + struct TCMapTable_ + { + UShort platformID; + UShort platformEncodingID; + UShort format; + UShort length; + UShort version; + + Bool loaded; + ULong offset; + + union + { + TCMap0 cmap0; + TCMap2 cmap2; + TCMap4 cmap4; + TCMap6 cmap6; + } c; + }; + + typedef struct TCMapTable_ TCMapTable; + typedef TCMapTable* PCMapTable; + + + + /* Load character mappings directory when face is loaded. */ + /* The mappings themselves are only loaded on demand. */ + + LOCAL_DEF + TT_Error CharMap_Load( PCMapTable table, + TT_Stream input ); + + + /* Destroy one character mapping table */ + + LOCAL_DEF + TT_Error CharMap_Free( PCMapTable table ); + + + /* Use character mapping table to perform mapping */ + + LOCAL_DEF + UShort CharMap_Index( PCMapTable cmap, + UShort charCode ); + + /* NOTE: The PFace type isn't defined at this point */ + +#ifdef __cplusplus + } +#endif + +#endif /* TTCMAP_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttconfig.h b/contrib/media/updf/include/freetype/ttconfig.h new file mode 100755 index 0000000000..c56e1acc36 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttconfig.h @@ -0,0 +1,279 @@ +/******************************************************************* + * + * ttconfig.h 1.0 + * + * Configuration settings header file (spec only). + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * Notes: + * + * All the configuration #define statements have been gathered in + * this file to allow easy check and modification. + * + ******************************************************************/ + +#ifndef TTCONFIG_H +#define TTCONFIG_H + + + +/* ------------ auto configuration ------------------------------------- */ + + +/*************************************************************************/ +/* Here we include the file ft_conf.h for system dependent stuff. */ +/* The specific makefile is responsible for providing the right path to */ +/* this file. */ + +#include "ft_conf.h" + + +/**************************************************************************/ +/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ +/* version of the library. */ + +/* #define TT_CONFIG_OPTION_THREAD_SAFE */ + + + +/* ------------ general debugging -------------------------------------- */ + + +/************************************************************************* + * + * There are now three debugging modes: + * + * - trace mode: + * + * Error and trace messages are sent to the log file + * (which can be the standard error output). Define + * DEBUG_LEVEL_TRACE to enable this mode. + * + * - error mode: + * + * Only error messages are generated. Define + * DEBUG_LEVEL_ERROR to enable this mode. + * + * - release mode: + * + * Error messages are neither sent nor generated. The code is + * free from any debugging parts. + * + * + * Note that you should link the engine with the 'ttdebug' component. + * in case either DEBUG_LEVEL_TRACE or DEBUG_LEVEL_ERROR is defined. + * + * Please consult ttdebug.h for more details. */ + +/* #define DEBUG_LEVEL_TRACE */ +/* #define DEBUG_LEVEL_ERROR */ + + + +/* ------------ special debugging -------------------------------------- */ + + +/*************************************************************************/ +/* Define this if you want to generate a special debug version of the */ +/* rasterizer. This will progressively draw the glyphs while the */ +/* computations are done directly on the graphics screen... (with */ +/* inverted glyphs). */ +/* */ +/* Use it at your own risk! It is not maintained currently. */ +/* */ +/* IMPORTANT: This is reserved to developers willing to debug the */ +/* rasterizer, which seems working very well in its */ +/* current state... */ + +/* #define DEBUG_RASTER */ + + +/*************************************************************************/ +/* Define this to have a simple debugger version of RunIns(). */ +/* */ +/* Use it at your own risk! It is not maintained currently. */ + +/* #define DEBUG_INTERPRETER */ + + +/*************************************************************************/ +/* Define this to have some housekeeping of allocation and deallocation. */ +/* */ +/* Please note that probably not all OS-specific versions of ttmemory.c */ +/* provide this functionality. */ + +/* #define DEBUG_MEMORY */ + + +/*************************************************************************/ +/* Define this to have bounds checking for file buffer frames. */ +/* */ +/* Please note that probably not all OS-specific versions of ttfile.c */ +/* provide this functionality. */ + +/* #define DEBUG_FILE */ + + + +/* ------------ arithmetic and processor support ----------------------- */ + + +/*************************************************************************/ +/* Define TT_USE_LONG_LONG if you want to enable the use of the */ +/* 'long long' 64-bit type provided by gcc and other compilers. Note */ +/* that : */ +/* */ +/* 1. The type isn't ANSI, and thus will produce many warnings */ +/* during library compilation. */ +/* */ +/* 2. Though the generated object files are slightly smaller, the */ +/* resulting executables are bigger of about 4Kb! gcc must be */ +/* linking some extra code in there! */ +/* */ +/* 3. There is really no speed gain in doing so (but it may help */ +/* debug the ttcalc component). */ +/* */ +/* IMPORTANT NOTE: You don't need to define it on 64-bits machines! */ +/* */ +/* NOTE 2 : This flag used to be _GNUC_LONG64_ */ + +/* #define TT_USE_LONG_LONG */ + + +/*************************************************************************/ +/* define ALIGNMENT to your processor/environment preferred alignment */ +/* size. A value of 8 should work on all current processors, even */ +/* 64-bits ones. */ + +#define ALIGNMENT 8 + + + +/* --------------- miscellaneous ----------------------------------- */ + + +/*********************************************************************/ +/* The number of extensions available. Don't change this value */ +/* except if you add new extensions to the engine. */ + +#define TT_MAX_EXTENSIONS 8 + + + +/* --------------- automatic setup -- don't touch ------------------ */ + + +/*********************************************************************/ +/* If HAVE_TT_TEXT is defined we don't provide a default typedef for */ +/* defining TT_Text. */ + +#ifndef HAVE_TT_TEXT +#define HAVE_TT_TEXT + typedef char TT_Text; +#endif + + +/*********************************************************************/ +/* We define NULL in case it's not defined yet. The default */ +/* location is stdlib.h. */ + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + + +/*********************************************************************/ +/* Some systems can't use vfprintf for error messages on stderr; if */ +/* HAVE_PRINT_FUNCTION is defined, the Print macro must be supplied */ +/* externally (having the same parameters). */ +/* */ +/* This is only used by the "ttdebug" component, which should be */ +/* linked to the engine only in debug mode. */ + +#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) +#ifndef HAVE_PRINT_FUNCTION +#define Print( format, ap ) vfprintf( stderr, (format), (ap) ) +#endif +#endif + + +/********************************************************************/ +/* */ +/* I have added the ability to compile the library into a single */ +/* object file. This gets rids of all the external symbols defined */ +/* in each component interface, and de-pollutes the name-space. */ +/* */ +/* I use two macros, namely LOCAL_FUNC and LOCAL_DEF, which only */ +/* apply to functions that are internal to the engine, and */ +/* should never be seen or linked by a client application. */ +/* */ +/* LOCAL_DEF used in header (.h) files, to define a function */ +/* that will be seen by other components. This */ +/* translates to "extern" in normal mode, and to */ +/* "static" in single-object mode. */ +/* */ +/* LOCAL_FUNC used in implementation (.c) files, just before */ +/* the function body. This translates to nothing */ +/* in normal mode, and to "static" in single-object */ +/* mode. */ +/* */ +/* Getting rid of un-necessary symbols makes the "ttcommon" */ +/* renaming macros hack unnecessary. Moreover, the stripped */ +/* single object file (freetype.o) is 52 Kb, instead of the */ +/* previous 57 Kb (size of all combined .o files), and gives */ +/* a better idea of the engine's real code size. */ +/* */ +/* It is called a "MAKE_OPTION" because the macro must be */ +/* defined in the Makefile, rather than this one. It allows */ +/* any developer to quickly switch from one mode to the other */ +/* without messing with "ttconfig.h" each time. */ +/* */ +#ifndef TT_MAKE_OPTION_SINGLE_OBJECT +#define LOCAL_FUNC /* void */ +#define LOCAL_DEF extern +#else +#define LOCAL_FUNC static +#define LOCAL_DEF static +#endif + + +/*************************************************************************/ +/* Define EXPORT_DEF and EXPORT_FUNC as needed to build e.g. a DLL. All */ +/* variables and functions visible from outside have these prefixes. */ + +#ifndef EXPORT_DEF +#define EXPORT_DEF extern +#endif + +#ifndef EXPORT_FUNC +#define EXPORT_FUNC /* void */ +#endif + + + +/* -------------- internal (developer) configuration toggles ------------ */ + + +#undef TT_STATIC_INTERPRETER +/* Do not undefine this configuration macro. It is now a default that */ +/* must be kept in all release builds. */ + + +#undef TT_STATIC_RASTER +/* Define this if you want to generate a static raster. This makes */ +/* a non re-entrant version of the scan-line converter, which is */ +/* about 10% faster and 50% bigger than an indirect one! */ + + +#endif /* TTCONFIG_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttdebug.h b/contrib/media/updf/include/freetype/ttdebug.h new file mode 100755 index 0000000000..8e889dcc62 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttdebug.h @@ -0,0 +1,170 @@ +/******************************************************************* + * + * ttdebug.h + * + * Debugging and Logging component (specification) + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * + * This component contains various macros and functions used to + * ease the debugging of the FreeType engine. Its main purpose + * is in assertion checking, tracing, and error detection. + * + * There are now three debugging modes: + * + * - trace mode: + * + * Error and trace messages are sent to the log file + * (which can be the standard error output). Define + * DEBUG_LEVEL_TRACE to enable this mode. + * + * - error mode: + * + * Only error messages are generated. Define + * DEBUG_LEVEL_ERROR to enable this mode. + * + * - release mode: + * + * Error messages are neither sent nor generated. The code is + * free from any debugging parts. + * + ******************************************************************/ + +#ifndef TTDEBUG_H +#define TTDEBUG_H + +#include "ttconfig.h" +#include "tttypes.h" + + +#ifdef __cplusplus + extern "C" { +#endif + + +#if defined( DEBUG_LEVEL_TRACE ) + + typedef enum Trace_Component_ + { + trace_any = 0, + trace_api, + trace_interp, + trace_load, + trace_gload, + trace_memory, + trace_file, + trace_mutex, + trace_cache, + trace_calc, + trace_cmap, + trace_extend, + trace_objs, + trace_raster, + + trace_bitmap, + trace_max + + } Trace_Component; + + + /* Here we define an array to hold the trace levels per component. */ + /* Since it is globally defined, all array members are set to 0. */ + /* You should set the values in this array either in your program */ + /* or with your debugger. */ + /* */ + /* Currently, up to eight levels (PTRACE0-PTRACE7, see below) are */ + /* used in some parts of the engine. */ + /* */ + /* For example, to have all tracing messages in the raster */ + /* component, say */ + /* */ + /* #define DEBUG_LEVEL_TRACE */ + /* #include "ttdebug.h" */ + /* */ + /* ... */ + /* set_tt_trace_levels( trace_raster, 7 ) */ + /* */ + /* in your code before initializing the FreeType engine. */ + /* */ + /* Maybe it is better to define DEBUG_LEVEL_TRACE in ttconfig.h... */ + + extern char tt_trace_levels[trace_max]; + + /* IMPORTANT: */ + /* */ + /* Each component must define the macro TT_COMPONENT */ + /* to a valid Trace_Component value before using any */ + /* PTRACEx macro. */ + /* */ + +#define PTRACE( level, varformat ) \ + if ( tt_trace_levels[TT_COMPONENT] >= level ) TT_Message##varformat + +#elif defined( DEBUG_LEVEL_ERROR ) + +#define PTRACE( level, varformat ) /* nothing */ + +#else /* RELEASE MODE */ + +#define TT_Assert( condition, action ) /* nothing */ + +#define PTRACE( level, varformat ) /* nothing */ +#define PERROR( varformat ) /* nothing */ +#define PANIC( varformat ) /* nothing */ + +#endif + + +/************************************************************************/ +/* */ +/* Define macros and fuctions that are common to the debug and trace */ +/* modes. */ +/* */ + +#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) + + +#define TT_Assert( condition, action ) if ( !(condition) ) ( action ) + + void TT_Message( const String* fmt, ... ); + void TT_Panic ( const String* fmt, ... ); + /* print a message and exit */ + + const String* Cur_U_Line( void* exec ); + +#define PERROR( varformat ) TT_Message##varformat +#define PANIC( varformat ) TT_Panic##varformat + +#endif + +#if defined( DEBUG_LEVEL_TRACE ) + + void set_tt_trace_levels( int index, char value ); + +#endif + + +#define PTRACE0( varformat ) PTRACE( 0, varformat ) +#define PTRACE1( varformat ) PTRACE( 1, varformat ) +#define PTRACE2( varformat ) PTRACE( 2, varformat ) +#define PTRACE3( varformat ) PTRACE( 3, varformat ) +#define PTRACE4( varformat ) PTRACE( 4, varformat ) +#define PTRACE5( varformat ) PTRACE( 5, varformat ) +#define PTRACE6( varformat ) PTRACE( 6, varformat ) +#define PTRACE7( varformat ) PTRACE( 7, varformat ) + + +#ifdef __cplusplus + } +#endif + + +#endif /* TTDEBUG_H */ diff --git a/contrib/media/updf/include/freetype/ttengine.h b/contrib/media/updf/include/freetype/ttengine.h new file mode 100755 index 0000000000..e946d06ce2 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttengine.h @@ -0,0 +1,115 @@ +/******************************************************************* + * + * ttengine.h 1.1 + * + * Engine instance structure definition. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * New in 1.1 : + * + * - added the 'raster_lock' mutex field to synchronize + * scan-line conversion in thread-safe and re-entrant builds. + * + ******************************************************************/ + +#ifndef TTENGINE_H +#define TTENGINE_H + +#include "tttypes.h" +#include "ttconfig.h" +#include "freetype.h" +#include "ttmutex.h" + +#ifdef __cplusplus + extern "C" { +#endif + + /********************************************************************/ + /* */ + /* The freetype engine instance structure. */ + /* */ + /* This structure holds all the data that is necessary to run */ + /* one instance of the freetype engine. It is needed to get a */ + /* completely re-entrant version of the library. */ + /* */ + /* The goal is to move _all_ component-specific variables, either */ + /* static or global in the structure; the component initializers */ + /* and finalizers will all be called with the address of a valid */ + /* TEngine_Instance. */ + /* */ + /********************************************************************/ + + struct TEngine_Instance_ + { + TMutex lock; /* engine lock */ + + void* list_free_elements; + + void* objs_face_class; /* the face cache class */ + void* objs_instance_class; /* the instance cache class */ + void* objs_execution_class; /* the context cache class */ + void* objs_glyph_class; /* the glyph cache class */ + + void* objs_face_cache; /* these caches are used to track */ + void* objs_exec_cache; /* the current face and execution */ + /* context objects */ + + void* file_component; /* ttfile implementation dependent */ + + TMutex raster_lock; /* mutex for this engine's render pool */ + void* raster_component; /* ttraster implementation depedent */ + Byte raster_palette[5]; /* gray-levels palette for anti-aliasing */ + + void* extension_component; /* extensions dependent */ + +#if 0 + TT_Glyph_Loader_Callback glCallback; /* glyph loader callback, if any */ +#endif + }; + + /* NOTE : The raster's lock is only acquired by the Render_Glyph and */ + /* Render_Gray_Glyph functions, which always release it on exit */ + /* They do not lock the engine mutex. This means you shouldn't */ + /* be concerned about deadlocks between the two mutexes, as these */ + /* should never appear.. */ + + typedef struct TEngine_Instance_ TEngine_Instance; + typedef TEngine_Instance* PEngine_Instance; + + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* for re-entrant builds */ + +#define ENGINE_ARG TEngine_Instance* _engine +#define ENGINE_ARGS TEngine_Instance* _engine, + +#define ENGINE_VAR _engine +#define ENGINE_VARS _engine, + +#define ENGINE _engine + +#else /* for thread-safe builds */ + +#define ENGINE_ARG /* void */ +#define ENGINE_ARGS + +#define ENGINE_VAR +#define ENGINE_VARS + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + +#ifdef __cplusplus + } +#endif + +#endif /* TTENGINE_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttextend.h b/contrib/media/updf/include/freetype/ttextend.h new file mode 100755 index 0000000000..d5d862282c --- /dev/null +++ b/contrib/media/updf/include/freetype/ttextend.h @@ -0,0 +1,168 @@ +/******************************************************************* + * + * ttextend.h 2.0 + * + * Extensions Interface. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * This is an updated version of the extension component, now + * located in the main library's source directory. It allows + * the dynamic registration/use of various face object extensions + * through a simple API. + * + ******************************************************************/ + +#ifndef TTEXTEND_H +#define TTEXTEND_H + +#include "ttconfig.h" +#include "tttypes.h" +#include "ttobjs.h" + + +#ifdef __cplusplus + extern "C" { +#endif + + /* The extensions don't need to be integrated at compile time into */ + /* the engine, only at link time. */ + + + /* When a new face object is created, the face constructor calls */ + /* the extension constructor with the following arguments: */ + /* */ + /* ext : typeless pointer to the face's extension block. */ + /* Its size is the one given at registration time */ + /* in the extension class's 'size' field. */ + /* */ + /* face : the parent face object. Note that the extension */ + /* constructor is called when the face object is */ + /* built. */ + + typedef TT_Error TExt_Constructor( void* ext, PFace face ); + + + /* When a face object is destroyed, the face destructor calls */ + /* the extension destructor with the following arguments. */ + /* */ + /* ext : typeless pointer to the face's extension block. */ + /* Its size is the one given at registration time */ + /* in the extension class's 'size' field. */ + /* */ + /* face : the parent face object. Note that the extension */ + /* destructor is called before the actual face object */ + /* is destroyed. */ + + typedef TT_Error TExt_Destructor ( void* ext, PFace face ); + + typedef TExt_Constructor* PExt_Constructor; + typedef TExt_Destructor* PExt_Destructor; + + + struct TExtension_Class_ + { + Long id; /* extension id */ + Long size; /* size in bytes of extension record */ + PExt_Constructor build; /* the extension's class constructor */ + PExt_Destructor destroy; /* the extension's class destructor */ + + Long offset; /* offset of ext. record in face obj */ + /* (set by the engine) */ + }; + + typedef struct TExtension_Class_ TExtension_Class; + typedef TExtension_Class* PExtension_Class; + + +#define Build_Extension_ID( a, b, c, d ) \ + ( ((ULong)(a) << 24) | \ + ((ULong)(b) << 16) | \ + ((ULong)(c) << 8 ) | \ + (ULong)(d) ) + + /* A note regarding extensions and the single-object compilation */ + /* mode : */ + /* */ + /* When the engine is compiled as a single object file, extensions */ + /* must remain linkable *after* compile time. In order to do this, */ + /* we need to export the functions that an extension may need. */ + /* Fortunately, we can limit ourselves to : */ + /* */ + /* o TT_Register_Extension (previously called Extension_Register) */ + /* which is to be called by each extension on within */ + /* it TT_Init_XXXX_Extension initializer. */ + /* */ + /* o File and frame access functions. Fortunately, these already */ + /* have their names prefixed by "TT_", so no change was needed */ + /* except replacing the LOCAL_DEF keyword with EXPORT_DEF */ + /* */ + /* o Memory access functions, i.e. TT_Alloc and TT_Free. Again, */ + /* the change is minimal */ + /* */ + /* o the table-lookup function : TT_LookUp_Table, formerly known */ + /* as Load_TrueType_Table in ttload.c. */ + /* */ + /* */ + /* Other than that, an extension should be able to #include all */ + /* relevant header files to get access to internal types, but */ + /* should not call engine internal functions.. */ + /* */ + /* If there is a need for a specific internal function call, let */ + /* me known to see if we need to export it by default.. */ + /* - DavidT */ + /* */ + + /* Register a new extension. Called by extension */ + /* service initializers. */ + EXPORT_DEF + TT_Error TT_Register_Extension( PEngine_Instance engine, + Long id, + Long size, + PExt_Constructor create, + PExt_Destructor destroy ); + + +#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE + /* Initialize the extension component */ + LOCAL_DEF + TT_Error TTExtend_Init( PEngine_Instance engine ); + + /* Finalize the extension component */ + LOCAL_DEF + TT_Error TTExtend_Done( PEngine_Instance engine ); + + /* Create an extension within a face object. Called by the */ + /* face object constructor. */ + LOCAL_DEF + TT_Error Extension_Create( PFace face ); + + /* Destroy all extensions within a face object. Called by the */ + /* face object destructor. */ + LOCAL_DEF + TT_Error Extension_Destroy( PFace face ); +#endif + + /* Query an extension block by extension_ID. Called by extension */ + /* service routines. */ + EXPORT_DEF + TT_Error TT_Extension_Get( PFace face, + Long extension_id, + void** extension_block ); + +#ifdef __cplusplus + } +#endif + + +#endif /* TTEXTEND_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttfile.h b/contrib/media/updf/include/freetype/ttfile.h new file mode 100755 index 0000000000..eebd1c1d43 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttfile.h @@ -0,0 +1,271 @@ +/******************************************************************* + * + * ttfile.h 1.3 + * + * File I/O Component (specification). + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * Changes between 1.3 and 1.2: + * + * - all functions report error values now + * + * - the stream semantics have also changed + * + * Changes between 1.2 and 1.1: + * + * - added macros to support re-entrant builds + * + * - added the TT_Duplicate_File function to duplicate streams + * (re-entrant builds only) + * + ******************************************************************/ + +#ifndef TTFILE_H +#define TTFILE_H + +#include "ttconfig.h" +#include "freetype.h" +#include "ttengine.h" +#include "ttdebug.h" + +#ifdef __cplusplus + extern "C" { +#endif + + /* Initialize file component */ + LOCAL_DEF + TT_Error TTFile_Init( PEngine_Instance engine ); + + /* Done with file component */ + LOCAL_DEF + TT_Error TTFile_Done( PEngine_Instance engine ); + + + /**********************************************************************/ + /* */ + /* Stream functions. */ + /* */ + /**********************************************************************/ + + /* Open a file and return a stream handle for it. */ + /* Should only be used for a new face object's main stream. */ + + LOCAL_DEF + TT_Error TT_Open_Stream( const TT_Text* name, + TT_Stream* stream ); + + + /* Closes, then discards, a stream when it's no longer needed. */ + /* Should only be used for a stream opend with TT_Open_Stream(). */ + + LOCAL_DEF + TT_Error TT_Close_Stream( TT_Stream* stream ); + + + /* Informs the component that we're going to use the file */ + /* opened in 'org_stream', and report errors to the 'error' */ + /* variable. */ + + /* in non re-entrant builds, 'org_stream' is simply copied */ + /* to 'stream'. Otherwise, the latter is a duplicate handle */ + /* for the file opened with 'org_stream' */ + + EXPORT_DEF + TT_Error TT_Use_Stream( TT_Stream org_stream, + TT_Stream* stream ); + + /* Informs the component that we don't need to perform file */ + /* operations on the stream 'stream' anymore. This must be */ + /* used with streams "opened" with TT_Use_Stream() only! */ + + /* in re-entrant builds, this will really discard the stream */ + + EXPORT_DEF + TT_Error TT_Done_Stream( TT_Stream* stream ); + + /* Closes the stream's file handle to release system resources */ + /* The function TT_Use_Stream automatically re-activates a */ + /* flushed stream when it uses one */ + + EXPORT_DEF + TT_Error TT_Flush_Stream( TT_Stream* stream ); + +/* The macros STREAM_ARGS and STREAM_ARG let us build a thread-safe */ +/* or re-entrant implementation depending on a single configuration */ +/*define. */ + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE + +#define STREAM_ARGS TT_Stream stream, +#define STREAM_ARG TT_Stream stream + +#else + +#define STREAM_ARGS /* void */ +#define STREAM_ARG void + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + + + /****************************************************************/ + /* */ + /* File Functions. */ + /* */ + /* The following functions perform file operations on the */ + /* currently 'used' stream. In thread-safe builds, only one */ + /* stream can be used at a time. Synchronisation is performed */ + /* through the Use_Stream()/Done_Stream() functions. */ + /* */ + /****************************************************************/ + + /* Read 'count' bytes from file into 'buffer' */ + + EXPORT_DEF + TT_Error TT_Read_File( STREAM_ARGS void* buffer, + Long count ); + + + /* Seek file cursor to a given position */ + + EXPORT_DEF + TT_Error TT_Seek_File( STREAM_ARGS Long position ); + + + /* Skip the next 'distance' bytes in file */ + + EXPORT_DEF + TT_Error TT_Skip_File( STREAM_ARGS Long distance ); + + + /* Read the 'count' bytes at 'position' into 'buffer' */ + + EXPORT_DEF + TT_Error TT_Read_At_File( STREAM_ARGS Long position, + void* buffer, + Long count ); + + /* Return current file position */ + + EXPORT_DEF + Long TT_File_Pos( STREAM_ARG ); + + /* Return length of a given stream, even if it is flushed */ + + EXPORT_DEF + Long TT_Stream_Size( TT_Stream stream ); + + + /********************************************************************/ + /* */ + /* Frame operations. */ + /* */ + /* For a comprehensive explanation of frames, please refer to the */ + /* documentation files. */ + /* */ + /********************************************************************/ + + /* Frame type declaration.*/ + + struct TFileFrame_ + { + Byte* address; /* frame buffer */ + Byte* cursor; /* current cursor position in frame */ + Long size; /* frame size */ + }; + + typedef struct TFileFrame_ TFileFrame; + + EXPORT_DEF + const TFileFrame TT_Null_FileFrame; + + +/* The macro ZERO_Frame is used to define and init a frame. */ +/* It is important to have a default frame of { NULL, NULL, 0 } */ +/* before a call to TT_Access_Frame(). Otherwise, the call will */ +/* fail with a TT_Err_Nested_Frame_Accesses error. */ + +#define ZERO_Frame( frame ) \ + { \ + (frame).address = NULL; \ + (frame).cursor = NULL; \ + (frame).size = 0; \ + } + + +/* The macros FRAME_ARGS and FRAME_ARG let us build a thread-safe */ +/* or re-entrant implementation depending on a single configuration */ +/* define */ + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE + +#define FRAME_ARGS TFileFrame* frame, +#define FRAME_ARG TFileFrame* frame + +#else + +#define FRAME_ARGS /* void */ +#define FRAME_ARG void + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + + + /* Access the next 'size' bytes from current position. */ + /* Fails if all bytes cannot be read/accessed. */ + + EXPORT_DEF + TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); + + + /* Access the bytes located in the next 'size' bytes of the file. */ + /* Doesn't fail if less than 'size' bytes are accessible (like */ + /* at the end of the file). */ + + EXPORT_DEF + TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); + + /* Forget frame */ + + EXPORT_DEF + TT_Error TT_Forget_Frame( FRAME_ARG ); + + + /* primitive routines for data accessing */ + + EXPORT_DEF + Char TT_Get_Char ( FRAME_ARG ); + EXPORT_DEF + Short TT_Get_Short( FRAME_ARG ); + EXPORT_DEF + Long TT_Get_Long ( FRAME_ARG ); + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE + +#define TT_Get_Byte( frame ) ( (Byte )TT_Get_Char ( frame ) ) +#define TT_Get_UShort( frame ) ( (UShort)TT_Get_Short( frame ) ) +#define TT_Get_ULong( frame ) ( (ULong )TT_Get_Long ( frame ) ) + +#else + +#define TT_Get_Byte() ( (Byte )TT_Get_Char () ) +#define TT_Get_UShort() ( (UShort)TT_Get_Short() ) +#define TT_Get_ULong() ( (ULong )TT_Get_Long () ) + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + + +#ifdef __cplusplus + } +#endif + +#endif /* TTFILE_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttgload.h b/contrib/media/updf/include/freetype/ttgload.h new file mode 100755 index 0000000000..cfdfb2c8cc --- /dev/null +++ b/contrib/media/updf/include/freetype/ttgload.h @@ -0,0 +1,51 @@ +/******************************************************************* + * + * ttgload.h 1.0 + * + * TrueType Glyph Loader. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ + +#ifndef TTGLOAD_H +#define TTGLOAD_H + +#include "ttconfig.h" +#include "tttypes.h" +#include "ttobjs.h" + +#ifdef __cplusplus + extern "C" { +#endif + + + LOCAL_DEF + void TT_Get_Metrics( TT_Horizontal_Header* header, + UShort index, + Short* bearing, + UShort* advance ); + + + LOCAL_DEF + TT_Error Load_TrueType_Glyph( PInstance instance, + PGlyph glyph, + UShort glyph_index, + UShort load_flags ); + +#ifdef __cplusplus + } +#endif + + +#endif /* TTGLOAD_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttinterp.h b/contrib/media/updf/include/freetype/ttinterp.h new file mode 100755 index 0000000000..d991fa0775 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttinterp.h @@ -0,0 +1,54 @@ +/******************************************************************* + * + * ttinterp.h 2.2 + * + * TrueType bytecode intepreter. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * + * Changes between 2.2 and 2.1: + * + * - a small bugfix in the Push opcodes + * + * Changes between 2.1 and 2.0: + * + * - created the TTExec component to take care of all execution + * context management. The interpreter has now one single + * function. + * + * - made some changes to support re-entrancy. The re-entrant + * interpreter is smaller! + * + ******************************************************************/ + +#ifndef TTINTERP_H +#define TTINTERP_H + +#include "ttconfig.h" +#include "ttobjs.h" + + +#ifdef __cplusplus + extern "C" { +#endif + + /* Run instructions in current execution context */ + + LOCAL_DEF TT_Error RunIns( PExecution_Context exc ); + +#ifdef __cplusplus + } +#endif + +#endif /* TTINTERP_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttload.h b/contrib/media/updf/include/freetype/ttload.h new file mode 100755 index 0000000000..47acae91a2 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttload.h @@ -0,0 +1,217 @@ +/******************************************************************* + * + * ttload.h 1.1 + * + * TrueType Tables Loader. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * + * Changes between 1.1 and 1.0 : + * + * - add function Load_TrueType_Any used by TT_Get_Font_Data + * + ******************************************************************/ + +#ifndef TTLOAD_H +#define TTLOAD_H + +#include "ttconfig.h" +#include "tttypes.h" +#include "ttobjs.h" + +#ifdef __cplusplus + extern "C" { +#endif + + EXPORT_DEF + Long TT_LookUp_Table( PFace face, ULong tag ); + + LOCAL_DEF TT_Error Load_TrueType_Directory ( PFace face, + ULong faceIndex ); + + LOCAL_DEF TT_Error Load_TrueType_MaxProfile ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Gasp ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Header ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Locations ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Names ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_CVT ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_CMap ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Programs ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_OS2 ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_PostScript ( PFace face ); + LOCAL_DEF TT_Error Load_TrueType_Hdmx ( PFace face ); + + LOCAL_DEF TT_Error Load_TrueType_Metrics_Header( PFace face, + Bool vertical ); + + LOCAL_DEF TT_Error Load_TrueType_Any( PFace face, + ULong tag, + Long offset, + void* buffer, + Long* length ); + + LOCAL_DEF TT_Error Free_TrueType_Names( PFace face ); + LOCAL_DEF TT_Error Free_TrueType_Hdmx ( PFace face ); + + +/* The following macros are defined to simplify the writing of */ +/* the various table and glyph loaders. */ + +/* For examples see the code in ttload.c, ttgload.c etc. */ + +#define USE_Stream( original, duplicate ) \ + ( (error = TT_Use_Stream( original, &duplicate )) != TT_Err_Ok ) + +#define DONE_Stream( _stream ) \ + TT_Done_Stream( &_stream ) + +/* Define a file frame -- use it only when needed */ +#define DEFINE_A_FRAME TFileFrame frame = TT_Null_FileFrame + +/* Define a stream -- use it only when needed */ +#define DEFINE_A_STREAM TT_Stream stream + + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* re-entrant implementation */ + +/* The following macros define the necessary local */ +/* variables used to access streams and frames. */ + +/* Define stream locals with frame */ +#define DEFINE_STREAM_LOCALS \ + TT_Error error; \ + DEFINE_A_STREAM; \ + DEFINE_A_FRAME + +/* Define stream locals without frame */ +#define DEFINE_STREAM_LOCALS_WO_FRAME \ + TT_Error error; \ + DEFINE_A_STREAM + +/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ +#define DEFINE_LOAD_LOCALS( STREAM ) \ + TT_Error error; \ + DEFINE_A_STREAM = (STREAM); \ + DEFINE_A_FRAME + +/* Define locals without frame with a predefined stream - see ttload.c */ +#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ + TT_Error error; \ + DEFINE_A_STREAM = (STREAM) + +/* Define all locals necessary to access a font file */ +#define DEFINE_ALL_LOCALS \ + TT_Error error; \ + DEFINE_A_STREAM; \ + DEFINE_A_FRAME + + +#define ACCESS_Frame( _size_ ) \ + ( (error = TT_Access_Frame( stream, \ + &frame, \ + (Long)(_size_) )) != TT_Err_Ok ) +#define CHECK_ACCESS_Frame( _size_ ) \ + ( (error = TT_Check_And_Access_Frame( stream, \ + &frame, \ + (Long)(_size_) )) != TT_Err_Ok ) +#define FORGET_Frame() \ + ( (void)TT_Forget_Frame( &frame ) ) + +#define GET_Byte() TT_Get_Byte ( &frame ) +#define GET_Char() TT_Get_Char ( &frame ) +#define GET_UShort() TT_Get_UShort( &frame ) +#define GET_Short() TT_Get_Short ( &frame ) +#define GET_Long() TT_Get_Long ( &frame ) +#define GET_ULong() TT_Get_ULong ( &frame ) +#define GET_Tag4() TT_Get_ULong ( &frame ) + +#define FILE_Pos() TT_File_Pos ( stream ) + +#define FILE_Seek( _position_ ) \ + ( (error = TT_Seek_File( stream, \ + (Long)(_position_) )) != TT_Err_Ok ) +#define FILE_Skip( _distance_ ) \ + ( (error = TT_Skip_File( stream, \ + (Long)(_distance_) )) != TT_Err_Ok ) +#define FILE_Read( buffer, count ) \ + ( (error = TT_Read_File ( stream, \ + buffer, \ + (Long)(count) )) != TT_Err_Ok ) +#define FILE_Read_At( pos, buffer, count ) \ + ( (error = TT_Read_At_File( stream, \ + (Long)(pos), \ + buffer, \ + (Long)(count) )) != TT_Err_Ok ) + +#else /* thread-safe implementation */ + +/* Define stream locals with frame -- nothing in thread-safe mode */ +#define DEFINE_STREAM_LOCALS \ + TT_Error error + +/* Define stream locals without frame -- nothing in thread-safe mode */ +#define DEFINE_STREAM_LOCALS_WO_FRAME \ + TT_Error error + +/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ +#define DEFINE_LOAD_LOCALS( STREAM ) \ + TT_Error error + + +/* Define locals without frame with a predefined stream - see ttload.c */ +#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ + TT_Error error + +/* Define all locals necessary to access a font file */ +#define DEFINE_ALL_LOCALS \ + TT_Error error; \ + DEFINE_A_STREAM + + +#define ACCESS_Frame( _size_ ) \ + ( (error = TT_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) +#define CHECK_ACCESS_Frame( _size_ ) \ + ( (error = TT_Check_And_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) +#define FORGET_Frame() \ + ( (void)TT_Forget_Frame() ) + +#define GET_Byte() TT_Get_Byte () +#define GET_Char() TT_Get_Char () +#define GET_UShort() TT_Get_UShort() +#define GET_Short() TT_Get_Short () +#define GET_Long() TT_Get_Long () +#define GET_ULong() TT_Get_ULong () +#define GET_Tag4() TT_Get_ULong () + +#define FILE_Pos() TT_File_Pos() + +#define FILE_Seek( _position_ ) \ + ( (error = TT_Seek_File( (Long)(_position_) )) != TT_Err_Ok ) +#define FILE_Skip( _distance_ ) \ + ( (error = TT_Skip_File( (Long)(_distance_) )) != TT_Err_Ok ) +#define FILE_Read( buffer, count ) \ + ( (error = TT_Read_File ( buffer, \ + (Long)(count) )) != TT_Err_Ok ) +#define FILE_Read_At( pos, buffer, count ) \ + ( (error = TT_Read_At_File( (Long)(pos), \ + buffer, \ + (Long)(count) )) != TT_Err_Ok ) + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + +#ifdef __cplusplus + } +#endif + +#endif /* TTLOAD_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttmemory.h b/contrib/media/updf/include/freetype/ttmemory.h new file mode 100755 index 0000000000..8cdae2327d --- /dev/null +++ b/contrib/media/updf/include/freetype/ttmemory.h @@ -0,0 +1,125 @@ +/******************************************************************* + * + * ttmemory.h 1.2 + * + * Memory management component (specification). + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * Changes between 1.2 and 1.1: + * + * - the font pool is gone! All allocations are now performed + * with malloc() and free(). + * + * - introduced the FREE() macro and the Free() function for + * future use in destructors. + * + * - Init_FontPool() is now a macro to allow the compilation of + * 'legacy' applications (all four test programs have been updated). + * + ******************************************************************/ + +#ifndef TTMEMORY_H +#define TTMEMORY_H + +#include "ttconfig.h" +#include "tttypes.h" +#include <string.h> + + +#ifdef __cplusplus + extern "C" { +#endif + +#define MEM_Set( dest, byte, count ) memset( dest, byte, count ) + +#ifdef HAVE_MEMCPY +#define MEM_Copy( dest, source, count ) memcpy( dest, source, count ) +#else +#define MEM_Copy( dest, source, count ) bcopy( source, dest, count ) +#endif + +#ifdef HAVE_MEMMOVE +#define MEM_Move( dest, source, count ) memmove( dest, source, count ) +#else +#define MEM_Move( dest, source, count ) bcopy( source, dest, count ) +#endif + + +#define MEM_Alloc( _pointer_, _size_ ) \ + TT_Alloc( _size_, (void**)&(_pointer_) ) + +#define MEM_Realloc( _pointer_, _size_ ) \ + TT_Realloc( _size_, (void**)&(_pointer_) ) + +#define ALLOC( _pointer_, _size_ ) \ + ( ( error = MEM_Alloc( _pointer_, _size_ ) ) != TT_Err_Ok ) + +#define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \ + ( ( error = MEM_Alloc( _pointer_, \ + (_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) + +#define REALLOC( _pointer_, _size_ ) \ + ( ( error = MEM_Realloc( _pointer_, _size_ ) ) != TT_Err_Ok ) + +#define REALLOC_ARRAY( _pointer_, _count_, _type_ ) \ + ( (error = MEM_Realloc( _pointer_, \ + (_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) + +#define FREE( _pointer_ ) \ + TT_Free( (void**)&(_pointer_) ) + + + /* Allocate a block of memory of 'Size' bytes from the heap, and */ + /* sets the pointer '*P' to its address. If 'Size' is 0, or in */ + /* case of error, the pointer is always set to NULL. */ + + EXPORT_DEF + TT_Error TT_Alloc( ULong Size, void** P ); + +#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE + + /* Reallocates a block of memory pointed to by '*P' to 'Size' */ + /* bytes from the heap, possibly changing '*P'. If 'Size' is 0, */ + /* TT_Free() is called, if '*P' is NULL, TT_Alloc() is called. */ + /* '*P' is freed (if it's non-NULL) in case of error. */ + + EXPORT_DEF + TT_Error TT_Realloc( ULong Size, void** P ); + +#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ + + /* Releases a block that was previously allocated through Alloc. */ + /* Note that the function returns successfully when P or *P are */ + /* already NULL. The pointer '*P' is set to NULL on exit in */ + /* case of success. */ + + EXPORT_DEF + TT_Error TT_Free( void** P ); + + + /* For "legacy" applications, that should be re-coded. */ + /* Note that this won't release the previously allocated font pool. */ + +#define Init_FontPool( x, y ) while( 0 ) { } + + + LOCAL_DEF TT_Error TTMemory_Init( void ); + LOCAL_DEF TT_Error TTMemory_Done( void ); + + +#ifdef __cplusplus + } +#endif + +#endif /* TTMEMORY_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttmutex.h b/contrib/media/updf/include/freetype/ttmutex.h new file mode 100755 index 0000000000..097385b22a --- /dev/null +++ b/contrib/media/updf/include/freetype/ttmutex.h @@ -0,0 +1,59 @@ +/******************************************************************* + * + * ttmutex.h 1.0 + * + * Mutual exclusion object / dummy generic interface. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * Note: This file provides a generic interface. The implementation + * to compile depends on your system and the type of + * library you want to build (either singly-threaded, + * thread-safe or re-entrant). + * + * Please read the technical documentation for more details. + * + ******************************************************************/ + +#ifndef TTMUTEX_H +#define TTMUTEX_H + +#include "ttconfig.h" + + + typedef void* TMutex; /* typeless reference to a mutex */ + +#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* thread-safe and re-entrant builds */ + +#define MUTEX_Create( mutex ) TT_Mutex_Create ( &(mutex) ) +#define MUTEX_Destroy( mutex ) TT_Mutex_Delete ( &(mutex) ) +#define MUTEX_Lock( mutex ) TT_Mutex_Lock ( &(mutex) ) +#define MUTEX_Release( mutex ) TT_Mutex_Release( &(mutex) ) + + LOCAL_DEF void TT_Mutex_Create ( TMutex* mutex ); /* Create a new mutex */ + LOCAL_DEF void TT_Mutex_Delete ( TMutex* mutex ); /* Delete a mutex */ + LOCAL_DEF void TT_Mutex_Lock ( TMutex* mutex ); /* Lock a mutex. */ + LOCAL_DEF void TT_Mutex_Release( TMutex* mutex ); /* Release a mutex */ + +#else /* for the single-thread build */ + +#define MUTEX_Create( mutex ) /* nothing */ +#define MUTEX_Destroy( mutex ) /* nothing */ +#define MUTEX_Lock( mutex ) /* nothing */ +#define MUTEX_Release( mutex ) /* nothing */ + + /* No code will be generated for mutex operations */ + +#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ + +#endif /* TTMUTEX_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttnameid.h b/contrib/media/updf/include/freetype/ttnameid.h new file mode 100644 index 0000000000..4b12868bb9 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttnameid.h @@ -0,0 +1,1247 @@ +/***************************************************************************/ +/* */ +/* ttnameid.h */ +/* */ +/* TrueType name ID definitions (specification only). */ +/* */ +/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTNAMEID_H__ +#define __TTNAMEID_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + + + /*************************************************************************/ + /* */ + /* Possible values for the `platform' identifier code in the name */ + /* records of the TTF `name' table. */ + /* */ + /*************************************************************************/ + + + /*********************************************************************** + * + * @enum: + * TT_PLATFORM_XXX + * + * @description: + * A list of valid values for the `platform_id' identifier code in + * @FT_CharMapRec and @FT_SfntName structures. + * + * @values: + * TT_PLATFORM_APPLE_UNICODE :: + * Used by Apple to indicate a Unicode character map and/or name entry. + * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note + * that name entries in this format are coded as big-endian UCS-2 + * character codes _only_. + * + * TT_PLATFORM_MACINTOSH :: + * Used by Apple to indicate a MacOS-specific charmap and/or name entry. + * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that + * most TrueType fonts contain an Apple roman charmap to be usable on + * MacOS systems (even if they contain a Microsoft charmap as well). + * + * TT_PLATFORM_ISO :: + * This value was used to specify ISO/IEC 10646 charmaps. It is however + * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding + * `encoding_id' values. + * + * TT_PLATFORM_MICROSOFT :: + * Used by Microsoft to indicate Windows-specific charmaps. See + * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. + * Note that most fonts contain a Unicode charmap using + * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). + * + * TT_PLATFORM_CUSTOM :: + * Used to indicate application-specific charmaps. + * + * TT_PLATFORM_ADOBE :: + * This value isn't part of any font format specification, but is used + * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec + * structure. See @TT_ADOBE_ID_XXX. + */ + +#define TT_PLATFORM_APPLE_UNICODE 0 +#define TT_PLATFORM_MACINTOSH 1 +#define TT_PLATFORM_ISO 2 /* deprecated */ +#define TT_PLATFORM_MICROSOFT 3 +#define TT_PLATFORM_CUSTOM 4 +#define TT_PLATFORM_ADOBE 7 /* artificial */ + + + /*********************************************************************** + * + * @enum: + * TT_APPLE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. + * + * @values: + * TT_APPLE_ID_DEFAULT :: + * Unicode version 1.0. + * + * TT_APPLE_ID_UNICODE_1_1 :: + * Unicode 1.1; specifies Hangul characters starting at U+34xx. + * + * TT_APPLE_ID_ISO_10646 :: + * Deprecated (identical to preceding). + * + * TT_APPLE_ID_UNICODE_2_0 :: + * Unicode 2.0 and beyond (UTF-16 BMP only). + * + * TT_APPLE_ID_UNICODE_32 :: + * Unicode 3.1 and beyond, using UTF-32. + * + * TT_APPLE_ID_VARIANT_SELECTOR :: + * From Adobe, not Apple. Not a normal cmap. Specifies variations + * on a real cmap. + */ + +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ + + + /*********************************************************************** + * + * @enum: + * TT_MAC_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MACINTOSH charmaps and name entries. + * + * @values: + * TT_MAC_ID_ROMAN :: + * TT_MAC_ID_JAPANESE :: + * TT_MAC_ID_TRADITIONAL_CHINESE :: + * TT_MAC_ID_KOREAN :: + * TT_MAC_ID_ARABIC :: + * TT_MAC_ID_HEBREW :: + * TT_MAC_ID_GREEK :: + * TT_MAC_ID_RUSSIAN :: + * TT_MAC_ID_RSYMBOL :: + * TT_MAC_ID_DEVANAGARI :: + * TT_MAC_ID_GURMUKHI :: + * TT_MAC_ID_GUJARATI :: + * TT_MAC_ID_ORIYA :: + * TT_MAC_ID_BENGALI :: + * TT_MAC_ID_TAMIL :: + * TT_MAC_ID_TELUGU :: + * TT_MAC_ID_KANNADA :: + * TT_MAC_ID_MALAYALAM :: + * TT_MAC_ID_SINHALESE :: + * TT_MAC_ID_BURMESE :: + * TT_MAC_ID_KHMER :: + * TT_MAC_ID_THAI :: + * TT_MAC_ID_LAOTIAN :: + * TT_MAC_ID_GEORGIAN :: + * TT_MAC_ID_ARMENIAN :: + * TT_MAC_ID_MALDIVIAN :: + * TT_MAC_ID_SIMPLIFIED_CHINESE :: + * TT_MAC_ID_TIBETAN :: + * TT_MAC_ID_MONGOLIAN :: + * TT_MAC_ID_GEEZ :: + * TT_MAC_ID_SLAVIC :: + * TT_MAC_ID_VIETNAMESE :: + * TT_MAC_ID_SINDHI :: + * TT_MAC_ID_UNINTERP :: + */ + +#define TT_MAC_ID_ROMAN 0 +#define TT_MAC_ID_JAPANESE 1 +#define TT_MAC_ID_TRADITIONAL_CHINESE 2 +#define TT_MAC_ID_KOREAN 3 +#define TT_MAC_ID_ARABIC 4 +#define TT_MAC_ID_HEBREW 5 +#define TT_MAC_ID_GREEK 6 +#define TT_MAC_ID_RUSSIAN 7 +#define TT_MAC_ID_RSYMBOL 8 +#define TT_MAC_ID_DEVANAGARI 9 +#define TT_MAC_ID_GURMUKHI 10 +#define TT_MAC_ID_GUJARATI 11 +#define TT_MAC_ID_ORIYA 12 +#define TT_MAC_ID_BENGALI 13 +#define TT_MAC_ID_TAMIL 14 +#define TT_MAC_ID_TELUGU 15 +#define TT_MAC_ID_KANNADA 16 +#define TT_MAC_ID_MALAYALAM 17 +#define TT_MAC_ID_SINHALESE 18 +#define TT_MAC_ID_BURMESE 19 +#define TT_MAC_ID_KHMER 20 +#define TT_MAC_ID_THAI 21 +#define TT_MAC_ID_LAOTIAN 22 +#define TT_MAC_ID_GEORGIAN 23 +#define TT_MAC_ID_ARMENIAN 24 +#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 +#define TT_MAC_ID_TIBETAN 26 +#define TT_MAC_ID_MONGOLIAN 27 +#define TT_MAC_ID_GEEZ 28 +#define TT_MAC_ID_SLAVIC 29 +#define TT_MAC_ID_VIETNAMESE 30 +#define TT_MAC_ID_SINDHI 31 +#define TT_MAC_ID_UNINTERP 32 + + + /*********************************************************************** + * + * @enum: + * TT_ISO_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ISO charmaps and name entries. + * + * Their use is now deprecated. + * + * @values: + * TT_ISO_ID_7BIT_ASCII :: + * ASCII. + * TT_ISO_ID_10646 :: + * ISO/10646. + * TT_ISO_ID_8859_1 :: + * Also known as Latin-1. + */ + +#define TT_ISO_ID_7BIT_ASCII 0 +#define TT_ISO_ID_10646 1 +#define TT_ISO_ID_8859_1 2 + + + /*********************************************************************** + * + * @enum: + * TT_MS_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MICROSOFT charmaps and name entries. + * + * @values: + * TT_MS_ID_SYMBOL_CS :: + * Corresponds to Microsoft symbol encoding. See + * @FT_ENCODING_MS_SYMBOL. + * + * TT_MS_ID_UNICODE_CS :: + * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See + * @FT_ENCODING_UNICODE. + * + * TT_MS_ID_SJIS :: + * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. + * + * TT_MS_ID_GB2312 :: + * Corresponds to Simplified Chinese as used in Mainland China. See + * @FT_ENCODING_GB2312. + * + * TT_MS_ID_BIG_5 :: + * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. + * See @FT_ENCODING_BIG5. + * + * TT_MS_ID_WANSUNG :: + * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. + * + * TT_MS_ID_JOHAB :: + * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. + * + * TT_MS_ID_UCS_4 :: + * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to + * the OpenType specification version 1.4 (mid-2001.) + */ + +#define TT_MS_ID_SYMBOL_CS 0 +#define TT_MS_ID_UNICODE_CS 1 +#define TT_MS_ID_SJIS 2 +#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_BIG_5 4 +#define TT_MS_ID_WANSUNG 5 +#define TT_MS_ID_JOHAB 6 +#define TT_MS_ID_UCS_4 10 + + + /*********************************************************************** + * + * @enum: + * TT_ADOBE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! + * + * @values: + * TT_ADOBE_ID_STANDARD :: + * Adobe standard encoding. + * TT_ADOBE_ID_EXPERT :: + * Adobe expert encoding. + * TT_ADOBE_ID_CUSTOM :: + * Adobe custom encoding. + * TT_ADOBE_ID_LATIN_1 :: + * Adobe Latin~1 encoding. + */ + +#define TT_ADOBE_ID_STANDARD 0 +#define TT_ADOBE_ID_EXPERT 1 +#define TT_ADOBE_ID_CUSTOM 2 +#define TT_ADOBE_ID_LATIN_1 3 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MACINTOSH. */ + /* */ + /* The canonical source for the Apple assigned Language ID's is at */ + /* */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */ + /* */ +#define TT_MAC_LANGID_ENGLISH 0 +#define TT_MAC_LANGID_FRENCH 1 +#define TT_MAC_LANGID_GERMAN 2 +#define TT_MAC_LANGID_ITALIAN 3 +#define TT_MAC_LANGID_DUTCH 4 +#define TT_MAC_LANGID_SWEDISH 5 +#define TT_MAC_LANGID_SPANISH 6 +#define TT_MAC_LANGID_DANISH 7 +#define TT_MAC_LANGID_PORTUGUESE 8 +#define TT_MAC_LANGID_NORWEGIAN 9 +#define TT_MAC_LANGID_HEBREW 10 +#define TT_MAC_LANGID_JAPANESE 11 +#define TT_MAC_LANGID_ARABIC 12 +#define TT_MAC_LANGID_FINNISH 13 +#define TT_MAC_LANGID_GREEK 14 +#define TT_MAC_LANGID_ICELANDIC 15 +#define TT_MAC_LANGID_MALTESE 16 +#define TT_MAC_LANGID_TURKISH 17 +#define TT_MAC_LANGID_CROATIAN 18 +#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 +#define TT_MAC_LANGID_URDU 20 +#define TT_MAC_LANGID_HINDI 21 +#define TT_MAC_LANGID_THAI 22 +#define TT_MAC_LANGID_KOREAN 23 +#define TT_MAC_LANGID_LITHUANIAN 24 +#define TT_MAC_LANGID_POLISH 25 +#define TT_MAC_LANGID_HUNGARIAN 26 +#define TT_MAC_LANGID_ESTONIAN 27 +#define TT_MAC_LANGID_LETTISH 28 +#define TT_MAC_LANGID_SAAMISK 29 +#define TT_MAC_LANGID_FAEROESE 30 +#define TT_MAC_LANGID_FARSI 31 +#define TT_MAC_LANGID_RUSSIAN 32 +#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 +#define TT_MAC_LANGID_FLEMISH 34 +#define TT_MAC_LANGID_IRISH 35 +#define TT_MAC_LANGID_ALBANIAN 36 +#define TT_MAC_LANGID_ROMANIAN 37 +#define TT_MAC_LANGID_CZECH 38 +#define TT_MAC_LANGID_SLOVAK 39 +#define TT_MAC_LANGID_SLOVENIAN 40 +#define TT_MAC_LANGID_YIDDISH 41 +#define TT_MAC_LANGID_SERBIAN 42 +#define TT_MAC_LANGID_MACEDONIAN 43 +#define TT_MAC_LANGID_BULGARIAN 44 +#define TT_MAC_LANGID_UKRAINIAN 45 +#define TT_MAC_LANGID_BYELORUSSIAN 46 +#define TT_MAC_LANGID_UZBEK 47 +#define TT_MAC_LANGID_KAZAKH 48 +#define TT_MAC_LANGID_AZERBAIJANI 49 +#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 +#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 +#define TT_MAC_LANGID_ARMENIAN 51 +#define TT_MAC_LANGID_GEORGIAN 52 +#define TT_MAC_LANGID_MOLDAVIAN 53 +#define TT_MAC_LANGID_KIRGHIZ 54 +#define TT_MAC_LANGID_TAJIKI 55 +#define TT_MAC_LANGID_TURKMEN 56 +#define TT_MAC_LANGID_MONGOLIAN 57 +#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 +#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 +#define TT_MAC_LANGID_PASHTO 59 +#define TT_MAC_LANGID_KURDISH 60 +#define TT_MAC_LANGID_KASHMIRI 61 +#define TT_MAC_LANGID_SINDHI 62 +#define TT_MAC_LANGID_TIBETAN 63 +#define TT_MAC_LANGID_NEPALI 64 +#define TT_MAC_LANGID_SANSKRIT 65 +#define TT_MAC_LANGID_MARATHI 66 +#define TT_MAC_LANGID_BENGALI 67 +#define TT_MAC_LANGID_ASSAMESE 68 +#define TT_MAC_LANGID_GUJARATI 69 +#define TT_MAC_LANGID_PUNJABI 70 +#define TT_MAC_LANGID_ORIYA 71 +#define TT_MAC_LANGID_MALAYALAM 72 +#define TT_MAC_LANGID_KANNADA 73 +#define TT_MAC_LANGID_TAMIL 74 +#define TT_MAC_LANGID_TELUGU 75 +#define TT_MAC_LANGID_SINHALESE 76 +#define TT_MAC_LANGID_BURMESE 77 +#define TT_MAC_LANGID_KHMER 78 +#define TT_MAC_LANGID_LAO 79 +#define TT_MAC_LANGID_VIETNAMESE 80 +#define TT_MAC_LANGID_INDONESIAN 81 +#define TT_MAC_LANGID_TAGALOG 82 +#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 +#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 +#define TT_MAC_LANGID_AMHARIC 85 +#define TT_MAC_LANGID_TIGRINYA 86 +#define TT_MAC_LANGID_GALLA 87 +#define TT_MAC_LANGID_SOMALI 88 +#define TT_MAC_LANGID_SWAHILI 89 +#define TT_MAC_LANGID_RUANDA 90 +#define TT_MAC_LANGID_RUNDI 91 +#define TT_MAC_LANGID_CHEWA 92 +#define TT_MAC_LANGID_MALAGASY 93 +#define TT_MAC_LANGID_ESPERANTO 94 +#define TT_MAC_LANGID_WELSH 128 +#define TT_MAC_LANGID_BASQUE 129 +#define TT_MAC_LANGID_CATALAN 130 +#define TT_MAC_LANGID_LATIN 131 +#define TT_MAC_LANGID_QUECHUA 132 +#define TT_MAC_LANGID_GUARANI 133 +#define TT_MAC_LANGID_AYMARA 134 +#define TT_MAC_LANGID_TATAR 135 +#define TT_MAC_LANGID_UIGHUR 136 +#define TT_MAC_LANGID_DZONGKHA 137 +#define TT_MAC_LANGID_JAVANESE 138 +#define TT_MAC_LANGID_SUNDANESE 139 + + +#if 0 /* these seem to be errors that have been dropped */ + +#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 +#define TT_MAC_LANGID_IRISH_GAELIC 141 + +#endif + + + /* The following codes are new as of 2000-03-10 */ +#define TT_MAC_LANGID_GALICIAN 140 +#define TT_MAC_LANGID_AFRIKAANS 141 +#define TT_MAC_LANGID_BRETON 142 +#define TT_MAC_LANGID_INUKTITUT 143 +#define TT_MAC_LANGID_SCOTTISH_GAELIC 144 +#define TT_MAC_LANGID_MANX_GAELIC 145 +#define TT_MAC_LANGID_IRISH_GAELIC 146 +#define TT_MAC_LANGID_TONGAN 147 +#define TT_MAC_LANGID_GREEK_POLYTONIC 148 +#define TT_MAC_LANGID_GREELANDIC 149 +#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MICROSOFT. */ + /* */ + /* The canonical source for the MS assigned LCID's (seems to) be at */ + /* */ + /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ + /* */ + /* It used to be at various places, among them */ + /* */ + /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */ + /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */ + /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */ + /* http://msdn.microsoft.com/library/en-us/passport25/ */ + /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */ + /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */ + /* */ + /* Hopefully, it seems now that the Globaldev site prevails... */ + /* (updated by Antoine, 2004-02-17) */ + +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 +#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 +#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 +#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 +#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 +#define TT_MS_LANGID_ARABIC_OMAN 0x2001 +#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 +#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 +#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 +#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 +#define TT_MS_LANGID_ARABIC_UAE 0x3801 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 +#define TT_MS_LANGID_ARABIC_QATAR 0x4001 +#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 +#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 +#define TT_MS_LANGID_CHINESE_PRC 0x0804 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 +#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 + +#if 1 /* this looks like the correct value */ +#define TT_MS_LANGID_CHINESE_MACAU 0x1404 +#else /* but beware, Microsoft may change its mind... + the most recent Word reference has the following: */ +#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG +#endif + +#if 0 /* used only with .NET `cultures'; commented out */ +#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 +#endif + +#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 +#define TT_MS_LANGID_DANISH_DENMARK 0x0406 +#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 +#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 +#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GREEK_GREECE 0x0408 + + /* don't ask what this one means... It is commented out currently. */ +#if 0 +#define TT_MS_LANGID_GREEK_GREECE2 0x2008 +#endif + +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 +#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 +#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 +#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 +#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 +#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 +#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 +#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 +#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09 +#define TT_MS_LANGID_ENGLISH_INDIA 0x4009 +#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 +#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a +#define TT_MS_LANGID_SPANISH_MEXICO 0x080a +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a +#define TT_MS_LANGID_SPANISH_PANAMA 0x180a +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a +#define TT_MS_LANGID_SPANISH_PERU 0x280a +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a +#define TT_MS_LANGID_SPANISH_CHILE 0x340a +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a +#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a + /* The following ID blatantly violate MS specs by using a */ + /* sublanguage > 0x1F. */ +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU +#define TT_MS_LANGID_FINNISH_FINLAND 0x040b +#define TT_MS_LANGID_FRENCH_FRANCE 0x040c +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c +#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c +#define TT_MS_LANGID_FRENCH_MONACO 0x180c +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c +#define TT_MS_LANGID_FRENCH_REUNION 0x200c +#define TT_MS_LANGID_FRENCH_CONGO 0x240c + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c +#define TT_MS_LANGID_FRENCH_MALI 0x340c +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c +#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c + /* and another violation of the spec (see 0xE40aU) */ +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f +#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 +#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 +#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 +#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 +#define TT_MS_LANGID_POLISH_POLAND 0x0415 +#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 +#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a + +#if 0 /* this used to be this value, but it looks like we were wrong */ +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a +#else /* current sources say */ +#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a + /* and XP_sp2 Platform SDK added (2004-07-26) */ + /* Names are shortened to be significant within 40 chars. */ +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a +#endif + +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d +#define TT_MS_LANGID_THAI_THAILAND 0x041e +#define TT_MS_LANGID_TURKISH_TURKEY 0x041f +#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 +#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 +#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 +#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 +#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 +#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c +#define TT_MS_LANGID_BASQUE_SPAIN 0x042d +#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 +#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 +#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 +#define TT_MS_LANGID_HINDI_INDIA 0x0439 +#define TT_MS_LANGID_MALTESE_MALTA 0x043a + /* Added by XP_sp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b +#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b +#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b +#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b +#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b +#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b +#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b +#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b +#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b + /* ... and we also keep our old identifier... */ +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b + +#if 0 /* this seems to be a previous inversion */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#else +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#endif + +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e +#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN + +#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 +#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_BENGALI_INDIA 0x0445 +#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 +#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 +#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_TAMIL_INDIA 0x0449 +#define TT_MS_LANGID_TELUGU_INDIA 0x044a +#define TT_MS_LANGID_KANNADA_INDIA 0x044b +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d +#define TT_MS_LANGID_MARATHI_INDIA 0x044e +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 +#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 + /* Don't use the next constant! It has */ + /* (1) the wrong spelling (Dzonghka) */ + /* (2) Microsoft doesn't officially define it -- */ + /* at least it is not in the List of Local */ + /* ID Values. */ + /* (3) Dzongkha is not the same language as */ + /* Tibetan, so merging it is wrong anyway. */ + /* */ + /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 + +#if 0 + /* the following used to be defined */ +#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 + /* ... but it was changed; */ +#else + /* So we will continue to #define it, but with the correct value */ +#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN +#endif + +#define TT_MS_LANGID_WELSH_WALES 0x0452 +#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 +#define TT_MS_LANGID_LAO_LAOS 0x0454 +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 +#define TT_MS_LANGID_KONKANI_INDIA 0x0457 +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 + /* Missing a LCID for Sindhi in Devanagari script */ +#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a +#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c +#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d +#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f + /* Missing a LCID for Tifinagh script */ +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 + /* Spelled this way by XP_sp2 Platform SDK (2004-07-26) */ + /* script is yet unclear... might be Arabic, Nagari or Sharada */ +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 + /* ... and aliased (by MS) for compatibility reasons. */ +#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_NEPAL 0x0461 +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 +#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 +#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 +#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a +#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b +#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b +#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c + /* Also spelled by XP_sp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ + TT_MS_LANGID_SEPEDI_SOUTH_AFRICA + /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */ +#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_KANURI_NIGERIA 0x0471 +#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 +#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 +#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 + /* also spelled in the `Passport SDK' list as: */ +#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 +#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 +#define TT_MS_LANGID_LATIN 0x0476 +#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 + /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ + /* not written (but OTOH the peculiar writing system is worth */ + /* studying). */ +#define TT_MS_LANGID_YI_CHINA 0x0478 +#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 + /* language codes from 0x047a to 0x047f are (still) unknown. */ +#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 + +#if 0 /* not deemed useful for fonts */ +#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff +#endif + + + /*************************************************************************/ + /* */ + /* Possible values of the `name' identifier field in the name records of */ + /* the TTF `name' table. These values are platform independent. */ + /* */ +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 + + /* the following values are from the OpenType spec */ +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 + /* number 15 is reserved */ +#define TT_NAME_ID_PREFERRED_FAMILY 16 +#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 + + /* The following code is new as of 2000-01-21 */ +#define TT_NAME_ID_SAMPLE_TEXT 19 + + /* This is new in OpenType 1.3 */ +#define TT_NAME_ID_CID_FINDFONT_NAME 20 + + /* This is new in OpenType 1.5 */ +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + + + /*************************************************************************/ + /* */ + /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ + /* */ + /* Updated 08-Nov-2008. */ + /* */ + + /* Bit 0 Basic Latin */ +#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ + /* Bit 1 C1 Controls and Latin-1 Supplement */ +#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ + /* Bit 2 Latin Extended-A */ +#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ + /* Bit 3 Latin Extended-B */ +#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ + /* Bit 4 IPA Extensions */ + /* Phonetic Extensions */ + /* Phonetic Extensions Supplement */ +#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ + /* U+1D00-U+1D7F */ + /* U+1D80-U+1DBF */ + /* Bit 5 Spacing Modifier Letters */ + /* Modifier Tone Letters */ +#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ + /* U+A700-U+A71F */ + /* Bit 6 Combining Diacritical Marks */ + /* Combining Diacritical Marks Supplement */ +#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ + /* U+1DC0-U+1DFF */ + /* Bit 7 Greek and Coptic */ +#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ + /* Bit 8 Coptic */ +#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ + /* Bit 9 Cyrillic */ + /* Cyrillic Supplement */ + /* Cyrillic Extended-A */ + /* Cyrillic Extended-B */ +#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ + /* U+0500-U+052F */ + /* U+2DE0-U+2DFF */ + /* U+A640-U+A69F */ + /* Bit 10 Armenian */ +#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ + /* Bit 11 Hebrew */ +#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ + /* Bit 12 Vai */ +#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ + /* Bit 13 Arabic */ + /* Arabic Supplement */ +#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ + /* U+0750-U+077F */ + /* Bit 14 NKo */ +#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ + /* Bit 15 Devanagari */ +#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ + /* Bit 16 Bengali */ +#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ + /* Bit 17 Gurmukhi */ +#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ + /* Bit 18 Gujarati */ +#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ + /* Bit 19 Oriya */ +#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ + /* Bit 20 Tamil */ +#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ + /* Bit 21 Telugu */ +#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ + /* Bit 22 Kannada */ +#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ + /* Bit 23 Malayalam */ +#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ + /* Bit 24 Thai */ +#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ + /* Bit 25 Lao */ +#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ + /* Bit 26 Georgian */ + /* Georgian Supplement */ +#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ + /* U+2D00-U+2D2F */ + /* Bit 27 Balinese */ +#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ + /* Bit 28 Hangul Jamo */ +#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ + /* Bit 29 Latin Extended Additional */ + /* Latin Extended-C */ + /* Latin Extended-D */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ + /* U+2C60-U+2C7F */ + /* U+A720-U+A7FF */ + /* Bit 30 Greek Extended */ +#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ + /* Bit 31 General Punctuation */ + /* Supplemental Punctuation */ +#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ + /* U+2E00-U+2E7F */ + /* Bit 32 Superscripts And Subscripts */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ + /* Bit 33 Currency Symbols */ +#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ + /* Bit 34 Combining Diacritical Marks For Symbols */ +#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ + /* Bit 35 Letterlike Symbols */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ + /* Bit 36 Number Forms */ +#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ + /* Bit 37 Arrows */ + /* Supplemental Arrows-A */ + /* Supplemental Arrows-B */ + /* Miscellaneous Symbols and Arrows */ +#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ + /* U+27F0-U+27FF */ + /* U+2900-U+297F */ + /* U+2B00-U+2BFF */ + /* Bit 38 Mathematical Operators */ + /* Supplemental Mathematical Operators */ + /* Miscellaneous Mathematical Symbols-A */ + /* Miscellaneous Mathematical Symbols-B */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ + /* U+2A00-U+2AFF */ + /* U+27C0-U+27EF */ + /* U+2980-U+29FF */ + /* Bit 39 Miscellaneous Technical */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ + /* Bit 40 Control Pictures */ +#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ + /* Bit 41 Optical Character Recognition */ +#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ + /* Bit 42 Enclosed Alphanumerics */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ + /* Bit 43 Box Drawing */ +#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ + /* Bit 44 Block Elements */ +#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ + /* Bit 45 Geometric Shapes */ +#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ + /* Bit 46 Miscellaneous Symbols */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ + /* Bit 47 Dingbats */ +#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ + /* Bit 48 CJK Symbols and Punctuation */ +#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ + /* Bit 49 Hiragana */ +#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ + /* Bit 50 Katakana */ + /* Katakana Phonetic Extensions */ +#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ + /* U+31F0-U+31FF */ + /* Bit 51 Bopomofo */ + /* Bopomofo Extended */ +#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ + /* U+31A0-U+31BF */ + /* Bit 52 Hangul Compatibility Jamo */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ + /* Bit 53 Phags-Pa */ +#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ +#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ +#define TT_UCR_PHAGSPA + /* Bit 54 Enclosed CJK Letters and Months */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ + /* Bit 55 CJK Compatibility */ +#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ + /* Bit 56 Hangul Syllables */ +#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ + /* Bit 57 High Surrogates */ + /* High Private Use Surrogates */ + /* Low Surrogates */ + /* */ + /* According to OpenType specs v.1.3+, */ + /* setting bit 57 implies that there is */ + /* at least one codepoint beyond the */ + /* Basic Multilingual Plane that is */ + /* supported by this font. So it really */ + /* means >= U+10000 */ +#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ + /* U+DB80-U+DBFF */ + /* U+DC00-U+DFFF */ +#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES + /* Bit 58 Phoenician */ +#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ + /* Bit 59 CJK Unified Ideographs */ + /* CJK Radicals Supplement */ + /* Kangxi Radicals */ + /* Ideographic Description Characters */ + /* CJK Unified Ideographs Extension A */ + /* CJK Unified Ideographs Extension B */ + /* Kanbun */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ + /* U+2E80-U+2EFF */ + /* U+2F00-U+2FDF */ + /* U+2FF0-U+2FFF */ + /* U+3400-U+4DB5 */ + /*U+20000-U+2A6DF*/ + /* U+3190-U+319F */ + /* Bit 60 Private Use */ +#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ + /* Bit 61 CJK Strokes */ + /* CJK Compatibility Ideographs */ + /* CJK Compatibility Ideographs Supplement */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ + /* U+F900-U+FAFF */ + /*U+2F800-U+2FA1F*/ + /* Bit 62 Alphabetic Presentation Forms */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ + /* Bit 63 Arabic Presentation Forms-A */ +#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ + /* Bit 64 Combining Half Marks */ +#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ + /* Bit 65 Vertical forms */ + /* CJK Compatibility Forms */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ + /* U+FE30-U+FE4F */ + /* Bit 66 Small Form Variants */ +#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ + /* Bit 67 Arabic Presentation Forms-B */ +#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ + /* Bit 68 Halfwidth and Fullwidth Forms */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ + /* Bit 69 Specials */ +#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ + /* Bit 70 Tibetan */ +#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ + /* Bit 71 Syriac */ +#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ + /* Bit 72 Thaana */ +#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ + /* Bit 73 Sinhala */ +#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ + /* Bit 74 Myanmar */ +#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ + /* Bit 75 Ethiopic */ + /* Ethiopic Supplement */ + /* Ethiopic Extended */ +#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ + /* U+1380-U+139F */ + /* U+2D80-U+2DDF */ + /* Bit 76 Cherokee */ +#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ + /* Bit 77 Unified Canadian Aboriginal Syllabics */ +#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ + /* Bit 78 Ogham */ +#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ + /* Bit 79 Runic */ +#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ + /* Bit 80 Khmer */ + /* Khmer Symbols */ +#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ + /* U+19E0-U+19FF */ + /* Bit 81 Mongolian */ +#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ + /* Bit 82 Braille Patterns */ +#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ + /* Bit 83 Yi Syllables */ + /* Yi Radicals */ +#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ + /* U+A490-U+A4CF */ + /* Bit 84 Tagalog */ + /* Hanunoo */ + /* Buhid */ + /* Tagbanwa */ +#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ + /* U+1720-U+173F */ + /* U+1740-U+175F */ + /* U+1760-U+177F */ + /* Bit 85 Old Italic */ +#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ + /* Bit 86 Gothic */ +#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ + /* Bit 87 Deseret */ +#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ + /* Bit 88 Byzantine Musical Symbols */ + /* Musical Symbols */ + /* Ancient Greek Musical Notation */ +#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ + /*U+1D100-U+1D1FF*/ + /*U+1D200-U+1D24F*/ + /* Bit 89 Mathematical Alphanumeric Symbols */ +#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ + /* Bit 90 Private Use (plane 15) */ + /* Private Use (plane 16) */ +#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ + /*U+100000-U+10FFFD*/ + /* Bit 91 Variation Selectors */ + /* Variation Selectors Supplement */ +#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ + /*U+E0100-U+E01EF*/ + /* Bit 92 Tags */ +#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ + /* Bit 93 Limbu */ +#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ + /* Bit 94 Tai Le */ +#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ + /* Bit 95 New Tai Lue */ +#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + /* Bit 96 Buginese */ +#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ + /* Bit 97 Glagolitic */ +#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ + /* Bit 98 Tifinagh */ +#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ + /* Bit 99 Yijing Hexagram Symbols */ +#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ + /* Bit 100 Syloti Nagri */ +#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ + /* Bit 101 Linear B Syllabary */ + /* Linear B Ideograms */ + /* Aegean Numbers */ +#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ + /*U+10080-U+100FF*/ + /*U+10100-U+1013F*/ + /* Bit 102 Ancient Greek Numbers */ +#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ + /* Bit 103 Ugaritic */ +#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ + /* Bit 104 Old Persian */ +#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ + /* Bit 105 Shavian */ +#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ + /* Bit 106 Osmanya */ +#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ + /* Bit 107 Cypriot Syllabary */ +#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ + /* Bit 108 Kharoshthi */ +#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ + /* Bit 109 Tai Xuan Jing Symbols */ +#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ + /* Bit 110 Cuneiform */ + /* Cuneiform Numbers and Punctuation */ +#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ + /*U+12400-U+1247F*/ + /* Bit 111 Counting Rod Numerals */ +#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ + /* Bit 112 Sundanese */ +#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ + /* Bit 113 Lepcha */ +#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ + /* Bit 114 Ol Chiki */ +#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ + /* Bit 115 Saurashtra */ +#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ + /* Bit 116 Kayah Li */ +#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ + /* Bit 117 Rejang */ +#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ + /* Bit 118 Cham */ +#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ + /* Bit 119 Ancient Symbols */ +#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ + /* Bit 120 Phaistos Disc */ +#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ + /* Bit 121 Carian */ + /* Lycian */ + /* Lydian */ +#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ + /*U+10280-U+1029F*/ + /*U+10920-U+1093F*/ + /* Bit 122 Domino Tiles */ + /* Mahjong Tiles */ +#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ + /*U+1F000-U+1F02F*/ + /* Bit 123-127 Reserved for process-internal usage */ + + + /*************************************************************************/ + /* */ + /* Some compilers have a very limited length of identifiers. */ + /* */ +#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) +#define HAVE_LIMIT_ON_IDENTS +#endif + + +#ifndef HAVE_LIMIT_ON_IDENTS + + + /*************************************************************************/ + /* */ + /* Here some alias #defines in order to be clearer. */ + /* */ + /* These are not always #defined to stay within the 31~character limit */ + /* which some compilers have. */ + /* */ + /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ + /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ + /* If you get a warning with such a compiler, use the -i40 switch. */ + /* */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ + TT_UCR_ARABIC_PRESENTATIONS_A +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ + TT_UCR_ARABIC_PRESENTATIONS_B + +#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ + TT_UCR_COMBINING_DIACRITICS +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + TT_UCR_COMBINING_DIACRITICS_SYMB + + +#endif /* !HAVE_LIMIT_ON_IDENTS */ + + +FT_END_HEADER + +#endif /* __TTNAMEID_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttobjs.h b/contrib/media/updf/include/freetype/ttobjs.h new file mode 100755 index 0000000000..a5ba1ff86f --- /dev/null +++ b/contrib/media/updf/include/freetype/ttobjs.h @@ -0,0 +1,873 @@ +/******************************************************************* + * + * ttobjs.h 1.0 + * + * Objects definition unit. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + ******************************************************************/ + +#ifndef TTOBJS_H +#define TTOBJS_H + +#include "ttconfig.h" +#include "ttengine.h" +#include "ttmutex.h" +#include "ttcache.h" +#include "tttables.h" +#include "ttcmap.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* */ +/* This file contains the definitions and methods of the four */ +/* kinds of objects managed by the FreeType engine. These are: */ +/* */ +/* */ +/* Face objects: */ +/* */ +/* There is always one face object per opened TrueType font */ +/* file, and only one. The face object contains data that is */ +/* independent of current transform/scaling/rotation and */ +/* pointsize, or glyph index. This data is made of several */ +/* critical tables that are loaded on face object creation. */ +/* */ +/* A face object tracks all active and recycled objects of */ +/* the instance and execution context classes. Destroying a face */ +/* object will automatically destroy all associated instances. */ +/* */ +/* */ +/* Instance objects: */ +/* */ +/* An instance object always relates to a given face object, */ +/* known as its 'parent' or 'owner', and contains only the */ +/* data that is specific to one given pointsize/transform of */ +/* the face. You can only create an instance from a face object. */ +/* */ +/* An instance's current transform/pointsize can be changed */ +/* at any time using a single high-level API call, */ +/* TT_Reset_Instance(). */ +/* */ +/* Execution Context objects: */ +/* */ +/* An execution context (or context in short) relates to a face. */ +/* It contains the data and tables that are necessary to load */ +/* and hint (i.e. execute the glyph instructions of) one glyph. */ +/* A context is a transient object that is queried/created on */ +/* the fly: client applications never deal with them directly. */ +/* */ +/* */ +/* Glyph objects: */ +/* */ +/* A glyph object contains only the minimal glyph information */ +/* needed to render one glyph correctly. This means that a glyph */ +/* object really contains tables that are sized to hold the */ +/* contents of _any_ glyph of a given face. A client application */ +/* can usually create one glyph object for a given face, then use */ +/* it for all subsequent loads. */ +/* */ +/* Here is an example of a client application : */ +/* (NOTE: No error checking performed here!) */ +/* */ +/* */ +/* TT_Face face; -- face handle */ +/* TT_Instance ins1, ins2; -- two instance handles */ +/* TT_Glyph glyph; -- glyph handle */ +/* */ +/* TT_Init_FreeType(); */ +/* */ +/* -- Initialize the engine. This must be done prior to _any_ */ +/* operation. */ +/* */ +/* TT_Open_Face( "/some/face/name.ttf", &face ); */ +/* */ +/* -- create the face object. This call opens the font file */ +/* */ +/* TT_New_Instance( face, &ins1 ); */ +/* TT_New_Instance( face, &ins2 ); */ +/* */ +/* TT_Set_Instance_PointSize( ins1, 8 ); */ +/* TT_Set_Instance_PointSize( ins2, 12 ); */ +/* */ +/* -- create two distinct instances of the same face */ +/* -- ins1 is pointsize 8 at resolution 96 dpi */ +/* -- ins2 is pointsize 12 at resolution 96 dpi */ +/* */ +/* TT_New_Glyph( face, &glyph ); */ +/* */ +/* -- create a new glyph object which will receive the contents */ +/* of any glyph of 'face' */ +/* */ +/* TT_Load_Glyph( ins1, glyph, 64, DEFAULT_GLYPH_LOAD ); */ +/* */ +/* -- load glyph indexed 64 at pointsize 8 in the 'glyph' object */ +/* -- NOTE: This call will fail if the instance and the glyph */ +/* do not relate to the same face object. */ +/* */ +/* TT_Get_Outline( glyph, &outline ); */ +/* */ +/* -- extract the glyph outline from the object and copies it */ +/* to the 'outline' record */ +/* */ +/* TT_Get_Metrics( glyph, &metrics ); */ +/* */ +/* -- extract the glyph metrics and put them into the 'metrics' */ +/* record */ +/* */ +/* TT_Load_Glyph( ins2, glyph, 64, DEFAULT_GLYPH_LOAD ); */ +/* */ +/* -- load the same glyph at pointsize 12 in the 'glyph' object */ +/* */ +/* */ +/* TT_Close_Face( &face ); */ +/* */ +/* -- destroy the face object. This will destroy 'ins1' and */ +/* 'ins2'. However, the glyph object will still be available */ +/* */ +/* TT_Done_FreeType(); */ +/* */ +/* -- Finalize the engine. This will also destroy all pending */ +/* glyph objects (here 'glyph'). */ + + struct TFace_; + struct TInstance_; + struct TExecution_Context_; + struct TGlyph_; + + typedef struct TFace_ TFace; + typedef TFace* PFace; + + typedef struct TInstance_ TInstance; + typedef TInstance* PInstance; + + typedef struct TExecution_Context_ TExecution_Context; + typedef TExecution_Context* PExecution_Context; + + typedef struct TGlyph_ TGlyph; + typedef TGlyph* PGlyph; + + + /*************************************************************/ + /* */ + /* ADDITIONAL SUBTABLES */ + /* */ + /* These tables are not precisely defined by the specs */ + /* but their structures is implied by the TrueType font */ + /* file layout. */ + /* */ + /*************************************************************/ + + /* Graphics State */ + /* */ + /* The Graphics State (GS) is managed by the */ + /* instruction field, but does not come from */ + /* the font file. Thus, we can use 'int's */ + /* where needed. */ + + struct TGraphicsState_ + { + UShort rp0; + UShort rp1; + UShort rp2; + + TT_UnitVector dualVector; + TT_UnitVector projVector; + TT_UnitVector freeVector; + + Long loop; + TT_F26Dot6 minimum_distance; + Int round_state; + + Bool auto_flip; + TT_F26Dot6 control_value_cutin; + TT_F26Dot6 single_width_cutin; + TT_F26Dot6 single_width_value; + Short delta_base; + Short delta_shift; + + Byte instruct_control; + Bool scan_control; + Int scan_type; + + UShort gep0; + UShort gep1; + UShort gep2; + }; + + typedef struct TGraphicsState_ TGraphicsState; + + + LOCAL_DEF + const TGraphicsState Default_GraphicsState; + + + /*************************************************************/ + /* */ + /* EXECUTION SUBTABLES */ + /* */ + /* These sub-tables relate to instruction execution. */ + /* */ + /*************************************************************/ + +#define MAX_CODE_RANGES 3 + +/* There can only be 3 active code ranges at once: */ +/* - the Font Program */ +/* - the CVT Program */ +/* - a glyph's instructions set */ + +#define TT_CodeRange_Font 1 +#define TT_CodeRange_Cvt 2 +#define TT_CodeRange_Glyph 3 + + + struct TCodeRange_ + { + PByte Base; + ULong Size; + }; + + typedef struct TCodeRange_ TCodeRange; + typedef TCodeRange* PCodeRange; + + + /* Defintion of a code range */ + /* */ + /* Code ranges can be resident to a glyph (i.e. the Font Program) */ + /* while some others are volatile (Glyph instructions). */ + /* Tracking the state and presence of code ranges allows function */ + /* and instruction definitions within a code range to be forgotten */ + /* when the range is discarded. */ + + typedef TCodeRange TCodeRangeTable[MAX_CODE_RANGES]; + + /* defines a function/instruction definition record */ + + struct TDefRecord_ + { + Int Range; /* in which code range is it located ? */ + ULong Start; /* where does it start ? */ + Int Opc; /* function #, or instruction code */ + Bool Active; /* is it active ? */ + }; + + typedef struct TDefRecord_ TDefRecord; + typedef TDefRecord* PDefRecord; + typedef TDefRecord* PDefArray; + + /* defines a call record, used to manage function calls. */ + + struct TCallRecord_ + { + Int Caller_Range; + ULong Caller_IP; + Long Cur_Count; + ULong Cur_Restart; + }; + + typedef struct TCallRecord_ TCallRecord; + typedef TCallRecord* PCallRecord; + typedef TCallRecord* PCallStack; /* defines a simple call stack */ + + + /* This type defining a set of glyph points will be used to represent */ + /* each zone (regular and twilight) during instructions decoding. */ + struct TGlyph_Zone_ + { + UShort n_points; /* number of points in zone */ + Short n_contours; /* number of contours */ + + TT_Vector* org; /* original points coordinates */ + TT_Vector* cur; /* current points coordinates */ + + Byte* touch; /* current touch flags */ + UShort* contours; /* contour end points */ + }; + + typedef struct TGlyph_Zone_ TGlyph_Zone; + typedef TGlyph_Zone* PGlyph_Zone; + + + +#ifndef TT_STATIC_INTEPRETER /* indirect implementation */ + +#define EXEC_OPS PExecution_Context exc, +#define EXEC_OP PExecution_Context exc +#define EXEC_ARGS exc, +#define EXEC_ARG exc + +#else /* static implementation */ + +#define EXEC_OPS /* void */ +#define EXEC_OP /* void */ +#define EXEC_ARGS /* void */ +#define EXEC_ARG /* void */ + +#endif + + /* Rounding function, as used by the interpreter */ + typedef TT_F26Dot6 (*TRound_Function)( EXEC_OPS TT_F26Dot6 distance, + TT_F26Dot6 compensation ); + + /* Point displacement along the freedom vector routine, as */ + /* used by the interpreter */ + typedef void (*TMove_Function)( EXEC_OPS PGlyph_Zone zone, + UShort point, + TT_F26Dot6 distance ); + + /* Distance projection along one of the proj. vectors, as used */ + /* by the interpreter */ + typedef TT_F26Dot6 (*TProject_Function)( EXEC_OPS TT_Vector* v1, + TT_Vector* v2 ); + + /* reading a cvt value. Take care of non-square pixels when needed */ + typedef TT_F26Dot6 (*TGet_CVT_Function)( EXEC_OPS ULong index ); + + /* setting or moving a cvt value. Take care of non-square pixels */ + /* when needed */ + typedef void (*TSet_CVT_Function)( EXEC_OPS ULong index, + TT_F26Dot6 value ); + + /* subglyph transformation record */ + struct TTransform_ + { + TT_Fixed xx, xy; /* transformation */ + TT_Fixed yx, yy; /* matrix */ + TT_F26Dot6 ox, oy; /* offsets */ + }; + + typedef struct TTransform_ TTransform; + typedef TTransform* PTransform; + + /* subglyph loading record. Used to load composite components */ + struct TSubglyph_Record_ + { + Long index; /* subglyph index; initialized with -1 */ + Bool is_scaled; /* is the subglyph scaled? */ + Bool is_hinted; /* should it be hinted? */ + Bool preserve_pps; /* preserve phantom points? */ + + Long file_offset; + + TT_Big_Glyph_Metrics metrics; + + TGlyph_Zone zone; + + Long arg1; /* first argument */ + Long arg2; /* second argument */ + + UShort element_flag; /* current load element flag */ + + TTransform transform; /* transform */ + + TT_Vector pp1, pp2; /* phantom points */ + + }; + + typedef struct TSubglyph_Record_ TSubglyph_Record; + typedef TSubglyph_Record* PSubglyph_Record; + typedef TSubglyph_Record* PSubglyph_Stack; + + /* A note regarding non-squared pixels: */ + /* */ + /* (This text will probably go into some docs at some time, for */ + /* now, it is kept there to explain some definitions in the */ + /* TIns_Metrics record). */ + /* */ + /* The CVT is a one-dimensional array containing values that */ + /* control certain important characteristics in a font, like */ + /* the height of all capitals, all lowercase letter, default */ + /* spacing or stem width/height. */ + /* */ + /* These values are found in FUnits in the font file, and must be */ + /* scaled to pixel coordinates before being used by the CVT and */ + /* glyph programs. Unfortunately, when using distinct x and y */ + /* resolutions (or distinct x and y pointsizes), there are two */ + /* possible scalings. */ + /* */ + /* A first try was to implement a 'lazy' scheme where all values */ + /* were scaled when first used. However, while some values are always */ + /* used in the same direction, and some other are used in many */ + /* different circumstances and orientations. */ + /* */ + /* I have found a simpler way to do the same, and it even seems to */ + /* work in most of the cases: */ + /* */ + /* - all CVT values are scaled to the maximum ppem size */ + /* */ + /* - when performing a read or write in the CVT, a ratio factor */ + /* is used to perform adequate scaling. Example: */ + /* */ + /* x_ppem = 14 */ + /* y_ppem = 10 */ + /* */ + /* we choose ppem = x_ppem = 14 as the CVT scaling size. All cvt */ + /* entries are scaled to it. */ + /* */ + /* x_ratio = 1.0 */ + /* y_ratio = y_ppem/ppem (< 1.0) */ + /* */ + /* we compute the current ratio like: */ + /* */ + /* - if projVector is horizontal, */ + /* ratio = x_ratio = 1.0 */ + /* - if projVector is vertical, */ + /* ratop = y_ratio */ + /* - else, */ + /* ratio = sqrt((proj.x*x_ratio)^2 + (proj.y*y_ratio)^2) */ + /* */ + /* reading a cvt value returns ratio * cvt[index] */ + /* writing a cvt value in pixels cvt[index] / ratio */ + /* */ + /* the current ppem is simply ratio * ppem */ + /* */ + + /* metrics used by the instance and execution context objects */ + struct TIns_Metrics_ + { + TT_F26Dot6 pointSize; /* point size. 1 point = 1/72 inch. */ + + UShort x_resolution; /* device horizontal resolution in dpi. */ + UShort y_resolution; /* device vertical resolution in dpi. */ + + UShort x_ppem; /* horizontal pixels per EM */ + UShort y_ppem; /* vertical pixels per EM */ + + Long x_scale1; + Long x_scale2; /* used to scale FUnits to fractional pixels */ + + Long y_scale1; + Long y_scale2; /* used to scale FUnits to fractional pixels */ + + /* for non-square pixels */ + Long x_ratio; + Long y_ratio; + + UShort ppem; /* maximum ppem size */ + Long ratio; /* current ratio */ + Long scale1; + Long scale2; /* scale for ppem */ + + TT_F26Dot6 compensations[4]; /* device-specific compensations */ + + Bool rotated; /* `is the glyph rotated?'-flag */ + Bool stretched; /* `is the glyph stretched?'-flag */ + }; + + typedef struct TIns_Metrics_ TIns_Metrics; + typedef TIns_Metrics* PIns_Metrics; + + + + /***********************************************************************/ + /* */ + /* FreeType Face Type */ + /* */ + /***********************************************************************/ + + struct TFace_ + { + /* parent engine instance for the face object */ + PEngine_Instance engine; + + /* i/o stream */ + TT_Stream stream; + + /* used only by the threaded builds of the library */ + TMutex lock; + + /* TrueType collection header, if any was found */ + TTTCHeader ttcHeader; + + /* maximum profile table, as found in the TrueType file */ + TMaxProfile maxProfile; + + /* Note: */ + /* it seems that some maximum values cannot be */ + /* taken directly from this table, but rather by */ + /* combining some of its fields; e.g. the max. */ + /* number of points seems to be given by */ + /* MAX( maxPoints, maxCompositePoints ) */ + /* */ + /* For this reason, we define later our own */ + /* max values that are used to load and allocate */ + /* further tables. */ + + TT_Header fontHeader; /* the font header, as */ + /* found in the TTF file */ + TT_Horizontal_Header horizontalHeader; /* the horizontal header */ + + Bool verticalInfo; /* True when vertical table */ + TT_Vertical_Header verticalHeader; /* is present in the font */ + + TT_OS2 os2; /* 'OS/2' table */ + + TT_Postscript postscript; /* 'Post' table */ + + TT_Hdmx hdmx; /* 'Hdmx' table */ + + TName_Table nameTable; /* name table */ + + TGasp gasp; /* the 'gasp' table */ + + /* The directory of TrueType tables for this typeface */ + UShort numTables; + PTableDirEntry dirTables; + + /* The directory of character mappings table for */ + /* this typeface */ + UShort numCMaps; + PCMapTable cMaps; + + /* The glyph locations table */ + ULong numLocations; /* UShort is not enough */ +#ifndef TT_HUGE_PTR + PStorage glyphLocations; +#else + Storage TT_HUGE_PTR * glyphLocations; +#endif + + /* NOTE : The "hmtx" is now part of the horizontal header */ + + /* the font program, if any */ + ULong fontPgmSize; + PByte fontProgram; + + /* the cvt program, if any */ + ULong cvtPgmSize; + PByte cvtProgram; + + /* the original, unscaled, control value table */ + ULong cvtSize; + PShort cvt; + + /* The following values _must_ be set by the */ + /* maximum profile loader */ + + UShort numGlyphs; /* the face's total number of glyphs */ + UShort maxPoints; /* max glyph points number, simple and composite */ + UShort maxContours; /* max glyph contours numb, simple and composite */ + UShort maxComponents; /* max components in a composite glyph */ + + /* the following are object caches to track active */ + /* and recycled instances and execution contexts */ + /* objects. See 'ttcache.h' */ + + TCache instances; /* current instances for this face */ + TCache glyphs; /* current glyph containers for this face */ + + + /* A typeless pointer to the face object extensions defined */ + /* in the 'ttextend.*' files. */ + void* extension; + Int n_extensions; /* number of extensions */ + + /* Use extensions to provide additional capabilities to the */ + /* engine. Read the developer's guide in the documentation */ + /* directory to know how to do that. */ + + /* a generic pointer for client use - see TT_Set/Get_Face_Pointer */ + void* generic; + }; + + + + /***********************************************************************/ + /* */ + /* FreeType Instance Type */ + /* */ + /***********************************************************************/ + + struct TInstance_ + { + PFace owner; /* face object */ + + Bool valid; + + TIns_Metrics metrics; + + UShort numFDefs; /* number of function definitions */ + UShort maxFDefs; + PDefArray FDefs; /* table of FDefs entries */ + + UShort numIDefs; /* number of instruction definitions */ + UShort maxIDefs; + PDefArray IDefs; /* table of IDefs entries */ + + Int maxFunc; /* maximum function definition id */ + Int maxIns; /* maximum instruction definition id */ + + TCodeRangeTable codeRangeTable; + + TGraphicsState GS; + TGraphicsState default_GS; + + ULong cvtSize; /* the scaled control value table */ + PLong cvt; + + ULong storeSize; /* The storage area is now part of the */ + PLong storage; /* instance */ + + TGlyph_Zone twilight; /* The instance's twilight zone */ + + /* debugging variables */ + + /* When using the debugger, we must keep the */ + /* execution context tied to the instance */ + /* object rather than asking it on demand */ + + Bool debug; + PExecution_Context context; + + /* a generic pointer for client use - see TT_Set/Get_Instance_Pointer */ + void* generic; + }; + + + /***********************************************************************/ + /* */ + /* FreeType Execution Context Type */ + /* */ + /***********************************************************************/ + + struct TExecution_Context_ + { + PFace face; + PInstance instance; + + /* instructions state */ + + TT_Error error; /* last execution error */ + + Long top; /* top of exec. stack */ + + ULong stackSize; /* size of exec. stack */ + PStorage stack; /* current exec. stack */ + + Long args; + ULong new_top; /* new top after exec. */ + + TGlyph_Zone zp0, /* zone records */ + zp1, + zp2, + pts, + twilight; + + TIns_Metrics metrics; /* instance metrics */ + + TGraphicsState GS; /* current graphics state */ + + Int curRange; /* current code range number */ + PByte code; /* current code range */ + ULong IP; /* current instruction pointer */ + ULong codeSize; /* size of current range */ + + Byte opcode; /* current opcode */ + Int length; /* length of current opcode */ + + Bool step_ins; /* true if the interpreter must */ + /* increment IP after ins. exec */ + ULong cvtSize; + PLong cvt; + + ULong glyphSize; /* glyph instructions buffer size */ + PByte glyphIns; /* glyph instructions buffer */ + + UShort numFDefs; /* number of function defs */ + UShort maxFDefs; /* maximum number of function defs */ + PDefRecord FDefs; /* table of FDefs entries */ + + UShort numIDefs; /* number of instruction defs */ + UShort maxIDefs; /* maximum number of instruction defs */ + PDefRecord IDefs; /* table of IDefs entries */ + + Int maxFunc; + Int maxIns; + + Int callTop, /* top of call stack during execution */ + callSize; /* size of call stack */ + PCallStack callStack; /* call stack */ + + UShort maxPoints; /* capacity of this context's "pts" */ + UShort maxContours; /* record, expressed in points and */ + /* contours.. */ + + TCodeRangeTable codeRangeTable; /* table of valid coderanges */ + /* useful for the debugger */ + + ULong storeSize; /* size of current storage */ + PLong storage; /* storage area */ + + TT_F26Dot6 period; /* values used for the */ + TT_F26Dot6 phase; /* 'SuperRounding' */ + TT_F26Dot6 threshold; + + /* this seems to be unused */ +#if 0 + Int cur_ppem; /* ppem along the current proj vector */ +#endif + Long scale1; /* scaling values along the current */ + Long scale2; /* projection vector too.. */ + Bool cached_metrics; /* the ppem is computed lazily. used */ + /* to trigger computation when needed */ + + Bool instruction_trap; /* If True, the interpreter will */ + /* exit after each instruction */ + + TGraphicsState default_GS; /* graphics state resulting from */ + /* the prep program */ + Bool is_composite; /* ture if the glyph is composite */ + + Bool pedantic_hinting; /* if true, read and write array */ + /* bounds faults halt the hinting */ + + /* latest interpreter additions */ + + Long F_dot_P; /* dot product of freedom and projection */ + /* vectors */ + TRound_Function func_round; /* current rounding function */ + + TProject_Function func_project, /* current projection function */ + func_dualproj, /* current dual proj. function */ + func_freeProj; /* current freedom proj. func */ + + TMove_Function func_move; /* current point move function */ + + TGet_CVT_Function func_read_cvt; /* read a cvt entry */ + TSet_CVT_Function func_write_cvt; /* write a cvt entry (in pixels) */ + TSet_CVT_Function func_move_cvt; /* incr a cvt entry (in pixels) */ + + ULong loadSize; + PSubglyph_Stack loadStack; /* loading subglyph stack */ + + }; + + + /***********************************************************************/ + /* */ + /* FreeType Glyph Object Type */ + /* */ + /***********************************************************************/ + + struct TGlyph_ + { + PFace face; + TT_Big_Glyph_Metrics metrics; + TT_Outline outline; + }; + + + /* The following type is used to load a font from a collection. */ + /* See Face_Create in ttobjs.c */ + + struct TFont_Input_ + { + TT_Stream stream; /* input stream */ + ULong fontIndex; /* index of font in collection */ + PEngine_Instance engine; /* parent engine instance */ + + }; + + typedef struct TFont_Input_ TFont_Input; + + + /********************************************************************/ + /* */ + /* Code Range Functions */ + /* */ + /********************************************************************/ + + /* Goto a specified coderange */ + LOCAL_DEF + TT_Error Goto_CodeRange( PExecution_Context exec, + Int range, + ULong IP ); + +#if 0 + /* Return a pointer to a given coderange record. */ + /* Used only by the debugger. */ + LOCAL_DEF + PCodeRange Get_CodeRange( PExecution_Context exec, + Int range ); +#endif + + /* Set a given code range properties */ + LOCAL_DEF + TT_Error Set_CodeRange( PExecution_Context exec, + Int range, + void* base, + ULong length ); + + /* Clear a given coderange */ + LOCAL_DEF + TT_Error Clear_CodeRange( PExecution_Context exec, Int range ); + + + LOCAL_DEF + PExecution_Context New_Context( PFace face ); + + LOCAL_DEF + TT_Error Done_Context( PExecution_Context exec ); + + + LOCAL_DEF + TT_Error Context_Load( PExecution_Context exec, + PFace face, + PInstance ins ); + + LOCAL_DEF + TT_Error Context_Save( PExecution_Context exec, + PInstance ins ); + + LOCAL_DEF + TT_Error Context_Run( PExecution_Context exec, + Bool debug ); + + LOCAL_DEF + TT_Error Instance_Init( PInstance ins ); + + LOCAL_DEF + TT_Error Instance_Reset( PInstance ins ); + + + /********************************************************************/ + /* */ + /* Handy scaling functions */ + /* */ + /********************************************************************/ + + LOCAL_DEF TT_Pos Scale_X( PIns_Metrics metrics, TT_Pos x ); + LOCAL_DEF TT_Pos Scale_Y( PIns_Metrics metrics, TT_Pos y ); + + /********************************************************************/ + /* */ + /* Component Initializer/Finalizer */ + /* */ + /* Called from 'freetype.c' */ + /* The component must create and register the face, instance and */ + /* execution context cache classes before any object can be */ + /* managed. */ + /* */ + /********************************************************************/ + + LOCAL_DEF TT_Error TTObjs_Init( PEngine_Instance engine ); + LOCAL_DEF TT_Error TTObjs_Done( PEngine_Instance engine ); + +#ifdef __cplusplus + } +#endif + +#endif /* TTOBJS_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttraster.h b/contrib/media/updf/include/freetype/ttraster.h new file mode 100755 index 0000000000..66c8fef6e7 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttraster.h @@ -0,0 +1,127 @@ +/******************************************************************* + * + * ttraster.h v 1.4 + * + * The FreeType glyph rasterizer. + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * NOTES: + * + * This version supports the following: + * + * - direct grayscaling + * - sub-banding + * - drop-out modes 4 and 5 + * - second pass for complete drop-out control (bitmap only) + * - variable precision + * + * + * Changes between 1.4 and 1.3: + * + * Mainly performance tunings: + * + * - Line_Down() and Bezier_Down() now use the functions Line_Up() + * and Bezier_Up() to do their work. + * - optimized Split_Bezier() + * - optimized linked lists used during sweeps + * + * Changes between 1.2 and 1.3: + * + * - made the engine optionaly re-entrant. Saves a lot + * of code for a moderate performance hit. + * + ******************************************************************/ + +#ifndef TTRASTER_H +#define TTRASTER_H + +#include "ttconfig.h" +#include "freetype.h" /* for TT_Outline */ +#include "ttengine.h" + +#ifdef __cplusplus +extern "C" { +#endif + + /* We provide two different builds of the scan-line converter */ + /* The static build uses global variables and isn't */ + /* re-entrant. */ + /* The indirect build is re-entrant but accesses all variables */ + /* indirectly. */ + /* */ + /* As a consequence, the indirect build is about 10% slower */ + /* than the static one on a _Pentium_ (this could get worse */ + /* on older processors), but the code size is reduced by */ + /* more than 30% ! */ + /* */ + /* The indirect build is now the default, defined in */ + /* ttconfig.h. Be careful if you experiment with this. */ + + /* Note also that, though its code can be re-entrant, the */ + /* component is always used in thread-safe mode. This is */ + /* simply due to the fact that we want to use a single */ + /* render pool (of 64 Kb), and not to waste memory. */ + +#ifdef TT_STATIC_RASTER + +#define RAS_ARGS /* void */ +#define RAS_ARG /* void */ + +#define RAS_VARS /* void */ +#define RAS_VAR /* void */ + +#else + +#define RAS_ARGS TRaster_Instance* raster, +#define RAS_ARG TRaster_Instance* raster + +#define RAS_VARS raster, +#define RAS_VAR raster + +#endif + + + struct TRaster_Instance_; + typedef struct TRaster_Instance_ TRaster_Instance; + + /* Render one glyph in the target bitmap, using drop-out control */ + /* mode 'scan'. */ + LOCAL_DEF + TT_Error Render_Glyph( RAS_ARGS TT_Outline* glyph, + TT_Raster_Map* target ); + +#ifdef TT_CONFIG_OPTION_GRAY_SCALING + /* Render one gray-level glyph in the target pixmap. */ + /* Palette points to an array of 5 colors used for the rendering. */ + /* Use NULL to reuse the last palette. Default is VGA graylevels. */ + LOCAL_DEF + TT_Error Render_Gray_Glyph( RAS_ARGS TT_Outline* glyph, + TT_Raster_Map* target, + Byte* palette ); +#endif + + /* Initialize rasterizer */ + LOCAL_DEF + TT_Error TTRaster_Init( PEngine_Instance engine ); + + /* Finalize it */ + LOCAL_DEF + TT_Error TTRaster_Done( PEngine_Instance engine ); + + +#ifdef __cplusplus +} +#endif + +#endif /* TTRASTER_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/tttables.h b/contrib/media/updf/include/freetype/tttables.h new file mode 100644 index 0000000000..4610e501f2 --- /dev/null +++ b/contrib/media/updf/include/freetype/tttables.h @@ -0,0 +1,759 @@ +/***************************************************************************/ +/* */ +/* tttables.h */ +/* */ +/* Basic SFNT/TrueType tables definitions and interface */ +/* (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTTABLES_H__ +#define __TTTABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + /* <Title> */ + /* TrueType Tables */ + /* */ + /* <Abstract> */ + /* TrueType specific table types and functions. */ + /* */ + /* <Description> */ + /* This section contains the definition of TrueType-specific tables */ + /* as well as some routines used to access and process them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Header */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType font header table. All */ + /* fields follow the TrueType specification. */ + /* */ + typedef struct TT_Header_ + { + FT_Fixed Table_Version; + FT_Fixed Font_Revision; + + FT_Long CheckSum_Adjust; + FT_Long Magic_Number; + + FT_UShort Flags; + FT_UShort Units_Per_EM; + + FT_Long Created [2]; + FT_Long Modified[2]; + + FT_Short xMin; + FT_Short yMin; + FT_Short xMax; + FT_Short yMax; + + FT_UShort Mac_Style; + FT_UShort Lowest_Rec_PPEM; + + FT_Short Font_Direction; + FT_Short Index_To_Loc_Format; + FT_Short Glyph_Data_Format; + + } TT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HoriHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType horizontal header, the `hhea' */ + /* table, as well as the corresponding horizontal metrics table, */ + /* i.e., the `hmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of all */ + /* glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoAscender' field */ + /* of the OS/2 table instead if you want */ + /* the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the distance */ + /* from the baseline to the bottom-most of */ + /* all glyph points found in the font. It */ + /* is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Width_Max :: This field is the maximum of all advance */ + /* widths found in the font. It can be */ + /* used to compute the maximum width of an */ + /* arbitrary string of text. */ + /* */ + /* min_Left_Side_Bearing :: The minimum left side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Right_Side_Bearing :: The minimum right side bearing of all */ + /* glyphs within the font. */ + /* */ + /* xMax_Extent :: The maximum horizontal extent (i.e., the */ + /* `width' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ + /* table -- this value can be smaller than */ + /* the total number of glyphs in the font. */ + /* */ + /* long_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields which */ + /* are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_HoriHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Width_Max; /* advance width maximum */ + + FT_Short min_Left_Side_Bearing; /* minimum left-sb */ + FT_Short min_Right_Side_Bearing; /* minimum right-sb */ + FT_Short xMax_Extent; /* xmax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_HMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `HMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_HoriHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_VertHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType vertical header, the `vhea' */ + /* table, as well as the corresponding vertical metrics table, i.e., */ + /* the `vmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of */ + /* all glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoAscender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the */ + /* distance from the baseline to the */ + /* bottom-most of all glyph points found */ + /* in the font. It is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Height_Max :: This field is the maximum of all */ + /* advance heights found in the font. It */ + /* can be used to compute the maximum */ + /* height of an arbitrary string of text. */ + /* */ + /* min_Top_Side_Bearing :: The minimum top side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ + /* glyphs within the font. */ + /* */ + /* yMax_Extent :: The maximum vertical extent (i.e., the */ + /* `height' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* This value is `reserved' in vmtx */ + /* version 1.0. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of VMetrics entries in the */ + /* `vmtx' table -- this value can be */ + /* smaller than the total number of glyphs */ + /* in the font. */ + /* */ + /* long_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields which */ + /* are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_VertHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Height_Max; /* advance height maximum */ + + FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ + FT_Short yMax_Extent; /* xmax or ymax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_VMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they're used to connect the metrics header to the relevant */ + /* `HMTX' or `VMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_VertHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_OS2 */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType OS/2 table. This is the long */ + /* table version. All fields comply to the TrueType specification. */ + /* */ + /* Note that we now support old Mac fonts which do not include an */ + /* OS/2 table. In this case, the `version' field is always set to */ + /* 0xFFFF. */ + /* */ + typedef struct TT_OS2_ + { + FT_UShort version; /* 0x0001 - more or 0xFFFF */ + FT_Short xAvgCharWidth; + FT_UShort usWeightClass; + FT_UShort usWidthClass; + FT_Short fsType; + FT_Short ySubscriptXSize; + FT_Short ySubscriptYSize; + FT_Short ySubscriptXOffset; + FT_Short ySubscriptYOffset; + FT_Short ySuperscriptXSize; + FT_Short ySuperscriptYSize; + FT_Short ySuperscriptXOffset; + FT_Short ySuperscriptYOffset; + FT_Short yStrikeoutSize; + FT_Short yStrikeoutPosition; + FT_Short sFamilyClass; + + FT_Byte panose[10]; + + FT_ULong ulUnicodeRange1; /* Bits 0-31 */ + FT_ULong ulUnicodeRange2; /* Bits 32-63 */ + FT_ULong ulUnicodeRange3; /* Bits 64-95 */ + FT_ULong ulUnicodeRange4; /* Bits 96-127 */ + + FT_Char achVendID[4]; + + FT_UShort fsSelection; + FT_UShort usFirstCharIndex; + FT_UShort usLastCharIndex; + FT_Short sTypoAscender; + FT_Short sTypoDescender; + FT_Short sTypoLineGap; + FT_UShort usWinAscent; + FT_UShort usWinDescent; + + /* only version 1 tables: */ + + FT_ULong ulCodePageRange1; /* Bits 0-31 */ + FT_ULong ulCodePageRange2; /* Bits 32-63 */ + + /* only version 2 tables: */ + + FT_Short sxHeight; + FT_Short sCapHeight; + FT_UShort usDefaultChar; + FT_UShort usBreakChar; + FT_UShort usMaxContext; + + } TT_OS2; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Postscript */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PostScript table. All fields */ + /* comply to the TrueType specification. This structure does not */ + /* reference the PostScript glyph names, which can be nevertheless */ + /* accessed with the `ttpost' module. */ + /* */ + typedef struct TT_Postscript_ + { + FT_Fixed FormatType; + FT_Fixed italicAngle; + FT_Short underlinePosition; + FT_Short underlineThickness; + FT_ULong isFixedPitch; + FT_ULong minMemType42; + FT_ULong maxMemType42; + FT_ULong minMemType1; + FT_ULong maxMemType1; + + /* Glyph names follow in the file, but we don't */ + /* load them by default. See the ttpost.c file. */ + + } TT_Postscript; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_PCLT */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PCLT table. All fields */ + /* comply to the TrueType specification. */ + /* */ + typedef struct TT_PCLT_ + { + FT_Fixed Version; + FT_ULong FontNumber; + FT_UShort Pitch; + FT_UShort xHeight; + FT_UShort Style; + FT_UShort TypeFamily; + FT_UShort CapHeight; + FT_UShort SymbolSet; + FT_Char TypeFace[16]; + FT_Char CharacterComplement[8]; + FT_Char FileName[6]; + FT_Char StrokeWeight; + FT_Char WidthType; + FT_Byte SerifStyle; + FT_Byte Reserved; + + } TT_PCLT; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_MaxProfile */ + /* */ + /* <Description> */ + /* The maximum profile is a table containing many max values which */ + /* can be used to pre-allocate arrays. This ensures that no memory */ + /* allocation occurs during a glyph load. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numGlyphs :: The number of glyphs in this TrueType */ + /* font. */ + /* */ + /* maxPoints :: The maximum number of points in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositePoints'. */ + /* */ + /* maxContours :: The maximum number of contours in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositeContours'. */ + /* */ + /* maxCompositePoints :: The maximum number of points in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxPoints'. */ + /* */ + /* maxCompositeContours :: The maximum number of contours in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxContours'. */ + /* */ + /* maxZones :: The maximum number of zones used for */ + /* glyph hinting. */ + /* */ + /* maxTwilightPoints :: The maximum number of points in the */ + /* twilight zone used for glyph hinting. */ + /* */ + /* maxStorage :: The maximum number of elements in the */ + /* storage area used for glyph hinting. */ + /* */ + /* maxFunctionDefs :: The maximum number of function */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxInstructionDefs :: The maximum number of instruction */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxStackElements :: The maximum number of stack elements used */ + /* during bytecode interpretation. */ + /* */ + /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ + /* used for glyph hinting. */ + /* */ + /* maxComponentElements :: The maximum number of simple (i.e., non- */ + /* composite) glyphs in a composite glyph. */ + /* */ + /* maxComponentDepth :: The maximum nesting depth of composite */ + /* glyphs. */ + /* */ + /* <Note> */ + /* This structure is only used during font loading. */ + /* */ + typedef struct TT_MaxProfile_ + { + FT_Fixed version; + FT_UShort numGlyphs; + FT_UShort maxPoints; + FT_UShort maxContours; + FT_UShort maxCompositePoints; + FT_UShort maxCompositeContours; + FT_UShort maxZones; + FT_UShort maxTwilightPoints; + FT_UShort maxStorage; + FT_UShort maxFunctionDefs; + FT_UShort maxInstructionDefs; + FT_UShort maxStackElements; + FT_UShort maxSizeOfInstructions; + FT_UShort maxComponentElements; + FT_UShort maxComponentDepth; + + } TT_MaxProfile; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Sfnt_Tag */ + /* */ + /* <Description> */ + /* An enumeration used to specify the index of an SFNT table. */ + /* Used in the @FT_Get_Sfnt_Table API function. */ + /* */ + typedef enum FT_Sfnt_Tag_ + { + ft_sfnt_head = 0, /* TT_Header */ + ft_sfnt_maxp = 1, /* TT_MaxProfile */ + ft_sfnt_os2 = 2, /* TT_OS2 */ + ft_sfnt_hhea = 3, /* TT_HoriHeader */ + ft_sfnt_vhea = 4, /* TT_VertHeader */ + ft_sfnt_post = 5, /* TT_Postscript */ + ft_sfnt_pclt = 6, /* TT_PCLT */ + + sfnt_max /* internal end mark */ + + } FT_Sfnt_Tag; + + /* */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Table */ + /* */ + /* <Description> */ + /* Return a pointer to a given SFNT table within a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the source. */ + /* */ + /* tag :: The index of the SFNT table. */ + /* */ + /* <Return> */ + /* A type-less pointer to the table. This will be~0 in case of */ + /* error, or if the corresponding table was not found *OR* loaded */ + /* from the file. */ + /* */ + /* Use a typecast according to `tag' to access the structure */ + /* elements. */ + /* */ + /* <Note> */ + /* The table is owned by the face object and disappears with it. */ + /* */ + /* This function is only useful to access SFNT tables that are loaded */ + /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ + /* a list. */ + /* */ + FT_EXPORT( void* ) + FT_Get_Sfnt_Table( FT_Face face, + FT_Sfnt_Tag tag ); + + + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use the value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag == 0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, then try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + */ + FT_EXPORT( FT_Error ) + FT_Load_Sfnt_Table( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @output: + * tag :: + * The name tag of the SFNT table. + * + * length :: + * The length of the SFNT table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * SFNT tables with length zero are treated as missing. + * + */ + FT_EXPORT( FT_Error ) + FT_Sfnt_Table_Info( FT_Face face, + FT_UInt table_index, + FT_ULong *tag, + FT_ULong *length ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Language_ID */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap language ID. Definitions of */ + /* language ID values are in `freetype/ttnameid.h'. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The language ID of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, just return~0 as the default value. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_CMap_Language_ID( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Format */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap format. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The format of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, return -1. */ + /* */ + FT_EXPORT( FT_Long ) + FT_Get_CMap_Format( FT_CharMap charmap ); + + /* */ + + +FT_END_HEADER + +#endif /* __TTTABLES_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/tttags.h b/contrib/media/updf/include/freetype/tttags.h new file mode 100644 index 0000000000..307ce4b637 --- /dev/null +++ b/contrib/media/updf/include/freetype/tttags.h @@ -0,0 +1,107 @@ +/***************************************************************************/ +/* */ +/* tttags.h */ +/* */ +/* Tags for TrueType and OpenType tables (specification only). */ +/* */ +/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTAGS_H__ +#define __TTAGS_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + +#define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) +#define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) +#define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) +#define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) +#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) +#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) +#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) +#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) +#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) +#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) +#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) +#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) +#define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) +#define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) +#define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) +#define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) +#define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) +#define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) +#define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) +#define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) +#define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) +#define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) +#define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) +#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) +#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) +#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) +#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) +#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) +#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) +#define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) +#define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) +#define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) +#define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) +#define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) +#define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) +#define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) +#define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) +#define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) +#define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) +#define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) +#define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) +#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) +#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) +#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) +#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) +#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) +#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) +#define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) +#define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) +#define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) +#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) +#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) +#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) +#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) +#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) +#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) +#define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) +#define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) +#define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) +#define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) +#define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) +#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) +#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) +#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) + + +FT_END_HEADER + +#endif /* __TTAGS_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/tttypes.h b/contrib/media/updf/include/freetype/tttypes.h new file mode 100755 index 0000000000..b324013e87 --- /dev/null +++ b/contrib/media/updf/include/freetype/tttypes.h @@ -0,0 +1,150 @@ +/******************************************************************* + * + * tttypes.h + * + * Freetype engine's common types specification + * (this spec has no associated body). + * + * Copyright 1996-1999 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + * NOTE: + * + * All these declarations are library internals, and *not* part + * of the high-level interface. See also 'freetype.h'. + * + ******************************************************************/ + +#ifndef TTTYPES_H +#define TTTYPES_H + +#include "ttconfig.h" +#include "freetype.h" + +#ifdef __MACTYPES__ +#error "<MacTypes.h> have been included, and this prevents the proper\ + compilation of this library. Please remove the precompiled headers." +#endif + + typedef char String; + typedef signed char Char; + typedef unsigned char Byte; + + typedef unsigned short UShort; + typedef signed short Short; + + typedef unsigned long ULong; + typedef signed long Long; + + typedef TT_Int32 Fixed; + + typedef int Int; + + /* Simple access types: pointers and tables */ + + typedef Byte* PByte; + typedef UShort* PUShort; + typedef Short* PShort; + typedef ULong* PULong; + typedef Long* PLong; + + typedef Fixed* PFixed; + + typedef Int* PInt; + + typedef void* Pointer; + + typedef TT_F26Dot6* PCoordinates; + typedef unsigned char* PTouchTable; + + +#ifndef Bool + typedef int Bool; /* No boolean type in C */ +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL (void*)0 +#endif + + typedef Long Storage; + typedef Storage* PStorage; + + +/* Rounding mode constants */ + +#define TT_Round_Off 5 +#define TT_Round_To_Half_Grid 0 +#define TT_Round_To_Grid 1 +#define TT_Round_To_Double_Grid 2 +#define TT_Round_Up_To_Grid 4 +#define TT_Round_Down_To_Grid 3 +#define TT_Round_Super 6 +#define TT_Round_Super_45 7 + + +/* Touch flag masks */ + +#define TT_Flag_On_Curve 1 +#define TT_Flag_Touched_X 2 +#define TT_Flag_Touched_Y 4 +#define TT_Flag_Touched_Both 6 + + +/* Error management constants :) */ + +#define SUCCESS 0 +#define FAILURE -1 + + +/* The min and max functions missing in C. As usual, be careful not to */ +/* write things like MIN( a++, b++ ) to avoid side effects. */ + +#ifndef MIN +#define MIN( a, b ) ( (a) < (b) ? (a) : (b) ) +#endif + +#ifndef MAX +#define MAX( a, b ) ( (a) > (b) ? (a) : (b) ) +#endif + +#ifndef ABS +#define ABS( a ) ( (a) < 0 ? -(a) : (a) ) +#endif + +/* conversion macros for the handles defined in freetype.h */ + +#define HANDLE_Val( handle ) ((handle).z) + +#define HANDLE_Engine( handle ) ((PEngine_Instance)HANDLE_Val( handle )) + +#define HANDLE_Face( handle ) ((PFace)HANDLE_Val( handle )) + +#define HANDLE_Instance( handle ) ((PInstance)HANDLE_Val( handle )) + +/* HANDLE_Stream( handle ) must be defined in ttfile.c */ + +#define HANDLE_Glyph( handle ) ((PGlyph)HANDLE_Val( handle )) + +#define HANDLE_CharMap( handle ) ((PCMapTable)HANDLE_Val( handle )) + +#define HANDLE_Set( handle, val ) ((handle).z = (void*)(val)) + + +#endif /* TTTYPES_H */ + + +/* END */ diff --git a/contrib/media/updf/include/freetype/ttunpat.h b/contrib/media/updf/include/freetype/ttunpat.h new file mode 100644 index 0000000000..a0162759b7 --- /dev/null +++ b/contrib/media/updf/include/freetype/ttunpat.h @@ -0,0 +1,59 @@ +/***************************************************************************/ +/* */ +/* ttunpat.h */ +/* */ +/* Definitions for the unpatented TrueType hinting system */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Written by Graham Asher <graham.asher@btinternet.com> */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTUNPAT_H__ +#define __TTUNPAT_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_UNPATENTED_HINTING + * + * @description: + * A constant used as the tag of an @FT_Parameter structure to indicate + * that unpatented methods only should be used by the TrueType bytecode + * interpreter for a typeface opened by @FT_Open_Face. + * + */ +#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) + + /* */ + +FT_END_HEADER + + +#endif /* __TTUNPAT_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/fstream b/contrib/media/updf/include/fstream new file mode 100644 index 0000000000..c4546ab647 --- /dev/null +++ b/contrib/media/updf/include/fstream @@ -0,0 +1,7 @@ +#ifndef _FSTREAM_INCLUDED +#define _FSTREAM_INCLUDED +#include <iostream> +/*namespace std +{ +}*/ +#endif diff --git a/contrib/media/updf/include/ft2build.h b/contrib/media/updf/include/ft2build.h new file mode 100644 index 0000000000..211b54db44 --- /dev/null +++ b/contrib/media/updf/include/ft2build.h @@ -0,0 +1,39 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* (Generic version) */ +/* */ +/* Copyright 1996-2001, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file corresponds to the default `ft2build.h' file for */ + /* FreeType 2. It uses the `freetype' include root. */ + /* */ + /* Note that specific platforms might use a different configuration. */ + /* See builds/unix/ft2unix.h for an example. */ + /* */ + /*************************************************************************/ + + +#ifndef __FT2_BUILD_GENERIC_H__ +#define __FT2_BUILD_GENERIC_H__ + +#include "ftheader.h" + +#endif /* __FT2_BUILD_GENERIC_H__ */ + + +/* END */ diff --git a/contrib/media/updf/include/ftheader.h b/contrib/media/updf/include/ftheader.h new file mode 100644 index 0000000000..b58a1ce5e3 --- /dev/null +++ b/contrib/media/updf/include/ftheader.h @@ -0,0 +1,770 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#define __FT_HEADER_H__ + + + /*@***********************************************************************/ + /* */ + /* <Macro> */ + /* FT_BEGIN_HEADER */ + /* */ + /* <Description> */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* <Macro> */ + /* FT_END_HEADER */ + /* */ + /* <Description> */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* header_file_macros */ + /* */ + /* <Title> */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <freetype/fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <freetype/ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <freetype/ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <freetype/ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <freetype/ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <freetype/ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <freetype/ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <freetype/ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `glyph image' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for @FT_Glyph elements. You can also + * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to + * store small glyph bitmaps, as it will use less memory. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * glyph image-related cache declarations. + * + */ +#define FT_CACHE_IMAGE_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_SMALL_BITMAPS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `small bitmaps' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for small glyph bitmaps in a relatively + * memory-efficient way. You can also use the API defined in + * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, + * including scalable outlines. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * small bitmaps-related cache declarations. + * + */ +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_CHARMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `charmap' API of the FreeType~2 cache sub-system. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * charmap-based cache declarations. + * + */ +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <freetype/ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <freetype/ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <freetype/ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <freetype/ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <freetype/ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_XFREE86_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to the XFree86 and + * X.Org X11 servers. + */ +#define FT_XFREE86_H <freetype/ftxf86.h> + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_UNPATENTED_HINTING_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <freetype/ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <freetype/ftadvanc.h> + + + /* */ + +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> + + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> + + +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + +#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> + + + /* + * Include internal headers definitions from <freetype/internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + + + +/* END */ diff --git a/contrib/media/updf/include/ftp_var.h b/contrib/media/updf/include/ftp_var.h new file mode 100644 index 0000000000..e569df2498 --- /dev/null +++ b/contrib/media/updf/include/ftp_var.h @@ -0,0 +1,131 @@ +/* + * Copyright (c) 1985, 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)ftp_var.h 8.4 (Berkeley) 10/9/94 + */ + +/* + * FTP global variables. + */ + +#include <sys/param.h> +#include <setjmp.h> + +#include "extern.h" + +#ifndef FTP_EXTERN +#define FTP_EXTERN extern +#endif +/* + * Options and other state info. + */ +FTP_EXTERN int trace; /* trace packets exchanged */ +FTP_EXTERN int hash; /* print # for each buffer transferred */ +FTP_EXTERN int hashbytes; /* number of bytes per # printed */ +FTP_EXTERN int sendport; /* use PORT cmd for each data connection */ +FTP_EXTERN int verbose; /* print messages coming back from server */ +FTP_EXTERN int connected; /* connected to server */ +FTP_EXTERN int fromatty; /* input is from a terminal */ +FTP_EXTERN int interactive; /* interactively prompt on m* cmds */ +FTP_EXTERN int debug; /* debugging level */ +FTP_EXTERN int bell; /* ring bell on cmd completion */ +FTP_EXTERN int doglob; /* glob local file names */ +FTP_EXTERN int autologin; /* establish user account on connection */ +FTP_EXTERN int proxy; /* proxy server connection active */ +FTP_EXTERN int proxflag; /* proxy connection exists */ +FTP_EXTERN int sunique; /* store files on server with unique name */ +FTP_EXTERN int runique; /* store local files with unique name */ +FTP_EXTERN int mcase; /* map upper to lower case for mget names */ +FTP_EXTERN int ntflag; /* use ntin ntout tables for name translation */ +FTP_EXTERN int mapflag; /* use mapin mapout templates on file names */ +FTP_EXTERN int code; /* return/reply code for ftp command */ +FTP_EXTERN int crflag; /* if 1, strip car. rets. on ascii gets */ +FTP_EXTERN char pasv[64]; /* passive port for proxy data connection */ +FTP_EXTERN int passivemode; /* passive mode enabled */ +FTP_EXTERN char *altarg; /* argv[1] with no shell-like preprocessing */ +FTP_EXTERN char ntin[17]; /* input translation table */ +FTP_EXTERN char ntout[17]; /* output translation table */ +extern char *mapin; /* input map template */ +extern char *mapout; /* output map template */ +FTP_EXTERN char typename[32]; /* name of file transfer type */ +FTP_EXTERN int type; /* requested file transfer type */ +FTP_EXTERN int curtype; /* current file transfer type */ +FTP_EXTERN char structname[32]; /* name of file transfer structure */ +FTP_EXTERN int stru; /* file transfer structure */ +FTP_EXTERN char formname[32]; /* name of file transfer format */ +FTP_EXTERN int form; /* file transfer format */ +FTP_EXTERN char modename[32]; /* name of file transfer mode */ +FTP_EXTERN int mode; /* file transfer mode */ +FTP_EXTERN char bytename[32]; /* local byte size in ascii */ +FTP_EXTERN int bytesize; /* local byte size in binary */ + +FTP_EXTERN char *hostname; /* name of host connected to */ +FTP_EXTERN int unix_server; /* server is unix, can use binary for ascii */ +FTP_EXTERN int unix_proxy; /* proxy is unix, can use binary for ascii */ + +FTP_EXTERN struct servent *sp; /* service spec for tcp/ftp */ + +FTP_EXTERN jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ + +#if HAVE_LIBREADLINE +FTP_EXTERN char *line; +#else +FTP_EXTERN char line[200]; /* input line buffer */ +#endif + +FTP_EXTERN char *stringbase; /* current scan point in line buffer */ +FTP_EXTERN char argbuf[200]; /* argument storage buffer */ +FTP_EXTERN char *argbase; /* current storage point in arg buffer */ +FTP_EXTERN int margc; /* count of arguments on input line */ +FTP_EXTERN char *margv[20]; /* args parsed from input line */ +FTP_EXTERN int cpend; /* flag: if != 0, then pending server reply */ +FTP_EXTERN int mflag; /* flag: if != 0, then active multi command */ + +FTP_EXTERN int options; /* used during socket creation */ + +/* + * Format of command table. + */ +struct cmd { + char *c_name; /* name of command */ + char *c_help; /* help string */ + char c_bell; /* give bell when command completes */ + char c_conn; /* must be connected to use command */ + char c_proxy; /* proxy server may execute */ + void (*c_handler) __P((int, char **)); /* function to call */ +}; + +struct macel { + char mac_name[9]; /* macro name */ + char *mac_start; /* start of macro in macbuf */ + char *mac_end; /* end of macro in macbuf */ +}; + +FTP_EXTERN int macnum; /* number of defined macros */ +FTP_EXTERN struct macel macros[16]; +FTP_EXTERN char macbuf[4096]; diff --git a/contrib/media/updf/include/ftw.h b/contrib/media/updf/include/ftw.h new file mode 100644 index 0000000000..b8607eab09 --- /dev/null +++ b/contrib/media/updf/include/ftw.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_ftw_h_ +#define __dj_include_ftw_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define FTW_F 1 +#define FTW_D 2 +#define FTW_NS 3 +#define FTW_DNR 4 +#define FTW_VL 5 + +#include <sys/stat.h> + +int ftw(const char *_dir, + int (*_fn)(const char *_file, struct stat *_sb, int _flag), + int _depth); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_ftw_h_ */ diff --git a/contrib/media/updf/include/functional b/contrib/media/updf/include/functional new file mode 100644 index 0000000000..ea48352643 --- /dev/null +++ b/contrib/media/updf/include/functional @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_FUNCTIONAL +#include <bits/std_functional.h> +#endif diff --git a/contrib/media/updf/include/general.h b/contrib/media/updf/include/general.h new file mode 100644 index 0000000000..f987c5ada2 --- /dev/null +++ b/contrib/media/updf/include/general.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)general.h 8.1 (Berkeley) 6/6/93 + */ + +/* + * Some general definitions. + */ + + +#define numberof(x) (sizeof x/sizeof x[0]) +#define highestof(x) (numberof(x)-1) + +#define ClearElement(x) memset((char *)&x, 0, sizeof x) +#define ClearArray(x) memset((char *)x, 0, sizeof x) diff --git a/contrib/media/updf/include/genericobject.h b/contrib/media/updf/include/genericobject.h new file mode 100644 index 0000000000..0a33c42618 --- /dev/null +++ b/contrib/media/updf/include/genericobject.h @@ -0,0 +1,44 @@ + + +#ifndef __genericobject_h__ +#define __genericobject_h__ + +#include "yacasbase.h" + +/// Not used. +/// This class has pure virtual functions, but no derived classes, so +/// it can never be used. +class LispArgList : public YacasBase +{ +public: + virtual ~LispArgList(); + virtual LispInt NrArguments()=0; + virtual LispChar * GetArgument(LispInt aIndex, LispInt& aLength)=0; + virtual LispBoolean Compare(LispInt aIndex, LispChar * aString)=0; +}; + +/// Abstract class which can be put inside a LispGenericClass. +class GenericClass : public YacasBase +{ +public: + GenericClass() : iReferenceCount(0) {}; + virtual ~GenericClass(); + virtual LispChar * Send(LispArgList& aArgList)=0; + virtual LispChar * TypeName()=0; +public: + LispInt iReferenceCount; //TODO: perhaps share the method of reference counting with how it is done in other places +}; + + +/* Definition of DYNCAST: either the cast succeeds, or the variable is assigned NULL. +*/ + +#define DYNCAST(_type,_name,_var,_object) \ + _type * _var = NULL ; \ + if (_object != NULL) \ + { \ + if (StrEqual((_object)->TypeName(),_name)) _var = (_type *)(_object); \ + } + +#endif + diff --git a/contrib/media/updf/include/genericstructs.h b/contrib/media/updf/include/genericstructs.h new file mode 100644 index 0000000000..a021cc992d --- /dev/null +++ b/contrib/media/updf/include/genericstructs.h @@ -0,0 +1,49 @@ +/** \file genericstructs.h defines the class that handles structs and classes for plugins. + */ +#ifndef __genericstruct_h__ +#define __genericstruct_h__ + +#include "yacasbase.h" +#include "genericobject.h" +#include "lispassert.h" + +/** \class GenericStruct This class maintains a pointer to some arbitrary + * object (which can be any thing). The plugin is responsible for supplying + * functions for manipulating such structs/classes/arrays. The Yacas core + * then needs to know nothing about the internals of such a struct. + * + * The struct is represented by a void pointer to the struct, a pointer + * to a function that can clean up the struct (used when automatically + * deleting the object), and a pointer to a text string representing the + * type of the object (useful for testing if the type passed as an argument + * to a function is correct). + */ +class GenericStruct : public GenericClass +{ +public: + GenericStruct(LispChar * aTypeName, void* aData, void (*aDestructor)(void*)); + virtual ~GenericStruct(); + virtual LispChar * Send(LispArgList& aArgList); + virtual LispChar * TypeName(); + inline void* Data() {return iData;} +private: + GenericStruct(const GenericStruct& aOther) : iData(NULL),iTypeName(NULL),iDestructor(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + GenericStruct& operator=(const GenericStruct& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +public: + void* iData; + LispChar * iTypeName; + void (*iDestructor)(void* data); +}; + + +#endif + diff --git a/contrib/media/updf/include/getpages.h b/contrib/media/updf/include/getpages.h new file mode 100644 index 0000000000..3618b7e6e9 --- /dev/null +++ b/contrib/media/updf/include/getpages.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_getpagesize_h_ +#define __dj_include_getpagesize_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <unistd.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_getpagesize_h_ */ diff --git a/contrib/media/updf/include/glib/glib.h b/contrib/media/updf/include/glib/glib.h new file mode 100644 index 0000000000..b83cf5db35 --- /dev/null +++ b/contrib/media/updf/include/glib/glib.h @@ -0,0 +1,2827 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GLib Team and others 1997-1999. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GLib at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __G_LIB_H__ +#define __G_LIB_H__ + +/* system specific config file glibconfig.h provides definitions for + * the extrema of many of the standard types. These are: + * + * G_MINSHORT, G_MAXSHORT + * G_MININT, G_MAXINT + * G_MINLONG, G_MAXLONG + * G_MINFLOAT, G_MAXFLOAT + * G_MINDOUBLE, G_MAXDOUBLE + * + * It also provides the following typedefs: + * + * gint8, guint8 + * gint16, guint16 + * gint32, guint32 + * gint64, guint64 + * + * It defines the G_BYTE_ORDER symbol to one of G_*_ENDIAN (see later in + * this file). + * + * And it provides a way to store and retrieve a `gint' in/from a `gpointer'. + * This is useful to pass an integer instead of a pointer to a callback. + * + * GINT_TO_POINTER(i), GUINT_TO_POINTER(i) + * GPOINTER_TO_INT(p), GPOINTER_TO_UINT(p) + * + * Finally, it provide the following wrappers to STDC functions: + * + * g_ATEXIT + * To register hooks which are executed on exit(). + * Usually a wrapper for STDC atexit. + * + * void *g_memmove(void *dest, const void *src, guint count); + * A wrapper for STDC memmove, or an implementation, if memmove doesn't + * exist. The prototype looks like the above, give or take a const, + * or size_t. + */ +#include <glibconfig.h> + +/* include varargs functions for assertment macros + */ +#include <stdarg.h> + +/* optionally feature DMALLOC memory allocation debugger + */ +#ifdef USE_DMALLOC +#include "dmalloc.h" +#endif + + +#ifdef NATIVE_WIN32 + +/* On native Win32, directory separator is the backslash, and search path + * separator is the semicolon. + */ +#define G_DIR_SEPARATOR '\\' +#define G_DIR_SEPARATOR_S "\\" +#define G_SEARCHPATH_SEPARATOR ';' +#define G_SEARCHPATH_SEPARATOR_S ";" + +#else /* !NATIVE_WIN32 */ + +#ifndef __EMX__ +/* Unix */ + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_SEARCHPATH_SEPARATOR_S ":" + +#else +/* EMX/OS2 */ + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ';' +#define G_SEARCHPATH_SEPARATOR_S ";" + +#endif + +#endif /* !NATIVE_WIN32 */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +/* Provide definitions for some commonly used macros. + * Some of them are only provided if they haven't already + * been defined. It is assumed that if they are already + * defined then the current definition is correct. + */ +#ifndef NULL +#define NULL ((void*) 0) +#endif + +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#undef ABS +#define ABS(a) (((a) < 0) ? -(a) : (a)) + +#undef CLAMP +#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) + + +/* Define G_VA_COPY() to do the right thing for copying va_list variables. + * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. + */ +#if !defined (G_VA_COPY) +# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) +# elif defined (G_VA_COPY_AS_ARRAY) +# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list)) +# else /* va_list is a pointer */ +# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) +# endif /* va_list is a pointer */ +#endif /* !G_VA_COPY */ + + +/* Provide convenience macros for handling structure + * fields through their offsets. + */ +#define G_STRUCT_OFFSET(struct_type, member) \ + ((gulong) ((gchar*) &((struct_type*) 0)->member)) +#define G_STRUCT_MEMBER_P(struct_p, struct_offset) \ + ((gpointer) ((gchar*) (struct_p) + (gulong) (struct_offset))) +#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \ + (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset))) + + +/* inlining hassle. for compilers that don't allow the `inline' keyword, + * mostly because of strict ANSI C compliance or dumbness, we try to fall + * back to either `__inline__' or `__inline'. + * we define G_CAN_INLINE, if the compiler seems to be actually + * *capable* to do function inlining, in which case inline function bodys + * do make sense. we also define G_INLINE_FUNC to properly export the + * function prototypes if no inlining can be performed. + * we special case most of the stuff, so inline functions can have a normal + * implementation by defining G_INLINE_FUNC to extern and G_CAN_INLINE to 1. + */ +#ifndef G_INLINE_FUNC +# define G_CAN_INLINE 1 +#endif +#ifdef G_HAVE_INLINE +# if defined (__GNUC__) && defined (__STRICT_ANSI__) +# undef inline +# define inline __inline__ +# endif +#else /* !G_HAVE_INLINE */ +# undef inline +# if defined (G_HAVE___INLINE__) +# define inline __inline__ +# else /* !inline && !__inline__ */ +# if defined (G_HAVE___INLINE) +# define inline __inline +# else /* !inline && !__inline__ && !__inline */ +# define inline /* don't inline, then */ +# ifndef G_INLINE_FUNC +# undef G_CAN_INLINE +# endif +# endif +# endif +#endif +#ifndef G_INLINE_FUNC +# ifdef __GNUC__ +# ifdef __OPTIMIZE__ +# define G_INLINE_FUNC extern inline +# else +# undef G_CAN_INLINE +# define G_INLINE_FUNC extern +# endif +# else /* !__GNUC__ */ +# ifdef G_CAN_INLINE +# define G_INLINE_FUNC static inline +# else +# define G_INLINE_FUNC extern +# endif +# endif /* !__GNUC__ */ +#endif /* !G_INLINE_FUNC */ + + +/* Provide simple macro statement wrappers (adapted from Perl): + * G_STMT_START { statements; } G_STMT_END; + * can be used as a single statement, as in + * if (x) G_STMT_START { ... } G_STMT_END; else ... + * + * For gcc we will wrap the statements within `({' and `})' braces. + * For SunOS they will be wrapped within `if (1)' and `else (void) 0', + * and otherwise within `do' and `while (0)'. + */ +#if !(defined (G_STMT_START) && defined (G_STMT_END)) +# if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) +# define G_STMT_START (void)( +# define G_STMT_END ) +# else +# if (defined (sun) || defined (__sun__)) +# define G_STMT_START if (1) +# define G_STMT_END else (void)0 +# else +# define G_STMT_START do +# define G_STMT_END while (0) +# endif +# endif +#endif + + +/* Provide macros to feature the GCC function attribute. + */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define G_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((format (printf, format_idx, arg_idx))) +#define G_GNUC_SCANF( format_idx, arg_idx ) \ + __attribute__((format (scanf, format_idx, arg_idx))) +#define G_GNUC_FORMAT( arg_idx ) \ + __attribute__((format_arg (arg_idx))) +#define G_GNUC_NORETURN \ + __attribute__((noreturn)) +#define G_GNUC_CONST \ + __attribute__((const)) +#define G_GNUC_UNUSED \ + __attribute__((unused)) +#else /* !__GNUC__ */ +#define G_GNUC_PRINTF( format_idx, arg_idx ) +#define G_GNUC_SCANF( format_idx, arg_idx ) +#define G_GNUC_FORMAT( arg_idx ) +#define G_GNUC_NORETURN +#define G_GNUC_CONST +#define G_GNUC_UNUSED +#endif /* !__GNUC__ */ + + +/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with + * macros, so we can refer to them as strings unconditionally. + */ +#ifdef __GNUC__ +#define G_GNUC_FUNCTION __FUNCTION__ +#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ +#else /* !__GNUC__ */ +#define G_GNUC_FUNCTION "" +#define G_GNUC_PRETTY_FUNCTION "" +#endif /* !__GNUC__ */ + +/* we try to provide a usefull equivalent for ATEXIT if it is + * not defined, but use is actually abandoned. people should + * use g_atexit() instead. + */ +#ifndef ATEXIT +# define ATEXIT(proc) g_ATEXIT(proc) +#else +# define G_NATIVE_ATEXIT +#endif /* ATEXIT */ + +/* Hacker macro to place breakpoints for elected machines. + * Actual use is strongly deprecated of course ;) + */ +#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 +#define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END +#elif defined (__alpha__) && defined (__GNUC__) && __GNUC__ >= 2 +#define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END +#else /* !__i386__ && !__alpha__ */ +#define G_BREAKPOINT() +#endif /* __i386__ */ + + +/* Provide macros for easily allocating memory. The macros + * will cast the allocated memory to the specified type + * in order to avoid compiler warnings. (Makes the code neater). + */ + +#ifdef __DMALLOC_H__ +# define g_new(type, count) (ALLOC (type, count)) +# define g_new0(type, count) (CALLOC (type, count)) +# define g_renew(type, mem, count) (REALLOC (mem, type, count)) +#else /* __DMALLOC_H__ */ +# define g_new(type, count) \ + ((type *) g_malloc ((unsigned) sizeof (type) * (count))) +# define g_new0(type, count) \ + ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +# define g_renew(type, mem, count) \ + ((type *) g_realloc (mem, (unsigned) sizeof (type) * (count))) +#endif /* __DMALLOC_H__ */ + +#define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \ + g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \ + sizeof (type), \ + sizeof (type) * (pre_alloc), \ + (alloc_type)) \ +) +#define g_chunk_new(type, chunk) ( \ + (type *) g_mem_chunk_alloc (chunk) \ +) +#define g_chunk_new0(type, chunk) ( \ + (type *) g_mem_chunk_alloc0 (chunk) \ +) +#define g_chunk_free(mem, mem_chunk) G_STMT_START { \ + g_mem_chunk_free ((mem_chunk), (mem)); \ +} G_STMT_END + + +#define g_string(x) #x + + +/* Provide macros for error handling. The "assert" macros will + * exit on failure. The "return" macros will exit the current + * function. Two different definitions are given for the macros + * if G_DISABLE_ASSERT is not defined, in order to support gcc's + * __PRETTY_FUNCTION__ capability. + */ + +#ifdef G_DISABLE_ASSERT + +#define g_assert(expr) +#define g_assert_not_reached() + +#else /* !G_DISABLE_ASSERT */ + +#ifdef __GNUC__ + +#define g_assert(expr) G_STMT_START{ \ + if (!(expr)) \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + "file %s: line %d (%s): assertion failed: (%s)", \ + __FILE__, \ + __LINE__, \ + __PRETTY_FUNCTION__, \ + #expr); }G_STMT_END + +#define g_assert_not_reached() G_STMT_START{ \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + "file %s: line %d (%s): should not be reached", \ + __FILE__, \ + __LINE__, \ + __PRETTY_FUNCTION__); }G_STMT_END + +#else /* !__GNUC__ */ + +#define g_assert(expr) G_STMT_START{ \ + if (!(expr)) \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + "file %s: line %d: assertion failed: (%s)", \ + __FILE__, \ + __LINE__, \ + #expr); }G_STMT_END + +#define g_assert_not_reached() G_STMT_START{ \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + "file %s: line %d: should not be reached", \ + __FILE__, \ + __LINE__); }G_STMT_END + +#endif /* __GNUC__ */ + +#endif /* !G_DISABLE_ASSERT */ + + +#ifdef G_DISABLE_CHECKS + +#define g_return_if_fail(expr) +#define g_return_val_if_fail(expr,val) + +#else /* !G_DISABLE_CHECKS */ + +#ifdef __GNUC__ + +#define g_return_if_fail(expr) G_STMT_START{ \ + if (!(expr)) \ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): assertion `%s' failed.", \ + __FILE__, \ + __LINE__, \ + __PRETTY_FUNCTION__, \ + #expr); \ + return; \ + }; }G_STMT_END + +#define g_return_val_if_fail(expr,val) G_STMT_START{ \ + if (!(expr)) \ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d (%s): assertion `%s' failed.", \ + __FILE__, \ + __LINE__, \ + __PRETTY_FUNCTION__, \ + #expr); \ + return val; \ + }; }G_STMT_END + +#else /* !__GNUC__ */ + +#define g_return_if_fail(expr) G_STMT_START{ \ + if (!(expr)) \ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d: assertion `%s' failed.", \ + __FILE__, \ + __LINE__, \ + #expr); \ + return; \ + }; }G_STMT_END + +#define g_return_val_if_fail(expr, val) G_STMT_START{ \ + if (!(expr)) \ + { \ + g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + "file %s: line %d: assertion `%s' failed.", \ + __FILE__, \ + __LINE__, \ + #expr); \ + return val; \ + }; }G_STMT_END + +#endif /* !__GNUC__ */ + +#endif /* !G_DISABLE_CHECKS */ + + +/* Provide type definitions for commonly used types. + * These are useful because a "gint8" can be adjusted + * to be 1 byte (8 bits) on all platforms. Similarly and + * more importantly, "gint32" can be adjusted to be + * 4 bytes (32 bits) on all platforms. + */ + +typedef char gchar; +typedef short gshort; +typedef long glong; +typedef int gint; +typedef gint gboolean; + +typedef unsigned char guchar; +typedef unsigned short gushort; +typedef unsigned long gulong; +typedef unsigned int guint; + +typedef float gfloat; +typedef double gdouble; + +/* HAVE_LONG_DOUBLE doesn't work correctly on all platforms. + * Since gldouble isn't used anywhere, just disable it for now */ + +#if 0 +#ifdef HAVE_LONG_DOUBLE +typedef long double gldouble; +#else /* HAVE_LONG_DOUBLE */ +typedef double gldouble; +#endif /* HAVE_LONG_DOUBLE */ +#endif /* 0 */ + +typedef void* gpointer; +typedef const void *gconstpointer; + + +typedef gint32 gssize; +typedef guint32 gsize; +typedef guint32 GQuark; +typedef gint32 GTime; + + +/* Portable endian checks and conversions + * + * glibconfig.h defines G_BYTE_ORDER which expands to one of + * the below macros. + */ +#define G_LITTLE_ENDIAN 1234 +#define G_BIG_ENDIAN 4321 +#define G_PDP_ENDIAN 3412 /* unused, need specific PDP check */ + + +/* Basic bit swapping functions + */ +#define GUINT16_SWAP_LE_BE_CONSTANT(val) ((guint16) ( \ + (((guint16) (val) & (guint16) 0x00ffU) << 8) | \ + (((guint16) (val) & (guint16) 0xff00U) >> 8))) +#define GUINT32_SWAP_LE_BE_CONSTANT(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \ + (((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \ + (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \ + (((guint32) (val) & (guint32) 0xff000000U) >> 24))) + +/* Intel specific stuff for speed + */ +#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 +# define GUINT16_SWAP_LE_BE_X86(val) \ + (__extension__ \ + ({ register guint16 __v; \ + if (__builtin_constant_p (val)) \ + __v = GUINT16_SWAP_LE_BE_CONSTANT (val); \ + else \ + __asm__ __const__ ("rorw $8, %w0" \ + : "=r" (__v) \ + : "0" ((guint16) (val))); \ + __v; })) +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_X86 (val)) +# if !defined(__i486__) && !defined(__i586__) \ + && !defined(__pentium__) && !defined(__i686__) && !defined(__pentiumpro__) +# define GUINT32_SWAP_LE_BE_X86(val) \ + (__extension__ \ + ({ register guint32 __v; \ + if (__builtin_constant_p (val)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \ + else \ + __asm__ __const__ ("rorw $8, %w0\n\t" \ + "rorl $16, %0\n\t" \ + "rorw $8, %w0" \ + : "=r" (__v) \ + : "0" ((guint32) (val))); \ + __v; })) +# else /* 486 and higher has bswap */ +# define GUINT32_SWAP_LE_BE_X86(val) \ + (__extension__ \ + ({ register guint32 __v; \ + if (__builtin_constant_p (val)) \ + __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \ + else \ + __asm__ __const__ ("bswap %0" \ + : "=r" (__v) \ + : "0" ((guint32) (val))); \ + __v; })) +# endif /* processor specific 32-bit stuff */ +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86 (val)) +#else /* !__i386__ */ +# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) +# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) +#endif /* __i386__ */ + +#ifdef G_HAVE_GINT64 +# define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x00000000000000ffU)) << 56) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x000000000000ff00U)) << 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x0000000000ff0000U)) << 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x00000000ff000000U)) << 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x000000ff00000000U)) >> 8) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x0000ff0000000000U)) >> 24) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0x00ff000000000000U)) >> 40) | \ + (((guint64) (val) & \ + (guint64) G_GINT64_CONSTANT(0xff00000000000000U)) >> 56))) +# if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 +# define GUINT64_SWAP_LE_BE_X86(val) \ + (__extension__ \ + ({ union { guint64 __ll; \ + guint32 __l[2]; } __r; \ + if (__builtin_constant_p (val)) \ + __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (val); \ + else \ + { \ + union { guint64 __ll; \ + guint32 __l[2]; } __w; \ + __w.__ll = ((guint64) val); \ + __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \ + __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \ + } \ + __r.__ll; })) +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86 (val)) +# else /* !__i386__ */ +# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT(val)) +# endif +#endif + +#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val)) +#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val)) +#define GUINT32_SWAP_LE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \ + (((guint32) (val) & (guint32) 0xffff0000U) >> 16))) +#define GUINT32_SWAP_BE_PDP(val) ((guint32) ( \ + (((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \ + (((guint32) (val) & (guint32) 0xff00ff00U) >> 8))) + +/* The G*_TO_?E() macros are defined in glibconfig.h. + * The transformation is symmetric, so the FROM just maps to the TO. + */ +#define GINT16_FROM_LE(val) (GINT16_TO_LE (val)) +#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val)) +#define GINT16_FROM_BE(val) (GINT16_TO_BE (val)) +#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val)) +#define GINT32_FROM_LE(val) (GINT32_TO_LE (val)) +#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val)) +#define GINT32_FROM_BE(val) (GINT32_TO_BE (val)) +#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val)) + +#ifdef G_HAVE_GINT64 +#define GINT64_FROM_LE(val) (GINT64_TO_LE (val)) +#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val)) +#define GINT64_FROM_BE(val) (GINT64_TO_BE (val)) +#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val)) +#endif + +#define GLONG_FROM_LE(val) (GLONG_TO_LE (val)) +#define GULONG_FROM_LE(val) (GULONG_TO_LE (val)) +#define GLONG_FROM_BE(val) (GLONG_TO_BE (val)) +#define GULONG_FROM_BE(val) (GULONG_TO_BE (val)) + +#define GINT_FROM_LE(val) (GINT_TO_LE (val)) +#define GUINT_FROM_LE(val) (GUINT_TO_LE (val)) +#define GINT_FROM_BE(val) (GINT_TO_BE (val)) +#define GUINT_FROM_BE(val) (GUINT_TO_BE (val)) + + +/* Portable versions of host-network order stuff + */ +#define g_ntohl(val) (GUINT32_FROM_BE (val)) +#define g_ntohs(val) (GUINT16_FROM_BE (val)) +#define g_htonl(val) (GUINT32_TO_BE (val)) +#define g_htons(val) (GUINT16_TO_BE (val)) + + +/* Glib version. + * we prefix variable declarations so they can + * properly get exported in windows dlls. + */ +#ifdef NATIVE_WIN32 +# ifdef GLIB_COMPILATION +# define GUTILS_C_VAR __declspec(dllexport) +# else /* !GLIB_COMPILATION */ +# define GUTILS_C_VAR extern __declspec(dllimport) +# endif /* !GLIB_COMPILATION */ +#else /* !NATIVE_WIN32 */ +# define GUTILS_C_VAR extern +#endif /* !NATIVE_WIN32 */ + +GUTILS_C_VAR const guint glib_major_version; +GUTILS_C_VAR const guint glib_minor_version; +GUTILS_C_VAR const guint glib_micro_version; +GUTILS_C_VAR const guint glib_interface_age; +GUTILS_C_VAR const guint glib_binary_age; + +#define GLIB_CHECK_VERSION(major,minor,micro) \ + (GLIB_MAJOR_VERSION > (major) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \ + (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \ + GLIB_MICRO_VERSION >= (micro))) + +/* Forward declarations of glib types. + */ +typedef struct _GAllocator GAllocator; +typedef struct _GArray GArray; +typedef struct _GByteArray GByteArray; +typedef struct _GCache GCache; +typedef struct _GCompletion GCompletion; +typedef struct _GData GData; +typedef struct _GDebugKey GDebugKey; +typedef struct _GHashTable GHashTable; +typedef struct _GHook GHook; +typedef struct _GHookList GHookList; +typedef struct _GList GList; +typedef struct _GMemChunk GMemChunk; +typedef struct _GNode GNode; +typedef struct _GPtrArray GPtrArray; +typedef struct _GRelation GRelation; +typedef struct _GScanner GScanner; +typedef struct _GScannerConfig GScannerConfig; +typedef struct _GSList GSList; +typedef struct _GString GString; +typedef struct _GStringChunk GStringChunk; +typedef struct _GTimer GTimer; +typedef struct _GTree GTree; +typedef struct _GTuples GTuples; +typedef union _GTokenValue GTokenValue; +typedef struct _GIOChannel GIOChannel; + +/* Tree traverse flags */ +typedef enum +{ + G_TRAVERSE_LEAFS = 1 << 0, + G_TRAVERSE_NON_LEAFS = 1 << 1, + G_TRAVERSE_ALL = G_TRAVERSE_LEAFS | G_TRAVERSE_NON_LEAFS, + G_TRAVERSE_MASK = 0x03 +} GTraverseFlags; + +/* Tree traverse orders */ +typedef enum +{ + G_IN_ORDER, + G_PRE_ORDER, + G_POST_ORDER, + G_LEVEL_ORDER +} GTraverseType; + +/* Log level shift offset for user defined + * log levels (0-7 are used by GLib). + */ +#define G_LOG_LEVEL_USER_SHIFT (8) + +/* Glib log levels and flags. + */ +typedef enum +{ + /* log flags */ + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + /* GLib log levels */ + G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */ + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + +/* GLib log levels that are considered fatal by default */ +#define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR) + + +typedef gpointer (*GCacheNewFunc) (gpointer key); +typedef gpointer (*GCacheDupFunc) (gpointer value); +typedef void (*GCacheDestroyFunc) (gpointer value); +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); +typedef gchar* (*GCompletionFunc) (gpointer); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GDataForeachFunc) (GQuark key_id, + gpointer data, + gpointer user_data); +typedef void (*GFunc) (gpointer data, + gpointer user_data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef void (*GFreeFunc) (gpointer data); +typedef void (*GHFunc) (gpointer key, + gpointer value, + gpointer user_data); +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); +typedef gint (*GHookCompareFunc) (GHook *new_hook, + GHook *sibling); +typedef gboolean (*GHookFindFunc) (GHook *hook, + gpointer data); +typedef void (*GHookMarshaller) (GHook *hook, + gpointer data); +typedef gboolean (*GHookCheckMarshaller) (GHook *hook, + gpointer data); +typedef void (*GHookFunc) (gpointer data); +typedef gboolean (*GHookCheckFunc) (gpointer data); +typedef void (*GHookFreeFunc) (GHookList *hook_list, + GHook *hook); +typedef void (*GLogFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); +typedef gboolean (*GNodeTraverseFunc) (GNode *node, + gpointer data); +typedef void (*GNodeForeachFunc) (GNode *node, + gpointer data); +typedef gint (*GSearchFunc) (gpointer key, + gpointer data); +typedef void (*GScannerMsgFunc) (GScanner *scanner, + gchar *message, + gint error); +typedef gint (*GTraverseFunc) (gpointer key, + gpointer value, + gpointer data); +typedef void (*GVoidFunc) (void); + + +struct _GList +{ + gpointer data; + GList *next; + GList *prev; +}; + +struct _GSList +{ + gpointer data; + GSList *next; +}; + +struct _GString +{ + gchar *str; + gint len; +}; + +struct _GArray +{ + gchar *data; + guint len; +}; + +struct _GByteArray +{ + guint8 *data; + guint len; +}; + +struct _GPtrArray +{ + gpointer *pdata; + guint len; +}; + +struct _GTuples +{ + guint len; +}; + +struct _GDebugKey +{ + gchar *key; + guint value; +}; + + +/* Doubly linked lists + */ +void g_list_push_allocator (GAllocator *allocator); +void g_list_pop_allocator (void); +GList* g_list_alloc (void); +void g_list_free (GList *list); +void g_list_free_1 (GList *list); +GList* g_list_append (GList *list, + gpointer data); +GList* g_list_prepend (GList *list, + gpointer data); +GList* g_list_insert (GList *list, + gpointer data, + gint position); +GList* g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func); +GList* g_list_concat (GList *list1, + GList *list2); +GList* g_list_remove (GList *list, + gpointer data); +GList* g_list_remove_link (GList *list, + GList *llink); +GList* g_list_reverse (GList *list); +GList* g_list_copy (GList *list); +GList* g_list_nth (GList *list, + guint n); +GList* g_list_find (GList *list, + gpointer data); +GList* g_list_find_custom (GList *list, + gpointer data, + GCompareFunc func); +gint g_list_position (GList *list, + GList *llink); +gint g_list_index (GList *list, + gpointer data); +GList* g_list_last (GList *list); +GList* g_list_first (GList *list); +guint g_list_length (GList *list); +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GList* g_list_sort (GList *list, + GCompareFunc compare_func); +gpointer g_list_nth_data (GList *list, + guint n); +#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL) +#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL) + + +/* Singly linked lists + */ +void g_slist_push_allocator (GAllocator *allocator); +void g_slist_pop_allocator (void); +GSList* g_slist_alloc (void); +void g_slist_free (GSList *list); +void g_slist_free_1 (GSList *list); +GSList* g_slist_append (GSList *list, + gpointer data); +GSList* g_slist_prepend (GSList *list, + gpointer data); +GSList* g_slist_insert (GSList *list, + gpointer data, + gint position); +GSList* g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func); +GSList* g_slist_concat (GSList *list1, + GSList *list2); +GSList* g_slist_remove (GSList *list, + gpointer data); +GSList* g_slist_remove_link (GSList *list, + GSList *llink); +GSList* g_slist_reverse (GSList *list); +GSList* g_slist_copy (GSList *list); +GSList* g_slist_nth (GSList *list, + guint n); +GSList* g_slist_find (GSList *list, + gpointer data); +GSList* g_slist_find_custom (GSList *list, + gpointer data, + GCompareFunc func); +gint g_slist_position (GSList *list, + GSList *llink); +gint g_slist_index (GSList *list, + gpointer data); +GSList* g_slist_last (GSList *list); +guint g_slist_length (GSList *list); +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GSList* g_slist_sort (GSList *list, + GCompareFunc compare_func); +gpointer g_slist_nth_data (GSList *list, + guint n); +#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) + + +/* Hash tables + */ +GHashTable* g_hash_table_new (GHashFunc hash_func, + GCompareFunc key_compare_func); +void g_hash_table_destroy (GHashTable *hash_table); +void g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); +void g_hash_table_remove (GHashTable *hash_table, + gconstpointer key); +gpointer g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); +gboolean g_hash_table_lookup_extended(GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +void g_hash_table_freeze (GHashTable *hash_table); +void g_hash_table_thaw (GHashTable *hash_table); +void g_hash_table_foreach (GHashTable *hash_table, + GHFunc func, + gpointer user_data); +guint g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +guint g_hash_table_size (GHashTable *hash_table); + + +/* Caches + */ +GCache* g_cache_new (GCacheNewFunc value_new_func, + GCacheDestroyFunc value_destroy_func, + GCacheDupFunc key_dup_func, + GCacheDestroyFunc key_destroy_func, + GHashFunc hash_key_func, + GHashFunc hash_value_func, + GCompareFunc key_compare_func); +void g_cache_destroy (GCache *cache); +gpointer g_cache_insert (GCache *cache, + gpointer key); +void g_cache_remove (GCache *cache, + gpointer value); +void g_cache_key_foreach (GCache *cache, + GHFunc func, + gpointer user_data); +void g_cache_value_foreach (GCache *cache, + GHFunc func, + gpointer user_data); + + +/* Balanced binary trees + */ +GTree* g_tree_new (GCompareFunc key_compare_func); +void g_tree_destroy (GTree *tree); +void g_tree_insert (GTree *tree, + gpointer key, + gpointer value); +void g_tree_remove (GTree *tree, + gpointer key); +gpointer g_tree_lookup (GTree *tree, + gpointer key); +void g_tree_traverse (GTree *tree, + GTraverseFunc traverse_func, + GTraverseType traverse_type, + gpointer data); +gpointer g_tree_search (GTree *tree, + GSearchFunc search_func, + gpointer data); +gint g_tree_height (GTree *tree); +gint g_tree_nnodes (GTree *tree); + + + +/* N-way tree implementation + */ +struct _GNode +{ + gpointer data; + GNode *next; + GNode *prev; + GNode *parent; + GNode *children; +}; + +#define G_NODE_IS_ROOT(node) (((GNode*) (node))->parent == NULL && \ + ((GNode*) (node))->prev == NULL && \ + ((GNode*) (node))->next == NULL) +#define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL) + +void g_node_push_allocator (GAllocator *allocator); +void g_node_pop_allocator (void); +GNode* g_node_new (gpointer data); +void g_node_destroy (GNode *root); +void g_node_unlink (GNode *node); +GNode* g_node_insert (GNode *parent, + gint position, + GNode *node); +GNode* g_node_insert_before (GNode *parent, + GNode *sibling, + GNode *node); +GNode* g_node_prepend (GNode *parent, + GNode *node); +guint g_node_n_nodes (GNode *root, + GTraverseFlags flags); +GNode* g_node_get_root (GNode *node); +gboolean g_node_is_ancestor (GNode *node, + GNode *descendant); +guint g_node_depth (GNode *node); +GNode* g_node_find (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gpointer data); + +/* convenience macros */ +#define g_node_append(parent, node) \ + g_node_insert_before ((parent), NULL, (node)) +#define g_node_insert_data(parent, position, data) \ + g_node_insert ((parent), (position), g_node_new (data)) +#define g_node_insert_data_before(parent, sibling, data) \ + g_node_insert_before ((parent), (sibling), g_node_new (data)) +#define g_node_prepend_data(parent, data) \ + g_node_prepend ((parent), g_node_new (data)) +#define g_node_append_data(parent, data) \ + g_node_insert_before ((parent), NULL, g_node_new (data)) + +/* traversal function, assumes that `node' is root + * (only traverses `node' and its subtree). + * this function is just a high level interface to + * low level traversal functions, optimized for speed. + */ +void g_node_traverse (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gint max_depth, + GNodeTraverseFunc func, + gpointer data); + +/* return the maximum tree height starting with `node', this is an expensive + * operation, since we need to visit all nodes. this could be shortened by + * adding `guint height' to struct _GNode, but then again, this is not very + * often needed, and would make g_node_insert() more time consuming. + */ +guint g_node_max_height (GNode *root); + +void g_node_children_foreach (GNode *node, + GTraverseFlags flags, + GNodeForeachFunc func, + gpointer data); +void g_node_reverse_children (GNode *node); +guint g_node_n_children (GNode *node); +GNode* g_node_nth_child (GNode *node, + guint n); +GNode* g_node_last_child (GNode *node); +GNode* g_node_find_child (GNode *node, + GTraverseFlags flags, + gpointer data); +gint g_node_child_position (GNode *node, + GNode *child); +gint g_node_child_index (GNode *node, + gpointer data); + +GNode* g_node_first_sibling (GNode *node); +GNode* g_node_last_sibling (GNode *node); + +#define g_node_prev_sibling(node) ((node) ? \ + ((GNode*) (node))->prev : NULL) +#define g_node_next_sibling(node) ((node) ? \ + ((GNode*) (node))->next : NULL) +#define g_node_first_child(node) ((node) ? \ + ((GNode*) (node))->children : NULL) + + +/* Callback maintenance functions + */ +#define G_HOOK_FLAG_USER_SHIFT (4) +typedef enum +{ + G_HOOK_FLAG_ACTIVE = 1 << 0, + G_HOOK_FLAG_IN_CALL = 1 << 1, + G_HOOK_FLAG_MASK = 0x0f +} GHookFlagMask; + +#define G_HOOK_DEFERRED_DESTROY ((GHookFreeFunc) 0x01) + +struct _GHookList +{ + guint seq_id; + guint hook_size; + guint is_setup : 1; + GHook *hooks; + GMemChunk *hook_memchunk; + GHookFreeFunc hook_free; /* virtual function */ + GHookFreeFunc hook_destroy; /* virtual function */ +}; + +struct _GHook +{ + gpointer data; + GHook *next; + GHook *prev; + guint ref_count; + guint hook_id; + guint flags; + gpointer func; + GDestroyNotify destroy; +}; + +#define G_HOOK_ACTIVE(hook) ((((GHook*) hook)->flags & \ + G_HOOK_FLAG_ACTIVE) != 0) +#define G_HOOK_IN_CALL(hook) ((((GHook*) hook)->flags & \ + G_HOOK_FLAG_IN_CALL) != 0) +#define G_HOOK_IS_VALID(hook) (((GHook*) hook)->hook_id != 0 && \ + G_HOOK_ACTIVE (hook)) +#define G_HOOK_IS_UNLINKED(hook) (((GHook*) hook)->next == NULL && \ + ((GHook*) hook)->prev == NULL && \ + ((GHook*) hook)->hook_id == 0 && \ + ((GHook*) hook)->ref_count == 0) + +void g_hook_list_init (GHookList *hook_list, + guint hook_size); +void g_hook_list_clear (GHookList *hook_list); +GHook* g_hook_alloc (GHookList *hook_list); +void g_hook_free (GHookList *hook_list, + GHook *hook); +void g_hook_ref (GHookList *hook_list, + GHook *hook); +void g_hook_unref (GHookList *hook_list, + GHook *hook); +gboolean g_hook_destroy (GHookList *hook_list, + guint hook_id); +void g_hook_destroy_link (GHookList *hook_list, + GHook *hook); +void g_hook_prepend (GHookList *hook_list, + GHook *hook); +void g_hook_insert_before (GHookList *hook_list, + GHook *sibling, + GHook *hook); +void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook, + GHookCompareFunc func); +GHook* g_hook_get (GHookList *hook_list, + guint hook_id); +GHook* g_hook_find (GHookList *hook_list, + gboolean need_valids, + GHookFindFunc func, + gpointer data); +GHook* g_hook_find_data (GHookList *hook_list, + gboolean need_valids, + gpointer data); +GHook* g_hook_find_func (GHookList *hook_list, + gboolean need_valids, + gpointer func); +GHook* g_hook_find_func_data (GHookList *hook_list, + gboolean need_valids, + gpointer func, + gpointer data); +/* return the first valid hook, and increment its reference count */ +GHook* g_hook_first_valid (GHookList *hook_list, + gboolean may_be_in_call); +/* return the next valid hook with incremented reference count, and + * decrement the reference count of the original hook + */ +GHook* g_hook_next_valid (GHookList *hook_list, + GHook *hook, + gboolean may_be_in_call); + +/* GHookCompareFunc implementation to insert hooks sorted by their id */ +gint g_hook_compare_ids (GHook *new_hook, + GHook *sibling); + +/* convenience macros */ +#define g_hook_append( hook_list, hook ) \ + g_hook_insert_before ((hook_list), NULL, (hook)) + +/* invoke all valid hooks with the (*GHookFunc) signature. + */ +void g_hook_list_invoke (GHookList *hook_list, + gboolean may_recurse); +/* invoke all valid hooks with the (*GHookCheckFunc) signature, + * and destroy the hook if FALSE is returned. + */ +void g_hook_list_invoke_check (GHookList *hook_list, + gboolean may_recurse); +/* invoke a marshaller on all valid hooks. + */ +void g_hook_list_marshal (GHookList *hook_list, + gboolean may_recurse, + GHookMarshaller marshaller, + gpointer data); +void g_hook_list_marshal_check (GHookList *hook_list, + gboolean may_recurse, + GHookCheckMarshaller marshaller, + gpointer data); + + +/* Fatal error handlers. + * g_on_error_query() will prompt the user to either + * [E]xit, [H]alt, [P]roceed or show [S]tack trace. + * g_on_error_stack_trace() invokes gdb, which attaches to the current + * process and shows a stack trace. + * These function may cause different actions on non-unix platforms. + * The prg_name arg is required by gdb to find the executable, if it is + * passed as NULL, g_on_error_query() will try g_get_prgname(). + */ +void g_on_error_query (const gchar *prg_name); +void g_on_error_stack_trace (const gchar *prg_name); + + +/* Logging mechanism + */ +extern const gchar *g_log_domain_glib; +guint g_log_set_handler (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data); +void g_log_remove_handler (const gchar *log_domain, + guint handler_id); +void g_log_default_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); +void g_log (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + ...) G_GNUC_PRINTF (3, 4); +void g_logv (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + va_list args); +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, + GLogLevelFlags fatal_mask); +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); +#ifndef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((gchar*) 0) +#endif /* G_LOG_DOMAIN */ +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define g_error(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + __VA_ARGS__) +#define g_message(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + __VA_ARGS__) +#define g_critical(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + __VA_ARGS__) +#define g_warning(...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + __VA_ARGS__) +#elif defined (__GNUC__) +#define g_error(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_ERROR, \ + format) +#define g_message(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_MESSAGE, \ + format) +#define g_critical(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_CRITICAL, \ + format) +#define g_warning(format...) g_log (G_LOG_DOMAIN, \ + G_LOG_LEVEL_WARNING, \ + format) +#else /* !__GNUC__ */ +static void +g_error (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); + va_end (args); +} +static void +g_message (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args); + va_end (args); +} +static void +g_warning (const gchar *format, + ...) +{ + va_list args; + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args); + va_end (args); +} +#endif /* !__GNUC__ */ + +typedef void (*GPrintFunc) (const gchar *string); +void g_print (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GPrintFunc g_set_print_handler (GPrintFunc func); +void g_printerr (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +GPrintFunc g_set_printerr_handler (GPrintFunc func); + +/* deprecated compatibility functions, use g_log_set_handler() instead */ +typedef void (*GErrorFunc) (const gchar *str); +typedef void (*GWarningFunc) (const gchar *str); +GErrorFunc g_set_error_handler (GErrorFunc func); +GWarningFunc g_set_warning_handler (GWarningFunc func); +GPrintFunc g_set_message_handler (GPrintFunc func); + + +/* Memory allocation and debugging + */ +#ifdef USE_DMALLOC + +#define g_malloc(size) ((gpointer) MALLOC (size)) +#define g_malloc0(size) ((gpointer) CALLOC (char, size)) +#define g_realloc(mem,size) ((gpointer) REALLOC (mem, char, size)) +#define g_free(mem) FREE (mem) + +#else /* !USE_DMALLOC */ + +gpointer g_malloc (gulong size); +gpointer g_malloc0 (gulong size); +gpointer g_realloc (gpointer mem, + gulong size); +void g_free (gpointer mem); + +#endif /* !USE_DMALLOC */ + +void g_mem_profile (void); +void g_mem_check (gpointer mem); + +/* Generic allocators + */ +GAllocator* g_allocator_new (const gchar *name, + guint n_preallocs); +void g_allocator_free (GAllocator *allocator); + +#define G_ALLOCATOR_LIST (1) +#define G_ALLOCATOR_SLIST (2) +#define G_ALLOCATOR_NODE (3) + + +/* "g_mem_chunk_new" creates a new memory chunk. + * Memory chunks are used to allocate pieces of memory which are + * always the same size. Lists are a good example of such a data type. + * The memory chunk allocates and frees blocks of memory as needed. + * Just be sure to call "g_mem_chunk_free" and not "g_free" on data + * allocated in a mem chunk. ("g_free" will most likely cause a seg + * fault...somewhere). + * + * Oh yeah, GMemChunk is an opaque data type. (You don't really + * want to know what's going on inside do you?) + */ + +/* ALLOC_ONLY MemChunk's can only allocate memory. The free operation + * is interpreted as a no op. ALLOC_ONLY MemChunk's save 4 bytes per + * atom. (They are also useful for lists which use MemChunk to allocate + * memory but are also part of the MemChunk implementation). + * ALLOC_AND_FREE MemChunk's can allocate and free memory. + */ + +#define G_ALLOC_ONLY 1 +#define G_ALLOC_AND_FREE 2 + +GMemChunk* g_mem_chunk_new (gchar *name, + gint atom_size, + gulong area_size, + gint type); +void g_mem_chunk_destroy (GMemChunk *mem_chunk); +gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); +gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); +void g_mem_chunk_free (GMemChunk *mem_chunk, + gpointer mem); +void g_mem_chunk_clean (GMemChunk *mem_chunk); +void g_mem_chunk_reset (GMemChunk *mem_chunk); +void g_mem_chunk_print (GMemChunk *mem_chunk); +void g_mem_chunk_info (void); + +/* Ah yes...we have a "g_blow_chunks" function. + * "g_blow_chunks" simply compresses all the chunks. This operation + * consists of freeing every memory area that should be freed (but + * which we haven't gotten around to doing yet). And, no, + * "g_blow_chunks" doesn't follow the naming scheme, but it is a + * much better name than "g_mem_chunk_clean_all" or something + * similar. + */ +void g_blow_chunks (void); + + +/* Timer + */ +GTimer* g_timer_new (void); +void g_timer_destroy (GTimer *timer); +void g_timer_start (GTimer *timer); +void g_timer_stop (GTimer *timer); +void g_timer_reset (GTimer *timer); +gdouble g_timer_elapsed (GTimer *timer, + gulong *microseconds); + + +/* String utility functions that modify a string argument or + * return a constant string that must not be freed. + */ +#define G_STR_DELIMITERS "_-|> <." +gchar* g_strdelimit (gchar *string, + const gchar *delimiters, + gchar new_delimiter); +gdouble g_strtod (const gchar *nptr, + gchar **endptr); +gchar* g_strerror (gint errnum); +gchar* g_strsignal (gint signum); +gint g_strcasecmp (const gchar *s1, + const gchar *s2); +gint g_strncasecmp (const gchar *s1, + const gchar *s2, + guint n); +void g_strdown (gchar *string); +void g_strup (gchar *string); +void g_strreverse (gchar *string); +/* removes leading spaces */ +gchar* g_strchug (gchar *string); +/* removes trailing spaces */ +gchar* g_strchomp (gchar *string); +/* removes leading & trailing spaces */ +#define g_strstrip( string ) g_strchomp (g_strchug (string)) + +/* String utility functions that return a newly allocated string which + * ought to be freed from the caller at some point. + */ +gchar* g_strdup (const gchar *str); +gchar* g_strdup_printf (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +gchar* g_strdup_vprintf (const gchar *format, + va_list args); +gchar* g_strndup (const gchar *str, + guint n); +gchar* g_strnfill (guint length, + gchar fill_char); +gchar* g_strconcat (const gchar *string1, + ...); /* NULL terminated */ +gchar* g_strjoin (const gchar *separator, + ...); /* NULL terminated */ +gchar* g_strescape (gchar *string); +gpointer g_memdup (gconstpointer mem, + guint byte_size); + +/* NULL terminated string arrays. + * g_strsplit() splits up string into max_tokens tokens at delim and + * returns a newly allocated string array. + * g_strjoinv() concatenates all of str_array's strings, sliding in an + * optional separator, the returned string is newly allocated. + * g_strfreev() frees the array itself and all of its strings. + */ +gchar** g_strsplit (const gchar *string, + const gchar *delimiter, + gint max_tokens); +gchar* g_strjoinv (const gchar *separator, + gchar **str_array); +void g_strfreev (gchar **str_array); + + + +/* calculate a string size, guarranteed to fit format + args. + */ +guint g_printf_string_upper_bound (const gchar* format, + va_list args); + + +/* Retrive static string info + */ +gchar* g_get_user_name (void); +gchar* g_get_real_name (void); +gchar* g_get_home_dir (void); +gchar* g_get_tmp_dir (void); +gchar* g_get_prgname (void); +void g_set_prgname (const gchar *prgname); + + +/* Miscellaneous utility functions + */ +guint g_parse_debug_string (const gchar *string, + GDebugKey *keys, + guint nkeys); +gint g_snprintf (gchar *string, + gulong n, + gchar const *format, + ...) G_GNUC_PRINTF (3, 4); +gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, + va_list args); +gchar* g_basename (const gchar *file_name); +/* Check if a file name is an absolute path */ +gboolean g_path_is_absolute (const gchar *file_name); +/* In case of absolute paths, skip the root part */ +gchar* g_path_skip_root (gchar *file_name); + +/* strings are newly allocated with g_malloc() */ +gchar* g_dirname (const gchar *file_name); +gchar* g_get_current_dir (void); + +/* return the environment string for the variable. The returned memory + * must not be freed. */ +gchar* g_getenv (const gchar *variable); + + +/* we use a GLib function as a replacement for ATEXIT, so + * the programmer is not required to check the return value + * (if there is any in the implementation) and doesn't encounter + * missing include files. + */ +void g_atexit (GVoidFunc func); + + +/* Bit tests + */ +G_INLINE_FUNC gint g_bit_nth_lsf (guint32 mask, + gint nth_bit); +#ifdef G_CAN_INLINE +G_INLINE_FUNC gint +g_bit_nth_lsf (guint32 mask, + gint nth_bit) +{ + do + { + nth_bit++; + if (mask & (1 << (guint) nth_bit)) + return nth_bit; + } + while (nth_bit < 32); + return -1; +} +#endif /* G_CAN_INLINE */ + +G_INLINE_FUNC gint g_bit_nth_msf (guint32 mask, + gint nth_bit); +#ifdef G_CAN_INLINE +G_INLINE_FUNC gint +g_bit_nth_msf (guint32 mask, + gint nth_bit) +{ + if (nth_bit < 0) + nth_bit = 32; + do + { + nth_bit--; + if (mask & (1 << (guint) nth_bit)) + return nth_bit; + } + while (nth_bit > 0); + return -1; +} +#endif /* G_CAN_INLINE */ + +G_INLINE_FUNC guint g_bit_storage (guint number); +#ifdef G_CAN_INLINE +G_INLINE_FUNC guint +g_bit_storage (guint number) +{ + register guint n_bits = 0; + + do + { + n_bits++; + number >>= 1; + } + while (number); + return n_bits; +} +#endif /* G_CAN_INLINE */ + +/* String Chunks + */ +GStringChunk* g_string_chunk_new (gint size); +void g_string_chunk_free (GStringChunk *chunk); +gchar* g_string_chunk_insert (GStringChunk *chunk, + const gchar *string); +gchar* g_string_chunk_insert_const (GStringChunk *chunk, + const gchar *string); + + +/* Strings + */ +GString* g_string_new (const gchar *init); +GString* g_string_sized_new (guint dfl_size); +void g_string_free (GString *string, + gint free_segment); +GString* g_string_assign (GString *lval, + const gchar *rval); +GString* g_string_truncate (GString *string, + gint len); +GString* g_string_append (GString *string, + const gchar *val); +GString* g_string_append_c (GString *string, + gchar c); +GString* g_string_prepend (GString *string, + const gchar *val); +GString* g_string_prepend_c (GString *string, + gchar c); +GString* g_string_insert (GString *string, + gint pos, + const gchar *val); +GString* g_string_insert_c (GString *string, + gint pos, + gchar c); +GString* g_string_erase (GString *string, + gint pos, + gint len); +GString* g_string_down (GString *string); +GString* g_string_up (GString *string); +void g_string_sprintf (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); +void g_string_sprintfa (GString *string, + const gchar *format, + ...) G_GNUC_PRINTF (2, 3); + + +/* Resizable arrays, remove fills any cleared spot and shortens the + * array, while preserving the order. remove_fast will distort the + * order by moving the last element to the position of the removed + */ + +#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1) +#define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1) +#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) +#define g_array_index(a,t,i) (((t*) (a)->data) [(i)]) + +GArray* g_array_new (gboolean zero_terminated, + gboolean clear, + guint element_size); +void g_array_free (GArray *array, + gboolean free_segment); +GArray* g_array_append_vals (GArray *array, + gconstpointer data, + guint len); +GArray* g_array_prepend_vals (GArray *array, + gconstpointer data, + guint len); +GArray* g_array_insert_vals (GArray *array, + guint index, + gconstpointer data, + guint len); +GArray* g_array_set_size (GArray *array, + guint length); +GArray* g_array_remove_index (GArray *array, + guint index); +GArray* g_array_remove_index_fast (GArray *array, + guint index); + +/* Resizable pointer array. This interface is much less complicated + * than the above. Add appends appends a pointer. Remove fills any + * cleared spot and shortens the array. remove_fast will again distort + * order. + */ +#define g_ptr_array_index(array,index) (array->pdata)[index] +GPtrArray* g_ptr_array_new (void); +void g_ptr_array_free (GPtrArray *array, + gboolean free_seg); +void g_ptr_array_set_size (GPtrArray *array, + gint length); +gpointer g_ptr_array_remove_index (GPtrArray *array, + guint index); +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, + guint index); +gboolean g_ptr_array_remove (GPtrArray *array, + gpointer data); +gboolean g_ptr_array_remove_fast (GPtrArray *array, + gpointer data); +void g_ptr_array_add (GPtrArray *array, + gpointer data); + +/* Byte arrays, an array of guint8. Implemented as a GArray, + * but type-safe. + */ + +GByteArray* g_byte_array_new (void); +void g_byte_array_free (GByteArray *array, + gboolean free_segment); +GByteArray* g_byte_array_append (GByteArray *array, + const guint8 *data, + guint len); +GByteArray* g_byte_array_prepend (GByteArray *array, + const guint8 *data, + guint len); +GByteArray* g_byte_array_set_size (GByteArray *array, + guint length); +GByteArray* g_byte_array_remove_index (GByteArray *array, + guint index); +GByteArray* g_byte_array_remove_index_fast (GByteArray *array, + guint index); + + +/* Hash Functions + */ +gint g_str_equal (gconstpointer v, + gconstpointer v2); +guint g_str_hash (gconstpointer v); + +gint g_int_equal (gconstpointer v, + gconstpointer v2); +guint g_int_hash (gconstpointer v); + +/* This "hash" function will just return the key's adress as an + * unsigned integer. Useful for hashing on plain adresses or + * simple integer values. + * passing NULL into g_hash_table_new() as GHashFunc has the + * same effect as passing g_direct_hash(). + */ +guint g_direct_hash (gconstpointer v); +gint g_direct_equal (gconstpointer v, + gconstpointer v2); + + +/* Quarks (string<->id association) + */ +GQuark g_quark_try_string (const gchar *string); +GQuark g_quark_from_static_string (const gchar *string); +GQuark g_quark_from_string (const gchar *string); +gchar* g_quark_to_string (GQuark quark); + + +/* Keyed Data List + * NOTE: these functions are scheduled for a rename in GLib 1.3 + */ +void g_datalist_init (GData **datalist); +void g_datalist_clear (GData **datalist); +gpointer g_datalist_id_get_data (GData **datalist, + GQuark key_id); +void g_datalist_id_set_data_full (GData **datalist, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +void g_datalist_id_remove_no_notify (GData **datalist, + GQuark key_id); +void g_datalist_foreach (GData **datalist, + GDataForeachFunc func, + gpointer user_data); +#define g_datalist_id_set_data(dl, q, d) \ + g_datalist_id_set_data_full ((dl), (q), (d), NULL) +#define g_datalist_id_remove_data(dl, q) \ + g_datalist_id_set_data ((dl), (q), NULL) +#define g_datalist_get_data(dl, k) \ + (g_datalist_id_get_data ((dl), g_quark_try_string (k))) +#define g_datalist_set_data_full(dl, k, d, f) \ + g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f)) +#define g_datalist_remove_no_notify(dl, k) \ + g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k)) +#define g_datalist_set_data(dl, k, d) \ + g_datalist_set_data_full ((dl), (k), (d), NULL) +#define g_datalist_remove_data(dl, k) \ + g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL) + + +/* Location Associated Keyed Data + * NOTE: these functions are scheduled for a rename in GLib 1.3 + */ +void g_dataset_destroy (gconstpointer dataset_location); +gpointer g_dataset_id_get_data (gconstpointer dataset_location, + GQuark key_id); +void g_dataset_id_set_data_full (gconstpointer dataset_location, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +void g_dataset_id_remove_no_notify (gconstpointer dataset_location, + GQuark key_id); +void g_dataset_foreach (gconstpointer dataset_location, + GDataForeachFunc func, + gpointer user_data); +#define g_dataset_id_set_data(l, k, d) \ + g_dataset_id_set_data_full ((l), (k), (d), NULL) +#define g_dataset_id_remove_data(l, k) \ + g_dataset_id_set_data ((l), (k), NULL) +#define g_dataset_get_data(l, k) \ + (g_dataset_id_get_data ((l), g_quark_try_string (k))) +#define g_dataset_set_data_full(l, k, d, f) \ + g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f)) +#define g_dataset_remove_no_notify(l, k) \ + g_dataset_id_remove_no_notify ((l), g_quark_try_string (k)) +#define g_dataset_set_data(l, k, d) \ + g_dataset_set_data_full ((l), (k), (d), NULL) +#define g_dataset_remove_data(l, k) \ + g_dataset_id_set_data ((l), g_quark_try_string (k), NULL) + + +/* GScanner: Flexible lexical scanner for general purpose. + */ + +/* Character sets */ +#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz" +#define G_CSET_LATINC "\300\301\302\303\304\305\306"\ + "\307\310\311\312\313\314\315\316\317\320"\ + "\321\322\323\324\325\326"\ + "\330\331\332\333\334\335\336" +#define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\ + "\347\350\351\352\353\354\355\356\357\360"\ + "\361\362\363\364\365\366"\ + "\370\371\372\373\374\375\376\377" + +/* Error types */ +typedef enum +{ + G_ERR_UNKNOWN, + G_ERR_UNEXP_EOF, + G_ERR_UNEXP_EOF_IN_STRING, + G_ERR_UNEXP_EOF_IN_COMMENT, + G_ERR_NON_DIGIT_IN_CONST, + G_ERR_DIGIT_RADIX, + G_ERR_FLOAT_RADIX, + G_ERR_FLOAT_MALFORMED +} GErrorType; + +/* Token types */ +typedef enum +{ + G_TOKEN_EOF = 0, + + G_TOKEN_LEFT_PAREN = '(', + G_TOKEN_RIGHT_PAREN = ')', + G_TOKEN_LEFT_CURLY = '{', + G_TOKEN_RIGHT_CURLY = '}', + G_TOKEN_LEFT_BRACE = '[', + G_TOKEN_RIGHT_BRACE = ']', + G_TOKEN_EQUAL_SIGN = '=', + G_TOKEN_COMMA = ',', + + G_TOKEN_NONE = 256, + + G_TOKEN_ERROR, + + G_TOKEN_CHAR, + G_TOKEN_BINARY, + G_TOKEN_OCTAL, + G_TOKEN_INT, + G_TOKEN_HEX, + G_TOKEN_FLOAT, + G_TOKEN_STRING, + + G_TOKEN_SYMBOL, + G_TOKEN_IDENTIFIER, + G_TOKEN_IDENTIFIER_NULL, + + G_TOKEN_COMMENT_SINGLE, + G_TOKEN_COMMENT_MULTI, + G_TOKEN_LAST +} GTokenType; + +union _GTokenValue +{ + gpointer v_symbol; + gchar *v_identifier; + gulong v_binary; + gulong v_octal; + gulong v_int; + gdouble v_float; + gulong v_hex; + gchar *v_string; + gchar *v_comment; + guchar v_char; + guint v_error; +}; + +struct _GScannerConfig +{ + /* Character sets + */ + gchar *cset_skip_characters; /* default: " \t\n" */ + gchar *cset_identifier_first; + gchar *cset_identifier_nth; + gchar *cpair_comment_single; /* default: "#\n" */ + + /* Should symbol lookup work case sensitive? + */ + guint case_sensitive : 1; + + /* Boolean values to be adjusted "on the fly" + * to configure scanning behaviour. + */ + guint skip_comment_multi : 1; /* C like comment */ + guint skip_comment_single : 1; /* single line comment */ + guint scan_comment_multi : 1; /* scan multi line comments? */ + guint scan_identifier : 1; + guint scan_identifier_1char : 1; + guint scan_identifier_NULL : 1; + guint scan_symbols : 1; + guint scan_binary : 1; + guint scan_octal : 1; + guint scan_float : 1; + guint scan_hex : 1; /* `0x0ff0' */ + guint scan_hex_dollar : 1; /* `$0ff0' */ + guint scan_string_sq : 1; /* string: 'anything' */ + guint scan_string_dq : 1; /* string: "\\-escapes!\n" */ + guint numbers_2_int : 1; /* bin, octal, hex => int */ + guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */ + guint identifier_2_string : 1; + guint char_2_token : 1; /* return G_TOKEN_CHAR? */ + guint symbol_2_token : 1; + guint scope_0_fallback : 1; /* try scope 0 on lookups? */ +}; + +struct _GScanner +{ + /* unused fields */ + gpointer user_data; + guint max_parse_errors; + + /* g_scanner_error() increments this field */ + guint parse_errors; + + /* name of input stream, featured by the default message handler */ + const gchar *input_name; + + /* data pointer for derived structures */ + gpointer derived_data; + + /* link into the scanner configuration */ + GScannerConfig *config; + + /* fields filled in after g_scanner_get_next_token() */ + GTokenType token; + GTokenValue value; + guint line; + guint position; + + /* fields filled in after g_scanner_peek_next_token() */ + GTokenType next_token; + GTokenValue next_value; + guint next_line; + guint next_position; + + /* to be considered private */ + GHashTable *symbol_table; + gint input_fd; + const gchar *text; + const gchar *text_end; + gchar *buffer; + guint scope_id; + + /* handler function for _warn and _error */ + GScannerMsgFunc msg_handler; +}; + +GScanner* g_scanner_new (GScannerConfig *config_templ); +void g_scanner_destroy (GScanner *scanner); +void g_scanner_input_file (GScanner *scanner, + gint input_fd); +void g_scanner_sync_file_offset (GScanner *scanner); +void g_scanner_input_text (GScanner *scanner, + const gchar *text, + guint text_len); +GTokenType g_scanner_get_next_token (GScanner *scanner); +GTokenType g_scanner_peek_next_token (GScanner *scanner); +GTokenType g_scanner_cur_token (GScanner *scanner); +GTokenValue g_scanner_cur_value (GScanner *scanner); +guint g_scanner_cur_line (GScanner *scanner); +guint g_scanner_cur_position (GScanner *scanner); +gboolean g_scanner_eof (GScanner *scanner); +guint g_scanner_set_scope (GScanner *scanner, + guint scope_id); +void g_scanner_scope_add_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol, + gpointer value); +void g_scanner_scope_remove_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +void g_scanner_scope_foreach_symbol (GScanner *scanner, + guint scope_id, + GHFunc func, + gpointer user_data); +gpointer g_scanner_lookup_symbol (GScanner *scanner, + const gchar *symbol); +void g_scanner_freeze_symbol_table (GScanner *scanner); +void g_scanner_thaw_symbol_table (GScanner *scanner); +void g_scanner_unexp_token (GScanner *scanner, + GTokenType expected_token, + const gchar *identifier_spec, + const gchar *symbol_spec, + const gchar *symbol_name, + const gchar *message, + gint is_error); +void g_scanner_error (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); +void g_scanner_warn (GScanner *scanner, + const gchar *format, + ...) G_GNUC_PRINTF (2,3); +gint g_scanner_stat_mode (const gchar *filename); +/* keep downward source compatibility */ +#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ + g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ +} G_STMT_END +#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ + g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ +} G_STMT_END +#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ + g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ +} G_STMT_END + + +/* GCompletion + */ + +struct _GCompletion +{ + GList* items; + GCompletionFunc func; + + gchar* prefix; + GList* cache; +}; + +GCompletion* g_completion_new (GCompletionFunc func); +void g_completion_add_items (GCompletion* cmp, + GList* items); +void g_completion_remove_items (GCompletion* cmp, + GList* items); +void g_completion_clear_items (GCompletion* cmp); +GList* g_completion_complete (GCompletion* cmp, + gchar* prefix, + gchar** new_prefix); +void g_completion_free (GCompletion* cmp); + + +/* GDate + * + * Date calculations (not time for now, to be resolved). These are a + * mutant combination of Steffen Beyer's DateCalc routines + * (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's + * date routines (written for in-house software). Written by Havoc + * Pennington <hp@pobox.com> + */ + +typedef guint16 GDateYear; +typedef guint8 GDateDay; /* day of the month */ +typedef struct _GDate GDate; +/* make struct tm known without having to include time.h */ +struct tm; + +/* enum used to specify order of appearance in parsed date strings */ +typedef enum +{ + G_DATE_DAY = 0, + G_DATE_MONTH = 1, + G_DATE_YEAR = 2 +} GDateDMY; + +/* actual week and month values */ +typedef enum +{ + G_DATE_BAD_WEEKDAY = 0, + G_DATE_MONDAY = 1, + G_DATE_TUESDAY = 2, + G_DATE_WEDNESDAY = 3, + G_DATE_THURSDAY = 4, + G_DATE_FRIDAY = 5, + G_DATE_SATURDAY = 6, + G_DATE_SUNDAY = 7 +} GDateWeekday; +typedef enum +{ + G_DATE_BAD_MONTH = 0, + G_DATE_JANUARY = 1, + G_DATE_FEBRUARY = 2, + G_DATE_MARCH = 3, + G_DATE_APRIL = 4, + G_DATE_MAY = 5, + G_DATE_JUNE = 6, + G_DATE_JULY = 7, + G_DATE_AUGUST = 8, + G_DATE_SEPTEMBER = 9, + G_DATE_OCTOBER = 10, + G_DATE_NOVEMBER = 11, + G_DATE_DECEMBER = 12 +} GDateMonth; + +#define G_DATE_BAD_JULIAN 0U +#define G_DATE_BAD_DAY 0U +#define G_DATE_BAD_YEAR 0U + +/* Note: directly manipulating structs is generally a bad idea, but + * in this case it's an *incredibly* bad idea, because all or part + * of this struct can be invalid at any given time. Use the functions, + * or you will get hosed, I promise. + */ +struct _GDate +{ + guint julian_days : 32; /* julian days representation - we use a + * bitfield hoping that 64 bit platforms + * will pack this whole struct in one big + * int + */ + + guint julian : 1; /* julian is valid */ + guint dmy : 1; /* dmy is valid */ + + /* DMY representation */ + guint day : 6; + guint month : 4; + guint year : 16; +}; + +/* g_date_new() returns an invalid date, you then have to _set() stuff + * to get a usable object. You can also allocate a GDate statically, + * then call g_date_clear() to initialize. + */ +GDate* g_date_new (void); +GDate* g_date_new_dmy (GDateDay day, + GDateMonth month, + GDateYear year); +GDate* g_date_new_julian (guint32 julian_day); +void g_date_free (GDate *date); + +/* check g_date_valid() after doing an operation that might fail, like + * _parse. Almost all g_date operations are undefined on invalid + * dates (the exceptions are the mutators, since you need those to + * return to validity). + */ +gboolean g_date_valid (GDate *date); +gboolean g_date_valid_day (GDateDay day); +gboolean g_date_valid_month (GDateMonth month); +gboolean g_date_valid_year (GDateYear year); +gboolean g_date_valid_weekday (GDateWeekday weekday); +gboolean g_date_valid_julian (guint32 julian_date); +gboolean g_date_valid_dmy (GDateDay day, + GDateMonth month, + GDateYear year); + +GDateWeekday g_date_weekday (GDate *date); +GDateMonth g_date_month (GDate *date); +GDateYear g_date_year (GDate *date); +GDateDay g_date_day (GDate *date); +guint32 g_date_julian (GDate *date); +guint g_date_day_of_year (GDate *date); + +/* First monday/sunday is the start of week 1; if we haven't reached + * that day, return 0. These are not ISO weeks of the year; that + * routine needs to be added. + * these functions return the number of weeks, starting on the + * corrsponding day + */ +guint g_date_monday_week_of_year (GDate *date); +guint g_date_sunday_week_of_year (GDate *date); + +/* If you create a static date struct you need to clear it to get it + * in a sane state before use. You can clear a whole array at + * once with the ndates argument. + */ +void g_date_clear (GDate *date, + guint n_dates); + +/* The parse routine is meant for dates typed in by a user, so it + * permits many formats but tries to catch common typos. If your data + * needs to be strictly validated, it is not an appropriate function. + */ +void g_date_set_parse (GDate *date, + const gchar *str); +void g_date_set_time (GDate *date, + GTime time); +void g_date_set_month (GDate *date, + GDateMonth month); +void g_date_set_day (GDate *date, + GDateDay day); +void g_date_set_year (GDate *date, + GDateYear year); +void g_date_set_dmy (GDate *date, + GDateDay day, + GDateMonth month, + GDateYear y); +void g_date_set_julian (GDate *date, + guint32 julian_date); +gboolean g_date_is_first_of_month (GDate *date); +gboolean g_date_is_last_of_month (GDate *date); + +/* To go forward by some number of weeks just go forward weeks*7 days */ +void g_date_add_days (GDate *date, + guint n_days); +void g_date_subtract_days (GDate *date, + guint n_days); + +/* If you add/sub months while day > 28, the day might change */ +void g_date_add_months (GDate *date, + guint n_months); +void g_date_subtract_months (GDate *date, + guint n_months); + +/* If it's feb 29, changing years can move you to the 28th */ +void g_date_add_years (GDate *date, + guint n_years); +void g_date_subtract_years (GDate *date, + guint n_years); +gboolean g_date_is_leap_year (GDateYear year); +guint8 g_date_days_in_month (GDateMonth month, + GDateYear year); +guint8 g_date_monday_weeks_in_year (GDateYear year); +guint8 g_date_sunday_weeks_in_year (GDateYear year); + +/* qsort-friendly (with a cast...) */ +gint g_date_compare (GDate *lhs, + GDate *rhs); +void g_date_to_struct_tm (GDate *date, + struct tm *tm); + +/* Just like strftime() except you can only use date-related formats. + * Using a time format is undefined. + */ +gsize g_date_strftime (gchar *s, + gsize slen, + const gchar *format, + GDate *date); + + +/* GRelation + * + * Indexed Relations. Imagine a really simple table in a + * database. Relations are not ordered. This data type is meant for + * maintaining a N-way mapping. + * + * g_relation_new() creates a relation with FIELDS fields + * + * g_relation_destroy() frees all resources + * g_tuples_destroy() frees the result of g_relation_select() + * + * g_relation_index() indexes relation FIELD with the provided + * equality and hash functions. this must be done before any + * calls to insert are made. + * + * g_relation_insert() inserts a new tuple. you are expected to + * provide the right number of fields. + * + * g_relation_delete() deletes all relations with KEY in FIELD + * g_relation_select() returns ... + * g_relation_count() counts ... + */ + +GRelation* g_relation_new (gint fields); +void g_relation_destroy (GRelation *relation); +void g_relation_index (GRelation *relation, + gint field, + GHashFunc hash_func, + GCompareFunc key_compare_func); +void g_relation_insert (GRelation *relation, + ...); +gint g_relation_delete (GRelation *relation, + gconstpointer key, + gint field); +GTuples* g_relation_select (GRelation *relation, + gconstpointer key, + gint field); +gint g_relation_count (GRelation *relation, + gconstpointer key, + gint field); +gboolean g_relation_exists (GRelation *relation, + ...); +void g_relation_print (GRelation *relation); + +void g_tuples_destroy (GTuples *tuples); +gpointer g_tuples_index (GTuples *tuples, + gint index, + gint field); + + +/* Prime numbers. + */ + +/* This function returns prime numbers spaced by approximately 1.5-2.0 + * and is for use in resizing data structures which prefer + * prime-valued sizes. The closest spaced prime function returns the + * next largest prime, or the highest it knows about which is about + * MAXINT/4. + */ +guint g_spaced_primes_closest (guint num); + + +/* GIOChannel + */ + +typedef struct _GIOFuncs GIOFuncs; +typedef enum +{ + G_IO_ERROR_NONE, + G_IO_ERROR_AGAIN, + G_IO_ERROR_INVAL, + G_IO_ERROR_UNKNOWN +} GIOError; +typedef enum +{ + G_SEEK_CUR, + G_SEEK_SET, + G_SEEK_END +} GSeekType; +typedef enum +{ + G_IO_IN GLIB_SYSDEF_POLLIN, + G_IO_OUT GLIB_SYSDEF_POLLOUT, + G_IO_PRI GLIB_SYSDEF_POLLPRI, + G_IO_ERR GLIB_SYSDEF_POLLERR, + G_IO_HUP GLIB_SYSDEF_POLLHUP, + G_IO_NVAL GLIB_SYSDEF_POLLNVAL +} GIOCondition; + +struct _GIOChannel +{ + guint channel_flags; + guint ref_count; + GIOFuncs *funcs; +}; + +typedef gboolean (*GIOFunc) (GIOChannel *source, + GIOCondition condition, + gpointer data); +struct _GIOFuncs +{ + GIOError (*io_read) (GIOChannel *channel, + gchar *buf, + guint count, + guint *bytes_read); + GIOError (*io_write) (GIOChannel *channel, + gchar *buf, + guint count, + guint *bytes_written); + GIOError (*io_seek) (GIOChannel *channel, + gint offset, + GSeekType type); + void (*io_close) (GIOChannel *channel); + guint (*io_add_watch) (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, + GDestroyNotify notify); + void (*io_free) (GIOChannel *channel); +}; + +void g_io_channel_init (GIOChannel *channel); +void g_io_channel_ref (GIOChannel *channel); +void g_io_channel_unref (GIOChannel *channel); +GIOError g_io_channel_read (GIOChannel *channel, + gchar *buf, + guint count, + guint *bytes_read); +GIOError g_io_channel_write (GIOChannel *channel, + gchar *buf, + guint count, + guint *bytes_written); +GIOError g_io_channel_seek (GIOChannel *channel, + gint offset, + GSeekType type); +void g_io_channel_close (GIOChannel *channel); +guint g_io_add_watch_full (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, + GDestroyNotify notify); +guint g_io_add_watch (GIOChannel *channel, + GIOCondition condition, + GIOFunc func, + gpointer user_data); + + +/* Main loop + */ +typedef struct _GTimeVal GTimeVal; +typedef struct _GSourceFuncs GSourceFuncs; +typedef struct _GMainLoop GMainLoop; /* Opaque */ + +struct _GTimeVal +{ + glong tv_sec; + glong tv_usec; +}; +struct _GSourceFuncs +{ + gboolean (*prepare) (gpointer source_data, + GTimeVal *current_time, + gint *timeout, + gpointer user_data); + gboolean (*check) (gpointer source_data, + GTimeVal *current_time, + gpointer user_data); + gboolean (*dispatch) (gpointer source_data, + GTimeVal *dispatch_time, + gpointer user_data); + GDestroyNotify destroy; +}; + +/* Standard priorities */ + +#define G_PRIORITY_HIGH -100 +#define G_PRIORITY_DEFAULT 0 +#define G_PRIORITY_HIGH_IDLE 100 +#define G_PRIORITY_DEFAULT_IDLE 200 +#define G_PRIORITY_LOW 300 + +typedef gboolean (*GSourceFunc) (gpointer data); + +/* Hooks for adding to the main loop */ +guint g_source_add (gint priority, + gboolean can_recurse, + GSourceFuncs *funcs, + gpointer source_data, + gpointer user_data, + GDestroyNotify notify); +gboolean g_source_remove (guint tag); +gboolean g_source_remove_by_user_data (gpointer user_data); +gboolean g_source_remove_by_source_data (gpointer source_data); +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + +void g_get_current_time (GTimeVal *result); + +/* Running the main loop */ +GMainLoop* g_main_new (gboolean is_running); +void g_main_run (GMainLoop *loop); +void g_main_quit (GMainLoop *loop); +void g_main_destroy (GMainLoop *loop); +gboolean g_main_is_running (GMainLoop *loop); + +/* Run a single iteration of the mainloop. If block is FALSE, + * will never block + */ +gboolean g_main_iteration (gboolean may_block); + +/* See if any events are pending */ +gboolean g_main_pending (void); + +/* Idles and timeouts */ +guint g_timeout_add_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +guint g_timeout_add (guint interval, + GSourceFunc function, + gpointer data); +guint g_idle_add (GSourceFunc function, + gpointer data); +guint g_idle_add_full (gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify destroy); +gboolean g_idle_remove_by_data (gpointer data); + +/* GPollFD + * + * System-specific IO and main loop calls + * + * On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file + * descriptor as provided by the C runtime) that can be used by + * MsgWaitForMultipleObjects. This does *not* include file handles + * from CreateFile, SOCKETs, nor pipe handles. (But you can use + * WSAEventSelect to signal events when a SOCKET is readable). + * + * On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to + * indicate polling for messages. These message queue GPollFDs should + * be added with the g_main_poll_win32_msg_add function. + * + * But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK + * (GTK) programs, as GDK itself wants to read messages and convert them + * to GDK events. + * + * So, unless you really know what you are doing, it's best not to try + * to use the main loop polling stuff for your own needs on + * Win32. It's really only written for the GIMP's needs so + * far. + */ + +typedef struct _GPollFD GPollFD; +typedef gint (*GPollFunc) (GPollFD *ufds, + guint nfsd, + gint timeout); +struct _GPollFD +{ + gint fd; + gushort events; + gushort revents; +}; + +void g_main_add_poll (GPollFD *fd, + gint priority); +void g_main_remove_poll (GPollFD *fd); +void g_main_set_poll_func (GPollFunc func); + +/* On Unix, IO channels created with this function for any file + * descriptor or socket. + * + * On Win32, use this only for plain files opened with the MSVCRT (the + * Microsoft run-time C library) _open(), including file descriptors + * 0, 1 and 2 (corresponding to stdin, stdout and stderr). + * Actually, don't do even that, this code isn't done yet. + * + * The term file descriptor as used in the context of Win32 refers to + * the emulated Unix-like file descriptors MSVCRT provides. + */ +GIOChannel* g_io_channel_unix_new (int fd); +gint g_io_channel_unix_get_fd (GIOChannel *channel); + +#ifdef NATIVE_WIN32 + +GUTILS_C_VAR guint g_pipe_readable_msg; + +#define G_WIN32_MSG_HANDLE 19981206 + +/* This is used to add polling for Windows messages. GDK (GTk+) programs + * should *not* use this. (In fact, I can't think of any program that + * would want to use this, but it's here just for completeness's sake. + */ +void g_main_poll_win32_msg_add(gint priority, + GPollFD *fd, + guint hwnd); + +/* An IO channel for Windows messages for window handle hwnd. */ +GIOChannel *g_io_channel_win32_new_messages (guint hwnd); + +/* An IO channel for an anonymous pipe as returned from the MSVCRT + * _pipe(), with no mechanism for the writer to tell the reader when + * there is data in the pipe. + * + * This is not really implemented yet. + */ +GIOChannel *g_io_channel_win32_new_pipe (int fd); + +/* An IO channel for a pipe as returned from the MSVCRT _pipe(), with + * Windows user messages used to signal data in the pipe for the + * reader. + * + * fd is the file descriptor. For the write end, peer is the thread id + * of the reader, and peer_fd is his file descriptor for the read end + * of the pipe. + * + * This is used by the GIMP, and works. + */ +GIOChannel *g_io_channel_win32_new_pipe_with_wakeups (int fd, + guint peer, + int peer_fd); + +void g_io_channel_win32_pipe_request_wakeups (GIOChannel *channel, + guint peer, + int peer_fd); + +void g_io_channel_win32_pipe_readable (int fd, + guint offset); + +/* Get the C runtime file descriptor of a channel. */ +gint g_io_channel_win32_get_fd (GIOChannel *channel); + +/* An IO channel for a SOCK_STREAM winsock socket. The parameter is + * actually a SOCKET. + */ +GIOChannel *g_io_channel_win32_new_stream_socket (int socket); + +#endif + +/* Windows emulation stubs for common Unix functions + */ +#ifdef NATIVE_WIN32 +# define MAXPATHLEN 1024 +# ifdef _MSC_VER +typedef int pid_t; + +/* These POSIXish functions are available in the Microsoft C library + * prefixed with underscore (which of course technically speaking is + * the Right Thing, as they are non-ANSI. Not that being non-ANSI + * prevents Microsoft from practically requiring you to include + * <windows.h> every now and then...). + * + * You still need to include the appropriate headers to get the + * prototypes, <io.h> or <direct.h>. + * + * For some functions, we provide emulators in glib, which are prefixed + * with gwin_. + */ +# define getcwd _getcwd +# define getpid _getpid +# define access _access +# define open _open +# define read _read +# define write _write +# define lseek _lseek +# define close _close +# define pipe(phandles) _pipe (phandles, 4096, _O_BINARY) +# define popen _popen +# define pclose _pclose +# define fdopen _fdopen +# define ftruncate(fd, size) gwin_ftruncate (fd, size) +# define opendir gwin_opendir +# define readdir gwin_readdir +# define rewinddir gwin_rewinddir +# define closedir gwin_closedir +# define NAME_MAX 255 +struct DIR +{ + gchar *dir_name; + gboolean just_opened; + guint find_file_handle; + gpointer find_file_data; +}; +typedef struct DIR DIR; +struct dirent +{ + gchar d_name[NAME_MAX + 1]; +}; +/* emulation functions */ +extern int gwin_ftruncate (gint f, + guint size); +DIR* gwin_opendir (const gchar *dirname); +struct dirent* gwin_readdir (DIR *dir); +void gwin_rewinddir (DIR *dir); +gint gwin_closedir (DIR *dir); +# endif /* _MSC_VER */ +#endif /* NATIVE_WIN32 */ + + +/* GLib Thread support + */ +typedef struct _GMutex GMutex; +typedef struct _GCond GCond; +typedef struct _GPrivate GPrivate; +typedef struct _GStaticPrivate GStaticPrivate; +typedef struct _GThreadFunctions GThreadFunctions; +struct _GThreadFunctions +{ + GMutex* (*mutex_new) (void); + void (*mutex_lock) (GMutex *mutex); + gboolean (*mutex_trylock) (GMutex *mutex); + void (*mutex_unlock) (GMutex *mutex); + void (*mutex_free) (GMutex *mutex); + GCond* (*cond_new) (void); + void (*cond_signal) (GCond *cond); + void (*cond_broadcast) (GCond *cond); + void (*cond_wait) (GCond *cond, + GMutex *mutex); + gboolean (*cond_timed_wait) (GCond *cond, + GMutex *mutex, + GTimeVal *end_time); + void (*cond_free) (GCond *cond); + GPrivate* (*private_new) (GDestroyNotify destructor); + gpointer (*private_get) (GPrivate *private_key); + void (*private_set) (GPrivate *private_key, + gpointer data); +}; + +GUTILS_C_VAR GThreadFunctions g_thread_functions_for_glib_use; +GUTILS_C_VAR gboolean g_thread_use_default_impl; +GUTILS_C_VAR gboolean g_threads_got_initialized; + +/* initializes the mutex/cond/private implementation for glib, might + * only be called once, and must not be called directly or indirectly + * from another glib-function, e.g. as a callback. + */ +void g_thread_init (GThreadFunctions *vtable); + +/* internal function for fallback static mutex implementation */ +GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); + +/* shorthands for conditional and unconditional function calls */ +#define G_THREAD_UF(name, arglist) \ + (*g_thread_functions_for_glib_use . name) arglist +#define G_THREAD_CF(name, fail, arg) \ + (g_thread_supported () ? G_THREAD_UF (name, arg) : (fail)) +/* keep in mind, all those mutexes and static mutexes are not + * recursive in general, don't rely on that + */ +#define g_thread_supported() (g_threads_got_initialized) +#define g_mutex_new() G_THREAD_UF (mutex_new, ()) +#define g_mutex_lock(mutex) G_THREAD_CF (mutex_lock, (void)0, (mutex)) +#define g_mutex_trylock(mutex) G_THREAD_CF (mutex_trylock, TRUE, (mutex)) +#define g_mutex_unlock(mutex) G_THREAD_CF (mutex_unlock, (void)0, (mutex)) +#define g_mutex_free(mutex) G_THREAD_CF (mutex_free, (void)0, (mutex)) +#define g_cond_new() G_THREAD_UF (cond_new, ()) +#define g_cond_signal(cond) G_THREAD_CF (cond_signal, (void)0, (cond)) +#define g_cond_broadcast(cond) G_THREAD_CF (cond_broadcast, (void)0, (cond)) +#define g_cond_wait(cond, mutex) G_THREAD_CF (cond_wait, (void)0, (cond, \ + mutex)) +#define g_cond_free(cond) G_THREAD_CF (cond_free, (void)0, (cond)) +#define g_cond_timed_wait(cond, mutex, abs_time) G_THREAD_CF (cond_timed_wait, \ + TRUE, \ + (cond, mutex, \ + abs_time)) +#define g_private_new(destructor) G_THREAD_UF (private_new, (destructor)) +#define g_private_get(private_key) G_THREAD_CF (private_get, \ + ((gpointer)private_key), \ + (private_key)) +#define g_private_set(private_key, value) G_THREAD_CF (private_set, \ + (void) (private_key = \ + (GPrivate*) (value)), \ + (private_key, value)) +/* GStaticMutexes can be statically initialized with the value + * G_STATIC_MUTEX_INIT, and then they can directly be used, that is + * much easier, than having to explicitly allocate the mutex before + * use + */ +#define g_static_mutex_lock(mutex) \ + g_mutex_lock (g_static_mutex_get_mutex (mutex)) +#define g_static_mutex_trylock(mutex) \ + g_mutex_trylock (g_static_mutex_get_mutex (mutex)) +#define g_static_mutex_unlock(mutex) \ + g_mutex_unlock (g_static_mutex_get_mutex (mutex)) +struct _GStaticPrivate +{ + guint index; +}; +#define G_STATIC_PRIVATE_INIT { 0 } +gpointer g_static_private_get (GStaticPrivate *private_key); +void g_static_private_set (GStaticPrivate *private_key, + gpointer data, + GDestroyNotify notify); + +/* these are some convenience macros that expand to nothing if GLib + * was configured with --disable-threads. for using StaticMutexes, + * you define them with G_LOCK_DEFINE_STATIC (name) or G_LOCK_DEFINE (name) + * if you need to export the mutex. With G_LOCK_EXTERN (name) you can + * declare such an globally defined lock. name is a unique identifier + * for the protected varibale or code portion. locking, testing and + * unlocking of such mutexes can be done with G_LOCK(), G_UNLOCK() and + * G_TRYLOCK() respectively. + */ +extern void glib_dummy_decl (void); +#define G_LOCK_NAME(name) (g__ ## name ## _lock) +#ifdef G_THREADS_ENABLED +# define G_LOCK_DEFINE_STATIC(name) static G_LOCK_DEFINE (name) +# define G_LOCK_DEFINE(name) \ + GStaticMutex G_LOCK_NAME (name) = G_STATIC_MUTEX_INIT +# define G_LOCK_EXTERN(name) extern GStaticMutex G_LOCK_NAME (name) + +# ifdef G_DEBUG_LOCKS +# define G_LOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): locking: %s ", \ + __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ + #name); \ + g_static_mutex_lock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_UNLOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): unlocking: %s ", \ + __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ + #name); \ + g_static_mutex_unlock (&G_LOCK_NAME (name)); \ + }G_STMT_END +# define G_TRYLOCK(name) G_STMT_START{ \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \ + "file %s: line %d (%s): try locking: %s ", \ + __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \ + #name); \ + }G_STMT_END, g_static_mutex_trylock (&G_LOCK_NAME (name)) +# else /* !G_DEBUG_LOCKS */ +# define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name)) +# define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name)) +# define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name)) +# endif /* !G_DEBUG_LOCKS */ +#else /* !G_THREADS_ENABLED */ +# define G_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void) +# define G_LOCK_DEFINE(name) extern void glib_dummy_decl (void) +# define G_LOCK_EXTERN(name) extern void glib_dummy_decl (void) +# define G_LOCK(name) +# define G_UNLOCK(name) +# define G_TRYLOCK(name) (FALSE) +#endif /* !G_THREADS_ENABLED */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __G_LIB_H__ */ diff --git a/contrib/media/updf/include/glib/glibconfig.h b/contrib/media/updf/include/glib/glibconfig.h new file mode 100644 index 0000000000..b716c19a10 --- /dev/null +++ b/contrib/media/updf/include/glib/glibconfig.h @@ -0,0 +1,121 @@ +/* glibconfig.h + * + * This is a generated file. Please modify `configure.in' + */ + +#ifndef GLIBCONFIG_H +#define GLIBCONFIG_H + +#include <limits.h> +#include <float.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; +typedef signed short gint16; +typedef unsigned short guint16; +typedef signed int gint32; +typedef unsigned int guint32; + +#if defined (__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) +# define G_GNUC_EXTENSION __extension__ +#else +# define G_GNUC_EXTENSION +#endif + +#define G_HAVE_GINT64 1 + +G_GNUC_EXTENSION typedef signed long long gint64; +G_GNUC_EXTENSION typedef unsigned long long guint64; + +#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) + +#define GPOINTER_TO_INT(p) ((gint) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (u)) + +#ifdef NeXT /* @#%@! NeXTStep */ +# define g_ATEXIT(proc) (!atexit (proc)) +#else +# define g_ATEXIT(proc) (atexit (proc)) +#endif + +#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END + +#define GLIB_MAJOR_VERSION 1 +#define GLIB_MINOR_VERSION 2 +#define GLIB_MICRO_VERSION 10 + + +#define G_VA_COPY va_copy + +#ifdef __cplusplus +#define G_HAVE_INLINE 1 +#else /* !__cplusplus */ +#define G_HAVE_INLINE 1 +#define G_HAVE___INLINE 1 +#define G_HAVE___INLINE__ 1 +#endif /* !__cplusplus */ + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_NONE +typedef struct _GMutex* GStaticMutex; +#define G_STATIC_MUTEX_INIT NULL +#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex)) + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) +#define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLNVAL =32 + + +#define G_HAVE_WCHAR_H 1 +#define G_HAVE_WCTYPE_H 1 +#define G_HAVE_BROKEN_WCTYPE 1 + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* GLIBCONFIG_H */ diff --git a/contrib/media/updf/include/glob.h b/contrib/media/updf/include/glob.h new file mode 100644 index 0000000000..e0391aaa73 --- /dev/null +++ b/contrib/media/updf/include/glob.h @@ -0,0 +1,53 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_glob_h_ +#define __dj_include_glob_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> + +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t + +typedef struct { + size_t gl_pathc; + char **gl_pathv; + size_t gl_offs; +} glob_t; + +#define GLOB_APPEND 0x01 +#define GLOB_DOOFFS 0x02 +#define GLOB_ERR 0x04 +#define GLOB_MARK 0x08 +#define GLOB_NOCHECK 0x10 +#define GLOB_NOESCAPE 0x20 +#define GLOB_NOSORT 0x40 + +#define GLOB_ABORTED 1 +#define GLOB_NOMATCH 2 +#define GLOB_NOSPACE 3 + +int glob(const char *_pattern, int _flags, int (*_errfunc)(const char *_epath, int _eerrno), glob_t *_pglob); +void globfree(glob_t *_pglob); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_glob_h_ */ diff --git a/contrib/media/updf/include/glview.h b/contrib/media/updf/include/glview.h new file mode 100644 index 0000000000..71fc6ac3e4 --- /dev/null +++ b/contrib/media/updf/include/glview.h @@ -0,0 +1,196 @@ +/******************************************************************************* +/ +/ File: GLView.h +/ +/ Copyright 1993-98, Be Incorporated, All Rights Reserved. +/ +*******************************************************************************/ + +#ifndef BGLVIEW_H +#define BGLVIEW_H + +// added by Brian Paul: +#ifndef BGL_RGB +#define BGL_RGB 0 +#define BGL_INDEX 1 +#define BGL_SINGLE 0 +#define BGL_DOUBLE 2 +#define BGL_DIRECT 0 +#define BGL_INDIRECT 4 +#define BGL_ACCUM 8 +#define BGL_ALPHA 16 +#define BGL_DEPTH 32 +#define BGL_OVERLAY 64 +#define BGL_UNDERLAY 128 +#define BGL_STENCIL 512 +#endif + + +#include <GL/gl.h> +#include <AppKit.h> +#include <interface/Window.h> +#include <interface/View.h> +#include <interface/Bitmap.h> +#include <game/WindowScreen.h> +#include <game/DirectWindow.h> + +class BGLView : public BView { +public: + + BGLView(BRect rect, char *name, + ulong resizingMode, ulong mode, + ulong options); + virtual ~BGLView(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + + // Added for Mesa (can't be virtual!) + void CopySubBufferMESA(GLint x, GLint y, GLuint width, GLuint height); + + BView * EmbeddedView(); + status_t CopyPixelsOut(BPoint source, BBitmap *dest); + status_t CopyPixelsIn(BBitmap *source, BPoint dest); + + virtual void ErrorCallback(GLenum errorCode); + + virtual void Draw(BRect updateRect); + + virtual void AttachedToWindow(); + virtual void AllAttached(); + virtual void DetachedFromWindow(); + virtual void AllDetached(); + + virtual void FrameResized(float width, float height); + virtual status_t Perform(perform_code d, void *arg); + + /* The public methods below, for the moment, + are just pass-throughs to BView */ + + virtual status_t Archive(BMessage *data, bool deep = true) const; + + virtual void MessageReceived(BMessage *msg); + virtual void SetResizingMode(uint32 mode); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, + BMessage *specifier, int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + + /* New public functions */ + void DirectConnected( direct_buffer_info *info ); + void EnableDirectMode( bool enabled ); + +private: + + virtual void _ReservedGLView1(); + virtual void _ReservedGLView2(); + virtual void _ReservedGLView3(); + virtual void _ReservedGLView4(); + virtual void _ReservedGLView5(); + virtual void _ReservedGLView6(); + virtual void _ReservedGLView7(); + virtual void _ReservedGLView8(); + + BGLView(const BGLView &); + BGLView &operator=(const BGLView &); + + void dither_front(); + bool confirm_dither(); + void draw(BRect r); + + void * m_gc; + uint32 m_options; + uint32 m_ditherCount; + BLocker m_drawLock; + BLocker m_displayLock; +#if OLD_GLVIEW + BView * m_embeddedFront; + BView * m_embeddedBack; +#else + void * m_clip_info; + void * _reserved1; +#endif + BBitmap * m_ditherMap; + BRect m_bounds; + int16 * m_errorBuffer[2]; + uint64 _reserved[8]; + + /* Direct Window stuff */ +private: + void drawScanline( int x1, int x2, int y, void *data ); + static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2); + void lock_draw(); + void unlock_draw(); + bool validateView(); +}; + + + +class BGLScreen : public BWindowScreen { +public: + BGLScreen(char *name, + ulong screenMode, ulong options, + status_t *error, bool debug=false); + ~BGLScreen(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + virtual void ErrorCallback(GLenum errorCode); + + virtual void ScreenConnected(bool connected); + virtual void FrameResized(float width, float height); + virtual status_t Perform(perform_code d, void *arg); + + /* The public methods below, for the moment, + are just pass-throughs to BWindowScreen */ + + virtual status_t Archive(BMessage *data, bool deep = true) const; + virtual void MessageReceived(BMessage *msg); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler *ResolveSpecifier(BMessage *msg, + int32 index, + BMessage *specifier, + int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + +private: + + virtual void _ReservedGLScreen1(); + virtual void _ReservedGLScreen2(); + virtual void _ReservedGLScreen3(); + virtual void _ReservedGLScreen4(); + virtual void _ReservedGLScreen5(); + virtual void _ReservedGLScreen6(); + virtual void _ReservedGLScreen7(); + virtual void _ReservedGLScreen8(); + + BGLScreen(const BGLScreen &); + BGLScreen &operator=(const BGLScreen &); + + void * m_gc; + long m_options; + BLocker m_drawLock; + + int32 m_colorSpace; + uint32 m_screen_mode; + + uint64 _reserved[7]; +}; + + +#endif + + + + + diff --git a/contrib/media/updf/include/gnu/stubs.h b/contrib/media/updf/include/gnu/stubs.h new file mode 100644 index 0000000000..c3a979418d --- /dev/null +++ b/contrib/media/updf/include/gnu/stubs.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_stubs_h__ +#define __dj_include_libc_stubs_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* POSIX functions (for when compiling an ANSI function) */ + +/* DJGPP functions (for compiling POSIX or ANSI functions) */ +#define crlf2nl __crlf2nl +#define dosmemget __dosmemget +#define dosmemput __dosmemput +#define filelength __filelength +#define findfirst __findfirst +#define findnext __findnext +#define fsync __fsync +#define getdisk __getdisk +#define getdtablesize __getdtablesize +#define getitimer __getitimer +#define gettimeofday __gettimeofday +#define modfl __modfl +#define movedata __movedata +#define pow10 __pow10 +#define pow2 __pow2 +#define putenv __putenv +#define sbrk __sbrk +#define setitimer __setitimer +#define setmode __setmode +#define spawnve __spawnve +#define spawnvpe __spawnvpe +#define stricmp __stricmp +#define sync __sync + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_stubs_h__ */ diff --git a/contrib/media/updf/include/gppconio.h b/contrib/media/updf/include/gppconio.h new file mode 100644 index 0000000000..d16a0068c4 --- /dev/null +++ b/contrib/media/updf/include/gppconio.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_gppconio_h_ +#define __dj_include_gppconio_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <conio.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_gppconio_h_ */ diff --git a/contrib/media/updf/include/grower.h b/contrib/media/updf/include/grower.h new file mode 100644 index 0000000000..9c91e58c05 --- /dev/null +++ b/contrib/media/updf/include/grower.h @@ -0,0 +1,295 @@ +/** \file grower.h Template class that implements dynamic growing arrays. + * Yacas implements its own growing array class to ensure correct behaviour + * on all platforms (stl was still in development and not supported on all + * platforms when development started). + * + * grower started 1998 ayal Pinkus + * + */ + +#ifndef _GROWER_H_ +#define _GROWER_H_ + +#include "yacasbase.h" +#include "lispassert.h" + + + +// Default placement versions of operator new and delete, placed here because I do not want to include <new> +inline void* operator new(size_t, void* __p) throw() { return __p; } +inline void* operator new[](size_t, void* __p) throw() { return __p; } +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + + +template <class T> +inline void constructAt(void * to_obj, const T * from_obj) +{ + new (to_obj) T(*from_obj); +} + +class ArrOps +{ +public: + virtual bool isPOD() const { return false; } + virtual void construct(void * buffer) const = 0; + virtual void construct(void * to_obj, const void * from_obj) const = 0; + virtual void destruct(void * obj) const = 0; + virtual int granularity() const { return 8; } + static void resize(char** pArray, const ArrOps& opers, int& iSize, int& iCapacity, int aSize, int aItemSize, int ext); + static void remove(char** pArray, const ArrOps& opers, int& iSize, int aIndex, int aCount, int aItemSize); + static void reserve(char** pArray, int& iCapacity, int aSize, int aItemSize); + //static void* insert(char** pArray, const ArrOps& opers, int& iSize, void* aData, int aIndex, int aCount, int aSize, int aExtSize); +}; + +template <class T> +class ArrOpsCustomObj : public ArrOps +{ +public: + ArrOpsCustomObj() {} + inline void construct(void * buffer) const + { new (buffer) T; } + inline void construct(void * to_obj, const void * from_obj) const + { constructAt(to_obj, static_cast<const T*>(from_obj)); } + inline void destruct(void * obj) const + { /*obj;*/ static_cast<T*>(obj)->~T(); } + //inline int size() const { return sizeof(T); } +}; + +template <class T> +class ArrOpsPOD : public ArrOps +{ +public: + ArrOpsPOD() {} + inline bool isPOD() const { return true; } + inline void construct(void * buffer) const {} + inline void construct(void * to_obj, const void * from_obj) const + { *static_cast<T*>(to_obj) = *static_cast<const T*>(from_obj); } + inline void destruct(void * obj) const {} + //inline int size() const { return sizeof(T); } +}; + +template <class T> +class ArrOpsCustomPtr : public ArrOps +{ + typedef T* TY; +public: + ArrOpsCustomPtr() {} + inline void construct(void * buffer) const + { *static_cast<TY*>(buffer) = 0; } + inline void construct(void * to_obj, const void * from_obj) const + { *static_cast<TY*>(to_obj) = *static_cast<const TY*>(from_obj); } + inline void destruct(void * obj) const {} + //inline int size() const { return sizeof(TY); } + inline int granularity() const { return 8; } +}; + +template <class T> +class ArrOpsDeletingObj {}; + +template <class T> +class ArrOpsDeletingPtr : public ArrOpsCustomPtr<T> +{ + typedef T* TY; +public: + inline void destruct(void * obj) const + { delete *static_cast<const TY*>(obj); } +}; + +/** template class useful for implementing a dynamic growing array + * for any arbitrary type of object. If using the array to maintain + * objects, please use pointers to the objects, and use the + * CDeletingArrayGrower to automatically delete the objects at destruction. + */ +template <class T, class TOps > +class CArrayGrower : public YacasBase +{ +public: + /** ElementType can be used outside this class as the type of the + * object in the array. This is useful in templated functions that + * work on a CArrayGrower without being part of CArrayGrower + */ + typedef LispInt SizeType; + typedef T ElementType; + + CArrayGrower() + : iArray(0) + , iSize(0) + , iCapacity(0) + , iArrayOwnedExternally(LispFalse) + { + } + virtual ~CArrayGrower() + { + Clear(); + } + inline void Clear() // oddly, only *one* use outside destructor!? + { + if (iSize) + { + const TOps opers; + if(!opers.isPOD()) + { + while (iSize) + opers.destruct(iArray + --iSize); + } + } + if (!iArrayOwnedExternally) + { + PlatFree(iArray); + } + iArray = 0; + iCapacity = iSize = 0; + iArrayOwnedExternally = LispFalse; + } + inline SizeType Size() const { return iSize; } + + inline CArrayGrower(const CArrayGrower<T,TOps>& aOther) + : iArray(0) + , iSize(0) + , iCapacity(0) + , iArrayOwnedExternally(LispFalse) + { + // Make sure we're not accidentally copying a huge array. We want this system to stay efficient... + LISPASSERT(aOther.iSize == 0); + LISPASSERT(aOther.iArrayOwnedExternally == LispFalse); + } + + inline const CArrayGrower<T,TOps>& operator=(const CArrayGrower<T,TOps>& aOther) + { + // Make sure we're not accidentally copying a huge array. We want this system to stay efficient... + LISPASSERT(iArray == 0); + LISPASSERT(iSize == 0); + LISPASSERT(iCapacity == 0); + LISPASSERT(iArrayOwnedExternally == LispFalse); + + LISPASSERT(aOther.iSize == 0); + LISPASSERT(aOther.iArrayOwnedExternally == LispFalse); + return *this; + } + +private: + + void moreCapacity(SizeType aSize, int g) // almost independent of T + { + LISPASSERT(!iArrayOwnedExternally); + LISPASSERT(iCapacity >= 0); + // Compute a new iCapacity >= aSize, with iCapacity % g == 0. + // We assume g is a power of 2. (fwiw, in two's-complement, ~(g-1) == -g. + iCapacity = (aSize + g) & ~(g-1); + if (!iArray) + { + iArray = (ElementType*)PlatAlloc(iCapacity*sizeof(ElementType)); + } + else + { + // we assume 'memcpy' suffices for moving the existing items. + iArray = (ElementType*)PlatReAlloc(iArray,iCapacity*sizeof(ElementType)); + } + } +public: + inline void ResizeTo(SizeType aSize) + { + LISPASSERT(!iArrayOwnedExternally); + TOps opers; + if (aSize > iCapacity) + { + moreCapacity(aSize, opers.granularity()); + } + if (!opers.isPOD()) + { + if (iSize < aSize) + { + for (int ii = iSize; ii < aSize; ii++) + opers.construct(iArray + ii); + } + else + { + for (int ii = aSize; ii < iSize; ii++) + opers.destruct(iArray + ii); + } + } + iSize = aSize; + } + void Delete(SizeType aIndex, SizeType aCount=1) + { + LISPASSERT(aIndex>=0 && aIndex<iSize); + ArrOps::remove((char**)&iArray, TOps(), iSize, aIndex, aCount, sizeof(ElementType)); + } + inline LispBoolean ArrayOwnedExternally() + { + return iArrayOwnedExternally; + } +public: + /// Access to an element in the array + inline ElementType& operator[](const SizeType aIndex) const + { + return iArray[aIndex]; + } + + /// Append an element to an array + template <class Type> + inline void Append(const Type& aVal) + { + if (iSize >= iCapacity) moreCapacity(iSize+1, TOps().granularity()); + new ((void *)(iArray+iSize)) ElementType(aVal); + ++iSize; + } + + /// Insert object aObj at aIndex, aCount times. + inline void Insert(SizeType aIndex, const ElementType& aObj, SizeType aCount=1) + { + const SizeType oldItems = iSize; + LISPASSERT(aIndex <= oldItems && aCount >= 0); + ResizeTo(iSize+aCount); + ElementType * pOld = iArray+oldItems; + ElementType * pEnd = iArray+iSize; + int i = iSize - aIndex; // = (oldItems - aIndex) + aCount + for ( ; i > aCount; i--) + *--pEnd = *--pOld; + while (i-- > 0) + *--pEnd = aObj; + } + + /** Set the array to an external array. This means the array will + * not be freed at destruction time + */ + inline void SetExternalArray(ElementType* aArray, SizeType aSize) + { + LISPASSERT(!iArray || iArrayOwnedExternally == LispTrue); + iArray = aArray; + iSize = aSize; + iArrayOwnedExternally = LispTrue; + iCapacity = -10000; // Setting iCapacity should not strictly be necessary, setting it to hugely negative number will hopefully force a fail. + } + + /// Copy the array to another array + inline void CopyToExternalArray(ElementType * aArray) + { + PlatMemCopy(aArray,iArray,iSize*sizeof(ElementType)); + } + +protected: + inline ElementType * elements() const { return iArray; } +private: + ElementType * iArray; + SizeType iSize; + SizeType iCapacity; + LispBoolean iArrayOwnedExternally; +}; + +/** \class CDeletingArrayGrower calls delete on each element in the + * array at destruction time. This is useful if the array is a list + * of pointers to objects. + */ + +template <class T, class TOps > +class CDeletingArrayGrower : public CArrayGrower<T, TOps > +{ +public: + CDeletingArrayGrower() {} +}; + +#endif + + diff --git a/contrib/media/updf/include/grp.h b/contrib/media/updf/include/grp.h new file mode 100644 index 0000000000..13b3bc241b --- /dev/null +++ b/contrib/media/updf/include/grp.h @@ -0,0 +1,45 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_grp_h_ +#define __dj_include_grp_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> +__DJ_gid_t +#undef __DJ_gid_t +#define __DJ_gid_t + +struct group { + gid_t gr_gid; + char ** gr_mem; + char * gr_name; +}; + +struct group * getgrgid(gid_t _gid); +struct group * getgrnam(const char *_name); + +#ifndef _POSIX_SOURCE + +void endgrent(void); +struct group * getgrent(void); +struct group * fgetgrent(void *_f); +void setgrent(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_grp_h_ */ diff --git a/contrib/media/updf/include/hash.h b/contrib/media/updf/include/hash.h new file mode 100644 index 0000000000..28c50317b6 --- /dev/null +++ b/contrib/media/updf/include/hash.h @@ -0,0 +1,35 @@ +/* +** hash.h +** hash manager for lua +** Luiz Henrique de Figueiredo - 17 Aug 90 +** Modified by Waldemar Celes Filho +** 26 Apr 93 +*/ + +#ifndef hash_h +#define hash_h + +typedef struct node +{ + Object ref; + Object val; + struct node *next; +} Node; + +typedef struct Hash +{ + char mark; + unsigned int nhash; + Node **list; +} Hash; + +#define markarray(t) ((t)->mark) + +Hash *lua_hashcreate (unsigned int nhash); +void lua_hashdelete (Hash *h); +Object *lua_hashdefine (Hash *t, Object *ref); +void lua_hashmark (Hash *h); + +void lua_next (void); + +#endif diff --git a/contrib/media/updf/include/hashsize.h b/contrib/media/updf/include/hashsize.h new file mode 100644 index 0000000000..8802a9b907 --- /dev/null +++ b/contrib/media/updf/include/hashsize.h @@ -0,0 +1,6 @@ +/* + * hashsize.h -- hash and token table constants + */ + +#define CAPTABSIZE 495 +#define HASHTABSIZE (495 * 2) diff --git a/contrib/media/updf/include/iAVLTree.h b/contrib/media/updf/include/iAVLTree.h new file mode 100644 index 0000000000..08482af016 --- /dev/null +++ b/contrib/media/updf/include/iAVLTree.h @@ -0,0 +1,67 @@ +/* + * iAVLTree.h: Header file for AVLTrees with long integer keys. + * Copyright (C) 1998 Michael H. Buselli + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The author of this library can be reached at the following address: + * Michael H. Buselli + * 4334 N. Hazel St. #515 + * Chicago, IL 60613-1456 + * + * Or you can send email to <cosine@tezcat.com>. + * The official web page for this product is: + * http://www.tezcat.com/~cosine/pub/AVLTree/ + * + * This is version 0.1.0 (alpha). + */ + +#ifndef _IAVLTREE_H_ +#define _IAVLTREE_H_ + + +typedef struct _iAVLNode { + long key; + long depth; + void *item; + struct _iAVLNode *parent; + struct _iAVLNode *left; + struct _iAVLNode *right; +} iAVLNode; + + +typedef struct { + iAVLNode *top; + long count; + long (*getkey)(const void *item); +} iAVLTree; + + +typedef struct { + const iAVLTree *avltree; + const iAVLNode *curnode; +} iAVLCursor; + + +extern iAVLTree *iAVLAllocTree (long (*getkey)(void const *item)); +extern void iAVLFreeTree (iAVLTree *avltree, void (freeitem)(void *item)); +extern int iAVLInsert (iAVLTree *avltree, void *item); +extern void *iAVLSearch (iAVLTree const *avltree, long key); +extern int iAVLDelete (iAVLTree *avltree, long key); +extern void *iAVLFirst (iAVLCursor *avlcursor, iAVLTree const *avltree); +extern void *iAVLNext (iAVLCursor *avlcursor); + + +#endif diff --git a/contrib/media/updf/include/ieeefp.h b/contrib/media/updf/include/ieeefp.h new file mode 100644 index 0000000000..4c08d62754 --- /dev/null +++ b/contrib/media/updf/include/ieeefp.h @@ -0,0 +1,88 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_ieeefp_h_ +#define __dj_include_ieeefp_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <sys/cdefs.h> + +/* #include <machine/ieeefp.h> */ +#include <machine/endian.h> +#if BYTE_ORDER == LITTLE_ENDIAN +# define __IEEE_LITTLE_ENDIAN +#endif + +/* FLOATING ROUNDING */ + +typedef int fp_rnd; +#define FP_RN 0 /* Round to nearest */ +#define FP_RM 1 /* Round down */ +#define FP_RP 2 /* Round up */ +#define FP_RZ 3 /* Round to zero (truncate) */ + +fp_rnd _EXFUN(fpgetround,(void)); +fp_rnd _EXFUN(fpsetround, (fp_rnd)); + +/* EXCEPTIONS */ + +typedef int fp_except; +#define FP_X_INV 0x10 /* Invalid operation */ +#define FP_X_DX 0x80 /* Divide by zero */ +#define FP_X_OFL 0x04 /* Overflow exception */ +#define FP_X_UFL 0x02 /* Underflow exception */ +#define FP_X_IMP 0x01 /* Imprecise exception */ + +fp_except _EXFUN(fpgetmask,(void)); +fp_except _EXFUN(fpsetmask,(fp_except)); +fp_except _EXFUN(fpgetsticky,(void)); +fp_except _EXFUN(fpsetsticky, (fp_except)); + +/* INTEGER ROUNDING */ + +typedef int fp_rdi; +#define FP_RDI_TOZ 0 /* Round to Zero */ +#define FP_RDI_RD 1 /* Follow float mode */ + +fp_rdi _EXFUN(fpgetroundtoi,(void)); +fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi)); + +int _EXFUN(isnan, (double)); +int _EXFUN(isinf, (double)); +int _EXFUN(finite, (double)); + +int _EXFUN(isnanf, (float)); +int _EXFUN(isinff, (float)); +int _EXFUN(finitef, (float)); + +#define __IEEE_DBL_EXPBIAS 1023 +#define __IEEE_FLT_EXPBIAS 127 + +#define __IEEE_DBL_EXPLEN 11 +#define __IEEE_FLT_EXPLEN 8 + + +#define __IEEE_DBL_FRACLEN (64 - (__IEEE_DBL_EXPLEN + 1)) +#define __IEEE_FLT_FRACLEN (32 - (__IEEE_FLT_EXPLEN + 1)) + +#define __IEEE_DBL_MAXPOWTWO ((double)(1L << 32 - 2) * (1L << (32-11) - 32 + 1)) +#define __IEEE_FLT_MAXPOWTWO ((float)(1L << (32-8) - 1)) + +#define __IEEE_DBL_NAN_EXP 0x7ff +#define __IEEE_FLT_NAN_EXP 0xff + + +#define isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \ + ((*(long *)&(x) & 0x007fffffL)!=0000000000L)) + +#define isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \ + ((*(long *)&(x) & 0x007fffffL)==0000000000L)) + +#define finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L)) + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_ieeefp_h_ */ diff --git a/contrib/media/updf/include/image.h b/contrib/media/updf/include/image.h new file mode 100644 index 0000000000..04c362eb83 --- /dev/null +++ b/contrib/media/updf/include/image.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __IMAGE_H +#define __IMAGE_H +/** +@file image.h +@brief Implementation of operations on images (IMAGE) + +The functions in IMAGE.C have for goal to realize operations on images. +*/ + +/** @defgroup IMAGE IMAGE - Implementation of operations on images */ +/*@{*/ + +/** +Create an empty image +@todo this function should be removed +@return returns an empty image if successful, returns NULL otherwise +*/ +opj_image_t* opj_image_create0(void); + +/*@}*/ + +#endif /* __IMAGE_H */ + diff --git a/contrib/media/updf/include/infixparser.h b/contrib/media/updf/include/infixparser.h new file mode 100644 index 0000000000..5ae3e07da3 --- /dev/null +++ b/contrib/media/updf/include/infixparser.h @@ -0,0 +1,139 @@ +/** \file infixparser.h + * parsing and printing in the infix style. + * + */ + + +#ifndef __infixparser_h__ +#define __infixparser_h__ + +#include "yacasbase.h" +#include "lispparser.h" + + +#define KMaxPrecedence 60000 + +class LispInFixOperator : public YacasBase +{ +public: + inline LispInFixOperator(LispInt aPrecedence) + : iPrecedence(aPrecedence), + iLeftPrecedence(aPrecedence), + iRightPrecedence(aPrecedence), + iRightAssociative(0) + {}; + inline void SetRightAssociative(void) + { + iRightAssociative = 1; + } + inline void SetLeftPrecedence(LispInt aPrecedence) + { + iLeftPrecedence = aPrecedence; + } + inline void SetRightPrecedence(LispInt aPrecedence) + { + iRightPrecedence = aPrecedence; + } +public: + LispInt iPrecedence; + LispInt iLeftPrecedence; + LispInt iRightPrecedence; + LispInt iRightAssociative; +}; + +class LispOperators : public LispAssociatedHash<LispInFixOperator> +{ +public: + void SetOperator(LispInt aPrecedence,LispString * aString); + void SetRightAssociative(LispString * aString); + void SetLeftPrecedence(LispString * aString,LispInt aPrecedence); + void SetRightPrecedence(LispString * aString,LispInt aPrecedence); +}; + +class InfixParser : public LispParser +{ +public: + InfixParser(LispTokenizer& aTokenizer, LispInput& aInput, + LispEnvironment& aEnvironment, + LispOperators& aPrefixOperators, + LispOperators& aInfixOperators, + LispOperators& aPostfixOperators, + LispOperators& aBodiedOperators); + ~InfixParser(); + + virtual void Parse(LispPtr& aResult); +//private: + void ParseCont(LispPtr& aResult); +public: + LispOperators& iPrefixOperators; + LispOperators& iInfixOperators; + LispOperators& iPostfixOperators; + LispOperators& iBodiedOperators; + +// LispEnvironment* iEnvironment; +}; + +class ParsedObject : public YacasBase +{ +public: + ParsedObject(InfixParser& aParser) + : iParser(aParser), + iError(LispFalse), + iEndOfFile(LispFalse), + iLookAhead(NULL),iResult() {}; + void Parse(); +private: + void ReadToken(); + void MatchToken(LispString * aToken); + void ReadExpression(LispInt depth); + void ReadAtom(); +private: + void GetOtherSide(LispInt aNrArgsToCombine, LispInt depth); + void Combine(LispInt aNrArgsToCombine); + void InsertAtom(LispString * aString); +private: + void Fail(); // called when parsing fails, raising an exception + +private: + InfixParser& iParser; +private: + LispBoolean iError; + LispBoolean iEndOfFile; + LispString * iLookAhead; +public: + LispPtr iResult; +}; + + +class InfixPrinter : public LispPrinter +{ +public: + InfixPrinter(LispOperators& aPrefixOperators, + LispOperators& aInfixOperators, + LispOperators& aPostfixOperators, + LispOperators& aBodiedOperators) + : iPrefixOperators(aPrefixOperators), + iInfixOperators(aInfixOperators), + iPostfixOperators(aPostfixOperators), + iBodiedOperators(aBodiedOperators), + iPrevLastChar(0),iCurrentEnvironment(NULL){} + + virtual void Print(LispPtr& aExpression, LispOutput& aOutput, + LispEnvironment& aEnvironment); + virtual void RememberLastChar(LispChar aChar); +private: + void Print(LispPtr& aExpression, LispOutput& aOutput, + LispInt iPrecedence); + void WriteToken(LispOutput& aOutput,LispChar * aString); +private: + LispOperators& iPrefixOperators; + LispOperators& iInfixOperators; + LispOperators& iPostfixOperators; + LispOperators& iBodiedOperators; + LispChar iPrevLastChar; + LispEnvironment* iCurrentEnvironment; +}; + + +#endif + diff --git a/contrib/media/updf/include/inlines/ctype.ha b/contrib/media/updf/include/inlines/ctype.ha new file mode 100644 index 0000000000..d237e5528b --- /dev/null +++ b/contrib/media/updf/include/inlines/ctype.ha @@ -0,0 +1,35 @@ +#ifndef __dj_include_inline_ctype_ha_ +#define __dj_include_inline_ctype_ha_ + +#define __dj_ISALNUM 0x0001 +#define __dj_ISALPHA 0x0002 +#define __dj_ISCNTRL 0x0004 +#define __dj_ISDIGIT 0x0008 +#define __dj_ISGRAPH 0x0010 +#define __dj_ISLOWER 0x0020 +#define __dj_ISPRINT 0x0040 +#define __dj_ISPUNCT 0x0080 +#define __dj_ISSPACE 0x0100 +#define __dj_ISUPPER 0x0200 +#define __dj_ISXDIGIT 0x0400 + +extern unsigned short __dj_ctype_flags[]; +extern unsigned char __dj_ctype_toupper[]; +extern unsigned char __dj_ctype_tolower[]; + +#define isalnum(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISALNUM) +#define isalpha(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISALPHA) +#define iscntrl(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISCNTRL) +#define isdigit(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISDIGIT) +#define isgraph(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISGRAPH) +#define islower(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISLOWER) +#define isprint(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISPRINT) +#define ispunct(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISPUNCT) +#define isspace(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISSPACE) +#define isupper(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISUPPER) +#define isxdigit(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISXDIGIT) + +#define tolower(c) (__dj_ctype_tolower[(int)(c)+1]) +#define toupper(c) (__dj_ctype_toupper[(int)(c)+1]) + +#endif /* __dj_include_inline_ctype_hi_ */ diff --git a/contrib/media/updf/include/inlines/ctype.hd b/contrib/media/updf/include/inlines/ctype.hd new file mode 100644 index 0000000000..de4ae1c10e --- /dev/null +++ b/contrib/media/updf/include/inlines/ctype.hd @@ -0,0 +1,7 @@ +#ifndef __dj_include_inline_ctype_hd_ +#define __dj_include_inline_ctype_hd_ + +#define isascii(c) (!((c)&(~0x7f))) +#define toascii(c) ((c)&0x7f) + +#endif diff --git a/contrib/media/updf/include/inlines/pc.h b/contrib/media/updf/include/inlines/pc.h new file mode 100644 index 0000000000..0fa37d43cc --- /dev/null +++ b/contrib/media/updf/include/inlines/pc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_Inline_pc_h_ +#define __dj_include_Inline_pc_h_ + +#ifdef __GNUC__ + +#ifdef __cplusplus +extern "C" { +#endif + +extern __inline__ unsigned char inportb (unsigned short _port) +{ + unsigned char __ret; + __asm__ __volatile__("inb %%dx,%%al":"=a"(__ret):"d"(_port)); + return __ret; +} + +extern __inline__ unsigned short inportw (unsigned short _port) +{ + unsigned short __ret; + __asm__ __volatile__("inw %%dx,%%ax":"=a"(__ret):"d"(_port)); + return __ret; +} + +extern __inline__ unsigned long inportl (unsigned short _port) +{ + unsigned long __ret; + __asm__ __volatile__("inl %%dx,%%eax":"=a"(__ret):"d"(_port)); + return __ret; +} + +extern __inline__ void outportb (unsigned short _port, unsigned char _data) +{ + __asm__ __volatile__("outb %%al,%%dx"::"a"(_data),"d"(_port)); +} + +extern __inline__ void outportw (unsigned short _port, unsigned short _data) +{ + __asm__ __volatile__("outw %%ax,%%dx"::"a"(_data),"d"(_port)); +} + +extern __inline__ void outportl (unsigned short _port, unsigned long _data) +{ + __asm__ __volatile__("outl %%eax,%%dx"::"a"(_data),"d"(_port)); +} + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/contrib/media/updf/include/inout.h b/contrib/media/updf/include/inout.h new file mode 100644 index 0000000000..5a72261c70 --- /dev/null +++ b/contrib/media/updf/include/inout.h @@ -0,0 +1,24 @@ +/* +** inout.h +** +** Waldemar Celes Filho +** TeCGraf - PUC-Rio +** 11 May 93 +*/ + + +#ifndef inout_h +#define inout_h + +extern int lua_linenumber; +extern int lua_debug; +extern int lua_debugline; + +int lua_openfile (char *fn); +void lua_closefile (void); +int lua_openstring (char *s); +int lua_pushfunction (int file, int function); +void lua_popfunction (void); +void lua_reportbug (char *s); + +#endif diff --git a/contrib/media/updf/include/int.h b/contrib/media/updf/include/int.h new file mode 100644 index 0000000000..4e5fe08eb7 --- /dev/null +++ b/contrib/media/updf/include/int.h @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __INT_H +#define __INT_H +/** +@file int.h +@brief Implementation of operations on integers (INT) + +The functions in INT.H have for goal to realize operations on integers. +*/ + +/** @defgroup INT INT - Implementation of operations on integers */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Get the minimum of two integers +@return Returns a if a < b else b +*/ +static INLINE int int_min(int a, int b) { + return a < b ? a : b; +} +/** +Get the maximum of two integers +@return Returns a if a > b else b +*/ +static INLINE int int_max(int a, int b) { + return (a > b) ? a : b; +} +/** +Clamp an integer inside an interval +@return +<ul> +<li>Returns a if (min < a < max) +<li>Returns max if (a > max) +<li>Returns min if (a < min) +</ul> +*/ +static INLINE int int_clamp(int a, int min, int max) { + if (a < min) + return min; + if (a > max) + return max; + return a; +} +/** +@return Get absolute value of integer +*/ +static INLINE int int_abs(int a) { + return a < 0 ? -a : a; +} +/** +Divide an integer and round upwards +@return Returns a divided by b +*/ +static INLINE int int_ceildiv(int a, int b) { + return (a + b - 1) / b; +} +/** +Divide an integer by a power of 2 and round upwards +@return Returns a divided by 2^b +*/ +static INLINE int int_ceildivpow2(int a, int b) { + return (a + (1 << b) - 1) >> b; +} +/** +Divide an integer by a power of 2 and round downwards +@return Returns a divided by 2^b +*/ +static INLINE int int_floordivpow2(int a, int b) { + return a >> b; +} +/** +Get logarithm of an integer and round downwards +@return Returns log2(a) +*/ +static INLINE int int_floorlog2(int a) { + int l; + for (l = 0; a > 1; l++) { + a >>= 1; + } + return l; +} +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif diff --git a/contrib/media/updf/include/inttypes.h b/contrib/media/updf/include/inttypes.h new file mode 100644 index 0000000000..142e2a5f16 --- /dev/null +++ b/contrib/media/updf/include/inttypes.h @@ -0,0 +1,251 @@ +#ifndef _INTTYPES_H +#define _INTTYPES_H + +#include <sys/cdefs.h> +#include <endian.h> + +__BEGIN_DECLS + +# if __WORDSIZE == 64 +# define __PRI64_PREFIX "l" +# define __PRIPTR_PREFIX "l" +# else +# define __PRI64_PREFIX "ll" +# define __PRIPTR_PREFIX +# endif + +/* Macros for printing format specifiers. */ + +/* Decimal notation. */ +# define PRId8 "d" +# define PRId16 "d" +# define PRId32 "d" +# define PRId64 __PRI64_PREFIX "d" + +# define PRIdLEAST8 "d" +# define PRIdLEAST16 "d" +# define PRIdLEAST32 "d" +# define PRIdLEAST64 __PRI64_PREFIX "d" + +# define PRIdFAST8 "d" +# define PRIdFAST16 "d" +# define PRIdFAST32 "d" +# define PRIdFAST64 __PRI64_PREFIX "d" + + +# define PRIi8 "i" +# define PRIi16 "i" +# define PRIi32 "i" +# define PRIi64 __PRI64_PREFIX "i" + +# define PRIiLEAST8 "i" +# define PRIiLEAST16 "i" +# define PRIiLEAST32 "i" +# define PRIiLEAST64 __PRI64_PREFIX "i" + +# define PRIiFAST8 "i" +# define PRIiFAST16 "i" +# define PRIiFAST32 "i" +# define PRIiFAST64 __PRI64_PREFIX "i" + +/* Octal notation. */ +# define PRIo8 "o" +# define PRIo16 "o" +# define PRIo32 "o" +# define PRIo64 __PRI64_PREFIX "o" + +# define PRIoLEAST8 "o" +# define PRIoLEAST16 "o" +# define PRIoLEAST32 "o" +# define PRIoLEAST64 __PRI64_PREFIX "o" + +# define PRIoFAST8 "o" +# define PRIoFAST16 "o" +# define PRIoFAST32 "o" +# define PRIoFAST64 __PRI64_PREFIX "o" + +/* Unsigned integers. */ +# define PRIu8 "u" +# define PRIu16 "u" +# define PRIu32 "u" +# define PRIu64 __PRI64_PREFIX "u" + +# define PRIuLEAST8 "u" +# define PRIuLEAST16 "u" +# define PRIuLEAST32 "u" +# define PRIuLEAST64 __PRI64_PREFIX "u" + +# define PRIuFAST8 "u" +# define PRIuFAST16 "u" +# define PRIuFAST32 "u" +# define PRIuFAST64 __PRI64_PREFIX "u" + +/* lowercase hexadecimal notation. */ +# define PRIx8 "x" +# define PRIx16 "x" +# define PRIx32 "x" +# define PRIx64 __PRI64_PREFIX "x" + +# define PRIxLEAST8 "x" +# define PRIxLEAST16 "x" +# define PRIxLEAST32 "x" +# define PRIxLEAST64 __PRI64_PREFIX "x" + +# define PRIxFAST8 "x" +# define PRIxFAST16 "x" +# define PRIxFAST32 "x" +# define PRIxFAST64 __PRI64_PREFIX "x" + +/* UPPERCASE hexadecimal notation. */ +# define PRIX8 "X" +# define PRIX16 "X" +# define PRIX32 "X" +# define PRIX64 __PRI64_PREFIX "X" + +# define PRIXLEAST8 "X" +# define PRIXLEAST16 "X" +# define PRIXLEAST32 "X" +# define PRIXLEAST64 __PRI64_PREFIX "X" + +# define PRIXFAST8 "X" +# define PRIXFAST16 "X" +# define PRIXFAST32 "X" +# define PRIXFAST64 __PRI64_PREFIX "X" + + +/* Macros for printing `intmax_t' and `uintmax_t'. */ +# define PRIdMAX __PRI64_PREFIX "d" +# define PRIiMAX __PRI64_PREFIX "i" +# define PRIoMAX __PRI64_PREFIX "o" +# define PRIuMAX __PRI64_PREFIX "u" +# define PRIxMAX __PRI64_PREFIX "x" +# define PRIXMAX __PRI64_PREFIX "X" + + +/* Macros for printing `intptr_t' and `uintptr_t'. */ +# define PRIdPTR __PRIPTR_PREFIX "d" +# define PRIiPTR __PRIPTR_PREFIX "i" +# define PRIoPTR __PRIPTR_PREFIX "o" +# define PRIuPTR __PRIPTR_PREFIX "u" +# define PRIxPTR __PRIPTR_PREFIX "x" +# define PRIXPTR __PRIPTR_PREFIX "X" + + +/* Macros for scanning format specifiers. */ + +/* Signed decimal notation. */ +# define SCNd8 "hhd" +# define SCNd16 "hd" +# define SCNd32 "d" +# define SCNd64 __PRI64_PREFIX "d" + +# define SCNdLEAST8 "hhd" +# define SCNdLEAST16 "hd" +# define SCNdLEAST32 "d" +# define SCNdLEAST64 __PRI64_PREFIX "d" + +# define SCNdFAST8 "hhd" +# define SCNdFAST16 __PRIPTR_PREFIX "d" +# define SCNdFAST32 __PRIPTR_PREFIX "d" +# define SCNdFAST64 __PRI64_PREFIX "d" + +/* Signed decimal notation. */ +# define SCNi8 "hhi" +# define SCNi16 "hi" +# define SCNi32 "i" +# define SCNi64 __PRI64_PREFIX "i" + +# define SCNiLEAST8 "hhi" +# define SCNiLEAST16 "hi" +# define SCNiLEAST32 "i" +# define SCNiLEAST64 __PRI64_PREFIX "i" + +# define SCNiFAST8 "hhi" +# define SCNiFAST16 __PRIPTR_PREFIX "i" +# define SCNiFAST32 __PRIPTR_PREFIX "i" +# define SCNiFAST64 __PRI64_PREFIX "i" + +/* Unsigned decimal notation. */ +# define SCNu8 "hhu" +# define SCNu16 "hu" +# define SCNu32 "u" +# define SCNu64 __PRI64_PREFIX "u" + +# define SCNuLEAST8 "hhu" +# define SCNuLEAST16 "hu" +# define SCNuLEAST32 "u" +# define SCNuLEAST64 __PRI64_PREFIX "u" + +# define SCNuFAST8 "hhu" +# define SCNuFAST16 __PRIPTR_PREFIX "u" +# define SCNuFAST32 __PRIPTR_PREFIX "u" +# define SCNuFAST64 __PRI64_PREFIX "u" + +/* Octal notation. */ +# define SCNo8 "hho" +# define SCNo16 "ho" +# define SCNo32 "o" +# define SCNo64 __PRI64_PREFIX "o" + +# define SCNoLEAST8 "hho" +# define SCNoLEAST16 "ho" +# define SCNoLEAST32 "o" +# define SCNoLEAST64 __PRI64_PREFIX "o" + +# define SCNoFAST8 "hho" +# define SCNoFAST16 __PRIPTR_PREFIX "o" +# define SCNoFAST32 __PRIPTR_PREFIX "o" +# define SCNoFAST64 __PRI64_PREFIX "o" + +/* Hexadecimal notation. */ +# define SCNx8 "hhx" +# define SCNx16 "hx" +# define SCNx32 "x" +# define SCNx64 __PRI64_PREFIX "x" + +# define SCNxLEAST8 "hhx" +# define SCNxLEAST16 "hx" +# define SCNxLEAST32 "x" +# define SCNxLEAST64 __PRI64_PREFIX "x" + +# define SCNxFAST8 "hhx" +# define SCNxFAST16 __PRIPTR_PREFIX "x" +# define SCNxFAST32 __PRIPTR_PREFIX "x" +# define SCNxFAST64 __PRI64_PREFIX "x" + + +/* Macros for scanning `intmax_t' and `uintmax_t'. */ +# define SCNdMAX __PRI64_PREFIX "d" +# define SCNiMAX __PRI64_PREFIX "i" +# define SCNoMAX __PRI64_PREFIX "o" +# define SCNuMAX __PRI64_PREFIX "u" +# define SCNxMAX __PRI64_PREFIX "x" + +/* Macros for scanning `intptr_t' and `uintptr_t'. */ +# define SCNdPTR __PRIPTR_PREFIX "d" +# define SCNiPTR __PRIPTR_PREFIX "i" +# define SCNoPTR __PRIPTR_PREFIX "o" +# define SCNuPTR __PRIPTR_PREFIX "u" +# define SCNxPTR __PRIPTR_PREFIX "x" + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +typedef signed long int intptr_t; +typedef unsigned long int uintptr_t; + +#ifndef __STRICT_ANSI__ +__extension__ typedef signed long long int64_t; +__extension__ typedef unsigned long long uint64_t; +__extension__ typedef signed long long int intmax_t; +__extension__ typedef unsigned long long int uintmax_t; +#endif + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/io.h b/contrib/media/updf/include/io.h new file mode 100644 index 0000000000..863555c82d --- /dev/null +++ b/contrib/media/updf/include/io.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_io_h_ +#define __dj_include_io_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <sys/types.h> +#include <dos.h> + +int chsize(int handle, long size); +int _close(int _fd); +int _creat(const char *_path, int _attrib); +int _creatnew(const char *_path, int _attrib, int _mode); +ssize_t crlf2nl(char *_buffer, ssize_t _length); +int _dos_lock(int _fd, long _offset, long _length); +long filelength(int _handle); +short _get_dev_info(int _arg); +int lock(int _fd, long _offset, long _length); +int _open(const char *_path, int _oflag); +ssize_t _read(int _fd, void *_buf, size_t _nbyte); +int setmode(int _fd, int _newmode); +off_t tell(int _fd); +int _dos_unlock(int _fd, long _offset, long _length); +int unlock(int _fd, long _offset, long _length); +ssize_t _write(int _fd, const void *_buf, size_t _nbyte); +int _chmod(const char *_path, int _func, ...); +void _flush_disk_cache(void); + +#define sopen(path, access, shflag, mode) \ + open((path), (access)|(shflag), (mode)) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_io_h_ */ diff --git a/contrib/media/updf/include/iomanip b/contrib/media/updf/include/iomanip new file mode 100644 index 0000000000..2aa00fa9de --- /dev/null +++ b/contrib/media/updf/include/iomanip @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOMANIP +#include <bits/std_iomanip.h> +#endif diff --git a/contrib/media/updf/include/ios b/contrib/media/updf/include/ios new file mode 100644 index 0000000000..ff398de068 --- /dev/null +++ b/contrib/media/updf/include/ios @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOS +#include <bits/std_ios.h> +#endif diff --git a/contrib/media/updf/include/iosfwd b/contrib/media/updf/include/iosfwd new file mode 100644 index 0000000000..3756982abe --- /dev/null +++ b/contrib/media/updf/include/iosfwd @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOSFWD +#include <bits/std_iosfwd.h> +#endif diff --git a/contrib/media/updf/include/iostream b/contrib/media/updf/include/iostream new file mode 100644 index 0000000000..0b419eb9b3 --- /dev/null +++ b/contrib/media/updf/include/iostream @@ -0,0 +1,121 @@ +#ifndef _IOSTREAM_INCLUDED +#define _IOSTREAM_INCLUDED +#include <cstdio> +#include <string> +namespace std +{ + class istream + { + public: + istream() {} + virtual ~istream() {} + virtual istream& operator>>(string& s)=0; + virtual operator bool() const=0; + virtual int getc()=0; + virtual unsigned tellg()=0; + virtual istream& seekg(unsigned off,ios::seek_dir dir)=0; + virtual istream& getline(char* s, unsigned n, char delim)=0; + }; + class ifstream : public istream + { + FILE* f; + public: + void open(const char* s, /*ios::open_mode*/int mode=ios::in) + {f=fopen(s,(mode&ios::binary)?"rb":"r");} + ifstream():f(NULL){} + ifstream(const char* s, /*ios::open_mode*/int mode=ios::in) + {open(s,mode);} + ~ifstream() {if (f) fclose(f);} + bool fail() const {return f==NULL?true:ferror(f)||feof(f);} + operator bool() const {return !fail();} + bool eof() const {return f==NULL?false:feof(f);} + virtual istream& seekg(unsigned off,ios::seek_dir dir) + {fseek(f,off,dir);return *this;} + ifstream& read(char* s, unsigned n) + {if (fread(s,1,n,f)!=n) f->_flag|=0200;return *this;} + virtual unsigned tellg() {return ftell(f);} + ifstream& getline(char* s, unsigned n) + {fgets(s,n,f);unsigned m=strlen(s); + if(m&&s[m-1]=='\n')s[m-1]=0;else f->_flag|=0200;return *this;} + istream& operator>>(string& s) + {char res[512];fscanf(f,"%s",res);s=res;return *this;} + virtual istream& getline(char* s, unsigned n, char delim) + { + int c; + unsigned pos=0; + for (;pos<n-1;) + { + c=fgetc(f); + if (c==EOF) break; + if (c==delim) break; + s[pos++]=c; + } + s[pos]=0; + return *this; + } + int getc(void) + { return fgetc(f); } + }; + inline istream& getline(istream& is, string& str, char delim='\n') + { + str.erase(); + while (is) + { + int c = is.getc(); + if (c == EOF || c == delim) + break; + str += c; + } + return is; + } + class istringstream : public istream + { + string s; + unsigned pos; + public: + istringstream(const char* str):s(str),pos(0) {} + istringstream(const string& str):s(str.c_str()),pos(0) {} + istringstream& operator>>(int& n) + {int x;sscanf(s.c_str()+pos,"%d%n",&n,&x);pos+=x;return *this;} + istream& operator>>(string& s) + {int x;char res[512];sscanf(s.c_str()+pos,"%s%n",res,&x);pos+=x; + s=res;return *this;} + virtual operator bool() const {return s.c_str()[pos]!=0;} + virtual int getc() + { + char c=s.c_str()[pos]; + if (c==0) + return EOF; + pos++; + return c; + } + virtual unsigned tellg() {return pos;} + virtual istream& seekg(unsigned off,ios::seek_dir dir) + { + unsigned sz=s.size(); + switch (dir) + { + case ios::beg: pos=off;break; + case ios::cur: pos+=off;break; + case ios::end: pos=sz-off;break; + } + if (pos>sz) pos=sz; + return *this; + } + virtual istream& getline(char* str, unsigned n, char delim) + { + int c; + unsigned p=0; + for (;p<n-1;) + { + c=s[pos++]; + if (c==0) {pos--;break;} + if (c==delim) break; + str[p++]=c; + } + str[p]=0; + return *this; + } + }; +} +#endif diff --git a/contrib/media/updf/include/istream b/contrib/media/updf/include/istream new file mode 100644 index 0000000000..9c6bc55eb3 --- /dev/null +++ b/contrib/media/updf/include/istream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_ISTREAM +#include <bits/std_istream.h> +#endif diff --git a/contrib/media/updf/include/itc.h b/contrib/media/updf/include/itc.h new file mode 100644 index 0000000000..b68ccd1733 --- /dev/null +++ b/contrib/media/updf/include/itc.h @@ -0,0 +1,34 @@ +#ifndef __ITC_H +#define __ITC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<stdlib.h> + +#define MSG_BUF_SZ 128 + +typedef struct __itc_msg_t +{ + char msgbuf[MSG_BUF_SZ]; + int sender_tid; + struct __itc_msg_t * next; +} itc_msg_t; + +typedef struct +{ + itc_msg_t * head; + int count; +} itc_msgq_t; + +typedef struct +{ + char * name; + int real_pid; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/iterator b/contrib/media/updf/include/iterator new file mode 100644 index 0000000000..3629ba726f --- /dev/null +++ b/contrib/media/updf/include/iterator @@ -0,0 +1,3 @@ +#ifndef _ITERATOR_INCLUDED +#define _ITERATOR_INCLUDED +#endif diff --git a/contrib/media/updf/include/j2k.h b/contrib/media/updf/include/j2k.h new file mode 100644 index 0000000000..8fc8e6dce2 --- /dev/null +++ b/contrib/media/updf/include/j2k.h @@ -0,0 +1,446 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __J2K_H +#define __J2K_H +/** +@file j2k.h +@brief The JPEG-2000 Codestream Reader/Writer (J2K) + +The functions in J2K.C have for goal to read/write the several parts of the codestream: markers and data. +*/ + +/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ +/*@{*/ + +#define J2K_CP_CSTY_PRT 0x01 +#define J2K_CP_CSTY_SOP 0x02 +#define J2K_CP_CSTY_EPH 0x04 +#define J2K_CCP_CSTY_PRT 0x01 +#define J2K_CCP_CBLKSTY_LAZY 0x01 /**< Selective arithmetic coding bypass */ +#define J2K_CCP_CBLKSTY_RESET 0x02 /**< Reset context probabilities on coding pass boundaries */ +#define J2K_CCP_CBLKSTY_TERMALL 0x04 /**< Termination on each coding pass */ +#define J2K_CCP_CBLKSTY_VSC 0x08 /**< Vertically stripe causal context */ +#define J2K_CCP_CBLKSTY_PTERM 0x10 /**< Predictable termination */ +#define J2K_CCP_CBLKSTY_SEGSYM 0x20 /**< Segmentation symbols are used */ +#define J2K_CCP_QNTSTY_NOQNT 0 +#define J2K_CCP_QNTSTY_SIQNT 1 +#define J2K_CCP_QNTSTY_SEQNT 2 + +/* ----------------------------------------------------------------------- */ + +#define J2K_MS_SOC 0xff4f /**< SOC marker value */ +#define J2K_MS_SOT 0xff90 /**< SOT marker value */ +#define J2K_MS_SOD 0xff93 /**< SOD marker value */ +#define J2K_MS_EOC 0xffd9 /**< EOC marker value */ +#define J2K_MS_SIZ 0xff51 /**< SIZ marker value */ +#define J2K_MS_COD 0xff52 /**< COD marker value */ +#define J2K_MS_COC 0xff53 /**< COC marker value */ +#define J2K_MS_RGN 0xff5e /**< RGN marker value */ +#define J2K_MS_QCD 0xff5c /**< QCD marker value */ +#define J2K_MS_QCC 0xff5d /**< QCC marker value */ +#define J2K_MS_POC 0xff5f /**< POC marker value */ +#define J2K_MS_TLM 0xff55 /**< TLM marker value */ +#define J2K_MS_PLM 0xff57 /**< PLM marker value */ +#define J2K_MS_PLT 0xff58 /**< PLT marker value */ +#define J2K_MS_PPM 0xff60 /**< PPM marker value */ +#define J2K_MS_PPT 0xff61 /**< PPT marker value */ +#define J2K_MS_SOP 0xff91 /**< SOP marker value */ +#define J2K_MS_EPH 0xff92 /**< EPH marker value */ +#define J2K_MS_CRG 0xff63 /**< CRG marker value */ +#define J2K_MS_COM 0xff64 /**< COM marker value */ +/* UniPG>> */ +#ifdef USE_JPWL +#define J2K_MS_EPC 0xff68 /**< EPC marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_EPB 0xff66 /**< EPB marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_ESD 0xff67 /**< ESD marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_RED 0xff69 /**< RED marker value (Part 11: JPEG 2000 for Wireless) */ +#endif /* USE_JPWL */ +#ifdef USE_JPSEC +#define J2K_MS_SEC 0xff65 /**< SEC marker value (Part 8: Secure JPEG 2000) */ +#define J2K_MS_INSEC 0xff94 /**< INSEC marker value (Part 8: Secure JPEG 2000) */ +#endif /* USE_JPSEC */ +/* <<UniPG */ + + +/* ----------------------------------------------------------------------- */ + +/** +Values that specify the status of the decoding process when decoding the main header. +These values may be combined with a | operator. +*/ +typedef enum J2K_STATUS { + J2K_STATE_MHSOC = 0x0001, /**< a SOC marker is expected */ + J2K_STATE_MHSIZ = 0x0002, /**< a SIZ marker is expected */ + J2K_STATE_MH = 0x0004, /**< the decoding process is in the main header */ + J2K_STATE_TPHSOT = 0x0008, /**< the decoding process is in a tile part header and expects a SOT marker */ + J2K_STATE_TPH = 0x0010, /**< the decoding process is in a tile part header */ + J2K_STATE_MT = 0x0020, /**< the EOC marker has just been read */ + J2K_STATE_NEOC = 0x0040, /**< the decoding process must not expect a EOC marker because the codestream is truncated */ + J2K_STATE_ERR = 0x0080 /**< the decoding process has encountered an error */ +} J2K_STATUS; + +/* ----------------------------------------------------------------------- */ + +/** +T2 encoding mode +*/ +typedef enum T2_MODE { + THRESH_CALC = 0, /** Function called in Rate allocation process*/ + FINAL_PASS = 1 /** Function called in Tier 2 process*/ +}J2K_T2_MODE; + +/** +Quantization stepsize +*/ +typedef struct opj_stepsize { + /** exponent */ + int expn; + /** mantissa */ + int mant; +} opj_stepsize_t; + +/** +Tile-component coding parameters +*/ +typedef struct opj_tccp { + /** coding style */ + int csty; + /** number of resolutions */ + int numresolutions; + /** code-blocks width */ + int cblkw; + /** code-blocks height */ + int cblkh; + /** code-block coding style */ + int cblksty; + /** discrete wavelet transform identifier */ + int qmfbid; + /** quantisation style */ + int qntsty; + /** stepsizes used for quantization */ + opj_stepsize_t stepsizes[J2K_MAXBANDS]; + /** number of guard bits */ + int numgbits; + /** Region Of Interest shift */ + int roishift; + /** precinct width */ + int prcw[J2K_MAXRLVLS]; + /** precinct height */ + int prch[J2K_MAXRLVLS]; +} opj_tccp_t; + +/** +Tile coding parameters : +this structure is used to store coding/decoding parameters common to all +tiles (information like COD, COC in main header) +*/ +typedef struct opj_tcp { + /** 1 : first part-tile of a tile */ + int first; + /** coding style */ + int csty; + /** progression order */ + OPJ_PROG_ORDER prg; + /** number of layers */ + int numlayers; + /** multi-component transform identifier */ + int mct; + /** rates of layers */ + float rates[100]; + /** number of progression order changes */ + int numpocs; + /** indicates if a POC marker has been used O:NO, 1:YES */ + int POC; + /** progression order changes */ + opj_poc_t pocs[32]; + /** packet header store there for futur use in t2_decode_packet */ + unsigned char *ppt_data; + /** pointer remaining on the first byte of the first header if ppt is used */ + unsigned char *ppt_data_first; + /** If ppt == 1 --> there was a PPT marker for the present tile */ + int ppt; + /** used in case of multiple marker PPT (number of info already stored) */ + int ppt_store; + /** ppmbug1 */ + int ppt_len; + /** add fixed_quality */ + float distoratio[100]; + /** tile-component coding parameters */ + opj_tccp_t *tccps; +} opj_tcp_t; + +/** +Coding parameters +*/ +typedef struct opj_cp { + /** Digital cinema profile*/ + OPJ_CINEMA_MODE cinema; + /** Maximum rate for each component. If == 0, component size limitation is not considered */ + int max_comp_size; + /** Size of the image in bits*/ + int img_size; + /** Rsiz*/ + OPJ_RSIZ_CAPABILITIES rsiz; + /** Enabling Tile part generation*/ + char tp_on; + /** Flag determining tile part generation*/ + char tp_flag; + /** Position of tile part flag in progression order*/ + int tp_pos; + /** allocation by rate/distortion */ + int disto_alloc; + /** allocation by fixed layer */ + int fixed_alloc; + /** add fixed_quality */ + int fixed_quality; + /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */ + int reduce; + /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */ + int layer; + /** if == NO_LIMITATION, decode entire codestream; if == LIMIT_TO_MAIN_HEADER then only decode the main header */ + OPJ_LIMIT_DECODING limit_decoding; + /** XTOsiz */ + int tx0; + /** YTOsiz */ + int ty0; + /** XTsiz */ + int tdx; + /** YTsiz */ + int tdy; + /** comment for coding */ + char *comment; + /** number of tiles in width */ + int tw; + /** number of tiles in heigth */ + int th; + /** ID number of the tiles present in the codestream */ + int *tileno; + /** size of the vector tileno */ + int tileno_size; + /** packet header store there for futur use in t2_decode_packet */ + unsigned char *ppm_data; + /** pointer remaining on the first byte of the first header if ppm is used */ + unsigned char *ppm_data_first; + /** if ppm == 1 --> there was a PPM marker for the present tile */ + int ppm; + /** use in case of multiple marker PPM (number of info already store) */ + int ppm_store; + /** use in case of multiple marker PPM (case on non-finished previous info) */ + int ppm_previous; + /** ppmbug1 */ + int ppm_len; + /** tile coding parameters */ + opj_tcp_t *tcps; + /** fixed layer */ + int *matrice; +/* UniPG>> */ +#ifdef USE_JPWL + /** enables writing of EPC in MH, thus activating JPWL */ + bool epc_on; + /** enables writing of EPB, in case of activated JPWL */ + bool epb_on; + /** enables writing of ESD, in case of activated JPWL */ + bool esd_on; + /** enables writing of informative techniques of ESD, in case of activated JPWL */ + bool info_on; + /** enables writing of RED, in case of activated JPWL */ + bool red_on; + /** error protection method for MH (0,1,16,32,37-128) */ + int hprot_MH; + /** tile number of header protection specification (>=0) */ + int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** error protection methods for TPHs (0,1,16,32,37-128) */ + int hprot_TPH[JPWL_MAX_NO_TILESPECS]; + /** tile number of packet protection specification (>=0) */ + int pprot_tileno[JPWL_MAX_NO_PACKSPECS]; + /** packet number of packet protection specification (>=0) */ + int pprot_packno[JPWL_MAX_NO_PACKSPECS]; + /** error protection methods for packets (0,1,16,32,37-128) */ + int pprot[JPWL_MAX_NO_PACKSPECS]; + /** enables writing of ESD, (0/2/4 bytes) */ + int sens_size; + /** sensitivity addressing size (0=auto/2/4 bytes) */ + int sens_addr; + /** sensitivity range (0-3) */ + int sens_range; + /** sensitivity method for MH (-1,0-7) */ + int sens_MH; + /** tile number of sensitivity specification (>=0) */ + int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** sensitivity methods for TPHs (-1,0-7) */ + int sens_TPH[JPWL_MAX_NO_TILESPECS]; + /** enables JPWL correction at the decoder */ + bool correct; + /** expected number of components at the decoder */ + int exp_comps; + /** maximum number of tiles at the decoder */ + int max_tiles; +#endif /* USE_JPWL */ +/* <<UniPG */ +} opj_cp_t; + +/** +JPEG-2000 codestream reader/writer +*/ +typedef struct opj_j2k { + /** codec context */ + opj_common_ptr cinfo; + + /** locate in which part of the codestream the decoder is (main header, tile header, end) */ + int state; + /** number of the tile curently concern by coding/decoding */ + int curtileno; + /** Tile part number*/ + int tp_num; + /** Tilepart number currently coding*/ + int cur_tp_num; + /** Total number of tileparts of the current tile*/ + int *cur_totnum_tp; + /** + locate the start position of the TLM marker + after encoding the tilepart, a jump (in j2k_write_sod) is done to the TLM marker to store the value of its length. + */ + int tlm_start; + /** Total num of tile parts in whole image = num tiles* num tileparts in each tile*/ + /** used in TLMmarker*/ + int totnum_tp; + /** + locate the position of the end of the tile in the codestream, + used to detect a truncated codestream (in j2k_read_sod) + */ + unsigned char *eot; + /** + locate the start position of the SOT marker of the current coded tile: + after encoding the tile, a jump (in j2k_write_sod) is done to the SOT marker to store the value of its length. + */ + int sot_start; + int sod_start; + /** + as the J2K-file is written in several parts during encoding, + it enables to make the right correction in position return by cio_tell + */ + int pos_correction; + /** array used to store the data of each tile */ + unsigned char **tile_data; + /** array used to store the length of each tile */ + int *tile_len; + /** + decompression only : + store decoding parameters common to all tiles (information like COD, COC in main header) + */ + opj_tcp_t *default_tcp; + /** pointer to the encoded / decoded image */ + opj_image_t *image; + /** pointer to the coding parameters */ + opj_cp_t *cp; + /** helper used to write the index file */ + opj_codestream_info_t *cstr_info; + /** pointer to the byte i/o stream */ + opj_cio_t *cio; +} opj_j2k_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Creates a J2K decompression structure +@param cinfo Codec context info +@return Returns a handle to a J2K decompressor if successful, returns NULL otherwise +*/ +opj_j2k_t* j2k_create_decompress(opj_common_ptr cinfo); +/** +Destroy a J2K decompressor handle +@param j2k J2K decompressor handle to destroy +*/ +void j2k_destroy_decompress(opj_j2k_t *j2k); +/** +Setup the decoder decoding parameters using user parameters. +Decoding parameters are returned in j2k->cp. +@param j2k J2K decompressor handle +@param parameters decompression parameters +*/ +void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 codestream +@param j2k J2K decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Decode an image form a JPT-stream (JPEG 2000, JPIP) +@param j2k J2K decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a J2K compression structure +@param cinfo Codec context info +@return Returns a handle to a J2K compressor if successful, returns NULL otherwise +*/ +opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo); +/** +Destroy a J2K compressor handle +@param j2k J2K compressor handle to destroy +*/ +void j2k_destroy_compress(opj_j2k_t *j2k); +/** +Setup the encoder parameters using the current image and using user parameters. +Coding parameters are returned in j2k->cp. +@param j2k J2K compressor handle +@param parameters compression parameters +@param image input filled image +*/ +void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image); +/** +Converts an enum type progression order to string type +*/ +char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order); +/** +Encode an image into a JPEG-2000 codestream +@param j2k J2K compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __J2K_H */ diff --git a/contrib/media/updf/include/j2k_lib.h b/contrib/media/updf/include/j2k_lib.h new file mode 100644 index 0000000000..7df4d36775 --- /dev/null +++ b/contrib/media/updf/include/j2k_lib.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __J2K_LIB_H +#define __J2K_LIB_H +/** +@file j2k_lib.h +@brief Internal functions + +The functions in J2K_LIB.C are internal utilities mainly used for timing. +*/ + +/** @defgroup MISC MISC - Miscellaneous internal functions */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Difference in successive opj_clock() calls tells you the elapsed time +@return Returns time in seconds +*/ +double opj_clock(void); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __J2K_LIB_H */ + diff --git a/contrib/media/updf/include/jbig2.h b/contrib/media/updf/include/jbig2.h new file mode 100644 index 0000000000..c090516f6b --- /dev/null +++ b/contrib/media/updf/include/jbig2.h @@ -0,0 +1,135 @@ +/* + jbig2dec + + Copyright (C) 2002-2005 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _JBIG2_H +#define _JBIG2_H + +/* warning levels */ +typedef enum { + JBIG2_SEVERITY_DEBUG, + JBIG2_SEVERITY_INFO, + JBIG2_SEVERITY_WARNING, + JBIG2_SEVERITY_FATAL +} Jbig2Severity; + +typedef enum { + JBIG2_OPTIONS_EMBEDDED = 1 +} Jbig2Options; + +/* forward public structure declarations */ +typedef struct _Jbig2Allocator Jbig2Allocator; +typedef struct _Jbig2Ctx Jbig2Ctx; +typedef struct _Jbig2GlobalCtx Jbig2GlobalCtx; +typedef struct _Jbig2Segment Jbig2Segment; +typedef struct _Jbig2Image Jbig2Image; + +/* private structures */ +typedef struct _Jbig2Page Jbig2Page; +typedef struct _Jbig2SymbolDictionary Jbig2SymbolDictionary; + +/* + this is the general image structure used by the jbig2dec library + images are 1 bpp, packed into rows a byte at a time. stride gives + the byte offset to the next row, while width and height define + the size of the image area in pixels. +*/ + +struct _Jbig2Image { + int width, height, stride; + uint8_t *data; + int refcount; +}; + +Jbig2Image* jbig2_image_new(Jbig2Ctx *ctx, int width, int height); +Jbig2Image* jbig2_image_clone(Jbig2Ctx *ctx, Jbig2Image *image); +void jbig2_image_release(Jbig2Ctx *ctx, Jbig2Image *image); +void jbig2_image_free(Jbig2Ctx *ctx, Jbig2Image *image); +void jbig2_image_clear(Jbig2Ctx *ctx, Jbig2Image *image, int value); +Jbig2Image *jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image, + int width, int height); + +/* errors are returned from the library via a callback. If no callback + is provided (a NULL argument is passed ot jbig2_ctx_new) a default + handler is used which prints fatal errors to the stderr stream. */ + +/* error callback */ +typedef int (*Jbig2ErrorCallback) (void *data, + const char *msg, Jbig2Severity severity, + int32_t seg_idx); + +/* memory allocation is likewise done via a set of callbacks so that + clients can better control memory usage. If a NULL is passed for + this argumennt of jbig2_ctx_new, a default allocator based on malloc() + is used. */ + +/* dynamic memory callbacks */ +struct _Jbig2Allocator { + void *(*alloc) (Jbig2Allocator *allocator, size_t size); + void (*free) (Jbig2Allocator *allocator, void *p); + void *(*realloc) (Jbig2Allocator *allocator, void *p, size_t size); +}; + +/* decoder context */ +Jbig2Ctx *jbig2_ctx_new (Jbig2Allocator *allocator, + Jbig2Options options, + Jbig2GlobalCtx *global_ctx, + Jbig2ErrorCallback error_callback, + void *error_callback_data); +void jbig2_ctx_free (Jbig2Ctx *ctx); + +/* global context for embedded streams */ +Jbig2GlobalCtx *jbig2_make_global_ctx (Jbig2Ctx *ctx); +void jbig2_global_ctx_free (Jbig2GlobalCtx *global_ctx); + +/* submit data to the decoder */ +int jbig2_data_in (Jbig2Ctx *ctx, const unsigned char *data, size_t size); + +/* get the next available decoded page image. NULL means there isn't one. */ +Jbig2Image *jbig2_page_out (Jbig2Ctx *ctx); +/* mark a returned page image as no longer needed. */ +int jbig2_release_page (Jbig2Ctx *ctx, Jbig2Image *image); +/* mark the current page as complete, simulating an end-of-page segment (for broken streams) */ +int jbig2_complete_page (Jbig2Ctx *ctx); + + +/* segment header routines */ + +struct _Jbig2Segment { + uint32_t number; + uint8_t flags; + uint32_t page_association; + size_t data_length; + int referred_to_segment_count; + uint32_t *referred_to_segments; + void *result; +}; + +Jbig2Segment *jbig2_parse_segment_header (Jbig2Ctx *ctx, uint8_t *buf, size_t buf_size, + size_t *p_header_size); +int jbig2_parse_segment (Jbig2Ctx *ctx, Jbig2Segment *segment, + const uint8_t *segment_data); +void jbig2_free_segment (Jbig2Ctx *ctx, Jbig2Segment *segment); + +Jbig2Segment *jbig2_find_segment(Jbig2Ctx *ctx, uint32_t number); + +#endif /* _JBIG2_H */ + +#ifdef __cplusplus +} +#endif diff --git a/contrib/media/updf/include/jbig2_arith.h b/contrib/media/updf/include/jbig2_arith.h new file mode 100644 index 0000000000..317878f57b --- /dev/null +++ b/contrib/media/updf/include/jbig2_arith.h @@ -0,0 +1,31 @@ +/* + jbig2dec + + Copyright (C) 2001 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +typedef struct _Jbig2ArithState Jbig2ArithState; + +/* An arithmetic coding context is stored as a single byte, with the + index in the low order 7 bits (actually only 6 are used), and the + MPS in the top bit. */ +typedef unsigned char Jbig2ArithCx; + +/* allocate and initialize a new arithmetic coding state */ +Jbig2ArithState * +jbig2_arith_new (Jbig2Ctx *ctx, Jbig2WordStream *ws); + +/* decode a bit */ +bool +jbig2_arith_decode (Jbig2ArithState *as, Jbig2ArithCx *pcx); + + diff --git a/contrib/media/updf/include/jbig2_arith_iaid.h b/contrib/media/updf/include/jbig2_arith_iaid.h new file mode 100644 index 0000000000..c04f898a81 --- /dev/null +++ b/contrib/media/updf/include/jbig2_arith_iaid.h @@ -0,0 +1,26 @@ +/* + jbig2dec + + Copyright (C) 2001 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +typedef struct _Jbig2ArithIaidCtx Jbig2ArithIaidCtx; + +Jbig2ArithIaidCtx * +jbig2_arith_iaid_ctx_new(Jbig2Ctx *ctx, int SBSYMCODELEN); + +int +jbig2_arith_iaid_decode(Jbig2ArithIaidCtx *ctx, Jbig2ArithState *as, + int32_t *p_result); + +void +jbig2_arith_iaid_ctx_free(Jbig2Ctx *ctx, Jbig2ArithIaidCtx *iax); diff --git a/contrib/media/updf/include/jbig2_arith_int.h b/contrib/media/updf/include/jbig2_arith_int.h new file mode 100644 index 0000000000..3d3cb3f9c1 --- /dev/null +++ b/contrib/media/updf/include/jbig2_arith_int.h @@ -0,0 +1,26 @@ +/* + jbig2dec + + Copyright (C) 2001 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +typedef struct _Jbig2ArithIntCtx Jbig2ArithIntCtx; + +Jbig2ArithIntCtx * +jbig2_arith_int_ctx_new(Jbig2Ctx *ctx); + +int +jbig2_arith_int_decode(Jbig2ArithIntCtx *ctx, Jbig2ArithState *as, + int32_t *p_result); + +void +jbig2_arith_int_ctx_free(Jbig2Ctx *ctx, Jbig2ArithIntCtx *iax); diff --git a/contrib/media/updf/include/jbig2_generic.h b/contrib/media/updf/include/jbig2_generic.h new file mode 100644 index 0000000000..9111cf7d39 --- /dev/null +++ b/contrib/media/updf/include/jbig2_generic.h @@ -0,0 +1,62 @@ +/* + jbig2dec + + Copyright (C) 2002-2004 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +/** + * Headers for Generic and Generic Refinement region handling + **/ + +/* 6.4 Table 2 */ +typedef struct { + bool MMR; + /* GBW */ + /* GBH */ + int GBTEMPLATE; + bool TPGDON; + bool USESKIP; + /* SKIP */ + int8_t gbat[8]; +} Jbig2GenericRegionParams; + +/* return the appropriate context size for the given template */ +int +jbig2_generic_stats_size(Jbig2Ctx *ctx, int template); + +int +jbig2_decode_generic_region(Jbig2Ctx *ctx, + Jbig2Segment *segment, + const Jbig2GenericRegionParams *params, + Jbig2ArithState *as, + Jbig2Image *image, + Jbig2ArithCx *GB_stats); + + +/* 6.3 Table 6 */ +typedef struct { + /* GRW */ + /* GRH */ + bool GRTEMPLATE; + Jbig2Image *reference; + int32_t DX, DY; + bool TPGRON; + int8_t grat[4]; +} Jbig2RefinementRegionParams; + +int +jbig2_decode_refinement_region(Jbig2Ctx *ctx, + Jbig2Segment *segment, + const Jbig2RefinementRegionParams *params, + Jbig2ArithState *as, + Jbig2Image *image, + Jbig2ArithCx *GB_stats); diff --git a/contrib/media/updf/include/jbig2_huffman.h b/contrib/media/updf/include/jbig2_huffman.h new file mode 100644 index 0000000000..fb9b9f41d6 --- /dev/null +++ b/contrib/media/updf/include/jbig2_huffman.h @@ -0,0 +1,105 @@ +/* + jbig2dec + + Copyright (C) 2001-2005 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +#ifndef JBIG2_HUFFMAN_H +#define JBIG2_HUFFMAN_H + +/* Huffman coder interface */ + +typedef struct _Jbig2HuffmanEntry Jbig2HuffmanEntry; +typedef struct _Jbig2HuffmanState Jbig2HuffmanState; +typedef struct _Jbig2HuffmanTable Jbig2HuffmanTable; +typedef struct _Jbig2HuffmanParams Jbig2HuffmanParams; + +struct _Jbig2HuffmanEntry { + union { + int32_t RANGELOW; + Jbig2HuffmanTable *ext_table; + } u; + byte PREFLEN; + byte RANGELEN; + byte flags; +}; + +struct _Jbig2HuffmanTable { + int log_table_size; + Jbig2HuffmanEntry *entries; +}; + +typedef struct _Jbig2HuffmanLine Jbig2HuffmanLine; + +struct _Jbig2HuffmanLine { + int PREFLEN; + int RANGELEN; + int RANGELOW; +}; + +struct _Jbig2HuffmanParams { + bool HTOOB; + int n_lines; + const Jbig2HuffmanLine *lines; +}; + +Jbig2HuffmanState * +jbig2_huffman_new (Jbig2Ctx *ctx, Jbig2WordStream *ws); + +void +jbig2_huffman_free (Jbig2Ctx *ctx, Jbig2HuffmanState *hs); + +void +jbig2_huffman_skip(Jbig2HuffmanState *hs); + +void jbig2_huffman_advance(Jbig2HuffmanState *hs, int offset); + +int +jbig2_huffman_offset(Jbig2HuffmanState *hs); + +int32_t +jbig2_huffman_get (Jbig2HuffmanState *hs, + const Jbig2HuffmanTable *table, bool *oob); + +int32_t +jbig2_huffman_get_bits (Jbig2HuffmanState *hs, const int bits); + +#ifdef JBIG2_DEBUG +void jbig2_dump_huffman_state(Jbig2HuffmanState *hs); +void jbig2_dump_huffman_binary(Jbig2HuffmanState *hs); +#endif + +Jbig2HuffmanTable * +jbig2_build_huffman_table (Jbig2Ctx *ctx, const Jbig2HuffmanParams *params); + +void +jbig2_release_huffman_table (Jbig2Ctx *ctx, Jbig2HuffmanTable *table); + +/* standard Huffman templates defined by the specification */ +extern const Jbig2HuffmanParams jbig2_huffman_params_A; /* Table B.1 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_B; /* Table B.2 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_C; /* Table B.3 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_D; /* Table B.4 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_E; /* Table B.5 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_F; /* Table B.6 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_G; /* Table B.7 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_H; /* Table B.8 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_I; /* Table B.9 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_J; /* Table B.10 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_K; /* Table B.11 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_L; /* Table B.12 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_M; /* Table B.13 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_N; /* Table B.14 */ +extern const Jbig2HuffmanParams jbig2_huffman_params_O; /* Table B.15 */ + + +#endif /* JBIG2_HUFFMAN_H */ diff --git a/contrib/media/updf/include/jbig2_hufftab.h b/contrib/media/updf/include/jbig2_hufftab.h new file mode 100644 index 0000000000..c8a967ac41 --- /dev/null +++ b/contrib/media/updf/include/jbig2_hufftab.h @@ -0,0 +1,335 @@ +/* + jbig2dec + + Copyright (C) 2001-2005 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +/* predefined Huffman table definitions + -- See Annex B of the JBIG2 specification */ + +#ifndef JBIG2_HUFFTAB_H +#define JBIG2_HUFFTAB_H + +/* types are in jbig2_huffman.h, you must include that first */ + + +/* Table B.1 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_A[] = { + { 1, 4, 0 }, + { 2, 8, 16 }, + { 3, 16, 272 }, + { 0, 32, -1 }, /* low */ + { 3, 32, 65808 } /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_A = { FALSE, 5, jbig2_huffman_lines_A }; + +/* Table B.2 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_B[] = { + { 1, 0, 0 }, + { 2, 0, 1 }, + { 3, 0, 2 }, + { 4, 3, 3 }, + { 5, 6, 11 }, + { 0, 32, -1 }, /* low */ + { 6, 32, 75 }, /* high */ + { 6, 0, 0 } +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_B = { TRUE, 8, jbig2_huffman_lines_B }; + +/* Table B.3 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_C[] = { + { 8, 8, -256 }, + { 1, 0, 0 }, + { 2, 0, 1 }, + { 3, 0, 2 }, + { 4, 3, 3 }, + { 5, 6, 11 }, + { 8, 32, -257 }, /* low */ + { 7, 32, 75 }, /* high */ + { 6, 0, 0 } /* OOB */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_C = { TRUE, 9, jbig2_huffman_lines_C }; + +/* Table B.4 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_D[] = { + { 1, 0, 1 }, + { 2, 0, 2 }, + { 3, 0, 3 }, + { 4, 3, 4 }, + { 5, 6, 12 }, + { 0, 32, -1 }, /* low */ + { 5, 32, 76 }, /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_D = { FALSE, 7, jbig2_huffman_lines_D }; + +/* Table B.5 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_E[] = { + {7, 8, -255}, + {1, 0, 1}, + {2, 0, 2}, + {3, 0, 3}, + {4, 3, 4}, + {5, 6, 12}, + {7, 32, -256}, /* low */ + {6, 32, 76} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_E = { FALSE, 8, jbig2_huffman_lines_E }; + +/* Table B.6 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_F[] = { + {5, 10, -2048}, + {4, 9, -1024}, + {4, 8, -512}, + {4, 7, -256}, + {5, 6, -128}, + {5, 5, -64}, + {4, 5, -32}, + {2, 7, 0}, + {3, 7, 128}, + {3, 8, 256}, + {4, 9, 512}, + {4, 10, 1024}, + {6, 32, -2049}, /* low */ + {6, 32, 2048} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_F = { FALSE, 14, jbig2_huffman_lines_F }; + +/* Table B.7 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_G[] = { + {4, 9, -1024}, + {3, 8, -512}, + {4, 7, -256}, + {5, 6, -128}, + {5, 5, -64}, + {4, 5, -32}, + {4, 5, 0}, + {5, 5, 32}, + {5, 6, 64}, + {4, 7, 128}, + {3, 8, 256}, + {3, 9, 512}, + {3, 10, 1024}, + {5, 32, -1025}, /* low */ + {5, 32, 2048} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_G = { FALSE, 15, jbig2_huffman_lines_G }; + +/* Table B.8 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_H[] = { + {8, 3, -15}, + {9, 1, -7}, + {8, 1, -5}, + {9, 0, -3}, + {7, 0, -2}, + {4, 0, -1}, + {2, 1, 0}, + {5, 0, 2}, + {6, 0, 3}, + {3, 4, 4}, + {6, 1, 20}, + {4, 4, 22}, + {4, 5, 38}, + {5, 6, 70}, + {5, 7, 134}, + {6, 7, 262}, + {7, 8, 390}, + {6, 10, 646}, + {9, 32, -16}, /* low */ + {9, 32, 1670}, /* high */ + {2, 0, 0} /* OOB */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_H = { TRUE, 21, jbig2_huffman_lines_H }; + +/* Table B.9 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_I[] = { + {8, 4, -31}, + {9, 2, -15}, + {8, 2, -11}, + {9, 1, -7}, + {7, 1, -5}, + {4, 1, -3}, + {3, 1, -1}, + {3, 1, 1}, + {5, 1, 3}, + {6, 1, 5}, + {3, 5, 7}, + {6, 2, 39}, + {4, 5, 43}, + {4, 6, 75}, + {5, 7, 139}, + {5, 8, 267}, + {6, 8, 523}, + {7, 9, 779}, + {6, 11, 1291}, + {9, 32, -32}, /* low */ + {9, 32, 3339}, /* high */ + {2, 0, 0} /* OOB */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_I = { TRUE, 22, jbig2_huffman_lines_I }; + +/* Table B.10 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_J[] = { + {7, 4, -21}, + {8, 0, -5}, + {7, 0, -4}, + {5, 0, -3}, + {2, 2, -2}, + {5, 0, 2}, + {6, 0, 3}, + {7, 0, 4}, + {8, 0, 5}, + {2, 6, 6}, + {5, 5, 70}, + {6, 5, 102}, + {6, 6, 134}, + {6, 7, 198}, + {6, 8, 326}, + {6, 9, 582}, + {6, 10, 1094}, + {7, 11, 2118}, + {8, 32, -22}, /* low */ + {8, 32, 4166}, /* high */ + {2, 0, 0} /* OOB */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_J = { TRUE, 21, jbig2_huffman_lines_J }; + +/* Table B.11 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_K[] = { + {1, 0, 1}, + {2, 1, 2}, + {4, 0, 3}, + {4, 1, 5}, + {5, 1, 7}, + {5, 2, 9}, + {6, 2, 13}, + {7, 2, 17}, + {7, 3, 21}, + {7, 4, 29}, + {7, 5, 45}, + {7, 6, 77}, + {7, 32, 141} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_K = { FALSE, 13, jbig2_huffman_lines_K }; + +/* Table B.12 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_L[] = { + {1, 0, 1}, + {2, 0, 2}, + {3, 1, 3}, + {5, 0, 5}, + {5, 1, 6}, + {6, 1, 8}, + {7, 0, 10}, + {7, 1, 11}, + {7, 2, 13}, + {7, 3, 17}, + {7, 4, 25}, + {8, 5, 41}, + {8, 32, 73} +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_L = { FALSE, 13, jbig2_huffman_lines_L }; + + +/* Table B.13 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_M[] = { + {1, 0, 1}, + {3, 0, 2}, + {4, 0, 3}, + {5, 0, 4}, + {4, 1, 5}, + {3, 3, 7}, + {6, 1, 15}, + {6, 2, 17}, + {6, 3, 21}, + {6, 4, 29}, + {6, 5, 45}, + {7, 6, 77}, + {7, 32, 141} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_M = { FALSE, 13, jbig2_huffman_lines_M }; + +/* Table B.14 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_N[] = { + { 3, 0, -2 }, + { 3, 0, -1 }, + { 1, 0, 0 }, + { 3, 3, 1 }, + { 3, 6, 2 }, + { 0, 32, -1 }, /* low */ + { 0, 32, 3 }, /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_N = { FALSE, 7, jbig2_huffman_lines_N }; + +/* Table B.15 */ +const Jbig2HuffmanLine +jbig2_huffman_lines_O[] = { + {7, 4, -24}, + {6, 2, -8}, + {5, 1, -4}, + {4, 0, -2}, + {3, 0, -1}, + {1, 0, 0}, + {3, 0, 1}, + {4, 0, 2}, + {5, 1, 3}, + {6, 2, 5}, + {7, 4, 9}, + {7, 32, -25}, /* low */ + {7, 32, 25} /* high */ +}; + +const Jbig2HuffmanParams +jbig2_huffman_params_O = { FALSE, 13, jbig2_huffman_lines_O }; + +#endif /* JBIG2_HUFFTAB_H */ diff --git a/contrib/media/updf/include/jbig2_image.h b/contrib/media/updf/include/jbig2_image.h new file mode 100644 index 0000000000..a09e368208 --- /dev/null +++ b/contrib/media/updf/include/jbig2_image.h @@ -0,0 +1,38 @@ +/* + jbig2dec + + Copyright (C) 2001-2002 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + + +#ifndef _JBIG2_IMAGE_H +#define _JBIG2_IMAGE_H + +int jbig2_image_get_pixel(Jbig2Image *image, int x, int y); +int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, int value); + +/* routines for dumping the image data in various formats */ +/* FIXME: should these be in the client instead? */ + +#include <stdio.h> + +int jbig2_image_write_pbm_file(Jbig2Image *image, char *filename); +int jbig2_image_write_pbm(Jbig2Image *image, FILE *out); +Jbig2Image *jbig2_image_read_pbm_file(Jbig2Ctx *ctx, char *filename); +Jbig2Image *jbig2_image_read_pbm(Jbig2Ctx *ctx, FILE *in); + +#ifdef HAVE_LIBPNG +int jbig2_image_write_png_file(Jbig2Image *image, char *filename); +int jbig2_image_write_png(Jbig2Image *image, FILE *out); +#endif + +#endif /* _JBIG2_IMAGE_H */ diff --git a/contrib/media/updf/include/jbig2_metadata.h b/contrib/media/updf/include/jbig2_metadata.h new file mode 100644 index 0000000000..d61acab758 --- /dev/null +++ b/contrib/media/updf/include/jbig2_metadata.h @@ -0,0 +1,48 @@ +/* + jbig2dec + + Copyright (C) 2003 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + + +#ifndef _JBIG2_METADATA_H +#define _JBIG2_METADATA_H + +/* metadata from extension segments */ + +/* these bits should be moved to jbig2.h for public access */ +typedef enum { + JBIG2_ENCODING_ASCII, + JBIG2_ENCODING_UCS16 +} Jbig2Encoding; + +typedef struct _Jbig2Metadata Jbig2Metadata; + +Jbig2Metadata *jbig2_metadata_new(Jbig2Ctx *ctx, Jbig2Encoding encoding); +void jbig2_metadata_free(Jbig2Ctx *ctx, Jbig2Metadata *md); +int jbig2_metadata_add(Jbig2Ctx *ctx, Jbig2Metadata *md, + const char *key, const int key_length, + const char *value, const int value_length); + +struct _Jbig2Metadata { + Jbig2Encoding encoding; + char **keys, **values; + int entries, max_entries; +}; + +/* these bits can go to jbig2_priv.h */ +int jbig2_comment_ascii(Jbig2Ctx *ctx, Jbig2Segment *segment, + const uint8_t *segment_data); +int jbig2_comment_unicode(Jbig2Ctx *ctx, Jbig2Segment *segment, + const uint8_t *segment_data); + +#endif /* _JBIG2_METADATA_H */ diff --git a/contrib/media/updf/include/jbig2_mmr.h b/contrib/media/updf/include/jbig2_mmr.h new file mode 100644 index 0000000000..cde4ec6897 --- /dev/null +++ b/contrib/media/updf/include/jbig2_mmr.h @@ -0,0 +1,22 @@ +/* + jbig2dec + + Copyright (C) 2001 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +int +jbig2_decode_generic_mmr(Jbig2Ctx *ctx, + Jbig2Segment *segment, + const Jbig2GenericRegionParams *params, + const byte *data, size_t size, + Jbig2Image *image); + diff --git a/contrib/media/updf/include/jbig2_priv.h b/contrib/media/updf/include/jbig2_priv.h new file mode 100644 index 0000000000..cf617ed068 --- /dev/null +++ b/contrib/media/updf/include/jbig2_priv.h @@ -0,0 +1,177 @@ +/* + jbig2dec + + Copyright (C) 2002 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +/* library internals */ + +typedef uint8_t byte; +typedef int bool; + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +typedef enum { + JBIG2_FILE_HEADER, + JBIG2_FILE_SEQUENTIAL_HEADER, + JBIG2_FILE_SEQUENTIAL_BODY, + JBIG2_FILE_RANDOM_HEADERS, + JBIG2_FILE_RANDOM_BODIES, + JBIG2_FILE_EOF +} Jbig2FileState; + +struct _Jbig2Ctx { + Jbig2Allocator *allocator; + Jbig2Options options; + const Jbig2Ctx *global_ctx; + Jbig2ErrorCallback error_callback; + void *error_callback_data; + + byte *buf; + size_t buf_size; + unsigned int buf_rd_ix; + unsigned int buf_wr_ix; + + Jbig2FileState state; + + uint8_t file_header_flags; + int32_t n_pages; + + int n_segments_max; + Jbig2Segment **segments; + int n_segments; /* index of last segment header parsed */ + int segment_index; /* index of last segment body parsed */ + + /* list of decoded pages, including the one in progress, + currently stored as a contiguous, 0-indexed array. */ + int current_page; + int max_page_index; + Jbig2Page *pages; +}; + +int32_t +jbig2_get_int32 (const byte *buf); + +int16_t +jbig2_get_int16 (const byte *buf); + +/* dynamic memory management */ +void * +jbig2_alloc (Jbig2Allocator *allocator, size_t size); + +void +jbig2_free (Jbig2Allocator *allocator, void *p); + +void * +jbig2_realloc (Jbig2Allocator *allocator, void *p, size_t size); + +#define jbig2_new(ctx, t, size) ((t *)jbig2_alloc(ctx->allocator, (size) * sizeof(t))) + +#define jbig2_renew(ctx, p, t, size) ((t *)jbig2_realloc(ctx->allocator, (p), (size) * sizeof(t))) + +int +jbig2_error (Jbig2Ctx *ctx, Jbig2Severity severity, int32_t seg_idx, + const char *fmt, ...); + +/* the page structure handles decoded page + results. it's allocated by a 'page info' + segement and marked complete by an 'end of page' + segment. +*/ +typedef enum { + JBIG2_PAGE_FREE, + JBIG2_PAGE_NEW, + JBIG2_PAGE_COMPLETE, + JBIG2_PAGE_RETURNED, + JBIG2_PAGE_RELEASED +} Jbig2PageState; + +struct _Jbig2Page { + Jbig2PageState state; + uint32_t number; + uint32_t height, width; /* in pixels */ + uint32_t x_resolution, + y_resolution; /* in pixels per meter */ + uint16_t stripe_size; + bool striped; + int end_row; + uint8_t flags; + Jbig2Image *image; +}; + +int jbig2_page_info (Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data); +int jbig2_end_of_stripe(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data); +int jbig2_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data); +int jbig2_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data); + +typedef enum { + JBIG2_COMPOSE_OR = 0, + JBIG2_COMPOSE_AND = 1, + JBIG2_COMPOSE_XOR = 2, + JBIG2_COMPOSE_XNOR = 3, + JBIG2_COMPOSE_REPLACE = 4 +} Jbig2ComposeOp; + +int jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int y, Jbig2ComposeOp op); +int jbig2_page_add_result(Jbig2Ctx *ctx, Jbig2Page *page, Jbig2Image *src, int x, int y, Jbig2ComposeOp op); + +/* region segment info */ + +typedef struct { + int32_t width; + int32_t height; + int32_t x; + int32_t y; + Jbig2ComposeOp op; + uint8_t flags; +} Jbig2RegionSegmentInfo; + +void jbig2_get_region_segment_info(Jbig2RegionSegmentInfo *info, const uint8_t *segment_data); +int jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data); + +/* 7.4 */ +int jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment, + const uint8_t *segment_data); +int jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, + const byte *segment_data); + +int jbig2_pattern_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, + const byte *segment_data); +int jbig2_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment, + const byte *segment_data); + + +/* The word stream design is a compromise between simplicity and + trying to amortize the number of method calls. Each ::get_next_word + invocation pulls 4 bytes from the stream, packed big-endian into a + 32 bit word. The offset argument is provided as a convenience. It + begins at 0 and increments by 4 for each successive invocation. */ +typedef struct _Jbig2WordStream Jbig2WordStream; + +struct _Jbig2WordStream { + uint32_t (*get_next_word) (Jbig2WordStream *self, int offset); +}; + +Jbig2WordStream * +jbig2_word_stream_buf_new(Jbig2Ctx *ctx, const byte *data, size_t size); + +void +jbig2_word_stream_buf_free(Jbig2Ctx *ctx, Jbig2WordStream *ws); diff --git a/contrib/media/updf/include/jbig2_symbol_dict.h b/contrib/media/updf/include/jbig2_symbol_dict.h new file mode 100644 index 0000000000..a927758ce4 --- /dev/null +++ b/contrib/media/updf/include/jbig2_symbol_dict.h @@ -0,0 +1,56 @@ +/* + jbig2dec + + Copyright (C) 2001-2002 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +/* symbol dictionary header */ + +/* the results of decoding a symbol dictionary */ +typedef struct { + int n_symbols; + Jbig2Image **glyphs; +} Jbig2SymbolDict; + +/* decode a symbol dictionary segment and store the results */ +int +jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, + const byte *segment_data); + +/* get a particular glyph by index */ +Jbig2Image * +jbig2_sd_glyph(Jbig2SymbolDict *dict, unsigned int id); + +/* return a new empty symbol dict */ +Jbig2SymbolDict * +jbig2_sd_new(Jbig2Ctx *ctx, int n_symbols); + +/* release the memory associated with a symbol dict */ +void +jbig2_sd_release(Jbig2Ctx *ctx, Jbig2SymbolDict *dict); + +/* generate a new symbol dictionary by concatenating a list of + existing dictionaries */ +Jbig2SymbolDict * +jbig2_sd_cat(Jbig2Ctx *ctx, int n_dicts, + Jbig2SymbolDict **dicts); + +/* count the number of dictionary segments referred + to by the given segment */ +int +jbig2_sd_count_referred(Jbig2Ctx *ctx, Jbig2Segment *segment); + +/* return an array of pointers to symbol dictionaries referred + to by a segment */ +Jbig2SymbolDict ** +jbig2_sd_list_referred(Jbig2Ctx *ctx, Jbig2Segment *segment); + diff --git a/contrib/media/updf/include/jbig2_text.h b/contrib/media/updf/include/jbig2_text.h new file mode 100644 index 0000000000..bf6fff33a3 --- /dev/null +++ b/contrib/media/updf/include/jbig2_text.h @@ -0,0 +1,73 @@ +/* + jbig2dec + + Copyright (C) 2002-2004 Artifex Software, Inc. + + This software is distributed under license and may not + be copied, modified or distributed except as expressly + authorized under the terms of the license contained in + the file LICENSE in this distribution. + + For further licensing information refer to http://artifex.com/ or + contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861. +*/ + +/** + * Headers for Text region handling + **/ + +typedef enum { + JBIG2_CORNER_BOTTOMLEFT = 0, + JBIG2_CORNER_TOPLEFT = 1, + JBIG2_CORNER_BOTTOMRIGHT = 2, + JBIG2_CORNER_TOPRIGHT = 3 +} Jbig2RefCorner; + +typedef struct { + bool SBHUFF; + bool SBREFINE; + bool SBDEFPIXEL; + Jbig2ComposeOp SBCOMBOP; + bool TRANSPOSED; + Jbig2RefCorner REFCORNER; + int SBDSOFFSET; + /* int SBW; */ + /* int SBH; */ + uint32_t SBNUMINSTANCES; + int LOGSBSTRIPS; + int SBSTRIPS; + /* int SBNUMSYMS; */ + /* SBSYMCODES */ + /* SBSYMCODELEN */ + /* SBSYMS */ + Jbig2HuffmanTable *SBHUFFFS; + Jbig2HuffmanTable *SBHUFFDS; + Jbig2HuffmanTable *SBHUFFDT; + Jbig2HuffmanTable *SBHUFFRDW; + Jbig2HuffmanTable *SBHUFFRDH; + Jbig2HuffmanTable *SBHUFFRDX; + Jbig2HuffmanTable *SBHUFFRDY; + Jbig2HuffmanTable *SBHUFFRSIZE; + Jbig2ArithIntCtx *IADT; + Jbig2ArithIntCtx *IAFS; + Jbig2ArithIntCtx *IADS; + Jbig2ArithIntCtx *IAIT; + Jbig2ArithIaidCtx *IAID; + Jbig2ArithIntCtx *IARI; + Jbig2ArithIntCtx *IARDW; + Jbig2ArithIntCtx *IARDH; + Jbig2ArithIntCtx *IARDX; + Jbig2ArithIntCtx *IARDY; + bool SBRTEMPLATE; + int8_t sbrat[4]; +} Jbig2TextRegionParams; + +int +jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, + const Jbig2TextRegionParams *params, + const Jbig2SymbolDict * const *dicts, const int n_dicts, + Jbig2Image *image, + const byte *data, const size_t size, + Jbig2ArithCx *GR_stats, + Jbig2ArithState *as, Jbig2WordStream *ws); diff --git a/contrib/media/updf/include/jconfig.h b/contrib/media/updf/include/jconfig.h new file mode 100644 index 0000000000..f759a9dbd6 --- /dev/null +++ b/contrib/media/updf/include/jconfig.h @@ -0,0 +1,38 @@ +/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Needed to make one-file style work in DJGPP */ +#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/contrib/media/updf/include/jmorecfg.h b/contrib/media/updf/include/jmorecfg.h new file mode 100644 index 0000000000..54a7d1c447 --- /dev/null +++ b/contrib/media/updf/include/jmorecfg.h @@ -0,0 +1,363 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +typedef long INT32; +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/contrib/media/updf/include/jp2.h b/contrib/media/updf/include/jp2.h new file mode 100644 index 0000000000..9ad662cb97 --- /dev/null +++ b/contrib/media/updf/include/jp2.h @@ -0,0 +1,231 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __JP2_H +#define __JP2_H +/** +@file jp2.h +@brief The JPEG-2000 file format Reader/Writer (JP2) + +*/ + +/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ +/*@{*/ + +#define JPIP_JPIP 0x6a706970 + +#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */ +#define JP2_FTYP 0x66747970 /**< File type box */ +#define JP2_JP2H 0x6a703268 /**< JP2 header box */ +#define JP2_IHDR 0x69686472 /**< Image header box */ +#define JP2_COLR 0x636f6c72 /**< Colour specification box */ +#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */ +#define JP2_URL 0x75726c20 /**< URL box */ +#define JP2_DTBL 0x6474626c /**< Data Reference box */ +#define JP2_BPCC 0x62706363 /**< Bits per component box */ +#define JP2_JP2 0x6a703220 /**< File type fields */ +#define JP2_PCLR 0x70636c72 /**< Palette box */ +#define JP2_CMAP 0x636d6170 /**< Component Mapping box */ +#define JP2_CDEF 0x63646566 /**< Channel Definition box */ + +/* ----------------------------------------------------------------------- */ +/** +Channel description: channel index, type, assocation +*/ +typedef struct opj_jp2_cdef_info +{ + unsigned short cn, typ, asoc; +} opj_jp2_cdef_info_t; + +/** +Channel descriptions and number of descriptions +*/ +typedef struct opj_jp2_cdef +{ + opj_jp2_cdef_info_t *info; + unsigned short n; +} opj_jp2_cdef_t; + +/** +Component mappings: channel index, mapping type, palette index +*/ +typedef struct opj_jp2_cmap_comp +{ + unsigned short cmp; + unsigned char mtyp, pcol; +} opj_jp2_cmap_comp_t; + +/** +Palette data: table entries, palette columns +*/ +typedef struct opj_jp2_pclr +{ + unsigned int *entries; + unsigned char *channel_sign; + unsigned char *channel_size; + opj_jp2_cmap_comp_t *cmap; + unsigned short nr_entries, nr_channels; +} opj_jp2_pclr_t; + +/** +Collector for ICC profile, palette, component mapping, channel description +*/ +typedef struct opj_jp2_color +{ + unsigned char *icc_profile_buf; + int icc_profile_len; + + opj_jp2_cdef_t *jp2_cdef; + opj_jp2_pclr_t *jp2_pclr; + unsigned char jp2_has_colr; +} opj_jp2_color_t; + +/** +JP2 component +*/ +typedef struct opj_jp2_comps { + int depth; + int sgnd; + int bpcc; +} opj_jp2_comps_t; + +/** +JPEG-2000 file format reader/writer +*/ +typedef struct opj_jp2 { + /** codec context */ + opj_common_ptr cinfo; + /** handle to the J2K codec */ + opj_j2k_t *j2k; + unsigned int w; + unsigned int h; + unsigned int numcomps; + unsigned int bpc; + unsigned int C; + unsigned int UnkC; + unsigned int IPR; + unsigned int meth; + unsigned int approx; + unsigned int enumcs; + unsigned int precedence; + unsigned int brand; + unsigned int minversion; + unsigned int numcl; + unsigned int *cl; + opj_jp2_comps_t *comps; + unsigned int j2k_codestream_offset; + unsigned int j2k_codestream_length; +} opj_jp2_t; + +/** +JP2 Box +*/ +typedef struct opj_jp2_box { + int length; + int type; + int init_pos; +} opj_jp2_box_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Write the JP2H box - JP2 Header box (used in MJ2) +@param jp2 JP2 handle +@param cio Output buffer stream +*/ +void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Read the JP2H box - JP2 Header box (used in MJ2) +@param jp2 JP2 handle +@param cio Input buffer stream +@param ext Collector for profile, cdef and pclr data +@return Returns true if successful, returns false otherwise +*/ +bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color); +/** +Creates a JP2 decompression structure +@param cinfo Codec context info +@return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise +*/ +opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo); +/** +Destroy a JP2 decompressor handle +@param jp2 JP2 decompressor handle to destroy +*/ +void jp2_destroy_decompress(opj_jp2_t *jp2); +/** +Setup the decoder decoding parameters using user parameters. +Decoding parameters are returned in jp2->j2k->cp. +@param jp2 JP2 decompressor handle +@param parameters decompression parameters +*/ +void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 file stream +@param jp2 JP2 decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a JP2 compression structure +@param cinfo Codec context info +@return Returns a handle to a JP2 compressor if successful, returns NULL otherwise +*/ +opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo); +/** +Destroy a JP2 compressor handle +@param jp2 JP2 compressor handle to destroy +*/ +void jp2_destroy_compress(opj_jp2_t *jp2); +/** +Setup the encoder parameters using the current image and using user parameters. +Coding parameters are returned in jp2->j2k->cp. +@param jp2 JP2 compressor handle +@param parameters compression parameters +@param image input filled image +*/ +void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image); +/** +Encode an image into a JPEG-2000 file stream +@param jp2 JP2 compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +bool jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __JP2_H */ + diff --git a/contrib/media/updf/include/jpeglib.h b/contrib/media/updf/include/jpeglib.h new file mode 100644 index 0000000000..d1be8ddeff --- /dev/null +++ b/contrib/media/updf/include/jpeglib.h @@ -0,0 +1,1096 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ + +#define JPEG_LIB_VERSION 62 /* Version 6b */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples. Always DCTSIZE for compression. + * For decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values of 1,2,4,8 are likely to be supported. Note that different + * components may receive different IDCT scalings. + */ + int DCT_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For decompression, IDCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK /* Y/Cb/Cr/K */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.doc concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#endif /* JPEGLIB_H */ diff --git a/contrib/media/updf/include/jpt.h b/contrib/media/updf/include/jpt.h new file mode 100644 index 0000000000..eb01f98eb8 --- /dev/null +++ b/contrib/media/updf/include/jpt.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __JPT_H +#define __JPT_H +/** +@file jpt.h +@brief JPT-stream reader (JPEG 2000, JPIP) + +JPT-stream functions are implemented in J2K.C. +*/ + +/** +Message Header JPT stream structure +*/ +typedef struct opj_jpt_msg_header { + /** In-class Identifier */ + unsigned int Id; + /** Last byte information */ + unsigned int last_byte; + /** Class Identifier */ + unsigned int Class_Id; + /** CSn : index identifier */ + unsigned int CSn_Id; + /** Message offset */ + unsigned int Msg_offset; + /** Message length */ + unsigned int Msg_length; + /** Auxiliary for JPP case */ + unsigned int Layer_nb; +} opj_jpt_msg_header_t; + +/* ----------------------------------------------------------------------- */ + +/** +Initialize the value of the message header structure +@param header Message header structure +*/ +void jpt_init_msg_header(opj_jpt_msg_header_t * header); + +/** +Read the message header for a JPP/JPT - stream +@param cinfo Codec context info +@param cio CIO handle +@param header Message header structure +*/ +void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header); + +#endif diff --git a/contrib/media/updf/include/keys.h b/contrib/media/updf/include/keys.h new file mode 100644 index 0000000000..ed5ddabb52 --- /dev/null +++ b/contrib/media/updf/include/keys.h @@ -0,0 +1,265 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_keys_h_ +#define __dj_include_keys_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* Values as returned from getkey() and getxkey() */ + +#define K_Control_A 0x001 +#define K_Control_B 0x002 +#define K_Control_C 0x003 +#define K_Control_D 0x004 +#define K_Control_E 0x005 +#define K_Control_F 0x006 +#define K_Control_G 0x007 +#define K_BackSpace 0x008 +#define K_Control_H 0x008 +#define K_Tab 0x009 +#define K_Control_I 0x009 +#define K_LineFeed 0x00a +#define K_Control_J 0x00a +#define K_Control_K 0x00b +#define K_Control_L 0x00c +#define K_Return 0x00d +#define K_Control_M 0x00d +#define K_Control_N 0x00e +#define K_Control_O 0x00f +#define K_Control_P 0x010 +#define K_Control_Q 0x011 +#define K_Control_R 0x012 +#define K_Control_S 0x013 +#define K_Control_T 0x014 +#define K_Control_U 0x015 +#define K_Control_V 0x016 +#define K_Control_W 0x017 +#define K_Control_X 0x018 +#define K_Control_Y 0x019 +#define K_Control_Z 0x01a +#define K_Control_LBracket 0x01b +#define K_Escape 0x01b +#define K_Control_BackSlash 0x01c +#define K_Control_RBracket 0x01d +#define K_Control_Caret 0x01e +#define K_Control_Underscore 0x01f +#define K_Space 0x020 +#define K_ExclamationPoint 0x021 +#define K_DoubleQuote 0x022 +#define K_Hash 0x023 +#define K_Dollar 0x024 +#define K_Percent 0x025 +#define K_Ampersand 0x026 +#define K_Quote 0x027 +#define K_LParen 0x028 +#define K_RParen 0x029 +#define K_Star 0x02a +#define K_Plus 0x02b +#define K_Comma 0x02c +#define K_Dash 0x02d +#define K_Period 0x02e +#define K_Slash 0x02f +#define K_Colon 0x03a +#define K_SemiColon 0x03b +#define K_LAngle 0x03c +#define K_Equals 0x03d +#define K_RAngle 0x03e +#define K_QuestionMark 0x03f +#define K_At 0x040 +#define K_LBracket 0x05b +#define K_BackSlash 0x05c +#define K_RBracket 0x05d +#define K_Caret 0x05e +#define K_UnderScore 0x05f +#define K_BackQuote 0x060 +#define K_LBrace 0x07b +#define K_Pipe 0x07c +#define K_RBrace 0x07d +#define K_Tilde 0x07e +#define K_Control_Backspace 0x07f + +#define K_Alt_Escape 0x101 +#define K_Control_At 0x103 +#define K_Alt_Backspace 0x10e +#define K_BackTab 0x10f +#define K_Alt_Q 0x110 +#define K_Alt_W 0x111 +#define K_Alt_E 0x112 +#define K_Alt_R 0x113 +#define K_Alt_T 0x114 +#define K_Alt_Y 0x115 +#define K_Alt_U 0x116 +#define K_Alt_I 0x117 +#define K_Alt_O 0x118 +#define K_Alt_P 0x119 +#define K_Alt_LBracket 0x11a +#define K_Alt_RBracket 0x11b +#define K_Alt_Return 0x11c +#define K_Alt_A 0x11e +#define K_Alt_S 0x11f +#define K_Alt_D 0x120 +#define K_Alt_F 0x121 +#define K_Alt_G 0x122 +#define K_Alt_H 0x123 +#define K_Alt_J 0x124 +#define K_Alt_K 0x125 +#define K_Alt_L 0x126 +#define K_Alt_Semicolon 0x127 +#define K_Alt_Quote 0x128 +#define K_Alt_Backquote 0x129 +#define K_Alt_Backslash 0x12b +#define K_Alt_Z 0x12c +#define K_Alt_X 0x12d +#define K_Alt_C 0x12e +#define K_Alt_V 0x12f +#define K_Alt_B 0x130 +#define K_Alt_N 0x131 +#define K_Alt_M 0x132 +#define K_Alt_Comma 0x133 +#define K_Alt_Period 0x134 +#define K_Alt_Slash 0x135 +#define K_Alt_KPStar 0x137 +#define K_F1 0x13b +#define K_F2 0x13c +#define K_F3 0x13d +#define K_F4 0x13e +#define K_F5 0x13f +#define K_F6 0x140 +#define K_F7 0x141 +#define K_F8 0x142 +#define K_F9 0x143 +#define K_F10 0x144 +#define K_Home 0x147 +#define K_Up 0x148 +#define K_PageUp 0x149 +#define K_Alt_KPMinus 0x14a +#define K_Left 0x14b +#define K_Center 0x14c +#define K_Right 0x14d +#define K_Alt_KPPlus 0x14e +#define K_End 0x14f +#define K_Down 0x150 +#define K_PageDown 0x151 +#define K_Insert 0x152 +#define K_Delete 0x153 +#define K_Shift_F1 0x154 +#define K_Shift_F2 0x155 +#define K_Shift_F3 0x156 +#define K_Shift_F4 0x157 +#define K_Shift_F5 0x158 +#define K_Shift_F6 0x159 +#define K_Shift_F7 0x15a +#define K_Shift_F8 0x15b +#define K_Shift_F9 0x15c +#define K_Shift_F10 0x15d +#define K_Control_F1 0x15e +#define K_Control_F2 0x15f +#define K_Control_F3 0x160 +#define K_Control_F4 0x161 +#define K_Control_F5 0x162 +#define K_Control_F6 0x163 +#define K_Control_F7 0x164 +#define K_Control_F8 0x165 +#define K_Control_F9 0x166 +#define K_Control_F10 0x167 +#define K_Alt_F1 0x168 +#define K_Alt_F2 0x169 +#define K_Alt_F3 0x16a +#define K_Alt_F4 0x16b +#define K_Alt_F5 0x16c +#define K_Alt_F6 0x16d +#define K_Alt_F7 0x16e +#define K_Alt_F8 0x16f +#define K_Alt_F9 0x170 +#define K_Alt_F10 0x171 +#define K_Control_Print 0x172 +#define K_Control_Left 0x173 +#define K_Control_Right 0x174 +#define K_Control_End 0x175 +#define K_Control_PageDown 0x176 +#define K_Control_Home 0x177 +#define K_Alt_1 0x178 +#define K_Alt_2 0x179 +#define K_Alt_3 0x17a +#define K_Alt_4 0x17b +#define K_Alt_5 0x17c +#define K_Alt_6 0x17d +#define K_Alt_7 0x17e +#define K_Alt_8 0x17f +#define K_Alt_9 0x180 +#define K_Alt_0 0x181 +#define K_Alt_Dash 0x182 +#define K_Alt_Equals 0x183 +#define K_Control_PageUp 0x184 +#define K_F11 0x185 +#define K_F12 0x186 +#define K_Shift_F11 0x187 +#define K_Shift_F12 0x188 +#define K_Control_F11 0x189 +#define K_Control_F12 0x18a +#define K_Alt_F11 0x18b +#define K_Alt_F12 0x18c +#define K_Control_Up 0x18d +#define K_Control_KPDash 0x18e +#define K_Control_Center 0x18f +#define K_Control_KPPlus 0x190 +#define K_Control_Down 0x191 +#define K_Control_Insert 0x192 +#define K_Control_Delete 0x193 +#define K_Control_KPSlash 0x195 +#define K_Control_KPStar 0x196 +#define K_Alt_EHome 0x197 +#define K_Alt_EUp 0x198 +#define K_Alt_EPageUp 0x199 +#define K_Alt_ELeft 0x19b +#define K_Alt_ERight 0x19d +#define K_Alt_EEnd 0x19f +#define K_Alt_EDown 0x1a0 +#define K_Alt_EPageDown 0x1a1 +#define K_Alt_EInsert 0x1a2 +#define K_Alt_EDelete 0x1a3 +#define K_Alt_KPSlash 0x1a4 +#define K_Alt_Tab 0x1a5 +#define K_Alt_Enter 0x1a6 + +#define K_EHome 0x247 +#define K_EUp 0x248 +#define K_EPageUp 0x249 +#define K_ELeft 0x24b +#define K_ERight 0x24d +#define K_EEnd 0x24f +#define K_EDown 0x250 +#define K_EPageDown 0x251 +#define K_EInsert 0x252 +#define K_EDelete 0x253 +#define K_Control_ELeft 0x273 +#define K_Control_ERight 0x274 +#define K_Control_EEnd 0x275 +#define K_Control_EPageDown 0x276 +#define K_Control_EHome 0x277 +#define K_Control_EPageUp 0x284 +#define K_Control_EUp 0x28d +#define K_Control_EDown 0x291 +#define K_Control_EInsert 0x292 +#define K_Control_EDelete 0x293 + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_keys_h_ */ diff --git a/contrib/media/updf/include/kolibri.h b/contrib/media/updf/include/kolibri.h new file mode 100644 index 0000000000..9f83ea004c --- /dev/null +++ b/contrib/media/updf/include/kolibri.h @@ -0,0 +1,92 @@ + +#define NULL ((void*)0) +#define __attribute__(something) /* nothing */ +#pragma pack(1) + +typedef struct +{ +unsigned p00 __attribute__((packed)); +unsigned p04 __attribute__((packed)); +unsigned p08 __attribute__((packed)); +unsigned p12 __attribute__((packed)); +unsigned p16 __attribute__((packed)); +char p20 __attribute__((packed)); +char *p21 __attribute__((packed)); +} kol_struct70 __attribute__((packed)); + + +typedef struct +{ +unsigned p00 __attribute__((packed)); +char p04 __attribute__((packed)); +char p05[3] __attribute__((packed)); +unsigned p08 __attribute__((packed)); +unsigned p12 __attribute__((packed)); +unsigned p16 __attribute__((packed)); +unsigned p20 __attribute__((packed)); +unsigned p24 __attribute__((packed)); +unsigned p28 __attribute__((packed)); +unsigned p32[2] __attribute__((packed)); +unsigned p40 __attribute__((packed)); +} kol_struct_BDVK __attribute__((packed)); + +typedef struct +{ +char *name __attribute__((packed)); +void *data __attribute__((packed)); +} kol_struct_import __attribute__((packed)); + + +__declspec(noreturn) void __cdecl kol_exit(); +void __cdecl kol_sleep(unsigned d); +void __cdecl kol_wnd_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c); +void __cdecl kol_wnd_move(unsigned x, unsigned y); +void __cdecl kol_wnd_caption(char *s); +void __cdecl kol_event_mask(unsigned e); +unsigned __cdecl kol_event_wait(); +unsigned __cdecl kol_event_wait_time(unsigned time); +unsigned __cdecl kol_event_check(); +void __cdecl kol_paint_start(); +void __cdecl kol_paint_end(); +void __cdecl kol_paint_pixel(unsigned x, unsigned y, unsigned c); +void __cdecl kol_paint_bar(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c); +void __cdecl kol_paint_line(unsigned x1, unsigned y1, unsigned x2, unsigned y2, unsigned c); +void __cdecl kol_paint_string(unsigned x, unsigned y, char *s, unsigned c); +void __cdecl kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d); +void __cdecl kol_paint_image_pal(unsigned x, unsigned y, unsigned w, unsigned h, char *d, unsigned *palette); +unsigned __cdecl kol_key_get(); +unsigned __cdecl kol_key_control(); +void __cdecl kol_key_lang_set(unsigned lang); +unsigned __cdecl kol_key_lang_get(); +void __cdecl kol_key_mode_set(unsigned mode); +unsigned __cdecl kol_key_mode_get(); +void __cdecl kol_btn_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned d, unsigned c); +unsigned __cdecl kol_btn_get(); +void __cdecl kol_btn_type(unsigned t); +unsigned __cdecl kol_mouse_pos(); +unsigned __cdecl kol_mouse_posw(); +unsigned __cdecl kol_mouse_btn(); +void __cdecl kol_board_putc(char c); +void __cdecl kol_board_puts(char *s); +void __cdecl kol_board_puti(int n); +int __declspec(noinline) __cdecl kol_file_70(kol_struct70 *k); +kol_struct_import* __fastcall kol_cofflib_load(char *name); +void* __cdecl kol_cofflib_procload (kol_struct_import *imp, char *name); +unsigned __cdecl kol_cofflib_procnum (kol_struct_import *imp); +void __cdecl kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n); +unsigned __fastcall kol_system_end(unsigned param); +unsigned __cdecl kol_system_cpufreq(); +unsigned __fastcall kol_system_mem(); +unsigned __fastcall kol_system_memfree(); +unsigned __fastcall kol_system_time_get(); +unsigned __fastcall kol_system_date_get(); +void __cdecl kol_path_file2dir(char *dir, char *fname); +void __cdecl kol_path_full(char *full, char *fname); +void __cdecl kol_screen_wait_rr(); +void __cdecl kol_screen_get_size(unsigned *w, unsigned *h); +unsigned __cdecl kol_skin_height(); +unsigned __cdecl kol_thread_start(unsigned start, unsigned stack); +unsigned __cdecl kol_time_tick(); +unsigned __cdecl kol_sound_speaker(char data[]); +unsigned __fastcall kol_process_info(unsigned slot, char buf1k[]); +int __fastcall kol_process_kill_pid(unsigned process); diff --git a/contrib/media/updf/include/lapi.h b/contrib/media/updf/include/lapi.h new file mode 100644 index 0000000000..0909a3911d --- /dev/null +++ b/contrib/media/updf/include/lapi.h @@ -0,0 +1,24 @@ +/* +** $Id: lapi.h,v 2.7 2009/11/27 15:37:59 roberto Exp $ +** Auxiliary functions from Lua API +** See Copyright Notice in lua.h +*/ + +#ifndef lapi_h +#define lapi_h + + +#include "llimits.h" +#include "lstate.h" + +#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ + "stack overflow");} + +#define adjustresults(L,nres) \ + { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } + +#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ + "not enough elements in the stack") + + +#endif diff --git a/contrib/media/updf/include/lauxlib.h b/contrib/media/updf/include/lauxlib.h new file mode 100644 index 0000000000..39506456e1 --- /dev/null +++ b/contrib/media/updf/include/lauxlib.h @@ -0,0 +1,175 @@ +/* +** $Id: lauxlib.h,v 1.113 2010/11/16 19:20:01 roberto Exp $ +** Auxiliary functions for building Lua libraries +** See Copyright Notice in lua.h +*/ + + +#ifndef lauxlib_h +#define lauxlib_h + + +#include <stddef.h> +#include <stdio.h> + +#include "lua.h" + + + +/* extra error code for `luaL_load' */ +#define LUA_ERRFILE (LUA_ERRERR+1) + + +typedef struct luaL_Reg { + const char *name; + lua_CFunction func; +} luaL_Reg; + + +LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver); +#define luaL_checkversion(L) luaL_checkversion_(L, LUA_VERSION_NUM) + +LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); +LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); +LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); +LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); +LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, + size_t *l); +LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, + const char *def, size_t *l); +LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); +LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); + +LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); +LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, + lua_Integer def); +LUALIB_API lua_Unsigned (luaL_checkunsigned) (lua_State *L, int numArg); +LUALIB_API lua_Unsigned (luaL_optunsigned) (lua_State *L, int numArg, + lua_Unsigned def); + +LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); +LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); +LUALIB_API void (luaL_checkany) (lua_State *L, int narg); + +LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); +LUALIB_API void (luaL_setmetatable) (lua_State *L, const char *tname); +LUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname); +LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); + +LUALIB_API void (luaL_where) (lua_State *L, int lvl); +LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); + +LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, + const char *const lst[]); + +/* pre-defined references */ +#define LUA_NOREF (-2) +#define LUA_REFNIL (-1) + +LUALIB_API int (luaL_ref) (lua_State *L, int t); +LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); + +LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); +LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, + const char *name); +LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); + +LUALIB_API lua_State *(luaL_newstate) (void); + +LUALIB_API int (luaL_len) (lua_State *L, int idx); + +LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, + const char *r); + +LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup); + +LUALIB_API void (luaL_findtable) (lua_State *L, int idx, const char *fname); + +LUALIB_API void (luaL_traceback) (lua_State *L, lua_State *L1, + const char *msg, int level); + +LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, + lua_CFunction openf, int glb); + +/* +** =============================================================== +** some useful macros +** =============================================================== +*/ + + +#define luaL_newlibtable(L,l) \ + lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) + +#define luaL_newlib(L,l) (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) + +#define luaL_argcheck(L, cond,numarg,extramsg) \ + ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) +#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) +#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) +#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) +#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) +#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) + +#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) + +#define luaL_dofile(L, fn) \ + (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) + +#define luaL_dostring(L, s) \ + (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) + +#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) + +#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) + + +/* +** {====================================================== +** Generic Buffer manipulation +** ======================================================= +*/ + +typedef struct luaL_Buffer { + char *b; /* buffer address */ + size_t size; /* buffer size */ + size_t n; /* number of characters in buffer */ + lua_State *L; + char initb[LUAL_BUFFERSIZE]; /* initial buffer */ +} luaL_Buffer; + + +#define luaL_addchar(B,c) \ + ((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \ + ((B)->b[(B)->n++] = (c))) + +#define luaL_addsize(B,s) ((B)->n += (s)) + +LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); +LUALIB_API char *(luaL_prepbuffsize) (luaL_Buffer *B, size_t sz); +LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); +LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); +LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); +LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); +LUALIB_API void (luaL_pushresultsize) (luaL_Buffer *B, size_t sz); +LUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz); + +#define luaL_prepbuffer(B) luaL_prepbuffsize(B, LUAL_BUFFERSIZE) + +/* }====================================================== */ + + +/* compatibility with old module system */ + +LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname, + int sizehint); +LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, + const luaL_Reg *l, int nup); + +#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0)) + + +#endif + + diff --git a/contrib/media/updf/include/lcode.h b/contrib/media/updf/include/lcode.h new file mode 100644 index 0000000000..86d2138996 --- /dev/null +++ b/contrib/media/updf/include/lcode.h @@ -0,0 +1,83 @@ +/* +** $Id: lcode.h,v 1.55 2010/07/02 20:42:40 roberto Exp $ +** Code generator for Lua +** See Copyright Notice in lua.h +*/ + +#ifndef lcode_h +#define lcode_h + +#include "llex.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lparser.h" + + +/* +** Marks the end of a patch list. It is an invalid value both as an absolute +** address, and as a list link (would link an element to itself). +*/ +#define NO_JUMP (-1) + + +/* +** grep "ORDER OPR" if you change these enums (ORDER OP) +*/ +typedef enum BinOpr { + OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, + OPR_CONCAT, + OPR_EQ, OPR_LT, OPR_LE, + OPR_NE, OPR_GT, OPR_GE, + OPR_AND, OPR_OR, + OPR_NOBINOPR +} BinOpr; + + +typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; + + +#define getcode(fs,e) ((fs)->f->code[(e)->u.info]) + +#define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) + +#define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) + +#define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) + +#define luaK_codek(fs,reg,k) luaK_codeABxX(fs, OP_LOADK, reg, k) + +LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); +LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); +LUAI_FUNC int luaK_codeABxX (FuncState *fs, OpCode o, int reg, int k); +LUAI_FUNC void luaK_fixline (FuncState *fs, int line); +LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); +LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); +LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); +LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); +LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); +LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); +LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); +LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); +LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); +LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_jump (FuncState *fs); +LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); +LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); +LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); +LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); +LUAI_FUNC int luaK_getlabel (FuncState *fs); +LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); +LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); +LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, + expdesc *v2, int line); +LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); + + +#endif diff --git a/contrib/media/updf/include/lctype.h b/contrib/media/updf/include/lctype.h new file mode 100644 index 0000000000..b43baa790b --- /dev/null +++ b/contrib/media/updf/include/lctype.h @@ -0,0 +1,50 @@ +/* +** $Id: lctype.h,v 1.8 2009/11/19 19:06:52 roberto Exp $ +** 'ctype' functions for Lua +** See Copyright Notice in lua.h +*/ + +#ifndef lctype_h +#define lctype_h + + +#include <limits.h> + +#include "lua.h" + +#include "llimits.h" + + +#define ALPHABIT 0 +#define DIGITBIT 1 +#define PRINTBIT 2 +#define SPACEBIT 3 +#define XDIGITBIT 4 +#define UPPERBIT 5 + + +#define MASK(B) (1 << (B)) + + +/* +** add 1 to char to allow index -1 (EOZ) +*/ +#define testprop(c,p) (luai_ctype_[(c)+1] & (p)) + +/* +** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' +*/ +#define lislalpha(c) testprop(c, MASK(ALPHABIT)) +#define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) +#define lisupper(c) testprop(c, MASK(UPPERBIT)) +#define lisdigit(c) testprop(c, MASK(DIGITBIT)) +#define lisspace(c) testprop(c, MASK(SPACEBIT)) +#define lisprint(c) testprop(c, MASK(PRINTBIT)) +#define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) + + +/* one more entry for 0 and one more for -1 (EOZ) */ +LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; + +#endif + diff --git a/contrib/media/updf/include/ldebug.h b/contrib/media/updf/include/ldebug.h new file mode 100644 index 0000000000..545fa345ed --- /dev/null +++ b/contrib/media/updf/include/ldebug.h @@ -0,0 +1,31 @@ +/* +** $Id: ldebug.h,v 2.5 2009/06/10 16:57:53 roberto Exp $ +** Auxiliary functions from Debug Interface module +** See Copyright Notice in lua.h +*/ + +#ifndef ldebug_h +#define ldebug_h + + +#include "lstate.h" + + +#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) + +#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) + +#define resethookcount(L) (L->hookcount = L->basehookcount) + + +LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, + const char *opname); +LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); +LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, + const TValue *p2); +LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, + const TValue *p2); +LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); +LUAI_FUNC void luaG_errormsg (lua_State *L); + +#endif diff --git a/contrib/media/updf/include/ldo.h b/contrib/media/updf/include/ldo.h new file mode 100644 index 0000000000..88962d9c5d --- /dev/null +++ b/contrib/media/updf/include/ldo.h @@ -0,0 +1,45 @@ +/* +** $Id: ldo.h,v 2.18 2009/12/17 12:28:57 roberto Exp $ +** Stack and Call structure of Lua +** See Copyright Notice in lua.h +*/ + +#ifndef ldo_h +#define ldo_h + + +#include "lobject.h" +#include "lstate.h" +#include "lzio.h" + + +#define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \ + luaD_growstack(L, n); else condmovestack(L); + + +#define incr_top(L) {L->top++; luaD_checkstack(L,0);} + +#define savestack(L,p) ((char *)(p) - (char *)L->stack) +#define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) + + +/* type of protected functions, to be ran by `runprotected' */ +typedef void (*Pfunc) (lua_State *L, void *ud); + +LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name); +LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); +LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); +LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults, + int allowyield); +LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, + ptrdiff_t oldtop, ptrdiff_t ef); +LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); +LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); +LUAI_FUNC void luaD_growstack (lua_State *L, int n); +LUAI_FUNC void luaD_shrinkstack (lua_State *L); + +LUAI_FUNC void luaD_throw (lua_State *L, int errcode); +LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); + +#endif + diff --git a/contrib/media/updf/include/lfunc.h b/contrib/media/updf/include/lfunc.h new file mode 100644 index 0000000000..da18923150 --- /dev/null +++ b/contrib/media/updf/include/lfunc.h @@ -0,0 +1,34 @@ +/* +** $Id: lfunc.h,v 2.6 2010/06/04 13:06:15 roberto Exp $ +** Auxiliary functions to manipulate prototypes and closures +** See Copyright Notice in lua.h +*/ + +#ifndef lfunc_h +#define lfunc_h + + +#include "lobject.h" + + +#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ + cast(int, sizeof(TValue)*((n)-1))) + +#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ + cast(int, sizeof(TValue *)*((n)-1))) + + +LUAI_FUNC Proto *luaF_newproto (lua_State *L); +LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); +LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, Proto *p); +LUAI_FUNC UpVal *luaF_newupval (lua_State *L); +LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); +LUAI_FUNC void luaF_close (lua_State *L, StkId level); +LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); +LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); +LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); +LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, + int pc); + + +#endif diff --git a/contrib/media/updf/include/lgc.h b/contrib/media/updf/include/lgc.h new file mode 100644 index 0000000000..9c5b05e2dd --- /dev/null +++ b/contrib/media/updf/include/lgc.h @@ -0,0 +1,144 @@ +/* +** $Id: lgc.h,v 2.44 2010/06/30 14:11:17 roberto Exp $ +** Garbage Collector +** See Copyright Notice in lua.h +*/ + +#ifndef lgc_h +#define lgc_h + + +#include "lobject.h" +#include "lstate.h" + +/* +** Collectable objects may have one of three colors: white, which +** means the object is not marked; gray, which means the +** object is marked, but its references may be not marked; and +** black, which means that the object and all its references are marked. +** The main invariant of the garbage collector, while marking objects, +** is that a black object can never point to a white one. Moreover, +** any gray object must be in a "gray list" (gray, grayagain, weak, +** allweak, ephemeron) so that it can be visited again before finishing +** the collection cycle. These lists have no meaning when the invariant +** is not being enforced (e.g., sweep phase). +*/ + + +/* +** Possible states of the Garbage Collector +*/ +#define GCSpropagate 0 +#define GCSatomic 1 +#define GCSsweepstring 2 +#define GCSsweepudata 3 +#define GCSsweep 4 +#define GCSpause 5 + + +#define issweepphase(g) \ + (GCSsweepstring <= (g)->gcstate && (g)->gcstate <= GCSsweep) + +#define isgenerational(g) ((g)->gckind == KGC_GEN) + +/* +** macro to tell when main invariant (white objects cannot point to black +** ones) must be kept. During a non-generational collection, the sweep +** phase may break the invariant, as objects turned white may point to +** still-black objects. The invariant is restored when sweep ends and +** all objects are white again. During a generational collection, the +** invariant must be kept all times. +*/ +#define keepinvariant(g) (isgenerational(g) || g->gcstate <= GCSatomic) + + +#define gcstopped(g) ((g)->GCdebt == MIN_LMEM) +#define stopgc(g) ((g)->GCdebt = MIN_LMEM) + + +/* +** some useful bit tricks +*/ +#define resetbits(x,m) ((x) &= cast(lu_byte, ~(m))) +#define setbits(x,m) ((x) |= (m)) +#define testbits(x,m) ((x) & (m)) +#define bitmask(b) (1<<(b)) +#define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2)) +#define l_setbit(x,b) setbits(x, bitmask(b)) +#define resetbit(x,b) resetbits(x, bitmask(b)) +#define testbit(x,b) testbits(x, bitmask(b)) +#define set2bits(x,b1,b2) setbits(x, (bit2mask(b1, b2))) +#define reset2bits(x,b1,b2) resetbits(x, (bit2mask(b1, b2))) + + + +/* Layout for bit use in `marked' field: */ +#define WHITE0BIT 0 /* object is white (type 0) */ +#define WHITE1BIT 1 /* object is white (type 1) */ +#define BLACKBIT 2 /* object is black */ +#define FINALIZEDBIT 3 /* for userdata: has been finalized */ +#define SEPARATED 4 /* " ": it's in 'udgc' list or in 'tobefnz' */ +#define FIXEDBIT 5 /* object is fixed (should not be collected) */ +#define OLDBIT 6 /* object is old (only in generational mode) */ +/* bit 7 is currently used by tests (luaL_checkmemory) */ + +#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) + + +#define iswhite(x) testbits((x)->gch.marked, WHITEBITS) +#define isblack(x) testbit((x)->gch.marked, BLACKBIT) +#define isgray(x) /* neither white nor black */ \ + (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) + +#define isold(x) testbit((x)->gch.marked, OLDBIT) + +/* MOVE OLD rule: whenever an object is moved to the beginning of + a GC list, its old bit must be cleared */ +#define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT) + +#define otherwhite(g) (g->currentwhite ^ WHITEBITS) +#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow))) +#define isdead(g,v) isdeadm(otherwhite(g), (v)->gch.marked) + +#define changewhite(x) ((x)->gch.marked ^= WHITEBITS) +#define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT) + +#define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) + +#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) + + +#define luaC_checkGC(L) {condchangemem(L); if (G(L)->GCdebt > 0) luaC_step(L);} + + +#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ + luaC_barrier_(L,obj2gco(p),gcvalue(v)); } + +#define luaC_barrierback(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ + luaC_barrierback_(L,p); } + +#define luaC_objbarrier(L,p,o) \ + { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \ + luaC_barrier_(L,obj2gco(p),obj2gco(o)); } + +#define luaC_objbarrierback(L,p,o) \ + { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) luaC_barrierback_(L,p); } + +#define luaC_barrierproto(L,p,c) \ + { if (isblack(obj2gco(p))) luaC_barrierproto_(L,p,c); } + +LUAI_FUNC void luaC_separateudata (lua_State *L, int all); +LUAI_FUNC void luaC_freeallobjects (lua_State *L); +LUAI_FUNC void luaC_step (lua_State *L); +LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); +LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); +LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz, + GCObject **list, int offset); +LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); +LUAI_FUNC void luaC_barrierback_ (lua_State *L, GCObject *o); +LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c); +LUAI_FUNC void luaC_checkfinalizer (lua_State *L, Udata *u); +LUAI_FUNC void luaC_checkupvalcolor (global_State *g, UpVal *uv); +LUAI_FUNC void luaC_changemode (lua_State *L, int mode); + +#endif diff --git a/contrib/media/updf/include/lib/libc.a b/contrib/media/updf/include/lib/libc.a new file mode 100644 index 0000000000..41005d3444 Binary files /dev/null and b/contrib/media/updf/include/lib/libc.a differ diff --git a/contrib/media/updf/include/lib/libfreetype2.a b/contrib/media/updf/include/lib/libfreetype2.a new file mode 100644 index 0000000000..8eb0013be2 Binary files /dev/null and b/contrib/media/updf/include/lib/libfreetype2.a differ diff --git a/contrib/media/updf/include/lib/libjbig2dec.a b/contrib/media/updf/include/lib/libjbig2dec.a new file mode 100644 index 0000000000..154ab9a9a1 Binary files /dev/null and b/contrib/media/updf/include/lib/libjbig2dec.a differ diff --git a/contrib/media/updf/include/lib/libjpeg.a b/contrib/media/updf/include/lib/libjpeg.a new file mode 100644 index 0000000000..dfc11eeca8 Binary files /dev/null and b/contrib/media/updf/include/lib/libjpeg.a differ diff --git a/contrib/media/updf/include/lib/libm.a b/contrib/media/updf/include/lib/libm.a new file mode 100644 index 0000000000..9860b6ed48 Binary files /dev/null and b/contrib/media/updf/include/lib/libm.a differ diff --git a/contrib/media/updf/include/lib/libmupdf.a b/contrib/media/updf/include/lib/libmupdf.a new file mode 100644 index 0000000000..a71d182b29 Binary files /dev/null and b/contrib/media/updf/include/lib/libmupdf.a differ diff --git a/contrib/media/updf/include/lib/libopenjpeg.a b/contrib/media/updf/include/lib/libopenjpeg.a new file mode 100644 index 0000000000..1e0eff2494 Binary files /dev/null and b/contrib/media/updf/include/lib/libopenjpeg.a differ diff --git a/contrib/media/updf/include/lib/libpng.a b/contrib/media/updf/include/lib/libpng.a new file mode 100644 index 0000000000..c4f342052d Binary files /dev/null and b/contrib/media/updf/include/lib/libpng.a differ diff --git a/contrib/media/updf/include/lib/libz.a b/contrib/media/updf/include/lib/libz.a new file mode 100644 index 0000000000..1441a5eaf1 Binary files /dev/null and b/contrib/media/updf/include/lib/libz.a differ diff --git a/contrib/media/updf/include/libc/Makefile b/contrib/media/updf/include/libc/Makefile new file mode 100644 index 0000000000..74a65d67b1 --- /dev/null +++ b/contrib/media/updf/include/libc/Makefile @@ -0,0 +1,12 @@ +all: + make -C linuxtools + make -C linuxtools install + make -C src + make -C stub + make -C programs + +clean: + make -C src clean + make -C linuxtools clean + make -C stub clean + make -C programs clean diff --git a/contrib/media/updf/include/libc/asm.h b/contrib/media/updf/include/libc/asm.h new file mode 100644 index 0000000000..12da6c4628 --- /dev/null +++ b/contrib/media/updf/include/libc/asm.h @@ -0,0 +1,18 @@ +#ifndef __LIBC_ASM_H +#define __LIBC_ASM_H + +#include __DEV_CONFIG_H + +#ifndef NEEDS_UNDERSCORES + +#define C_SYM(x) x +#else + +#define C_SYM(x) _##x + +#endif + +#define MK_C_SYM(x) C_SYM(x) : ; \ + .globl C_SYM(x) + +#endif diff --git a/contrib/media/updf/include/libc/asmdefs.h b/contrib/media/updf/include/libc/asmdefs.h new file mode 100644 index 0000000000..62b855de72 --- /dev/null +++ b/contrib/media/updf/include/libc/asmdefs.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_asmdefs_h__ +#define __dj_include_libc_asmdefs_h__ + + .file __BASE_FILE__ + +#ifdef USE_EBX +#define PUSHL_EBX pushl %ebx; +#define POPL_EBX popl %ebx; +#else +#define PUSHL_EBX +#define POPL_EBX +#endif + +#ifdef USE_ESI +#define PUSHL_ESI pushl %esi; +#define POPL_ESI popl %esi; +#else +#define PUSHL_ESI +#define POPL_ESI +#endif + +#ifdef USE_EDI +#define PUSHL_EDI pushl %edi; +#define POPL_EDI popl %edi; +#else +#define PUSHL_EDI +#define POPL_EDI +#endif + +#define FUNC(x) .globl x; \ +x: + +#define ENTER pushl %ebp; movl %esp,%ebp; PUSHL_EBX PUSHL_ESI PUSHL_EDI + +#define LEAVE L_leave: POPL_EDI POPL_ESI POPL_EBX movl %ebp,%esp; popl %ebp; ret +#define LEAVEP(x) L_leave: x; POPL_EDI POPL_ESI POPL_EBX movl %ebp,%esp; popl %ebp; ret + +#define RET jmp L_leave + +#define ARG1 8(%ebp) +#define ARG1h 10(%ebp) +#define ARG2 12(%ebp) +#define ARG2h 14(%ebp) +#define ARG3 16(%ebp) +#define ARG4 20(%ebp) +#define ARG5 24(%ebp) +#define ARG6 28(%ebp) +#define ARG7 32(%ebp) +#define ARG8 36(%ebp) + +#endif /* __dj_include_libc_asmdefs_h__ */ diff --git a/contrib/media/updf/include/libc/atexit.h b/contrib/media/updf/include/libc/atexit.h new file mode 100644 index 0000000000..7a120c729f --- /dev/null +++ b/contrib/media/updf/include/libc/atexit.h @@ -0,0 +1,34 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_atexit_h__ +#define __dj_include_libc_atexit_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +struct __atexit { + struct __atexit *__next; + void (*__function)(void); +}; + +extern struct __atexit *__atexit_ptr; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_atexit_h__ */ diff --git a/contrib/media/updf/include/libc/bss.h b/contrib/media/updf/include/libc/bss.h new file mode 100644 index 0000000000..01925e46e2 --- /dev/null +++ b/contrib/media/updf/include/libc/bss.h @@ -0,0 +1,34 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_bss_h_ +#define __dj_include_bss_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* this gets *incremented* at startup, so that if a program dumps + itself (emacs) you still have a way of telling. Compare this value + with a static, and if it's different, you've been restarted. + First time through on a non-unexec'd program, it's greater than 0 */ + +extern int __bss_count; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_bss_h_ */ diff --git a/contrib/media/updf/include/libc/dosexec.h b/contrib/media/updf/include/libc/dosexec.h new file mode 100644 index 0000000000..4f70fb9a2d --- /dev/null +++ b/contrib/media/updf/include/libc/dosexec.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_dosexec_h__ +#define __dj_include_libc_dosexec_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +extern char *__dosexec_find_on_path(const char *program, char *envp[], char *buf); +extern int __dosexec_in_system; + +#define scan_ptr() \ + const char **ptr; \ + union { const char **ccpp; const char *ccp; } u; \ + for (ptr = &argv0; *ptr; ptr++); \ + u.ccp = *++ptr; \ + ptr = u.ccpp; + +extern int __dosexec_command_exec(const char *program, char **argv, char **envp); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_dosexec_h__ */ diff --git a/contrib/media/updf/include/libc/dosio.h b/contrib/media/updf/include/libc/dosio.h new file mode 100644 index 0000000000..320e3f6d1a --- /dev/null +++ b/contrib/media/updf/include/libc/dosio.h @@ -0,0 +1,44 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_dosio_h__ +#define __dj_include_libc_dosio_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* set to O_BINARY or O_TEXT */ +extern char *__file_handle_modes; +extern void __file_handle_set(int fd, int mode); + +int __doserr_to_errno(int doserr); + +/* puts "path" in the transfer buffer, fixing + unix-allowed multi-slashes */ +void _put_path(const char * ); +void _put_path2(const char * , int); + +/* Convenience functions for setting up transfers */ + +#define __tb_offset 0 /* (__tb & 15) Always paragraph aligned */ +#define __tb_segment (_go32_info_block.linear_address_of_transfer_buffer / 16) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_dosio_h__ */ diff --git a/contrib/media/updf/include/libc/environ.h b/contrib/media/updf/include/libc/environ.h new file mode 100644 index 0000000000..59aec6c719 --- /dev/null +++ b/contrib/media/updf/include/libc/environ.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_environ_h_ +#define __dj_include_libc_environ_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* This starts at 1 and gets incremented every time some + variable in the environment is added, deleted, or changes + its value. It is meant to be used by functions that depend + on values of environment variables, but don't want to call + `getenv' unnecessarily (example: `__use_lfn'). + + To use this feature, define a static variable that is + initialized to zero, and compare its value with the value of + `__environ_changed': if they differ, you should call `getenv' + (and record the last value of `__environ_changed' you've seen). */ +extern unsigned __environ_changed; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_environ_h_ */ diff --git a/contrib/media/updf/include/libc/farptrgs.h b/contrib/media/updf/include/libc/farptrgs.h new file mode 100644 index 0000000000..3ff3dec6e5 --- /dev/null +++ b/contrib/media/updf/include/libc/farptrgs.h @@ -0,0 +1,249 @@ +/* special version for libc - uses %gs instead of %fs. Ignore comments */ + +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (c) 1995 DJ Delorie. Permission granted to use for any + purpose, provided this copyright remains attached and unmodified. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» +º Far Pointer Simulation Functions º +ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + +This file attempts to make up for the lack of a "far" keyword in GCC. +Although it doesn't provide access to far call APIs (like Windows), it +does allow you to do far pointer data access without the overhead of +movedata() or dosmemget/dosmemput(). + +You should *always* include this file when using these functions and +compile with optimization enabled. They don't exist as normal functions +in any library, and they compile down to only a few opcodes when used +this way. They are almost as fast as native pointer operations, and +about as fast as far pointers can get. + +If you don't use optimization, this file becomes prototypes for +farptr.c, which generates real functions for these when not optimizing. +When optimizing, farptr.c compiles to nothing. + +There are two types of functions here - standalone and invariant. The +standalone functions take a selector and offset. These are used when +you need only a few accesses, time isn't critical, or you don't know +what's in the %gs register. The invariant ones don't take a selector, +they only take an offset. These are used inside loops and in +time-critical accesses where the selector doesn't change. To specify +the selector, use the farsetsel() function. That selector is used for +all farns*() functions until changed. You can use _fargetsel() if you +want to temporary change the selector with _farsetsel() and restore +it afterwards. + +The farpoke* and farpeek* take selectors. + +The farnspoke* and farnspeek* don't (note the `ns' for `no selector'). + +Warning: These routines all use the %gs register for their accesses. +GCC normally uses only %ds and %es, and libc functions (movedata, +dosmemget, dosmemput) use %gs. Still, you should be careful about +assumptions concerning whether or not the value you put in %gs will be +preserved across calls to other functions. If you guess wrong, your +program will crash. Better safe than sorry. + +*/ + +#ifndef __dj_include_sys_farptr_h_ +#define __dj_include_sys_farptr_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +void _farpokeb(unsigned short, unsigned long, unsigned char); +void _farpokew(unsigned short, unsigned long, unsigned short); +void _farpokel(unsigned short, unsigned long, unsigned long); +unsigned char _farpeekb(unsigned short, unsigned long); +unsigned short _farpeekw(unsigned short, unsigned long); +unsigned long _farpeekl(unsigned short, unsigned long); +void _farsetsel(unsigned short); +unsigned short _fargetsel(void); +void _farnspokeb(unsigned long, unsigned char); +void _farnspokew(unsigned long, unsigned short); +void _farnspokel(unsigned long, unsigned long); +unsigned char _farnspeekb(unsigned long); +unsigned short _farnspeekw(unsigned long); +unsigned long _farnspeekl(unsigned long); + +extern __inline__ void +_farpokeb(unsigned short selector, + unsigned long offset, + unsigned char value) +{ + __asm__ __volatile__ ("movw %w0,%%gs\n" + " .byte 0x65 \n" + " movb %b1,(%k2)" + : + : "rm" (selector), "qi" (value), "r" (offset)); +} + +extern __inline__ void +_farpokew(unsigned short selector, + unsigned long offset, + unsigned short value) +{ + __asm__ __volatile__ ("movw %w0,%%gs \n" + " .byte 0x65 \n" + " movw %w1,(%k2)" + : + : "rm" (selector), "ri" (value), "r" (offset)); +} + +extern __inline__ void +_farpokel(unsigned short selector, + unsigned long offset, + unsigned long value) +{ + __asm__ __volatile__ ("movw %w0,%%gs \n" + " .byte 0x65 \n" + " movl %k1,(%k2)" + : + : "rm" (selector), "ri" (value), "r" (offset)); +} + +extern __inline__ unsigned char +_farpeekb(unsigned short selector, + unsigned long offset) +{ + unsigned char result; + __asm__ __volatile__ ("movw %w1,%%gs \n" + " .byte 0x65 \n" + " movb (%k2),%b0" + : "=q" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ unsigned short +_farpeekw(unsigned short selector, + unsigned long offset) +{ + unsigned short result; + __asm__ __volatile__ ("movw %w1, %%gs \n" + " .byte 0x65 \n" + " movw (%k2),%w0 \n" + : "=r" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ unsigned long +_farpeekl(unsigned short selector, + unsigned long offset) +{ + unsigned long result; + __asm__ __volatile__ ("movw %w1,%%gs\n" + " .byte 0x65\n" + " movl (%k2),%k0" + : "=r" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ void +_farsetsel(unsigned short selector) +{ + __asm__ __volatile__ ("movw %w0,%%gs" + : + : "rm" (selector)); +} + +extern __inline__ unsigned short +_fargetsel(void) +{ + unsigned short selector; + __asm__ __volatile__ ("movw %%gs,%w0 \n" + : "=r" (selector) + : ); + return selector; +} + +extern __inline__ void +_farnspokeb(unsigned long offset, + unsigned char value) +{ + __asm__ __volatile__ (".byte 0x65\n" + " movb %b0,(%k1)" + : + : "qi" (value), "r" (offset)); +} + +extern __inline__ void +_farnspokew(unsigned long offset, + unsigned short value) +{ + __asm__ __volatile__ (".byte 0x65\n" + " movw %w0,(%k1)" + : + : "ri" (value), "r" (offset)); +} + +extern __inline__ void +_farnspokel(unsigned long offset, + unsigned long value) +{ + __asm__ __volatile__ (".byte 0x65\n" + " movl %k0,(%k1)" + : + : "ri" (value), "r" (offset)); +} + +extern __inline__ unsigned char +_farnspeekb(unsigned long offset) +{ + unsigned char result; + __asm__ __volatile__ (".byte 0x65\n" + " movb (%k1),%b0" + : "=q" (result) + : "r" (offset)); + return result; +} + +extern __inline__ unsigned short +_farnspeekw(unsigned long offset) +{ + unsigned short result; + __asm__ __volatile__ (".byte 0x65\n" + " movw (%k1),%w0" + : "=r" (result) + : "r" (offset)); + return result; +} + +extern __inline__ unsigned long +_farnspeekl(unsigned long offset) +{ + unsigned long result; + __asm__ __volatile__ (".byte 0x65\n" + " movl (%k1),%k0" + : "=r" (result) + : "r" (offset)); + return result; +} + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_farptr_h_ */ diff --git a/contrib/media/updf/include/libc/file.h b/contrib/media/updf/include/libc/file.h new file mode 100644 index 0000000000..20d652dc44 --- /dev/null +++ b/contrib/media/updf/include/libc/file.h @@ -0,0 +1,119 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_file_h__ +#define __dj_include_libc_file_h__ + +#include <fcntl.h> +#include <libc/dosio.h> +#include <libc/ttyprvt.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define _IOREAD 000010 +#define _IOWRT 000020 +#define _IOMYBUF 000040 +#define _IOEOF 000100 +#define _IOERR 000200 +#define _IOSTRG 000400 +#define _IORW 001000 +#define _IOAPPEND 002000 +#define _IORMONCL 004000 /* remove on close, for temp files */ +/* if _flag & _IORMONCL, ._name_to_remove needs freeing */ +#define _IOUNGETC 010000 /* there is an ungetc'ed character in the buffer */ +#define _IOTERM 020000 /* file's handle hooked by termios */ +#define _IONTERM 040000 /* file's handle not hooked by termios */ + +int _flsbuf(int, FILE*); +int _filbuf(FILE *); +void _fwalk(void (*)(FILE *)); + +static __inline__ int __getc_raw(FILE *const p) +{ + if(p->_cnt>0) + { + p->_cnt--; + return((unsigned char)*(p->_ptr++)); + } + return(_filbuf(p)); +} + +static __inline__ int __putc_raw(int const x,FILE *const p) +{ + if(p->_cnt>0) + { + p->_cnt--; + return((unsigned char)(*(p->_ptr++)=(unsigned char)x)); + } + return(_flsbuf((unsigned char)x,p)); +} + +static __inline__ int __is_text_file(FILE *const p) +{ + return(!((p)->_flag & (_IOSTRG | _IOTERM)) + && (__file_handle_modes[(p)->_file]&O_TEXT)); +} + +static __inline__ int __getc(FILE *const p) +{ + int __c; + if (__libc_read_termios_hook + && ((p)->_flag & (_IOTERM | _IONTERM)) == 0) + { + extern int __isatty(int); + /* first time we see this handle--see if termios hooked it */ + if (!((p)->_flag & _IOSTRG) && __isatty((p)->_file)) + (p)->_flag |= _IOTERM; + else + (p)->_flag |= _IONTERM; + } + __c = __getc_raw(p); + if (__c=='\r' && __is_text_file(p)) + return __getc_raw(p); + return __c; +} + +static __inline__ int __putc(const int x,FILE *const p) +{ + if (__libc_write_termios_hook + && ((p)->_flag & (_IOTERM | _IONTERM)) == 0) + { + extern int __isatty(int); + /* first time we see this handle--see if termios hooked it */ + if (!((p)->_flag & _IOSTRG) && __isatty((p)->_file)) + (p)->_flag |= _IOTERM; + else + (p)->_flag |= _IONTERM; + } + if(x=='\n' && __is_text_file(p)) + __putc_raw('\r',p); + return __putc_raw(x,p); +} + +#undef fileno +#define fileno(f) (f->_file) +#undef feof +#define feof(f) (((f)->_flag&_IOEOF)!=0) +#undef ferror +#define ferror(f) (((f)->_flag&_IOERR)!=0) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_file_h__ */ diff --git a/contrib/media/updf/include/libc/ieee.h b/contrib/media/updf/include/libc/ieee.h new file mode 100644 index 0000000000..f501b4f261 --- /dev/null +++ b/contrib/media/updf/include/libc/ieee.h @@ -0,0 +1,46 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_ieee_h__ +#define __dj_include_libc_ieee_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +typedef struct { + unsigned mantissa:23; + unsigned exponent:8; + unsigned sign:1; +} float_t; + +typedef struct { + unsigned mantissal:32; + unsigned mantissah:20; + unsigned exponent:11; + unsigned sign:1; +} double_t; + +typedef struct { + unsigned mantissal:32; + unsigned mantissah:32; + unsigned exponent:15; + unsigned sign:1; +} long_double_t; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_ieee_h__ */ diff --git a/contrib/media/updf/include/libc/internal.h b/contrib/media/updf/include/libc/internal.h new file mode 100644 index 0000000000..73f450de04 --- /dev/null +++ b/contrib/media/updf/include/libc/internal.h @@ -0,0 +1,26 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_internal_h__ +#define __dj_include_libc_internal_h__ + +#ifdef __cplusplus +extern "C" { +#endif +void __crt1_startup(void); +void __main(void); +void _npxsetup(char *argv0); +void __emu387_exception_handler(void); +void __djgpp_exception_processor(void); +void __djgpp_exception_setup(void); + +static inline int str_check_ptr(void * ptr) +{ + unsigned long p=(unsigned long)ptr; + if(p<64 || p>(64*1024*1024)) return 0; + return 1; +} + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_internal_h__ */ diff --git a/contrib/media/updf/include/libc/local.h b/contrib/media/updf/include/libc/local.h new file mode 100644 index 0000000000..3e38a9f4a2 --- /dev/null +++ b/contrib/media/updf/include/libc/local.h @@ -0,0 +1,39 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_local_h__ +#define __dj_include_libc_local_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +FILE * __alloc_file(void); + +/* A FILE* is considered "free" if its flag is zero. */ + +#define __FILE_REC_MAX 20 +typedef struct __file_rec { + struct __file_rec *next; + int count; + FILE *files[__FILE_REC_MAX]; +} __file_rec; + +extern __file_rec *__file_rec_list; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_local_h__ */ diff --git a/contrib/media/updf/include/libc/mkfargs.bat b/contrib/media/updf/include/libc/mkfargs.bat new file mode 100644 index 0000000000..bfca69c1e8 --- /dev/null +++ b/contrib/media/updf/include/libc/mkfargs.bat @@ -0,0 +1,5 @@ +@echo off + +echo /* special version for libc - uses %%gs instead of %%fs. Ignore comments */> farptrgs.h +echo.>>farptrgs.h +sed -e 's/%%fs/%%gs/g' -e 's/0x64/0x65/g' < ..\sys\farptr.h >> farptrgs.h diff --git a/contrib/media/updf/include/libc/stdiohk.h b/contrib/media/updf/include/libc/stdiohk.h new file mode 100644 index 0000000000..d3fd3d200a --- /dev/null +++ b/contrib/media/updf/include/libc/stdiohk.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_stdiohk_h__ +#define __dj_include_libc_stdiohk_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* Force stdiohk.o to get linked in, and that module has the + code for the stdio flush/fclose stuff. That .o causes the + hook function to get initialized also. */ + +#include __DEV_CONFIG_H + +#ifndef NEEDS_UNDERSCORES +__asm__(".long __stdio_cleanup_proc"); +#else +__asm__(".long ___stdio_cleanup_proc"); +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_stdiohk_h__ */ diff --git a/contrib/media/updf/include/libc/stubs.h b/contrib/media/updf/include/libc/stubs.h new file mode 100644 index 0000000000..b6d70ee314 --- /dev/null +++ b/contrib/media/updf/include/libc/stubs.h @@ -0,0 +1,53 @@ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_stubs_h__ +#define __dj_include_libc_stubs_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* POSIX functions (for when compiling an ANSI function) */ + +/* DJGPP functions (for compiling POSIX or ANSI functions) */ +#define crlf2nl __crlf2nl +#define dosmemget __dosmemget +#define dosmemput __dosmemput +#define filelength __filelength +#define findfirst __findfirst +#define findnext __findnext +#define fsync __fsync +#define getdisk __getdisk +#define getdtablesize __getdtablesize +#define getitimer __getitimer +#define modfl __modfl +#define movedata __movedata +#define pow10 __pow10 +#define pow2 __pow2 +#define putenv __putenv +#define sbrk __sbrk +#define setitimer __setitimer +#define setmode __setmode +#define spawnve __spawnve +#define spawnvpe __spawnvpe +#define stricmp __stricmp +#define sync __sync + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_stubs_h__ */ diff --git a/contrib/media/updf/include/libc/ttyprvt.h b/contrib/media/updf/include/libc/ttyprvt.h new file mode 100644 index 0000000000..877a1f828a --- /dev/null +++ b/contrib/media/updf/include/libc/ttyprvt.h @@ -0,0 +1,138 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_ttyprvt_h__ +#define __dj_include_libc_ttyprvt_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <termios.h> +#include <unistd.h> + +#define _TTY_CTRL(x) ((x) & 0x1f) +#define _TTY_QUEUE_SIZE 2048 +#define _TTY_EDITLINE_SIZE ((_TTY_QUEUE_SIZE) / 2) +#define _TTY_EDITLINE_CTRL 0 +#define _TTY_EDITLINE_SINGLE 1 +#define _TTY_EDITLINE_INVALID -1 + +struct tty_queue +{ + int size; + unsigned char *top; + unsigned char *bottom; + int count; + unsigned char *rpos; + unsigned char *wpos; +}; + +struct tty +{ + struct termios __libc_termios; + struct tty_queue __libc_tty_queue; + int __libc_tty_status; +}; + +struct tty_editline +{ + int col; + char flag[_TTY_EDITLINE_SIZE]; + unsigned char buf[_TTY_EDITLINE_SIZE]; +}; + +#if !defined (_POSIX_VDISABLE) || (_POSIX_VDISABLE == 0) +#error _POSIX_VDISABLE is undefine or zero. +#endif + +#define TTYDEFAULT \ +{ \ + { \ + /* c_cc[] */ \ + { \ + (cc_t) 0, /* pad */ \ + (cc_t) _TTY_CTRL ('d'), /* VEOF */ \ + (cc_t) _POSIX_VDISABLE, /* VEOL */ \ + (cc_t) _TTY_CTRL ('h'), /* VERASE */ \ + (cc_t) _TTY_CTRL ('c'), /* VINTR */ \ + (cc_t) _TTY_CTRL ('u'), /* VKILL */ \ + (cc_t) 1, /* VMIN */ \ + (cc_t) _TTY_CTRL ('\\'),/* VQUIT */ \ + (cc_t) _TTY_CTRL ('q'), /* VSTART */ \ + (cc_t) _TTY_CTRL ('s'), /* VSTOP */ \ + (cc_t) _TTY_CTRL ('z'), /* VSUSP */ \ + (cc_t) 0, /* VTIME */ \ + }, \ + (tcflag_t) (CS8|CREAD|CLOCAL), /* c_cflag */ \ + (tcflag_t) (BRKINT|ICRNL|IMAXBEL), /* c_iflag */ \ + (tcflag_t) (ISIG|ICANON|ECHO|IEXTEN|ECHOE|ECHOKE|ECHOCTL), /* c_lflag */ \ + (tcflag_t) (OPOST|ONLCR|ONOEOT), /* c_oflag */ \ + (speed_t) (B9600), /* c_ispeed */ \ + (speed_t) (B9600), /* c_ospeed */ \ + }, \ + /* struct tty_queue __libc_tty_queue */ \ + { \ + _TTY_QUEUE_SIZE, \ + __libc_tty_queue_buffer, \ + __libc_tty_queue_buffer + _TTY_QUEUE_SIZE, \ + 0, \ + __libc_tty_queue_buffer, \ + __libc_tty_queue_buffer, \ + }, \ + /* __libc_tty_status */ \ + 0, \ +} + +#define t_termios __libc_termios +#define t_iflag __libc_termios.c_iflag +#define t_oflag __libc_termios.c_oflag +#define t_cflag __libc_termios.c_cflag +#define t_lflag __libc_termios.c_lflag +#define t_ispeed __libc_termios.c_ispeed +#define t_ospeed __libc_termios.c_ospeed +#define t_cc __libc_termios.c_cc +#define t_status __libc_tty_status + +#define t_size __libc_tty_queue.size +#define t_top __libc_tty_queue.top +#define t_bottom __libc_tty_queue.bottom +#define t_count __libc_tty_queue.count +#define t_rpos __libc_tty_queue.rpos +#define t_wpos __libc_tty_queue.wpos + +#define _TS_LNCH 0x01 /* next character is literal */ +#define _CC_EQU(v,c) (((c) == (unsigned char) __libc_tty_p->t_cc[(v)]) \ + && ((c) != (unsigned char) _POSIX_VDISABLE)) +#define _CC_NEQU(v,c) (((c) != (unsigned char)__libc_tty_p->t_cc[(v)]) \ + && ((c) != (unsigned char) _POSIX_VDISABLE)) + +/* internal buffers */ +extern unsigned char __libc_tty_queue_buffer[]; +extern struct tty __libc_tty_internal; +extern struct tty *__libc_tty_p; +extern struct tty_editline __libc_tty_editline; + +/* termios hooks */ +extern ssize_t (*__libc_read_termios_hook)(int handle, void *buffer, size_t count, + ssize_t *rv); +extern ssize_t (*__libc_write_termios_hook)(int handle, const void *buffer, size_t count, + ssize_t *rv); +extern int __libc_termios_hook_common_count; + +/* functions */ +void __libc_termios_init (void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_libc_ttyprvt_h__ */ diff --git a/contrib/media/updf/include/libc/unconst.h b/contrib/media/updf/include/libc/unconst.h new file mode 100644 index 0000000000..fa8744274d --- /dev/null +++ b/contrib/media/updf/include/libc/unconst.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_libc_unconst_h__ +#define __dj_include_libc_unconst_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define unconst(__v, __t) __extension__ ({union { const __t __cp; __t __p; } __q; __q.__cp = __v; __q.__p;}) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_libc_unconst_h__ */ diff --git a/contrib/media/updf/include/libc/version.h b/contrib/media/updf/include/libc/version.h new file mode 100644 index 0000000000..0ce5fb3984 --- /dev/null +++ b/contrib/media/updf/include/libc/version.h @@ -0,0 +1,7 @@ +/* This file is automatically generated by mkversion. */ +/* Please do not modify it unless you know what you are doing. */ +#define MENUET_LIBC_VERSION "0.2.9" + +#ifdef INCLUDE_RCS_ID +static const char * ___menuet__libc_version_0_2_9="MenuetOS GNU C library port by Jarek Pelczar. This file is " __FILE__ ; +#endif diff --git a/contrib/media/updf/include/libelf/byteswap.h b/contrib/media/updf/include/libelf/byteswap.h new file mode 100644 index 0000000000..b639924257 --- /dev/null +++ b/contrib/media/updf/include/libelf/byteswap.h @@ -0,0 +1,75 @@ +/* +byteswap.h - C preprocessor macros for byte swapping. +Copyright (C) 1995, 1996 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: byteswap.h,v 1.2 1996/10/22 16:45:54 michael Exp $ */ + +#ifndef _BYTESWAP_H +#define _BYTESWAP_H + +#define lu(from,i,s) (((long)((unsigned char*)(from))[i])<<(s)) +#define li(from,i,s) (((long)((signed char*)(from))[i])<<(s)) + +#define __load_u16L(from) ((unsigned long)(lu(from,1,8)|lu(from,0,0))) +#define __load_u16M(from) ((unsigned long)(lu(from,0,8)|lu(from,1,0))) +#define __load_i16L(from) ((long)(li(from,1,8)|lu(from,0,0))) +#define __load_i16M(from) ((long)(li(from,0,8)|lu(from,1,0))) + +#define __load_u32L(from) ((unsigned long)(lu(from,3,24)| \ + lu(from,2,16)| \ + lu(from,1,8)| \ + lu(from,0,0))) +#define __load_u32M(from) ((unsigned long)(lu(from,0,24)| \ + lu(from,1,16)| \ + lu(from,2,8)| \ + lu(from,3,0))) +#define __load_i32L(from) ((long)(li(from,3,24)| \ + lu(from,2,16)| \ + lu(from,1,8)| \ + lu(from,0,0))) +#define __load_i32M(from) ((long)(li(from,0,24)| \ + lu(from,1,16)| \ + lu(from,2,8)| \ + lu(from,3,0))) + +#define su(to,i,v,s) (((char*)(to))[i]=((unsigned long)(v)>>(s))) +#define si(to,i,v,s) (((char*)(to))[i]=((long)(v)>>(s))) + +#define __store_u16L(to,v) (su(to,1,v,8),su(to,0,v,0)) +#define __store_u16M(to,v) (su(to,0,v,8),su(to,1,v,0)) +#define __store_i16L(to,v) (si(to,1,v,8),si(to,0,v,0)) +#define __store_i16M(to,v) (si(to,0,v,8),si(to,1,v,0)) + +#define __store_u32L(to,v) (su(to,3,v,24), \ + su(to,2,v,16), \ + su(to,1,v,8), \ + su(to,0,v,0)) +#define __store_u32M(to,v) (su(to,0,v,24), \ + su(to,1,v,16), \ + su(to,2,v,8), \ + su(to,3,v,0)) +#define __store_i32L(to,v) (si(to,3,v,24), \ + si(to,2,v,16), \ + si(to,1,v,8), \ + si(to,0,v,0)) +#define __store_i32M(to,v) (si(to,0,v,24), \ + si(to,1,v,16), \ + si(to,2,v,8), \ + si(to,3,v,0)) + +#endif /* _BYTESWAP_H */ diff --git a/contrib/media/updf/include/libelf/config.h b/contrib/media/updf/include/libelf/config.h new file mode 100644 index 0000000000..7930474839 --- /dev/null +++ b/contrib/media/updf/include/libelf/config.h @@ -0,0 +1,107 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you have a working `mmap' system call. */ +/* #define HAVE_MMAP 1 */ + +/* Define to `long' if <sys/types.h> doesn't define. */ +/* #undef off_t */ + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you want to include extra debugging code */ +/* #undef ENABLE_DEBUG */ + +/* Define if memmove() does not copy overlapping arrays correctly */ +/* #undef HAVE_BROKEN_MEMMOVE */ + +/* Define if you have the catgets function. */ +/* #undef HAVE_CATGETS */ + +/* Define if you have the gettext function. */ +/* #define HAVE_GETTEXT 1 */ + +/* Define if you have the memset function. */ +#define HAVE_MEMSET 1 + +/* Define if struct nlist is declared in <elf.h> or <sys/elf.h> */ +/* #undef HAVE_STRUCT_NLIST_DECLARATION */ + +/* Define if Elf32_Dyn is declared in <link.h> */ +/* #undef NEED_LINK_H */ + +/* Define to `<elf.h>' or `<sys/elf.h>' if one of them is present */ +#define __LIBELF_HEADER_ELF_H <elf.h> + +/* Define if you want 64-bit support (and your system supports it) */ +#define __LIBELF64 1 + +/* Define if you want 64-bit support, and are running IRIX */ +/* #undef __LIBELF64_IRIX */ + +/* Define if you want 64-bit support, and are running Linux */ +/* #undef __LIBELF64_LINUX */ + +/* Define to a 64-bit signed integer type if one exists */ +#define __libelf_i64_t long long + +/* Define to a 64-bit unsigned integer type if one exists */ +#define __libelf_u64_t unsigned long long + +/* Define to a 32-bit signed integer type if one exists */ +#define __libelf_i32_t long + +/* Define to a 32-bit unsigned integer type if one exists */ +#define __libelf_u32_t unsigned long + +/* Define to a 16-bit signed integer type if one exists */ +#define __libelf_i16_t short + +/* Define to a 16-bit unsigned integer type if one exists */ +#define __libelf_u16_t unsigned short + +/* The number of bytes in a int. */ +#define SIZEOF_INT 4 + +/* The number of bytes in a long. */ +#define SIZEOF_LONG 4 + +/* The number of bytes in a long long. */ +#define SIZEOF_LONG_LONG 8 + +/* The number of bytes in a short. */ +#define SIZEOF_SHORT 2 + +/* Define if you have the ftruncate function. */ +/* #define HAVE_FTRUNCATE 1 */ + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the memcmp function. */ +#define HAVE_MEMCMP 1 + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the memset function. */ +#define HAVE_MEMSET 1 + +/* Define if you have the <elf.h> header file. */ +#define HAVE_ELF_H 1 + +/* Define if you have the <sys/elf.h> header file. */ +#define HAVE_SYS_ELF_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 diff --git a/contrib/media/updf/include/libelf/elf_repl.h b/contrib/media/updf/include/libelf/elf_repl.h new file mode 100644 index 0000000000..771f256717 --- /dev/null +++ b/contrib/media/updf/include/libelf/elf_repl.h @@ -0,0 +1,460 @@ +/* +elf_repl.h - public header file for systems that lack it. +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: elf_repl.h,v 1.4 1998/06/04 17:14:01 michael Exp $ */ + +/* + * NEVER INCLUDE THIS FILE DIRECTLY - USE <libelf.h> INSTEAD! + */ + +#ifndef _ELF_REPL_H +#define _ELF_REPL_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Scalar data types + */ +typedef __libelf_u32_t Elf32_Addr; +typedef __libelf_u16_t Elf32_Half; +typedef __libelf_u32_t Elf32_Off; +typedef __libelf_i32_t Elf32_Sword; +typedef __libelf_u32_t Elf32_Word; + +#define ELF32_FSZ_ADDR 4 +#define ELF32_FSZ_HALF 2 +#define ELF32_FSZ_OFF 4 +#define ELF32_FSZ_SWORD 4 +#define ELF32_FSZ_WORD 4 + +#if __LIBELF64 +typedef __libelf_u64_t Elf64_Addr; +typedef __libelf_u16_t Elf64_Half; +typedef __libelf_u64_t Elf64_Off; +typedef __libelf_i32_t Elf64_Sword; +typedef __libelf_i64_t Elf64_Sxword; +typedef __libelf_u32_t Elf64_Word; +typedef __libelf_u64_t Elf64_Xword; + +#define ELF64_FSZ_ADDR 8 +#define ELF64_FSZ_HALF 2 +#define ELF64_FSZ_OFF 8 +#define ELF64_FSZ_SWORD 4 +#define ELF64_FSZ_SXWORD 8 +#define ELF64_FSZ_WORD 4 +#define ELF64_FSZ_XWORD 8 +#endif /* __LIBELF64 */ + +/* + * ELF header + */ +#define EI_NIDENT 16 + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf32_Half e_type; + Elf32_Half e_machine; + Elf32_Word e_version; + Elf32_Addr e_entry; + Elf32_Off e_phoff; + Elf32_Off e_shoff; + Elf32_Word e_flags; + Elf32_Half e_ehsize; + Elf32_Half e_phentsize; + Elf32_Half e_phnum; + Elf32_Half e_shentsize; + Elf32_Half e_shnum; + Elf32_Half e_shstrndx; +} Elf32_Ehdr; + +#if __LIBELF64 +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf64_Half e_type; + Elf64_Half e_machine; + Elf64_Word e_version; + Elf64_Addr e_entry; + Elf64_Off e_phoff; + Elf64_Off e_shoff; + Elf64_Word e_flags; + Elf64_Half e_ehsize; + Elf64_Half e_phentsize; + Elf64_Half e_phnum; + Elf64_Half e_shentsize; + Elf64_Half e_shnum; + Elf64_Half e_shstrndx; +} Elf64_Ehdr; +#endif /* __LIBELF64 */ + +/* + * e-ident + */ +#define EI_MAG0 0 +#define EI_MAG1 1 +#define EI_MAG2 2 +#define EI_MAG3 3 +#define EI_CLASS 4 +#define EI_DATA 5 +#define EI_VERSION 6 +#define EI_PAD 7 + +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG "\177ELF" +#define SELFMAG 4 + +#define ELFCLASSNONE 0 +#define ELFCLASS32 1 +#define ELFCLASS64 2 +#define ELFCLASSNUM 3 + +#define ELFDATANONE 0 +#define ELFDATA2LSB 1 +#define ELFDATA2MSB 2 +#define ELFDATANUM 3 + +/* + * e_type + */ +#define ET_NONE 0 +#define ET_REL 1 +#define ET_EXEC 2 +#define ET_DYN 3 +#define ET_CORE 4 +#define ET_NUM 5 +#define ET_LOPROC 0xff00 +#define ET_HIPROC 0xffff + +/* + * e_machine + */ +#define EM_NONE 0 +#define EM_M32 1 /* AT&T WE 32100 */ +#define EM_SPARC 2 /* SPARC */ +#define EM_386 3 /* Intel i386 */ +#define EM_68K 4 /* Motorola 68000 */ +#define EM_88K 5 /* Motorola 88000 */ +#define EM_486 6 /* Intel i486 (do not use this one) */ +#define EM_860 7 /* Intel i860 */ +#define EM_MIPS 8 /* MIPS R3000 */ +#define EM_NUM 9 + +/* + * e_ident[EI_VERSION], e_version + */ +#define EV_NONE 0 +#define EV_CURRENT 1 +#define EV_NUM 2 + +/* + * Section header + */ +typedef struct { + Elf32_Word sh_name; + Elf32_Word sh_type; + Elf32_Word sh_flags; + Elf32_Addr sh_addr; + Elf32_Off sh_offset; + Elf32_Word sh_size; + Elf32_Word sh_link; + Elf32_Word sh_info; + Elf32_Word sh_addralign; + Elf32_Word sh_entsize; +} Elf32_Shdr; + +#if __LIBELF64 +typedef struct { + Elf64_Word sh_name; + Elf64_Word sh_type; + Elf64_Xword sh_flags; + Elf64_Addr sh_addr; + Elf64_Off sh_offset; + Elf64_Xword sh_size; + Elf64_Word sh_link; + Elf64_Word sh_info; + Elf64_Xword sh_addralign; + Elf64_Xword sh_entsize; +} Elf64_Shdr; +#endif /* __LIBELF64 */ + +/* + * Special section indices + */ +#define SHN_UNDEF 0 +#define SHN_LORESERVE 0xff00 +#define SHN_LOPROC 0xff00 +#define SHN_HIPROC 0xff1f +#define SHN_ABS 0xfff1 +#define SHN_COMMON 0xfff2 +#define SHN_HIRESERVE 0xffff + +/* + * sh_type + */ +#define SHT_NULL 0 +#define SHT_PROGBITS 1 +#define SHT_SYMTAB 2 +#define SHT_STRTAB 3 +#define SHT_RELA 4 +#define SHT_HASH 5 +#define SHT_DYNAMIC 6 +#define SHT_NOTE 7 +#define SHT_NOBITS 8 +#define SHT_REL 9 +#define SHT_SHLIB 10 +#define SHT_DYNSYM 11 +#define SHT_NUM 12 +#define SHT_LOPROC 0x70000000 +#define SHT_HIPROC 0x7fffffff +#define SHT_LOUSER 0x80000000 +#define SHT_HIUSER 0xffffffff + +/* + * sh_flags + */ +#define SHF_WRITE 0x1 +#define SHF_ALLOC 0x2 +#define SHF_EXECINSTR 0x4 +#define SHF_MASKPROC 0xf0000000 + +/* + * Symbol table + */ +typedef struct { + Elf32_Word st_name; + Elf32_Addr st_value; + Elf32_Word st_size; + unsigned char st_info; + unsigned char st_other; + Elf32_Half st_shndx; +} Elf32_Sym; + +#if __LIBELF64 +typedef struct { + Elf64_Word st_name; + unsigned char st_info; + unsigned char st_other; + Elf64_Half st_shndx; + Elf64_Addr st_value; + Elf64_Xword st_size; +} Elf64_Sym; +#endif /* __LIBELF64 */ + +/* + * Special symbol indices + */ +#define STN_UNDEF 0 + +/* + * Macros for manipulating st_info + */ +#define ELF32_ST_BIND(i) ((i)>>4) +#define ELF32_ST_TYPE(i) ((i)&0xf) +#define ELF32_ST_INFO(b,t) (((b)<<4)+((t)&0xf)) + +/* + * Symbol binding + */ +#define STB_LOCAL 0 +#define STB_GLOBAL 1 +#define STB_WEAK 2 +#define STB_NUM 3 +#define STB_LOPROC 13 +#define STB_HIPROC 15 + +/* + * Symbol types + */ +#define STT_NOTYPE 0 +#define STT_OBJECT 1 +#define STT_FUNC 2 +#define STT_SECTION 3 +#define STT_FILE 4 +#define STT_NUM 5 +#define STT_LOPROC 13 +#define STT_HIPROC 15 + +/* + * Relocation + */ +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; +} Elf32_Rel; + +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; + Elf32_Sword r_addend; +} Elf32_Rela; + +#if __LIBELF64 +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; +} Elf64_Rel; + +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; + Elf64_Sxword r_addend; +} Elf64_Rela; +#endif /* __LIBELF64 */ + +/* + * Macros for manipulating r_info + */ +#define ELF32_R_SYM(i) ((i)>>8) +#define ELF32_R_TYPE(i) ((unsigned char)(i)) +#define ELF32_R_INFO(s,t) (((s)<<8)+(unsigned char)(t)) + +/* + * Note entry header + */ +typedef struct { + Elf32_Word n_namesz; /* name size */ + Elf32_Word n_descsz; /* descriptor size */ + Elf32_Word n_type; /* descriptor type */ +} Elf32_Nhdr; + +#if __LIBELF64 && 0 /* I don't know if this is correct */ +typedef struct { + Elf64_Word n_namesz; /* name size */ + Elf64_Word n_descsz; /* descriptor size */ + Elf64_Word n_type; /* descriptor type */ +} Elf64_Nhdr; +#endif /* __LIBELF64 */ + +/* + * Well-known descriptor types for ET_CORE files + */ +#define NT_PRSTATUS 1 +#define NT_PRFPREG 2 +#define NT_PRPSINFO 3 + +/* + * Program header + */ +typedef struct { + Elf32_Word p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + Elf32_Word p_filesz; + Elf32_Word p_memsz; + Elf32_Word p_flags; + Elf32_Word p_align; +} Elf32_Phdr; + +#if __LIBELF64 +typedef struct { + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; +#endif /* __LIBELF64 */ + +/* + * p_type + */ +#define PT_NULL 0 +#define PT_LOAD 1 +#define PT_DYNAMIC 2 +#define PT_INTERP 3 +#define PT_NOTE 4 +#define PT_SHLIB 5 +#define PT_PHDR 6 +#define PT_NUM 7 +#define PT_LOPROC 0x70000000 +#define PT_HIPROC 0x7fffffff + +/* + * p_flags + */ +#define PF_R 0x4 +#define PF_W 0x2 +#define PF_X 0x1 +#define PF_MASKPROC 0xf0000000 + +/* + * Dynamic structure + */ +typedef struct { + Elf32_Sword d_tag; + union { + Elf32_Word d_val; + Elf32_Addr d_ptr; + } d_un; +} Elf32_Dyn; + +#if __LIBELF64 +typedef struct { + Elf64_Sxword d_tag; + union { + Elf64_Xword d_val; + Elf64_Addr d_ptr; + } d_un; +} Elf64_Dyn; +#endif /* __LIBELF64 */ + +/* + * Dynamic array tags + */ +#define DT_NULL 0 +#define DT_NEEDED 1 +#define DT_PLTRELSZ 2 +#define DT_PLTGOT 3 +#define DT_HASH 4 +#define DT_STRTAB 5 +#define DT_SYMTAB 6 +#define DT_RELA 7 +#define DT_RELASZ 8 +#define DT_RELAENT 9 +#define DT_STRSZ 10 +#define DT_SYMENT 11 +#define DT_INIT 12 +#define DT_FINI 13 +#define DT_SONAME 14 +#define DT_RPATH 15 +#define DT_SYMBOLIC 16 +#define DT_REL 17 +#define DT_RELSZ 18 +#define DT_RELENT 19 +#define DT_PLTREL 20 +#define DT_DEBUG 21 +#define DT_TEXTREL 22 +#define DT_JMPREL 23 +#define DT_NUM 24 +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _ELF_REPL_H */ diff --git a/contrib/media/updf/include/libelf/errors.h b/contrib/media/updf/include/libelf/errors.h new file mode 100644 index 0000000000..44111b6173 --- /dev/null +++ b/contrib/media/updf/include/libelf/errors.h @@ -0,0 +1,83 @@ +/* +errors.h - exhaustive list of all error codes and messages for libelf. +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: errors.h,v 1.4 1998/06/08 14:50:30 michael Exp $ */ + +/* dummy for xgettext */ +#define _(str) str + +__err__(ERROR_OK, _("no error")) +__err__(ERROR_UNKNOWN, _("unknown error")) +__err__(ERROR_INTERNAL, _("Internal error: unknown reason")) +__err__(ERROR_UNIMPLEMENTED, _("Internal error: not implemented")) +__err__(ERROR_WRONLY, _("Request error: cntl(ELF_C_FDREAD) on write-only file")) +__err__(ERROR_INVALID_CMD, _("Request error: invalid ELF_C_* argument")) +__err__(ERROR_FDDISABLED, _("Request error: file descriptor disabled")) +__err__(ERROR_NOTARCHIVE, _("Request error: not an archive")) +__err__(ERROR_BADOFF, _("Request error: offset out of range")) +__err__(ERROR_UNKNOWN_VERSION, _("Request error: unknown ELF version")) +__err__(ERROR_CMDMISMATCH, _("Request error: ELF_C_* argument does not match")) +__err__(ERROR_MEMBERWRITE, _("Request error: archive member begin() for writing")) +__err__(ERROR_FDMISMATCH, _("Request error: archive/member file descriptor mismatch")) +__err__(ERROR_NOTELF, _("Request error: not an ELF file")) +__err__(ERROR_CLASSMISMATCH, _("Request error: class file/memory mismatch")) +__err__(ERROR_UNKNOWN_TYPE, _("Request error: invalid ELF_T_* argument")) +__err__(ERROR_UNKNOWN_ENCODING, _("Request error: unknown data encoding")) +__err__(ERROR_DST2SMALL, _("Request error: destination buffer too small")) +__err__(ERROR_NULLBUF, _("Request error: d_buf is NULL")) +__err__(ERROR_UNKNOWN_CLASS, _("Request error: unknown ELF class")) +__err__(ERROR_ELFSCNMISMATCH, _("Request error: section does not belong to file")) +__err__(ERROR_NOSUCHSCN, _("Request error: no section at index")) +__err__(ERROR_NULLSCN, _("Request error: can't manipulate null section")) +__err__(ERROR_SCNDATAMISMATCH, _("Request error: data does not belong to section")) +__err__(ERROR_NOSTRTAB, _("Request error: no string table")) +__err__(ERROR_BADSTROFF, _("Request error: string table offset out of range")) +__err__(ERROR_RDONLY, _("Request error: update(ELF_C_WRITE) on read-only file")) +__err__(ERROR_IO_SEEK, _("I/O error: seek")) +__err__(ERROR_IO_2BIG, _("I/O error: file too big for memory")) +__err__(ERROR_IO_READ, _("I/O error: raw read")) +__err__(ERROR_IO_GETSIZE, _("I/O error: get file size")) +__err__(ERROR_IO_WRITE, _("I/O error: output write")) +__err__(ERROR_IO_TRUNC, _("I/O error: can't truncate output file")) +__err__(ERROR_VERSION_UNSET, _("Sequence error: must set ELF version first")) +__err__(ERROR_NOEHDR, _("Sequence error: must create ELF header first")) +__err__(ERROR_OUTSIDE, _("Format error: reference outside file")) +__err__(ERROR_TRUNC_ARHDR, _("Format error: archive header truncated")) +__err__(ERROR_ARFMAG, _("Format error: archive fmag")) +__err__(ERROR_ARHDR, _("Format error: archive header")) +__err__(ERROR_TRUNC_MEMBER, _("Format error: archive member truncated")) +__err__(ERROR_SIZE_ARSYMTAB, _("Format error: archive symbol table size")) +__err__(ERROR_ARSTRTAB, _("Format error: archive string table")) +__err__(ERROR_ARSPECIAL, _("Format error: archive special name unknown")) +__err__(ERROR_TRUNC_EHDR, _("Format error: ELF header truncated")) +__err__(ERROR_TRUNC_PHDR, _("Format error: program header table truncated")) +__err__(ERROR_TRUNC_SHDR, _("Format error: section header table truncated")) +__err__(ERROR_TRUNC_SCN, _("Format error: data region truncated")) +__err__(ERROR_SCN2SMALL, _("Format error: section size too small for data")) +__err__(ERROR_ALIGN_PHDR, _("Format error: program header table alignment")) +__err__(ERROR_ALIGN_SHDR, _("Format error: section header table alignment")) +__err__(ERROR_MEM_ELF, _("Memory error: elf descriptor")) +__err__(ERROR_MEM_ARSYMTAB, _("Memory error: archive symbol table")) +__err__(ERROR_MEM_ARHDR, _("Memory error: archive member header")) +__err__(ERROR_MEM_EHDR, _("Memory error: ELF header")) +__err__(ERROR_MEM_PHDR, _("Memory error: program header table")) +__err__(ERROR_MEM_SHDR, _("Memory error: section header table")) +__err__(ERROR_MEM_SCN, _("Memory error: section descriptor")) +__err__(ERROR_MEM_SCNDATA, _("Memory error: section data")) +__err__(ERROR_MEM_OUTBUF, _("Memory error: output file space")) diff --git a/contrib/media/updf/include/libelf/ext_types.h b/contrib/media/updf/include/libelf/ext_types.h new file mode 100644 index 0000000000..1e26dd0e30 --- /dev/null +++ b/contrib/media/updf/include/libelf/ext_types.h @@ -0,0 +1,236 @@ +/* +ext_types.h - external representation of ELF data types. +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: ext_types.h,v 1.3 1998/06/01 19:47:15 michael Exp $ */ + +#ifndef _EXT_TYPES_H +#define _EXT_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Scalar data types + */ +typedef unsigned char __ext_Elf32_Addr [ELF32_FSZ_ADDR]; +typedef unsigned char __ext_Elf32_Half [ELF32_FSZ_HALF]; +typedef unsigned char __ext_Elf32_Off [ELF32_FSZ_OFF]; +typedef unsigned char __ext_Elf32_Sword [ELF32_FSZ_SWORD]; +typedef unsigned char __ext_Elf32_Word [ELF32_FSZ_WORD]; + +#if __LIBELF64 +typedef unsigned char __ext_Elf64_Addr [ELF64_FSZ_ADDR]; +typedef unsigned char __ext_Elf64_Half [ELF64_FSZ_HALF]; +typedef unsigned char __ext_Elf64_Off [ELF64_FSZ_OFF]; +typedef unsigned char __ext_Elf64_Sword [ELF64_FSZ_SWORD]; +typedef unsigned char __ext_Elf64_Sxword[ELF64_FSZ_SXWORD]; +typedef unsigned char __ext_Elf64_Word [ELF64_FSZ_WORD]; +typedef unsigned char __ext_Elf64_Xword [ELF64_FSZ_XWORD]; +#endif /* __LIBELF64 */ + +/* + * ELF header + */ +typedef struct { + unsigned char e_ident[EI_NIDENT]; + __ext_Elf32_Half e_type; + __ext_Elf32_Half e_machine; + __ext_Elf32_Word e_version; + __ext_Elf32_Addr e_entry; + __ext_Elf32_Off e_phoff; + __ext_Elf32_Off e_shoff; + __ext_Elf32_Word e_flags; + __ext_Elf32_Half e_ehsize; + __ext_Elf32_Half e_phentsize; + __ext_Elf32_Half e_phnum; + __ext_Elf32_Half e_shentsize; + __ext_Elf32_Half e_shnum; + __ext_Elf32_Half e_shstrndx; +} __ext_Elf32_Ehdr; + +#if __LIBELF64 +typedef struct { + unsigned char e_ident[EI_NIDENT]; + __ext_Elf64_Half e_type; + __ext_Elf64_Half e_machine; + __ext_Elf64_Word e_version; + __ext_Elf64_Addr e_entry; + __ext_Elf64_Off e_phoff; + __ext_Elf64_Off e_shoff; + __ext_Elf64_Word e_flags; + __ext_Elf64_Half e_ehsize; + __ext_Elf64_Half e_phentsize; + __ext_Elf64_Half e_phnum; + __ext_Elf64_Half e_shentsize; + __ext_Elf64_Half e_shnum; + __ext_Elf64_Half e_shstrndx; +} __ext_Elf64_Ehdr; +#endif /* __LIBELF64 */ + +/* + * Section header + */ +typedef struct { + __ext_Elf32_Word sh_name; + __ext_Elf32_Word sh_type; + __ext_Elf32_Word sh_flags; + __ext_Elf32_Addr sh_addr; + __ext_Elf32_Off sh_offset; + __ext_Elf32_Word sh_size; + __ext_Elf32_Word sh_link; + __ext_Elf32_Word sh_info; + __ext_Elf32_Word sh_addralign; + __ext_Elf32_Word sh_entsize; +} __ext_Elf32_Shdr; + +#if __LIBELF64 +typedef struct { + __ext_Elf64_Word sh_name; + __ext_Elf64_Word sh_type; + __ext_Elf64_Xword sh_flags; + __ext_Elf64_Addr sh_addr; + __ext_Elf64_Off sh_offset; + __ext_Elf64_Xword sh_size; + __ext_Elf64_Word sh_link; + __ext_Elf64_Word sh_info; + __ext_Elf64_Xword sh_addralign; + __ext_Elf64_Xword sh_entsize; +} __ext_Elf64_Shdr; +#endif /* __LIBELF64 */ + +/* + * Symbol table + */ +typedef struct { + __ext_Elf32_Word st_name; + __ext_Elf32_Addr st_value; + __ext_Elf32_Word st_size; + unsigned char st_info; + unsigned char st_other; + __ext_Elf32_Half st_shndx; +} __ext_Elf32_Sym; + +#if __LIBELF64 +typedef struct { + __ext_Elf64_Word st_name; + unsigned char st_info; + unsigned char st_other; + __ext_Elf64_Half st_shndx; + __ext_Elf64_Addr st_value; + __ext_Elf64_Xword st_size; +} __ext_Elf64_Sym; +#endif /* __LIBELF64 */ + +/* + * Relocation + */ +typedef struct { + __ext_Elf32_Addr r_offset; + __ext_Elf32_Word r_info; +} __ext_Elf32_Rel; + +typedef struct { + __ext_Elf32_Addr r_offset; + __ext_Elf32_Word r_info; + __ext_Elf32_Sword r_addend; +} __ext_Elf32_Rela; + +#if __LIBELF64 +typedef struct { + __ext_Elf64_Addr r_offset; +#if __LIBELF64_IRIX + __ext_Elf64_Word r_sym; + unsigned char r_ssym; + unsigned char r_type3; + unsigned char r_type2; + unsigned char r_type; +#else /* __LIBELF64_IRIX */ + __ext_Elf64_Xword r_info; +#endif /* __LIBELF64_IRIX */ +} __ext_Elf64_Rel; + +typedef struct { + __ext_Elf64_Addr r_offset; +#if __LIBELF64_IRIX + __ext_Elf64_Word r_sym; + unsigned char r_ssym; + unsigned char r_type3; + unsigned char r_type2; + unsigned char r_type; +#else /* __LIBELF64_IRIX */ + __ext_Elf64_Xword r_info; +#endif /* __LIBELF64_IRIX */ + __ext_Elf64_Sxword r_addend; +} __ext_Elf64_Rela; +#endif /* __LIBELF64 */ + +/* + * Program header + */ +typedef struct { + __ext_Elf32_Word p_type; + __ext_Elf32_Off p_offset; + __ext_Elf32_Addr p_vaddr; + __ext_Elf32_Addr p_paddr; + __ext_Elf32_Word p_filesz; + __ext_Elf32_Word p_memsz; + __ext_Elf32_Word p_flags; + __ext_Elf32_Word p_align; +} __ext_Elf32_Phdr; + +#if __LIBELF64 +typedef struct { + __ext_Elf64_Word p_type; + __ext_Elf64_Word p_flags; + __ext_Elf64_Off p_offset; + __ext_Elf64_Addr p_vaddr; + __ext_Elf64_Addr p_paddr; + __ext_Elf64_Xword p_filesz; + __ext_Elf64_Xword p_memsz; + __ext_Elf64_Xword p_align; +} __ext_Elf64_Phdr; +#endif /* __LIBELF64 */ + +/* + * Dynamic structure + */ +typedef struct { + __ext_Elf32_Sword d_tag; + union { + __ext_Elf32_Word d_val; + __ext_Elf32_Addr d_ptr; + } d_un; +} __ext_Elf32_Dyn; + +#if __LIBELF64 +typedef struct { + __ext_Elf64_Sxword d_tag; + union { + __ext_Elf64_Xword d_val; + __ext_Elf64_Addr d_ptr; + } d_un; +} __ext_Elf64_Dyn; +#endif /* __LIBELF64 */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _EXT_TYPES_H */ diff --git a/contrib/media/updf/include/libelf/libelf.h b/contrib/media/updf/include/libelf/libelf.h new file mode 100644 index 0000000000..6470875559 --- /dev/null +++ b/contrib/media/updf/include/libelf/libelf.h @@ -0,0 +1,232 @@ +/* +libelf.h - public header file for libelf. +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: libelf.h,v 1.5 1998/06/01 19:47:18 michael Exp $ */ + +#ifndef _LIBELF_H +#define _LIBELF_H + +#include <sys/types.h> + +#if __LIBELF_INTERNAL__ +#include <sys_elf.h> +#else /* __LIBELF_INTERNAL__ */ +#include <libelf/sys_elf.h> +#endif /* __LIBELF_INTERNAL__ */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#ifndef __P +# if __STDC__ || defined(__cplusplus) +# define __P(args) args +# else /* __STDC__ || defined(__cplusplus) */ +# define __P(args) () +# endif /* __STDC__ || defined(__cplusplus) */ +#endif /* __P */ + +/* + * Commands + */ +typedef enum { + ELF_C_NULL = 0, /* must be first, 0 */ + ELF_C_READ, + ELF_C_WRITE, + ELF_C_CLR, + ELF_C_SET, + ELF_C_FDDONE, + ELF_C_FDREAD, + ELF_C_RDWR, + ELF_C_NUM /* must be last */ +} Elf_Cmd; + +/* + * Flags + */ +#define ELF_F_DIRTY 0x1 +#define ELF_F_LAYOUT 0x4 + +/* + * File types + */ +typedef enum { + ELF_K_NONE = 0, /* must be first, 0 */ + ELF_K_AR, + ELF_K_COFF, + ELF_K_ELF, + ELF_K_NUM /* must be last */ +} Elf_Kind; + +/* + * Data types + */ +typedef enum { + ELF_T_BYTE = 0, /* must be first, 0 */ + ELF_T_ADDR, + ELF_T_DYN, + ELF_T_EHDR, + ELF_T_HALF, + ELF_T_OFF, + ELF_T_PHDR, + ELF_T_RELA, + ELF_T_REL, + ELF_T_SHDR, + ELF_T_SWORD, + ELF_T_SYM, + ELF_T_WORD, + /* + * New stuff for 64-bit. + * + * Most implementations add ELF_T_SXWORD after ELF_T_SWORD + * which breaks binary compatibility with earlier versions. + * If this causes problems for you, contact me. + */ + ELF_T_SXWORD, + ELF_T_XWORD, + ELF_T_NUM /* must be last */ +} Elf_Type; + +/* + * Elf descriptor + */ +typedef struct Elf Elf; + +/* + * Section descriptor + */ +typedef struct Elf_Scn Elf_Scn; + +/* + * Archive member header + */ +typedef struct { + char* ar_name; + time_t ar_date; + long ar_uid; + long ar_gid; + unsigned long ar_mode; + off_t ar_size; + char* ar_rawname; +} Elf_Arhdr; + +/* + * Archive symbol table + */ +typedef struct { + char* as_name; + size_t as_off; + unsigned long as_hash; +} Elf_Arsym; + +/* + * Data descriptor + */ +typedef struct { + void* d_buf; + Elf_Type d_type; + size_t d_size; + off_t d_off; + size_t d_align; + unsigned d_version; +} Elf_Data; + +/* + * Function declarations + */ +extern Elf *elf_begin __P((int __fd, Elf_Cmd __cmd, Elf *__ref)); +extern Elf *elf_memory __P((char *__image, size_t __size)); +extern int elf_cntl __P((Elf *__elf, Elf_Cmd __cmd)); +extern int elf_end __P((Elf *__elf)); +extern const char *elf_errmsg __P((int __err)); +extern int elf_errno __P((void)); +extern void elf_fill __P((int __fill)); +extern unsigned elf_flagdata __P((Elf_Data *__data, Elf_Cmd __cmd, + unsigned __flags)); +extern unsigned elf_flagehdr __P((Elf *__elf, Elf_Cmd __cmd, + unsigned __flags)); +extern unsigned elf_flagelf __P((Elf *__elf, Elf_Cmd __cmd, + unsigned __flags)); +extern unsigned elf_flagphdr __P((Elf *__elf, Elf_Cmd __cmd, + unsigned __flags)); +extern unsigned elf_flagscn __P((Elf_Scn *__scn, Elf_Cmd __cmd, + unsigned __flags)); +extern unsigned elf_flagshdr __P((Elf_Scn *__scn, Elf_Cmd __cmd, + unsigned __flags)); +extern size_t elf32_fsize __P((Elf_Type __type, size_t __count, + unsigned __ver)); +extern Elf_Arhdr *elf_getarhdr __P((Elf *__elf)); +extern Elf_Arsym *elf_getarsym __P((Elf *__elf, size_t *__ptr)); +extern off_t elf_getbase __P((Elf *__elf)); +extern Elf_Data *elf_getdata __P((Elf_Scn *__scn, Elf_Data *__data)); +extern Elf32_Ehdr *elf32_getehdr __P((Elf *__elf)); +extern char *elf_getident __P((Elf *__elf, size_t *__ptr)); +extern Elf32_Phdr *elf32_getphdr __P((Elf *__elf)); +extern Elf_Scn *elf_getscn __P((Elf *__elf, size_t __index)); +extern Elf32_Shdr *elf32_getshdr __P((Elf_Scn *__scn)); +extern unsigned long elf_hash __P((const char *__name)); +extern Elf_Kind elf_kind __P((Elf *__elf)); +extern size_t elf_ndxscn __P((Elf_Scn *__scn)); +extern Elf_Data *elf_newdata __P((Elf_Scn *__scn)); +extern Elf32_Ehdr *elf32_newehdr __P((Elf *__elf)); +extern Elf32_Phdr *elf32_newphdr __P((Elf *__elf, size_t __count)); +extern Elf_Scn *elf_newscn __P((Elf *__elf)); +extern Elf_Cmd elf_next __P((Elf *__elf)); +extern Elf_Scn *elf_nextscn __P((Elf *__elf, Elf_Scn *__scn)); +extern size_t elf_rand __P((Elf *__elf, size_t __offset)); +extern Elf_Data *elf_rawdata __P((Elf_Scn *__scn, Elf_Data *__data)); +extern char *elf_rawfile __P((Elf *__elf, size_t *__ptr)); +extern char *elf_strptr __P((Elf *__elf, size_t __section, size_t __offset)); +extern off_t elf_update __P((Elf *__elf, Elf_Cmd __cmd)); +extern unsigned elf_version __P((unsigned __ver)); +extern Elf_Data *elf32_xlatetof __P((Elf_Data *__dst, const Elf_Data *__src, + unsigned __encode)); +extern Elf_Data *elf32_xlatetom __P((Elf_Data *__dst, const Elf_Data *__src, + unsigned __encode)); + +#if __LIBELF64 +/* + * 64-bit ELF functions + * Not available on all platforms + */ +extern Elf64_Ehdr *elf64_getehdr __P((Elf *__elf)); +extern Elf64_Ehdr *elf64_newehdr __P((Elf *__elf)); +extern Elf64_Phdr *elf64_getphdr __P((Elf *__elf)); +extern Elf64_Phdr *elf64_newphdr __P((Elf *__elf, size_t __count)); +extern Elf64_Shdr *elf64_getshdr __P((Elf_Scn *__scn)); +extern size_t elf64_fsize __P((Elf_Type __type, size_t __count, + unsigned __ver)); +extern Elf_Data *elf64_xlatetof __P((Elf_Data *__dst, const Elf_Data *__src, + unsigned __encode)); +extern Elf_Data *elf64_xlatetom __P((Elf_Data *__dst, const Elf_Data *__src, + unsigned __encode)); +#endif /* __LIBELF64 */ + +/* + * More function declarations + * These functions are NOT available + * in the SYSV version of libelf! + */ +extern size_t elf_delscn __P((Elf *__elf, Elf_Scn *__scn)); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _LIBELF_H */ diff --git a/contrib/media/updf/include/libelf/nlist.h b/contrib/media/updf/include/libelf/nlist.h new file mode 100644 index 0000000000..59497d3e58 --- /dev/null +++ b/contrib/media/updf/include/libelf/nlist.h @@ -0,0 +1,48 @@ +/* +nlist.h - public header file for nlist(3). +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: nlist.h,v 1.3 1998/06/01 19:47:24 michael Exp $ */ + +#ifndef _NLIST_H +#define _NLIST_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct nlist { + char* n_name; + long n_value; + short n_scnum; + unsigned short n_type; + char n_sclass; + char n_numaux; +}; + +#if __STDC__ || defined(__cplusplus) +extern int nlist(const char *__filename, struct nlist *__nl); +#else /* __STDC__ || defined(__cplusplus) */ +extern int nlist(); +#endif /* __STDC__ || defined(__cplusplus) */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _NLIST_H */ diff --git a/contrib/media/updf/include/libelf/private.h b/contrib/media/updf/include/libelf/private.h new file mode 100644 index 0000000000..a187ae9c16 --- /dev/null +++ b/contrib/media/updf/include/libelf/private.h @@ -0,0 +1,360 @@ +/* +private.h - private definitions for libelf. +Copyright (C) 1995 - 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: private.h,v 1.10 1998/11/27 21:25:19 michael Exp $ */ + +#ifndef _PRIVATE_H +#define _PRIVATE_H + +#define __LIBELF_INTERNAL__ 1 + +#if HAVE_CONFIG_H +# include <config.h> +#endif /* HAVE_CONFIG_H */ + +#include <sys/types.h> + +#if STDC_HEADERS +# include <stdlib.h> +# include <string.h> +#else /* STDC_HEADERS */ +extern char *malloc(), *realloc(); +extern void free(), bcopy(); +extern int strcmp(), strncmp(), memcmp(); +extern void *memcpy(), *memmove(), *memset(); +#endif /* STDC_HEADERS */ + +#if HAVE_UNISTD_H +# include <unistd.h> +#else /* HAVE_UNISTD_H */ +extern int read(), write(); +extern off_t lseek(); +#endif /* HAVE_UNISTD_H */ + +#if !HAVE_MEMCMP +# define memcmp strncmp +#endif /* !HAVE_MEMCMP */ +#if !HAVE_MEMCPY +# define memcpy(d,s,n) bcopy(s,d,n) +#endif /* !HAVE_MEMCPY */ +#if !HAVE_MEMMOVE +# define memmove(d,s,n) bcopy(s,d,n) +#endif /* !HAVE_MEMMOVE */ + +#if !HAVE_MEMSET +# define memset _elf_memset +extern void *_elf_memset(); +#endif /* !HAVE_MEMSET */ + +#if HAVE_STRUCT_NLIST_DECLARATION +# define nlist __override_nlist_declaration +#endif /* HAVE_STRUCT_NLIST_DECLARATION */ + +#if NEED_LINK_H +# include <link.h> +#endif /* NEED_LINK_H */ + +#include <libelf.h> + +#if HAVE_STRUCT_NLIST_DECLARATION +# undef nlist +#endif /* HAVE_STRUCT_NLIST_DECLARATION */ + +typedef struct Scn_Data Scn_Data; + +/* + * ELF descriptor + */ +struct Elf { + /* common */ + size_t e_size; /* file/member size */ + size_t e_dsize; /* size of memory image */ + Elf_Kind e_kind; /* kind of file */ + char* e_data; /* file/member data */ + char* e_rawdata; /* file/member raw data */ + size_t e_idlen; /* identifier size */ + int e_fd; /* file descriptor */ + unsigned e_count; /* activation count */ + /* archive members (still common) */ + Elf* e_parent; /* NULL if not an archive member */ + size_t e_next; /* 0 if not an archive member */ + size_t e_base; /* 0 if not an archive member */ + Elf* e_link; /* next archive member or NULL */ + Elf_Arhdr* e_arhdr; /* archive member header or NULL */ + /* archives */ + size_t e_off; /* current member offset (for elf_begin) */ + Elf* e_members; /* linked list of active archive members */ + char* e_symtab; /* archive symbol table */ + size_t e_symlen; /* length of archive symbol table */ + char* e_strtab; /* archive string table */ + size_t e_strlen; /* length of archive string table */ + /* ELF files */ + unsigned e_class; /* ELF class */ + unsigned e_encoding; /* ELF data encoding */ + unsigned e_version; /* ELF version */ + char* e_ehdr; /* ELF header */ + char* e_phdr; /* ELF program header table */ + size_t e_phnum; /* size of program header table */ + Elf_Scn* e_scn_1; /* first section */ + Elf_Scn* e_scn_n; /* last section */ + unsigned e_elf_flags; /* elf flags (ELF_F_*) */ + unsigned e_ehdr_flags; /* ehdr flags (ELF_F_*) */ + unsigned e_phdr_flags; /* phdr flags (ELF_F_*) */ + /* misc flags */ + unsigned e_readable : 1; /* file is readable */ + unsigned e_writable : 1; /* file is writable */ + unsigned e_disabled : 1; /* e_fd has been disabled */ + unsigned e_cooked : 1; /* e_data was modified */ + unsigned e_free_syms : 1; /* e_symtab is malloc'ed */ + unsigned e_free_ehdr : 1; /* e_ehdr is malloc'ed */ + unsigned e_free_phdr : 1; /* e_phdr is malloc'ed */ + unsigned e_unmap_data : 1; /* e_data is mmap'ed */ + unsigned e_memory : 1; /* created by elf_memory() */ + /* magic number for debugging */ + long e_magic; +}; + +#define ELF_MAGIC 0x012b649e + +#define INIT_ELF {\ + /* e_size */ 0,\ + /* e_dsize */ 0,\ + /* e_kind */ ELF_K_NONE,\ + /* e_data */ NULL,\ + /* e_rawdata */ NULL,\ + /* e_idlen */ 0,\ + /* e_fd */ -1,\ + /* e_count */ 1,\ + /* e_parent */ NULL,\ + /* e_next */ 0,\ + /* e_base */ 0,\ + /* e_link */ NULL,\ + /* e_arhdr */ NULL,\ + /* e_off */ 0,\ + /* e_members */ NULL,\ + /* e_symtab */ NULL,\ + /* e_symlen */ 0,\ + /* e_strtab */ NULL,\ + /* e_strlen */ 0,\ + /* e_class */ ELFCLASSNONE,\ + /* e_encoding */ ELFDATANONE,\ + /* e_version */ EV_NONE,\ + /* e_ehdr */ NULL,\ + /* e_phdr */ NULL,\ + /* e_phnum */ 0,\ + /* e_scn_1 */ NULL,\ + /* e_scn_n */ NULL,\ + /* e_elf_flags */ 0,\ + /* e_ehdr_flags */ 0,\ + /* e_phdr_flags */ 0,\ + /* e_readable */ 0,\ + /* e_writable */ 0,\ + /* e_disabled */ 0,\ + /* e_cooked */ 0,\ + /* e_free_syms */ 0,\ + /* e_free_ehdr */ 0,\ + /* e_free_phdr */ 0,\ + /* e_unmap_data */ 0,\ + /* e_memory */ 0,\ + /* e_magic */ ELF_MAGIC\ +} + +/* + * Section descriptor + */ +struct Elf_Scn { + Elf_Scn* s_link; /* pointer to next Elf_Scn */ + Elf* s_elf; /* pointer to elf descriptor */ + size_t s_index; /* number of this section */ + unsigned s_scn_flags; /* section flags (ELF_F_*) */ + unsigned s_shdr_flags; /* shdr flags (ELF_F_*) */ + Scn_Data* s_data_1; /* first data buffer */ + Scn_Data* s_data_n; /* last data buffer */ + Scn_Data* s_rawdata; /* raw data buffer */ + /* data copied from shdr */ + unsigned s_type; /* section type */ + size_t s_offset; /* section offset */ + size_t s_size; /* section size */ + /* misc flags */ + unsigned s_freeme : 1; /* this Elf_Scn was malloc'ed */ + /* section header */ + union { +#if __LIBELF64 + Elf64_Shdr u_shdr64; +#endif /* __LIBELF64 */ + Elf32_Shdr u_shdr32; + } s_uhdr; + /* magic number for debugging */ + long s_magic; +}; +#define s_shdr32 s_uhdr.u_shdr32 +#define s_shdr64 s_uhdr.u_shdr64 + +#define SCN_MAGIC 0x012c747d + +#define INIT_SCN {\ + /* s_link */ NULL,\ + /* s_elf */ NULL,\ + /* s_index */ 0,\ + /* s_scn_flags */ 0,\ + /* s_shdr_flags */ 0,\ + /* s_data_1 */ NULL,\ + /* s_data_n */ NULL,\ + /* s_rawdata */ NULL,\ + /* s_type */ SHT_NULL,\ + /* s_offset */ 0,\ + /* s_size */ 0,\ + /* s_freeme */ 0,\ + /* s_uhdr */ {{0,}},\ + /* s_magic */ SCN_MAGIC\ +} + +/* + * Data descriptor + */ +struct Scn_Data { + Elf_Data sd_data; /* must be first! */ + Scn_Data* sd_link; /* pointer to next Scn_Data */ + char* sd_memdata; /* memory image of section */ + unsigned sd_data_flags; /* data flags (ELF_F_*) */ + /* misc flags */ + unsigned sd_freeme : 1; /* this Scn_Data was malloc'ed */ + unsigned sd_free_data : 1; /* sd_memdata is malloc'ed */ + /* magic number for debugging */ + long sd_magic; +}; + +#define DATA_MAGIC 0x01072639 + +#define INIT_DATA {\ + {\ + /* d_buf */ NULL,\ + /* d_type */ ELF_T_BYTE,\ + /* d_size */ 0,\ + /* d_off */ 0,\ + /* d_align */ 0,\ + /* d_version */ EV_NONE\ + },\ + /* sd_link */ NULL,\ + /* sd_memdata */ NULL,\ + /* sd_data_flags */ 0,\ + /* sd_freeme */ 0,\ + /* sd_free_data */ 0,\ + /* sd_magic */ DATA_MAGIC\ +} + +/* + * Private status variables + */ +extern unsigned _elf_version; +extern int _elf_errno; +extern int _elf_fill; + +/* + * Private functions + */ +extern void *_elf_read __P((Elf*, void*, size_t, size_t)); +extern void *_elf_mmap __P((Elf*)); +extern int _elf_cook __P((Elf*)); +extern char *_elf_getehdr __P((Elf*, unsigned)); +extern Elf_Data *_elf_xlatetom(const Elf*, Elf_Data*, const Elf_Data*); + +/* + * Private data + */ +extern const Elf_Scn _elf_scn_init; +extern const Scn_Data _elf_data_init; +extern const Elf_Type _elf_scn_types[SHT_NUM]; +extern const size_t _elf_fmsize[2][EV_CURRENT - EV_NONE][ELF_T_NUM][2]; + +/* + * Access macros for _elf_fmsize[] + */ +#define _fmsize(c,v,t,w) \ + (_elf_fmsize[(c)-ELFCLASS32][(v)-EV_NONE-1][(t)-ELF_T_BYTE][(w)]) +#define _fsize(c,v,t) _fmsize((c),(v),(t),1) +#define _msize(c,v,t) _fmsize((c),(v),(t),0) + +/* + * Various checks + */ +#define valid_class(c) ((c) >= ELFCLASS32 && (c) <= ELFCLASS64) +#define valid_encoding(e) ((e) >= ELFDATA2LSB && (e) <= ELFDATA2MSB) +#define valid_version(v) ((v) > EV_NONE && (v) <= EV_CURRENT) +#define valid_type(t) ((t) >= ELF_T_BYTE && (t) < ELF_T_NUM) +#define valid_scntype(s) ((s) >= SHT_NULL && (s) < SHT_NUM) + +/* + * Error codes + */ +enum { +#define __err__(a,b) a, +#include <errors.h> /* include constants from errors.h */ +#undef __err__ +ERROR_NUM +}; + +#define seterr(err) (_elf_errno = (err)) + +/* + * Sizes of data types (external representation) + * These definitions should be in <elf.h>, but... + */ +#ifndef ELF32_FSZ_ADDR +# define ELF32_FSZ_ADDR 4 +# define ELF32_FSZ_HALF 2 +# define ELF32_FSZ_OFF 4 +# define ELF32_FSZ_SWORD 4 +# define ELF32_FSZ_WORD 4 +#endif /* ELF32_FSZ_ADDR */ +#ifndef ELF64_FSZ_ADDR +# define ELF64_FSZ_ADDR 8 +# define ELF64_FSZ_HALF 2 +# define ELF64_FSZ_OFF 8 +# define ELF64_FSZ_SWORD 4 +# define ELF64_FSZ_SXWORD 8 +# define ELF64_FSZ_WORD 4 +# define ELF64_FSZ_XWORD 8 +#endif /* ELF64_FSZ_ADDR */ + +/* + * Alignment + */ +#define _ELF32_ALIGN_PHDR 4 +#define _ELF32_ALIGN_SHDR 4 +#define _ELF64_ALIGN_PHDR 8 +#define _ELF64_ALIGN_SHDR 8 + +/* + * Debugging + */ +#if ENABLE_DEBUG +# include <stdio.h> +# if __STDC__ +# define elf_assert(x) ((void)((x)||__elf_assert(__FILE__,__LINE__,#x))) +# else /* __STDC__ */ +# define elf_assert(x) ((void)((x)||__elf_assert(__FILE__,__LINE__,"x"))) +# endif /* __STDC__ */ +# define __elf_assert(f,l,x) (fprintf(stderr,\ + "%s:%u: libelf assertion failure: %s\n",(f),(l),(x)),abort(),0) +#else /* ENABLE_DEBUG */ +# define elf_assert(x) ((void)0) +#endif /* ENABLE_DEBUG */ + +#endif /* _PRIVATE_H */ diff --git a/contrib/media/updf/include/libelf/sys_elf.h b/contrib/media/updf/include/libelf/sys_elf.h new file mode 100644 index 0000000000..66b7037d9a --- /dev/null +++ b/contrib/media/updf/include/libelf/sys_elf.h @@ -0,0 +1,81 @@ +/* lib/sys_elf.h. Generated automatically by configure. */ +/* +sys_elf.h.in - configure template for private "switch" file. +Copyright (C) 1998 Michael Riepe <michael@stud.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* @(#) $Id: sys_elf.h.in,v 1.3 1998/06/04 15:26:48 michael Exp $ */ + +/* + * DO NOT USE THIS IN APPLICATIONS - #include <libelf.h> INSTEAD! + */ + +/* Define to `<elf.h>' or `<sys/elf.h>' if one of them is present */ +#define __LIBELF_HEADER_ELF_H <elf.h> + +/* Define if you want 64-bit support (and your system supports it) */ +#define __LIBELF64 1 + +/* Define if you want 64-bit support, and are running IRIX */ +/* #undef __LIBELF64_IRIX */ + +/* Define if you want 64-bit support, and are running Linux */ +/* #undef __LIBELF64_LINUX */ + +/* Define to a 64-bit signed integer type if one exists */ +#define __libelf_i64_t long long + +/* Define to a 64-bit unsigned integer type if one exists */ +#define __libelf_u64_t unsigned long long + +/* Define to a 32-bit signed integer type if one exists */ +#define __libelf_i32_t long + +/* Define to a 32-bit unsigned integer type if one exists */ +#define __libelf_u32_t unsigned long + +/* Define to a 16-bit signed integer type if one exists */ +#define __libelf_i16_t short + +/* Define to a 16-bit unsigned integer type if one exists */ +#define __libelf_u16_t unsigned short + +/* + * Ok, now get the correct instance of elf.h... + */ +#ifdef __LIBELF_HEADER_ELF_H +# include __LIBELF_HEADER_ELF_H +#else /* __LIBELF_HEADER_ELF_H */ +# if __LIBELF_INTERNAL__ +# include <elf_repl.h> +# else /* __LIBELF_INTERNAL__ */ +# include <libelf/elf_repl.h> +# endif /* __LIBELF_INTERNAL__ */ +#endif /* __LIBELF_HEADER_ELF_H */ + +/* + * Workaround for broken <elf.h> on Linux... + */ +#if __LIBELF64 && __LIBELF64_LINUX +typedef __libelf_u64_t Elf64_Addr; +typedef __libelf_u16_t Elf64_Half; +typedef __libelf_u64_t Elf64_Off; +typedef __libelf_i32_t Elf64_Sword; +typedef __libelf_i64_t Elf64_Sxword; +typedef __libelf_u32_t Elf64_Word; +typedef __libelf_u64_t Elf64_Xword; +#endif /* __LIBELF64 && __LIBELF64_LINUX */ diff --git a/contrib/media/updf/include/libiberty.h b/contrib/media/updf/include/libiberty.h new file mode 100644 index 0000000000..effe5f628c --- /dev/null +++ b/contrib/media/updf/include/libiberty.h @@ -0,0 +1,262 @@ +/* Function declarations for libiberty. + + Copyright 2001 Free Software Foundation, Inc. + + Note - certain prototypes declared in this header file are for + functions whoes implementation copyright does not belong to the + FSF. Those prototypes are present in this file for reference + purposes only and their presence in this file should not construed + as an indication of ownership by the FSF of the implementation of + those functions in any way or form whatsoever. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Written by Cygnus Support, 1994. + + The libiberty library provides a number of functions which are + missing on some operating systems. We do not declare those here, + to avoid conflicts with the system header files on operating + systems that do support those functions. In this file we only + declare those functions which are specific to libiberty. */ + +#ifndef LIBIBERTY_H +#define LIBIBERTY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ansidecl.h" + +#ifdef ANSI_PROTOTYPES +/* Get a definition for size_t. */ +#include <stddef.h> +/* Get a definition for va_list. */ +#include <stdarg.h> +#endif + +/* Build an argument vector from a string. Allocates memory using + malloc. Use freeargv to free the vector. */ + +extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC; + +/* Free a vector returned by buildargv. */ + +extern void freeargv PARAMS ((char **)); + +/* Duplicate an argument vector. Allocates memory using malloc. Use + freeargv to free the vector. */ + +extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC; + + +/* Return the last component of a path name. Note that we can't use a + prototype here because the parameter is declared inconsistently + across different systems, sometimes as "char *" and sometimes as + "const char *" */ + +/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is + undefined, we haven't run the autoconf check so provide the + declaration without arguments. If it is 0, we checked and failed + to find the declaration so provide a fully prototyped one. If it + is 1, we found it so don't provide any declaration at all. */ +#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME) +extern char *basename PARAMS ((const char *)); +#else +# if !defined (HAVE_DECL_BASENAME) +extern char *basename (); +# endif +#endif + +/* A well-defined basename () that is always compiled in. */ + +extern char *lbasename PARAMS ((const char *)); + +/* Concatenate an arbitrary number of strings, up to (char *) NULL. + Allocates memory using xmalloc. */ + +extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC; + +/* Check whether two file descriptors refer to the same file. */ + +extern int fdmatch PARAMS ((int fd1, int fd2)); + +/* Get the working directory. The result is cached, so don't call + chdir() between calls to getpwd(). */ + +extern char * getpwd PARAMS ((void)); + +/* Get the amount of time the process has run, in microseconds. */ + +extern long get_run_time PARAMS ((void)); + +/* Choose a temporary directory to use for scratch files. */ + +extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC; + +/* Return a temporary file name or NULL if unable to create one. */ + +extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC; + +/* Allocate memory filled with spaces. Allocates using malloc. */ + +extern const char *spaces PARAMS ((int count)); + +/* Return the maximum error number for which strerror will return a + string. */ + +extern int errno_max PARAMS ((void)); + +/* Return the name of an errno value (e.g., strerrno (EINVAL) returns + "EINVAL"). */ + +extern const char *strerrno PARAMS ((int)); + +/* Given the name of an errno value, return the value. */ + +extern int strtoerrno PARAMS ((const char *)); + +/* ANSI's strerror(), but more robust. */ + +extern char *xstrerror PARAMS ((int)); + +/* Return the maximum signal number for which strsignal will return a + string. */ + +extern int signo_max PARAMS ((void)); + +/* Return a signal message string for a signal number + (e.g., strsignal (SIGHUP) returns something like "Hangup"). */ +/* This is commented out as it can conflict with one in system headers. + We still document its existence though. */ + +/*extern const char *strsignal PARAMS ((int));*/ + +/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns + "SIGHUP"). */ + +extern const char *strsigno PARAMS ((int)); + +/* Given the name of a signal, return its number. */ + +extern int strtosigno PARAMS ((const char *)); + +/* Register a function to be run by xexit. Returns 0 on success. */ + +extern int xatexit PARAMS ((void (*fn) (void))); + +/* Exit, calling all the functions registered with xatexit. */ + +extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN; + +/* Set the program name used by xmalloc. */ + +extern void xmalloc_set_program_name PARAMS ((const char *)); + +/* Report an allocation failure. */ +extern void xmalloc_failed PARAMS ((size_t)) ATTRIBUTE_NORETURN; + +/* Allocate memory without fail. If malloc fails, this will print a + message to stderr (using the name set by xmalloc_set_program_name, + if any) and then call xexit. */ + +extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC; + +/* Reallocate memory without fail. This works like xmalloc. Note, + realloc type functions are not suitable for attribute malloc since + they may return the same address across multiple calls. */ + +extern PTR xrealloc PARAMS ((PTR, size_t)); + +/* Allocate memory without fail and set it to zero. This works like + xmalloc. */ + +extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC; + +/* Copy a string into a memory buffer without fail. */ + +extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC; + +/* Copy an existing memory buffer to a new memory buffer without fail. */ + +extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC; + +/* hex character manipulation routines */ + +#define _hex_array_size 256 +#define _hex_bad 99 +extern char _hex_value[_hex_array_size]; +extern void hex_init PARAMS ((void)); +#define hex_p(c) (hex_value (c) != _hex_bad) +/* If you change this, note well: Some code relies on side effects in + the argument being performed exactly once. */ +#define hex_value(c) (_hex_value[(unsigned char) (c)]) + +/* Definitions used by the pexecute routine. */ + +#define PEXECUTE_FIRST 1 +#define PEXECUTE_LAST 2 +#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST) +#define PEXECUTE_SEARCH 4 +#define PEXECUTE_VERBOSE 8 + +/* Execute a program. */ + +extern int pexecute PARAMS ((const char *, char * const *, const char *, + const char *, char **, char **, int)); + +/* Wait for pexecute to finish. */ + +extern int pwait PARAMS ((int, int *, int)); + +/* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + +extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2; + +/* Like vsprintf but provides a pointer to malloc'd storage, which + must be freed by the caller. */ + +extern int vasprintf PARAMS ((char **, const char *, va_list)) + ATTRIBUTE_PRINTF(2,0); + +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) + +/* Drastically simplified alloca configurator. If we're using GCC, + we use __builtin_alloca; otherwise we use the C alloca. The C + alloca is always available. You can override GCC by defining + USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is + also set/unset as it is often used to indicate whether code needs + to call alloca(0). */ +extern PTR C_alloca PARAMS((size_t)); +#undef alloca +#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA +# define alloca(x) __builtin_alloca(x) +# undef C_ALLOCA +#else +# define alloca(x) C_alloca(x) +# undef USE_C_ALLOCA +# define USE_C_ALLOCA 1 +# undef C_ALLOCA +# define C_ALLOCA 1 +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* ! defined (LIBIBERTY_H) */ diff --git a/contrib/media/updf/include/libintl.h b/contrib/media/updf/include/libintl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/media/updf/include/libm/math.h b/contrib/media/updf/include/libm/math.h new file mode 100644 index 0000000000..5156f452e0 --- /dev/null +++ b/contrib/media/updf/include/libm/math.h @@ -0,0 +1,315 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* Provided by Cygnus Support (jtc@cygnus.com) */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * from: @(#)fdlibm.h 5.1 93/09/24 + * $Id: math.h,v 1.3 1999/07/04 14:37:08 eliz Exp $ + */ + +#ifndef _MATH_H_ +#define _MATH_H_ + +/* + * ANSI/POSIX + */ +typedef int __int32_t; +typedef unsigned int __uint32_t; + +union __dmath +{ + __uint32_t i[2]; + double d; +}; + +extern const union __dmath __infinity; +#define HUGE_VAL (__infinity.d) + +/* + * XOPEN/SVID + */ +#if !defined(__STRICT_ANSI__) && !defined(_POSIX_SOURCE) +#define M_E 2.7182818284590452354 /* e */ +#define M_LOG2E 1.4426950408889634074 /* log 2e */ +#define M_LOG10E 0.43429448190325182765 /* log 10e */ +#define M_LN2 0.693147180559945309417 /* log e2 */ +#define M_LN10 2.30258509299404568402 /* log e10 */ +#define M_PI 3.14159265358979323846 /* pi */ +#define M_TWOPI 6.28318530717958647692 /* 2*pi */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_4 0.78539816339744830962 /* pi/4 */ +#define M_3PI_4 2.3561944901923448370 /* 3/4 * pi */ +#define M_SQRTPI 1.77245385090551602792981 /* sqrt(pi) */ +#define M_1_PI 0.31830988618379067154 /* 1/pi */ +#define M_2_PI 0.63661977236758134308 /* 2/pi */ +#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ +#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ +#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ +#define M_LN2LO 1.9082149292705877000E-10 /* lower bits of log e2 */ +#define M_LN2HI 6.9314718036912381649E-1 /* log e2 */ +#define M_SQRT3 1.73205080756887719000 /* sqrt(3) */ +#define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */ +#define M_LOG2_E 0.693147180559945309417 +#define M_INVLN2 1.4426950408889633870E0 /* 1 / log e2 */ + +extern int signgam; + +enum __fdlibm_version +{ + __fdlibm_ieee = -1, + __fdlibm_svid, + __fdlibm_xopen, + __fdlibm_posix +}; + +#define _LIB_VERSION_TYPE enum __fdlibm_version +#define _LIB_VERSION __fdlib_version + +/* if global variable _LIB_VERSION is not desirable, one may + * change the following to be a constant by: + * #define _LIB_VERSION_TYPE const enum version + * In that case, after one initializes the value _LIB_VERSION (see + * s_lib_version.c) during compile time, it cannot be modified + * in the middle of a program + */ +extern _LIB_VERSION_TYPE _LIB_VERSION; + +#define _IEEE_ __fdlibm_ieee +#define _SVID_ __fdlibm_svid +#define _XOPEN_ __fdlibm_xopen +#define _POSIX_ __fdlibm_posix + +/* The exception structure passed to the matherr routine. */ + +#ifndef __cplusplus +struct exception +{ + int type; + const char *name; + double arg1; + double arg2; + double retval; + int err; +}; +#endif + +/* + * set X_TLOSS = pi*2**52, which is possibly defined in <values.h> + * (one may replace the following line by "#include <values.h>") + */ + +#define X_TLOSS 1.41484755040568800000e+16 + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + +#endif /* !__STRICT_ANSI__ && !_POSIX_SOURCE */ + + +#include <sys/cdefs.h> +__BEGIN_DECLS + +/* + * ANSI/POSIX + */ +extern double acos __P((double)); +extern double asin __P((double)); +extern double atan __P((double)); +extern double atan2 __P((double, double)); +extern double cos __P((double)); +extern double sin __P((double)); +extern double tan __P((double)); + +extern double cosh __P((double)); +extern double sinh __P((double)); +extern double tanh __P((double)); + +extern double exp __P((double)); +extern double frexp __P((double, int *)); +extern double ldexp __P((double, int)); +extern double log __P((double)); +extern double log10 __P((double)); +extern double modf __P((double, double *)); + +extern double pow __P((double, double)); +extern double sqrt __P((double)); + +extern double ceil __P((double)); +extern double fabs __P((double)); +extern double floor __P((double)); +extern double fmod __P((double, double)); + +#if !defined(__STRICT_ANSI__) && !defined(_POSIX_SOURCE) +extern double erf __P((double)); +extern double erfc __P((double)); +extern double gamma __P((double)); +extern double hypot __P((double, double)); +extern double infinity __P((void)); +extern int isinf __P((double)); +extern int isnan __P((double)); +extern int finite __P((double)); +extern double j0 __P((double)); +extern double j1 __P((double)); +extern double jn __P((int, double)); +extern double lgamma __P((double)); +extern double nan __P((void)); +extern double y0 __P((double)); +extern double y1 __P((double)); +extern double yn __P((int, double)); +extern double log2 __P((double)); + +#if !defined(_XOPEN_SOURCE) +extern double acosh __P((double)); +extern double asinh __P((double)); +extern double atanh __P((double)); +extern double cbrt __P((double)); +extern double exp10 __P((double)); +extern double exp2 __P((double)); +extern double log1p __P((double)); +extern double logb __P((double)); +extern long double modfl __P((long double, long double *)); +extern double nextafter __P((double, double)); +extern double pow10 __P((double)); +extern double pow2 __P((double)); +extern double powi __P((double, int)); +extern void sincos __P((double *, double *, double)); +extern double remainder __P((double, double)); +extern double scalb __P((double, double)); + +#ifndef __cplusplus +extern int matherr __P((struct exception *)); +#endif + +/* + * IEEE Test Vector + */ +extern double significand __P((double)); + +/* + * Functions callable from C, intended to support IEEE arithmetic. + */ +extern double copysign __P((double, double)); +extern int ilogb __P((double)); +extern double rint __P((double)); +extern double scalbn __P((double, int)); + +/* + * BSD math library entry points + */ +extern double drem __P((double, double)); +extern double expm1 __P((double)); +extern double log1p __P((double)); + +/* + * Reentrant version of gamma & lgamma; passes signgam back by reference + * as the second argument; user must allocate space for signgam. + */ +extern double gamma_r __P((double, int *)); +extern double lgamma_r __P((double, int *)); + + +/* float versions of ANSI/POSIX functions */ +extern float acosf __P((float)); +extern float asinf __P((float)); +extern float atanf __P((float)); +extern float atan2f __P((float, float)); +extern float cosf __P((float)); +extern float sinf __P((float)); +extern float tanf __P((float)); + +extern float coshf __P((float)); +extern float sinhf __P((float)); +extern float tanhf __P((float)); + +extern float expf __P((float)); +extern float frexpf __P((float, int *)); +extern float ldexpf __P((float, int)); +extern float logf __P((float)); +extern float log10f __P((float)); +extern float modff __P((float, float *)); + +extern float powf __P((float, float)); +extern float sqrtf __P((float)); + +extern float ceilf __P((float)); +extern float fabsf __P((float)); +extern float floorf __P((float)); +extern float fmodf __P((float, float)); + +extern float erff __P((float)); +extern float erfcf __P((float)); +extern float gammaf __P((float)); +extern float hypotf __P((float, float)); +extern float infinityf __P((void)); +extern int isinff __P((float)); +extern int isnanf __P((float)); +extern int finitef __P((float)); +extern float j0f __P((float)); +extern float j1f __P((float)); +extern float jnf __P((int, float)); +extern float lgammaf __P((float)); +extern float nanf __P((void)); +extern float y0f __P((float)); +extern float y1f __P((float)); +extern float ynf __P((int, float)); +#define log2f(x) (logf (x) / (float) M_LOG2_E) + +extern float acoshf __P((float)); +extern float asinhf __P((float)); +extern float atanhf __P((float)); +extern float cbrtf __P((float)); +extern float logbf __P((float)); +extern float nextafterf __P((float, float)); +extern float remainderf __P((float, float)); +extern float scalbf __P((float, float)); + +/* + * float version of IEEE Test Vector + */ +extern float significandf __P((float)); + +/* + * Float versions of functions callable from C, intended to support + * IEEE arithmetic. + */ +extern float copysignf __P((float, float)); +extern int ilogbf __P((float)); +extern float rintf __P((float)); +extern float scalbnf __P((float, int)); + +/* + * float versions of BSD math library entry points + */ +extern float dremf __P((float, float)); +extern float expm1f __P((float)); +extern float log1pf __P((float)); + +/* + * Float versions of reentrant version of gamma & lgamma; passes + * signgam back by reference as the second argument; user must + * allocate space for signgam. + */ +extern float gammaf_r __P((float, int *)); +extern float lgammaf_r __P((float, int *)); + +#endif /* !_XOPEN_SOURCE */ +#endif /* !__STRICT_ANSI__ && !_POSIX_SOURCE */ + +__END_DECLS + +#endif /* _MATH_H_ */ diff --git a/contrib/media/updf/include/libmgfx.h b/contrib/media/updf/include/libmgfx.h new file mode 100644 index 0000000000..3fd4b8b5a0 --- /dev/null +++ b/contrib/media/updf/include/libmgfx.h @@ -0,0 +1,48 @@ +#ifndef __LIBMGFX_H +#define __LIBMGFX_H + +#include<menuet/os.h> +#include<stdlib.h> +#include<stdio.h> +/* #include<string.h> */ + +typedef unsigned char byte; + +typedef struct { + int width,height; + int bpp; + byte * the_image; + byte * pal; + struct mgfx_image_format * fmt; +} mgfx_image_t; + +struct mgfx_image_format { + char * format_name; + char * fmt_ext; + int (* load_fn)(FILE * f,mgfx_image_t *); + struct mgfx_image_format * next; +}; + +void register_image_format(struct mgfx_image_format * fmt); +struct mgfx_image_format * get_image_format(char * fname); + +#define _PIC_OK 0 +#define _PICERR_NOFILE -1 +#define _PICERR_NOMEM -2 +#define _PICERR_BADMAGIC -3 +#define _PICERR_NOCOLOURMAP -4 +#define _PICERR_NOIMAGE -5 +#define _PICERR_UNSUPPORTED -6 +#define _PICERR_CORRUPT -7 +#define _PICERR_SHOWN_ALREADY -8 +#define _PICERR_ISRLE -9 + +int load_image(char * fname,mgfx_image_t ** the_img); +void free_image(mgfx_image_t * img); +void paint_image(int x,int y,mgfx_image_t * img); + +void mgfx_register_jpeg(void); + +void init_mgfx_library(void); + +#endif diff --git a/contrib/media/updf/include/limits b/contrib/media/updf/include/limits new file mode 100644 index 0000000000..8a52c9cfb8 --- /dev/null +++ b/contrib/media/updf/include/limits @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_LIMITS +#include <bits/std_limits.h> +#endif diff --git a/contrib/media/updf/include/limits.h b/contrib/media/updf/include/limits.h new file mode 100644 index 0000000000..f6052d01bc --- /dev/null +++ b/contrib/media/updf/include/limits.h @@ -0,0 +1,88 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_limits_h_ +#define __dj_include_limits_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define CHAR_BIT 8 +#define CHAR_MAX 127 +#define CHAR_MIN (-128) +#define INT_MAX 2147483647 +#define INT_MIN (-2147483647-1) +#define LONG_MAX 2147483647L +#define LONG_MIN (-2147483647L-1L) +#define MB_LEN_MAX 5 +#define SCHAR_MAX 127 +#define SCHAR_MIN (-128) +#define SHRT_MAX 32767 +#define SHRT_MIN (-32768) +#define UCHAR_MAX 255 +#define UINT_MAX 4294967295U +#define ULONG_MAX 4294967295UL +#define USHRT_MAX 65535 +#define WCHAR_MIN 0 +#define WCHAR_MAX 127 +//#define WINT_MIN 0 +//#define WINT_MAX 32767 + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#define _POSIX_ARG_MAX 16384 /* but only for exec's to other djgpp programs */ +#define _POSIX_CHILD_MAX 7 /* limited by memory; 7 for 386MAX */ +#define _POSIX_LINK_MAX 1 /* POSIX says 8, but DOS says 1 */ +#define _POSIX_MAX_CANON 126 /* POSIX says 255, but DOS says 126 */ +#define _POSIX_MAX_INPUT 126 /* POSIX says 255, but DOS says 126 */ +#define _POSIX_NAME_MAX 12 /* 8.3 */ +#define _POSIX_NGROUPS_MAX 0 +#define _POSIX_OPEN_MAX 20 /* can be bigger in DOS, but defaults to 20 */ +#define _POSIX_PATH_MAX 256 /* 80 for canonical paths */ +#define _POSIX_PIPE_BUF 512 /* but there aren't any pipes */ +#define _POSIX_SSIZE_MAX 2147483647 +#define _POSIX_STREAM_MAX 20 /* can be bigger in DOS */ +#define _POSIX_TZNAME_MAX 5 + +#define NGROUPS_MAX 0 + +#define ARG_MAX 4096 +#define CHILD_MAX 6 +/* #define OPEN_MAX 20 - DOS can change this */ +/* #define STREAM_MAX 20 - DOS can change this */ +#define TZNAME_MAX 3 + +#define LINK_MAX 1 +#define MAX_CANON 126 +#define MAX_INPUT 126 +#define NAME_MAX 12 /* 8.3 */ +#define PATH_MAX 512 /* for future expansion */ +#define PIPE_BUF 512 /* but there aren't any pipes */ + +#define SSIZE_MAX 2147483647 + +#ifndef _POSIX_SOURCE + +/* constants used in Solaris */ +#define LLONG_MIN (-9223372036854775807LL-1LL) +#define LLONG_MAX 9223372036854775807LL +#define ULLONG_MAX 18446744073709551615ULL +/* gnuc ones */ +#define LONG_LONG_MIN LLONG_MIN +#define LONG_LONG_MAX LLONG_MAX +#define ULONG_LONG_MAX ULLONG_MAX + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_limits_h_ */ diff --git a/contrib/media/updf/include/linux/byteorder/big_endian.h b/contrib/media/updf/include/linux/byteorder/big_endian.h new file mode 100644 index 0000000000..b84efd74c9 --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/big_endian.h @@ -0,0 +1,68 @@ +#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H +#define _LINUX_BYTEORDER_BIG_ENDIAN_H + +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#endif +#ifndef __BIG_ENDIAN_BITFIELD +#define __BIG_ENDIAN_BITFIELD +#endif + +#include <linux/byteorder/swab.h> + +#define __constant_htonl(x) ((__u32)(x)) +#define __constant_ntohl(x) ((__u32)(x)) +#define __constant_htons(x) ((__u16)(x)) +#define __constant_ntohs(x) ((__u16)(x)) +#define __constant_cpu_to_le64(x) ___constant_swab64((x)) +#define __constant_le64_to_cpu(x) ___constant_swab64((x)) +#define __constant_cpu_to_le32(x) ___constant_swab32((x)) +#define __constant_le32_to_cpu(x) ___constant_swab32((x)) +#define __constant_cpu_to_le16(x) ___constant_swab16((x)) +#define __constant_le16_to_cpu(x) ___constant_swab16((x)) +#define __constant_cpu_to_be64(x) ((__u64)(x)) +#define __constant_be64_to_cpu(x) ((__u64)(x)) +#define __constant_cpu_to_be32(x) ((__u32)(x)) +#define __constant_be32_to_cpu(x) ((__u32)(x)) +#define __constant_cpu_to_be16(x) ((__u16)(x)) +#define __constant_be16_to_cpu(x) ((__u16)(x)) +#define __cpu_to_le64(x) __swab64((x)) +#define __le64_to_cpu(x) __swab64((x)) +#define __cpu_to_le32(x) __swab32((x)) +#define __le32_to_cpu(x) __swab32((x)) +#define __cpu_to_le16(x) __swab16((x)) +#define __le16_to_cpu(x) __swab16((x)) +#define __cpu_to_be64(x) ((__u64)(x)) +#define __be64_to_cpu(x) ((__u64)(x)) +#define __cpu_to_be32(x) ((__u32)(x)) +#define __be32_to_cpu(x) ((__u32)(x)) +#define __cpu_to_be16(x) ((__u16)(x)) +#define __be16_to_cpu(x) ((__u16)(x)) +#define __cpu_to_le64p(x) __swab64p((x)) +#define __le64_to_cpup(x) __swab64p((x)) +#define __cpu_to_le32p(x) __swab32p((x)) +#define __le32_to_cpup(x) __swab32p((x)) +#define __cpu_to_le16p(x) __swab16p((x)) +#define __le16_to_cpup(x) __swab16p((x)) +#define __cpu_to_be64p(x) (*(__u64*)(x)) +#define __be64_to_cpup(x) (*(__u64*)(x)) +#define __cpu_to_be32p(x) (*(__u32*)(x)) +#define __be32_to_cpup(x) (*(__u32*)(x)) +#define __cpu_to_be16p(x) (*(__u16*)(x)) +#define __be16_to_cpup(x) (*(__u16*)(x)) +#define __cpu_to_le64s(x) __swab64s((x)) +#define __le64_to_cpus(x) __swab64s((x)) +#define __cpu_to_le32s(x) __swab32s((x)) +#define __le32_to_cpus(x) __swab32s((x)) +#define __cpu_to_le16s(x) __swab16s((x)) +#define __le16_to_cpus(x) __swab16s((x)) +#define __cpu_to_be64s(x) do {} while (0) +#define __be64_to_cpus(x) do {} while (0) +#define __cpu_to_be32s(x) do {} while (0) +#define __be32_to_cpus(x) do {} while (0) +#define __cpu_to_be16s(x) do {} while (0) +#define __be16_to_cpus(x) do {} while (0) + +#include <linux/byteorder/generic.h> + +#endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ diff --git a/contrib/media/updf/include/linux/byteorder/generic.h b/contrib/media/updf/include/linux/byteorder/generic.h new file mode 100644 index 0000000000..d3d63a5a1e --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/generic.h @@ -0,0 +1,180 @@ +#ifndef _LINUX_BYTEORDER_GENERIC_H +#define _LINUX_BYTEORDER_GENERIC_H + +/* + * linux/byteorder_generic.h + * Generic Byte-reordering support + * + * Francois-Rene Rideau <fare@tunes.org> 19970707 + * gathered all the good ideas from all asm-foo/byteorder.h into one file, + * cleaned them up. + * I hope it is compliant with non-GCC compilers. + * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h, + * because I wasn't sure it would be ok to put it in types.h + * Upgraded it to 2.1.43 + * Francois-Rene Rideau <fare@tunes.org> 19971012 + * Upgraded it to 2.1.57 + * to please Linus T., replaced huge #ifdef's between little/big endian + * by nestedly #include'd files. + * Francois-Rene Rideau <fare@tunes.org> 19971205 + * Made it to 2.1.71; now a facelift: + * Put files under include/linux/byteorder/ + * Split swab from generic support. + * + * TODO: + * = Regular kernel maintainers could also replace all these manual + * byteswap macros that remain, disseminated among drivers, + * after some grep or the sources... + * = Linus might want to rename all these macros and files to fit his taste, + * to fit his personal naming scheme. + * = it seems that a few drivers would also appreciate + * nybble swapping support... + * = every architecture could add their byteswap macro in asm/byteorder.h + * see how some architectures already do (i386, alpha, ppc, etc) + * = cpu_to_beXX and beXX_to_cpu might some day need to be well + * distinguished throughout the kernel. This is not the case currently, + * since little endian, big endian, and pdp endian machines needn't it. + * But this might be the case for, say, a port of Linux to 20/21 bit + * architectures (and F21 Linux addict around?). + */ + +/* + * The following macros are to be defined by <asm/byteorder.h>: + * + * Conversion of long and short int between network and host format + * ntohl(__u32 x) + * ntohs(__u16 x) + * htonl(__u32 x) + * htons(__u16 x) + * It seems that some programs (which? where? or perhaps a standard? POSIX?) + * might like the above to be functions, not macros (why?). + * if that's true, then detect them, and take measures. + * Anyway, the measure is: define only ___ntohl as a macro instead, + * and in a separate file, have + * unsigned long inline ntohl(x){return ___ntohl(x);} + * + * The same for constant arguments + * __constant_ntohl(__u32 x) + * __constant_ntohs(__u16 x) + * __constant_htonl(__u32 x) + * __constant_htons(__u16 x) + * + * Conversion of XX-bit integers (16- 32- or 64-) + * between native CPU format and little/big endian format + * 64-bit stuff only defined for proper architectures + * cpu_to_[bl]eXX(__uXX x) + * [bl]eXX_to_cpu(__uXX x) + * + * The same, but takes a pointer to the value to convert + * cpu_to_[bl]eXXp(__uXX x) + * [bl]eXX_to_cpup(__uXX x) + * + * The same, but change in situ + * cpu_to_[bl]eXXs(__uXX x) + * [bl]eXX_to_cpus(__uXX x) + * + * See asm-foo/byteorder.h for examples of how to provide + * architecture-optimized versions + * + */ + + +#if defined(__KERNEL__) +/* + * inside the kernel, we can use nicknames; + * outside of it, we must avoid POSIX namespace pollution... + */ +#define cpu_to_le64 __cpu_to_le64 +#define le64_to_cpu __le64_to_cpu +#define cpu_to_le32 __cpu_to_le32 +#define le32_to_cpu __le32_to_cpu +#define cpu_to_le16 __cpu_to_le16 +#define le16_to_cpu __le16_to_cpu +#define cpu_to_be64 __cpu_to_be64 +#define be64_to_cpu __be64_to_cpu +#define cpu_to_be32 __cpu_to_be32 +#define be32_to_cpu __be32_to_cpu +#define cpu_to_be16 __cpu_to_be16 +#define be16_to_cpu __be16_to_cpu +#define cpu_to_le64p __cpu_to_le64p +#define le64_to_cpup __le64_to_cpup +#define cpu_to_le32p __cpu_to_le32p +#define le32_to_cpup __le32_to_cpup +#define cpu_to_le16p __cpu_to_le16p +#define le16_to_cpup __le16_to_cpup +#define cpu_to_be64p __cpu_to_be64p +#define be64_to_cpup __be64_to_cpup +#define cpu_to_be32p __cpu_to_be32p +#define be32_to_cpup __be32_to_cpup +#define cpu_to_be16p __cpu_to_be16p +#define be16_to_cpup __be16_to_cpup +#define cpu_to_le64s __cpu_to_le64s +#define le64_to_cpus __le64_to_cpus +#define cpu_to_le32s __cpu_to_le32s +#define le32_to_cpus __le32_to_cpus +#define cpu_to_le16s __cpu_to_le16s +#define le16_to_cpus __le16_to_cpus +#define cpu_to_be64s __cpu_to_be64s +#define be64_to_cpus __be64_to_cpus +#define cpu_to_be32s __cpu_to_be32s +#define be32_to_cpus __be32_to_cpus +#define cpu_to_be16s __cpu_to_be16s +#define be16_to_cpus __be16_to_cpus +#endif + + +/* + * Handle ntohl and suches. These have various compatibility + * issues - like we want to give the prototype even though we + * also have a macro for them in case some strange program + * wants to take the address of the thing or something.. + * + * Note that these used to return a "long" in libc5, even though + * long is often 64-bit these days.. Thus the casts. + * + * They have to be macros in order to do the constant folding + * correctly - if the argument passed into a inline function + * it is no longer constant according to gcc.. + */ + +#undef ntohl +#undef ntohs +#undef htonl +#undef htons + +/* + * Do the prototypes. Somebody might want to take the + * address or some such sick thing.. + */ +#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2) +extern __u32 ntohl(__u32); +extern __u32 htonl(__u32); +#else +extern unsigned long int ntohl(unsigned long int); +extern unsigned long int htonl(unsigned long int); +#endif +extern unsigned short int ntohs(unsigned short int); +extern unsigned short int htons(unsigned short int); + + +#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) + +#define ___htonl(x) __cpu_to_be32(x) +#define ___htons(x) __cpu_to_be16(x) +#define ___ntohl(x) __be32_to_cpu(x) +#define ___ntohs(x) __be16_to_cpu(x) + +#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2) +#define htonl(x) ___htonl(x) +#define ntohl(x) ___ntohl(x) +#else +#define htonl(x) ((unsigned long)___htonl(x)) +#define ntohl(x) ((unsigned long)___ntohl(x)) +#endif +#define htons(x) ___htons(x) +#define ntohs(x) ___ntohs(x) + +#endif /* OPTIMIZE */ + + +#endif /* _LINUX_BYTEORDER_GENERIC_H */ diff --git a/contrib/media/updf/include/linux/byteorder/little_endian.h b/contrib/media/updf/include/linux/byteorder/little_endian.h new file mode 100644 index 0000000000..1431663621 --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/little_endian.h @@ -0,0 +1,68 @@ +#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H +#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H + +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN 1234 +#endif +#ifndef __LITTLE_ENDIAN_BITFIELD +#define __LITTLE_ENDIAN_BITFIELD +#endif + +#include <linux/byteorder/swab.h> + +#define __constant_htonl(x) ___constant_swab32((x)) +#define __constant_ntohl(x) ___constant_swab32((x)) +#define __constant_htons(x) ___constant_swab16((x)) +#define __constant_ntohs(x) ___constant_swab16((x)) +#define __constant_cpu_to_le64(x) ((__u64)(x)) +#define __constant_le64_to_cpu(x) ((__u64)(x)) +#define __constant_cpu_to_le32(x) ((__u32)(x)) +#define __constant_le32_to_cpu(x) ((__u32)(x)) +#define __constant_cpu_to_le16(x) ((__u16)(x)) +#define __constant_le16_to_cpu(x) ((__u16)(x)) +#define __constant_cpu_to_be64(x) ___constant_swab64((x)) +#define __constant_be64_to_cpu(x) ___constant_swab64((x)) +#define __constant_cpu_to_be32(x) ___constant_swab32((x)) +#define __constant_be32_to_cpu(x) ___constant_swab32((x)) +#define __constant_cpu_to_be16(x) ___constant_swab16((x)) +#define __constant_be16_to_cpu(x) ___constant_swab16((x)) +#define __cpu_to_le64(x) ((__u64)(x)) +#define __le64_to_cpu(x) ((__u64)(x)) +#define __cpu_to_le32(x) ((__u32)(x)) +#define __le32_to_cpu(x) ((__u32)(x)) +#define __cpu_to_le16(x) ((__u16)(x)) +#define __le16_to_cpu(x) ((__u16)(x)) +#define __cpu_to_be64(x) __swab64((x)) +#define __be64_to_cpu(x) __swab64((x)) +#define __cpu_to_be32(x) __swab32((x)) +#define __be32_to_cpu(x) __swab32((x)) +#define __cpu_to_be16(x) __swab16((x)) +#define __be16_to_cpu(x) __swab16((x)) +#define __cpu_to_le64p(x) (*(__u64*)(x)) +#define __le64_to_cpup(x) (*(__u64*)(x)) +#define __cpu_to_le32p(x) (*(__u32*)(x)) +#define __le32_to_cpup(x) (*(__u32*)(x)) +#define __cpu_to_le16p(x) (*(__u16*)(x)) +#define __le16_to_cpup(x) (*(__u16*)(x)) +#define __cpu_to_be64p(x) __swab64p((x)) +#define __be64_to_cpup(x) __swab64p((x)) +#define __cpu_to_be32p(x) __swab32p((x)) +#define __be32_to_cpup(x) __swab32p((x)) +#define __cpu_to_be16p(x) __swab16p((x)) +#define __be16_to_cpup(x) __swab16p((x)) +#define __cpu_to_le64s(x) do {} while (0) +#define __le64_to_cpus(x) do {} while (0) +#define __cpu_to_le32s(x) do {} while (0) +#define __le32_to_cpus(x) do {} while (0) +#define __cpu_to_le16s(x) do {} while (0) +#define __le16_to_cpus(x) do {} while (0) +#define __cpu_to_be64s(x) __swab64s((x)) +#define __be64_to_cpus(x) __swab64s((x)) +#define __cpu_to_be32s(x) __swab32s((x)) +#define __be32_to_cpus(x) __swab32s((x)) +#define __cpu_to_be16s(x) __swab16s((x)) +#define __be16_to_cpus(x) __swab16s((x)) + +#include <linux/byteorder/generic.h> + +#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ diff --git a/contrib/media/updf/include/linux/byteorder/pdp_endian.h b/contrib/media/updf/include/linux/byteorder/pdp_endian.h new file mode 100644 index 0000000000..618631cbc6 --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/pdp_endian.h @@ -0,0 +1,88 @@ +#ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H +#define _LINUX_BYTEORDER_PDP_ENDIAN_H + +/* + * Could have been named NUXI-endian, but we use the same name as in glibc. + * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) + * should ever use this braindead byteorder. + * This file *should* work, but has not been tested. + * + * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 + * + * I thought vaxen were NUXI-endian, but was told they were correct-endian + * (little-endian), though indeed there existed NUXI-endian machines + * (DEC PDP-11 and old VAXen in compatibility mode). + * This makes this file a bit useless, but as a proof-of-concept. + * + * But what does a __u64 look like: is it 34127856 or 78563412 ??? + * I don't dare imagine! Hence, no 64-bit byteorder support yet. + * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. + * + */ + +#ifndef __PDP_ENDIAN +#define __PDP_ENDIAN 3412 +#endif +#ifndef __PDP_ENDIAN_BITFIELD +#define __PDP_ENDIAN_BITFIELD +#endif + +#include <linux/byteorder/swab.h> +#include <linux/byteorder/swabb.h> + +#define __constant_htonl(x) ___constant_swahb32((x)) +#define __constant_ntohl(x) ___constant_swahb32((x)) +#define __constant_htons(x) ___constant_swab16((x)) +#define __constant_ntohs(x) ___constant_swab16((x)) +#define __constant_cpu_to_le64(x) I DON'T KNOW +#define __constant_le64_to_cpu(x) I DON'T KNOW +#define __constant_cpu_to_le32(x) ___constant_swahw32((x)) +#define __constant_le32_to_cpu(x) ___constant_swahw32((x)) +#define __constant_cpu_to_le16(x) ((__u16)(x) +#define __constant_le16_to_cpu(x) ((__u16)(x) +#define __constant_cpu_to_be64(x) I DON'T KNOW +#define __constant_be64_to_cpu(x) I DON'T KNOW +#define __constant_cpu_to_be32(x) ___constant_swahb32((x)) +#define __constant_be32_to_cpu(x) ___constant_swahb32((x)) +#define __constant_cpu_to_be16(x) ___constant_swab16((x)) +#define __constant_be16_to_cpu(x) ___constant_swab16((x)) +#define __cpu_to_le64(x) I DON'T KNOW +#define __le64_to_cpu(x) I DON'T KNOW +#define __cpu_to_le32(x) ___swahw32((x)) +#define __le32_to_cpu(x) ___swahw32((x)) +#define __cpu_to_le16(x) ((__u16)(x) +#define __le16_to_cpu(x) ((__u16)(x) +#define __cpu_to_be64(x) I DON'T KNOW +#define __be64_to_cpu(x) I DON'T KNOW +#define __cpu_to_be32(x) __swahb32((x)) +#define __be32_to_cpu(x) __swahb32((x)) +#define __cpu_to_be16(x) __swab16((x)) +#define __be16_to_cpu(x) __swab16((x)) +#define __cpu_to_le64p(x) I DON'T KNOW +#define __le64_to_cpup(x) I DON'T KNOW +#define __cpu_to_le32p(x) ___swahw32p((x)) +#define __le32_to_cpup(x) ___swahw32p((x)) +#define __cpu_to_le16p(x) (*(__u16*)(x)) +#define __le16_to_cpup(x) (*(__u16*)(x)) +#define __cpu_to_be64p(x) I DON'T KNOW +#define __be64_to_cpup(x) I DON'T KNOW +#define __cpu_to_be32p(x) __swahb32p((x)) +#define __be32_to_cpup(x) __swahb32p((x)) +#define __cpu_to_be16p(x) __swab16p((x)) +#define __be16_to_cpup(x) __swab16p((x)) +#define __cpu_to_le64s(x) I DON'T KNOW +#define __le64_to_cpus(x) I DON'T KNOW +#define __cpu_to_le32s(x) ___swahw32s((x)) +#define __le32_to_cpus(x) ___swahw32s((x)) +#define __cpu_to_le16s(x) do {} while (0) +#define __le16_to_cpus(x) do {} while (0) +#define __cpu_to_be64s(x) I DON'T KNOW +#define __be64_to_cpus(x) I DON'T KNOW +#define __cpu_to_be32s(x) __swahb32s((x)) +#define __be32_to_cpus(x) __swahb32s((x)) +#define __cpu_to_be16s(x) __swab16s((x)) +#define __be16_to_cpus(x) __swab16s((x)) + +#include <linux/byteorder/generic.h> + +#endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ diff --git a/contrib/media/updf/include/linux/byteorder/swab.h b/contrib/media/updf/include/linux/byteorder/swab.h new file mode 100644 index 0000000000..3bc423b536 --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/swab.h @@ -0,0 +1,190 @@ +#ifndef _LINUX_BYTEORDER_SWAB_H +#define _LINUX_BYTEORDER_SWAB_H + +/* + * linux/byteorder/swab.h + * Byte-swapping, independently from CPU endianness + * swabXX[ps]?(foo) + * + * Francois-Rene Rideau <fare@tunes.org> 19971205 + * separated swab functions from cpu_to_XX, + * to clean up support for bizarre-endian architectures. + * + * See asm-i386/byteorder.h and suches for examples of how to provide + * architecture-dependent optimized versions + * + */ + +/* casts are necessary for constants, because we never know how for sure + * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. + */ +#define ___swab16(x) \ +({ \ + __u16 __x = (x); \ + ((__u16)( \ + (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ + (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ +}) + +#define ___swab32(x) \ +({ \ + __u32 __x = (x); \ + ((__u32)( \ + (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \ + (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \ + (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \ +}) + +#define ___swab64(x) \ +({ \ + __u64 __x = (x); \ + ((__u64)( \ + (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \ + (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \ + (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \ + (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \ + (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \ + (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ + (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \ + (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \ +}) + +#define ___constant_swab16(x) \ + ((__u16)( \ + (((__u16)(x) & (__u16)0x00ffU) << 8) | \ + (((__u16)(x) & (__u16)0xff00U) >> 8) )) +#define ___constant_swab32(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ + (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ + (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) +#define ___constant_swab64(x) \ + ((__u64)( \ + (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ + (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ + (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ + (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ + (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ + (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ + (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ + (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) )) + +/* + * provide defaults when no architecture-specific optimization is detected + */ +#ifndef __arch__swab16 +# define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); }) +#endif +#ifndef __arch__swab32 +# define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); }) +#endif +#ifndef __arch__swab64 +# define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); }) +#endif + +#ifndef __arch__swab16p +# define __arch__swab16p(x) __arch__swab16(*(x)) +#endif +#ifndef __arch__swab32p +# define __arch__swab32p(x) __arch__swab32(*(x)) +#endif +#ifndef __arch__swab64p +# define __arch__swab64p(x) __arch__swab64(*(x)) +#endif + +#ifndef __arch__swab16s +# define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0) +#endif +#ifndef __arch__swab32s +# define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0) +#endif +#ifndef __arch__swab64s +# define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0) +#endif + + +/* + * Allow constant folding + */ +#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) +# define __swab16(x) \ +(__builtin_constant_p((__u16)(x)) ? \ + ___swab16((x)) : \ + __fswab16((x))) +# define __swab32(x) \ +(__builtin_constant_p((__u32)(x)) ? \ + ___swab32((x)) : \ + __fswab32((x))) +# define __swab64(x) \ +(__builtin_constant_p((__u64)(x)) ? \ + ___swab64((x)) : \ + __fswab64((x))) +#else +# define __swab16(x) __fswab16(x) +# define __swab32(x) __fswab32(x) +# define __swab64(x) __fswab64(x) +#endif /* OPTIMIZE */ + + +static __inline__ __const__ __u16 __fswab16(__u16 x) +{ + return __arch__swab16(x); +} +static __inline__ __u16 __swab16p(__u16 *x) +{ + return __arch__swab16p(x); +} +static __inline__ void __swab16s(__u16 *addr) +{ + __arch__swab16s(addr); +} + +static __inline__ __const__ __u32 __fswab32(__u32 x) +{ + return __arch__swab32(x); +} +static __inline__ __u32 __swab32p(__u32 *x) +{ + return __arch__swab32p(x); +} +static __inline__ void __swab32s(__u32 *addr) +{ + __arch__swab32s(addr); +} + +#ifdef __BYTEORDER_HAS_U64__ +static __inline__ const __u64 __fswab64(__u64 x) +{ +# ifdef __SWAB_64_THRU_32__ + __u32 h = x >> 32; + __u32 l = x & ((1ULL<<32)-1); + return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h))); +# else + return __arch__swab64(x); +# endif +} +static __inline__ __u64 __swab64p(__u64 *x) +{ + return __arch__swab64p(x); +} +static __inline__ void __swab64s(__u64 *addr) +{ + __arch__swab64s(addr); +} +#endif /* __BYTEORDER_HAS_U64__ */ + +#if defined(__KERNEL__) +#define swab16 __swab16 +#define swab32 __swab32 +#define swab64 __swab64 +#define swab16p __swab16p +#define swab32p __swab32p +#define swab64p __swab64p +#define swab16s __swab16s +#define swab32s __swab32s +#define swab64s __swab64s +#endif + +#endif /* _LINUX_BYTEORDER_SWAB_H */ diff --git a/contrib/media/updf/include/linux/byteorder/swabb.h b/contrib/media/updf/include/linux/byteorder/swabb.h new file mode 100644 index 0000000000..d28d9a804d --- /dev/null +++ b/contrib/media/updf/include/linux/byteorder/swabb.h @@ -0,0 +1,137 @@ +#ifndef _LINUX_BYTEORDER_SWABB_H +#define _LINUX_BYTEORDER_SWABB_H + +/* + * linux/byteorder/swabb.h + * SWAp Bytes Bizarrely + * swaHHXX[ps]?(foo) + * + * Support for obNUXIous pdp-endian and other bizarre architectures. + * Will Linux ever run on such ancient beasts? if not, this file + * will be but a programming pearl. Still, it's a reminder that we + * shouldn't be making too many assumptions when trying to be portable. + * + */ + +/* + * Meaning of the names I chose (vaxlinux people feel free to correct them): + * swahw32 swap 16-bit half-words in a 32-bit word + * swahb32 swap 8-bit halves of each 16-bit half-word in a 32-bit word + * + * No 64-bit support yet. I don't know NUXI conventions for long longs. + * I guarantee it will be a mess when it's there, though :-> + * It will be even worse if there are conflicting 64-bit conventions. + * Hopefully, no one ever used 64-bit objects on NUXI machines. + * + */ + +#define ___swahw32(x) \ +({ \ + __u32 __x = (x); \ + ((__u32)( \ + (((__u32)(__x) & (__u32)0x0000ffffUL) << 16) | \ + (((__u32)(__x) & (__u32)0xffff0000UL) >> 16) )); \ +}) +#define ___swahb32(x) \ +({ \ + __u32 __x = (x); \ + ((__u32)( \ + (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | \ + (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )); \ +}) + +#define ___constant_swahw32(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ + (((__u32)(x) & (__u32)0xffff0000UL) >> 16) )) +#define ___constant_swahb32(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ + (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) )) + +/* + * provide defaults when no architecture-specific optimization is detected + */ +#ifndef __arch__swahw32 +# define __arch__swahw32(x) ___swahw32(x) +#endif +#ifndef __arch__swahb32 +# define __arch__swahb32(x) ___swahb32(x) +#endif + +#ifndef __arch__swahw32p +# define __arch__swahw32p(x) __swahw32(*(x)) +#endif +#ifndef __arch__swahb32p +# define __arch__swahb32p(x) __swahb32(*(x)) +#endif + +#ifndef __arch__swahw32s +# define __arch__swahw32s(x) do { *(x) = __swahw32p((x)); } while (0) +#endif +#ifndef __arch__swahb32s +# define __arch__swahb32s(x) do { *(x) = __swahb32p((x)); } while (0) +#endif + + +/* + * Allow constant folding + */ +#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) +# define __swahw32(x) \ +(__builtin_constant_p((__u32)(x)) ? \ + ___swahw32((x)) : \ + __fswahw32((x))) +# define __swahb32(x) \ +(__builtin_constant_p((__u32)(x)) ? \ + ___swahb32((x)) : \ + __fswahb32((x))) +#else +# define __swahw32(x) __fswahw32(x) +# define __swahb32(x) __fswahb32(x) +#endif /* OPTIMIZE */ + + +static __inline__ __const__ __u32 __fswahw32(__u32 x) +{ + return __arch__swahw32(x); +} +static __inline__ __u32 __swahw32p(__u32 *x) +{ + return __arch__swahw32p(x); +} +static __inline__ void __swahw32s(__u32 *addr) +{ + __arch__swahw32s(addr); +} + + +static __inline__ __const__ __u32 __fswahb32(__u32 x) +{ + return __arch__swahb32(x); +} +static __inline__ __u32 __swahb32p(__u32 *x) +{ + return __arch__swahb32p(x); +} +static __inline__ void __swahb32s(__u32 *addr) +{ + __arch__swahb32s(addr); +} + +#ifdef __BYTEORDER_HAS_U64__ +/* + * Not supported yet + */ +#endif /* __BYTEORDER_HAS_U64__ */ + +#if defined(__KERNEL__) +#define swahw32 __swahw32 +#define swahb32 __swahb32 +#define swahw32p __swahw32p +#define swahb32p __swahb32p +#define swahw32s __swahw32s +#define swahb32s __swahb32s +#endif + +#endif /* _LINUX_BYTEORDER_SWABB_H */ diff --git a/contrib/media/updf/include/lispassert.h b/contrib/media/updf/include/lispassert.h new file mode 100644 index 0000000000..6aafa759ba --- /dev/null +++ b/contrib/media/updf/include/lispassert.h @@ -0,0 +1,16 @@ + +#ifndef __lispassert_h__ +#define __lispassert_h__ + + +#include "choices.h" + +#ifdef USE_ASSERT + #include <assert.h> + #define LISPASSERT(x) assert(x) +#else + #define LISPASSERT(x) +#endif + +#endif + diff --git a/contrib/media/updf/include/lispatom.h b/contrib/media/updf/include/lispatom.h new file mode 100644 index 0000000000..abb9242dc2 --- /dev/null +++ b/contrib/media/updf/include/lispatom.h @@ -0,0 +1,135 @@ +/** \file lispatom.h + * implementation of the standard lisp elements: atom and sublist. + * + * class LispAtom. This class implements one atom, which is a + * reference to a string it represents, and a pointer to the next + * lisp atom if it is in a list. + * It also has a pointer to the annotation object. + * The local class LispPtr implements automatic garbage collection + * through reference counting. + * + * The class LispNumber inherits from LispAtom and holds a numeric atom + * in the string representation and in the numeric representation (BigNumber). + * The string representation is converted to BigNumber (using the current precision for floats) when a numeric + * operation is first requested on the atom. The BigNumber representation is + * converted to the string representation whenever the number needs to be printed i.e. LispAtom::String() method is requested. + * The string is held in the number (to avoid repeated conversions) and also cached in the string cache (this caching will eventually be abandoned). + * When LispNumber is constructed from BigNumber, no string representation is available. + * Conversion from string to BigNumber is done only if no BigNumber object is present. + */ + +#ifndef __lispatom_h__ +#define __lispatom_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lispstring.h" +#include "numbers.h" // RefPtr<BigNumber> needs definition of BigNumber + +/// This should be used whenever constants 2, 10 mean binary and decimal. +// maybe move somewhere else? +#define BASE10 10 +#define BASE2 2 + +// Flags used for atom types. These are not strictly necessary, but +// do speed up certain evaluations by avoiding a lot of overhead. +#define KFlagIsNumeric 0x01 // Quoted (after executing the args for + // a LispLambda, or for a LispSetQuoted) + +class LispEnvironment; + +class LispAtom : public ObjectHelper<LispAtom> +{ +public: + static LispObject* New(LispEnvironment& aEnvironment, const LispChar * aString); + virtual ~LispAtom(); + virtual LispString * String(); + virtual LispObject* Copy() { return NEW LispAtom(*this); } +private: + LispAtom(LispString * aString); + LispAtom& operator=(const LispAtom& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +public: + LispAtom(const LispAtom& other); +private: + LispString * iString; +}; + +//------------------------------------------------------------------------------ +// LispSublist + +class LispSubList : public ObjectHelper<LispSubList> +{ +public: + static LispSubList* New(LispObject* aSubList); + virtual ~LispSubList(); + virtual LispPtr* SubList() { return &iSubList; } + virtual LispObject* Copy() { return NEW LispSubList(*this); } +private: + // Constructor is private -- use New() instead + LispSubList(LispObject* aSubList) : iSubList(aSubList) {} // iSubList's constructor is messed up (it's a LispPtr, duh) +public: + LispSubList(const LispSubList& other) : ASuper(other), iSubList(other.iSubList) {} +private: + LispPtr iSubList; +}; + + +//------------------------------------------------------------------------------ +// LispGenericClass + +class LispGenericClass : public ObjectHelper<LispGenericClass> +{ +public: + static LispGenericClass* New(GenericClass* aClass); + virtual ~LispGenericClass(); + virtual GenericClass* Generic(); + virtual LispObject* Copy() { return NEW LispGenericClass(*this); } +private: + // Constructor is private -- use New() instead + LispGenericClass(GenericClass* aClass); +public: + LispGenericClass(const LispGenericClass& other) : ASuper(other), iClass(other.iClass) { iClass->iReferenceCount++; } +private: + LispGenericClass& operator=(const LispGenericClass& other) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +private: + GenericClass* iClass; +}; + +class LispHashTable; +class LispNumber : public ObjectHelper<LispNumber> +{ +public: + /// constructors: + /// construct from another LispNumber + LispNumber(BigNumber* aNumber, LispString * aString = NULL) : iNumber(aNumber), iString(aString) {} + LispNumber(const LispNumber& other) : ASuper(other), iNumber(other.iNumber), iString(other.iString) {} + /// construct from a decimal string representation (also create a number object) and use aBasePrecision decimal digits + LispNumber(LispString * aString, LispInt aBasePrecision) : iNumber(NULL), iString(aString) { Number(aBasePrecision); } + + virtual ~LispNumber() {} + virtual LispObject* Copy() { return NEW LispNumber(*this); } + /// return a string representation in decimal with maximum decimal precision allowed by the inherent accuracy of the number + virtual LispString * String(); + /// give access to the BigNumber object; if necessary, will create a BigNumber object out of the stored string, at given precision (in decimal?) + virtual BigNumber* Number(LispInt aPrecision); +private: + /// number object; NULL if not yet converted from string + RefPtr<BigNumber> iNumber; + /// string representation in decimal; NULL if not yet converted from BigNumber + RefPtr<LispString> iString; +}; + + +#endif + + diff --git a/contrib/media/updf/include/lispcleanupstack.h b/contrib/media/updf/include/lispcleanupstack.h new file mode 100644 index 0000000000..8257c7827c --- /dev/null +++ b/contrib/media/updf/include/lispcleanupstack.h @@ -0,0 +1,76 @@ + +/** \file lispcleanupstack.h + * Implementation of a cleanup stack for exception handling on platforms + * that don't clean up the stack automatically after an exception + * occurs. The macro's SAFEPUSH and SAFEPOP as defined in + * plat/<plat>/lisptype.h define which cleanup handler + * to use, so it can be configured differently for different platforms. + * + */ + +#ifndef __lispcleanupstack_h__ +#define __lispcleanupstack_h__ + +#include "yacasbase.h" +#include "grower.h" + +/** Base class that specifies one pure abstract method Delete. + * Only classes derived from this one can be pushed onto + * a cleanup stack. This in order to assure the cleanup code + * knows where to find the destructor. + * + * Typical candidates for cleanup include places in the code that + * have temporal global side effects that need to be finalized on, + * Like opening a file for reading, reading and then closing. If + * reading prematurely finishes through an exception, the file + * should be closed. + */ +class LispBase : public YacasBase +{ +public: + virtual void Delete()=0; + virtual ~LispBase(){}; +}; + +/** Clean up stack that doesn't actually delete objects itself. + * Use this clean up stack if the compiler generates + * cleanup code itself (particularly for newer c++ compilers). + * Alternatively SAFEPUSH and SAFEPOP can then be defined to do nothing. + */ +class LispCleanup : public YacasBase +{ +public: + inline LispCleanup() : iObjects() {} + virtual ~LispCleanup(); + /// Push an object onto the cleanup stack for guarding + virtual void Push(LispBase& aObject); + /// Pop an object from the cleanup stack (the system is finished using it) + virtual void Pop(); + /// Exception occurred: delete all objects on the stack, back to front. + virtual void Delete(); + /** For testing purposes, verify that all places that pushed an object + * popped it too. + */ + void CheckStackEmpty(); + +protected: + CArrayGrower<LispBase*, ArrOpsCustomPtr<LispBase> > iObjects; +}; + +/** Clean up stack that deletes objects itself when needed. + * Use this clean up stack if the compiler doesn't generate + * cleanup code itself (particularly for older c++ compilers). + */ +class DeletingLispCleanup : public LispCleanup +{ +public: + virtual ~DeletingLispCleanup(); + virtual void Push(LispBase& aObject); + virtual void Pop(); + virtual void Delete(); +}; + + +#endif + + diff --git a/contrib/media/updf/include/lispenvironment.h b/contrib/media/updf/include/lispenvironment.h new file mode 100644 index 0000000000..f5899efffb --- /dev/null +++ b/contrib/media/updf/include/lispenvironment.h @@ -0,0 +1,709 @@ +/** \file lispenvironment.h + * General environment access. + * + */ + + +#ifndef __lispenvironment_h__ +#define __lispenvironment_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lisphash.h" +#include "lispevalhash.h" +#include "lispcleanupstack.h" +#include "deffile.h" +#include "lispio.h" +#include "stringio.h" +#include "lispglobals.h" +#include "xmltokenizer.h" +#include "errors.h" + +class CCompressedArchive; /* defined in archiver.h */ + +class LispDefFiles; +class InputDirectories : public CDeletingArrayGrower<LispString *, ArrOpsDeletingPtr<LispString> > +{ +}; + +class LispInput; +class LispOutput; +class LispPrinter; +class LispOperators; +class LispUserFunctions; +class LispUserFunction; +class LispMultiUserFunction; +class LispEvaluatorBase; +class BasicEvaluator; +class DefaultDebugger; +class LispEnvironment; + + +/// The Lisp environment. +/// This huge class is the central class of the Yacas program. It +/// implements a dialect of Lisp. + +class LispEnvironment : public YacasBase +{ +public: + /// \name Constructor and destructor + //@{ + LispEnvironment(YacasCoreCommands &aCoreCommands, + LispUserFunctions& aUserFunctions, + LispGlobal& aGlobals, + LispHashTable& aHashTable, + LispOutput* aOutput, + LispPrinter& aPrinter, + LispOperators &aPreFixOperators, + LispOperators &aInFixOperators, + LispOperators &aPostFixOperators, + LispOperators &aBodiedOperators, + LispInput* aCurrentInput, + LispInt aStackSize); + ~LispEnvironment(); + //@} + +public: + /// \name Lisp variables + //@{ + + /// Assign a value to a Lisp variable. + /// \param aString name of the variable + /// \param aValue value to be assigned to \a aString + /// + /// If there is a local variable with the name \a aString, the + /// object \a aValue is assigned to it. Otherwise, a + /// LispGlobalVariable is constructed, and it is associated with + /// \a aValue in #iGlobals. + /// \sa FindLocal + void SetVariable(LispString * aString, LispPtr& aValue, LispBoolean aGlobalLazyVariable); + + /// In debug mode, DebugModeVerifySettingGlobalVariables raises a warning if a global variable is set. + void DebugModeVerifySettingGlobalVariables(LispPtr & aVariable, LispBoolean aGlobalLazyVariable); + + /// Get the value assigned to a variable. + /// \param aVariable name of the variable + /// \param aResult (on exit) value of \a aVariable + /// + /// - If there is a local variable with the name \a aString, + /// \a aResult is set to point to the value assigned to this local + /// variable. + /// - If there is a global variable \a aString and its + /// #iEvalBeforeReturn is false, its value is returned via + /// \a aResult. + /// - If there is a global variable \a aString and its + /// #iEvalBeforeReturn is true, its value is evaluated. The + /// result is assigned back to the variable, its + /// #iEvalBeforeReturn is set to false, and a copy of the result + /// is returned in \a aResult. + /// - Otherwise, \a aResult is set to #NULL. + void GetVariable(LispString * aVariable,LispPtr& aResult); + + void UnsetVariable(LispString * aString); + void PushLocalFrame(LispBoolean aFenced); + void PopLocalFrame(); + void NewLocal(LispString * aVariable,LispObject* aValue); + void CurrentLocals(LispPtr& aResult); + //@} + +public: + /// \name Lisp functions + //@{ + + /// Return the #iCoreCommands attribute. + inline YacasCoreCommands& CoreCommands(); + + /// Add a command to the list of core commands. + /// \param aEvaluatorFunc C function evaluating the core command + /// \param aString name of the command + /// \param aNrArgs number of arguments + /// \param aFlags flags, see YacasEvaluator::FunctionFlags + void SetCommand(YacasEvalCaller aEvaluatorFunc, LispChar * aString,LispInt aNrArgs,LispInt aFlags); + + void RemoveCommand(LispChar * aString); + void RemoveCoreCommand(LispChar * aString); + + inline LispHashTable& HashTable(); + LispUserFunction* UserFunction(LispPtr& aArguments); + LispUserFunction* UserFunction(LispString * aName,LispInt aArity); + + /// Return LispMultiUserFunction with given name. + /// \param aArguments name of the multi user function + /// + /// The table of user functions, #iUserFunctions, is consulted. If + /// a user function with the given name exists, it is returned. + /// Otherwise, a new LispMultiUserFunction is constructed, added + /// to #iUserFunctions, and returned. + LispMultiUserFunction* MultiUserFunction(LispString * aArguments); + + LispDefFiles& DefFiles(); + void DeclareRuleBase(LispString * aOperator, LispPtr& aParameters, + LispInt aListed); + void DeclareMacroRuleBase(LispString * aOperator, LispPtr& aParameters, + LispInt aListed); + void DefineRule(LispString * aOperator,LispInt aArity, + LispInt aPrecedence, LispPtr& aPredicate, + LispPtr& aBody); + void DefineRulePattern(LispString * aOperator,LispInt aArity, + LispInt aPrecedence, LispPtr& aPredicate, + LispPtr& aBody); + + + void UnFenceRule(LispString * aOperator,LispInt aArity); + void Retract(LispString * aOperator,LispInt aArity); + void HoldArgument(LispString * aOperator,LispString * aVariable); + //@} + + LispString * FindCachedFile(LispChar * aFileName); + +public: + /// \name Precision + //@{ + + /// set precision to a given number of decimal digits + void SetPrecision(LispInt aPrecision); + inline LispInt Precision(void) const; + inline LispInt BinaryPrecision(void) const; + //@} + +public: + inline void SetPrettyPrinter(LispString * aPrettyPrinter); + inline LispString * PrettyPrinter(void); + + inline void SetPrettyReader(LispString * aPrettyReader); + inline LispString * PrettyReader(void); + +public: + LispInt GetUniqueId(); +public: + LispPrinter& CurrentPrinter(); + +public: + /// \name Operators + //@{ + LispOperators& PreFix(); + LispOperators& InFix(); + LispOperators& PostFix(); + LispOperators& Bodied(); + //@} + +public: + /// \name Input and output + //@{ + LispInput* CurrentInput(); + void SetCurrentInput(LispInput* aInput); +public: + LispOutput* CurrentOutput(); + void SetCurrentOutput(LispOutput* aOutput); +public: + void SetUserError(LispChar * aErrorString); + LispChar * ErrorString(LispInt aError); + //@} + +protected: + /// current precision for user interaction, in decimal and in binary + LispInt iPrecision; + LispInt iBinaryPrecision; +public: + InputDirectories iInputDirectories; + DeletingLispCleanup iCleanup; + LispInt iEvalDepth; + LispInt iMaxEvalDepth; + CCompressedArchive *iArchive; + LispEvaluatorBase* iEvaluator; + +public: // Error information when some error occurs. + InputStatus iInputStatus; + LispInt iSecure; +public: // pre-found + RefPtr<LispObject> iTrue; + RefPtr<LispObject> iFalse; + + RefPtr<LispObject> iEndOfFile; + RefPtr<LispObject> iEndStatement; + RefPtr<LispObject> iProgOpen; + RefPtr<LispObject> iProgClose; + RefPtr<LispObject> iNth; + RefPtr<LispObject> iBracketOpen; + RefPtr<LispObject> iBracketClose; + RefPtr<LispObject> iListOpen; + RefPtr<LispObject> iListClose; + RefPtr<LispObject> iComma; + RefPtr<LispObject> iList; + RefPtr<LispObject> iProg; + + LispInt iLastUniqueId; + +public: // Error reporting + LispString iError; + StringOutput iErrorOutput; + DefaultDebugger* iDebugger; + +private: + LispPtr *FindLocal(LispString * aVariable); + +private: + + class LispLocalVariable : public YacasBase + { + public: + LispLocalVariable(LispString * aVariable, + LispObject* aValue) + : iNext(NULL), iVariable(aVariable),iValue(aValue) + { + ++aVariable->iReferenceCount; + }; + ~LispLocalVariable() + { + --iVariable->iReferenceCount; + } + private: + LispLocalVariable(const LispLocalVariable& aOther) : iNext(NULL), iVariable(NULL),iValue(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LispLocalVariable& operator=(const LispLocalVariable& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } + + public: + LispLocalVariable* iNext; + LispString * iVariable; + LispPtr iValue; + }; + class LocalVariableFrame : public YacasBase + { + public: + LocalVariableFrame(LocalVariableFrame *aNext, + LispLocalVariable* aFirst) + : iNext(aNext), iFirst(aFirst), iLast(aFirst) { } + void Add(LispLocalVariable* aNew) + { + aNew->iNext = iFirst; + iFirst = aNew; + } + ~LocalVariableFrame() + { + LispLocalVariable* t = iFirst; + LispLocalVariable* next; + while (t != iLast) + { + next = t->iNext; + delete t; + t = next; + } + } + + private: + LocalVariableFrame(const LocalVariableFrame& aOther) : iNext(NULL),iFirst(NULL),iLast(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LocalVariableFrame& operator=(const LocalVariableFrame& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } + public: + LocalVariableFrame *iNext; + LispLocalVariable* iFirst; + LispLocalVariable* iLast; + }; +public: //Well... only because I want to be able to show the stack to the outside world... + LocalVariableFrame *iLocalsList; + LispOutput* iInitialOutput; +private: + + /// Hash of core commands with associated YacasEvaluator + YacasCoreCommands& iCoreCommands; + + LispUserFunctions& iUserFunctions; + LispHashTable& iHashTable; + LispDefFiles iDefFiles; + LispPrinter& iPrinter; + LispOutput* iCurrentOutput; + + /// Hash of global variables with their values + LispGlobal& iGlobals; + + LispOperators& iPreFixOperators; + LispOperators& iInFixOperators; + LispOperators& iPostFixOperators; + LispOperators& iBodiedOperators; + + LispInput* iCurrentInput; + + LispChar * theUserError; + + LispString * iPrettyReader; + LispString * iPrettyPrinter; +public: + LispTokenizer iDefaultTokenizer; + CommonLispTokenizer iCommonLispTokenizer; + XmlTokenizer iXmlTokenizer; + LispTokenizer* iCurrentTokenizer; + +public: + /** YacasArgStack implements a stack of pointers to objects that can be used to pass + * arguments to functions, and receive results back. + */ + class YacasArgStack + { + public: + YacasArgStack(LispInt aStackSize) : iStack(),iStackCnt(0) + { + iStack.ResizeTo( aStackSize ); + } + inline LispInt GetStackTop() const {return iStackCnt;} + inline void RaiseStackOverflowError() const + { + RaiseError("Argument stack reached maximum. Please extend argument stack with --stack argument on the command line."); + } + inline void PushArgOnStack(LispObject* aObject) + { + if (iStackCnt >= iStack.Size()) + { + RaiseStackOverflowError(); + } + //LISPASSERT(iStackCnt>=0 /*&& iStackCnt<iStack.Size()*/); + iStack[iStackCnt] = (aObject); + iStackCnt++; + } + inline void PushNulls(LispInt aNr) + { + LispInt aStackCnt = iStackCnt + aNr; + if (aStackCnt > iStack.Size() || aStackCnt < 0) + { + RaiseStackOverflowError(); + } + iStackCnt = aStackCnt; + } + inline LispPtr& GetElement(LispInt aPos) + { + LISPASSERT(0<=aPos && aPos<iStackCnt); + //LISPASSERT(aPos>=0 && aPos<iStack.Size()); + return iStack[aPos]; + } + inline void PopTo(LispInt aTop) + { + LISPASSERT(0<=aTop && aTop<=iStackCnt); + while (iStackCnt>aTop) + { + iStackCnt--; + iStack[iStackCnt] = (NULL); + } + } + protected: + // Invariants: + // 0 <= iStackCnt <= iStack.Size() + // iStack[iStackCnt..iStack.Size()-1] = NULL + LispPtrArray iStack; + LispInt iStackCnt; // number of items on the stack + }; + YacasArgStack iStack; + +private: + + inline LispEnvironment(const LispEnvironment& aOther) + : + iPrecision(0), // default user precision of 10 decimal digits + iBinaryPrecision(0), // same as 34 bits + iInputDirectories(), + iCleanup(), + iEvalDepth(0), + iMaxEvalDepth(0), + iArchive(NULL), + iEvaluator(NULL), + iInputStatus(), + iSecure(0), + iTrue(), + iFalse(), + iEndOfFile(), + iEndStatement(), + iProgOpen(), + iProgClose(), + iNth(), + iBracketOpen(), + iBracketClose(), + iListOpen(), + iListClose(), + iComma(), + iList(), + iProg(), + iLastUniqueId(0), + iError(), + iErrorOutput(aOther.iErrorOutput), + iDebugger(NULL), + iLocalsList(NULL), + iInitialOutput(aOther.iInitialOutput), + iCoreCommands(aOther.iCoreCommands), + iUserFunctions(aOther.iUserFunctions), + iHashTable(aOther.iHashTable), + iDefFiles(), + iPrinter(aOther.iPrinter), + iCurrentOutput(aOther.iCurrentOutput), + iGlobals(aOther.iGlobals), + iPreFixOperators(aOther.iPreFixOperators), + iInFixOperators(aOther.iInFixOperators), + iPostFixOperators(aOther.iPostFixOperators), + iBodiedOperators(aOther.iBodiedOperators), + iCurrentInput(aOther.iCurrentInput), + theUserError(NULL), + iPrettyReader(NULL), + iPrettyPrinter(NULL), + iDefaultTokenizer(), + iCommonLispTokenizer(), + iXmlTokenizer(), + iCurrentTokenizer(NULL), + iStack(0) + { + // copy constructor has not been made yet, hence the assert + LISPASSERT(0); + } + LispEnvironment& operator=(const LispEnvironment& aOther) + { + // copy constructor has not been made yet, hence the assert + LISPASSERT(0); + return *this; + } + +}; + +inline LispInt LispEnvironment::Precision(void) const +{ + return iPrecision; +} + +inline LispInt LispEnvironment::BinaryPrecision(void) const +{ + return iBinaryPrecision; +} + + + +inline YacasCoreCommands& LispEnvironment::CoreCommands() +{ + return iCoreCommands; +} + + +inline LispHashTable& LispEnvironment::HashTable() +{ + return iHashTable; +} + + + +// Local lisp stack, unwindable by the exception handler +class LispLocalFrame : public LispBase +{ +public: + LispLocalFrame(LispEnvironment& aEnvironment, LispBoolean aFenced) + : iEnvironment(aEnvironment) + { + iEnvironment.PushLocalFrame(aFenced); + SAFEPUSH(iEnvironment,*this); + }; + virtual ~LispLocalFrame() + { + SAFEPOP(iEnvironment); + Delete(); + }; + virtual void Delete(); +private: + LispEnvironment& iEnvironment; +}; + + + +class LispSecureFrame : public LispBase +{ +public: + LispSecureFrame(LispEnvironment& aEnvironment) + : iEnvironment(aEnvironment),iPreviousSecure(aEnvironment.iSecure) + { + iEnvironment.iSecure = 1; + SAFEPUSH(iEnvironment,*this); + }; + virtual ~LispSecureFrame() + { + SAFEPOP(iEnvironment); + Delete(); + }; + virtual void Delete(); +private: + LispEnvironment& iEnvironment; + LispInt iPreviousSecure; +}; + + +// LispLocalInput takes ownership over the LispInput class +class LispLocalInput : public LispBase +{ +public: + LispLocalInput(LispEnvironment& aEnvironment, LispInput* aInput) + : iEnvironment(aEnvironment),iPreviousInput(iEnvironment.CurrentInput()) + { + iEnvironment.SetCurrentInput(aInput); + SAFEPUSH(iEnvironment,*this); + }; + virtual ~LispLocalInput() + { + SAFEPOP(iEnvironment); + Delete(); + }; + virtual void Delete(); +private: + LispLocalInput(const LispLocalInput& aOther): iEnvironment(aOther.iEnvironment),iPreviousInput(iEnvironment.CurrentInput()) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + }; + LispLocalInput& operator=(const LispLocalInput& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + }; + +private: + LispEnvironment& iEnvironment; + LispInput* iPreviousInput; +}; + + +// LispLocalInput takes ownership over the LispInput class +class LispLocalOutput : public LispBase +{ +public: + LispLocalOutput(LispEnvironment& aEnvironment, LispOutput* aOutput) + : iEnvironment(aEnvironment), iPreviousOutput(iEnvironment.CurrentOutput()) + { + iPreviousOutput = iEnvironment.CurrentOutput(); + iEnvironment.SetCurrentOutput(aOutput); + SAFEPUSH(iEnvironment,*this); + }; + virtual ~LispLocalOutput() + { + SAFEPOP(iEnvironment); + Delete(); + }; + virtual void Delete(); +private: + LispLocalOutput(const LispLocalOutput& aOther): iEnvironment(aOther.iEnvironment), iPreviousOutput(iEnvironment.CurrentOutput()) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LispLocalOutput& operator=(const LispLocalOutput& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +private: + LispEnvironment& iEnvironment; + LispOutput* iPreviousOutput; +}; + + +class LispLocalEvaluator : public YacasBase +{ +public: + LispLocalEvaluator(LispEnvironment& aEnvironment,LispEvaluatorBase* aNewEvaluator); + ~LispLocalEvaluator(); + +private: + LispLocalEvaluator(const LispLocalEvaluator& aOther) : iPreviousEvaluator(NULL), iEnvironment(aOther.iEnvironment) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LispLocalEvaluator& operator=(const LispLocalEvaluator& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } + +private: + LispEvaluatorBase* iPreviousEvaluator; + LispEnvironment& iEnvironment; +}; + +class LispLocalTrace : public YacasBase +{ +public: + LispLocalTrace(LispUserFunction* aUserFunc); + ~LispLocalTrace(); +private: + LispLocalTrace(const LispLocalTrace& aOther) : iUserFunc(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LispLocalTrace& operator=(const LispLocalTrace& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +private: + LispUserFunction* iUserFunc; +}; + +class LocalArgs : public YacasBase +{ +public: + LocalArgs(LispPtr* aPtrs) : iPtrs(aPtrs) {}; + ~LocalArgs() + { + if (iPtrs) + delete[] iPtrs; + } +private: + LocalArgs(const LocalArgs& aOther) : iPtrs(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + LocalArgs& operator=(const LocalArgs& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +private: + LispPtr* iPtrs; +}; + + + +inline void LispEnvironment::SetPrettyReader(LispString * aPrettyReader) +{ + iPrettyReader = aPrettyReader; +} +inline LispString * LispEnvironment::PrettyReader(void) +{ + return iPrettyReader; +} + +inline void LispEnvironment::SetPrettyPrinter(LispString * aPrettyPrinter) +{ + iPrettyPrinter = aPrettyPrinter; +} +inline LispString * LispEnvironment::PrettyPrinter(void) +{ + return iPrettyPrinter; +} + + +#endif + + diff --git a/contrib/media/updf/include/lisperror.h b/contrib/media/updf/include/lisperror.h new file mode 100644 index 0000000000..075c6a0645 --- /dev/null +++ b/contrib/media/updf/include/lisperror.h @@ -0,0 +1,68 @@ + +#ifndef __lisperror_h__ +#define __lisperror_h__ + +#include "lisptype.h" +#include "lispstring.h" + +#include "choices.h" + + +enum ErrorCodes +{ + KLispErrNone = 0, + KLispErrInvalidArg , + KLispErrWrongNumberOfArgs , + KLispErrNotList , + KLispErrListNotLongEnough , + KLispErrInvalidStack , + KQuitting , + KLispErrNotEnoughMemory , + KInvalidToken , + KLispErrInvalidExpression , + KLispErrUnprintableToken , + KLispErrFileNotFound , + KLispErrReadingFile , + KLispErrCreatingUserFunction, + KLispErrCreatingRule , + KLispErrArityAlreadyDefined , + KLispErrCommentToEndOfFile , + KLispErrNotString , + KLispErrNotInteger , + KLispErrParsingInput , + KLispErrMaxRecurseDepthReached, + KLispErrDefFileAlreadyChosen , + KLispErrDivideByZero , + KLispErrNotAnInFixOperator , + KLispErrUser , + KLispErrIsNotInFix , + KLispErrSecurityBreach , + KLispErrLibraryNotFound , + KLispErrUserInterrupt , + KLispErrNonBooleanPredicateInPattern, + KLispErrGenericFormat, + KLispNrErrors +}; + + +template<typename T> +inline void Check(T hastobetrue, LispInt aError) +{ + if (!hastobetrue) + LispThrow(aError); +} + + +#ifdef YACAS_DEBUG +#define DBG_printf printf +#define DBG_(xxx) xxx +#else +namespace{void inline noop(...) {}} +// could change 'noop' to 'sizeof' below, but we get 'left-hand operand of comma has no effect' from g++ +#define DBG_printf while (0) noop +#define DBG_(xxx) /*xxx*/ +#endif + + +#endif + diff --git a/contrib/media/updf/include/lispeval.h b/contrib/media/updf/include/lispeval.h new file mode 100644 index 0000000000..f661c4b345 --- /dev/null +++ b/contrib/media/updf/include/lispeval.h @@ -0,0 +1,184 @@ +/** \file lispeval.h + * Evaluation of expressions. + * + */ + +#ifndef __lispeval_h__ +#define __lispeval_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lispenvironment.h" + +/* +void InternalEval(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aExpression); +*/ + + +class UserStackInformation : public YacasBase +{ +public: + UserStackInformation() + : iOperator(),iExpression(),iRulePrecedence(-1),iSide(0) +#ifdef YACAS_DEBUG + , iFileName("(no file)"),iLine(0) +#endif // YACAS_DEBUG + { + } + LispPtr iOperator; + LispPtr iExpression; + LispInt iRulePrecedence; + LispInt iSide; // 0=pattern, 1=body + DBG_( LispChar * iFileName; ) + DBG_( LispInt iLine; ) +}; + +/// Abstract evaluator for Lisp expressions. +/// Eval() is a pure virtual function, to be provided by the derived class. +/// The other functions are stubs. + +class LispEvaluatorBase : public YacasBase +{ +public: + LispEvaluatorBase() : iBasicInfo() {} + virtual ~LispEvaluatorBase(); + virtual void Eval(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aExpression)=0; + virtual void ResetStack(); + virtual UserStackInformation& StackInformation(); + virtual void ShowStack(LispEnvironment& aEnvironment, LispOutput& aOutput); +private: + UserStackInformation iBasicInfo; +}; + +/// The basic evaluator for Lisp expressions. + +class BasicEvaluator : public LispEvaluatorBase +{ +public: + /// Evaluate a Lisp expression + /// \param aEnvironment the Lisp environment, in which the + /// evaluation should take place. + /// \param aResult the result of the evaluation. + /// \param aExpression the expression to evaluate. + /// + /// First, the evaluation depth is checked. An error is raised if + /// the maximum evaluation depth is exceeded. + /// + /// The next step is the actual evaluation. \a aExpression is a + /// LispObject, so we can distinguish three cases. + /// - If \a aExpression is a string starting with \c " , it is + /// simply copied in \a aResult. If it starts with another + /// character (this includes the case where it represents a + /// number), the environment is checked to see whether a + /// variable with this name exists. If it does, its value is + /// copied in \a aResult, otherwise \a aExpression is copied. + /// - If \a aExpression is a list, the head of the list is + /// examined. If the head is not a string. InternalApplyPure() + /// is called. If the head is a string, it is checked against + /// the core commands; if there is a check, the corresponding + /// evaluator is called. Then it is checked agaist the list of + /// user function with GetUserFunction() . Again, the + /// corresponding evaluator is called if there is a check. If + /// all fails, ReturnUnEvaluated() is called. + /// - Otherwise (ie. if \a aExpression is a generic object), it is + /// copied in \a aResult. + /// + /// \note The result of this operation must be a unique (copied) + /// element! Eg. its Next might be set... + /// + /// The LispPtr it can be stored in to is passed in as argument, so it + /// does not need to be constructed by the calling environment. + virtual void Eval(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aExpression); + virtual ~BasicEvaluator(); +}; + +class TracedEvaluator : public BasicEvaluator +{ +public: + TracedEvaluator() : BasicEvaluator(),errorStr(),errorOutput(errorStr){} + virtual void Eval(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aExpression); +protected: + LispString errorStr; + StringOutput errorOutput; +}; + + +class TracedStackEvaluator : public BasicEvaluator +{ +public: + TracedStackEvaluator() : objs() {} + virtual ~TracedStackEvaluator(); + virtual void Eval(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aExpression); + virtual void ResetStack(); + virtual UserStackInformation& StackInformation(); + virtual void ShowStack(LispEnvironment& aEnvironment, LispOutput& aOutput); +private: + void PushFrame(); + void PopFrame(); +private: + CArrayGrower<UserStackInformation*, ArrOpsCustomPtr<UserStackInformation> > objs; +}; + + + +/* GetUserFunction : get user function, possibly loading the required + files to read in the function definition */ +LispUserFunction* GetUserFunction(LispEnvironment& aEnvironment, + LispPtr* subList); + + +/* Tracing functions */ +void TraceShowEnter(LispEnvironment& aEnvironment, + LispPtr& aExpression); +void TraceShowLeave(LispEnvironment& aEnvironment, LispPtr& aResult, + LispPtr& aExpression); +void TraceShowArg(LispEnvironment& aEnvironment,LispPtr& aParam, + LispPtr& aValue); + + +void ShowExpression(LispString& outString, LispEnvironment& aEnvironment, + LispPtr& aExpression); + + +class YacasDebuggerBase : public YacasBase +{ +public: + virtual ~YacasDebuggerBase(); + virtual void Start() = 0; + virtual void Finish() = 0; + virtual void Enter(LispEnvironment& aEnvironment, + LispPtr& aExpression) = 0; + virtual void Leave(LispEnvironment& aEnvironment, LispPtr& aResult, + LispPtr& aExpression) = 0; + virtual void Error(LispEnvironment& aEnvironment) = 0; + virtual LispBoolean Stopped() = 0; +}; + +class DefaultDebugger : public YacasDebuggerBase +{ +public: + inline DefaultDebugger(LispPtr& aEnter, LispPtr& aLeave, LispPtr& aError) + : iEnter(aEnter), iLeave(aLeave), iError(aError), iTopExpr(),iTopResult(),iStopped(LispFalse),defaultEval() {}; + virtual void Start(); + virtual void Finish(); + virtual void Enter(LispEnvironment& aEnvironment, + LispPtr& aExpression); + virtual void Leave(LispEnvironment& aEnvironment, LispPtr& aResult, + LispPtr& aExpression); + virtual void Error(LispEnvironment& aEnvironment); + virtual LispBoolean Stopped(); + LispPtr iEnter; + LispPtr iLeave; + LispPtr iError; + LispPtr iTopExpr; + LispPtr iTopResult; + LispBoolean iStopped; +protected: + BasicEvaluator defaultEval; +}; + + +#endif + + + diff --git a/contrib/media/updf/include/lispevalhash.h b/contrib/media/updf/include/lispevalhash.h new file mode 100644 index 0000000000..ea6fcff194 --- /dev/null +++ b/contrib/media/updf/include/lispevalhash.h @@ -0,0 +1,46 @@ +/** \file lispevalhash.h + * Storage of executable commands + * + */ + +#ifndef __lispevalhash_h__ +#define __lispevalhash_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lisphash.h" +#include "evalfunc.h" + + +// new-style evaluator, passing arguments onto the stack in LispEnvironment +typedef void (*YacasEvalCaller)(LispEnvironment& aEnvironment,LispInt aStackTop); +class YacasEvaluator : public EvalFuncBase +{ +public: + // FunctionFlags can be orred when passed to the constructor of this function + enum FunctionFlags + { + Function=0, // Function: evaluate arguments + Macro=1, // Function: don't evaluate arguments + Fixed = 0, // fixed number of arguments + Variable = 2 // variable number of arguments + }; + YacasEvaluator(YacasEvalCaller aCaller,LispInt aNrArgs, LispInt aFlags) + : iCaller(aCaller), iNrArgs(aNrArgs), iFlags(aFlags) + { + } + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, + LispPtr& aArguments); +private: + YacasEvalCaller iCaller; + LispInt iNrArgs; + LispInt iFlags; +}; + +class YacasCoreCommands : public LispAssociatedHash<YacasEvaluator> +{ +}; + + + +#endif diff --git a/contrib/media/updf/include/lispglobals.h b/contrib/media/updf/include/lispglobals.h new file mode 100644 index 0000000000..db60d05daa --- /dev/null +++ b/contrib/media/updf/include/lispglobals.h @@ -0,0 +1,61 @@ + +/** \file lispglobals.h + * Storage of globals in a associated hash + * + */ + +#ifndef __lispglobals_h__ +#define __lispglobals_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lisphash.h" + + +/// Value of a Lisp global variable. +/// The only special feature of this class is the attribute +/// #iEvalBeforeReturn, which defaults to #LispFalse. If this +/// attribute is set to #LispTrue, the value in #iValue needs to be +/// evaluated to get the value of the Lisp variable. +/// \sa LispEnvironment::GetVariable() + +class LispGlobalVariable : public YacasBase +{ +public: + inline LispGlobalVariable(const LispGlobalVariable& aOther); + LispGlobalVariable(LispPtr& aValue): iValue(aValue), iEvalBeforeReturn(LispFalse) {} + inline LispGlobalVariable& operator=(const LispGlobalVariable& aOther); + + inline void SetEvalBeforeReturn(LispBoolean aEval); + LispPtr iValue; + LispBoolean iEvalBeforeReturn; +}; + +/// Associated hash of LispGlobalVariable objects + +class LispGlobal : public LispAssociatedHash<LispGlobalVariable> +{ +}; + + + + +inline LispGlobalVariable::LispGlobalVariable(const LispGlobalVariable& aOther) : iValue(aOther.iValue), iEvalBeforeReturn(LispFalse) +{ +} + +inline void LispGlobalVariable::SetEvalBeforeReturn(LispBoolean aEval) +{ + iEvalBeforeReturn = aEval; +} + + +inline LispGlobalVariable& LispGlobalVariable::operator=(const LispGlobalVariable& aOther) +{ + iValue = (aOther.iValue); + return *this; +} + + +#endif + diff --git a/contrib/media/updf/include/lisphash.h b/contrib/media/updf/include/lisphash.h new file mode 100644 index 0000000000..72a9320ab8 --- /dev/null +++ b/contrib/media/updf/include/lisphash.h @@ -0,0 +1,101 @@ +/** \file lisphash.h + * hashing of strings. Each string will exist only once in the + * hash table, and have an unique id. + */ + + +#ifndef __lisphash_h__ +#define __lisphash_h__ + +#include "yacasbase.h" +#include "grower.h" +#include "lispstring.h" + + +const LispInt KSymTableSize = 211; +LispInt LispHash( const char *s ); +LispInt LispHashCounted( const char *s, LispInt length ); +LispInt LispHashStringify( const char *s ); +LispInt LispHashUnStringify( const char *s ); +LispInt LispHashPtr(const LispString * aString); // hash the *address*! + +/** + * This is the symbol table, implemented as a hash table for fast + * lookup. It is meant to store any string just once, have fast + * searching for strings and return a reference to the string. + * This also allows fast comparison of two strings (two strings + * are equal iff the pointers to the strings are equal). + */ +class LispHashTable : public YacasBase +{ +public: + LispHashTable() {} + ~LispHashTable(); + // If string not yet in table, insert. Afterwards return the string. + LispString * LookUp(const LispChar * aString, LispBoolean aStringOwnedExternally=LispFalse); + /// LookUp that takes ownership of the string + LispString * LookUp(LispString * aString); + LispString * LookUpCounted(LispChar * aString,LispInt aLength); + LispString * LookUpStringify(LispChar * aString, LispBoolean aStringOwnedExternally=LispFalse); + LispString * LookUpUnStringify(LispChar * aString, LispBoolean aStringOwnedExternally=LispFalse); + void GarbageCollect(); +private: + void AppendString(LispInt bin,LispString * result); +private: + CArrayGrower<LispStringSmartPtr, ArrOpsCustomObj<LispStringSmartPtr> > iHashTable[KSymTableSize]; +}; + + + + + +/** VoidGrow is a helper class for LispAssociatedHash + */ +class VoidGrow : public CArrayGrower<void*, ArrOpsCustomPtr<void> > +{ +}; + +/** LispAssociatedHash allows you to associate arbitrary + * information with a string in the above hash table. You can + * specify what type of information to link to the string, and + * this class then stores that information for a string. It is + * in a sense a way to extend the string object without modifying + * the string class itself. This class does not own the strings it + * points to, but instead relies on the fact that the strings + * are maintained in a hash table (like LispHashTable above). + */ +template<class T> +class LispAssociatedHash : public YacasBase +{ +public: + /// Find the data associated to \a aString. + /// If \a aString is not stored in the hash table, this function + /// returns #NULL. + inline T* LookUp(LispString * aString); + + /// Add an association to the hash table. + /// If \a aString is already stored in the hash table, its + /// association is changed to \a aData. Otherwise, a new + /// association is added. + inline void SetAssociation(const T& aData, LispString * aString); + + /// Delete an association from the hash table. + inline void Release(LispString * aString); + +protected: + /** The destructor is made protected because we do not want the outside world to directly + * call this destructor. The alternative would be to make the destructor virtual. + */ + inline ~LispAssociatedHash(); + +private: + // The next array is in fact an array of arrays of type LAssoc<T> + VoidGrow iHashTable[KSymTableSize]; +}; + + + +#include "lisphash.inl" + + +#endif diff --git a/contrib/media/updf/include/lispio.h b/contrib/media/updf/include/lispio.h new file mode 100644 index 0000000000..61b61a2b4f --- /dev/null +++ b/contrib/media/updf/include/lispio.h @@ -0,0 +1,109 @@ +/** \file lispio.h + * definitions of pure input output classes. + */ + + +#ifndef __lispio_h__ +#define __lispio_h__ + +#include "yacasbase.h" + +// Hope this forward declaration doesn't screw us over... +class InputDirectories; +class InputStatus : public YacasBase +{ +public: + InputStatus() : iFileName("none") , iLineNumber(-1) {}; + ~InputStatus(); + void SetTo(LispChar * aFileName); + void RestoreFrom(InputStatus& aPreviousStatus); + inline LispInt LineNumber(); + inline LispChar * FileName(); + inline void NextLine(); + + inline InputStatus(const InputStatus& aOther) : iFileName(aOther.iFileName) , iLineNumber(aOther.iLineNumber) + { + } + + inline InputStatus& operator=(const InputStatus& aOther) + { + iFileName = aOther.iFileName; + iLineNumber = aOther.iLineNumber; + return *this; + } + +private: + LispChar * iFileName; + LispInt iLineNumber; +}; + +inline LispInt InputStatus::LineNumber() +{ + return iLineNumber; +} +inline LispChar * InputStatus::FileName() +{ + return iFileName; +} +inline void InputStatus::NextLine() +{ + iLineNumber++; +} + +/** \class LispInput : pure abstract class declaring the interface + * that needs to be implemented by a file (something that expressions + * can be read from). + */ +class LispInput : public YacasBase +{ +public: + /** Constructor with InputStatus. InputStatus retains the information + * needed when an error occurred, and the file has already been + * closed. + */ + LispInput(InputStatus& aStatus) : iStatus(aStatus) {}; + virtual ~LispInput(); + + /// Return the next character in the file + virtual LispChar Next() = 0; + + /** Peek at the next character in the file, without advancing the file + * pointer. + */ + virtual LispChar Peek() = 0; + + virtual InputStatus& Status() const {return iStatus;}; + + /// Check if the file position is past the end of the file. + virtual LispBoolean EndOfStream() = 0; + /** StartPtr returns the start of a buffer, if there is one. + * Implementations of this class can keep the file in memory + * as a whole, and return the start pointer and current position. + * Especially the parsing code requires this, because it can then + * efficiently look up a symbol in the hash table without having to + * first create a buffer to hold the symbol in. If StartPtr is supported, + * the whole file should be in memory for the whole period the file + * is being read. + */ + virtual LispChar * StartPtr() = 0; + virtual LispInt Position() = 0; + virtual void SetPosition(LispInt aPosition) = 0; +protected: + InputStatus& iStatus; +}; + +/** \class LispOutput : interface an output object should adhere to. + */ +class LispOutput : public YacasBase +{ +public: + virtual ~LispOutput(); + /// Write out one character. + virtual void PutChar(LispChar aChar) = 0; + +public: + void Write(const LispChar * aString); +}; + +#endif + diff --git a/contrib/media/updf/include/lispobject.h b/contrib/media/updf/include/lispobject.h new file mode 100644 index 0000000000..63bc7d32cc --- /dev/null +++ b/contrib/media/updf/include/lispobject.h @@ -0,0 +1,234 @@ +/** \file lispobject.h + * Implementation of basic LispObject, which is the base class for + * anything that can be put in a linked list. + * + * class LispObject. This class implements one lisp object, which is a + * abstract class containing reference counting and a next pointer. + * derive from this to implement specific types of list elements. + * The local class LispPtr implements automatic garbage collection + * through reference counting. + * + */ + +#ifndef __lispobject_h__ +#define __lispobject_h__ + +#include "yacasbase.h" +#include "refcount.h" +#include "lispstring.h" +#include "genericobject.h" + +#ifdef YACAS_DEBUG +#define DBG_(xxx) xxx +#else +#define DBG_(xxx) /*xxx*/ +#endif + +class LispObject; +class BigNumber; + + +/** class LispPtr. A LispPtr is a smart pointer to a LispObject. + * It does the reference counting, and consequent destruction if needed. + * LispPtr is used in LispObject as a pointer to the next object; and + * LispPtr::GoNext() advances one step in this LispObject::Nixed() chain. + * Diverse built-in functions use LispPtr to hold temporary values. + */ +typedef RefPtr<LispObject> LispPtr; + +/** \class LispPtrArray is similar to LispPtr, but implements an array + * of pointers to objects. + */ +typedef CArrayGrower<LispPtr, ArrOpsCustomObj<LispPtr> > LispPtrArray; + + +#ifdef YACAS_DEBUG +void IncNrObjects(); +void DecNrObjects(); +#else +#define IncNrObjects() +#define DecNrObjects() +#endif + +// Should we DecNrObjects by the delete, or in the destructor? +// Put a DecNrObjects_xxx() macro in both places, and CHOOSE here. +#define DecNrObjects_delete() DECNROBJECTS_CHOOSE(DecNrObjects(),) +#define DecNrObjects_destructor() DECNROBJECTS_CHOOSE(,DecNrObjects()) +#define DECNROBJECTS_CHOOSE(bydelete,bydestructor) bydestructor + + +template <int> struct Undefined; +template <> struct Undefined<1>{}; + + +/** class LispObject is the base object class that can be put in + * linked lists. It either has a pointer to a string, obtained through + * String(), or it is a holder for a sublist, obtainable through SubList(), + * or it is a generic object, in which case Generic() returns non-NULL. + * Only one of these three functions should return a non-NULL value. + * It is a reference-counted object. LispPtr handles the reference counting. + */ +class LispObject : public YacasBase +{ +public: + inline LispPtr& Nixed(); + +public: //Derivables + virtual ~LispObject(); + + /** Return string representation, or NULL if the object doesn't have one. + * the string representation is only relevant if the object is a + * simple atom. This method returns NULL by default. + */ + virtual LispString * String() { return NULL; } + /** If this object is a list, return a pointer to it. + * Default behaviour is to return NULL. + */ + virtual LispPtr* SubList() { return NULL; } + virtual GenericClass* Generic() { return NULL; } + + /** If this is a number, return a BigNumber representation + */ + virtual BigNumber* Number(LispInt aPrecision) { return NULL; } + + virtual LispObject* Copy() = 0; + + /** Return a pointer to extra info. This allows for annotating + * an object. Returns NULL by default. + * LispObject's implementation of this handles almost all derived classes. + */ + virtual LispObject* ExtraInfo() { return NULL; } + virtual LispObject* SetExtraInfo(LispObject* aData) = 0; +public: + LispInt Equal(LispObject& aOther); + inline LispInt operator==(LispObject& aOther); + inline LispInt operator!=(LispObject& aOther); + DBG_( LispChar * iFileName; ) + DBG_( LispInt iLine; ) + inline void SetFileAndLine(LispChar * aFileName, LispInt aLine) + { + DBG_( iFileName = aFileName; ) + DBG_( iLine = aLine; ) + } +protected: + inline LispObject() : +#ifdef YACAS_DEBUG + iFileName(NULL),iLine(0), +#endif // YACAS_DEBUG + iNext(),iReferenceCount() + { + IncNrObjects(); + DBG_( iFileName = NULL; ) + DBG_( iLine = 0; ) + } + inline LispObject(const LispObject& other) : +#ifdef YACAS_DEBUG + iFileName(other.iFileName),iLine(other.iLine), +#endif // YACAS_DEBUG + iNext(),iReferenceCount() + { + IncNrObjects(); + } + + inline LispObject& operator=(const LispObject& other) + { +#ifdef YACAS_DEBUG + iFileName = other.iFileName; + iLine = other.iLine; +#endif // YACAS_DEBUG + IncNrObjects(); + return *this; + } + + +private: + LispPtr iNext; +public: + ReferenceCount iReferenceCount; +}; + + +template <class T> +class WithExtraInfo : public T +{ +public: + WithExtraInfo(T& aT, LispObject* aData = 0) : T(aT), iExtraInfo(aData) {} + WithExtraInfo(const WithExtraInfo& other) : T(other), iExtraInfo(other.iExtraInfo) {} + virtual LispObject* ExtraInfo() { return iExtraInfo; } + virtual LispObject* SetExtraInfo(LispObject* aData) { iExtraInfo = aData; return this; } + virtual LispObject* Copy() + { + if (!iExtraInfo.ptr()) return T::Copy(); + return NEW WithExtraInfo(*this, iExtraInfo->Copy()); + } +private: + LispPtr iExtraInfo; +}; + + +template <class T, class U = LispObject> +class ObjectHelper : public U +{ +protected: + typedef ObjectHelper ASuper; // for use by the derived class + ObjectHelper() {} + ObjectHelper(const ObjectHelper& other) : U(other) {} + virtual ~ObjectHelper() = 0; // so we're abstract + virtual LispObject* SetExtraInfo(LispObject* aData) + { + if (!aData) return this; + //T * pT = dynamic_cast<T*>(this); LISPASSERT(pT); + LispObject * pObject = NEW WithExtraInfo<T>(*static_cast<T*>(this), aData); + return pObject; + } +}; + +template <typename T, class U> +inline ObjectHelper<T,U>::~ObjectHelper() {} + + +/** + * class LispIterator works almost like LispPtr, but doesn't enforce + * reference counting, so it should be faster. Use LispIterator + * (instead of LispPtr) to traverse a lisp expression non-destructively. + */ +class LispIterator : public YacasBase +{ +public: + // ala TEMPLATE CLASS iterator + //typedef forward_iterator_tag iterator_category; + typedef LispPtr value_type; + typedef int /*ptrdiff_t*/ difference_type; + typedef LispPtr* pointer; + typedef LispPtr& reference; +public: + LispIterator() : _Ptr(0) {} // construct with null node pointer + LispIterator(pointer ptr) : _Ptr(ptr) {} // construct with node pointer + /*non-standard*/ LispIterator(reference ref) : _Ptr(&ref) {} // construct with node reference + reference operator*() const { return (*(_Ptr)); } // return designated value + pointer operator->() const { return (_Ptr); } // return pointer to class object + inline LispIterator& operator++() // preincrement + { + //precondition: _Ptr != NULL + LISPASSERT(_Ptr != NULL); + //expand: _Ptr = _Nextnode(_Ptr); + LispObject * pObj = _Ptr->operator->(); + _Ptr = pObj ? &(pObj->Nixed()) : NULL; + return (*this); + } + LispIterator operator++(int) { LispIterator _Tmp = *this; ++*this; return (_Tmp); } // postincrement + bool operator==(const LispIterator& other) const { return (_Ptr == other._Ptr); } // test for iterator equality + bool operator!=(const LispIterator& other) const { return (!(*this == other)); } // test for iterator inequality + // The following operators are not used yet, and would need to be tested before used. + //LispIterator& operator--() { _Ptr = _Prevnode(_Ptr); return (*this); } // predecrement + //LispIterator operator--(int) { LispIterator _Tmp = *this; --*this; return (_Tmp); } // postdecrement +protected: + pointer _Ptr; // pointer to node +public: + inline LispObject* getObj() const { return (*_Ptr).operator->(); } +}; + +#include "lispobject.inl" + + +#endif diff --git a/contrib/media/updf/include/lispparser.h b/contrib/media/updf/include/lispparser.h new file mode 100644 index 0000000000..d3c03e6359 --- /dev/null +++ b/contrib/media/updf/include/lispparser.h @@ -0,0 +1,51 @@ +/** \file lispparser.h + * parsing and printing in the old-fashioned lisp style + * + */ + +#ifndef __lispparser_h__ +#define __lispparser_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "tokenizer.h" +#include "lispio.h" +#include "lisphash.h" +#include "evalfunc.h" +class LispParser : public YacasBase +{ +public: + LispParser(LispTokenizer& aTokenizer, LispInput& aInput, + LispEnvironment& aEnvironment); + virtual ~LispParser(); + virtual void Parse(LispPtr& aResult ); +protected: + void ParseList(LispPtr& aResult); + void ParseAtom(LispPtr& aResult,LispString * aToken); + +public: + LispTokenizer& iTokenizer; + LispInput& iInput; + LispEnvironment& iEnvironment; + LispInt iListed; +}; + + + + +class LispPrinter : public YacasBase +{ +public: + virtual ~LispPrinter(); + virtual void Print(LispPtr& aExpression, LispOutput& aOutput, LispEnvironment& aEnvironment); + virtual void RememberLastChar(LispChar aChar); +private: + void PrintExpression(LispPtr& aExpression, LispOutput& aOutput, + LispEnvironment& aEnvironment, + LispInt aDepth=0); + + void Indent(LispOutput& aOutput, LispInt aDepth); +}; + + +#endif diff --git a/contrib/media/updf/include/lispstring.h b/contrib/media/updf/include/lispstring.h new file mode 100644 index 0000000000..bc9736dfb5 --- /dev/null +++ b/contrib/media/updf/include/lispstring.h @@ -0,0 +1,117 @@ +/** \file lispstring.h + * Defining a string class. + */ + + +#ifndef __lispstring_h__ +#define __lispstring_h__ + +#include "yacasbase.h" +#include "grower.h" +#include "refcount.h" + +class LispStringSmartPtr; + + +/** \class LispString : zero-terminated byte-counted string. + * Also keeps a reference count for any one interested. + * LispString is derived from CArrayGrower, so the function + * Size returns the length of the buffer. Since the string + * is also zero-terminated (for better interfacing with the normal + * c functions), the string length is Size()-1. + * + * This class also allows the string to point to a buffer which is owned + * by another part of the system, in which case it cannot be resized. + * The array will then not be freed by this class. + */ +class LispString : public CArrayGrower<LispChar,ArrOpsPOD<LispChar> > +{ +public: + // Constructors + // The constructors allow the caller to specify whether the storage is owned externally. + // Use the assignment operators to set the string after this. + inline LispString(LispBoolean aStringOwnedExternally=LispFalse); + inline LispString(LispString &aString, LispBoolean aStringOwnedExternally=LispFalse); + inline LispString(LispChar * aString, LispBoolean aStringOwnedExternally); + inline LispString(const LispChar * aString); + + // Assignment + // This assignment abides by earlier functions setting the string as owned externally. + inline LispString& operator=(LispChar * aString); + + // Assignments (with modifications). This string cannot be owned externally. + // Set string by taking part of another string. + void SetStringCounted(const LispChar * aString, LispInt aLength); + // Set string from other string, adding quotes around the string. + void SetStringUnStringified(const LispChar * aString); + // Set string from other string, removing quotes around the string. + void SetStringStringified(const LispChar * aString); + + // Access + inline LispChar * c_str() const; // pointer to asciz 'C-string' + + // Comparison + // If the string is in the hash table it is faster to compare the pointers to the strings + // (instead of calling this routine), since in that case if they + // are equal they should in fact be literally the same object. + LispInt operator==(const LispString& aString); + + ~LispString(); +private: + inline void SetString(LispChar * aString, LispBoolean aStringOwnedExternally); + void SetString(const LispChar * aString); +public: + ReferenceCount iReferenceCount; +}; + + +/** \class LispStringSmartPtr for managing strings outside + of normal objects. This is the equivalent of LispPtr, maintaining + a reference count for the string object. + */ +class LispStringSmartPtr +{ +public: + // Default constructor (not explicit, so it auto-initializes) + LispStringSmartPtr() : iString(NULL) {} + + // Construct from pointer to LispString + LispStringSmartPtr(LispString * aString) : iString(NULL) + { + this->operator=(aString); + } + + // Copy constructor + LispStringSmartPtr(const LispStringSmartPtr& aOther) : iString() + { + this->operator=(aOther.iString); + } + + // Destructor + ~LispStringSmartPtr(); + + // Assignment from pointer. (PDG - new method) + // (we return void, not *this). + LispStringSmartPtr& operator=(LispString * aString); + + // Assignment from another (the *default* simply assigns members, not what we want). + // (we return void, not *this). + LispStringSmartPtr& operator=(const LispStringSmartPtr &aOther) { this->operator=(aOther.iString); return *this; } + + // Expected pointer behavior. + operator LispString*() const { return iString; } // implicit conversion to pointer to T + LispString *operator->() const { return iString; } // so (smartPtr->member) accesses T's member + + // Operators below are not used yet, so they are commented out. If you want to use them you need to test if they work. + //LispString &operator*() const { return *iString; } // so (*smartPtr) is a reference to T + //LispString *ptr() const { return iString; } // so (smartPtr.ptr()) returns the pointer to T (boost calls this method 'get') + //bool operator!() const { return !iString; } // is null pointer + +private: + LispString * iString; +}; + +#include "lispstring.inl" +#endif + + diff --git a/contrib/media/updf/include/lispuserfunc.h b/contrib/media/updf/include/lispuserfunc.h new file mode 100644 index 0000000000..1c643e3841 --- /dev/null +++ b/contrib/media/updf/include/lispuserfunc.h @@ -0,0 +1,127 @@ + + +#ifndef __lispuserfunc_h__ +#define __lispuserfunc_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lispenvironment.h" +#include "lisphash.h" +#include "grower.h" +#include "evalfunc.h" + +/// Abstract class providing the basic user function API. +/// Instances of this class are associated to the name of the function +/// via an associated hash table. When obtained, they can be used to +/// evaluate the function with some arguments. + +class LispUserFunction : public EvalFuncBase +{ +public: + LispUserFunction() : iFenced(LispTrue),iTraced(LispFalse) {}; + virtual ~LispUserFunction(); + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, + LispPtr& aArguments)=0; + virtual void HoldArgument(LispString * aVariable) = 0; + virtual void DeclareRule(LispInt aPrecedence, LispPtr& aPredicate, + LispPtr& aBody) = 0; + virtual void DeclareRule(LispInt aPrecedence, LispPtr& aBody) = 0; + virtual void DeclarePattern(LispInt aPrecedence, LispPtr& aPredicate, + LispPtr& aBody) = 0; + virtual LispPtr& ArgList() = 0; + +public: //unfencing + inline void UnFence() {iFenced = LispFalse;}; + inline LispBoolean Fenced() {return iFenced;}; +public: //tracing + inline void Trace() {iTraced = LispTrue;}; + inline void UnTrace() {iTraced = LispFalse;}; + inline LispBoolean Traced() {return iTraced;}; +private: + LispBoolean iFenced; + LispBoolean iTraced; +}; + + +/// User function with a specific arity. +/// This is still an abstract class, but the arity (number of +/// arguments) of the function is now fixed. + +class LispArityUserFunction : public LispUserFunction +{ +public: + virtual LispInt Arity() const = 0; + virtual LispInt IsArity(LispInt aArity) const = 0; +}; + + +class LispDefFile; + + +/// Set of LispArityUserFunction's. +/// By using this class, you can associate multiple functions (with +/// different arities) to one name. A specific LispArityUserFunction +/// can be selected by providing its name. Additionally, the name of +/// the file in which the function is defined, can be specified. + +class LispMultiUserFunction : public YacasBase +{ +public: + /// Constructor. + LispMultiUserFunction() : iFunctions(),iFileToOpen(NULL) {}; + + /** When adding a multi-user function to the association hash table, the copy constructor is used. + * We should at least make sure that iFunctions is empty, so there is no copying needed (for efficiency). + * Casually having a copy-constructor on CDeletingArrayGrower should be avoided, to make sure it is + * not used accidentally. + */ + inline LispMultiUserFunction(const LispMultiUserFunction& aOther) : iFunctions(), iFileToOpen(NULL) + { + LISPASSERT(aOther.iFileToOpen == 0); + LISPASSERT(aOther.iFunctions.Size() == 0); + } + inline LispMultiUserFunction& operator=(const LispMultiUserFunction& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(aOther.iFileToOpen == 0); + LISPASSERT(aOther.iFunctions.Size() == 0); + + LISPASSERT(iFileToOpen == 0); + LISPASSERT(iFunctions.Size() == 0); + return *this; + } + + /// Return user function with given arity. + LispUserFunction* UserFunc(LispInt aArity); + + /// Destructor. + virtual ~LispMultiUserFunction(); + + /// Specify that some argument should be held. + virtual void HoldArgument(LispString * aVariable); + + /// Add another LispArityUserFunction to #iFunctions. + virtual void DefineRuleBase(LispArityUserFunction* aNewFunction); + + /// Delete tuser function with given arity. + virtual void DeleteBase(LispInt aArity); + +private: + /// Set of LispArityUserFunction's provided by this LispMultiUserFunction. + CDeletingArrayGrower<LispArityUserFunction*, ArrOpsDeletingPtr<LispArityUserFunction> > iFunctions; + +public: + /// File to read for the definition of this function. + LispDefFile* iFileToOpen; +}; + + +/// Associated hash of LispMultiUserFunction objects. + +class LispUserFunctions : public LispAssociatedHash<LispMultiUserFunction> +{ +}; + + +#endif + diff --git a/contrib/media/updf/include/list b/contrib/media/updf/include/list new file mode 100644 index 0000000000..95aa4f901f --- /dev/null +++ b/contrib/media/updf/include/list @@ -0,0 +1,192 @@ +#ifndef _LIST_INCLUDED +#define _LIST_INCLUDED +#include <stdlib.h> +namespace std +{ + struct __list_node_base + { + __list_node_base* prev; + __list_node_base* next; + }; + template <class T> struct __list_node : __list_node_base + { + T data; + __list_node(const T& d):data(d){} + }; + template <class T> class list + { + __list_node_base head; // head.prev = end, head.next = start + unsigned _size; + public: + list():_size(0) {head.prev=head.next=&head;} + ~list() {clear();} + void clear() + { + __list_node<T>* a = + static_cast<__list_node<T>*>(head.next); + while (a!=&head) + { + __list_node<T>* b = + static_cast<__list_node<T>*>(a->next); + delete a; + a = b; + } + head.prev = head.next = &head; + _size = 0; + } + class iterator + { + public: + __list_node_base* cur; + friend class list; + iterator(){} + iterator(__list_node_base*c):cur(c){} + iterator(const iterator& it):cur(it.cur){} + iterator& operator++() + {cur=cur->next;return *this;} + iterator operator++(int) + {iterator tmp(*this);cur=cur->next;return tmp;} + iterator& operator--() + {cur=cur->prev;return *this;} + iterator operator--(int) + {iterator tmp(*this);cur=cur->prev;return tmp;} + bool operator!=(const iterator& it) + {return cur!=it.cur;} + bool operator==(const iterator& it) + {return cur==it.cur;} + T& operator*() + {return static_cast<__list_node<T>*>(cur)->data;} + T* operator->() {return &**this;} + }; + class const_iterator + { + const __list_node_base* cur; + friend class list; + public: + const_iterator(){} + const_iterator(const __list_node_base*c):cur(c){} + const_iterator(const const_iterator& it):cur(it.cur){} + const_iterator(const iterator& it):cur(it.cur){} + const_iterator& operator++() + {cur=cur->next;return *this;} + const_iterator operator++(int) + {const_iterator tmp(*this);cur=cur->next;return tmp;} + const_iterator& operator--() + {cur=cur->prev;return *this;} + const_iterator operator--(int) + {const_iterator tmp(*this);cur=cur->prev;return tmp;} + bool operator!=(const const_iterator& it) + {return cur!=it.cur;} + bool operator==(const const_iterator& it) + {return cur==it.cur;} + const T& operator*() + {return static_cast<const __list_node<T>*>(cur)->data;} + const T* operator->() {return &**this;} + }; + iterator erase(iterator it) + { + if (it==end()) return it; + it.cur->prev->next = it.cur->next; + it.cur->next->prev = it.cur->prev; + iterator res(it.cur->next); + delete static_cast<__list_node<T>*>(it.cur); + --_size; + return res; + } + iterator erase(iterator first, iterator last) + { + while (first!=last) + first=erase(first); + return first; + } + void pop_front(void) {erase(begin());} + class reverse_iterator + { + __list_node_base* cur; + friend class list; + public: + reverse_iterator(){} + reverse_iterator(__list_node_base*c):cur(c){} + reverse_iterator(const reverse_iterator& it): + cur(it.cur){} + reverse_iterator& operator++() + {cur=cur->prev;return *this;} + reverse_iterator operator++(int) + {reverse_iterator tmp(*this); + cur=cur->prev;return tmp;} + bool operator!=(const reverse_iterator& it) + {return cur!=it.cur;} + bool operator==(const reverse_iterator& it) + {return cur==it.cur;} + T& operator*() + {return static_cast<__list_node<T>*>(cur)->data;} + }; + class const_reverse_iterator + { + const __list_node_base* cur; + friend class list; + public: + const_reverse_iterator(){} + const_reverse_iterator(const __list_node_base*c):cur(c){} + const_reverse_iterator(const const_reverse_iterator& it): + cur(it.cur){} + const_reverse_iterator& operator++() + {cur=cur->prev;return *this;} + const_reverse_iterator operator++(int) + {const_reverse_iterator tmp(*this); + cur=cur->prev;return tmp;} + bool operator!=(const const_reverse_iterator& it) + {return cur!=it.cur;} + bool operator==(const const_reverse_iterator& it) + {return cur==it.cur;} + const T& operator*() + {return static_cast<__list_node<T>*>(cur)->data;} + }; + void push_front(const T& x) + { + __list_node<T>* a = new __list_node<T>(x); + a->next = head.next; + a->prev = &head; + head.next = a; + a->next->prev = a; + ++_size; + } + void push_back(const T& x) + { + __list_node<T>* a = new __list_node<T>(x); + a->next = &head; + a->prev = head.prev; + head.prev = a; + a->prev->next = a; + ++_size; + } + iterator begin() {return iterator(head.next);} + const_iterator begin() const {return const_iterator(head.next);} + iterator end() {return iterator(&head);} + const_iterator end() const {return const_iterator(&head);} + reverse_iterator rbegin() + {return reverse_iterator(head.prev);} + reverse_iterator rend() {return reverse_iterator(&head);} + void remove(const T& x) + { + __list_node<T>* a = + static_cast<__list_node<T>*>(head.next); + while (a!=&head) + { + __list_node<T>* b = + static_cast<__list_node<T>*>(a->next); + if (a->data==x) + { + a->prev->next = a->next; + a->next->prev = a->prev; + delete a; + --_size; + } + a=b; + } + } + unsigned size() const {return _size;} + bool empty() const {return _size==0;} + }; +} +#endif diff --git a/contrib/media/updf/include/llex.h b/contrib/media/updf/include/llex.h new file mode 100644 index 0000000000..1a811dce5c --- /dev/null +++ b/contrib/media/updf/include/llex.h @@ -0,0 +1,78 @@ +/* +** $Id: llex.h,v 1.65 2010/04/05 16:35:37 roberto Exp $ +** Lexical Analyzer +** See Copyright Notice in lua.h +*/ + +#ifndef llex_h +#define llex_h + +#include "lobject.h" +#include "lzio.h" + + +#define FIRST_RESERVED 257 + +/* maximum length of a reserved word */ +#define TOKEN_LEN (sizeof("function")/sizeof(char)) + + +/* +* WARNING: if you change the order of this enumeration, +* grep "ORDER RESERVED" +*/ +enum RESERVED { + /* terminal symbols denoted by reserved words */ + TK_AND = FIRST_RESERVED, TK_BREAK, + TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, + TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, + TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, + /* other terminal symbols */ + TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_EOS, + TK_NUMBER, TK_NAME, TK_STRING +}; + +/* number of reserved words */ +#define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) + + +typedef union { + lua_Number r; + TString *ts; +} SemInfo; /* semantics information */ + + +typedef struct Token { + int token; + SemInfo seminfo; +} Token; + + +typedef struct LexState { + int current; /* current character (charint) */ + int linenumber; /* input line counter */ + int lastline; /* line of last token `consumed' */ + Token t; /* current token */ + Token lookahead; /* look ahead token */ + struct FuncState *fs; /* `FuncState' is private to the parser */ + struct lua_State *L; + ZIO *z; /* input stream */ + Mbuffer *buff; /* buffer for tokens */ + struct Varlist *varl; /* list of all active local variables */ + TString *source; /* current source name */ + TString *envn; /* environment variable name */ + char decpoint; /* locale decimal point */ +} LexState; + + +LUAI_FUNC void luaX_init (lua_State *L); +LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, + TString *source); +LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); +LUAI_FUNC void luaX_next (LexState *ls); +LUAI_FUNC int luaX_lookahead (LexState *ls); +LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); +LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); + + +#endif diff --git a/contrib/media/updf/include/llimits.h b/contrib/media/updf/include/llimits.h new file mode 100644 index 0000000000..f8ede143d3 --- /dev/null +++ b/contrib/media/updf/include/llimits.h @@ -0,0 +1,281 @@ +/* +** $Id: llimits.h,v 1.84 2010/11/08 16:33:20 roberto Exp $ +** Limits, basic types, and some other `installation-dependent' definitions +** See Copyright Notice in lua.h +*/ + +#ifndef llimits_h +#define llimits_h + + +#include <limits.h> +#include <stddef.h> + + +#include "lua.h" + + +typedef unsigned LUA_INT32 lu_int32; + +typedef LUAI_UMEM lu_mem; + +typedef LUAI_MEM l_mem; + + + +/* chars used as small naturals (so that `char' is reserved for characters) */ +typedef unsigned char lu_byte; + + +#define MAX_SIZET ((size_t)(~(size_t)0)-2) + +#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2) +#define MIN_LMEM ((l_mem)~((~(lu_mem)0)>>1)) + + +#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ + +/* +** conversion of pointer to integer +** this is for hashing only; there is no problem if the integer +** cannot hold the whole pointer value +*/ +#define IntPoint(p) ((unsigned int)(lu_mem)(p)) + + + +/* type to ensure maximum alignment */ +#if !defined(LUAI_USER_ALIGNMENT_T) +#define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } +#endif + +typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; + + +/* result of a `usual argument conversion' over lua_Number */ +typedef LUAI_UACNUMBER l_uacNumber; + + +/* internal assertions for in-house debugging */ +#if defined(lua_assert) +#define check_exp(c,e) (lua_assert(c), (e)) +#else +#define lua_assert(c) /* empty */ +#define check_exp(c,e) (e) +#endif + +/* +** assertion for checking API calls +*/ +#if defined(LUA_USE_APICHECK) +#include <assert.h> +#define luai_apicheck(L,e) { (void)L; assert(e); } +#elif !defined(luai_apicheck) +#define luai_apicheck(L,e) lua_assert(e) +#endif + +#define api_check(l,e,msg) luai_apicheck(l,(e) && msg) + + +#if !defined(UNUSED) +#define UNUSED(x) ((void)(x)) /* to avoid warnings */ +#endif + + +#define cast(t, exp) ((t)(exp)) + +#define cast_byte(i) cast(lu_byte, (i)) +#define cast_num(i) cast(lua_Number, (i)) +#define cast_int(i) cast(int, (i)) + + +/* +** maximum depth for nested C calls and syntactical nested non-terminals +** in a program. (Value must fit in an unsigned short int.) +*/ +#if !defined(LUAI_MAXCCALLS) +#define LUAI_MAXCCALLS 200 +#endif + +/* +** maximum number of upvalues in a closure (both C and Lua). (Value +** must fit in an unsigned char.) +*/ +#define MAXUPVAL UCHAR_MAX + + +/* +** type for virtual-machine instructions +** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) +*/ +typedef lu_int32 Instruction; + + + +/* maximum stack for a Lua function */ +#define MAXSTACK 250 + + + +/* minimum size for the string table (must be power of 2) */ +#if !defined(MINSTRTABSIZE) +#define MINSTRTABSIZE 32 +#endif + + +/* minimum size for string buffer */ +#if !defined(LUA_MINBUFFER) +#define LUA_MINBUFFER 32 +#endif + + +#if !defined(lua_lock) +#define lua_lock(L) ((void) 0) +#define lua_unlock(L) ((void) 0) +#endif + +#if !defined(luai_threadyield) +#define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} +#endif + + +/* +** these macros allow user-specific actions on threads when you defined +** LUAI_EXTRASPACE and need to do something extra when a thread is +** created/deleted/resumed/yielded. +*/ +#if !defined(luai_userstateopen) +#define luai_userstateopen(L) ((void)L) +#endif + +#if !defined(luai_userstateclose) +#define luai_userstateclose(L) ((void)L) +#endif + +#if !defined(luai_userstatethread) +#define luai_userstatethread(L,L1) ((void)L) +#endif + +#if !defined(luai_userstatefree) +#define luai_userstatefree(L,L1) ((void)L) +#endif + +#if !defined(luai_userstateresume) +#define luai_userstateresume(L,n) ((void)L) +#endif + +#if !defined(luai_userstateyield) +#define luai_userstateyield(L,n) ((void)L) +#endif + +/* +** lua_number2int is a macro to convert lua_Number to int. +** lua_number2integer is a macro to convert lua_Number to lua_Integer. +** lua_number2unsigned is a macro to convert a lua_Number to a lua_Unsigned. +** lua_unsigned2number is a macro to convert a lua_Unsigned to a lua_Number. +*/ + +#if defined(MS_ASMTRICK) /* { */ +/* trick with Microsoft assembler for X86 */ + +#define lua_number2int(i,n) __asm {__asm fld n __asm fistp i} +#define lua_number2integer(i,n) lua_number2int(i, n) +#define lua_number2unsigned(i,n) \ + {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;} + + +#elif defined(LUA_IEEE754TRICK) /* }{ */ +/* the next trick should work on any machine using IEEE754 with + a 32-bit integer type */ + +union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; + +#if !defined(LUA_IEEEENDIAN) /* { */ +#define LUAI_EXTRAIEEE \ + static const union luai_Cast ieeeendian = {-(33.0 + 6755399441055744.0)}; +#define LUA_IEEEENDIAN (ieeeendian.l_p[1] == 33) +#else +#define LUAI_EXTRAIEEE /* empty */ +#endif /* } */ + +#define lua_number2int32(i,n,t) \ + { LUAI_EXTRAIEEE \ + volatile union luai_Cast u; u.l_d = (n) + 6755399441055744.0; \ + (i) = (t)u.l_p[LUA_IEEEENDIAN]; } + +#define lua_number2int(i,n) lua_number2int32(i, n, int) +#define lua_number2integer(i,n) lua_number2int32(i, n, lua_Integer) +#define lua_number2unsigned(i,n) lua_number2int32(i, n, lua_Unsigned) + +#endif /* } */ + + +/* the following definitions always work, but may be slow */ + +#if !defined(lua_number2int) +#define lua_number2int(i,n) ((i)=(int)(n)) +#endif + +#if !defined(lua_number2integer) +#define lua_number2integer(i,n) ((i)=(lua_Integer)(n)) +#endif + +#if !defined(lua_number2unsigned) /* { */ +/* the following definition assures proper modulo behavior */ +#if defined(LUA_NUMBER_DOUBLE) +#include <math.h> +#define SUPUNSIGNED ((lua_Number)(~(lua_Unsigned)0) + 1) +#define lua_number2unsigned(i,n) \ + ((i)=(lua_Unsigned)((n) - floor((n)/SUPUNSIGNED)*SUPUNSIGNED)) +#else +#define lua_number2unsigned(i,n) ((i)=(lua_Unsigned)(n)) +#endif +#endif /* } */ + + +#if !defined(lua_unsigned2number) +/* on several machines, coercion from unsigned to double is slow, + so it may be worth to avoid */ +#define lua_unsigned2number(u) \ + (((u) <= (lua_Unsigned)INT_MAX) ? (lua_Number)(int)(u) : (lua_Number)(u)) +#endif + + +/* +** luai_hashnum is a macro do hash a lua_Number value into an integer. +** The hash must be deterministic and give reasonable values for +** both small and large values (outside the range of integers). +** It is used only in ltable.c. +*/ + +#if !defined(luai_hashnum) /* { */ + +#include <float.h> +#include <math.h> + +#define luai_hashnum(i,n) { int e; \ + n = frexp(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ + lua_number2int(i, n); i += e; } + +#endif /* } */ + + + +/* +** macro to control inclusion of some hard tests on stack reallocation +*/ +#if !defined(HARDSTACKTESTS) +#define condmovestack(L) ((void)0) +#else +/* realloc stack keeping its size */ +#define condmovestack(L) luaD_reallocstack((L), (L)->stacksize) +#endif + +#if !defined(HARDMEMTESTS) +#define condchangemem(L) condmovestack(L) +#else +#define condchangemem(L) \ + ((void)(gcstopped(G(L)) || (luaC_fullgc(L, 0), 1))) +#endif + +#endif diff --git a/contrib/media/updf/include/lmem.h b/contrib/media/updf/include/lmem.h new file mode 100644 index 0000000000..ff324f89e4 --- /dev/null +++ b/contrib/media/updf/include/lmem.h @@ -0,0 +1,50 @@ +/* +** $Id: lmem.h,v 1.36 2010/04/08 17:16:46 roberto Exp $ +** Interface to Memory Manager +** See Copyright Notice in lua.h +*/ + +#ifndef lmem_h +#define lmem_h + + +#include <stddef.h> + +#include "llimits.h" +#include "lua.h" + + +#define luaM_reallocv(L,b,on,n,e) \ + ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ + luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ + luaM_toobig(L)) + +#define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) +#define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) +#define luaM_freearray(L, b, n) luaM_reallocv(L, (b), n, 0, sizeof((b)[0])) + +#define luaM_malloc(L,s) luaM_realloc_(L, NULL, 0, (s)) +#define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) +#define luaM_newvector(L,n,t) \ + cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) + +#define luaM_newobject(L,tag,s) luaM_realloc_(L, NULL, tag, (s)) + +#define luaM_growvector(L,v,nelems,size,t,limit,e) \ + if ((nelems)+1 > (size)) \ + ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) + +#define luaM_reallocvector(L, v,oldn,n,t) \ + ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) + +LUAI_FUNC void *luaM_toobig (lua_State *L); + +/* not to be called directly */ +LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, + size_t size); +LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, + size_t size_elem, int limit, + const char *what); + +#endif + diff --git a/contrib/media/updf/include/lobject.h b/contrib/media/updf/include/lobject.h new file mode 100644 index 0000000000..5b856f3ce6 --- /dev/null +++ b/contrib/media/updf/include/lobject.h @@ -0,0 +1,419 @@ +/* +** $Id: lobject.h,v 2.42 2010/07/26 15:53:23 roberto Exp $ +** Type definitions for Lua objects +** See Copyright Notice in lua.h +*/ + + +#ifndef lobject_h +#define lobject_h + + +#include <stdarg.h> + + +#include "llimits.h" +#include "lua.h" + + +/* +** Extra tags for non-values +*/ +#define LUA_TPROTO LUA_NUMTAGS +#define LUA_TUPVAL (LUA_NUMTAGS+1) +#define LUA_TDEADKEY (LUA_NUMTAGS+2) + + +/* +** Variant tag for light C functions (negative to be considered +** non collectable by 'iscollectable') +*/ +#define LUA_TLCF (~0x0F | LUA_TFUNCTION) + +/* +** Union of all collectable objects +*/ +typedef union GCObject GCObject; + + +/* +** Common Header for all collectable objects (in macro form, to be +** included in other objects) +*/ +#define CommonHeader GCObject *next; lu_byte tt; lu_byte marked + + +/* +** Common header in struct form +*/ +typedef struct GCheader { + CommonHeader; +} GCheader; + + + +/* +** Union of all Lua values +*/ +typedef union { + GCObject *gc; /* collectable objects */ + void *p; /* light userdata */ + lua_Number n; /* numbers */ + int b; /* booleans */ + lua_CFunction f; /* light C functions */ +} Value; + + + +/* +** Tagged Values. This is the basic representation of values in Lua, +** an actual value plus a tag with its type. +*/ + +#define TValuefields Value value_; int tt_ + +typedef struct lua_TValue { + TValuefields; +} TValue; + + +/* macro defining a nil value */ +#define NILCONSTANT {NULL}, LUA_TNIL + + +/* +** type tag of a TValue +*/ +#define ttype(o) ((o)->tt_) + + +/* +** type tag of a TValue with no variants +*/ +#define ttypenv(o) (ttype(o) & 0x0F) + + +/* Macros to test type */ +#define ttisnil(o) (ttype(o) == LUA_TNIL) +#define ttisnumber(o) (ttype(o) == LUA_TNUMBER) +#define ttisstring(o) (ttype(o) == LUA_TSTRING) +#define ttistable(o) (ttype(o) == LUA_TTABLE) +#define ttisfunction(o) (ttypenv(o) == LUA_TFUNCTION) +#define ttisclosure(o) (ttype(o) == LUA_TFUNCTION) +#define ttislcf(o) (ttype(o) == LUA_TLCF) +#define ttisboolean(o) (ttype(o) == LUA_TBOOLEAN) +#define ttisuserdata(o) (ttype(o) == LUA_TUSERDATA) +#define ttisthread(o) (ttype(o) == LUA_TTHREAD) +#define ttislightuserdata(o) (ttype(o) == LUA_TLIGHTUSERDATA) +#define ttisdeadkey(o) (ttype(o) == LUA_TDEADKEY) + +/* Macros to access values */ +#define gcvalue(o) check_exp(iscollectable(o), (o)->value_.gc) +#define pvalue(o) check_exp(ttislightuserdata(o), (o)->value_.p) +#define nvalue(o) check_exp(ttisnumber(o), (o)->value_.n) +#define rawtsvalue(o) check_exp(ttisstring(o), &(o)->value_.gc->ts) +#define tsvalue(o) (&rawtsvalue(o)->tsv) +#define rawuvalue(o) check_exp(ttisuserdata(o), &(o)->value_.gc->u) +#define uvalue(o) (&rawuvalue(o)->uv) +#define clvalue(o) check_exp(ttisclosure(o), &(o)->value_.gc->cl) +#define fvalue(o) check_exp(ttislcf(o), (o)->value_.f) +#define hvalue(o) check_exp(ttistable(o), &(o)->value_.gc->h) +#define bvalue(o) check_exp(ttisboolean(o), (o)->value_.b) +#define thvalue(o) check_exp(ttisthread(o), &(o)->value_.gc->th) + +#define l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0)) + + +#define iscollectable(o) (ttype(o) >= LUA_TSTRING) + + +/* Macros for internal tests */ +#define righttt(obj) (ttype(obj) == gcvalue(obj)->gch.tt) + +#define checkconsistency(obj) lua_assert(!iscollectable(obj) || righttt(obj)) + +#define checkliveness(g,obj) \ + lua_assert(!iscollectable(obj) || (righttt(obj) && !isdead(g,gcvalue(obj)))) + + +/* Macros to set values */ +#define setnilvalue(obj) ((obj)->tt_=LUA_TNIL) + +#define setnvalue(obj,x) \ + { TValue *i_o=(obj); i_o->value_.n=(x); i_o->tt_=LUA_TNUMBER; } + +#define setfvalue(obj,x) \ + { TValue *i_o=(obj); i_o->value_.f=(x); i_o->tt_=LUA_TLCF; } + +#define changenvalue(o,x) check_exp((o)->tt_==LUA_TNUMBER, (o)->value_.n=(x)) + +#define setpvalue(obj,x) \ + { TValue *i_o=(obj); i_o->value_.p=(x); i_o->tt_=LUA_TLIGHTUSERDATA; } + +#define setbvalue(obj,x) \ + { TValue *i_o=(obj); i_o->value_.b=(x); i_o->tt_=LUA_TBOOLEAN; } + +#define setsvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TSTRING; \ + checkliveness(G(L),i_o); } + +#define setuvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TUSERDATA; \ + checkliveness(G(L),i_o); } + +#define setthvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TTHREAD; \ + checkliveness(G(L),i_o); } + +#define setclvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TFUNCTION; \ + checkliveness(G(L),i_o); } + +#define sethvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TTABLE; \ + checkliveness(G(L),i_o); } + +#define setptvalue(L,obj,x) \ + { TValue *i_o=(obj); \ + i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TPROTO; \ + checkliveness(G(L),i_o); } + +#define setdeadvalue(obj) ((obj)->tt_=LUA_TDEADKEY) + + + +#define setobj(L,obj1,obj2) \ + { const TValue *o2=(obj2); TValue *o1=(obj1); \ + o1->value_ = o2->value_; o1->tt_=o2->tt_; \ + checkliveness(G(L),o1); } + + +/* +** different types of assignments, according to destination +*/ + +/* from stack to (same) stack */ +#define setobjs2s setobj +/* to stack (not from same stack) */ +#define setobj2s setobj +#define setsvalue2s setsvalue +#define sethvalue2s sethvalue +#define setptvalue2s setptvalue +/* from table to same table */ +#define setobjt2t setobj +/* to table */ +#define setobj2t setobj +/* to new object */ +#define setobj2n setobj +#define setsvalue2n setsvalue + + + +typedef TValue *StkId; /* index to stack elements */ + + +/* +** Header for string value; string bytes follow the end of this structure +*/ +typedef union TString { + L_Umaxalign dummy; /* ensures maximum alignment for strings */ + struct { + CommonHeader; + lu_byte reserved; + unsigned int hash; + size_t len; + } tsv; +} TString; + + +/* get the actual string (array of bytes) from a TString */ +#define getstr(ts) cast(const char *, (ts) + 1) + +/* get the actual string (array of bytes) from a Lua value */ +#define svalue(o) getstr(rawtsvalue(o)) + + +/* +** Header for userdata; memory area follows the end of this structure +*/ +typedef union Udata { + L_Umaxalign dummy; /* ensures maximum alignment for `local' udata */ + struct { + CommonHeader; + struct Table *metatable; + struct Table *env; + size_t len; + } uv; +} Udata; + + + +/* +** Description of an upvalue for function prototypes +*/ +typedef struct Upvaldesc { + TString *name; /* upvalue name (for debug information) */ + lu_byte instack; /* whether it is in stack */ + lu_byte idx; /* index of upvalue (in stack or in outer function's list) */ +} Upvaldesc; + + +/* +** Description of a local variable for function prototypes +** (used for debug information) +*/ +typedef struct LocVar { + TString *varname; + int startpc; /* first point where variable is active */ + int endpc; /* first point where variable is dead */ +} LocVar; + + +/* +** Function Prototypes +*/ +typedef struct Proto { + CommonHeader; + TValue *k; /* constants used by the function */ + Instruction *code; + struct Proto **p; /* functions defined inside the function */ + int *lineinfo; /* map from opcodes to source lines */ + LocVar *locvars; /* information about local variables */ + Upvaldesc *upvalues; /* upvalue information */ + union Closure *cache; /* last created closure with this prototype */ + TString *source; + int sizeupvalues; /* size of 'upvalues' */ + int sizek; /* size of `k' */ + int sizecode; + int sizelineinfo; + int sizep; /* size of `p' */ + int sizelocvars; + int linedefined; + int lastlinedefined; + GCObject *gclist; + lu_byte numparams; /* number of fixed parameters */ + lu_byte is_vararg; + lu_byte maxstacksize; /* maximum stack used by this function */ +} Proto; + + + +/* +** Lua Upvalues +*/ +typedef struct UpVal { + CommonHeader; + TValue *v; /* points to stack or to its own value */ + union { + TValue value; /* the value (when closed) */ + struct { /* double linked list (when open) */ + struct UpVal *prev; + struct UpVal *next; + } l; + } u; +} UpVal; + + +/* +** Closures +*/ + +#define ClosureHeader \ + CommonHeader; lu_byte isC; lu_byte nupvalues; GCObject *gclist + +typedef struct CClosure { + ClosureHeader; + lua_CFunction f; + TValue upvalue[1]; /* list of upvalues */ +} CClosure; + + +typedef struct LClosure { + ClosureHeader; + struct Proto *p; + UpVal *upvals[1]; /* list of upvalues */ +} LClosure; + + +typedef union Closure { + CClosure c; + LClosure l; +} Closure; + + +#define isLfunction(o) (ttisclosure(o) && !clvalue(o)->c.isC) + +#define getproto(o) (clvalue(o)->l.p) + + +/* +** Tables +*/ + +typedef union TKey { + struct { + TValuefields; + struct Node *next; /* for chaining */ + } nk; + TValue tvk; +} TKey; + + +typedef struct Node { + TValue i_val; + TKey i_key; +} Node; + + +typedef struct Table { + CommonHeader; + lu_byte flags; /* 1<<p means tagmethod(p) is not present */ + lu_byte lsizenode; /* log2 of size of `node' array */ + struct Table *metatable; + TValue *array; /* array part */ + Node *node; + Node *lastfree; /* any free position is before this position */ + GCObject *gclist; + int sizearray; /* size of `array' array */ +} Table; + + + +/* +** `module' operation for hashing (size is always a power of 2) +*/ +#define lmod(s,size) \ + (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1))))) + + +#define twoto(x) (1<<(x)) +#define sizenode(t) (twoto((t)->lsizenode)) + + +/* +** (address of) a fixed nil value +*/ +#define luaO_nilobject (&luaO_nilobject_) + + +LUAI_DDEC const TValue luaO_nilobject_; + +LUAI_FUNC int luaO_int2fb (unsigned int x); +LUAI_FUNC int luaO_fb2int (int x); +LUAI_FUNC int luaO_ceillog2 (lu_int32 x); +LUAI_FUNC lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2); +LUAI_FUNC int luaO_rawequalObj (const TValue *t1, const TValue *t2); +LUAI_FUNC int luaO_str2d (const char *s, lua_Number *result); +LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt, + va_list argp); +LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...); +LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len); + + +#endif + diff --git a/contrib/media/updf/include/locale b/contrib/media/updf/include/locale new file mode 100644 index 0000000000..56c416d8c5 --- /dev/null +++ b/contrib/media/updf/include/locale @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_LOCALE +#include <bits/std_locale.h> +#endif diff --git a/contrib/media/updf/include/locale.h b/contrib/media/updf/include/locale.h new file mode 100644 index 0000000000..a25fbf85a3 --- /dev/null +++ b/contrib/media/updf/include/locale.h @@ -0,0 +1,59 @@ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_locale_h_ +#define __dj_include_locale_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#define LC_ALL 0x1f +#define LC_COLLATE 0x01 +#define LC_CTYPE 0x02 +#define LC_MONETARY 0x04 +#define LC_NUMERIC 0x08 +#define LC_TIME 0x10 +#define NULL 0 + +struct lconv { + char *currency_symbol; + char *decimal_point; + char *grouping; + char *int_curr_symbol; + char *mon_decimal_point; + char *mon_grouping; + char *mon_thousands_sep; + char *negative_sign; + char *positive_sign; + char *thousands_sep; + char frac_digits; + char int_frac_digits; + char n_cs_precedes; + char n_sep_by_space; + char n_sign_posn; + char p_cs_precedes; + char p_sep_by_space; + char p_sign_posn; +}; + +struct lconv * localeconv(void); +char * setlocale(int _category, const char *_locale); + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_locale_h_ */ diff --git a/contrib/media/updf/include/log.h b/contrib/media/updf/include/log.h new file mode 100644 index 0000000000..9f1bb7ab71 --- /dev/null +++ b/contrib/media/updf/include/log.h @@ -0,0 +1,37 @@ + +#ifndef __log_h__ +#define __log_h__ + +#ifdef YACAS_LOGGING // DEBUG +#include <stdarg.h> +#include <stdio.h> +#endif + +inline void LogPrintf(char* str,...) +{ +#ifdef YACAS_LOGGING // DEBUG + va_list arg; + char buf[256]; + va_start (arg, str); + vsprintf (buf, str, arg); + va_end (arg); + printf(buf); +#endif +} + +inline void LogErrorPrintf(char* str,...) +{ +#ifdef YACAS_LOGGING // DEBUG + printf("ERROR: "); + va_list arg; + char buf[256]; + va_start (arg, str); + vsprintf (buf, str, arg); + va_end (arg); + printf(buf); + exit(0); +#endif +} + + +#endif diff --git a/contrib/media/updf/include/lopcodes.h b/contrib/media/updf/include/lopcodes.h new file mode 100644 index 0000000000..af1dc9cd7f --- /dev/null +++ b/contrib/media/updf/include/lopcodes.h @@ -0,0 +1,289 @@ +/* +** $Id: lopcodes.h,v 1.137 2010/10/25 12:24:55 roberto Exp $ +** Opcodes for Lua virtual machine +** See Copyright Notice in lua.h +*/ + +#ifndef lopcodes_h +#define lopcodes_h + +#include "llimits.h" + + +/*=========================================================================== + We assume that instructions are unsigned numbers. + All instructions have an opcode in the first 6 bits. + Instructions can have the following fields: + `A' : 8 bits + `B' : 9 bits + `C' : 9 bits + 'Ax' : 26 bits ('A', 'B', and 'C' together) + `Bx' : 18 bits (`B' and `C' together) + `sBx' : signed Bx + + A signed argument is represented in excess K; that is, the number + value is the unsigned value minus K. K is exactly the maximum value + for that argument (so that -max is represented by 0, and +max is + represented by 2*max), which is half the maximum for the corresponding + unsigned argument. +===========================================================================*/ + + +enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */ + + +/* +** size and position of opcode arguments. +*/ +#define SIZE_C 9 +#define SIZE_B 9 +#define SIZE_Bx (SIZE_C + SIZE_B) +#define SIZE_A 8 +#define SIZE_Ax (SIZE_C + SIZE_B + SIZE_A) + +#define SIZE_OP 6 + +#define POS_OP 0 +#define POS_A (POS_OP + SIZE_OP) +#define POS_C (POS_A + SIZE_A) +#define POS_B (POS_C + SIZE_C) +#define POS_Bx POS_C +#define POS_Ax POS_A + + +/* +** limits for opcode arguments. +** we use (signed) int to manipulate most arguments, +** so they must fit in LUAI_BITSINT-1 bits (-1 for sign) +*/ +#if SIZE_Bx < LUAI_BITSINT-1 +#define MAXARG_Bx ((1<<SIZE_Bx)-1) +#define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */ +#else +#define MAXARG_Bx MAX_INT +#define MAXARG_sBx MAX_INT +#endif + +#if SIZE_Ax < LUAI_BITSINT-1 +#define MAXARG_Ax ((1<<SIZE_Ax)-1) +#else +#define MAXARG_Ax MAX_INT +#endif + + +#define MAXARG_A ((1<<SIZE_A)-1) +#define MAXARG_B ((1<<SIZE_B)-1) +#define MAXARG_C ((1<<SIZE_C)-1) + + +/* creates a mask with `n' 1 bits at position `p' */ +#define MASK1(n,p) ((~((~(Instruction)0)<<(n)))<<(p)) + +/* creates a mask with `n' 0 bits at position `p' */ +#define MASK0(n,p) (~MASK1(n,p)) + +/* +** the following macros help to manipulate instructions +*/ + +#define GET_OPCODE(i) (cast(OpCode, ((i)>>POS_OP) & MASK1(SIZE_OP,0))) +#define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \ + ((cast(Instruction, o)<<POS_OP)&MASK1(SIZE_OP,POS_OP)))) + +#define getarg(i,pos,size) (cast(int, ((i)>>pos) & MASK1(size,0))) +#define setarg(i,v,pos,size) ((i) = (((i)&MASK0(size,pos)) | \ + ((cast(Instruction, v)<<pos)&MASK1(size,pos)))) + +#define GETARG_A(i) getarg(i, POS_A, SIZE_A) +#define SETARG_A(i,v) setarg(i, v, POS_A, SIZE_A) + +#define GETARG_B(i) getarg(i, POS_B, SIZE_B) +#define SETARG_B(i,v) setarg(i, v, POS_B, SIZE_B) + +#define GETARG_C(i) getarg(i, POS_C, SIZE_C) +#define SETARG_C(i,v) setarg(i, v, POS_C, SIZE_C) + +#define GETARG_Bx(i) getarg(i, POS_Bx, SIZE_Bx) +#define SETARG_Bx(i,v) setarg(i, v, POS_Bx, SIZE_Bx) + +#define GETARG_Ax(i) getarg(i, POS_Ax, SIZE_Ax) +#define SETARG_Ax(i,v) setarg(i, v, POS_Ax, SIZE_Ax) + +#define GETARG_sBx(i) (GETARG_Bx(i)-MAXARG_sBx) +#define SETARG_sBx(i,b) SETARG_Bx((i),cast(unsigned int, (b)+MAXARG_sBx)) + + +#define CREATE_ABC(o,a,b,c) ((cast(Instruction, o)<<POS_OP) \ + | (cast(Instruction, a)<<POS_A) \ + | (cast(Instruction, b)<<POS_B) \ + | (cast(Instruction, c)<<POS_C)) + +#define CREATE_ABx(o,a,bc) ((cast(Instruction, o)<<POS_OP) \ + | (cast(Instruction, a)<<POS_A) \ + | (cast(Instruction, bc)<<POS_Bx)) + +#define CREATE_Ax(o,a) ((cast(Instruction, o)<<POS_OP) \ + | (cast(Instruction, a)<<POS_Ax)) + + +/* +** Macros to operate RK indices +*/ + +/* this bit 1 means constant (0 means register) */ +#define BITRK (1 << (SIZE_B - 1)) + +/* test whether value is a constant */ +#define ISK(x) ((x) & BITRK) + +/* gets the index of the constant */ +#define INDEXK(r) ((int)(r) & ~BITRK) + +#define MAXINDEXRK (BITRK - 1) + +/* code a constant index as a RK value */ +#define RKASK(x) ((x) | BITRK) + + +/* +** invalid register that fits in 8 bits +*/ +#define NO_REG MAXARG_A + + +/* +** R(x) - register +** Kst(x) - constant (in constant table) +** RK(x) == if ISK(x) then Kst(INDEXK(x)) else R(x) +*/ + + +/* +** grep "ORDER OP" if you change these enums +*/ + +typedef enum { +/*---------------------------------------------------------------------- +name args description +------------------------------------------------------------------------*/ +OP_MOVE,/* A B R(A) := R(B) */ +OP_LOADK,/* A Bx R(A) := Kst(Bx - 1) */ +OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */ +OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ +OP_GETUPVAL,/* A B R(A) := UpValue[B] */ + +OP_GETTABUP,/* A B C R(A) := UpValue[B][RK(C)] */ +OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */ + +OP_SETTABUP,/* A B C UpValue[A][RK(B)] := RK(C) */ +OP_SETUPVAL,/* A B UpValue[B] := R(A) */ +OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */ + +OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */ + +OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] */ + +OP_ADD,/* A B C R(A) := RK(B) + RK(C) */ +OP_SUB,/* A B C R(A) := RK(B) - RK(C) */ +OP_MUL,/* A B C R(A) := RK(B) * RK(C) */ +OP_DIV,/* A B C R(A) := RK(B) / RK(C) */ +OP_MOD,/* A B C R(A) := RK(B) % RK(C) */ +OP_POW,/* A B C R(A) := RK(B) ^ RK(C) */ +OP_UNM,/* A B R(A) := -R(B) */ +OP_NOT,/* A B R(A) := not R(B) */ +OP_LEN,/* A B R(A) := length of R(B) */ + +OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */ + +OP_JMP,/* sBx pc+=sBx */ + +OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ +OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ +OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ + +OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ +OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ + +OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ +OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ +OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */ + +OP_FORLOOP,/* A sBx R(A)+=R(A+2); + if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/ +OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ + +OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */ +OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/ + +OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ + +OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ +OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */ + +OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ + +OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ +} OpCode; + + +#define NUM_OPCODES (cast(int, OP_EXTRAARG) + 1) + + + +/*=========================================================================== + Notes: + (*) In OP_CALL, if (B == 0) then B = top. If (C == 0), then `top' is + set to last_result+1, so next open instruction (OP_CALL, OP_RETURN, + OP_SETLIST) may use `top'. + + (*) In OP_VARARG, if (B == 0) then use actual number of varargs and + set top (like in OP_CALL with C == 0). + + (*) In OP_RETURN, if (B == 0) then return up to `top'. + + (*) In OP_SETLIST, if (B == 0) then B = `top'; if (C == 0) then next + 'instruction' is EXTRAARG(real C). + + (*) In OP_LOADK, if (Bx == 0) then next 'instruction' is EXTRAARG(real Bx). + + (*) For comparisons, A specifies what condition the test should accept + (true or false). + + (*) All `skips' (pc++) assume that next instruction is a jump. + +===========================================================================*/ + + +/* +** masks for instruction properties. The format is: +** bits 0-1: op mode +** bits 2-3: C arg mode +** bits 4-5: B arg mode +** bit 6: instruction set register A +** bit 7: operator is a test (next instruction must be a jump) +*/ + +enum OpArgMask { + OpArgN, /* argument is not used */ + OpArgU, /* argument is used */ + OpArgR, /* argument is a register or a jump offset */ + OpArgK /* argument is a constant or register/constant */ +}; + +LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES]; + +#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3)) +#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3)) +#define getCMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 2) & 3)) +#define testAMode(m) (luaP_opmodes[m] & (1 << 6)) +#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) + + +LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ + + +/* number of list items to accumulate before a SETLIST instruction */ +#define LFIELDS_PER_FLUSH 50 + + +#endif diff --git a/contrib/media/updf/include/lparser.h b/contrib/media/updf/include/lparser.h new file mode 100644 index 0000000000..6055a85bf6 --- /dev/null +++ b/contrib/media/updf/include/lparser.h @@ -0,0 +1,97 @@ +/* +** $Id: lparser.h,v 1.65 2010/07/07 16:27:29 roberto Exp $ +** Lua Parser +** See Copyright Notice in lua.h +*/ + +#ifndef lparser_h +#define lparser_h + +#include "llimits.h" +#include "lobject.h" +#include "lzio.h" + + +/* +** Expression descriptor +*/ + +typedef enum { + VVOID, /* no value */ + VNIL, + VTRUE, + VFALSE, + VK, /* info = index of constant in `k' */ + VKNUM, /* nval = numerical value */ + VNONRELOC, /* info = result register */ + VLOCAL, /* info = local register */ + VUPVAL, /* info = index of upvalue in 'upvalues' */ + VINDEXED, /* t = table register/upvalue; idx = index R/K */ + VJMP, /* info = instruction pc */ + VRELOCABLE, /* info = instruction pc */ + VCALL, /* info = instruction pc */ + VVARARG /* info = instruction pc */ +} expkind; + + +#define vkisvar(k) (VLOCAL <= (k) && (k) <= VINDEXED) +#define vkisinreg(k) ((k) == VNONRELOC || (k) == VLOCAL) + +typedef struct expdesc { + expkind k; + union { + struct { /* for indexed variables (VINDEXED) */ + short idx; /* index (R/K) */ + lu_byte t; /* table (register or upvalue) */ + lu_byte vt; /* whether 't' is register (VLOCAL) or upvalue (VUPVAL) */ + } ind; + int info; /* for generic use */ + lua_Number nval; /* for VKNUM */ + } u; + int t; /* patch list of `exit when true' */ + int f; /* patch list of `exit when false' */ +} expdesc; + + +typedef struct vardesc { + unsigned short idx; +} vardesc; + + +/* list of all active local variables */ +typedef struct Varlist { + vardesc *actvar; + int nactvar; + int actvarsize; +} Varlist; + + +struct BlockCnt; /* defined in lparser.c */ + + +/* state needed to generate code for a given function */ +typedef struct FuncState { + Proto *f; /* current function header */ + Table *h; /* table to find (and reuse) elements in `k' */ + struct FuncState *prev; /* enclosing function */ + struct LexState *ls; /* lexical state */ + struct lua_State *L; /* copy of the Lua state */ + struct BlockCnt *bl; /* chain of current blocks */ + int pc; /* next position to code (equivalent to `ncode') */ + int lasttarget; /* `pc' of last `jump target' */ + int jpc; /* list of pending jumps to `pc' */ + int freereg; /* first free register */ + int nk; /* number of elements in `k' */ + int np; /* number of elements in `p' */ + int firstlocal; /* index of first local var of this function */ + short nlocvars; /* number of elements in `locvars' */ + lu_byte nactvar; /* number of active local variables */ + lu_byte nups; /* number of upvalues */ +} FuncState; + + +LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, + Varlist *varl, const char *name); + + +#endif diff --git a/contrib/media/updf/include/lstate.h b/contrib/media/updf/include/lstate.h new file mode 100644 index 0000000000..bc64a4aece --- /dev/null +++ b/contrib/media/updf/include/lstate.h @@ -0,0 +1,218 @@ +/* +** $Id: lstate.h,v 2.68 2010/10/29 17:52:46 roberto Exp $ +** Global State +** See Copyright Notice in lua.h +*/ + +#ifndef lstate_h +#define lstate_h + +#include "lua.h" + +#include "lobject.h" +#include "ltm.h" +#include "lzio.h" + + +/* + +** Some notes about garbage-collected objects: All objects in Lua must +** be kept somehow accessible until being freed. +** +** Lua keeps most objects linked in list g->allgc. The link uses field +** 'next' of the CommonHeader. +** +** Strings are kept in several lists headed by the array g->strt.hash. +** +** Open upvalues are not subject to independent garbage collection. They +** are collected together with their respective threads. Lua keeps a +** double-linked list with all open upvalues (g->uvhead) so that it can +** mark objects referred by them. (They are always gray, so they must +** be remarked in the atomic step. Usually their contents would be marked +** when traversing the respective threads, but the thread may already be +** dead, while the upvalue is still accessible through closures.) +** +** Userdata with finalizers are kept in the list g->udgc. +** +** The list g->tobefnz links all userdata being finalized. + +*/ + + +struct lua_longjmp; /* defined in ldo.c */ + + + +/* extra stack space to handle TM calls and some other extras */ +#define EXTRA_STACK 5 + + +#define BASIC_CI_SIZE 8 + +#define BASIC_STACK_SIZE (2*LUA_MINSTACK) + + +/* kinds of Garbage Collection */ +#define KGC_NORMAL 0 +#define KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ +#define KGC_GEN 2 /* generational collection */ + + +typedef struct stringtable { + GCObject **hash; + lu_int32 nuse; /* number of elements */ + int size; +} stringtable; + + +/* +** information about a call +*/ +typedef struct CallInfo { + StkId func; /* function index in the stack */ + StkId top; /* top for this function */ + struct CallInfo *previous, *next; /* dynamic call link */ + short nresults; /* expected number of results from this function */ + lu_byte callstatus; + union { + struct { /* only for Lua functions */ + StkId base; /* base for this function */ + const Instruction *savedpc; + } l; + struct { /* only for C functions */ + int ctx; /* context info. in case of yields */ + lua_CFunction k; /* continuation in case of yields */ + ptrdiff_t old_errfunc; + ptrdiff_t extra; + lu_byte old_allowhook; + lu_byte status; + } c; + } u; +} CallInfo; + + +/* +** Bits in CallInfo status +*/ +#define CIST_LUA (1<<0) /* call is running a Lua function */ +#define CIST_HOOKED (1<<1) /* call is running a debug hook */ +#define CIST_REENTRY (1<<2) /* call is running on same invocation of + luaV_execute of previous call */ +#define CIST_YIELDED (1<<3) /* call reentered after suspension */ +#define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ +#define CIST_STAT (1<<5) /* call has an error status (pcall) */ +#define CIST_TAIL (1<<6) /* call was tail called */ + + +#define ci_func(ci) (clvalue((ci)->func)) +#define isLua(ci) ((ci)->callstatus & CIST_LUA) + + +/* +** `global state', shared by all threads of this state +*/ +typedef struct global_State { + lua_Alloc frealloc; /* function to reallocate memory */ + void *ud; /* auxiliary data to `frealloc' */ + lu_mem totalbytes; /* number of bytes currently allocated */ + l_mem GCdebt; /* when positive, run a GC step */ + lu_mem lastmajormem; /* memory in use after last major collection */ + stringtable strt; /* hash table for strings */ + TValue l_registry; + unsigned short nCcalls; /* number of nested C calls */ + lu_byte currentwhite; + lu_byte gcstate; /* state of garbage collector */ + lu_byte gckind; /* kind of GC running */ + int sweepstrgc; /* position of sweep in `strt' */ + GCObject *allgc; /* list of all collectable objects */ + GCObject *udgc; /* list of collectable userdata with finalizers */ + GCObject **sweepgc; /* current position of sweep */ + GCObject *gray; /* list of gray objects */ + GCObject *grayagain; /* list of objects to be traversed atomically */ + GCObject *weak; /* list of tables with weak values */ + GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ + GCObject *allweak; /* list of all-weak tables */ + GCObject *tobefnz; /* list of userdata to be GC */ + UpVal uvhead; /* head of double-linked list of all open upvalues */ + Mbuffer buff; /* temporary buffer for string concatenation */ + int gcpause; /* size of pause between successive GCs */ + int gcmajorinc; /* how much to wait for a major GC (only in gen. mode) */ + int gcstepmul; /* GC `granularity' */ + lua_CFunction panic; /* to be called in unprotected errors */ + struct lua_State *mainthread; + const lua_Number *version; /* pointer to version number */ + TString *memerrmsg; /* memory-error message */ + TString *tmname[TM_N]; /* array with tag-method names */ + struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */ +} global_State; + + +/* +** `per thread' state +*/ +struct lua_State { + CommonHeader; + lu_byte status; + StkId top; /* first free slot in the stack */ + global_State *l_G; + CallInfo *ci; /* call info for current function */ + const Instruction *oldpc; /* last pc traced */ + StkId stack_last; /* last free slot in the stack */ + StkId stack; /* stack base */ + int stacksize; + unsigned short nny; /* number of non-yieldable calls in stack */ + lu_byte hookmask; + lu_byte allowhook; + int basehookcount; + int hookcount; + lua_Hook hook; + GCObject *openupval; /* list of open upvalues in this stack */ + GCObject *gclist; + struct lua_longjmp *errorJmp; /* current error recover point */ + ptrdiff_t errfunc; /* current error handling function (stack index) */ + CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ +}; + + +#define G(L) (L->l_G) + + +/* +** Union of all collectable objects +*/ +union GCObject { + GCheader gch; /* common header */ + union TString ts; + union Udata u; + union Closure cl; + struct Table h; + struct Proto p; + struct UpVal uv; + struct lua_State th; /* thread */ +}; + + +#define gch(o) (&(o)->gch) + +/* macros to convert a GCObject into a specific value */ +#define rawgco2ts(o) check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts)) +#define gco2ts(o) (&rawgco2ts(o)->tsv) +#define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) +#define gco2u(o) (&rawgco2u(o)->uv) +#define gco2cl(o) check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl)) +#define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) +#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) +#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) +#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) + +/* macro to convert any Lua object into a GCObject */ +#define obj2gco(v) (cast(GCObject *, (v))) + + +LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); +LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); +LUAI_FUNC void luaE_freeCI (lua_State *L); + + +#endif + diff --git a/contrib/media/updf/include/lstring.h b/contrib/media/updf/include/lstring.h new file mode 100644 index 0000000000..d708a1b099 --- /dev/null +++ b/contrib/media/updf/include/lstring.h @@ -0,0 +1,37 @@ +/* +** $Id: lstring.h,v 1.46 2010/04/05 16:26:37 roberto Exp $ +** String table (keep all strings handled by Lua) +** See Copyright Notice in lua.h +*/ + +#ifndef lstring_h +#define lstring_h + +#include "lgc.h" +#include "lobject.h" +#include "lstate.h" + + +#define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) + +#define sizeudata(u) (sizeof(union Udata)+(u)->len) + +#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ + (sizeof(s)/sizeof(char))-1)) + +#define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) + + +/* +** as all string are internalized, string equality becomes +** pointer equality +*/ +#define eqstr(a,b) ((a) == (b)) + +LUAI_FUNC void luaS_resize (lua_State *L, int newsize); +LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); +LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); +LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); + + +#endif diff --git a/contrib/media/updf/include/ltable.h b/contrib/media/updf/include/ltable.h new file mode 100644 index 0000000000..c14b028323 --- /dev/null +++ b/contrib/media/updf/include/ltable.h @@ -0,0 +1,39 @@ +/* +** $Id: ltable.h,v 2.14 2010/06/25 12:18:10 roberto Exp $ +** Lua tables (hash) +** See Copyright Notice in lua.h +*/ + +#ifndef ltable_h +#define ltable_h + +#include "lobject.h" + + +#define gnode(t,i) (&(t)->node[i]) +#define gkey(n) (&(n)->i_key.tvk) +#define gval(n) (&(n)->i_val) +#define gnext(n) ((n)->i_key.nk.next) + + +LUAI_FUNC const TValue *luaH_getint (Table *t, int key); +LUAI_FUNC TValue *luaH_setint (lua_State *L, Table *t, int key); +LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); +LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); +LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); +LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); +LUAI_FUNC Table *luaH_new (lua_State *L); +LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); +LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); +LUAI_FUNC void luaH_free (lua_State *L, Table *t); +LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); +LUAI_FUNC int luaH_getn (Table *t); + + +#if defined(LUA_DEBUG) +LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); +LUAI_FUNC int luaH_isdummy (Node *n); +#endif + + +#endif diff --git a/contrib/media/updf/include/ltm.h b/contrib/media/updf/include/ltm.h new file mode 100644 index 0000000000..05abc40bd2 --- /dev/null +++ b/contrib/media/updf/include/ltm.h @@ -0,0 +1,57 @@ +/* +** $Id: ltm.h,v 2.10 2010/04/13 20:48:12 roberto Exp $ +** Tag methods +** See Copyright Notice in lua.h +*/ + +#ifndef ltm_h +#define ltm_h + + +#include "lobject.h" + + +/* +* WARNING: if you change the order of this enumeration, +* grep "ORDER TM" +*/ +typedef enum { + TM_INDEX, + TM_NEWINDEX, + TM_GC, + TM_MODE, + TM_LEN, + TM_EQ, /* last tag method with `fast' access */ + TM_ADD, + TM_SUB, + TM_MUL, + TM_DIV, + TM_MOD, + TM_POW, + TM_UNM, + TM_LT, + TM_LE, + TM_CONCAT, + TM_CALL, + TM_N /* number of elements in the enum */ +} TMS; + + + +#define gfasttm(g,et,e) ((et) == NULL ? NULL : \ + ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) + +#define fasttm(l,et,e) gfasttm(G(l), et, e) + +#define ttypename(x) luaT_typenames_[(x) + 1] +#define objtypename(x) ttypename(ttypenv(x)) + +LUAI_DDEC const char *const luaT_typenames_[]; + + +LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); +LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, + TMS event); +LUAI_FUNC void luaT_init (lua_State *L); + +#endif diff --git a/contrib/media/updf/include/lua.h b/contrib/media/updf/include/lua.h new file mode 100644 index 0000000000..0e1f97a41c --- /dev/null +++ b/contrib/media/updf/include/lua.h @@ -0,0 +1,441 @@ +/* +** $Id: lua.h,v 1.276 2010/10/26 19:32:19 roberto Exp $ +** Lua - A Scripting Language +** Lua.org, PUC-Rio, Brazil (http://www.lua.org) +** See Copyright Notice at the end of this file +*/ + + +#ifndef lua_h +#define lua_h + +#include <stdarg.h> +#include <stddef.h> + + +#include "luaconf.h" + + +#define LUA_VERSION_MAJOR "5" +#define LUA_VERSION_MINOR "2" +#define LUA_VERSION_RELEASE "0" " (alpha)" + +#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR +#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE +#define LUA_VERSION_NUM 502 +#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2010 Lua.org, PUC-Rio" +#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" + + +/* mark for precompiled code ('<esc>Lua') */ +#define LUA_SIGNATURE "\033Lua" + +/* option for multiple returns in 'lua_pcall' and 'lua_call' */ +#define LUA_MULTRET (-1) + + +/* +** pseudo-indices +*/ +#define LUA_REGISTRYINDEX LUAI_FIRSTPSEUDOIDX +#define lua_upvalueindex(i) (LUA_REGISTRYINDEX - (i)) + + +/* thread status */ +#define LUA_OK 0 +#define LUA_YIELD 1 +#define LUA_ERRRUN 2 +#define LUA_ERRSYNTAX 3 +#define LUA_ERRMEM 4 +#define LUA_ERRGCMM 5 +#define LUA_ERRERR 6 + + +typedef struct lua_State lua_State; + +typedef int (*lua_CFunction) (lua_State *L); + + +/* +** functions that read/write blocks when loading/dumping Lua chunks +*/ +typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); + +typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); + + +/* +** prototype for memory-allocation functions +*/ +typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); + + +/* +** basic types +*/ +#define LUA_TNONE (-1) + +#define LUA_TNIL 0 +#define LUA_TBOOLEAN 1 +#define LUA_TLIGHTUSERDATA 2 +#define LUA_TNUMBER 3 +#define LUA_TSTRING 4 +#define LUA_TTABLE 5 +#define LUA_TFUNCTION 6 +#define LUA_TUSERDATA 7 +#define LUA_TTHREAD 8 + +#define LUA_NUMTAGS 9 + + + +/* minimum Lua stack available to a C function */ +#define LUA_MINSTACK 20 + + +/* predefined values in the registry */ +#define LUA_RIDX_MAINTHREAD 1 +#define LUA_RIDX_GLOBALS 2 +#define LUA_RIDX_LAST LUA_RIDX_GLOBALS + + +/* type of numbers in Lua */ +typedef LUA_NUMBER lua_Number; + + +/* type for integer functions */ +typedef LUA_INTEGER lua_Integer; + +/* unsigned integer type */ +typedef LUA_UNSIGNED lua_Unsigned; + + + +/* +** generic extra include file +*/ +#if defined(LUA_USER_H) +#include LUA_USER_H +#endif + + + +/* +** state manipulation +*/ +LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); +LUA_API void (lua_close) (lua_State *L); +LUA_API lua_State *(lua_newthread) (lua_State *L); + +LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); + + +LUA_API const lua_Number *(lua_version) (lua_State *L); + + +/* +** basic stack manipulation +*/ +LUA_API int (lua_absindex) (lua_State *L, int idx); +LUA_API int (lua_gettop) (lua_State *L); +LUA_API void (lua_settop) (lua_State *L, int idx); +LUA_API void (lua_pushvalue) (lua_State *L, int idx); +LUA_API void (lua_remove) (lua_State *L, int idx); +LUA_API void (lua_insert) (lua_State *L, int idx); +LUA_API void (lua_replace) (lua_State *L, int idx); +LUA_API void (lua_copy) (lua_State *L, int fromidx, int toidx); +LUA_API int (lua_checkstack) (lua_State *L, int sz); + +LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); + + +/* +** access functions (stack -> C) +*/ + +LUA_API int (lua_isnumber) (lua_State *L, int idx); +LUA_API int (lua_isstring) (lua_State *L, int idx); +LUA_API int (lua_iscfunction) (lua_State *L, int idx); +LUA_API int (lua_isuserdata) (lua_State *L, int idx); +LUA_API int (lua_type) (lua_State *L, int idx); +LUA_API const char *(lua_typename) (lua_State *L, int tp); + +LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); +LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); +LUA_API lua_Unsigned (lua_tounsignedx) (lua_State *L, int idx, int *isnum); +LUA_API int (lua_toboolean) (lua_State *L, int idx); +LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); +LUA_API size_t (lua_rawlen) (lua_State *L, int idx); +LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); +LUA_API void *(lua_touserdata) (lua_State *L, int idx); +LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); +LUA_API const void *(lua_topointer) (lua_State *L, int idx); + + +/* +** Comparison and arithmetic functions +*/ + +#define LUA_OPADD 0 /* ORDER TM */ +#define LUA_OPSUB 1 +#define LUA_OPMUL 2 +#define LUA_OPDIV 3 +#define LUA_OPMOD 4 +#define LUA_OPPOW 5 +#define LUA_OPUNM 6 + +LUA_API void (lua_arith) (lua_State *L, int op); + +#define LUA_OPEQ 0 +#define LUA_OPLT 1 +#define LUA_OPLE 2 + +LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); +LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op); + + +/* +** push functions (C -> stack) +*/ +LUA_API void (lua_pushnil) (lua_State *L); +LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); +LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); +LUA_API void (lua_pushunsigned) (lua_State *L, lua_Unsigned n); +LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l); +LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); +LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, + va_list argp); +LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); +LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); +LUA_API void (lua_pushboolean) (lua_State *L, int b); +LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); +LUA_API int (lua_pushthread) (lua_State *L); + + +/* +** get functions (Lua -> stack) +*/ +LUA_API void (lua_gettable) (lua_State *L, int idx); +LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); +LUA_API void (lua_rawget) (lua_State *L, int idx); +LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); +LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); +LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); +LUA_API int (lua_getmetatable) (lua_State *L, int objindex); +LUA_API void (lua_getuservalue) (lua_State *L, int idx); + + +/* +** set functions (stack -> Lua) +*/ +LUA_API void (lua_settable) (lua_State *L, int idx); +LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); +LUA_API void (lua_rawset) (lua_State *L, int idx); +LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); +LUA_API int (lua_setmetatable) (lua_State *L, int objindex); +LUA_API void (lua_setuservalue) (lua_State *L, int idx); + + +/* +** 'load' and 'call' functions (load and run Lua code) +*/ +LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, int ctx, + lua_CFunction k); +#define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) + +LUA_API int (lua_getctx) (lua_State *L, int *ctx); + +LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, + int ctx, lua_CFunction k); +#define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) + +LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, + const char *chunkname); + +LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); + + +/* +** coroutine functions +*/ +LUA_API int (lua_yieldk) (lua_State *L, int nresults, int ctx, + lua_CFunction k); +#define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) +LUA_API int (lua_resume) (lua_State *L, int narg); +LUA_API int (lua_status) (lua_State *L); + +/* +** garbage-collection function and options +*/ + +#define LUA_GCSTOP 0 +#define LUA_GCRESTART 1 +#define LUA_GCCOLLECT 2 +#define LUA_GCCOUNT 3 +#define LUA_GCCOUNTB 4 +#define LUA_GCSTEP 5 +#define LUA_GCSETPAUSE 6 +#define LUA_GCSETSTEPMUL 7 +#define LUA_GCSETMAJORINC 8 +#define LUA_GCISRUNNING 9 +#define LUA_GCGEN 10 +#define LUA_GCINC 11 + +LUA_API int (lua_gc) (lua_State *L, int what, int data); + + +/* +** miscellaneous functions +*/ + +LUA_API int (lua_error) (lua_State *L); + +LUA_API int (lua_next) (lua_State *L, int idx); + +LUA_API void (lua_concat) (lua_State *L, int n); +LUA_API void (lua_len) (lua_State *L, int idx); + +LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); +LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); + + + +/* +** =============================================================== +** some useful macros +** =============================================================== +*/ + +#define lua_tonumber(L,i) lua_tonumberx(L,i,NULL) +#define lua_tointeger(L,i) lua_tointegerx(L,i,NULL) +#define lua_tounsigned(L,i) lua_tounsignedx(L,i,NULL) + +#define lua_pop(L,n) lua_settop(L, -(n)-1) + +#define lua_newtable(L) lua_createtable(L, 0, 0) + +#define lua_setglobal(L,s) \ + (lua_pushglobaltable(L), lua_pushvalue(L, -2), \ + lua_setfield(L, -2, (s)), lua_pop(L, 2)) + +#define lua_getglobal(L,s) \ + (lua_pushglobaltable(L), lua_getfield(L, -1, (s)), lua_remove(L, -2)) + +#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) + +#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) + +#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) +#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) +#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) +#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) +#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) +#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) +#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) +#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) + +#define lua_pushliteral(L, s) \ + lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) + +#define lua_pushglobaltable(L) \ + lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS) + +#define lua_tostring(L,i) lua_tolstring(L, (i), NULL) + + + +/* +** {====================================================================== +** Debug API +** ======================================================================= +*/ + + +/* +** Event codes +*/ +#define LUA_HOOKCALL 0 +#define LUA_HOOKRET 1 +#define LUA_HOOKLINE 2 +#define LUA_HOOKCOUNT 3 +#define LUA_HOOKTAILCALL 4 + + +/* +** Event masks +*/ +#define LUA_MASKCALL (1 << LUA_HOOKCALL) +#define LUA_MASKRET (1 << LUA_HOOKRET) +#define LUA_MASKLINE (1 << LUA_HOOKLINE) +#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) + +typedef struct lua_Debug lua_Debug; /* activation record */ + + +/* Functions to be called by the debugger in specific events */ +typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); + + +LUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar); +LUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar); +LUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n); +LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n); + +LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n); +LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1, + int fidx2, int n2); + +LUA_API int (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count); +LUA_API lua_Hook (lua_gethook) (lua_State *L); +LUA_API int (lua_gethookmask) (lua_State *L); +LUA_API int (lua_gethookcount) (lua_State *L); + + +struct lua_Debug { + int event; + const char *name; /* (n) */ + const char *namewhat; /* (n) 'global', 'local', 'field', 'method' */ + const char *what; /* (S) 'Lua', 'C', 'main', 'tail' */ + const char *source; /* (S) */ + int currentline; /* (l) */ + int linedefined; /* (S) */ + int lastlinedefined; /* (S) */ + unsigned char nups; /* (u) number of upvalues */ + unsigned char nparams;/* (u) number of parameters */ + char isvararg; /* (u) */ + char istailcall; /* (t) */ + char short_src[LUA_IDSIZE]; /* (S) */ + /* private part */ + struct CallInfo *i_ci; /* active function */ +}; + +/* }====================================================================== */ + + +/****************************************************************************** +* Copyright (C) 1994-2010 Lua.org, PUC-Rio. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject to +* the following conditions: +* +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ + + +#endif diff --git a/contrib/media/updf/include/luaconf.h b/contrib/media/updf/include/luaconf.h new file mode 100644 index 0000000000..1222dc9ce6 --- /dev/null +++ b/contrib/media/updf/include/luaconf.h @@ -0,0 +1,473 @@ +/* +** $Id: luaconf.h,v 1.151 2010/11/12 15:48:30 roberto Exp $ +** Configuration file for Lua +** See Copyright Notice in lua.h +*/ + + +#ifndef lconfig_h +#define lconfig_h + +#include <limits.h> +#include <stddef.h> + + +/* +** ================================================================== +** Search for "@@" to find all configurable definitions. +** =================================================================== +*/ + + +/* +@@ LUA_ANSI controls the use of non-ansi features. +** CHANGE it (define it) if you want Lua to avoid the use of any +** non-ansi feature or library. +*/ +#if !defined(LUA_ANSI) && defined(__STRICT_ANSI__) +#define LUA_ANSI +#endif + + +#if !defined(LUA_ANSI) && defined(_WIN32) +#define LUA_WIN +#endif + +#if defined(LUA_WIN) +#define LUA_DL_DLL +#endif + + + +#if defined(LUA_USE_LINUX) +#define LUA_USE_POSIX +#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +#define LUA_USE_READLINE /* needs some extra libraries */ +#endif + +#if defined(LUA_USE_MACOSX) +#define LUA_USE_POSIX +#define LUA_USE_DLOPEN /* does not need -ldl */ +#define LUA_USE_READLINE /* needs an extra library: -lreadline */ +#endif + + + +/* +@@ LUA_USE_POSIX includes all functionality listed as X/Open System +@* Interfaces Extension (XSI). +** CHANGE it (define it) if your system is XSI compatible. +*/ +#if defined(LUA_USE_POSIX) +#define LUA_USE_MKSTEMP +#define LUA_USE_ISATTY +#define LUA_USE_POPEN +#define LUA_USE_ULONGJMP +#endif + + + +/* +@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for +@* Lua libraries. +@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for +@* C libraries. +** CHANGE them if your machine has a non-conventional directory +** hierarchy or if you want to install your libraries in +** non-conventional directories. +*/ +#if defined(_WIN32) /* { */ +/* +** In Windows, any exclamation mark ('!') in the path is replaced by the +** path of the directory of the executable file of the current process. +*/ +#define LUA_LDIR "!\\lua\\" +#define LUA_CDIR "!\\" +#define LUA_PATH_DEFAULT \ + LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua;" ".\\?.lua" +#define LUA_CPATH_DEFAULT \ + LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" + +#else /* }{ */ + +#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/" +#define LUA_ROOT "/usr/local/" +#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR +#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR +#define LUA_PATH_DEFAULT \ + LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" +#define LUA_CPATH_DEFAULT \ + LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" +#endif /* } */ + + +/* +@@ LUA_DIRSEP is the directory separator (for submodules). +** CHANGE it if your machine does not use "/" as the directory separator +** and is not Windows. (On Windows Lua automatically uses "\".) +*/ +#if defined(_WIN32) +#define LUA_DIRSEP "\\" +#else +#define LUA_DIRSEP "/" +#endif + + +/* +@@ LUA_ENV is the name of the variable that holds the current +@@ environment, used to access global names. +** CHANGE it if you do not like this name. +*/ +#define LUA_ENV "_ENV" + + +/* +@@ LUA_API is a mark for all core API functions. +@@ LUALIB_API is a mark for all auxiliary library functions. +@@ LUAMOD_API is a mark for all standard library opening functions. +** CHANGE them if you need to define those functions in some special way. +** For instance, if you want to create one Windows DLL with the core and +** the libraries, you may want to use the following definition (define +** LUA_BUILD_AS_DLL to get it). +*/ +#if defined(LUA_BUILD_AS_DLL) /* { */ + +#if defined(LUA_CORE) || defined(LUA_LIB) /* { */ +#define LUA_API __declspec(dllexport) +#else /* }{ */ +#define LUA_API __declspec(dllimport) +#endif /* } */ + +#else /* }{ */ + +#define LUA_API extern + +#endif /* } */ + + +/* more often than not the libs go together with the core */ +#define LUALIB_API LUA_API +#define LUAMOD_API LUALIB_API + + +/* +@@ LUAI_FUNC is a mark for all extern functions that are not to be +@* exported to outside modules. +@@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables +@* that are not to be exported to outside modules (LUAI_DDEF for +@* definitions and LUAI_DDEC for declarations). +** CHANGE them if you need to mark them in some special way. Elf/gcc +** (versions 3.2 and later) mark them as "hidden" to optimize access +** when Lua is compiled as a shared library. Not all elf targets support +** this attribute. Unfortunately, gcc does not offer a way to check +** whether the target offers that support, and those without support +** give a warning about it. To avoid these warnings, change to the +** default definition. +*/ +#if defined(luaall_c) /* { */ +#define LUAI_FUNC static +#define LUAI_DDEC static +#define LUAI_DDEF static + +#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ + defined(__ELF__) +#define LUAI_FUNC __attribute__((visibility("hidden"))) extern +#define LUAI_DDEC LUAI_FUNC +#define LUAI_DDEF /* empty */ + +#else /* }{ */ +#define LUAI_FUNC extern +#define LUAI_DDEC extern +#define LUAI_DDEF /* empty */ +#endif /* } */ + + + +/* +@@ LUA_QL describes how error messages quote program elements. +** CHANGE it if you want a different appearance. +*/ +#define LUA_QL(x) "'" x "'" +#define LUA_QS LUA_QL("%s") + + +/* +@@ LUA_IDSIZE gives the maximum size for the description of the source +@* of a function in debug information. +** CHANGE it if you want a different size. +*/ +#define LUA_IDSIZE 60 + + +/* +@@ luai_writestring defines how 'print' prints its results. +*/ +#include <stdio.h> +#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) + +/* +@@ luai_writestringerror defines how to print error messages. +** (A format string with one argument is enough for Lua...) +*/ +#define luai_writestringerror(s,p) \ + (fprintf(stderr, (s), (p)), fflush(stderr)) + + + + + +/* +** {================================================================== +** Compatibility with previous versions +** =================================================================== +*/ + +/* +@@ LUA_COMPAT_ALL controls all compatibility options. +** You can define it to get all options, or change specific options +** to fit your specific needs. +*/ +#if defined(LUA_COMPAT_ALL) /* { */ + +/* +@@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'. +** You can replace it with 'table.unpack'. +*/ +#define LUA_COMPAT_UNPACK + +/* +@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall. +** You can call your C function directly (with light C functions). +*/ +#define lua_cpcall(L,f,u) \ + (lua_pushcfunction(L, (f)), \ + lua_pushlightuserdata(L,(u)), \ + lua_pcall(L,1,0,0)) + + +/* +@@ LUA_COMPAT_LOG10 defines the function 'log10' in the math library. +** You can rewrite 'log10(x)' as 'log(x, 10)'. +*/ +#define LUA_COMPAT_LOG10 + +/* +@@ LUA_COMPAT_MAXN defines the function 'maxn' in the table library. +*/ +#define LUA_COMPAT_MAXN + +/* +@@ The following macros supply trivial compatibility for some +** changes in the API. The macros themselves document how to +** change your code to avoid using them. +*/ +#define lua_strlen(L,i) lua_rawlen(L, (i)) + +#define lua_objlen(L,i) lua_rawlen(L, (i)) + +#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) +#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) + +/* +@@ LUA_COMPAT_MODULE controls compatibility with previous +** module functions 'module' (Lua) and 'luaL_register' (C). +*/ +#define LUA_COMPAT_MODULE + +#endif /* } */ + +/* }================================================================== */ + + + +/* +@@ LUAI_BITSINT defines the number of bits in an int. +** CHANGE here if Lua cannot automatically detect the number of bits of +** your machine. Probably you do not need to change this. +*/ +/* avoid overflows in comparison */ +#if INT_MAX-20 < 32760 /* { */ +#define LUAI_BITSINT 16 +#elif INT_MAX > 2147483640L /* }{ */ +/* int has at least 32 bits */ +#define LUAI_BITSINT 32 +#else /* }{ */ +#error "you must define LUA_BITSINT with number of bits in an integer" +#endif /* } */ + + +/* +@@ LUA_INT32 is an signed integer with exactly 32 bits. +@@ LUAI_UMEM is an unsigned integer big enough to count the total +@* memory used by Lua. +@@ LUAI_MEM is a signed integer big enough to count the total memory +@* used by Lua. +** CHANGE here if for some weird reason the default definitions are not +** good enough for your machine. Probably you do not need to change +** this. +*/ +#if LUAI_BITSINT >= 32 /* { */ +#define LUA_INT32 int +#define LUAI_UMEM size_t +#define LUAI_MEM ptrdiff_t +#else /* }{ */ +/* 16-bit ints */ +#define LUA_INT32 long +#define LUAI_UMEM unsigned long +#define LUAI_MEM long +#endif /* } */ + + +/* +@@ LUAI_MAXSTACK limits the size of the Lua stack. +** CHANGE it if you need a different limit. This limit is arbitrary; +** its only purpose is to stop Lua to consume unlimited stack +** space (and to reserve some numbers for pseudo-indices). +*/ +#if LUAI_BITSINT >= 32 +#define LUAI_MAXSTACK 1000000 +#else +#define LUAI_MAXSTACK 15000 +#endif + +/* reserve some space for error handling */ +#define LUAI_FIRSTPSEUDOIDX (-LUAI_MAXSTACK - 1000) + + + + +/* +@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. +** CHANGE it if it uses too much C-stack space. +*/ +#define LUAL_BUFFERSIZE BUFSIZ + + + + +/* +** {================================================================== +@@ LUA_NUMBER is the type of numbers in Lua. +** CHANGE the following definitions only if you want to build Lua +** with a number type different from double. You may also need to +** change lua_number2int & lua_number2integer. +** =================================================================== +*/ + +#define LUA_NUMBER_DOUBLE +#define LUA_NUMBER double + +/* +@@ LUAI_UACNUMBER is the result of an 'usual argument conversion' +@* over a number. +*/ +#define LUAI_UACNUMBER double + + +/* +@@ LUA_NUMBER_SCAN is the format for reading numbers. +@@ LUA_NUMBER_FMT is the format for writing numbers. +@@ lua_number2str converts a number to a string. +@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion. +@@ lua_str2number converts a string to a number. +*/ +#define LUA_NUMBER_SCAN "%lf" +#define LUA_NUMBER_FMT "%.14g" +#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) +#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ +#define lua_str2number(s,p) strtod((s), (p)) + + +/* +@@ The luai_num* macros define the primitive operations over numbers. +*/ + +/* the following operations need the math library */ +#if defined(lobject_c) || defined(lvm_c) || defined(luaall_c) +#include <math.h> +#define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) +#define luai_numpow(L,a,b) (pow(a,b)) +#endif + +/* these are quite standard operations */ +#if defined(LUA_CORE) +#define luai_numadd(L,a,b) ((a)+(b)) +#define luai_numsub(L,a,b) ((a)-(b)) +#define luai_nummul(L,a,b) ((a)*(b)) +#define luai_numdiv(L,a,b) ((a)/(b)) +#define luai_numunm(L,a) (-(a)) +#define luai_numeq(a,b) ((a)==(b)) +#define luai_numlt(L,a,b) ((a)<(b)) +#define luai_numle(L,a,b) ((a)<=(b)) +#define luai_numisnan(L,a) (!luai_numeq((a), (a))) +#endif + + + +/* +@@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger. +** CHANGE that if ptrdiff_t is not adequate on your machine. (On most +** machines, ptrdiff_t gives a good choice between int or long.) +*/ +#define LUA_INTEGER ptrdiff_t + +/* +@@ LUA_UNSIGNED is the integral type used by lua_pushunsigned/lua_tounsigned. +** It must have at least 32 bits. +*/ +#define LUA_UNSIGNED unsigned LUA_INT32 + + +#if defined(LUA_CORE) /* { */ + +#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */ + +/* On a Microsoft compiler on a Pentium, use assembler to avoid clashes + with a DirectX idiosyncrasy */ +#if defined(_MSC_VER) && defined(M_IX86) /* { */ + +#define MS_ASMTRICK + +#else /* }{ */ +/* the next definition uses a trick that should work on any machine + using IEEE754 with a 32-bit integer type */ + +#define LUA_IEEE754TRICK + +/* +@@ LUA_IEEEENDIAN is the endianness of doubles in your machine +@@ (0 for little endian, 1 for big endian); if not defined, Lua will +@@ check it dynamically. +*/ +/* check for known architectures */ +#if defined(__i386__) || defined(__i386) || defined(i386) || \ + defined (__x86_64) +#define LUA_IEEEENDIAN 0 +#elif defined(__POWERPC__) || defined(__ppc__) +#define LUA_IEEEENDIAN 1 +#endif + +#endif /* } */ + +#endif /* } */ + +#endif /* } */ + +/* }================================================================== */ + + + + +/* =================================================================== */ + +/* +** Local configuration. You can use this space to add your redefinitions +** without modifying the main part of the file. +*/ + + + +#endif + diff --git a/contrib/media/updf/include/lualib.h b/contrib/media/updf/include/lualib.h new file mode 100644 index 0000000000..233a331e64 --- /dev/null +++ b/contrib/media/updf/include/lualib.h @@ -0,0 +1,58 @@ +/* +** $Id: lualib.h,v 1.41 2010/10/25 14:32:36 roberto Exp $ +** Lua standard libraries +** See Copyright Notice in lua.h +*/ + + +#ifndef lualib_h +#define lualib_h + +#include "lua.h" + + +/* Key to file-handle type */ +#define LUA_FILEHANDLE "FILE*" + + +LUAMOD_API int (luaopen_base) (lua_State *L); + +#define LUA_COLIBNAME "coroutine" +LUAMOD_API int (luaopen_coroutine) (lua_State *L); + +#define LUA_TABLIBNAME "table" +LUAMOD_API int (luaopen_table) (lua_State *L); + +#define LUA_IOLIBNAME "io" +LUAMOD_API int (luaopen_io) (lua_State *L); + +#define LUA_OSLIBNAME "os" +LUAMOD_API int (luaopen_os) (lua_State *L); + +#define LUA_STRLIBNAME "string" +LUAMOD_API int (luaopen_string) (lua_State *L); + +#define LUA_BITLIBNAME "bit32" +LUAMOD_API int (luaopen_bit32) (lua_State *L); + +#define LUA_MATHLIBNAME "math" +LUAMOD_API int (luaopen_math) (lua_State *L); + +#define LUA_DBLIBNAME "debug" +LUAMOD_API int (luaopen_debug) (lua_State *L); + +#define LUA_LOADLIBNAME "package" +LUAMOD_API int (luaopen_package) (lua_State *L); + + +/* open all previous libraries */ +LUALIB_API void (luaL_openlibs) (lua_State *L); + + + +#ifndef lua_assert +#define lua_assert(x) ((void)0) +#endif + + +#endif diff --git a/contrib/media/updf/include/lundump.h b/contrib/media/updf/include/lundump.h new file mode 100644 index 0000000000..e55918cf52 --- /dev/null +++ b/contrib/media/updf/include/lundump.h @@ -0,0 +1,25 @@ +/* +** $Id: lundump.h,v 1.43 2010/10/26 00:23:46 lhf Exp $ +** load precompiled Lua chunks +** See Copyright Notice in lua.h +*/ + +#ifndef lundump_h +#define lundump_h + +#include "lobject.h" +#include "lzio.h" + +/* load one chunk; from lundump.c */ +LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); + +/* make header; from lundump.c */ +LUAI_FUNC void luaU_header (char* h); + +/* dump one chunk; from ldump.c */ +LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); + +/* size of header of binary files */ +#define LUAC_HEADERSIZE 18 + +#endif diff --git a/contrib/media/updf/include/lvm.h b/contrib/media/updf/include/lvm.h new file mode 100644 index 0000000000..8e91da5925 --- /dev/null +++ b/contrib/media/updf/include/lvm.h @@ -0,0 +1,42 @@ +/* +** $Id: lvm.h,v 2.14 2009/12/17 16:20:01 roberto Exp $ +** Lua virtual machine +** See Copyright Notice in lua.h +*/ + +#ifndef lvm_h +#define lvm_h + + +#include "ldo.h" +#include "lobject.h" +#include "ltm.h" + + +#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o))) + +#define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL)) + +#define equalobj(L,o1,o2) \ + (ttype(o1) == ttype(o2) && luaV_equalval_(L, o1, o2)) + + +/* not to called directly */ +LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2); + +LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); +LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); +LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); +LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); +LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_finishOp (lua_State *L); +LUAI_FUNC void luaV_execute (lua_State *L); +LUAI_FUNC void luaV_concat (lua_State *L, int total); +LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb, + const TValue *rc, TMS op); +LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); + +#endif diff --git a/contrib/media/updf/include/lzio.h b/contrib/media/updf/include/lzio.h new file mode 100644 index 0000000000..53eb91efe3 --- /dev/null +++ b/contrib/media/updf/include/lzio.h @@ -0,0 +1,70 @@ +/* +** $Id: lzio.h,v 1.22 2009/05/18 17:26:25 roberto Exp $ +** Buffered streams +** See Copyright Notice in lua.h +*/ + + +#ifndef lzio_h +#define lzio_h + +#include "lua.h" + +#include "lmem.h" + + +#define EOZ (-1) /* end of stream */ + +typedef struct Zio ZIO; + +#define char2int(c) cast(int, cast(unsigned char, (c))) + +#define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) + +#define zungetc(z) ((z)->n++, (z)->p--) + + +typedef struct Mbuffer { + char *buffer; + size_t n; + size_t buffsize; +} Mbuffer; + +#define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) + +#define luaZ_buffer(buff) ((buff)->buffer) +#define luaZ_sizebuffer(buff) ((buff)->buffsize) +#define luaZ_bufflen(buff) ((buff)->n) + +#define luaZ_resetbuffer(buff) ((buff)->n = 0) + + +#define luaZ_resizebuffer(L, buff, size) \ + (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ + (buff)->buffsize = size) + +#define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) + + +LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); +LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, + void *data); +LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ +LUAI_FUNC int luaZ_lookahead (ZIO *z); + + + +/* --------- Private Part ------------------ */ + +struct Zio { + size_t n; /* bytes still unread */ + const char *p; /* current position in buffer */ + lua_Reader reader; + void* data; /* additional data */ + lua_State *L; /* Lua state (for reader) */ +}; + + +LUAI_FUNC int luaZ_fill (ZIO *z); + +#endif diff --git a/contrib/media/updf/include/lzoconf.h b/contrib/media/updf/include/lzoconf.h new file mode 100644 index 0000000000..6120f6272a --- /dev/null +++ b/contrib/media/updf/include/lzoconf.h @@ -0,0 +1,386 @@ +/* lzoconf.h -- configuration for the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + + The LZO library 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. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Markus F.X.J. Oberhumer + <markus.oberhumer@jk.uni-linz.ac.at> + http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html + */ + + +#ifndef __LZOCONF_H +#define __LZOCONF_H + +#define LZO_VERSION 0x1070 +#define LZO_VERSION_STRING "1.07" +#define LZO_VERSION_DATE "Oct 18 2000" + +/* internal Autoconf configuration file - only used when building LZO */ +#if defined(LZO_HAVE_CONFIG_H) +# include <config.h> +#endif +#include <limits.h> + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// LZO requires a conforming <limits.h> +************************************************************************/ + +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# error "invalid CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +# error "check your compiler installation" +#endif +#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) +# error "your limits.h macros are broken" +#endif + +/* workaround a cpp bug under hpux 10.20 */ +#define LZO_0xffffffffL 4294967295ul + + +/*********************************************************************** +// architecture defines +************************************************************************/ + +#if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2) +# if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# define __LZO_WIN +# elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) +# define __LZO_WIN +# elif defined(__NT__) || defined(__NT_DLL__) || defined(__WINDOWS_386__) +# define __LZO_WIN +# elif defined(__DOS__) || defined(__MSDOS__) || defined(MSDOS) +# define __LZO_DOS +# elif defined(__OS2__) || defined(__OS2V2__) || defined(OS2) +# define __LZO_OS2 +# elif defined(__palmos__) +# define __LZO_PALMOS +# elif defined(__TOS__) || defined(__atarist__) +# define __LZO_TOS +# endif +#endif + +#if (UINT_MAX < LZO_0xffffffffL) +# if defined(__LZO_WIN) +# define __LZO_WIN16 +# elif defined(__LZO_DOS) +# define __LZO_DOS16 +# elif defined(__LZO_PALMOS) +# define __LZO_PALMOS16 +# elif defined(__LZO_TOS) +# define __LZO_TOS16 +# elif defined(__C166__) +# else +# error "16-bit target not supported - contact me for porting hints" +# endif +#endif + +#if !defined(__LZO_i386) +# if defined(__LZO_DOS) || defined(__LZO_WIN16) +# define __LZO_i386 +# elif defined(__i386__) || defined(__386__) || defined(_M_IX86) +# define __LZO_i386 +# endif +#endif + +#if defined(__LZO_STRICT_16BIT) +# if (UINT_MAX < LZO_0xffffffffL) +# include <lzo16bit.h> +# endif +#endif + +/* memory checkers */ +#if !defined(__LZO_CHECKER) +# if defined(__BOUNDS_CHECKING_ON) +# define __LZO_CHECKER +# elif defined(__CHECKER__) +# define __LZO_CHECKER +# elif defined(__INSURE__) +# define __LZO_CHECKER +# elif defined(__PURIFY__) +# define __LZO_CHECKER +# endif +#endif + + +/*********************************************************************** +// integral and pointer types +************************************************************************/ + +/* Integral types with 32 bits or more */ +#if !defined(LZO_UINT32_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint32; + typedef int lzo_int32; +# define LZO_UINT32_MAX UINT_MAX +# define LZO_INT32_MAX INT_MAX +# define LZO_INT32_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint32; + typedef long lzo_int32; +# define LZO_UINT32_MAX ULONG_MAX +# define LZO_INT32_MAX LONG_MAX +# define LZO_INT32_MIN LONG_MIN +# else +# error "lzo_uint32" +# endif +#endif + +/* lzo_uint is used like size_t */ +#if !defined(LZO_UINT_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint; + typedef int lzo_int; +# define LZO_UINT_MAX UINT_MAX +# define LZO_INT_MAX INT_MAX +# define LZO_INT_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint; + typedef long lzo_int; +# define LZO_UINT_MAX ULONG_MAX +# define LZO_INT_MAX LONG_MAX +# define LZO_INT_MIN LONG_MIN +# else +# error "lzo_uint" +# endif +#endif + + +/* Memory model that allows to access memory at offsets of lzo_uint. */ +#if !defined(__LZO_MMODEL) +# if (LZO_UINT_MAX <= UINT_MAX) +# define __LZO_MMODEL +# elif defined(__LZO_DOS16) || defined(__LZO_WIN16) +# define __LZO_MMODEL __huge +# define LZO_999_UNSUPPORTED +# elif defined(__LZO_PALMOS16) || defined(__LZO_TOS16) +# define __LZO_MMODEL +# else +# error "__LZO_MMODEL" +# endif +#endif + +/* no typedef here because of const-pointer issues */ +#define lzo_byte unsigned char __LZO_MMODEL +#define lzo_bytep unsigned char __LZO_MMODEL * +#define lzo_charp char __LZO_MMODEL * +#define lzo_voidp void __LZO_MMODEL * +#define lzo_shortp short __LZO_MMODEL * +#define lzo_ushortp unsigned short __LZO_MMODEL * +#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +#define lzo_int32p lzo_int32 __LZO_MMODEL * +#define lzo_uintp lzo_uint __LZO_MMODEL * +#define lzo_intp lzo_int __LZO_MMODEL * +#define lzo_voidpp lzo_voidp __LZO_MMODEL * +#define lzo_bytepp lzo_bytep __LZO_MMODEL * + +typedef int lzo_bool; + +#ifndef lzo_sizeof_dict_t +# define lzo_sizeof_dict_t sizeof(lzo_bytep) +#endif + + +/*********************************************************************** +// function types +************************************************************************/ + +/* linkage */ +#if !defined(__LZO_EXTERN_C) +# ifdef __cplusplus +# define __LZO_EXTERN_C extern "C" +# else +# define __LZO_EXTERN_C extern +# endif +#endif + +/* calling conventions */ +#if !defined(__LZO_CDECL) +# if defined(__LZO_DOS16) || defined(__LZO_WIN16) +# define __LZO_CDECL __far __cdecl +# elif defined(__LZO_i386) && defined(_MSC_VER) +# define __LZO_CDECL __cdecl +# elif defined(__LZO_i386) && defined(__WATCOMC__) +# define __LZO_CDECL __near __cdecl +# else +# define __LZO_CDECL +# endif +#endif +#if !defined(__LZO_ENTRY) +# define __LZO_ENTRY __LZO_CDECL +#endif + +/* DLL export information */ +#if !defined(__LZO_EXPORT1) +# define __LZO_EXPORT1 +#endif +#if !defined(__LZO_EXPORT2) +# define __LZO_EXPORT2 +#endif + +/* calling convention for C functions */ +#if !defined(LZO_PUBLIC) +# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_ENTRY +#endif +#if !defined(LZO_EXTERN) +# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +#endif +#if !defined(LZO_PRIVATE) +# define LZO_PRIVATE(_rettype) static _rettype __LZO_ENTRY +#endif + +/* cdecl calling convention for assembler functions */ +#if !defined(LZO_PUBLIC_CDECL) +# define LZO_PUBLIC_CDECL(_rettype) \ + __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +#endif +#if !defined(LZO_EXTERN_CDECL) +# define LZO_EXTERN_CDECL(_rettype) __LZO_EXTERN_C LZO_PUBLIC_CDECL(_rettype) +#endif + + +typedef int +(__LZO_ENTRY *lzo_compress_t) ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_ENTRY *lzo_decompress_t) ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_ENTRY *lzo_optimize_t) ( lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_ENTRY *lzo_compress_dict_t)(const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem, + const lzo_byte *dict, lzo_uint dict_len ); + +typedef int +(__LZO_ENTRY *lzo_decompress_dict_t)(const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem, + const lzo_byte *dict, lzo_uint dict_len ); + + +/* a progress indicator callback function */ +typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint); + + +/*********************************************************************** +// error codes and prototypes +************************************************************************/ + +/* Error codes for the compression/decompression functions. Negative + * values are errors, positive values will be used for special but + * normal events. + */ +#define LZO_E_OK 0 +#define LZO_E_ERROR (-1) +#define LZO_E_OUT_OF_MEMORY (-2) /* not used right now */ +#define LZO_E_NOT_COMPRESSIBLE (-3) /* not used right now */ +#define LZO_E_INPUT_OVERRUN (-4) +#define LZO_E_OUTPUT_OVERRUN (-5) +#define LZO_E_LOOKBEHIND_OVERRUN (-6) +#define LZO_E_EOF_NOT_FOUND (-7) +#define LZO_E_INPUT_NOT_CONSUMED (-8) + + +/* lzo_init() should be the first function you call. + * Check the return code ! + * + * lzo_init() is a macro to allow checking that the library and the + * compiler's view of various types are consistent. + */ +#define lzo_init() __lzo_init2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ + (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ + (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ + (int)sizeof(lzo_compress_t)) +LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int); + +/* version functions (useful for shared libraries) */ +LZO_EXTERN(unsigned) lzo_version(void); +LZO_EXTERN(const char *) lzo_version_string(void); +LZO_EXTERN(const char *) lzo_version_date(void); +LZO_EXTERN(const lzo_charp) _lzo_version_string(void); +LZO_EXTERN(const lzo_charp) _lzo_version_date(void); + +/* string functions */ +LZO_EXTERN(int) +lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); + +/* checksum functions */ +LZO_EXTERN(lzo_uint32) +lzo_adler32(lzo_uint32 _adler, const lzo_byte *_buf, lzo_uint _len); +LZO_EXTERN(lzo_uint32) +lzo_crc32(lzo_uint32 _c, const lzo_byte *_buf, lzo_uint _len); + +/* memory allocation functions */ +LZO_EXTERN(lzo_bytep) lzo_alloc(lzo_uint _nelems, lzo_uint _size); +LZO_EXTERN(lzo_bytep) lzo_malloc(lzo_uint _size); +LZO_EXTERN(void) lzo_free(lzo_voidp _ptr); + +typedef lzo_bytep (__LZO_ENTRY *lzo_alloc_hook_t) (lzo_uint, lzo_uint); +typedef void (__LZO_ENTRY *lzo_free_hook_t) (lzo_voidp); + +extern lzo_alloc_hook_t lzo_alloc_hook; +extern lzo_free_hook_t lzo_free_hook; + +/* misc. */ +LZO_EXTERN(lzo_bool) lzo_assert(int _expr); +LZO_EXTERN(int) _lzo_config_check(void); +typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; + +/* align a char pointer on a boundary that is a multiple of `size' */ +LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); +#define LZO_PTR_ALIGN_UP(_ptr,_size) \ + ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) + +/* deprecated - only for backward compatibility */ +#define LZO_ALIGN(_ptr,_size) LZO_PTR_ALIGN_UP(_ptr,_size) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + diff --git a/contrib/media/updf/include/machine/asm.h b/contrib/media/updf/include/machine/asm.h new file mode 100644 index 0000000000..fd196bfac2 --- /dev/null +++ b/contrib/media/updf/include/machine/asm.h @@ -0,0 +1,66 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * from: @(#)asm.h 5.5 (Berkeley) 5/7/91 + */ + +#ifndef _MACHINE_ASM_H_ +#define _MACHINE_ASM_H_ + +#ifdef __STDC__ +# define _C_LABEL(x) _ ## x +#else +# define _C_LABEL(x) _/**/x +#endif +#define _ASM_LABEL(x) x + +#define _ENTRY(x) \ + .text; .align 2; .globl x; x: + +#ifdef PROF +# define _PROF_PROLOGUE /* XXX */ +#else +# define _PROF_PROLOGUE +#endif + +#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE +#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE + +#define ASMSTR .asciz + +#define RCSID(x) .text; .asciz x + +#endif /* !_MACHINE_ASM_H_ */ diff --git a/contrib/media/updf/include/machine/endian.h b/contrib/media/updf/include/machine/endian.h new file mode 100644 index 0000000000..8d58dcc20a --- /dev/null +++ b/contrib/media/updf/include/machine/endian.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* + * Copyright (c) 1987, 1991 Regents of the University of California. + * All rights reserved. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * from: @(#)endian.h 7.8 (Berkeley) 4/3/91 + */ + +#ifndef _MACHINE_ENDIAN_H_ +#define _MACHINE_ENDIAN_H_ + +/* + * Definitions for byte order, according to byte significance from low + * address to high. + */ +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ + +#define BYTE_ORDER LITTLE_ENDIAN + +#include <sys/cdefs.h> + +__BEGIN_DECLS +unsigned long htonl __P((unsigned long)); +unsigned short htons __P((unsigned short)); +unsigned long ntohl __P((unsigned long)); +unsigned short ntohs __P((unsigned short)); +__END_DECLS + +/* + * Macros for network/external number representation conversion. + */ +#define NTOHL(x) (x) = ntohl((unsigned long)(x)) +#define NTOHS(x) (x) = ntohs((unsigned short)(x)) +#define HTONL(x) (x) = htonl((unsigned long)(x)) +#define HTONS(x) (x) = htons((unsigned short)(x)) + +#endif /* _MACHINE_ENDIAN_H_ */ diff --git a/contrib/media/updf/include/malloc.h b/contrib/media/updf/include/malloc.h new file mode 100644 index 0000000000..9d1d5cac6a --- /dev/null +++ b/contrib/media/updf/include/malloc.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_malloc_h_ +#define __dj_include_malloc_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdlib.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_malloc_h_ */ diff --git a/contrib/media/updf/include/map b/contrib/media/updf/include/map new file mode 100644 index 0000000000..06c638d544 --- /dev/null +++ b/contrib/media/updf/include/map @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_MAP +#include <bits/std_map.h> +#endif diff --git a/contrib/media/updf/include/math.h b/contrib/media/updf/include/math.h new file mode 100644 index 0000000000..7fe40ef33e --- /dev/null +++ b/contrib/media/updf/include/math.h @@ -0,0 +1,191 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_math_h_ +#define __dj_include_math_h_ + +#ifdef _USE_LIBM_MATH_H +#include <libm/math.h> +#else + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +extern double __dj_huge_val; +#define HUGE_VAL __dj_huge_val + +double acos(double _x); +double asin(double _x); +double atan(double _x); +double atan2(double _y, double _x); +double ceil(double _x); +double cos(double _x); +double cosh(double _x); +double exp(double _x); +double fabs(double _x); +double floor(double _x); +double fmod(double _x, double _y); +double frexp(double _x, int *_pexp); +double ldexp(double _x, int _exp); +double log(double _y); +double log10(double _x); +double modf(double _x, double *_pint); +double pow(double _x, double _y); +double sin(double _x); +double sinh(double _x); +double sqrt(double _x); +double tan(double _x); +double tanh(double _x); + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define M_E 2.7182818284590452354 +#define M_LOG2E 1.4426950408889634074 +#define M_LOG10E 0.43429448190325182765 +#define M_LN2 0.69314718055994530942 +#define M_LN10 2.30258509299404568402 +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.78539816339744830962 +#define M_1_PI 0.31830988618379067154 +#define M_2_PI 0.63661977236758134308 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT1_2 0.70710678118654752440 +#define PI M_PI +#define PI2 M_PI_2 + +double acosh(double); +double asinh(double); +double atanh(double); +double cbrt(double); +double exp10(double _x); +double exp2(double _x); +double expm1(double); +double hypot(double, double); +double log1p(double); +double log2(double _x); +long double modfl(long double _x, long double *_pint); +double pow10(double _x); +double pow2(double _x); +double powi(double, int); +void sincos(double *, double *, double); + +/* These are in libm.a (Cygnus). You must link -lm to get these */ +/* See libm/math.h for comments */ + +#ifndef __cplusplus +struct exception { + int type; + const char *name; + double arg1; + double arg2; + double retval; + int err; +}; +#endif + +extern double erf(double); +extern double erfc(double); +extern double gamma(double); +extern int isinf(double); +extern int isnan(double); +extern int finite(double); +extern double j0(double); +extern double j1(double); +extern double jn(int, double); +extern double lgamma(double); +extern double nan(void); +extern double y0(double); +extern double y1(double); +extern double yn(int, double); +extern double logb(double); +extern double nextafter(double, double); +extern double remainder(double, double); +extern double scalb(double, double); +#ifndef __cplusplus +extern int matherr(struct exception *); +#endif +extern double significand(double); +extern double copysign(double, double); +extern int ilogb(double); +extern double rint(double); +extern double scalbn(double, int); +extern double drem(double, double); +extern double gamma_r(double, int *); +extern double lgamma_r(double, int *); +extern float acosf(float); +extern float asinf(float); +extern float atanf(float); +extern float atan2f(float, float); +extern float cosf(float); +extern float sinf(float); +extern float tanf(float); +extern float coshf(float); +extern float sinhf(float); +extern float tanhf(float); +extern float expf(float); +extern float frexpf(float, int *); +extern float ldexpf(float, int); +extern float logf(float); +extern float log10f(float); +extern float modff(float, float *); +extern float powf(float, float); +extern float sqrtf(float); +extern float ceilf(float); +extern float fabsf(float); +extern float floorf(float); +extern float fmodf(float, float); +extern float erff(float); +extern float erfcf(float); +extern float gammaf(float); +extern float hypotf(float, float); +extern int isinff(float); +extern int isnanf(float); +extern int finitef(float); +extern float j0f(float); +extern float j1f(float); +extern float jnf(int, float); +extern float lgammaf(float); +extern float nanf(void); +extern float y0f(float); +extern float y1f(float); +extern float ynf(int, float); +extern float acoshf(float); +extern float asinhf(float); +extern float atanhf(float); +extern float cbrtf(float); +extern float logbf(float); +extern float nextafterf(float, float); +extern float remainderf(float, float); +extern float scalbf(float, float); +extern float significandf(float); +extern float copysignf(float, float); +extern int ilogbf(float); +extern float rintf(float); +extern float scalbnf(float, int); +extern float dremf(float, float); +extern float expm1f(float); +extern float log1pf(float); +extern float gammaf_r(float, int *); +extern float lgammaf_r(float, int *); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* _USE_LIBM_MATH_H */ + +#endif /* !__dj_include_math_h_ */ diff --git a/contrib/media/updf/include/mathcommands.h b/contrib/media/updf/include/mathcommands.h new file mode 100644 index 0000000000..f694d0ab28 --- /dev/null +++ b/contrib/media/updf/include/mathcommands.h @@ -0,0 +1,23 @@ + +#ifndef __mathcommands_h__ +#define __mathcommands_h__ + +#include "yacasbase.h" +#include "lispenvironment.h" +#include "lispevalhash.h" +#include "lispobject.h" +#include "lispglobals.h" + + +//#define CORE_FUNCTION(NAME) void NAME(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aArguments); + +#define CORE_KERNEL_FUNCTION(iname,fname,nrargs,flags) void fname(LispEnvironment& aEnvironment, LispInt aStackTop); +#define CORE_KERNEL_FUNCTION_ALIAS(iname,fname,nrargs,flags) int JimDummyFunction(); +#define OPERATOR(kind, prec, yacas_name) int JimDummyFunction(); + +#include "corefunctions.h" +#undef CORE_KERNEL_FUNCTION +#undef CORE_KERNEL_FUNCTION_ALIAS +#undef OPERATOR + +#endif diff --git a/contrib/media/updf/include/mathenvironment.h b/contrib/media/updf/include/mathenvironment.h new file mode 100644 index 0000000000..566dae95ac --- /dev/null +++ b/contrib/media/updf/include/mathenvironment.h @@ -0,0 +1,17 @@ +/** \file mathenvironment.h + * math language specific version of environment. Currently experimental. + * + */ + +#ifndef __mathenvironment_h__ +#define __mathenvironment_h__ + +#include "yacasbase.h" +#include "lispenvironment.h" +#include "lispevalhash.h" +#include "lispobject.h" +#include "lispatom.h" +#include "lispglobals.h" + +#endif + diff --git a/contrib/media/updf/include/mathuserfunc.h b/contrib/media/updf/include/mathuserfunc.h new file mode 100644 index 0000000000..acaa1b4cd9 --- /dev/null +++ b/contrib/media/updf/include/mathuserfunc.h @@ -0,0 +1,238 @@ + +#ifndef __mathuserfunc_h__ +#define __mathuserfunc_h__ + +#include "yacasbase.h" +#include "lispuserfunc.h" +#include "grower.h" + +#include "patternclass.h" + +/// A mathematical function defined by several rules. +/// This is the basic class which implements functions in Yacas. +/// Evaluation is done by consulting a set of rewriting rules. The +/// body of the first rule that matches, is evaluated and this gives +/// the result of evaluating the function. + +class BranchingUserFunction : public LispArityUserFunction +{ +public: + /// Structure containing name of parameter and whether it is put on hold. + class BranchParameter : public YacasBase + { + public: + BranchParameter(LispString * aParameter = NULL, LispInt aHold=LispFalse) + : iParameter(aParameter), iHold(aHold) {} + LispString * iParameter; + LispInt iHold; + }; + + /// Abstract base class for rules. + class BranchRuleBase : public YacasBase + { + public: + virtual ~BranchRuleBase(); + virtual LispBoolean Matches(LispEnvironment& aEnvironment, LispPtr* aArguments) = 0; + virtual LispInt Precedence() const = 0; + virtual LispPtr& Body() = 0; + }; + + /// A rule with a predicate. + /// This rule matches if the predicate evaluates to #LispTrue. + class BranchRule : public BranchRuleBase + { + public: + virtual ~BranchRule(); + BranchRule(LispInt aPrecedence,LispPtr& aPredicate,LispPtr& aBody) : iPrecedence(aPrecedence),iBody(aBody),iPredicate(aPredicate) + { + } + + /// Return true if the rule matches. + /// #iPredicate is evaluated in \a Environment. If the result + /// IsTrue(), this function returns true. + virtual LispBoolean Matches(LispEnvironment& aEnvironment, LispPtr* aArguments); + + /// Access #iPrecedence. + virtual LispInt Precedence() const; + + /// Access #iBody. + virtual LispPtr& Body(); + protected: + BranchRule() : iPrecedence(0),iBody(),iPredicate() {}; + protected: + LispInt iPrecedence; + LispPtr iBody; + LispPtr iPredicate; + }; + + /// A rule that always matches. + class BranchRuleTruePredicate : public BranchRule + { + public: + BranchRuleTruePredicate(LispInt aPrecedence,LispPtr& aBody) + { + iPrecedence = aPrecedence; + iBody = (aBody); + } + /// Return #LispTrue, always. + virtual LispBoolean Matches(LispEnvironment& aEnvironment, LispPtr* aArguments); + }; + + /// A rule which matches if the corresponding PatternClass matches. + class BranchPattern : public BranchRuleBase + { + public: + /// Destructor. + /// This function contains no code. + virtual ~BranchPattern(); + + /// Constructor. + /// \param aPrecedence precedence of the rule + /// \param aPredicate generic object of type \c Pattern + /// \param aBody body of the rule + BranchPattern(LispInt aPrecedence,LispPtr& aPredicate,LispPtr& aBody) : iPrecedence(aPrecedence),iBody(aBody),iPredicate(aPredicate),iPatternClass(NULL) + { + GenericClass *gen = aPredicate->Generic(); + DYNCAST(PatternClass,"\"Pattern\"",pat,gen) + Check(pat,KLispErrInvalidArg); + iPatternClass = pat; + } + + /// Return true if the corresponding pattern matches. + virtual LispBoolean Matches(LispEnvironment& aEnvironment, LispPtr* aArguments); + + /// Access #iPrecedence + virtual LispInt Precedence() const; + + /// Access #iBody + virtual LispPtr& Body(); + + private: + BranchPattern(const BranchPattern& aOther) : iPrecedence(0),iBody(),iPredicate(),iPatternClass(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + BranchPattern& operator=(const BranchPattern& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } + + protected: + /// The precedence of this rule. + LispInt iPrecedence; + + /// The body of this rule. + LispPtr iBody; + + /// Generic object of type \c Pattern containing #iPatternClass + LispPtr iPredicate; + + /// The pattern that decides whether this rule matches. + PatternClass *iPatternClass; + }; + + /// Constructor. + /// \param aParameters linked list constaining the names of the arguments + /// + /// #iParamList and #iParameters are set from \a aParameters. + BranchingUserFunction(LispPtr& aParameters); + + /// Destructor. + /// There is no code inside this function. + virtual ~BranchingUserFunction(); + + /// Evaluate the function on given arguments. + /// \param aResult (on output) the result of the evaluation + /// \param aEnvironment the underlying Lisp environment + /// \param aArguments the arguments to the function + /// + /// First, all arguments are evaluated by the evaluator associated + /// to \a aEnvironment, unless the \c iHold flag of the + /// corresponding parameter is true. Then a new LispLocalFrame is + /// constructed, in which the actual arguments are assigned to the + /// names of the formal arguments, as stored in \c iParameter. Then + /// all rules in #iRules are tried one by one. The body of the + /// first rule that matches is evaluated, and the result is put in + /// \a aResult. If no rule matches, \a aResult will recieve a new + /// expression with evaluated arguments. + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, LispPtr& aArguments); + + /// Put an argument on hold. + /// \param aVariable name of argument to put un hold + /// + /// The \c iHold flag of the corresponding argument is set. This + /// implies that this argument is not evaluated by Evaluate(). + virtual void HoldArgument(LispString * aVariable); + + /// Return true if the arity of the function equals \a aArity. + virtual LispInt IsArity(LispInt aArity) const; + + /// Return the arity (number of arguments) of the function. + LispInt Arity() const; + + /// Add a BranchRule to the list of rules. + /// \sa InsertRule() + virtual void DeclareRule(LispInt aPrecedence, LispPtr& aPredicate, LispPtr& aBody); + + /// Add a BranchRuleTruePredicate to the list of rules. + /// \sa InsertRule() + virtual void DeclareRule(LispInt aPrecedence, LispPtr& aBody); + + /// Add a BranchPattern to the list of rules. + /// \sa InsertRule() + void DeclarePattern(LispInt aPrecedence, LispPtr& aPredicate, LispPtr& aBody); + + /// Insert any BranchRuleBase object in the list of rules. + /// This function does the real work for DeclareRule() and + /// DeclarePattern(): it inserts the rule in #iRules, while + /// keeping it sorted. The algorithm is \f$O(\log n)\f$, where + /// \f$n\f$ denotes the number of rules. + void InsertRule(LispInt aPrecedence,BranchRuleBase* newRule); + + /// Return the argument list, stored in #iParamList + virtual LispPtr& ArgList(); + +protected: + /// List of arguments, with corresponding \c iHold property. + CArrayGrower<BranchParameter, ArrOpsPOD<BranchParameter> > iParameters; + + /// List of rules, sorted on precedence. + CDeletingArrayGrower<BranchRuleBase*, ArrOpsDeletingPtr<BranchRuleBase> > iRules; + + /// List of arguments + LispPtr iParamList; +}; + +class ListedBranchingUserFunction : public BranchingUserFunction +{ +public: + ListedBranchingUserFunction(LispPtr& aParameters); + virtual LispInt IsArity(LispInt aArity) const; + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, LispPtr& aArguments); +}; + + +class MacroUserFunction : public BranchingUserFunction +{ +public: + MacroUserFunction(LispPtr& aParameters); + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, LispPtr& aArguments); +}; + + +class ListedMacroUserFunction : public MacroUserFunction +{ +public: + ListedMacroUserFunction(LispPtr& aParameters); + virtual LispInt IsArity(LispInt aArity) const; + virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, LispPtr& aArguments); +}; + + + + +#endif + diff --git a/contrib/media/updf/include/mathutil.h b/contrib/media/updf/include/mathutil.h new file mode 100644 index 0000000000..646dc80b28 --- /dev/null +++ b/contrib/media/updf/include/mathutil.h @@ -0,0 +1,8 @@ + +#ifndef __mathutil_h__ +#define __mathutil_h__ + +LispInt PlatAsciiToInt(LispChar * aString); + +#endif + diff --git a/contrib/media/updf/include/mcoff/_coff.h b/contrib/media/updf/include/mcoff/_coff.h new file mode 100644 index 0000000000..95a568f0a8 --- /dev/null +++ b/contrib/media/updf/include/mcoff/_coff.h @@ -0,0 +1,315 @@ +#ifndef __MENUET_COFF_H +#define __MENUET_COFF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************** FILE HEADER **********************/ + +struct external_filehdr { + unsigned short f_magic; /* magic number */ + unsigned short f_nscns; /* number of sections */ + unsigned long f_timdat; /* time & date stamp */ + unsigned long f_symptr; /* file pointer to symtab */ + unsigned long f_nsyms; /* number of symtab entries */ + unsigned short f_opthdr; /* sizeof(optional hdr) */ + unsigned short f_flags; /* flags */ +}; + +/* Bits for f_flags: + * F_RELFLG relocation info stripped from file + * F_EXEC file is executable (no unresolved external references) + * F_LNNO line numbers stripped from file + * F_LSYMS local symbols stripped from file + * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) + */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + +#define I386MAGIC 0x14c +#define I386AIXMAGIC 0x175 +#define I386BADMAG(x) (((x).f_magic!=I386MAGIC) && (x).f_magic!=I386AIXMAGIC) + +#define FILHDR struct external_filehdr +#define FILHSZ sizeof(FILHDR) + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct +{ + unsigned short magic; /* type of file */ + unsigned short vstamp; /* version stamp */ + unsigned long tsize; /* text size in bytes, padded to FW bdry*/ + unsigned long dsize; /* initialized data " " */ + unsigned long bsize; /* uninitialized data " " */ + unsigned long entry; /* entry pt. */ + unsigned long text_start; /* base of text used for this file */ + unsigned long data_start; /* base of data used for this file */ +} AOUTHDR; + +typedef struct gnu_aout { + unsigned long info; + unsigned long tsize; + unsigned long dsize; + unsigned long bsize; + unsigned long symsize; + unsigned long entry; + unsigned long txrel; + unsigned long dtrel; +} GNU_AOUT; + +#define AOUTSZ (sizeof(AOUTHDR)) + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr { + char s_name[8]; /* section name */ + unsigned long s_paddr; /* physical address, aliased s_nlib */ + unsigned long s_vaddr; /* virtual address */ + unsigned long s_size; /* section size */ + unsigned long s_scnptr; /* file ptr to raw data for section */ + unsigned long s_relptr; /* file ptr to relocation */ + unsigned long s_lnnoptr; /* file ptr to line numbers */ + unsigned short s_nreloc; /* number of relocation entries */ + unsigned short s_nlnno; /* number of line number entries*/ + unsigned long s_flags; /* flags */ +}; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ sizeof(SCNHDR) + +/* + * names of "special" sections + */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _COMMENT ".comment" +#define _LIB ".lib" + +/* + * s_flags "type" + */ +#define STYP_TEXT (0x0020) /* section contains text only */ +#define STYP_DATA (0x0040) /* section contains data only */ +#define STYP_BSS (0x0080) /* section contains bss only */ + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + * Line numbers are grouped on a per function basis; first entry in a function + * grouping will have l_lnno = 0 and in place of physical address will be the + * symbol table index of the function name. + */ +struct external_lineno { + union { + unsigned long l_symndx __attribute__((packed)); /* function name symbol index, iff l_lnno == 0 */ + unsigned long l_paddr __attribute__((packed)); /* (physical) address of line number */ + } l_addr; + unsigned short l_lnno; /* line number */ +}; + + +#define LINENO struct external_lineno +#define LINESZ sizeof(LINENO) + + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union { + char e_name[E_SYMNMLEN]; + struct { + unsigned long e_zeroes __attribute__((packed)); + unsigned long e_offset __attribute__((packed)); + } e; + } e; + unsigned long e_value __attribute__((packed)); + short e_scnum; + unsigned short e_type; + unsigned char e_sclass; + unsigned char e_numaux; +} __attribute__((packed)); + +#define N_BTMASK (0xf) +#define N_TMASK (0x30) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +union external_auxent +{ + struct + { + unsigned long x_tagndx __attribute__((packed)); /* str, un, or enum tag indx */ + union + { + struct + { + unsigned short x_lnno; /* declaration line number */ + unsigned short x_size; /* str/union/array size */ + } x_lnsz; + unsigned long x_fsize __attribute__((packed)); /* size of function */ + } x_misc; + union + { + struct + { /* if ISFCN, tag, or .bb */ + unsigned long x_lnnoptr __attribute__((packed)); /* ptr to fcn line # */ + unsigned long x_endndx __attribute__((packed)); /* entry ndx past block end */ + } x_fcn; + struct { /* if ISARY, up to 4 dimen. */ + unsigned short x_dimen[E_DIMNUM]; + } x_ary; + } x_fcnary; + unsigned short x_tvndx; /* tv index */ + } x_sym; + union + { + char x_fname[E_FILNMLEN]; + struct + { + unsigned long x_zeroes __attribute__((packed)); + unsigned long x_offset __attribute__((packed)); + } x_n; + } x_file; + struct + { + unsigned long x_scnlen __attribute__((packed)); /* section length */ + unsigned short x_nreloc; /* # relocation entries */ + unsigned short x_nlinno; /* # line numbers */ + } x_scn; + struct + { + unsigned long x_tvfill __attribute__((packed)); /* tv fill value */ + unsigned short x_tvlen; /* length of .tv */ + unsigned short x_tvran[2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ +}; + +#define SYMENT struct external_syment +#define SYMESZ sizeof(SYMENT) +#define AUXENT union external_auxent +#define AUXESZ sizeof(AUXENT) + +#define _ETEXT "etext" + +/* Relocatable symbols have number of the section in which they are defined, + or one of the following: */ + +#define N_UNDEF ((short)0) /* undefined symbol */ +#define N_ABS ((short)-1) /* value of symbol is absolute */ +#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */ +#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */ +#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/ + +/* + * Type of a symbol, in low N bits of the word + */ +#define T_NULL 0 +#define T_VOID 1 /* function argument (only used by compiler) */ +#define T_CHAR 2 /* character */ +#define T_SHORT 3 /* short integer */ +#define T_INT 4 /* integer */ +#define T_LONG 5 /* long integer */ +#define T_FLOAT 6 /* floating point */ +#define T_DOUBLE 7 /* double word */ +#define T_STRUCT 8 /* structure */ +#define T_UNION 9 /* union */ +#define T_ENUM 10 /* enumeration */ +#define T_MOE 11 /* member of enumeration*/ +#define T_UCHAR 12 /* unsigned character */ +#define T_USHORT 13 /* unsigned short */ +#define T_UINT 14 /* unsigned integer */ +#define T_ULONG 15 /* unsigned long */ +#define T_LNGDBL 16 /* long double */ + +/* + * derived types, in n_type +*/ +#define DT_NON (0) /* no derived type */ +#define DT_PTR (1) /* pointer */ +#define DT_FCN (2) /* function */ +#define DT_ARY (3) /* array */ + +#define BTYPE(x) ((x) & N_BTMASK) + +#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT)) +#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT)) +#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT)) +#define ISTAG(x) ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG) +#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK)) + +/********************** STORAGE CLASSES **********************/ + +/* This used to be defined as -1, but now n_sclass is unsigned. */ +#define C_EFCN 0xff /* physical end of function */ +#define C_NULL 0 +#define C_AUTO 1 /* automatic variable */ +#define C_EXT 2 /* external symbol */ +#define C_STAT 3 /* static */ +#define C_REG 4 /* register variable */ +#define C_EXTDEF 5 /* external definition */ +#define C_LABEL 6 /* label */ +#define C_ULABEL 7 /* undefined label */ +#define C_MOS 8 /* member of structure */ +#define C_ARG 9 /* function argument */ +#define C_STRTAG 10 /* structure tag */ +#define C_MOU 11 /* member of union */ +#define C_UNTAG 12 /* union tag */ +#define C_TPDEF 13 /* type definition */ +#define C_USTATIC 14 /* undefined static */ +#define C_ENTAG 15 /* enumeration tag */ +#define C_MOE 16 /* member of enumeration */ +#define C_REGPARM 17 /* register parameter */ +#define C_FIELD 18 /* bit field */ +#define C_AUTOARG 19 /* auto argument */ +#define C_LASTENT 20 /* dummy entry (end of block) */ +#define C_BLOCK 100 /* ".bb" or ".eb" */ +#define C_FCN 101 /* ".bf" or ".ef" */ +#define C_EOS 102 /* end of structure */ +#define C_FILE 103 /* file name */ +#define C_LINE 104 /* line # reformatted as symbol table entry */ +#define C_ALIAS 105 /* duplicate tag */ +#define C_HIDDEN 106 /* ext symbol in dmert public lib */ + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc { + unsigned long r_vaddr __attribute__((packed)); + unsigned long r_symndx __attribute__((packed)); + unsigned short r_type; +}; + + +#define RELOC struct external_reloc +#define RELSZ sizeof(RELOC) + +#define RELOC_REL32 20 /* 32-bit PC-relative address */ +#define RELOC_ADDR32 6 /* 32-bit absolute address */ + +#define DEFAULT_DATA_SECTION_ALIGNMENT 4 +#define DEFAULT_BSS_SECTION_ALIGNMENT 4 +#define DEFAULT_TEXT_SECTION_ALIGNMENT 4 +/* For new sections we havn't heard of before */ +#define DEFAULT_SECTION_ALIGNMENT 4 + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/mcoff/mcoff.h b/contrib/media/updf/include/mcoff/mcoff.h new file mode 100644 index 0000000000..c9d0654594 --- /dev/null +++ b/contrib/media/updf/include/mcoff/mcoff.h @@ -0,0 +1,64 @@ +#ifndef __MENUETOS_MCOFF_H +#define __MENUETOS_MCOFF_H + +#include"_coff.h" + +typedef struct { + char * co_loadptr; + unsigned long co_loadaddr; + unsigned long co_filesize; + FILHDR * co_filehdr; + SCNHDR * co_sections; + SYMENT * co_symtab; + char * co_strtab; + char * co_bssptr; + unsigned long co_bssaddr; + unsigned long co_bsssize; + unsigned long co_bsssectnum; +} coffobj_t; + +coffobj_t * mcoff_load_file(char * fname); +void unload_coff_file(coffobj_t * obj); +SCNHDR * find_section(char * name,coffobj_t * obj); +int read_section_data(coffobj_t * obj,SCNHDR * hdr,void ** readp); +SYMENT * find_coff_symbol(coffobj_t * obj,char * objname); + +typedef int (* symlookupfn_t)(coffobj_t *,unsigned long *,unsigned long *,int); +int relocate_coff_file(coffobj_t * obj,symlookupfn_t lookupfn); +int mcoff_std_symlookupfn(coffobj_t * obj,unsigned long * sym_val, + unsigned long * sym_sect,int index); +unsigned long mcoff_get_ref(coffobj_t * obj,char * symname); + +/* +Your lookup function can be similar to this: + +int mcoff_std_symlookupfn(coffobj_t * obj,unsigned long * sym_val, + unsigned long * sym_sect,int index) +{ + SYMENT * symtab,* lookup; + char xname[9]; + char * symnamep; + symtab=obj->co_symtab+index; + *sym_sect=(unsigned long)symtab->e_scnum; + if(symtab->e_scnum>0) + { + *sym_val=symtab->e_value; + return 0; + } + if(symtab->e.e.e_zeroes==0) + { + symnamep=(char *)(((long)obj->co_strtab)+symtab->e.e.e_offset); + } else { + symnamep=(char *)symtab->e.e_name; + memset(xname,0,9); + memcpy(xname,symnamep,8); + symnamep=xname; + } + lookup=find_coff_symbol(obj,symnamep); + if(!lookup) return -1; + *sym_val=lookup->e_value+obj->co_sections[lookup->e_scnum-1].s_scnptr+obj->co_loadaddr; + return 0; +} +*/ + +#endif diff --git a/contrib/media/updf/include/mct.h b/contrib/media/updf/include/mct.h new file mode 100644 index 0000000000..84e3f8add1 --- /dev/null +++ b/contrib/media/updf/include/mct.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __MCT_H +#define __MCT_H +/** +@file mct.h +@brief Implementation of a multi-component transforms (MCT) + +The functions in MCT.C have for goal to realize reversible and irreversible multicomponent +transform. The functions in MCT.C are used by some function in TCD.C. +*/ + +/** @defgroup MCT MCT - Implementation of a multi-component transform */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Apply a reversible multi-component transform to an image +@param c0 Samples for red component +@param c1 Samples for green component +@param c2 Samples blue component +@param n Number of samples for each component +*/ +void mct_encode(int *c0, int *c1, int *c2, int n); +/** +Apply a reversible multi-component inverse transform to an image +@param c0 Samples for luminance component +@param c1 Samples for red chrominance component +@param c2 Samples for blue chrominance component +@param n Number of samples for each component +*/ +void mct_decode(int *c0, int *c1, int *c2, int n); +/** +Get norm of the basis function used for the reversible multi-component transform +@param compno Number of the component (0->Y, 1->U, 2->V) +@return +*/ +double mct_getnorm(int compno); + +/** +Apply an irreversible multi-component transform to an image +@param c0 Samples for red component +@param c1 Samples for green component +@param c2 Samples blue component +@param n Number of samples for each component +*/ +void mct_encode_real(int *c0, int *c1, int *c2, int n); +/** +Apply an irreversible multi-component inverse transform to an image +@param c0 Samples for luminance component +@param c1 Samples for red chrominance component +@param c2 Samples for blue chrominance component +@param n Number of samples for each component +*/ +void mct_decode_real(float* c0, float* c1, float* c2, int n); +/** +Get norm of the basis function used for the irreversible multi-component transform +@param compno Number of the component (0->Y, 1->U, 2->V) +@return +*/ +double mct_getnorm_real(int compno); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __MCT_H */ diff --git a/contrib/media/updf/include/mem.h b/contrib/media/updf/include/mem.h new file mode 100644 index 0000000000..618048c7f6 --- /dev/null +++ b/contrib/media/updf/include/mem.h @@ -0,0 +1,5 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* DO NOT USE THIS IN NEW CODE. It is here only + to allow old code to compile. */ + +#include <memory.h> diff --git a/contrib/media/updf/include/memory b/contrib/media/updf/include/memory new file mode 100644 index 0000000000..ca98df6dad --- /dev/null +++ b/contrib/media/updf/include/memory @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_MEMORY +#include <bits/std_memory.h> +#endif diff --git a/contrib/media/updf/include/memory.h b/contrib/media/updf/include/memory.h new file mode 100644 index 0000000000..062e64abf9 --- /dev/null +++ b/contrib/media/updf/include/memory.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_memory_h_ +#define __dj_include_memory_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdlib.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_memory_h_ */ diff --git a/contrib/media/updf/include/menu.h b/contrib/media/updf/include/menu.h new file mode 100644 index 0000000000..03c3cbc8da --- /dev/null +++ b/contrib/media/updf/include/menu.h @@ -0,0 +1,250 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1995,1997 * + ****************************************************************************/ + +#ifndef ETI_MENU +#define ETI_MENU + +#include <curses.h> +#include <eti.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef int Menu_Options; +typedef int Item_Options; + +/* Menu options: */ +#define O_ONEVALUE (0x01) +#define O_SHOWDESC (0x02) +#define O_ROWMAJOR (0x04) +#define O_IGNORECASE (0x08) +#define O_SHOWMATCH (0x10) +#define O_NONCYCLIC (0x20) + +/* Item options: */ +#define O_SELECTABLE (0x01) + +typedef struct +{ + const char* str; + unsigned short length; +} TEXT; + +typedef struct tagITEM +{ + TEXT name; /* name of menu item */ + TEXT description; /* description of item, optional in display */ + struct tagMENU *imenu; /* Pointer to parent menu */ + void *userptr; /* Pointer to user defined per item data */ + Item_Options opt; /* Item options */ + short index; /* Item number if connected to a menu */ + short y; /* y and x location of item in menu */ + short x; + bool value; /* Selection value */ + + struct tagITEM *left; /* neighbour items */ + struct tagITEM *right; + struct tagITEM *up; + struct tagITEM *down; + +} ITEM; + +typedef void (*Menu_Hook)(struct tagMENU *); + +typedef struct tagMENU +{ + short height; /* Nr. of chars high */ + short width; /* Nr. of chars wide */ + short rows; /* Nr. of items high */ + short cols; /* Nr. of items wide */ + short frows; /* Nr. of formatted items high */ + short fcols; /* Nr. of formatted items wide */ + short arows; /* Nr. of items high (actual) */ + short namelen; /* Max. name length */ + short desclen; /* Max. description length */ + short marklen; /* Length of mark, if any */ + short itemlen; /* Length of one item */ + short spc_desc; /* Spacing for descriptor */ + short spc_cols; /* Spacing for columns */ + short spc_rows; /* Spacing for rows */ + char *pattern; /* Buffer to store match chars */ + short pindex; /* Index into pattern buffer */ + WINDOW *win; /* Window containing menu */ + WINDOW *sub; /* Subwindow for menu display */ + WINDOW *userwin; /* User's window */ + WINDOW *usersub; /* User's subwindow */ + ITEM **items; /* array of items */ + short nitems; /* Nr. of items in menu */ + ITEM *curitem; /* Current item */ + short toprow; /* Top row of menu */ + chtype fore; /* Selection attribute */ + chtype back; /* Nonselection attribute */ + chtype grey; /* Inactive attribute */ + unsigned char pad; /* Pad character */ + + Menu_Hook menuinit; /* User hooks */ + Menu_Hook menuterm; + Menu_Hook iteminit; + Menu_Hook itemterm; + + void *userptr; /* Pointer to menus user data */ + char *mark; /* Pointer to marker string */ + + Menu_Options opt; /* Menu options */ + unsigned short status; /* Internal state of menu */ + +} MENU; + + +/* Define keys */ + +#define REQ_LEFT_ITEM (KEY_MAX + 1) +#define REQ_RIGHT_ITEM (KEY_MAX + 2) +#define REQ_UP_ITEM (KEY_MAX + 3) +#define REQ_DOWN_ITEM (KEY_MAX + 4) +#define REQ_SCR_ULINE (KEY_MAX + 5) +#define REQ_SCR_DLINE (KEY_MAX + 6) +#define REQ_SCR_DPAGE (KEY_MAX + 7) +#define REQ_SCR_UPAGE (KEY_MAX + 8) +#define REQ_FIRST_ITEM (KEY_MAX + 9) +#define REQ_LAST_ITEM (KEY_MAX + 10) +#define REQ_NEXT_ITEM (KEY_MAX + 11) +#define REQ_PREV_ITEM (KEY_MAX + 12) +#define REQ_TOGGLE_ITEM (KEY_MAX + 13) +#define REQ_CLEAR_PATTERN (KEY_MAX + 14) +#define REQ_BACK_PATTERN (KEY_MAX + 15) +#define REQ_NEXT_MATCH (KEY_MAX + 16) +#define REQ_PREV_MATCH (KEY_MAX + 17) + +#define MIN_MENU_COMMAND (KEY_MAX + 1) +#define MAX_MENU_COMMAND (KEY_MAX + 17) + +/* + * Some AT&T code expects MAX_COMMAND to be out-of-band not + * just for menu commands but for forms ones as well. + */ +#if defined(MAX_COMMAND) +# if (MAX_MENU_COMMAND > MAX_COMMAND) +# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND +# elif (MAX_COMMAND != (KEY_MAX + 128)) +# error Something is wrong -- MAX_COMMAND is already inconsistently defined. +# endif +#else +# define MAX_COMMAND (KEY_MAX + 128) +#endif + + +/* --------- prototypes for libmenu functions ----------------------------- */ + +extern ITEM **menu_items(const MENU *), + *current_item(const MENU *), + *new_item(const char *,const char *); + +extern MENU *new_menu(ITEM **); + +extern Item_Options item_opts(const ITEM *); +extern Menu_Options menu_opts(const MENU *); + +Menu_Hook item_init(const MENU *), + item_term(const MENU *), + menu_init(const MENU *), + menu_term(const MENU *); + +extern WINDOW *menu_sub(const MENU *), + *menu_win(const MENU *); + +extern const char *item_description(const ITEM *), + *item_name(const ITEM *), + *menu_mark(const MENU *), + *menu_request_name(int); + +extern char *menu_pattern(const MENU *); + +extern void *menu_userptr(const MENU *), + *item_userptr(const ITEM *); + +extern chtype menu_back(const MENU *), + menu_fore(const MENU *), + menu_grey(const MENU *); + +extern int free_item(ITEM *), + free_menu(MENU *), + item_count(const MENU *), + item_index(const ITEM *), + item_opts_off(ITEM *,Item_Options), + item_opts_on(ITEM *,Item_Options), + menu_driver(MENU *,int), + menu_opts_off(MENU *,Menu_Options), + menu_opts_on(MENU *,Menu_Options), + menu_pad(const MENU *), + pos_menu_cursor(const MENU *), + post_menu(MENU *), + scale_menu(const MENU *,int *,int *), + set_current_item(MENU *menu,ITEM *item), + set_item_init(MENU *,void(*)(MENU *)), + set_item_opts(ITEM *,Item_Options), + set_item_term(MENU *,void(*)(MENU *)), + set_item_userptr(ITEM *, void *), + set_item_value(ITEM *,bool), + set_menu_back(MENU *,chtype), + set_menu_fore(MENU *,chtype), + set_menu_format(MENU *,int,int), + set_menu_grey(MENU *,chtype), + set_menu_init(MENU *,void(*)(MENU *)), + set_menu_items(MENU *,ITEM **), + set_menu_mark(MENU *, const char *), + set_menu_opts(MENU *,Menu_Options), + set_menu_pad(MENU *,int), + set_menu_pattern(MENU *,const char *), + set_menu_sub(MENU *,WINDOW *), + set_menu_term(MENU *,void(*)(MENU *)), + set_menu_userptr(MENU *,void *), + set_menu_win(MENU *,WINDOW *), + set_top_row(MENU *,int), + top_row(const MENU *), + unpost_menu(MENU *), + menu_request_by_name(const char *), + set_menu_spacing(MENU *,int,int,int), + menu_spacing(const MENU *,int *,int *,int *); + + +extern bool item_value(const ITEM *), + item_visible(const ITEM *); + +void menu_format(const MENU *,int *,int *); + +#ifdef __cplusplus + } +#endif + +#endif /* ETI_MENU */ diff --git a/contrib/media/updf/include/menuet/console.h b/contrib/media/updf/include/menuet/console.h new file mode 100644 index 0000000000..6ba45610d1 --- /dev/null +++ b/contrib/media/updf/include/menuet/console.h @@ -0,0 +1,25 @@ +#ifndef __GLIBC__MENUET_CONSOLE_H +#define __GLIBC__MENUET_CONSOLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> + +extern const unsigned char font_8x8[]; +extern void __menuet__redraw_console(void); +extern void __menuet__show_text_cursor(void); +extern void __menuet__hide_text_cursor(void); +extern void __menuet__init_console(int x,int y); +extern void __menuet__clrscr(void); +extern void __menuet__putch(char c); +extern void __menuet__gotoxy(int x,int y); +extern void __menuet__outtextxy(int x,int y,char c); +extern void __menuet__getxy(int * x,int * y); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/font8x8.h b/contrib/media/updf/include/menuet/font8x8.h new file mode 100644 index 0000000000..bc2abfbeae --- /dev/null +++ b/contrib/media/updf/include/menuet/font8x8.h @@ -0,0 +1,262 @@ +/* font characters */ +/* from www.freetype.org */ +const unsigned char font_8x8[2048] = +{ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E, + 0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, + 0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, + 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00, + 0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x92, 0x10, 0x7C, + 0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C, + 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, + 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, + 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, + 0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78, + 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, + 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0, + 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0, + 0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99, + 0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00, + 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00, + 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00, + 0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00, + 0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0x86, 0xFC, + 0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00, + 0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF, + 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, + 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, + 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, + 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00, + 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, + 0x18, 0x7E, 0xC0, 0x7C, 0x06, 0xFC, 0x18, 0x00, + 0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00, + 0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00, + 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00, + 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00, + 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, + 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, + 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, + 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, + 0x7C, 0xCE, 0xDE, 0xF6, 0xE6, 0xC6, 0x7C, 0x00, + 0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00, + 0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00, + 0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, + 0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x1E, 0x00, + 0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00, + 0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, + 0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, + 0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00, + 0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00, + 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, + 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30, + 0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00, + 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, + 0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00, + 0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00, + 0x7C, 0xC6, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00, + 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00, + 0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00, + 0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00, + 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, + 0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00, + 0xFE, 0x62, 0x68, 0x78, 0x68, 0x60, 0xF0, 0x00, + 0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3A, 0x00, + 0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, + 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, + 0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00, + 0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00, + 0xF0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00, + 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00, + 0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00, + 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x00, + 0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00, + 0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0x7C, 0x0E, 0x00, + 0xFC, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0xE6, 0x00, + 0x7C, 0xC6, 0xE0, 0x78, 0x0E, 0xC6, 0x7C, 0x00, + 0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x00, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, + 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00, + 0xC6, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0xC6, 0x00, + 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00, + 0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00, + 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00, + 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00, + 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, + 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, + 0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00, + 0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00, + 0x1C, 0x0C, 0x0C, 0x7C, 0xCC, 0xCC, 0x76, 0x00, + 0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, + 0x38, 0x6C, 0x64, 0xF0, 0x60, 0x60, 0xF0, 0x00, + 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, + 0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00, + 0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, + 0x0C, 0x00, 0x1C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, + 0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00, + 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, + 0x00, 0x00, 0xCC, 0xFE, 0xFE, 0xD6, 0xD6, 0x00, + 0x00, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, + 0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, + 0x00, 0x00, 0xDC, 0x66, 0x66, 0x7C, 0x60, 0xF0, + 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E, + 0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0xF0, 0x00, + 0x00, 0x00, 0x7C, 0xC0, 0x70, 0x1C, 0xF8, 0x00, + 0x10, 0x30, 0xFC, 0x30, 0x30, 0x34, 0x18, 0x00, + 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, + 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, + 0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00, + 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, + 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, + 0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00, + 0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00, + 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, + 0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00, + 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00, + 0x7C, 0xC6, 0xC0, 0xC6, 0x7C, 0x0C, 0x06, 0x7C, + 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, + 0x1C, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, + 0x7E, 0x81, 0x3C, 0x06, 0x3E, 0x66, 0x3B, 0x00, + 0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, + 0xE0, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, + 0x30, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, + 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0x78, 0x0C, 0x38, + 0x7E, 0x81, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, + 0xCC, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, + 0xE0, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, + 0xCC, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, + 0x7C, 0x82, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00, + 0xE0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, + 0xC6, 0x10, 0x7C, 0xC6, 0xFE, 0xC6, 0xC6, 0x00, + 0x30, 0x30, 0x00, 0x78, 0xCC, 0xFC, 0xCC, 0x00, + 0x1C, 0x00, 0xFC, 0x60, 0x78, 0x60, 0xFC, 0x00, + 0x00, 0x00, 0x7F, 0x0C, 0x7F, 0xCC, 0x7F, 0x00, + 0x3E, 0x6C, 0xCC, 0xFE, 0xCC, 0xCC, 0xCE, 0x00, + 0x78, 0x84, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, + 0x00, 0xCC, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, + 0x00, 0xE0, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, + 0x78, 0x84, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, + 0x00, 0xE0, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, + 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, + 0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00, + 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, + 0x18, 0x18, 0x7E, 0xC0, 0xC0, 0x7E, 0x18, 0x18, + 0x38, 0x6C, 0x64, 0xF0, 0x60, 0xE6, 0xFC, 0x00, + 0xCC, 0xCC, 0x78, 0x30, 0xFC, 0x30, 0xFC, 0x30, + 0xF8, 0xCC, 0xCC, 0xFA, 0xC6, 0xCF, 0xC6, 0xC3, + 0x0E, 0x1B, 0x18, 0x3C, 0x18, 0x18, 0xD8, 0x70, + 0x1C, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, + 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, + 0x00, 0x1C, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, + 0x00, 0x1C, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, + 0x00, 0xF8, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0x00, + 0xFC, 0x00, 0xCC, 0xEC, 0xFC, 0xDC, 0xCC, 0x00, + 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00, 0x00, + 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x18, 0x30, 0x66, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0xFC, 0xC0, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFC, 0x0C, 0x0C, 0x00, 0x00, + 0xC6, 0xCC, 0xD8, 0x36, 0x6B, 0xC2, 0x84, 0x0F, + 0xC3, 0xC6, 0xCC, 0xDB, 0x37, 0x6D, 0xCF, 0x03, + 0x18, 0x00, 0x18, 0x18, 0x3C, 0x3C, 0x18, 0x00, + 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, + 0x00, 0xCC, 0x66, 0x33, 0x66, 0xCC, 0x00, 0x00, + 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, + 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, + 0xDB, 0xF6, 0xDB, 0x6F, 0xDB, 0x7E, 0xD7, 0xED, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, + 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, + 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, + 0x00, 0x00, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, + 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x00, 0x00, 0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, + 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, + 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, + 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, + 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, + 0x36, 0x36, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, + 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, + 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, + 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, + 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x3F, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, + 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x76, 0xDC, 0xC8, 0xDC, 0x76, 0x00, + 0x00, 0x78, 0xCC, 0xF8, 0xCC, 0xF8, 0xC0, 0xC0, + 0x00, 0xFC, 0xCC, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, + 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, + 0xFC, 0xCC, 0x60, 0x30, 0x60, 0xCC, 0xFC, 0x00, + 0x00, 0x00, 0x7E, 0xD8, 0xD8, 0xD8, 0x70, 0x00, + 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0xC0, + 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x00, + 0xFC, 0x30, 0x78, 0xCC, 0xCC, 0x78, 0x30, 0xFC, + 0x38, 0x6C, 0xC6, 0xFE, 0xC6, 0x6C, 0x38, 0x00, + 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x6C, 0xEE, 0x00, + 0x1C, 0x30, 0x18, 0x7C, 0xCC, 0xCC, 0x78, 0x00, + 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00, + 0x06, 0x0C, 0x7E, 0xDB, 0xDB, 0x7E, 0x60, 0xC0, + 0x38, 0x60, 0xC0, 0xF8, 0xC0, 0x60, 0x38, 0x00, + 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, + 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, + 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x7E, 0x00, + 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xFC, 0x00, + 0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xFC, 0x00, + 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70, + 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00, + 0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00, + 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x0F, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C, + 0x58, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, + 0x70, 0x98, 0x30, 0x60, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + diff --git a/contrib/media/updf/include/menuet/gui.h b/contrib/media/updf/include/menuet/gui.h new file mode 100644 index 0000000000..3ae750769b --- /dev/null +++ b/contrib/media/updf/include/menuet/gui.h @@ -0,0 +1,111 @@ +#ifndef __GUI_H +#define __GUI_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> + +#define GUI_DX 10 +#define GUI_DY 20 + +typedef struct __button_t +{ + int id; + char * txt; + int x,y; + int xsz,ysz; + void (* press_proc)(void); +} button_t; + +typedef struct +{ + int x,y; + int max_len; + __u32 back_color,text_color; + int current; + __u8 * buffer; +} input_line_t; + +static inline void draw_button(button_t * b) +{ + int l; + l=strlen(b->txt)<<3; + l=(b->xsz-l)>>1; + __menuet__make_button(b->x-2+10,b->y-2+20,b->xsz,b->ysz,b->id,0x808080); + __menuet__write_text(b->x+l+10,b->y+((b->ysz-8)>>1)+20,0,b->txt,strlen(b->txt)); +} + +static inline void repaint_button_group(button_t * bt,int nr) +{ + int i; + for(i=0;i<nr;i++) draw_button(&bt[i]); +} + +static inline void check_button_click(button_t * bt,int nr,int clicked) +{ + int i; + for(i=0;i<nr;i++) + if(bt[i].id==clicked) + { + if(bt[i].press_proc) bt[i].press_proc(); + return; + } +} + +static inline void draw_input_line(input_line_t * k) +{ + __menuet__bar(k->x+GUI_DX,k->y+GUI_DY,(k->max_len<<3)+10,8+5,k->back_color); + if(k->current) + __menuet__write_text(k->x+GUI_DX,k->y+GUI_DY,k->text_color,k->buffer,k->current); +} + +static inline void handle_input_line(input_line_t * l) +{ + for(;;) + { + int k=__menuet__wait_for_event(); + switch(k) + { + case 1: + WINDOW_PAINT_PROC(); + continue; + case 2: + k=__menuet__getkey(); + break; + case 3: + if(__menuet__get_button_id()==1) __menuet__sys_exit(); + continue; + } + if(!k) continue; + if(k==13) return; + if(k=='\b') + { + if(l->current) l->current--; + l->buffer[l->current]='\0'; + } else { + if(l->current>=l->max_len) continue; + l->buffer[l->current]=(__u8)k; + l->current++; + l->buffer[l->current]='\0'; + } + draw_input_line(l); + } +} + +static inline void outtextxy(int x,int y,__u32 tcol,__u32 bcol,char * txt) +{ + int l,m; + m=l=strlen(txt); + l<<=3; + l+=4; + __menuet__bar(GUI_DX+x,GUI_DY+y,l,10,bcol); + __menuet__write_text(GUI_DX+x,GUI_DY+y,tcol,txt,m); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/ipc.h b/contrib/media/updf/include/menuet/ipc.h new file mode 100644 index 0000000000..08f6484b2a --- /dev/null +++ b/contrib/media/updf/include/menuet/ipc.h @@ -0,0 +1,21 @@ +#ifndef __MENUETOS_IPC_H +#define __MENUETOS_IPC_H + +typedef struct { + volatile unsigned long lock; + unsigned long free_ptr; + char __mem[0]; +} ipc_hdr_t; + +typedef struct { + unsigned long sender_pid; + unsigned long msg_length; + char message[0]; +} ipc_msg_t; + +ipc_hdr_t * create_ipc(unsigned long size); +void register_ipc_mem(ipc_hdr_t * hdr); +void ipc_send_message(int dst_pid,ipc_msg_t * msg); +extern inline int ipc_messages_avail(ipc_hdr_t * hdr); + +#endif diff --git a/contrib/media/updf/include/menuet/mash.h b/contrib/media/updf/include/menuet/mash.h new file mode 100644 index 0000000000..12bf520e8a --- /dev/null +++ b/contrib/media/updf/include/menuet/mash.h @@ -0,0 +1,19 @@ +#ifndef __MENUET_MASH_H +#define __MENUET_MASH_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> + +extern void __mash__puts(char * str); +extern void __mash__gets(char * str,int len); + +extern char mash_args[]; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/net.h b/contrib/media/updf/include/menuet/net.h new file mode 100644 index 0000000000..cc63040ff8 --- /dev/null +++ b/contrib/media/updf/include/menuet/net.h @@ -0,0 +1,73 @@ +#ifndef __MENUET_NET_H +#define __MENUET_NET_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> + +#define __NET_stack_rd_cfg_word 0 +#define __NET_stack_get_ip 1 +#define __NET_stack_wr_cfg_word 2 +#define __NET_stack_put_ip 3 + +#define __NET_sock_open_UDP 0 +#define __NET_sock_open_TCP 5 +#define __NET_sock_close_UDP 1 +#define __NET_sock_close_TCP 8 +#define __NET_sock_poll 2 +#define __NET_sock_read 3 +#define __NET_sock_write_UDP 4 +#define __NET_sock_get_status 6 +#define __NET_sock_write_TCP 7 +#define __NET_sock_check_port 9 + +#define __NET_socket 53 +#define __NET_stack 52 + +int __menuet__get_stack_config_word(void); +__u32 __menuet__get_my_IP(void); +void __menuet__set_stack_config_word(int cfg); +void __menuet__set_my_IP(__u32 my_IP); + +__u32 __menuet__open_UDP_socket(__u32 local_port,__u32 remote_port,__u32 remote_ip); +__u32 __menuet__open_TCP_socket(__u32 local_port,__u32 remote_port,__u32 remote_ip,int mode); +int __menuet__close_UDP_socket(int socket); +int __menuet__close_TCP_socket(int socket); +int __menuet__poll_socket(int sock); +int __menuet__read_socket(int sock,__u8 * return_data); +int __menuet__get_TCP_socket_status(int sock); +int __menuet__write_UDP_socket(int sock,int count,void * buffer); +int __menuet__write_TCP_socket(int sock,int count,void * buffer); +int __menuet__check_net_port_availability(int port); + +/* Values returned by __menuet__check_net_port_availability */ +#define PORT_AVAILABLE (1) +#define PORT_UNAVAILABLE (0) + +#define NET_OP_OK ((int)(0)) +#define NET_OP_ERR ((int)(-1)) + +/* These are socket modes */ +#define SOCKET_PASSIVE 0 +#define SOCKET_ACTIVE 1 + +/* These belong to socket status */ +#define TCB_LISTEN 1 +#define TCB_SYN_SENT 2 +#define TCB_SYN_RECEIVED 3 +#define TCB_ESTABLISHED 4 +#define TCB_FIN_WAIT_1 5 +#define TCB_FIN_WAIT_2 6 +#define TCB_CLOSE_WAIT 7 +#define TCB_CLOSING 8 +#define TCB_LAST_ACK 9 +#define TCB_TIME_AWAIT 10 +#define TCB_CLOSED 11 + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/network.hpp b/contrib/media/updf/include/menuet/network.hpp new file mode 100644 index 0000000000..5c74adfde8 --- /dev/null +++ b/contrib/media/updf/include/menuet/network.hpp @@ -0,0 +1,33 @@ +#ifndef __MENUET_NETWORK_HPP__ +#define __MENUET_NETWORK_HPP__ + +#include<menuet/net.h> + +class IP_Address +{ +public: + unsigned long this_ip_inet_fmt; + IP_Address(unsigned long); + IP_Address(__u8,__u8,__u8,__u8); + ~IP_Address(); + unsigned long operator = (IP_Address&); + IP_Address& operator = (unsigned long); +}; + +class UDP_Socket +{ +public: + UDP_Socket(__u32 local_port,__u32 remote_port,__u32 remote_ip,bool close_on_delete); + virtual ~UDP_Socket(); + virtual int Open(); + virtual int Close(); + virtual int Read(__u8 * data); + virtual int Write(int count,void * data); + virtual int Poll(); +protected: + unsigned long p[3]; + bool f; + int sock; +}; + +#endif diff --git a/contrib/media/updf/include/menuet/os.h b/contrib/media/updf/include/menuet/os.h new file mode 100644 index 0000000000..bb46683e49 --- /dev/null +++ b/contrib/media/updf/include/menuet/os.h @@ -0,0 +1,224 @@ +#ifndef __GLIBC__MENUET_OS_H +#define __GLIBC__MENUET_OS_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned char __u8; +typedef unsigned short __u16; +typedef unsigned long __u32; + +#pragma pack(push,1) + +void __menuet__define_window(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize, + __u32 body_color,__u32 grab_color,__u32 frame_color); +void __menuet__window_redraw(int status); +void __menuet__putpixel(__u32 x,__u32 y,__u32 color); +int __menuet__getkey(void); +__u32 __menuet__getsystemclock(void); +void __menuet__write_text(__u16 x,__u16 y,__u32 color,char * text,int len); +void __menuet__delay100(int m); +__u32 __menuet__open(char * name,char * data); +void __menuet__save(char * name,char * data,__u32 count); +void __menuet__putimage(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,char * image); +void __menuet__make_button(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize, int id,__u32 color); +int __menuet__get_button_id(void); +int __menuet__wait_for_event(void); +int __menuet__check_for_event(void); +void __menuet__bar(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,__u32 color); +void __menuet__sys_exit(void); +void * __menuet__exec_thread(void (* func_ptr)(void),__u32 stack_size,int * retp); +void __menuet__idle(void); + +void __menuet__exec_ramdisk(char * filename,char * args,...); +void __menuet__exec_hd(char * filename,char * args,...); + +struct process_table_entry +{ + __u32 cpu_usage; + __u16 pos_in_windowing_stack; + __u16 win_stack_val_at_ecx; + __u16 reserved1; + char name[12]; + __u32 memstart; + __u32 memused; + __u32 pid; + __u32 winx_start,winy_start; + __u32 winx_size,winy_size; + __u16 thread_state; + __u16 reserved2; + __u32 client_left,client_top,client_width,client_height; + __u8 window_state; + __u8 reserved3[1024-71]; +}; + +#define PID_WHOAMI (-1) + +int __menuet__get_process_table(struct process_table_entry * proctab,int pid); +void __menuet__get_screen_max(__u16 * x,__u16 * y); + +#define BTYPE_TILE 1 +#define BTYPE_STRETCH 2 + +void __menuet__set_background_size(__u32 xsz,__u32 ysz); +void __menuet__write_background_mem(__u32 pos,__u32 color); +void __menuet__draw_background(void); +void __menuet__set_background_draw_type(int type); +void __menuet__background_blockmove(char * src_ptr,__u32 bgr_dst,__u32 count); + +void __menuet__reset_mpu401(void); +void __menuet__write_mpu401(__u8 d); + +__u32 __menuet__get_date(void); + +void __menuet__line(__u16 x1,__u16 y1,__u16 x2,__u16 y2,__u32 color); + +void __menuet__set_bitfield_for_wanted_events(__u16 ev); + +#define EVENT_REDRAW 0x00000001 +#define EVENT_KEY 0x00000002 +#define EVENT_BUTTON 0x00000004 +#define EVENT_END_REQUEST 0x00000008 +#define EVENT_DESKTOP_BACK_DRAW 0x00000010 +#define EVENT_MOUSE_CHANGE 0x00000020 +#define EVENT_IPC 0x00000040 +#define EVENT_GET_IRQS_MASK 0xFFFF0000 +#define EVENT_GET_IRQ(e) (((e)>>16)&0xFFFF) + +__u32 __menuet__get_irq_owner(__u32 irq); +int __menuet__get_data_read_by_irq(__u32 irq,__u32 * num_bytes_in_buf,__u8 * data); +int __menuet__send_data_to_device(__u16 port,__u8 val); +void __menuet__program_irq(void * intr_table,__u32 irq_num); +int __menuet__reserve_irq(int irqno); +int __menuet__free_irq(int irqno); +int __menuet__reserve_port_area(__u32 start,__u32 end); +int __menuet__free_port_area(__u32 start,__u32 end); + + +#define NAME_LEN 512 + +#define STC_READ 0 +#define STC_WRITE 1 +#define STC_APPEND 2 + +struct systree_info +{ + __u32 command; + __u32 file_offset_low; + __u32 file_offset_high; + __u32 size; + __u32 data_pointer; + char _zero; + const char* nameptr; +}; + +struct systree_info2 +{ + __u32 command; + __u32 file_offset_low; + __u32 file_offset_high; + __u32 size; + __u32 data_pointer; + char name[NAME_LEN]; +}; + +struct bdfe_time +{ + __u8 seconds; + __u8 minutes; + __u8 hours; + __u8 reserved; +}; +struct bdfe_date +{ + __u8 day; + __u8 month; + __u16 year; +}; +struct bdfe_item +{ + __u32 attr; + __u8 nametype; + __u8 reserved[3]; + struct bdfe_time ctime; + struct bdfe_date cdate; + struct bdfe_time atime; + struct bdfe_date adate; + struct bdfe_time mtime; + struct bdfe_date mdate; + __u32 filesize_low; + __u32 filesize_high; +}; + +int __kolibri__system_tree_access(struct systree_info * info); +int __kolibri__system_tree_access2(struct systree_info2 * info); + +int __fslayer_open(char * name,int flags); +int __fslayer_close(int fd); +int __fslayer_lseek(int fd,int pos,int seek_type); +int __fslayer_tell(int fd); +int __fslayer_read(int fd,void * buffer,__u32 count); +int __fslayer_write(int fd,void * buffer,__u32 count); + +typedef struct +{ + __u8 lock; + __u8 resvd[3]; + __u32 ptr_to_fmsg_pos; + /* Below is for message */ + __u32 sender_pid; + __u32 msg_length; +} msgrcva_t /*__attribute__((packed))*/; + +void send_message(int pid,void * msg_ptr,int message_size); +void define_receive_area(msgrcva_t * rcva_ptr,int size); + +void __menuet__sound_load_block(char * blockptr); +void __menuet__sound_play_block(void); + +void __menuet__dga_get_caps(int * xres,int * yres,int * bpp,int * bpscan); + +void get_pci_version(__u8 * major,__u8 * minor); +void pci_get_last_bus(__u8 * last_bus); +void get_pci_access_mechanism(__u8 * mechanism); + +void pci_write_config_byte(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u8 val); +void pci_write_config_word(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u16 val); +void pci_write_config_dword(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u32 val); +__u8 pci_read_config_byte(__u8 bus,__u8 dev,__u8 fn,__u8 reg); +__u16 pci_read_config_word(__u8 bus,__u8 dev,__u8 fn,__u8 reg); +__u32 pci_read_config_dword(__u8 bus,__u8 dev,__u8 fn,__u8 reg); + +typedef struct{ + char* name; + void* pointer; +} IMP_ENTRY; +typedef const IMP_ENTRY* IMP_TABLE; +IMP_TABLE __kolibri__cofflib_load(const char*); +__u32 __kolibri__cofflib_getproc(IMP_TABLE, const char*); + + +static __inline__ void __menuet__debug_out_byte(const char ch){ + __asm__ __volatile__ ("int $0x40"::"a"(63L),"b"(1L),"c"((__u8)ch)); +} + +static __inline__ __u32 __menuet__wtf(void){ + __u32 __ret; + __asm__ __volatile__("int $0x40":"=a"(__ret):"0"(26),"b"(9)); + return __ret; + } + +void __menuet__debug_out(const char* str); + +#define TIME_GETH(x) ((x)&0x000000FF) +#define TIME_GETM(x) ((((x)&0x00FF00)>>8)&0xFF) +#define TIME_GETS(x) ((((x)&0xFF0000)>>16)&0xFF) + +#pragma pack(pop) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/sem.h b/contrib/media/updf/include/menuet/sem.h new file mode 100644 index 0000000000..15aa002f32 --- /dev/null +++ b/contrib/media/updf/include/menuet/sem.h @@ -0,0 +1,143 @@ +#ifndef __MENUETOS_SEM_H +#define __MENUETOS_SEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef volatile struct { + unsigned long s_magic; + volatile unsigned long s_value; + volatile unsigned long s_lock; +} semaphore_t; + +#define SEM_MAGIC 0x1BAD2E20 + +#define SEM_INIT { SEM_MAGIC , 0 , 0 } + +static inline semaphore_t * get_sem_init(void) +{ + static semaphore_t __ret=SEM_INIT; + return &__ret; +} + +static inline void fill_empty_sem(semaphore_t * sem) +{ + if(sem) + { + //memcpy((void *)sem,(const void *)get_sem_init(),sizeof(semaphore_t)); + } +} + +#define DECLARE_SEMAPHORE(name) semaphore_t name = SEM_INIT ; +#define DECLARE_STATIC_SEM(name) static semaphore_t name = SEM_INIT ; +#define DECLARE_SEMAPHORE_S(name) semaphore_t name + +#define check_sem_magic(s) ((s)->s_magic==SEM_MAGIC) + +#define SEM_VAL(s) (s)->s_value +#define SEM_LOCK(s) (s)->s_lock + +#define sem_lock_acquire(sem) \ + { \ +LOCKED: \ + if(check_sem_magic(sem)) \ + { \ + if(SEM_LOCK(sem)) \ + { \ + __menuet__delay100(1); \ + goto LOCKED; \ + } \ + } \ + } + +#define sem_lock(sem) \ + { \ + if(check_sem_magic(sem)) \ + { \ + sem_lock_acquire(sem); \ + SEM_LOCK(sem)++; \ + } \ + } + +#define sem_unlock(sem) \ + { \ + if(check_sem_magic(sem)) \ + { \ + if(SEM_LOCK(sem)) SEM_LOCK(sem)--; \ + } \ + } + +#define sem_read(sem) \ + ({ \ + volatile unsigned long __ret; \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + __ret=SEM_VAL(sem); \ + sem_unlock(sem); \ + } else { \ + __ret=0; \ + } \ + __ret; \ + }) + +#define sem_write(sem,val) \ + { \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + SEM_VAL(sem)=(val); \ + sem_unlock(sem); \ + } \ + } + +#define sem_up(sem) \ + { \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + SEM_VAL(sem)++; \ + sem_unlock(sem); \ + } \ + } + +#define sem_down(sem) \ + { \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + if(SEM_VAL(sem)) SEM_VAL(sem)--; \ + sem_unlock(sem); \ + } \ + } + +#define sem_isup(sem) \ + { \ + int __ret; \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + __ret=SEM_VAL(sem) ? 1 : 0; \ + sem_unlock(sem); \ + } \ + __ret; \ + } + +#define sem_isdown(sem) \ + { \ + int __ret; \ + if(check_sem_magic(sem)) \ + { \ + sem_lock(sem); \ + __ret=SEM_VAL(sem) ? 0 : 1; \ + sem_unlock(sem); \ + } \ + __ret; \ + } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/menuet/textcon.h b/contrib/media/updf/include/menuet/textcon.h new file mode 100644 index 0000000000..6e07d128c2 --- /dev/null +++ b/contrib/media/updf/include/menuet/textcon.h @@ -0,0 +1,91 @@ +#ifndef __TEXTCON_H +#define __TEXTCON_H + +#include<menuet/sem.h> + +#define COLOR_CONV_B_2_D { \ + 0x000000, \ + 0x000080, \ + 0x800000, \ + 0x008080, \ + 0x800000, \ + 0x808000, \ + 0x404040, \ + 0x808080, \ + 0x606060, \ + 0x0000FF, \ + 0x00FF00, \ + 0x00FFFF, \ + 0xFF0000, \ + 0xFFFF00, \ + 0x00FFFF, \ + 0xFFFFFF, \ +} + +#define CHAR_SIZE_X 5 +#define CHAR_SIZE_Y 8 + +#define NR_CHARS_X 80 +#define NR_CHARS_Y 25 + +#define CON_AT_X 10 +#define CON_AT_Y 25 + +typedef struct +{ + unsigned char c_char; + unsigned char c_back; + unsigned char c_color; +} char_info_t; + +typedef struct +{ + int esc[4]; +} esc_info_t; + +typedef struct +{ + unsigned char text_color,back_color; + char_info_t char_table[NR_CHARS_X][NR_CHARS_Y]; + int id; + int cur_x,cur_y; + int cur_visible; + unsigned char cur_color; + esc_info_t esc_seq; + DECLARE_SEMAPHORE_S(io_lock); +} console_t; + +#define MAX_CONSOLES 4 + +extern console_t * consoles[MAX_CONSOLES]; +extern console_t * visible_console; + +void init_consoles(void); +void lcon_clrscr(console_t * con); +void lcon_flush_console(console_t * con); +void lcon_flushxy(console_t * con,int x,int y); +void lcon_scroll(console_t * con,int update); +void lcon_putch(console_t * con,char c); +void lcon_gotoxy(console_t * con,int x,int y); +void lcon_set_text_color(console_t * con,int color); +void lcon_set_back_color(console_t * con,int color); +void lcon_switch_to_console(int i); +unsigned char lcon_getcxy(console_t * con,int x,int y); +void lcon_putcxy(console_t * con,int x,int y,unsigned char c); + +#define _lcon_clrscr() lcon_clrscr(visible_console) +#define _lcon_flush_console() lcon_flush_console(visible_console) +#define _lcon_flushxy(x,y) lcon_flushxy(visible_console,(x),(y)) +#define _lcon_scroll() lcon_scroll(visible_console,1) +#define _lcon_putch(c) lcon_putch(visible_console,(char)(c)) +#define _lcon_gotoxy(x,y) lcon_gotoxy(visible_console,(x),(y)) +#define _lcon_set_text_color(c) lcon_set_text_color(visible_console,(c)&(1+2+4+8)) +#define _lcon_set_back_color(c) lcon_set_back_color(visible_console,(c)&(1+2+4+8)) +#define _lcon_switch(i) lcon_switch_to_console((i)) +#define _lcon_getcxy(x,y) lcon_getcxy(visible_console,(x),(y)) +#define _lcon_putcxy(x,y,c) lcon_putcxy(visible_console,(x),(y),(c)) + +console_t * create_private_console(void); +void free_private_console(console_t * con); + +#endif diff --git a/contrib/media/updf/include/menuet/thread.h b/contrib/media/updf/include/menuet/thread.h new file mode 100644 index 0000000000..c02e974435 --- /dev/null +++ b/contrib/media/updf/include/menuet/thread.h @@ -0,0 +1,13 @@ +#ifndef __MENUET_THREAD_H +#define __MENUET_THREAD_H + +#define THR_ATEXIT 0x00000001 +#define THR_KILLER 0x00000002 + +void init_threads(void); +int get_thread_pid(int tid); +int get_thread_tid(int pid); +int create_thread(void (* fn)(void),int stacksize,int flags,void ** rstackp); +void kill_thread(int tid); + +#endif diff --git a/contrib/media/updf/include/mf_common.h b/contrib/media/updf/include/mf_common.h new file mode 100644 index 0000000000..a98bee58d7 --- /dev/null +++ b/contrib/media/updf/include/mf_common.h @@ -0,0 +1,93 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1995,1997 * + ****************************************************************************/ + +/* Common internal header for menu and form library */ + +#if HAVE_CONFIG_H +# include <ncurses_cfg.h> +#endif + +#include <stdlib.h> +#include <sys/types.h> +#include <assert.h> +#include <string.h> +#include <ctype.h> +#include <errno.h> + +#if DECL_ERRNO +extern int errno; +#endif + +/* in case of debug version we ignore the suppression of assertions */ +#ifdef TRACE +# ifdef NDEBUG +# undef NDEBUG +# endif +#endif + +#include <nc_alloc.h> + +#ifdef USE_RCS_IDS +#define MODULE_ID(id) static const char Ident[] = id; +#else +#define MODULE_ID(id) /*nothing*/ +#endif + + +/* Maximum regular 8-bit character code */ +#define MAX_REGULAR_CHARACTER (0xff) + +#define SET_ERROR(code) (errno=(code)) +#define GET_ERROR() (errno) +#define RETURN(code) return( SET_ERROR(code) ) + +/* The few common values in the status fields for menus and forms */ +#define _POSTED (0x01) /* menu or form is posted */ +#define _IN_DRIVER (0x02) /* menu or form is processing hook routine */ + +/* Call object hook */ +#define Call_Hook( object, handler ) \ + if ( (object) && ((object)->handler) )\ + {\ + (object)->status |= _IN_DRIVER;\ + (object)->handler(object);\ + (object)->status &= ~_IN_DRIVER;\ + } + +#define INLINE + +#ifndef TRACE +# if CC_HAS_INLINE_FUNCS +# undef INLINE +# define INLINE inline +# endif +#endif diff --git a/contrib/media/updf/include/mgtk/app.h b/contrib/media/updf/include/mgtk/app.h new file mode 100644 index 0000000000..786f1e2747 --- /dev/null +++ b/contrib/media/updf/include/mgtk/app.h @@ -0,0 +1,22 @@ +#ifndef __MGTK_APP_H +#define __MGTK_APP_H + +#include<mgtk/widget.h> + +class GApplication: public GGroup +{ +public: + GApplication(GRect *); + virtual ~GApplication(); + virtual void SetCaption(char *); + virtual void Init(); + virtual void Run(); + virtual void Done(); + virtual void DrawWidget(); +private: + char * Caption; + GPoint priv_origin,priv_size; + unsigned long body,grab,frame; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/bitmap.h b/contrib/media/updf/include/mgtk/bitmap.h new file mode 100644 index 0000000000..4b174fc85d --- /dev/null +++ b/contrib/media/updf/include/mgtk/bitmap.h @@ -0,0 +1,38 @@ +#ifndef __MGTK_BITMAP_H +#define __MGTK_BITMAP_H + +#include<mgtk/widget.h> +#include<stdio.h> +extern "C" { +#include<libmgfx.h> +} + +/* Image is 24-bit RGB bitmap */ +class GImagePool: public GWidget +{ +public: + GImagePool(GRect *); + virtual ~GImagePool(); + virtual void DrawWidget(); + virtual void Write(unsigned long,unsigned long,char *); + virtual void Load(FILE *); + virtual void Save(FILE *); + virtual void PutPixel(int,int,unsigned long); + GImagePool * Duplicate(GImagePool * Img); +private: + char * image_data; + unsigned long scan_size,image_size; +}; + +class GPicture: public GWidget +{ +public: + GPicture(GRect * r,char * filename); + virtual ~GPicture(); + virtual void DrawWidget(); + virtual bool Load(char *); +private: + mgfx_image_t * img; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/button.h b/contrib/media/updf/include/mgtk/button.h new file mode 100644 index 0000000000..d559c13904 --- /dev/null +++ b/contrib/media/updf/include/mgtk/button.h @@ -0,0 +1,99 @@ +#ifndef __MGTK_BUTTON_H +#define __MGTK_BUTTON_H + +#include<mgtk/widget.h> +#include<mgtk/pen.h> + +#define bs_Normal 0 +#define bs_DontDraw 1 + +class GTextButton; + +class GButton: public GWidget +{ + friend class GTextButton; +public: + GButton(GRect *,int flags,unsigned long color,int cmd); + virtual ~GButton(void); + virtual void HandleEvent(GEvent *); + virtual void DrawWidget(); + virtual void ClickProc(); + virtual void SetCommand(int); +private: + int bId; + int bFlags; + int bCmd; + unsigned long bColor; +}; + +class GRadioButton; + +class GCheckBox: public GWidget +{ + friend class GRadioButton; +public: + GCheckBox(GRect *,bool); + virtual ~GCheckBox(); + virtual void DrawWidget(); + virtual void HandleEvent(GEvent *); + bool Checked(); + void Check(bool); +private: + bool state; +}; + +class GRadioButton: public GCheckBox +{ +public: + GRadioButton(GRect *,bool); + virtual ~GRadioButton(); + virtual void DrawWidget(); +}; + +class GRadioGroup: public GGroup +{ +public: + GRadioGroup(GRect *,int); + virtual ~GRadioGroup(); + virtual void HandleEvent(GEvent *); + virtual int ActualButton(); +private: + int actual; + GRadioButton * _current_click; +}; + +class GTextButton: public GButton +{ +public: + GTextButton(GRect *,char *,int); + virtual ~GTextButton(); + virtual void DrawWidget(); +private: + char * txt; +}; + +class GButtonAllocator +{ +public: + GButtonAllocator(int max); + virtual ~GButtonAllocator(); + int New(); + void Del(int); +private: + unsigned char * gbutton_bitmap; + int nr_buttons; +}; + +extern GButtonAllocator * OSButtonAlloc; + +class GImageButton: public GButton +{ +public: + GImageButton(GRect *,struct GImageData *,int); + virtual ~GImageButton(); + virtual void DrawWidget(); +private: + struct GImageData * data; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/editor.h b/contrib/media/updf/include/mgtk/editor.h new file mode 100644 index 0000000000..76d46a0ff7 --- /dev/null +++ b/contrib/media/updf/include/mgtk/editor.h @@ -0,0 +1,58 @@ +#ifndef __MGTK_EDITOR_H +#define __MGTK_EDITOR_H + +#include<mgtk/widget.h> +#include<mgtk/slider.h> + +class GClipboard +{ +public: + typedef enum { + CL_EMPTY=0, + CL_BINARY=1, + CL_IMAGE=2, + CL_TEXT=3, + } clip_data_type_t; + GClipboard(); + virtual ~GClipboard(); + virtual void * GetData(); + virtual clip_data_type_t GetDataType(); + virtual unsigned long GetDataSize(); + virtual void SetClipData(clip_data_type_t type,void * ptr,unsigned long size); + virtual void Empty(); +private: + void * buf_location; + unsigned long size; + clip_data_type_t data_type; +}; + +#define INVALID_EDITOR_OFFSET 0xffffffff + +class GEditorCore +{ +public: + GEditorCore(unsigned long SizeLim); + virtual ~GEditorCore(); + virtual int ExpandBuffer(int delta); + virtual void Delete(unsigned long offset,unsigned long size); + virtual void Cut(unsigned long offset,unsigned long size, + GClipboard * Clip); + virtual void Copy(unsigned long offset,unsigned long size, + GClipboard * Clip); + virtual void Paste(unsigned long offset,GClipboard * Clip); + virtual unsigned long Search(unsigned long from_off,char * keyword,int name_len); + virtual int Replace(unsigned long from_off,char * keyword,char * replace_to, + int kword_len,int rt_len,bool ReplaceAll); + virtual unsigned long GetTextSize(); + virtual char * GetTextBuffer(); + virtual void Empty(); + virtual bool IsEmpty(); + virtual void SetCaseSensitive(bool); + virtual void InsertCharAt(unsigned long off,char c); +private: + char * text_buffer; + unsigned long text_size,buffer_size,size_limit; + bool case_sensitive; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/event.h b/contrib/media/updf/include/mgtk/event.h new file mode 100644 index 0000000000..7db35d40bd --- /dev/null +++ b/contrib/media/updf/include/mgtk/event.h @@ -0,0 +1,49 @@ +#ifndef __MGTK_EVENT_H +#define __MGTK_EVENT_H + +typedef struct { + int evType; + union { + struct { + int evCommand; + int evMessage; + void * info; + unsigned long info_long; + unsigned char info_char; + } command; + struct { + int xMouse; + int yMouse; + int bMouse; + } mouse; + struct { + int keyId; + } key; + struct { + int butId; + } button; + } type; +} GEvent; + +#define GEVENT_NOTHING 0 +#define GEVENT_COMMAND 1 +#define GEVENT_MOUSE 2 +#define GEVENT_CLICK 3 +#define GEVENT_KEYBOARD 4 +#define GEVENT_IDLE 5 +#define GEVENT_BUTTON 6 + +#define cm_Ignore 0 +#define cm_Disable 1 +#define cm_Enable 2 +#define cm_Click 3 +#define cm_Paint 4 +#define cm_Quit 5 +#define cm_Clicked 6 +#define cm_Scroll 7 +#define cm_Radio 8 +#define cm_Scrollup 9 +#define cm_Scrolldown 10 +#define cm_KillMenu 11 + +#endif diff --git a/contrib/media/updf/include/mgtk/mgtk.h b/contrib/media/updf/include/mgtk/mgtk.h new file mode 100644 index 0000000000..d7847a6299 --- /dev/null +++ b/contrib/media/updf/include/mgtk/mgtk.h @@ -0,0 +1,15 @@ +#ifndef __MGTK_H +#define __MGTK_H + +#include"app.h" +#include"bitmap.h" +#include"button.h" +#include"event.h" +#include"pen.h" +#include"slider.h" +#include"text.h" +#include"types.h" +#include"widget.h" +#include"terminal.h" + +#endif diff --git a/contrib/media/updf/include/mgtk/pen.h b/contrib/media/updf/include/mgtk/pen.h new file mode 100644 index 0000000000..6f98c03116 --- /dev/null +++ b/contrib/media/updf/include/mgtk/pen.h @@ -0,0 +1,32 @@ +#ifndef __MGTK_PEN_H +#define __MGTK_PEN_H + +#include<mgtk/widget.h> + +struct GImageData { + int w,h; + unsigned char * data; +}; + +class GPen +{ +public: + GPen(GWidget *); + virtual ~GPen(); + void PutPixel(int,int,unsigned long); + void Line(int,int,int,int,unsigned long); + void FillRect(int,int,int,int,unsigned long); + void DrawLines(GPoint *,int nr_point,unsigned long color); + void WriteText(int,int,char *,int,unsigned long); + void Rect(int,int,int,int,unsigned long); + void Rect3d(int x,int y,int w,int h,unsigned long color); + void FillRect2(int,int,int,int,unsigned long); + void Line2(int,int,int,int,unsigned long); + void PutImage(int,int,int,int,char *); + void PutImage(int,int,struct GImageData *); +private: + int _dx,_dy; + int _lx,_ly; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/slider.h b/contrib/media/updf/include/mgtk/slider.h new file mode 100644 index 0000000000..2ed6a464da --- /dev/null +++ b/contrib/media/updf/include/mgtk/slider.h @@ -0,0 +1,55 @@ +#ifndef __MGTK_SLIDER_H +#define __MGTK_SLIDER_H + +#include<mgtk/widget.h> +#include<mgtk/button.h> + +#define slider_Horizontal 0 +#define slider_Vertical 1 +#define slider_Solid 2 + +class GSlider: public GWidget +{ +public: + GSlider(GRect * r,int mode,unsigned long min,unsigned long max,unsigned long cur); + virtual ~GSlider(); + virtual void DrawWidget(); + virtual void HandleEvent(GEvent *); + virtual void VSetMin(unsigned long); + virtual void VSetMax(unsigned long); + virtual void VSetCur(unsigned long); + virtual void SetMin(unsigned long); + virtual void SetMax(unsigned long); + virtual void SetCur(unsigned long); + virtual unsigned long GetCur(); + virtual unsigned long GetMin(); + virtual unsigned long GetMax(); +private: + unsigned long SMode,SMin,SMax,SCur; +}; + +class GPercentSlider: public GSlider +{ +public: + GPercentSlider(GRect * r,int percent); + virtual ~GPercentSlider(); + virtual void DrawWidget(); + virtual void HandleEvent(GEvent *); +private: + char _txt[10]; /* xxx % */ +}; + +class GScroll: public GGroup +{ +public: + GScroll(GRect * r,int mode,unsigned long min,unsigned long max,unsigned long cur, + unsigned long _delta); + virtual ~GScroll(); + virtual void HandleEvent(GEvent *); +private: + GButton * b1,* b2; + GSlider * slider; + unsigned long delta; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/string.h b/contrib/media/updf/include/mgtk/string.h new file mode 100644 index 0000000000..243db4b111 --- /dev/null +++ b/contrib/media/updf/include/mgtk/string.h @@ -0,0 +1,20 @@ +#ifndef __MGTK_STRING_H +#define __MGTK_STRING_H + +class GString +{ +public: + GString(char *); + GString(const char *); + GString(GString&); + ~GString(); + int Length(); + char * operator = (GString&); + GString& operator = (char *); + void Truncate(int AtPos); +private: + char * __str; + int __len; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/terminal.h b/contrib/media/updf/include/mgtk/terminal.h new file mode 100644 index 0000000000..12fb612f98 --- /dev/null +++ b/contrib/media/updf/include/mgtk/terminal.h @@ -0,0 +1,30 @@ +#ifndef __MGTK_TERMINAL_H +#define __MGTK_TERMINAL_H + +#include<mgtk/widget.h> +#include<mgtk/pen.h> + +class GTerminal: public GWidget +{ +public: + GTerminal(GRect * r,int cursor_vis,unsigned long TextColor=0x00FF00, + unsigned long BackgrColor=0); + virtual ~GTerminal(); + virtual void DrawWidget(); + virtual void Putch(char); + virtual void ClrScr(); + virtual void Idle(); + virtual void Scroll(); + inline void Puts(char * s) + { + for(;*s;s++) Putch(*s); + } +private: + int cx,cy; + char * screen_buf; + int xchars,ychars; + unsigned long _tcolor,_bcolor; + void LocalUpdate(); +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/text.h b/contrib/media/updf/include/mgtk/text.h new file mode 100644 index 0000000000..1f0fcf50cd --- /dev/null +++ b/contrib/media/updf/include/mgtk/text.h @@ -0,0 +1,49 @@ +#ifndef __MGTK_TEXT_H +#define __MGTK_TEXT_H + +#include<mgtk/widget.h> + +#define BIG_FONT_XSZ 7 +#define BIG_FONT_YSZ 9 +#define SMALL_FONT_XSZ 5 +#define SMALL_FONT_YSZ 7 + +class GStaticText: public GWidget +{ +public: + GStaticText(GRect *,char *,unsigned long); + virtual ~GStaticText(); + virtual void DrawWidget(); +private: + unsigned long color; + char * text; + int tlen; +}; + +class GInputLine: public GWidget +{ +public: + GInputLine(GRect *,char *); + virtual ~GInputLine(); + virtual void DrawWidget(); + virtual void HandleEvent(GEvent * ev); + virtual void Idle(); + char * GetData(); +private: + int cur_pos,max_len; + char * text_buffer; + bool vis; + int blink_cnt; +}; + +class GLine: public GWidget +{ +public: + GLine(GRect *,int is_vertical); + virtual ~GLine(); + virtual void DrawWidget(); +private: + int vert; +}; + +#endif diff --git a/contrib/media/updf/include/mgtk/types.h b/contrib/media/updf/include/mgtk/types.h new file mode 100644 index 0000000000..e0a31c4557 --- /dev/null +++ b/contrib/media/updf/include/mgtk/types.h @@ -0,0 +1,22 @@ +#ifndef __MGTK_TYPES_H +#define __MGTK_TYPES_H + +typedef struct { + int x,y; +} GPoint; + +typedef struct { + int x,y; + int w,h; + inline void Assign(int _x,int _y,int _w,int _h) + { + x=_x; + y=_y; + w=_w; + h=_h; + } +} GRect; + +#define RGB(r,g,b) (((b)&0xff)|(((g)&0x00ff)<<8)|(((r)&0x0000ff)<<16)) + +#endif diff --git a/contrib/media/updf/include/mgtk/widget.h b/contrib/media/updf/include/mgtk/widget.h new file mode 100644 index 0000000000..c7088ace5d --- /dev/null +++ b/contrib/media/updf/include/mgtk/widget.h @@ -0,0 +1,63 @@ +#ifndef __MGTK_WIDGET_H +#define __MGTK_WIDGET_H + +#include<mgtk/event.h> +#include<mgtk/types.h> + +#define wf_Visible 0x00000001 +#define wf_Disabled 0x00000002 +#define wf_Focused 0x00000004 +#define wf_Selected 0x00000008 + +class GGroup; + +class GWidget +{ +public: + GGroup * Parent; + GPoint Origin; + GPoint Size; + GWidget * WNext; + GWidget * WPrev; + unsigned long Flags; + GWidget(); + virtual ~GWidget(); + virtual void HandleEvent(GEvent *); + void Draw(void); + virtual void DrawWidget(); + virtual void ToGlobal(GPoint *); + virtual void ToLocal(GPoint *); + virtual void Idle(); + virtual void SetBounds(GRect *); + int MouseInWidget(int,int); + void ClearEvent(GEvent *); + virtual void Show(); + virtual void Hide(); + virtual void Select(bool); + virtual bool IsGroup(); + inline bool IsDisabled() { return Flags&wf_Disabled; } +}; + +class GGroup: public GWidget +{ +public: + GRect Clip; + GWidget * WFirst; + GWidget * WSelect; + GGroup(); + virtual ~GGroup(); + virtual void HandleEvent(GEvent *); + virtual void DrawWidget(); + virtual void Insert(GWidget *); + virtual void Remove(GWidget *); + virtual void ForEach(void (*fn)(GGroup *,GWidget *,void *),void *); + virtual void Show(); + virtual void Hide(); + virtual void Select(GWidget *,bool); + virtual GWidget * Select(); + virtual bool IsGroup(); + virtual void BroadcastEvent(GEvent *); + virtual void RepaintWhole(); +}; + +#endif diff --git a/contrib/media/updf/include/minilzo.h b/contrib/media/updf/include/minilzo.h new file mode 100644 index 0000000000..b67147d82d --- /dev/null +++ b/contrib/media/updf/include/minilzo.h @@ -0,0 +1,97 @@ +/* minilzo.h -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + + The LZO library 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. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Markus F.X.J. Oberhumer + <markus.oberhumer@jk.uni-linz.ac.at> + http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html + */ + + +#ifndef __MINILZO_H +#define __MINILZO_H + +#define MINILZO_VERSION 0x1070 + +#ifdef __LZOCONF_H +# error "you cannot use both LZO and miniLZO" +#endif + +#undef LZO_HAVE_CONFIG_H +#include "lzoconf.h" + +#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) +# error "version mismatch in header files" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// +************************************************************************/ + +/* Memory required for the wrkmem parameter. + * When the required size is 0, you can also pass a NULL pointer. + */ + +#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS +#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) +#define LZO1X_MEM_DECOMPRESS (0) + + +/* compression */ +LZO_EXTERN(int) +lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem ); + +/* decompression */ +LZO_EXTERN(int) +lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + +/* safe decompression with overrun testing */ +LZO_EXTERN(int) +lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + diff --git a/contrib/media/updf/include/mntent.h b/contrib/media/updf/include/mntent.h new file mode 100644 index 0000000000..aa1d2ae3d3 --- /dev/null +++ b/contrib/media/updf/include/mntent.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_mntent_h_ +#define __dj_include_mntent_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdio.h> + +#define MNT_MNTTAB "/etc/mnttab" + +struct mntent +{ + char *mnt_fsname; + char *mnt_dir; + char *mnt_type; + char *mnt_opts; + int mnt_freq; + int mnt_passno; + long mnt_time; +}; + +extern FILE * setmntent(char *,char *); +extern struct mntent * getmntent(FILE *); +extern int addmntent(FILE *,struct mntent *); +extern char * hasmntopt(struct mntent *,char *); +extern int endmntent(FILE *); + + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_mntent_h_ */ diff --git a/contrib/media/updf/include/mpeg.h b/contrib/media/updf/include/mpeg.h new file mode 100644 index 0000000000..58d99b147c --- /dev/null +++ b/contrib/media/updf/include/mpeg.h @@ -0,0 +1,119 @@ +/* ----------------------------- MNI Header ----------------------------------- +@NAME : mpeg.h +@INPUT : +@OUTPUT : +@RETURNS : +@DESCRIPTION: Types and function prototypes needed for applications to + use the Berkely MPEG decoding engine via the MNI front + end. +@METHOD : +@GLOBALS : Types defined: + ImageDesc - structure giving height, width, etc. + DitherEnum - the different dither types supported by + the decoding engine +@CALLS : +@CREATED : Greg Ward, 94/6/16. +@MODIFIED : Greg Ward, 94/9/12 (based on John Cristy's fixes): made + more amenable to use with other libraries that also + happen to define TRUE, FALSE, [Bb]oolean, and added + PROTO macro +---------------------------------------------------------------------------- */ + +#ifndef __MPEG_H +#define __MPEG_H + +#include <stdio.h> + +/* An attempt at a portable and integrable boolean type... */ + +#if (!defined(TRUE) || !defined(FALSE)) +# define TRUE 1 +# define FALSE 0 +#endif + +#if (!defined (BOOLEAN_TYPE_EXISTS)) +typedef unsigned int Boolean; +#endif + +typedef struct +{ + short red, green, blue; +} ColormapEntry; + +typedef struct +{ + int Height; /* in pixels */ + int Width; + int Depth; /* image depth (bits) */ + int PixelSize; /* bits actually stored per pixel */ + int Size; /* bytes for whole image */ + int BitmapPad; /* "quantum" of a scanline -- each scanline */ + /* starts on an even interval of this */ + /* many bits */ + int PictureRate; /* required number of frames/sec [?] */ + int BitRate; /* ??? */ + + int ColormapSize; + ColormapEntry *Colormap; /* an array of ColormapSize entries */ +} ImageDesc; + +typedef enum +{ + HYBRID_DITHER, + HYBRID2_DITHER, + FS4_DITHER, + FS2_DITHER, + FS2FAST_DITHER, + Twox2_DITHER, + GRAY_DITHER, + FULL_COLOR_DITHER, + NO_DITHER, + ORDERED_DITHER, + MONO_DITHER, + MONO_THRESHOLD, + ORDERED2_DITHER, + MBORDERED_DITHER +} DitherEnum; + + +typedef enum +{ + MPEG_DITHER, + MPEG_QUIET, + MPEG_LUM_RANGE, + MPEG_CR_RANGE, + MPEG_CB_RANGE, + MPEG_CMAP_INDEX +} MPEGOptionEnum; + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Kludge so we can compile under ANSI or K&R. (This only means + * that programs that *use* mpeg_lib can be compiled with K&R; + * the library itself must be compiled with an ANSI compiler. + * Mixing and matching compilers, BTW, is not a good idea...) + */ +#undef PROTO +#if __STDC__ || __cplusplus +#define PROTO(formal_parameters) formal_parameters +#else +#define const +#define PROTO(formal_parameters) () +#endif + +/* Function prototypes (all are defined in wrapper.c) */ + +Boolean OpenMPEG PROTO((FILE *MPEGfile, ImageDesc *ImgInfo)); +void CloseMPEG PROTO((void)); +Boolean RewindMPEG PROTO((FILE *MPEGfile, ImageDesc *Image)); +void SetMPEGOption PROTO((MPEGOptionEnum Option, int value)); +Boolean GetMPEGFrame PROTO((char *Frame)); + +#ifdef __cplusplus +} +#endif + +#endif /* __MPEG_H */ diff --git a/contrib/media/updf/include/mqc.h b/contrib/media/updf/include/mqc.h new file mode 100644 index 0000000000..d00cd1067d --- /dev/null +++ b/contrib/media/updf/include/mqc.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __MQC_H +#define __MQC_H +/** +@file mqc.h +@brief Implementation of an MQ-Coder (MQC) + +The functions in MQC.C have for goal to realize the MQ-coder operations. The functions +in MQC.C are used by some function in T1.C. +*/ + +/** @defgroup MQC MQC - Implementation of an MQ-Coder */ +/*@{*/ + +/** +This struct defines the state of a context. +*/ +typedef struct opj_mqc_state { + /** the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) */ + unsigned int qeval; + /** the Most Probable Symbol (0 or 1) */ + int mps; + /** next state if the next encoded symbol is the MPS */ + struct opj_mqc_state *nmps; + /** next state if the next encoded symbol is the LPS */ + struct opj_mqc_state *nlps; +} opj_mqc_state_t; + +#define MQC_NUMCTXS 19 + +/** +MQ coder +*/ +typedef struct opj_mqc { + unsigned int c; + unsigned int a; + unsigned int ct; + unsigned char *bp; + unsigned char *start; + unsigned char *end; + opj_mqc_state_t *ctxs[MQC_NUMCTXS]; + opj_mqc_state_t **curctx; +#ifdef MQC_PERF_OPT + unsigned char *buffer; +#endif +} opj_mqc_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new MQC handle +@return Returns a new MQC handle if successful, returns NULL otherwise +*/ +opj_mqc_t* mqc_create(void); +/** +Destroy a previously created MQC handle +@param mqc MQC handle to destroy +*/ +void mqc_destroy(opj_mqc_t *mqc); +/** +Return the number of bytes written/read since initialisation +@param mqc MQC handle +@return Returns the number of bytes already encoded +*/ +int mqc_numbytes(opj_mqc_t *mqc); +/** +Reset the states of all the context of the coder/decoder +(each context is set to a state where 0 and 1 are more or less equiprobable) +@param mqc MQC handle +*/ +void mqc_resetstates(opj_mqc_t *mqc); +/** +Set the state of a particular context +@param mqc MQC handle +@param ctxno Number that identifies the context +@param msb The MSB of the new state of the context +@param prob Number that identifies the probability of the symbols for the new state of the context +*/ +void mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob); +/** +Initialize the encoder +@param mqc MQC handle +@param bp Pointer to the start of the buffer where the bytes will be written +*/ +void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp); +/** +Set the current context used for coding/decoding +@param mqc MQC handle +@param ctxno Number that identifies the context +*/ +#define mqc_setcurctx(mqc, ctxno) (mqc)->curctx = &(mqc)->ctxs[(int)(ctxno)] +/** +Encode a symbol using the MQ-coder +@param mqc MQC handle +@param d The symbol to be encoded (0 or 1) +*/ +void mqc_encode(opj_mqc_t *mqc, int d); +/** +Flush the encoder, so that all remaining data is written +@param mqc MQC handle +*/ +void mqc_flush(opj_mqc_t *mqc); +/** +BYPASS mode switch, initialization operation. +JPEG 2000 p 505. +<h2>Not fully implemented and tested !!</h2> +@param mqc MQC handle +*/ +void mqc_bypass_init_enc(opj_mqc_t *mqc); +/** +BYPASS mode switch, coding operation. +JPEG 2000 p 505. +<h2>Not fully implemented and tested !!</h2> +@param mqc MQC handle +@param d The symbol to be encoded (0 or 1) +*/ +void mqc_bypass_enc(opj_mqc_t *mqc, int d); +/** +BYPASS mode switch, flush operation +<h2>Not fully implemented and tested !!</h2> +@param mqc MQC handle +@return Returns 1 (always) +*/ +int mqc_bypass_flush_enc(opj_mqc_t *mqc); +/** +RESET mode switch +@param mqc MQC handle +*/ +void mqc_reset_enc(opj_mqc_t *mqc); +/** +RESTART mode switch (TERMALL) +@param mqc MQC handle +@return Returns 1 (always) +*/ +int mqc_restart_enc(opj_mqc_t *mqc); +/** +RESTART mode switch (TERMALL) reinitialisation +@param mqc MQC handle +*/ +void mqc_restart_init_enc(opj_mqc_t *mqc); +/** +ERTERM mode switch (PTERM) +@param mqc MQC handle +*/ +void mqc_erterm_enc(opj_mqc_t *mqc); +/** +SEGMARK mode switch (SEGSYM) +@param mqc MQC handle +*/ +void mqc_segmark_enc(opj_mqc_t *mqc); +/** +Initialize the decoder +@param mqc MQC handle +@param bp Pointer to the start of the buffer from which the bytes will be read +@param len Length of the input buffer +*/ +void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len); +/** +Decode a symbol +@param mqc MQC handle +@return Returns the decoded symbol (0 or 1) +*/ +int mqc_decode(opj_mqc_t *const mqc); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __MQC_H */ diff --git a/contrib/media/updf/include/mystring.h b/contrib/media/updf/include/mystring.h new file mode 100644 index 0000000000..753552cc9d --- /dev/null +++ b/contrib/media/updf/include/mystring.h @@ -0,0 +1,510 @@ +#ifndef _I386_STRING_H_ +#define _I386_STRING_H_ + +#ifndef STATIC +#define STATIC static +#endif + +#ifndef INLINE +#define INLINE inline +#endif + +#include<stdlib.h> + +#define __HAVE_ARCH_STRCPY +STATIC INLINE char * strcpy(char * dest,const char *src) +{ +int d0, d1, d2; +__asm__ __volatile__( + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + : "=&S" (d0), "=&D" (d1), "=&a" (d2) + :"0" (src),"1" (dest) : "memory"); +return dest; +} + +#define __HAVE_ARCH_STRNCPY +STATIC INLINE char * strncpy(char * dest,const char *src,size_t count) +{ +int d0, d1, d2, d3; +__asm__ __volatile__( + "1:\tdecl %2\n\t" + "js 2f\n\t" + "lodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "rep\n\t" + "stosb\n" + "2:" + : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) + :"0" (src),"1" (dest),"2" (count) : "memory"); +return dest; +} + +#define __HAVE_ARCH_STRCAT +STATIC INLINE char * strcat(char * dest,const char * src) +{ +int d0, d1, d2, d3; +__asm__ __volatile__( + "repne\n\t" + "scasb\n\t" + "decl %1\n" + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) + : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); +return dest; +} + +#define __HAVE_ARCH_STRNCAT +STATIC INLINE char * strncat(char * dest,const char * src,size_t count) +{ +int d0, d1, d2, d3; +__asm__ __volatile__( + "repne\n\t" + "scasb\n\t" + "decl %1\n\t" + "movl %8,%3\n" + "1:\tdecl %3\n\t" + "js 2f\n\t" + "lodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n" + "2:\txorl %2,%2\n\t" + "stosb" + : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) + : "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count) + : "memory"); +return dest; +} + +#define __HAVE_ARCH_STRCMP +STATIC INLINE int strcmp(const char * cs,const char * ct) +{ +int d0, d1; +register int __res; +__asm__ __volatile__( + "1:\tlodsb\n\t" + "scasb\n\t" + "jne 2f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "xorl %%eax,%%eax\n\t" + "jmp 3f\n" + "2:\tsbbl %%eax,%%eax\n\t" + "orb $1,%%al\n" + "3:" + :"=a" (__res), "=&S" (d0), "=&D" (d1) + :"1" (cs),"2" (ct)); +return __res; +} + +#define __HAVE_ARCH_STRNCMP +STATIC INLINE int strncmp(const char * cs,const char * ct,size_t count) +{ +register int __res; +int d0, d1, d2; +__asm__ __volatile__( + "1:\tdecl %3\n\t" + "js 2f\n\t" + "lodsb\n\t" + "scasb\n\t" + "jne 3f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n" + "2:\txorl %%eax,%%eax\n\t" + "jmp 4f\n" + "3:\tsbbl %%eax,%%eax\n\t" + "orb $1,%%al\n" + "4:" + :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) + :"1" (cs),"2" (ct),"3" (count)); +return __res; +} + +#define __HAVE_ARCH_STRCHR +STATIC INLINE char * strchr(const char * s, int c) +{ +int d0; +register char * __res; +__asm__ __volatile__( + "movb %%al,%%ah\n" + "1:\tlodsb\n\t" + "cmpb %%ah,%%al\n\t" + "je 2f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "movl $1,%1\n" + "2:\tmovl %1,%0\n\t" + "decl %0" + :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); +return __res; +} + +#define __HAVE_ARCH_STRRCHR +STATIC INLINE char * strrchr(const char * s, int c) +{ +int d0, d1; +register char * __res; +__asm__ __volatile__( + "movb %%al,%%ah\n" + "1:\tlodsb\n\t" + "cmpb %%ah,%%al\n\t" + "jne 2f\n\t" + "leal -1(%%esi),%0\n" + "2:\ttestb %%al,%%al\n\t" + "jne 1b" + :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); +return __res; +} + +#define __HAVE_ARCH_STRLEN +STATIC INLINE size_t strlen(const char * s) +{ +int d0; +register int __res; +__asm__ __volatile__( + "repne\n\t" + "scasb\n\t" + "notl %0\n\t" + "decl %0" + :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff)); +return __res; +} + +static inline void * __memcpy(void * to, const void * from, size_t n) +{ +int d0, d1, d2; +__asm__ __volatile__( + "rep ; movsl\n\t" + "testb $2,%b4\n\t" + "je 1f\n\t" + "movsw\n" + "1:\ttestb $1,%b4\n\t" + "je 2f\n\t" + "movsb\n" + "2:" + : "=&c" (d0), "=&D" (d1), "=&S" (d2) + :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) + : "memory"); +return (to); +} + +/* + * This looks horribly ugly, but the compiler can optimize it totally, + * as the count is constant. + */ +static inline void * __constant_memcpy(void * to, const void * from, size_t n) +{ + switch (n) { + case 0: + return to; + case 1: + *(unsigned char *)to = *(const unsigned char *)from; + return to; + case 2: + *(unsigned short *)to = *(const unsigned short *)from; + return to; + case 3: + *(unsigned short *)to = *(const unsigned short *)from; + *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); + return to; + case 4: + *(unsigned long *)to = *(const unsigned long *)from; + return to; + case 6: /* for Ethernet addresses */ + *(unsigned long *)to = *(const unsigned long *)from; + *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); + return to; + case 8: + *(unsigned long *)to = *(const unsigned long *)from; + *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); + return to; + case 12: + *(unsigned long *)to = *(const unsigned long *)from; + *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); + *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); + return to; + case 16: + *(unsigned long *)to = *(const unsigned long *)from; + *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); + *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); + *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); + return to; + case 20: + *(unsigned long *)to = *(const unsigned long *)from; + *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); + *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); + *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); + *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); + return to; + } +#define COMMON(x) \ +__asm__ __volatile__( \ + "rep ; movsl" \ + x \ + : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ + : "0" (n/4),"1" ((long) to),"2" ((long) from) \ + : "memory"); +{ + int d0, d1, d2; + switch (n % 4) { + case 0: COMMON(""); return to; + case 1: COMMON("\n\tmovsb"); return to; + case 2: COMMON("\n\tmovsw"); return to; + default: COMMON("\n\tmovsw\n\tmovsb"); return to; + } +} + +#undef COMMON +} + +#define __HAVE_ARCH_MEMCPY + +#ifdef CONFIG_X86_USE_3DNOW + +#include <asm/mmx.h> + +/* + * This CPU favours 3DNow strongly (eg AMD Athlon) + */ + +static inline void * __constant_memcpy3d(void * to, const void * from, size_t len) +{ + if (len < 512) + return __constant_memcpy(to, from, len); + return _mmx_memcpy(to, from, len); +} + +static inline void *__memcpy3d(void *to, const void *from, size_t len) +{ + if (len < 512) + return __memcpy(to, from, len); + return _mmx_memcpy(to, from, len); +} + +#define memcpy(t, f, n) \ +(__builtin_constant_p(n) ? \ + __constant_memcpy3d((t),(f),(n)) : \ + __memcpy3d((t),(f),(n))) + +#else + +/* + * No 3D Now! + */ + +#define memcpy(t, f, n) \ +(__builtin_constant_p(n) ? \ + __constant_memcpy((t),(f),(n)) : \ + __memcpy((t),(f),(n))) + +#endif + +/* + * struct_cpy(x,y), copy structure *x into (matching structure) *y. + * + * We get link-time errors if the structure sizes do not match. + * There is no runtime overhead, it's all optimized away at + * compile time. + */ +extern void __struct_cpy_bug (void); + +#define struct_cpy(x,y) \ +({ \ + if (sizeof(*(x)) != sizeof(*(y))) \ + __struct_cpy_bug; \ + memcpy(x, y, sizeof(*(x))); \ +}) + +#define __HAVE_ARCH_MEMMOVE +STATIC INLINE void * memmove(void * dest,const void * src, size_t n) +{ +int d0, d1, d2; +if (dest<src) +__asm__ __volatile__( + "rep\n\t" + "movsb" + : "=&c" (d0), "=&S" (d1), "=&D" (d2) + :"0" (n),"1" (src),"2" (dest) + : "memory"); +else +__asm__ __volatile__( + "std\n\t" + "rep\n\t" + "movsb\n\t" + "cld" + : "=&c" (d0), "=&S" (d1), "=&D" (d2) + :"0" (n), + "1" (n-1+(const char *)src), + "2" (n-1+(char *)dest) + :"memory"); +return dest; +} + +#define memcmp __builtin_memcmp + +#define __HAVE_ARCH_MEMCHR +STATIC INLINE void * memchr(const void * cs,int c,size_t count) +{ +int d0; +register void * __res; +if (!count) + return NULL; +__asm__ __volatile__( + "repne\n\t" + "scasb\n\t" + "je 1f\n\t" + "movl $1,%0\n" + "1:\tdecl %0" + :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); +return __res; +} + +static inline void * __memset_generic(void * s, char c,size_t count) +{ +int d0, d1; +__asm__ __volatile__( + "rep\n\t" + "stosb" + : "=&c" (d0), "=&D" (d1) + :"a" (c),"1" (s),"0" (count) + :"memory"); +return s; +} + +/* we might want to write optimized versions of these later */ +#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) + +/* + * memset(x,0,y) is a reasonably common thing to do, so we want to fill + * things 32 bits at a time even when we don't know the size of the + * area at compile-time.. + */ +static inline void * __constant_c_memset(void * s, unsigned long c, size_t count) +{ +int d0, d1; +__asm__ __volatile__( + "rep ; stosl\n\t" + "testb $2,%b3\n\t" + "je 1f\n\t" + "stosw\n" + "1:\ttestb $1,%b3\n\t" + "je 2f\n\t" + "stosb\n" + "2:" + : "=&c" (d0), "=&D" (d1) + :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) + :"memory"); +return (s); +} + +/* Added by Gertjan van Wingerde to make minix and sysv module work */ +#define __HAVE_ARCH_STRNLEN +STATIC INLINE size_t strnlen(const char * s, size_t count) +{ +int d0; +register int __res; +__asm__ __volatile__( + "movl %2,%0\n\t" + "jmp 2f\n" + "1:\tcmpb $0,(%0)\n\t" + "je 3f\n\t" + "incl %0\n" + "2:\tdecl %1\n\t" + "cmpl $-1,%1\n\t" + "jne 1b\n" + "3:\tsubl %2,%0" + :"=a" (__res), "=&d" (d0) + :"c" (s),"1" (count)); +return __res; +} +/* end of additional stuff */ + +#define __HAVE_ARCH_STRSTR + +extern char *strstr(const char *cs, const char *ct); + +/* + * This looks horribly ugly, but the compiler can optimize it totally, + * as we by now know that both pattern and count is constant.. + */ +static inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) +{ + switch (count) { + case 0: + return s; + case 1: + *(unsigned char *)s = pattern; + return s; + case 2: + *(unsigned short *)s = pattern; + return s; + case 3: + *(unsigned short *)s = pattern; + *(2+(unsigned char *)s) = pattern; + return s; + case 4: + *(unsigned long *)s = pattern; + return s; + } +#define COMMON(x) \ +__asm__ __volatile__( \ + "rep ; stosl" \ + x \ + : "=&c" (d0), "=&D" (d1) \ + : "a" (pattern),"0" (count/4),"1" ((long) s) \ + : "memory") +{ + int d0, d1; + switch (count % 4) { + case 0: COMMON(""); return s; + case 1: COMMON("\n\tstosb"); return s; + case 2: COMMON("\n\tstosw"); return s; + default: COMMON("\n\tstosw\n\tstosb"); return s; + } +} + +#undef COMMON +} + +#define __constant_c_x_memset(s, c, count) \ +(__builtin_constant_p(count) ? \ + __constant_c_and_count_memset((s),(c),(count)) : \ + __constant_c_memset((s),(c),(count))) + +#define __memset(s, c, count) \ +(__builtin_constant_p(count) ? \ + __constant_count_memset((s),(c),(count)) : \ + __memset_generic((s),(c),(count))) + +#define __HAVE_ARCH_MEMSET +#define memset(s, c, count) \ +(__builtin_constant_p(c) ? \ + __constant_c_x_memset((s),(0x01010101UL*(unsigned char)(c)),(count)) : \ + __memset((s),(c),(count))) + +/* + * find the first occurrence of byte 'c', or 1 past the area if none + */ +#define __HAVE_ARCH_MEMSCAN +STATIC INLINE void * memscan(void * addr, int c, size_t size) +{ + if (!size) + return addr; + __asm__("repnz; scasb\n\t" + "jnz 1f\n\t" + "dec %%edi\n" + "1:" + : "=D" (addr), "=c" (size) + : "0" (addr), "1" (size), "a" (c)); + return addr; +} + +#endif diff --git a/contrib/media/updf/include/nc_alloc.h b/contrib/media/updf/include/nc_alloc.h new file mode 100644 index 0000000000..54a706e142 --- /dev/null +++ b/contrib/media/updf/include/nc_alloc.h @@ -0,0 +1,72 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 * + ****************************************************************************/ +/* $Id: nc_alloc.h,v 1.5 1998/02/11 12:13:45 tom Exp $ */ + +#ifndef NC_ALLOC_included +#define NC_ALLOC_included 1 + +#if HAVE_LIBDMALLOC +#include <dmalloc.h> /* Gray Watson's library */ +#else +#undef HAVE_LIBDMALLOC +#define HAVE_LIBDMALLOC 0 +#endif + +#if HAVE_LIBDBMALLOC +#include <dbmalloc.h> /* Conor Cahill's library */ +#else +#undef HAVE_LIBDBMALLOC +#define HAVE_LIBDBMALLOC 0 +#endif + +#ifndef NO_LEAKS +#define NO_LEAKS 0 +#endif + +#ifndef HAVE_NC_FREEALL +#define HAVE_NC_FREEALL 0 +#endif + +#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS || HAVE_NC_FREEALL +struct termtype; +extern void _nc_free_and_exit(int) GCC_NORETURN; +extern void _nc_free_tparm(void); +extern void _nc_leaks_dump_entry(void); +extern void _nc_free_termtype(struct termtype *, int); +#define ExitProgram(code) _nc_free_and_exit(code) +#endif + +#ifndef ExitProgram +#define ExitProgram(code) return code +#endif + +#endif /* NC_ALLOC_included */ diff --git a/contrib/media/updf/include/nc_panel.h b/contrib/media/updf/include/nc_panel.h new file mode 100644 index 0000000000..dbb20fa184 --- /dev/null +++ b/contrib/media/updf/include/nc_panel.h @@ -0,0 +1,66 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + ****************************************************************************/ + + +/* + * $Id: nc_panel.h,v 1.2 1998/02/11 12:13:45 tom Exp $ + * + * nc_panel.h + * + * Headerfile to provide an interface for the panel layer into + * the SCREEN structure of the ncurses core. + */ + +#ifndef NC_PANEL_H +#define NC_PANEL_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +struct panel; /* Forward Declaration */ + +struct panelhook { + struct panel* top_panel; + struct panel* bottom_panel; + struct panel* stdscr_pseudo_panel; +}; + +/* Retrieve the panelhook of the current screen */ +extern struct panelhook* _nc_panelhook(void); + +#ifdef __cplusplus +} +#endif + +#endif /* NC_PANEL_H */ diff --git a/contrib/media/updf/include/ncurses_cfg.h b/contrib/media/updf/include/ncurses_cfg.h new file mode 100644 index 0000000000..f4119fb6a9 --- /dev/null +++ b/contrib/media/updf/include/ncurses_cfg.h @@ -0,0 +1,124 @@ +/* include/ncurses_cfg.h. Generated automatically by configure. */ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey <dickey@clark.net> 1997 * + ****************************************************************************/ +/* + * $Id: ncurses_cfg.hin,v 1.2 1998/02/11 12:13:46 tom Exp $ + * + * This is a template-file used to generate the "ncurses_cfg.h" file. + * + * Rather than list every definition, the configuration script substitutes + * the definitions that it finds using 'sed'. You need a patch (971222) + * to autoconf 2.12 to do this. + */ +#ifndef NC_CONFIG_H +#define NC_CONFIG_H + +#define CC_HAS_INLINE_FUNCS 1 +#define GCC_NORETURN __attribute__((noreturn)) +#define GCC_PRINTF 1 +#define GCC_SCANF 1 +#define GCC_UNUSED __attribute__((unused)) +#define GOOD_SELECT 1 +#define HAVE_DIRENT_H 1 +#define HAVE_ERRNO 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FORM_H 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GETTTYNAM 1 +#define HAVE_ISASCII 1 +#define HAVE_LIBFORM 1 +#define HAVE_LIBMENU 1 +#define HAVE_LIBPANEL 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LINK 1 +#define HAVE_LOCALE_H 1 +#define HAVE_LONG_FILE_NAMES 1 +#define HAVE_MEMCCPY 1 +#define HAVE_MENU_H 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_NC_ALLOC_H 1 +#define HAVE_PANEL_H 1 +#define HAVE_POLL 1 +#define HAVE_POLL_H 1 +#define HAVE_REGEX_H_FUNCS 1 +#define HAVE_REMOVE 1 +#define HAVE_SELECT 1 +#define HAVE_SETBUF 1 +#define HAVE_SETBUFFER 1 +#define HAVE_SETVBUF 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGVEC 1 +#define HAVE_SIZECHANGE 1 +#define HAVE_STRDUP 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_STROPTS_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIME_SELECT 1 +#define HAVE_TCGETATTR 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_TERMIO_H 1 +#define HAVE_TIMES 1 +#define HAVE_TTYENT_H 1 +#define HAVE_TYPEINFO 1 +#define HAVE_UNISTD_H 1 +#define HAVE_USLEEP 1 +#define HAVE_VALUES_H 1 +#define HAVE_VFSCANF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSSCANF 1 +#define NCURSES_EXT_FUNCS 1 +#define NDEBUG 1 +#define PURE_TERMINFO 1 +#define RETSIGTYPE void +#define STDC_HEADERS 1 +#define SYSTEM_NAME "linux-gnu" +#define TYPEOF_CHTYPE long +#define USE_DATABASE 1 +#define USE_SCROLL_HINTS 1 + + /* The C compiler may not treat these properly but C++ has to */ +#ifdef __cplusplus +#undef const +#undef inline +#else +#if defined(lint) || defined(TRACE) +#undef inline +#define inline /* nothing */ +#endif +#endif + +#endif /* NC_CONFIG_H */ diff --git a/contrib/media/updf/include/netdb.h b/contrib/media/updf/include/netdb.h new file mode 100644 index 0000000000..da88800d19 --- /dev/null +++ b/contrib/media/updf/include/netdb.h @@ -0,0 +1,128 @@ +#ifndef _NETDB_H +#define _NETDB_H + +#include <sys/cdefs.h> +#include <sys/types.h> + +__BEGIN_DECLS + +/* Absolute file name for network data base files. */ +#define _PATH_HEQUIV "/etc/hosts.equiv" +#define _PATH_HOSTS "/etc/hosts" +#define _PATH_NETWORKS "/etc/networks" +#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" +#define _PATH_PROTOCOLS "/etc/protocols" +#define _PATH_SERVICES "/etc/services" + +/* Description of data base entry for a single service. */ +struct servent { + char *s_name; /* Official service name. */ + char **s_aliases; /* Alias list. */ + int s_port; /* Port number. */ + char *s_proto; /* Protocol to use. */ +}; + +extern void endservent (void) ; +extern void setservent(int stayopen) ; + +extern int getservent_r(struct servent *res, char *buf, size_t buflen, + struct servent **res_sig) ; +extern int getservbyname_r(const char* name,const char* proto, + struct servent *res, char *buf, size_t buflen, + struct servent **res_sig) ; +extern int getservbyport_r(int port,const char* proto, + struct servent *res, char *buf, size_t buflen, + struct servent **res_sig) ; + +extern struct servent *getservent(void) ; +extern struct servent *getservbyname (const char *__name, + const char *__proto) ; +extern struct servent *getservbyport (int __port, const char *__proto) + ; + +struct hostent { + char *h_name; /* Official name of host. */ + char **h_aliases; /* Alias list. */ + int h_addrtype; /* Host address type. */ + socklen_t h_length; /* Length of address. */ + char **h_addr_list; /* List of addresses from name server. */ +#define h_addr h_addr_list[0] /* Address, for backward compatibility. */ +}; + +extern void endhostent (void) ; +extern struct hostent *gethostent (void) ; +extern struct hostent *gethostent_r (char* buf,int len) ; +extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len, + int __type) ; +extern struct hostent *gethostbyname (const char *__name) ; +extern struct hostent *gethostbyname2 (const char *__name, int __af) ; + +/* this glibc "invention" is so ugly, I'm going to throw up any minute + * now */ +extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF, + size_t BUFLEN, struct hostent** RESULT, + int* H_ERRNOP) ; + +#define HOST_NOT_FOUND 1 +#define TRY_AGAIN 2 +#define NO_RECOVERY 3 +#define NO_ADDRESS 4 +#define NO_DATA 5 + +extern int gethostbyaddr_r(const char* addr, size_t length, int format, + struct hostent* result, char *buf, size_t buflen, + struct hostent **RESULT, int *h_errnop) ; + +int gethostbyname2_r(const char* name, int AF, struct hostent* result, + char *buf, size_t buflen, + struct hostent **RESULT, int *h_errnop) ; + +struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol number */ +}; + +struct protoent *getprotoent(void) ; +struct protoent *getprotobyname(const char *name) ; +struct protoent *getprotobynumber(int proto) ; +void setprotoent(int stayopen) ; +void endprotoent(void) ; + +int getprotoent_r(struct protoent *res, char *buf, size_t buflen, + struct protoent **res_sig) ; +int getprotobyname_r(const char* name, + struct protoent *res, char *buf, size_t buflen, + struct protoent **res_sig) ; +int getprotobynumber_r(int proto, + struct protoent *res, char *buf, size_t buflen, + struct protoent **res_sig) ; + + +void sethostent(int stayopen) ; + +/* dummy */ +extern int h_errno; + +struct netent { + char *n_name; /* official network name */ + char **n_aliases; /* alias list */ + int n_addrtype; /* net address type */ + unsigned long int n_net; /* network number */ +}; + +struct netent *getnetbyaddr(unsigned long net, int type) ; +void endnetent(void) ; +void setnetent(int stayopen) ; +struct netent *getnetbyname(const char *name) ; +struct netent *getnetent(void) ; + +extern const char *hstrerror (int err_num) ; +void herror(const char *s) ; + +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/nomacros.h b/contrib/media/updf/include/nomacros.h new file mode 100644 index 0000000000..5b697dc3a1 --- /dev/null +++ b/contrib/media/updf/include/nomacros.h @@ -0,0 +1,113 @@ +#undef addch +#undef addchnstr +#undef addchstr +#undef addnstr +#undef addstr +#undef attroff +#undef attron +#undef attrset +#undef attr_get +#undef attr_off +#undef attr_on +#undef attr_set +#undef bkgd +#undef bkgdset +#undef border +#undef box +#undef chgat +#undef clear +#undef clrtobot +#undef clrtoeol +#undef COLOR_PAIR +#undef delch +#undef deleteln +#undef echochar +#undef getbkgd +#undef getch +#undef getnstr +#undef getstr +#undef hline +#undef inch +#undef inchnstr +#undef inchstr +#undef innstr +#undef insch +#undef insdelln +#undef insertln +#undef insnstr +#undef insstr +#undef instr +#undef move +#undef mvaddch +#undef mvaddchnstr +#undef mvaddchstr +#undef mvaddnstr +#undef mvaddstr +#undef mvchgat +#undef mvdelch +#undef mvgetch +#undef mvgetnstr +#undef mvgetstr +#undef mvhline +#undef mvinch +#undef mvinchnstr +#undef mvinchstr +#undef mvinnstr +#undef mvinsch +#undef mvinsnstr +#undef mvinsstr +#undef mvinstr +#undef mvvline +#undef mvwaddch +#undef mvwaddchnstr +#undef mvwaddchstr +#undef mvwaddnstr +#undef mvwaddstr +#undef mvwchgat +#undef mvwdelch +#undef mvwgetch +#undef mvwgetnstr +#undef mvwgetstr +#undef mvwhline +#undef mvwinch +#undef mvwinchnstr +#undef mvwinchstr +#undef mvwinnstr +#undef mvwinsch +#undef mvwinsnstr +#undef mvwinsstr +#undef mvwinstr +#undef mvwvline +#undef PAIR_NUMBER +#undef redrawwin +#undef refresh +#undef scrl +#undef scroll +#undef setscrreg +#undef slk_attr_off +#undef slk_attr_on +#undef slk_attr_set +#undef standout +#undef standend +#undef timeout +#undef untouchwin +#undef vid_attr +#undef vline +#undef vw_printw +#undef vw_scanw +#undef waddchstr +#undef waddstr +#undef wattron +#undef wattroff +#undef wattrset +#undef wattr_get +#undef wattr_set +#undef wdeleteln +#undef wgetstr +#undef winch +#undef winchstr +#undef winsertln +#undef winsstr +#undef winstr +#undef wstandout +#undef wstandend diff --git a/contrib/media/updf/include/numbers.h b/contrib/media/updf/include/numbers.h new file mode 100644 index 0000000000..b1df324aa9 --- /dev/null +++ b/contrib/media/updf/include/numbers.h @@ -0,0 +1,181 @@ + +#ifndef __numbers_h__ +#define __numbers_h__ + +#include "lispenvironment.h" +#include "yacasbase.h" + + + +/// Whether the numeric library supports 1.0E-10 and such. +LispInt NumericSupportForMantissa(); + +LispObject* GcdInteger(LispObject* int1, LispObject* int2, LispEnvironment& aEnvironment); + +LispObject* SinFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* CosFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* TanFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* ArcSinFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* ExpFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* LnFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); + +LispObject* SqrtFloat(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* ModFloat( LispObject* int1, LispObject* int2, LispEnvironment& aEnvironment, + LispInt aPrecision); + +LispObject* PowerFloat(LispObject* int1, LispObject* int2, + LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* ShiftLeft( LispObject* int1, LispObject* int2, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* ShiftRight( LispObject* int1, LispObject* int2, LispEnvironment& aEnvironment,LispInt aPrecision); +LispObject* LispFactorial(LispObject* int1, LispEnvironment& aEnvironment,LispInt aPrecision); + + + +// methods generally useful for all numeric libraries +const unsigned GUARD_BITS = 8; // we leave this many guard bits untruncated in various situations when we need to truncate precision by hand + +template<class T> inline T MAX(T x, T y) { if (x<y) return y; else return x; } +template<class T> inline T MIN(T x, T y) { if (x>y) return y; else return x; } + +const long DIST_BITS = 1; // at least this many bits of difference - used in precision tracking + +/// DIST(x, y) returns 1 if abs(x-y) >= DIST_BITS. See documentation for precision tracking. +template<class T> inline T DIST(T x, T y) { return (x>=y+DIST_BITS || y>=x+DIST_BITS) ? 0 : 1; } + + +/** Base number class. + */ + + +class ANumber; + + + +/// Main class for multiple-precision arithmetic. +/// All calculations are done at given precision. Integers grow as needed, floats don't grow beyond given precision. +class BigNumber : public YacasBase +{ +public: //constructors + BigNumber(const LispChar * aString,LispInt aPrecision,LispInt aBase=10); +/// copy constructor + BigNumber(const BigNumber& aOther); + // no constructors from int or double to avoid automatic conversions + BigNumber(LispInt aPrecision = 20); + ~BigNumber(); + // assign from another number + void SetTo(const BigNumber& aOther); + // assign from string, precision in base digits + void SetTo(const LispChar * aString,LispInt aPrecision,LispInt aBase=10); + // assign from a platform type + void SetTo(long value); + inline void SetTo(LispInt value) { SetTo(long(value)); }; + void SetTo(double value); +public: // Convert back to other types + /// ToString : return string representation of number in aResult to given precision (base digits) + void ToString(LispString& aResult, LispInt aPrecision, LispInt aBase=10) const; + /// Give approximate representation as a double number + double Double() const; + +public://basic object manipulation + LispBoolean Equals(const BigNumber& aOther) const; + LispBoolean IsInt() const; + LispBoolean IsIntValue() const; + LispBoolean IsSmall() const; + void BecomeInt(); + void BecomeFloat(LispInt aPrecision=0); + LispBoolean LessThan(const BigNumber& aOther) const; +public://arithmetic + /// Multiply two numbers at given precision and put result in *this + void Multiply(const BigNumber& aX, const BigNumber& aY, LispInt aPrecision); + /** Multiply two numbers, and add to *this (this is useful and generally efficient to implement). + * This is most likely going to be used by internal functions only, using aResult as an accumulator. + */ + void MultiplyAdd(const BigNumber& aX, const BigNumber& aY, LispInt aPrecision); + /// Add two numbers at given precision and return result in *this + void Add(const BigNumber& aX, const BigNumber& aY, LispInt aPrecision); + /// Negate the given number, return result in *this + void Negate(const BigNumber& aX); + /// Divide two numbers and return result in *this. Note: if the two arguments are integer, it should return an integer result! + void Divide(const BigNumber& aX, const BigNumber& aY, LispInt aPrecision); + + /// integer operation: *this = y mod z + void Mod(const BigNumber& aY, const BigNumber& aZ); + + /// For debugging purposes, dump internal state of this object into a string + void DumpDebugInfo(); + +public: + /// assign self to Floor(aX) if possible + void Floor(const BigNumber& aX); + /// set precision (in bits) + void Precision(LispInt aPrecision); + +public:/// Bitwise operations, return result in *this. + void ShiftLeft( const BigNumber& aX, LispInt aNrToShift); + void ShiftRight( const BigNumber& aX, LispInt aNrToShift); + void BitAnd(const BigNumber& aX, const BigNumber& aY); + void BitOr(const BigNumber& aX, const BigNumber& aY); + void BitXor(const BigNumber& aX, const BigNumber& aY); + void BitNot(const BigNumber& aX); + /// Bit count operation: return the number of significant bits if integer, return the binary exponent if float (shortcut for binary logarithm) + /// give bit count as a platform integer + signed long BitCount() const; + + /// Give sign (-1, 0, 1) + LispInt Sign() const; + +public: + inline LispInt GetPrecision() const {return iPrecision;}; + +private: + BigNumber& operator=(const BigNumber& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +public: + ReferenceCount iReferenceCount; +private: + LispInt iPrecision; + +public: + /// Internal library wrapper starts here. + inline void SetIsInteger(LispBoolean aIsInteger) {iType = (aIsInteger ? KInt : KFloat);} + enum ENumType + { + KInt = 0, + KFloat + }; + ENumType iType; + ANumber* iNumber; + /// Internal library wrapper ends here. +}; + +/// bits_to_digits and digits_to_bits, utility functions +/// to convert the number of digits in some base (usually 10) to bits and back + +// lookup table for Ln(n)/Ln(2). This works whether or not we have math.h. +// table range is from 2 to this value: +unsigned log2_table_range(); +// convert the number of digits in given base to the number of bits, and back. +// need to round the number of digits. +// These functions only work for aBase inside the allowed table range. +unsigned long digits_to_bits(unsigned long aDigits, unsigned aBase); +unsigned long bits_to_digits(unsigned long abits, unsigned aBase); + + +#endif + + + + + + + + + + + + + diff --git a/contrib/media/updf/include/numeric b/contrib/media/updf/include/numeric new file mode 100644 index 0000000000..32ba67d1a0 --- /dev/null +++ b/contrib/media/updf/include/numeric @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_NUMERIC +#include <bits/std_numeric.h> +#endif diff --git a/contrib/media/updf/include/opcode.h b/contrib/media/updf/include/opcode.h new file mode 100644 index 0000000000..b32969d5f4 --- /dev/null +++ b/contrib/media/updf/include/opcode.h @@ -0,0 +1,144 @@ +/* +** opcode.h +** TeCGraf - PUC-Rio +** 16 Apr 92 +*/ + +#ifndef opcode_h +#define opcode_h + +#ifndef STACKGAP +#define STACKGAP 128 +#endif + +#ifndef real +#define real float +#endif + +typedef unsigned char Byte; + +typedef unsigned short Word; + +typedef enum +{ + NOP, + PUSHNIL, + PUSH0, PUSH1, PUSH2, + PUSHBYTE, + PUSHWORD, + PUSHFLOAT, + PUSHSTRING, + PUSHLOCAL0, PUSHLOCAL1, PUSHLOCAL2, PUSHLOCAL3, PUSHLOCAL4, + PUSHLOCAL5, PUSHLOCAL6, PUSHLOCAL7, PUSHLOCAL8, PUSHLOCAL9, + PUSHLOCAL, + PUSHGLOBAL, + PUSHINDEXED, + PUSHMARK, + PUSHOBJECT, + STORELOCAL0, STORELOCAL1, STORELOCAL2, STORELOCAL3, STORELOCAL4, + STORELOCAL5, STORELOCAL6, STORELOCAL7, STORELOCAL8, STORELOCAL9, + STORELOCAL, + STOREGLOBAL, + STOREINDEXED0, + STOREINDEXED, + STOREFIELD, + ADJUST, + CREATEARRAY, + EQOP, + LTOP, + LEOP, + ADDOP, + SUBOP, + MULTOP, + DIVOP, + CONCOP, + MINUSOP, + NOTOP, + ONTJMP, + ONFJMP, + JMP, + UPJMP, + IFFJMP, + IFFUPJMP, + POP, + CALLFUNC, + RETCODE, + HALT, + SETFUNCTION, + SETLINE, + RESET +} OpCode; + +typedef enum +{ + T_MARK, + T_NIL, + T_NUMBER, + T_STRING, + T_ARRAY, + T_FUNCTION, + T_CFUNCTION, + T_USERDATA +} Type; + +typedef void (*Cfunction) (void); +typedef int (*Input) (void); +typedef void (*Unput) (int ); + +typedef union +{ + Cfunction f; + real n; + char *s; + Byte *b; + struct Hash *a; + void *u; +} Value; + +typedef struct Object +{ + Type tag; + Value value; +} Object; + +typedef struct +{ + char *name; + Object object; +} Symbol; + +/* Macros to access structure members */ +#define tag(o) ((o)->tag) +#define nvalue(o) ((o)->value.n) +#define svalue(o) ((o)->value.s) +#define bvalue(o) ((o)->value.b) +#define avalue(o) ((o)->value.a) +#define fvalue(o) ((o)->value.f) +#define uvalue(o) ((o)->value.u) + +/* Macros to access symbol table */ +#define s_name(i) (lua_table[i].name) +#define s_object(i) (lua_table[i].object) +#define s_tag(i) (tag(&s_object(i))) +#define s_nvalue(i) (nvalue(&s_object(i))) +#define s_svalue(i) (svalue(&s_object(i))) +#define s_bvalue(i) (bvalue(&s_object(i))) +#define s_avalue(i) (avalue(&s_object(i))) +#define s_fvalue(i) (fvalue(&s_object(i))) +#define s_uvalue(i) (uvalue(&s_object(i))) + + +/* Exported functions */ +int lua_execute (Byte *pc); +void lua_markstack (void); +char *lua_strdup (char *l); + +void lua_setinput (Input fn); /* from "lua.lex" module */ +void lua_setunput (Unput fn); /* from "lua.lex" module */ +char *lua_lasttext (void); /* from "lua.lex" module */ +int lua_parse (void); /* from "lua.stx" module */ +void lua_type (void); +void lua_obj2number (void); +void lua_print (void); + +#endif diff --git a/contrib/media/updf/include/openjpeg.h b/contrib/media/updf/include/openjpeg.h new file mode 100644 index 0000000000..7ad62bf6dc --- /dev/null +++ b/contrib/media/updf/include/openjpeg.h @@ -0,0 +1,915 @@ + /* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef OPENJPEG_H +#define OPENJPEG_H + + +/* +========================================================== + Compiler directives +========================================================== +*/ + +#if defined(OPJ_STATIC) || !defined(_WIN32) +#define OPJ_API +#define OPJ_CALLCONV +#else +#define OPJ_CALLCONV __stdcall +/* +The following ifdef block is the standard way of creating macros which make exporting +from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS +symbol defined on the command line. this symbol should not be defined on any project +that uses this DLL. This way any other project whose source files include this file see +OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols +defined with this macro as being exported. +*/ +#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) +#define OPJ_API __declspec(dllexport) +#else +#define OPJ_API __declspec(dllimport) +#endif /* OPJ_EXPORTS */ +#endif /* !OPJ_STATIC || !_WIN32 */ + +#ifndef __cplusplus +#if defined(HAVE_STDBOOL_H) +/* +The C language implementation does correctly provide the standard header +file "stdbool.h". + */ +#include <stdbool.h> +#else +/* +The C language implementation does not provide the standard header file +"stdbool.h" as required by ISO/IEC 9899:1999. Try to compensate for this +braindamage below. +*/ +#if !defined(bool) +#define bool int +#endif +#if !defined(true) +#define true 1 +#endif +#if !defined(false) +#define false 0 +#endif +#endif +#endif /* __cplusplus */ + +/* +========================================================== + Useful constant definitions +========================================================== +*/ + +#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */ + +#define J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */ +#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-band linked to number of resolution level */ + +/* UniPG>> */ +#define JPWL_MAX_NO_TILESPECS 16 /**< Maximum number of tile parts expected by JPWL: increase at your will */ +#define JPWL_MAX_NO_PACKSPECS 16 /**< Maximum number of packet parts expected by JPWL: increase at your will */ +#define JPWL_MAX_NO_MARKERS 512 /**< Maximum number of JPWL markers: increase at your will */ +#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */ +#define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, so you'll find better the first EPB */ +#define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, to avoid some crashes */ +#define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit errors in marker id's */ +#define JPWL_MAXIMUM_EPB_ROOM 65450 /**< Expect this maximum number of bytes for composition of EPBs */ +/* <<UniPG */ + +/* +========================================================== + enum definitions +========================================================== +*/ +/** +Rsiz Capabilities +*/ +typedef enum RSIZ_CAPABILITIES { + STD_RSIZ = 0, /** Standard JPEG2000 profile*/ + CINEMA2K = 3, /** Profile name for a 2K image*/ + CINEMA4K = 4 /** Profile name for a 4K image*/ +} OPJ_RSIZ_CAPABILITIES; + +/** +Digital cinema operation mode +*/ +typedef enum CINEMA_MODE { + OFF = 0, /** Not Digital Cinema*/ + CINEMA2K_24 = 1, /** 2K Digital Cinema at 24 fps*/ + CINEMA2K_48 = 2, /** 2K Digital Cinema at 48 fps*/ + CINEMA4K_24 = 3 /** 4K Digital Cinema at 24 fps*/ +}OPJ_CINEMA_MODE; + +/** +Progression order +*/ +typedef enum PROG_ORDER { + PROG_UNKNOWN = -1, /**< place-holder */ + LRCP = 0, /**< layer-resolution-component-precinct order */ + RLCP = 1, /**< resolution-layer-component-precinct order */ + RPCL = 2, /**< resolution-precinct-component-layer order */ + PCRL = 3, /**< precinct-component-resolution-layer order */ + CPRL = 4 /**< component-precinct-resolution-layer order */ +} OPJ_PROG_ORDER; + +/** +Supported image color spaces +*/ +typedef enum COLOR_SPACE { + CLRSPC_UNKNOWN = -1, /**< not supported by the library */ + CLRSPC_UNSPECIFIED = 0, /**< not specified in the codestream */ + CLRSPC_SRGB = 1, /**< sRGB */ + CLRSPC_GRAY = 2, /**< grayscale */ + CLRSPC_SYCC = 3 /**< YUV */ +} OPJ_COLOR_SPACE; + +/** +Supported codec +*/ +typedef enum CODEC_FORMAT { + CODEC_UNKNOWN = -1, /**< place-holder */ + CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */ + CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */ + CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */ +} OPJ_CODEC_FORMAT; + +/** +Limit decoding to certain portions of the codestream. +*/ +typedef enum LIMIT_DECODING { + NO_LIMITATION = 0, /**< No limitation for the decoding. The entire codestream will de decoded */ + LIMIT_TO_MAIN_HEADER = 1, /**< The decoding is limited to the Main Header */ + DECODE_ALL_BUT_PACKETS = 2 /**< Decode everything except the JPEG 2000 packets */ +} OPJ_LIMIT_DECODING; + +/* +========================================================== + event manager typedef definitions +========================================================== +*/ + +/** +Callback function prototype for events +@param msg Event message +@param client_data +*/ +typedef void (*opj_msg_callback) (const char *msg, void *client_data); + +/** +Message handler object +used for +<ul> +<li>Error messages +<li>Warning messages +<li>Debugging messages +</ul> +*/ +typedef struct opj_event_mgr { + /** Error message callback if available, NULL otherwise */ + opj_msg_callback error_handler; + /** Warning message callback if available, NULL otherwise */ + opj_msg_callback warning_handler; + /** Debug message callback if available, NULL otherwise */ + opj_msg_callback info_handler; +} opj_event_mgr_t; + + +/* +========================================================== + codec typedef definitions +========================================================== +*/ + +/** +Progression order changes +*/ +typedef struct opj_poc { + /** Resolution num start, Component num start, given by POC */ + int resno0, compno0; + /** Layer num end,Resolution num end, Component num end, given by POC */ + int layno1, resno1, compno1; + /** Layer num start,Precinct num start, Precinct num end */ + int layno0, precno0, precno1; + /** Progression order enum*/ + OPJ_PROG_ORDER prg1,prg; + /** Progression order string*/ + char progorder[5]; + /** Tile number */ + int tile; + /** Start and end values for Tile width and height*/ + int tx0,tx1,ty0,ty1; + /** Start value, initialised in pi_initialise_encode*/ + int layS, resS, compS, prcS; + /** End value, initialised in pi_initialise_encode */ + int layE, resE, compE, prcE; + /** Start and end values of Tile width and height, initialised in pi_initialise_encode*/ + int txS,txE,tyS,tyE,dx,dy; + /** Temporary values for Tile parts, initialised in pi_create_encode */ + int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t; +} opj_poc_t; + +/** +Compression parameters +*/ +typedef struct opj_cparameters { + /** size of tile: tile_size_on = false (not in argument) or = true (in argument) */ + bool tile_size_on; + /** XTOsiz */ + int cp_tx0; + /** YTOsiz */ + int cp_ty0; + /** XTsiz */ + int cp_tdx; + /** YTsiz */ + int cp_tdy; + /** allocation by rate/distortion */ + int cp_disto_alloc; + /** allocation by fixed layer */ + int cp_fixed_alloc; + /** add fixed_quality */ + int cp_fixed_quality; + /** fixed layer */ + int *cp_matrice; + /** comment for coding */ + char *cp_comment; + /** csty : coding style */ + int csty; + /** progression order (default LRCP) */ + OPJ_PROG_ORDER prog_order; + /** progression order changes */ + opj_poc_t POC[32]; + /** number of progression order changes (POC), default to 0 */ + int numpocs; + /** number of layers */ + int tcp_numlayers; + /** rates of layers */ + float tcp_rates[100]; + /** different psnr for successive layers */ + float tcp_distoratio[100]; + /** number of resolutions */ + int numresolution; + /** initial code block width, default to 64 */ + int cblockw_init; + /** initial code block height, default to 64 */ + int cblockh_init; + /** mode switch (cblk_style) */ + int mode; + /** 1 : use the irreversible DWT 9-7, 0 : use lossless compression (default) */ + int irreversible; + /** region of interest: affected component in [0..3], -1 means no ROI */ + int roi_compno; + /** region of interest: upshift value */ + int roi_shift; + /* number of precinct size specifications */ + int res_spec; + /** initial precinct width */ + int prcw_init[J2K_MAXRLVLS]; + /** initial precinct height */ + int prch_init[J2K_MAXRLVLS]; + + /**@name command line encoder parameters (not used inside the library) */ + /*@{*/ + /** input file name */ + char infile[OPJ_PATH_LEN]; + /** output file name */ + char outfile[OPJ_PATH_LEN]; + /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ + int index_on; + /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ + char index[OPJ_PATH_LEN]; + /** subimage encoding: origin image offset in x direction */ + int image_offset_x0; + /** subimage encoding: origin image offset in y direction */ + int image_offset_y0; + /** subsampling value for dx */ + int subsampling_dx; + /** subsampling value for dy */ + int subsampling_dy; + /** input file format 0: PGX, 1: PxM, 2: BMP 3:TIF*/ + int decod_format; + /** output file format 0: J2K, 1: JP2, 2: JPT */ + int cod_format; + /*@}*/ + +/* UniPG>> */ + /**@name JPWL encoding parameters */ + /*@{*/ + /** enables writing of EPC in MH, thus activating JPWL */ + bool jpwl_epc_on; + /** error protection method for MH (0,1,16,32,37-128) */ + int jpwl_hprot_MH; + /** tile number of header protection specification (>=0) */ + int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** error protection methods for TPHs (0,1,16,32,37-128) */ + int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]; + /** tile number of packet protection specification (>=0) */ + int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]; + /** packet number of packet protection specification (>=0) */ + int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]; + /** error protection methods for packets (0,1,16,32,37-128) */ + int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]; + /** enables writing of ESD, (0=no/1/2 bytes) */ + int jpwl_sens_size; + /** sensitivity addressing size (0=auto/2/4 bytes) */ + int jpwl_sens_addr; + /** sensitivity range (0-3) */ + int jpwl_sens_range; + /** sensitivity method for MH (-1=no,0-7) */ + int jpwl_sens_MH; + /** tile number of sensitivity specification (>=0) */ + int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** sensitivity methods for TPHs (-1=no,0-7) */ + int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; + /*@}*/ +/* <<UniPG */ + + /** Digital Cinema compliance 0-not compliant, 1-compliant*/ + OPJ_CINEMA_MODE cp_cinema; + /** Maximum rate for each component. If == 0, component size limitation is not considered */ + int max_comp_size; + /** Profile name*/ + OPJ_RSIZ_CAPABILITIES cp_rsiz; + /** Tile part generation*/ + char tp_on; + /** Flag for Tile part generation*/ + char tp_flag; + /** MCT (multiple component transform) */ + char tcp_mct; +} opj_cparameters_t; + +/** +Decompression parameters +*/ +typedef struct opj_dparameters { + /** + Set the number of highest resolution levels to be discarded. + The image resolution is effectively divided by 2 to the power of the number of discarded levels. + The reduce factor is limited by the smallest total number of decomposition levels among tiles. + if != 0, then original dimension divided by 2^(reduce); + if == 0 or not used, image is decoded to the full resolution + */ + int cp_reduce; + /** + Set the maximum number of quality layers to decode. + If there are less quality layers than the specified number, all the quality layers are decoded. + if != 0, then only the first "layer" layers are decoded; + if == 0 or not used, all the quality layers are decoded + */ + int cp_layer; + + /**@name command line encoder parameters (not used inside the library) */ + /*@{*/ + /** input file name */ + char infile[OPJ_PATH_LEN]; + /** output file name */ + char outfile[OPJ_PATH_LEN]; + /** input file format 0: J2K, 1: JP2, 2: JPT */ + int decod_format; + /** output file format 0: PGX, 1: PxM, 2: BMP */ + int cod_format; + /*@}*/ + +/* UniPG>> */ + /**@name JPWL decoding parameters */ + /*@{*/ + /** activates the JPWL correction capabilities */ + bool jpwl_correct; + /** expected number of components */ + int jpwl_exp_comps; + /** maximum number of tiles */ + int jpwl_max_tiles; + /*@}*/ +/* <<UniPG */ + + /** + Specify whether the decoding should be done on the entire codestream, or be limited to the main header + Limiting the decoding to the main header makes it possible to extract the characteristics of the codestream + if == NO_LIMITATION, the entire codestream is decoded; + if == LIMIT_TO_MAIN_HEADER, only the main header is decoded; + */ + OPJ_LIMIT_DECODING cp_limit_decoding; + +} opj_dparameters_t; + +/** Common fields between JPEG-2000 compression and decompression master structs. */ + +#define opj_common_fields \ + opj_event_mgr_t *event_mgr; /**< pointer to the event manager */\ + void * client_data; /**< Available for use by application */\ + bool is_decompressor; /**< So common code can tell which is which */\ + OPJ_CODEC_FORMAT codec_format; /**< selected codec */\ + void *j2k_handle; /**< pointer to the J2K codec */\ + void *jp2_handle; /**< pointer to the JP2 codec */\ + void *mj2_handle /**< pointer to the MJ2 codec */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * opj_common_struct_t, only of opj_cinfo_t and opj_dinfo_t. + */ +typedef struct opj_common_struct { + opj_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual opj_cinfo_t or + * opj_dinfo_t. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +} opj_common_struct_t; + +typedef opj_common_struct_t * opj_common_ptr; + +/** +Compression context info +*/ +typedef struct opj_cinfo { + /** Fields shared with opj_dinfo_t */ + opj_common_fields; + /* other specific fields go here */ +} opj_cinfo_t; + +/** +Decompression context info +*/ +typedef struct opj_dinfo { + /** Fields shared with opj_cinfo_t */ + opj_common_fields; + /* other specific fields go here */ +} opj_dinfo_t; + +/* +========================================================== + I/O stream typedef definitions +========================================================== +*/ + +/* + * Stream open flags. + */ +/** The stream was opened for reading. */ +#define OPJ_STREAM_READ 0x0001 +/** The stream was opened for writing. */ +#define OPJ_STREAM_WRITE 0x0002 + +/** +Byte input-output stream (CIO) +*/ +typedef struct opj_cio { + /** codec context */ + opj_common_ptr cinfo; + + /** open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE */ + int openmode; + /** pointer to the start of the buffer */ + unsigned char *buffer; + /** buffer size in bytes */ + int length; + + /** pointer to the start of the stream */ + unsigned char *start; + /** pointer to the end of the stream */ + unsigned char *end; + /** pointer to the current position */ + unsigned char *bp; +} opj_cio_t; + +/* +========================================================== + image typedef definitions +========================================================== +*/ + +/** +Defines a single image component +*/ +typedef struct opj_image_comp { + /** XRsiz: horizontal separation of a sample of ith component with respect to the reference grid */ + int dx; + /** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */ + int dy; + /** data width */ + int w; + /** data height */ + int h; + /** x component offset compared to the whole image */ + int x0; + /** y component offset compared to the whole image */ + int y0; + /** precision */ + int prec; + /** image depth in bits */ + int bpp; + /** signed (1) / unsigned (0) */ + int sgnd; + /** number of decoded resolution */ + int resno_decoded; + /** number of division by 2 of the out image compared to the original size of image */ + int factor; + /** image component data */ + int *data; +} opj_image_comp_t; + +/** +Defines image data and characteristics +*/ +typedef struct opj_image { + /** XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area */ + int x0; + /** YOsiz: vertical offset from the origin of the reference grid to the top side of the image area */ + int y0; + /** Xsiz: width of the reference grid */ + int x1; + /** Ysiz: height of the reference grid */ + int y1; + /** number of components in the image */ + int numcomps; + /** color space: sRGB, Greyscale or YUV */ + OPJ_COLOR_SPACE color_space; + /** image components */ + opj_image_comp_t *comps; + /** 'restricted' ICC profile */ + unsigned char *icc_profile_buf; + /** size of ICC profile */ + int icc_profile_len; +} opj_image_t; + +/** +Component parameters structure used by the opj_image_create function +*/ +typedef struct opj_image_comptparm { + /** XRsiz: horizontal separation of a sample of ith component with respect to the reference grid */ + int dx; + /** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */ + int dy; + /** data width */ + int w; + /** data height */ + int h; + /** x component offset compared to the whole image */ + int x0; + /** y component offset compared to the whole image */ + int y0; + /** precision */ + int prec; + /** image depth in bits */ + int bpp; + /** signed (1) / unsigned (0) */ + int sgnd; +} opj_image_cmptparm_t; + +/* +========================================================== + Information on the JPEG 2000 codestream +========================================================== +*/ + +/** +Index structure : Information concerning a packet inside tile +*/ +typedef struct opj_packet_info { + /** packet start position (including SOP marker if it exists) */ + int start_pos; + /** end of packet header position (including EPH marker if it exists)*/ + int end_ph_pos; + /** packet end position */ + int end_pos; + /** packet distorsion */ + double disto; +} opj_packet_info_t; + +/** +Index structure : Information concerning tile-parts +*/ +typedef struct opj_tp_info { + /** start position of tile part */ + int tp_start_pos; + /** end position of tile part header */ + int tp_end_header; + /** end position of tile part */ + int tp_end_pos; + /** start packet of tile part */ + int tp_start_pack; + /** number of packets of tile part */ + int tp_numpacks; +} opj_tp_info_t; + +/** +Index structure : information regarding tiles +*/ +typedef struct opj_tile_info { + /** value of thresh for each layer by tile cfr. Marcela */ + double *thresh; + /** number of tile */ + int tileno; + /** start position */ + int start_pos; + /** end position of the header */ + int end_header; + /** end position */ + int end_pos; + /** precinct number for each resolution level (width) */ + int pw[33]; + /** precinct number for each resolution level (height) */ + int ph[33]; + /** precinct size (in power of 2), in X for each resolution level */ + int pdx[33]; + /** precinct size (in power of 2), in Y for each resolution level */ + int pdy[33]; + /** information concerning packets inside tile */ + opj_packet_info_t *packet; + /** add fixed_quality */ + int numpix; + /** add fixed_quality */ + double distotile; + /** number of tile parts */ + int num_tps; + /** information concerning tile parts */ + opj_tp_info_t *tp; +} opj_tile_info_t; + +/* UniPG>> */ +/** +Marker structure +*/ +typedef struct opj_marker_info_t { + /** marker type */ + unsigned short int type; + /** position in codestream */ + int pos; + /** length, marker val included */ + int len; +} opj_marker_info_t; +/* <<UniPG */ + +/** +Index structure of the codestream +*/ +typedef struct opj_codestream_info { + /** maximum distortion reduction on the whole image (add for Marcela) */ + double D_max; + /** packet number */ + int packno; + /** writing the packet in the index with t2_encode_packets */ + int index_write; + /** image width */ + int image_w; + /** image height */ + int image_h; + /** progression order */ + OPJ_PROG_ORDER prog; + /** tile size in x */ + int tile_x; + /** tile size in y */ + int tile_y; + /** */ + int tile_Ox; + /** */ + int tile_Oy; + /** number of tiles in X */ + int tw; + /** number of tiles in Y */ + int th; + /** component numbers */ + int numcomps; + /** number of layer */ + int numlayers; + /** number of decomposition for each component */ + int *numdecompos; +/* UniPG>> */ + /** number of markers */ + int marknum; + /** list of markers */ + opj_marker_info_t *marker; + /** actual size of markers array */ + int maxmarknum; +/* <<UniPG */ + /** main header position */ + int main_head_start; + /** main header position */ + int main_head_end; + /** codestream's size */ + int codestream_size; + /** information regarding tiles inside image */ + opj_tile_info_t *tile; +} opj_codestream_info_t; + +#ifdef __cplusplus +extern "C" { +#endif + + +/* +========================================================== + openjpeg version +========================================================== +*/ + +OPJ_API const char * OPJ_CALLCONV opj_version(void); + +/* +========================================================== + image functions definitions +========================================================== +*/ + +/** +Create an image +@param numcmpts number of components +@param cmptparms components parameters +@param clrspc image color space +@return returns a new image structure if successful, returns NULL otherwise +*/ +OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc); + +/** +Deallocate any resources associated with an image +@param image image to be destroyed +*/ +OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image); + +/* +========================================================== + stream functions definitions +========================================================== +*/ + +/** +Open and allocate a memory stream for read / write. +On reading, the user must provide a buffer containing encoded data. The buffer will be +wrapped by the returned CIO handle. +On writing, buffer parameters must be set to 0: a buffer will be allocated by the library +to contain encoded data. +@param cinfo Codec context info +@param buffer Reading: buffer address. Writing: NULL +@param length Reading: buffer length. Writing: 0 +@return Returns a CIO handle if successful, returns NULL otherwise +*/ +OPJ_API opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length); + +/** +Close and free a CIO handle +@param cio CIO handle to free +*/ +OPJ_API void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio); + +/** +Get position in byte stream +@param cio CIO handle +@return Returns the position in bytes +*/ +OPJ_API int OPJ_CALLCONV cio_tell(opj_cio_t *cio); +/** +Set position in byte stream +@param cio CIO handle +@param pos Position, in number of bytes, from the beginning of the stream +*/ +OPJ_API void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos); + +/* +========================================================== + event manager functions definitions +========================================================== +*/ + +OPJ_API opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context); + +/* +========================================================== + codec functions definitions +========================================================== +*/ +/** +Creates a J2K/JPT/JP2 decompression structure +@param format Decoder to select +@return Returns a handle to a decompressor if successful, returns NULL otherwise +*/ +OPJ_API opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format); +/** +Destroy a decompressor handle +@param dinfo decompressor handle to destroy +*/ +OPJ_API void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo); +/** +Set decoding parameters to default values +@param parameters Decompression parameters +*/ +OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters); +/** +Setup the decoder decoding parameters using user parameters. +Decoding parameters are returned in j2k->cp. +@param dinfo decompressor handle +@param parameters decompression parameters +*/ +OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 codestream +@param dinfo decompressor handle +@param cio Input buffer stream +@return Returns a decoded image if successful, returns NULL otherwise +*/ +OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio); + +/** +Decode an image from a JPEG-2000 codestream and extract the codestream information +@param dinfo decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if needed afterwards, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +OPJ_API opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a J2K/JP2 compression structure +@param format Coder to select +@return Returns a handle to a compressor if successful, returns NULL otherwise +*/ +OPJ_API opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format); +/** +Destroy a compressor handle +@param cinfo compressor handle to destroy +*/ +OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo); +/** +Set encoding parameters to default values, that means : +<ul> +<li>Lossless +<li>1 tile +<li>Size of precinct : 2^15 x 2^15 (means 1 precinct) +<li>Size of code-block : 64 x 64 +<li>Number of resolutions: 6 +<li>No SOP marker in the codestream +<li>No EPH marker in the codestream +<li>No sub-sampling in x or y direction +<li>No mode switch activated +<li>Progression order: LRCP +<li>No index file +<li>No ROI upshifted +<li>No offset of the origin of the image +<li>No offset of the origin of the tiles +<li>Reversible DWT 5-3 +</ul> +@param parameters Compression parameters +*/ +OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters); +/** +Setup the encoder parameters using the current image and using user parameters. +@param cinfo Compressor handle +@param parameters Compression parameters +@param image Input filled image +*/ +OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image); +/** +Encode an image into a JPEG-2000 codestream +@param cinfo compressor handle +@param cio Output buffer stream +@param image Image to encode +@param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci() +@return Returns true if successful, returns false otherwise +*/ +OPJ_API bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index); +/** +Encode an image into a JPEG-2000 codestream and extract the codestream information +@param cinfo compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if needed afterwards, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +OPJ_API bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +/** +Destroy Codestream information after compression or decompression +@param cstr_info Codestream information structure +*/ +OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info); + +#ifdef __cplusplus +} +#endif + +#endif /* OPENJPEG_H */ diff --git a/contrib/media/updf/include/opj_includes.h b/contrib/media/updf/include/opj_includes.h new file mode 100644 index 0000000000..53739abf81 --- /dev/null +++ b/contrib/media/updf/include/opj_includes.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef OPJ_INCLUDES_H +#define OPJ_INCLUDES_H + +/* + ========================================================== + Standard includes used by the library + ========================================================== +*/ +#include <memory.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include <float.h> +#include <time.h> +#include <stdio.h> +#include <stdarg.h> +#include <ctype.h> + +/* + ========================================================== + OpenJPEG interface + ========================================================== + */ +#include "openjpeg.h" + +/* + ========================================================== + OpenJPEG modules + ========================================================== +*/ + +/* Ignore GCC attributes if this is not GCC */ +#ifndef __GNUC__ + #define __attribute__(x) /* __attribute__(x) */ +#endif + +/* +The inline keyword is supported by C99 but not by C90. +Most compilers implement their own version of this keyword ... +*/ +#ifndef INLINE + #if defined(_MSC_VER) + #define INLINE __forceinline + #elif defined(__GNUC__) + #define INLINE __inline__ + #elif defined(__MWERKS__) + #define INLINE inline + #else + /* add other compilers here ... */ + #define INLINE + #endif /* defined(<Compiler>) */ +#endif /* INLINE */ + +/* Are restricted pointers available? (C99) */ +#if (__STDC_VERSION__ != 199901L) + /* Not a C99 compiler */ + #ifdef __GNUC__ + #define restrict __restrict__ + #else + #define restrict /* restrict */ + #endif +#endif + +/* MSVC and Borland C do not have lrintf */ +#if defined(_MSC_VER) || defined(__BORLANDC__) +static INLINE long lrintf(float f){ +#ifdef _M_X64 + return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); +#else + int i; + + _asm{ + fld f + fistp i + }; + + return i; +#endif +} +#endif + +#include "j2k_lib.h" +#include "opj_malloc.h" +#include "event.h" +#include "cio.h" + +#include "image.h" +#include "j2k.h" +#include "jp2.h" +#include "jpt.h" + +#include "mqc.h" +#include "raw.h" +#include "bio.h" +#include "tgt.h" +#include "pi.h" +#include "tcd.h" +#include "t1.h" +#include "dwt.h" +#include "t2.h" +#include "mct.h" +#include "int.h" +#include "fix.h" + +/* JPWL>> */ +#ifdef USE_JPWL +#include "../jpwl/jpwl.h" +#endif /* USE_JPWL */ +/* <<JPWL */ + +#endif /* OPJ_INCLUDES_H */ diff --git a/contrib/media/updf/include/opj_malloc.h b/contrib/media/updf/include/opj_malloc.h new file mode 100644 index 0000000000..64908f3e8c --- /dev/null +++ b/contrib/media/updf/include/opj_malloc.h @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * Copyright (c) 2007, Callum Lerwick <seg@haxxed.com> + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __OPJ_MALLOC_H +#define __OPJ_MALLOC_H +/** +@file opj_malloc.h +@brief Internal functions + +The functions in opj_malloc.h are internal utilities used for memory management. +*/ + +/** @defgroup MISC MISC - Miscellaneous internal functions */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Allocate an uninitialized memory block +@param size Bytes to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +#ifdef ALLOC_PERF_OPT +void * OPJ_CALLCONV opj_malloc(size_t size); +#else +#define opj_malloc(size) malloc(size) +#endif + +/** +Allocate a memory block with elements initialized to 0 +@param num Blocks to allocate +@param size Bytes per block to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +#ifdef ALLOC_PERF_OPT +void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements); +#else +#define opj_calloc(num, size) calloc(num, size) +#endif + +/** +Allocate memory aligned to a 16 byte boundry +@param size Bytes to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +/* FIXME: These should be set with cmake tests, but we're currently not requiring use of cmake */ +#ifdef _WIN32 + /* Someone should tell the mingw people that their malloc.h ought to provide _mm_malloc() */ + #ifdef __GNUC__ + #include <mm_malloc.h> + #define HAVE_MM_MALLOC + #else /* MSVC, Intel C++ */ + #include <malloc.h> + #ifdef _mm_malloc + #define HAVE_MM_MALLOC + #endif + #endif +#else /* Not _WIN32 */ + #if defined(__sun) + #define HAVE_MEMALIGN + /* Linux x86_64 and OSX always align allocations to 16 bytes */ + #elif !defined(__amd64__) && !defined(__APPLE__) + #define HAVE_MEMALIGN + #include <malloc.h> + #endif +#endif + +#define opj_aligned_malloc(size) malloc(size) +#define opj_aligned_free(m) free(m) + +#ifdef HAVE_MM_MALLOC + #undef opj_aligned_malloc + #define opj_aligned_malloc(size) _mm_malloc(size, 16) + #undef opj_aligned_free + #define opj_aligned_free(m) _mm_free(m) +#endif + +#ifdef HAVE_MEMALIGN + extern void* memalign(size_t, size_t); + #undef opj_aligned_malloc + #define opj_aligned_malloc(size) memalign(16, (size)) + #undef opj_aligned_free + #define opj_aligned_free(m) free(m) +#endif + +#ifdef HAVE_POSIX_MEMALIGN + #undef opj_aligned_malloc + extern int posix_memalign(void**, size_t, size_t); + + static INLINE void* __attribute__ ((malloc)) opj_aligned_malloc(size_t size){ + void* mem = NULL; + posix_memalign(&mem, 16, size); + return mem; + } + #undef opj_aligned_free + #define opj_aligned_free(m) free(m) +#endif + +#ifdef ALLOC_PERF_OPT + #undef opj_aligned_malloc + #define opj_aligned_malloc(size) opj_malloc(size) + #undef opj_aligned_free + #define opj_aligned_free(m) opj_free(m) +#endif + +/** +Reallocate memory blocks. +@param m Pointer to previously allocated memory block +@param s New size in bytes +@return Returns a void pointer to the reallocated (and possibly moved) memory block +*/ +#ifdef ALLOC_PERF_OPT +void * OPJ_CALLCONV opj_realloc(void * m, size_t s); +#else +#define opj_realloc(m, s) realloc(m, s) +#endif + +/** +Deallocates or frees a memory block. +@param m Previously allocated memory block to be freed +*/ +#ifdef ALLOC_PERF_OPT +void OPJ_CALLCONV opj_free(void * m); +#else +#define opj_free(m) free(m) +#endif + +#ifdef __GNUC__ +#pragma GCC poison malloc calloc realloc free +#endif + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __OPJ_MALLOC_H */ + diff --git a/contrib/media/updf/include/os_layer/os_layer.h b/contrib/media/updf/include/os_layer/os_layer.h new file mode 100644 index 0000000000..99bbe1dec3 --- /dev/null +++ b/contrib/media/updf/include/os_layer/os_layer.h @@ -0,0 +1,122 @@ +#ifndef __OS_LAYER_OS_LAYER_H +#define __OS_LAYER_OS_LAYER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> +#include<stdio.h> +#include<stdlib.h> + +#define __FSEMU_FLAG_USED 0x00000001 +#define __FSEMU_FLAG_DIRECTORY 0x00000002 +#define __FSEMU_FLAG_DEVICE 0x00000004 +#define __FSEMU_FLAG_READ 0x00000008 +#define __FSEMU_FLAG_WRITE 0x00000010 +#define __FSEMU_FLAG_SEEK 0x00000020 +#define __FSEMU_FLAG_STDIO 0x00000040 + +#define __FSF(x) __FSEMU_FLAG_##x + +#define T_FSF(x,f) ((x)&__FSF(f)) + +#define __FSEMU_BLOCK_SIZE 512 + +struct __fsemu_io_t; + +typedef struct +{ + int (* putc)(int dev,int c); + int (* getc)(int dev,int * c); + int (* read)(struct __fsemu_io_t *,int blkno,int blkcount,char *); + int (* write)(struct __fsemu_io_t *,int blkno,int blkcount,char *); +} __fsemu_stdio_t; + +typedef struct __fsemu_io_t +{ + char * filename; + char * filebuffer; + int handle; + int pos; + int size; + int flags; + char * systree_buf; + struct systree_info * st_info; + __fsemu_stdio_t * special_ops; +} __fsemu_io_t; + +#define __FSEMU_MAX_FILES 64 + +extern __fsemu_stdio_t __fsemu_stdin_ops, + __fsemu_stdout_ops, + __fsemu_stderr_ops, + __fsemu_stdprn_ops, + __fsemu_stdaux_ops; + +#define __FSEMU_f_STDIN { "stdin",NULL,0,0,0,__FSF(USED)|__FSF(READ) \ + |__FSF(DEVICE)|__FSF(STDIO), NULL,NULL,&__fsemu_stdin_ops } +#define __FSEMU_f_STDOUT { "stdout",NULL,1,0,0,__FSF(USED)|__FSF(WRITE) \ + |__FSF(DEVICE)|__FSF(STDIO), NULL,NULL,&__fsemu_stdout_ops } +#define __FSEMU_f_STDERR { "stderr",NULL,2,0,0,__FSF(USED)|__FSF(WRITE) \ + |__FSF(DEVICE)|__FSF(STDIO), NULL,NULL,&__fsemu_stderr_ops } +#define __FSEMU_f_STDPRN { "stdprn",NULL,3,0,0,__FSF(USED)|__FSF(WRITE) \ + |__FSF(DEVICE)|__FSF(STDIO), NULL,NULL,&__fsemu_stdprn_ops } +#define __FSEMU_f_STDAUX { "stdaux",NULL,4,0,0,__FSF(USED)|__FSF(WRITE) \ + |__FSF(DEVICE)|__FSF(STDIO)|__FSF(READ), NULL,NULL,&__fsemu_stdaux_ops } + +#define __FSEMU_STDIO_DECLS \ + static __fsemu_io_t __fsemu_io_stdin=__FSEMU_f_STDIN; \ + static __fsemu_io_t __fsemu_io_stdout=__FSEMU_f_STDOUT; \ + static __fsemu_io_t __fsemu_io_stderr=__FSEMU_f_STDERR; \ + static __fsemu_io_t __fsemu_io_stdprn=__FSEMU_f_STDPRN; \ + static __fsemu_io_t __fsemu_io_stdaux=__FSEMU_f_STDAUX; + +#define __FSEMU_STDIO_TABLE_DECLS \ + &__fsemu_io_stdin, \ + &__fsemu_io_stdout, \ + &__fsemu_io_stderr, \ + &__fsemu_io_stdprn, \ + &__fsemu_io_stdaux + + +extern __fsemu_stdio_t __fsemu_rd1_ops, + __fsemu_hd1_ops, + __fsemu_hd2_ops, + __fsemu_hd3_ops, + __fsemu_hd4_ops; + +#define __FSEMU_f_RD1 { "/RD/1",NULL,5,0,0,__FSF(USED)|__FSF(READ)| \ + __FSF(WRITE)|__FSF(DEVICE),NULL,NULL,&__fsemu_rd1_ops } +#define __FSEMU_f_HD1 { "/HD/1",NULL,6,0,0,__FSF(USED)|__FSF(READ)| \ + __FSF(DEVICE),NULL,NULL,&__fsemu_hd1_ops } +#define __FSEMU_f_HD2 { "/HD/2",NULL,7,0,0,__FSF(USED)|__FSF(READ)| \ + __FSF(DEVICE),NULL,NULL,&__fsemu_hd2_ops } +#define __FSEMU_f_HD3 { "/HD/3",NULL,8,0,0,__FSF(USED)|__FSF(READ)| \ + __FSF(DEVICE),NULL,NULL,&__fsemu_hd3_ops } +#define __FSEMU_f_HD4 { "/HD/4",NULL,9,0,0,__FSF(USED)|__FSF(READ)| \ + __FSF(DEVICE),NULL,NULL,&__fsemu_hd4_ops } + +#define __FSEMU_DEV_DECLS \ + static __fsemu_io_t __fsemu_io_rd1=__FSEMU_f_RD1; \ + static __fsemu_io_t __fsemu_io_hd1=__FSEMU_f_HD1; \ + static __fsemu_io_t __fsemu_io_hd2=__FSEMU_f_HD2; \ + static __fsemu_io_t __fsemu_io_hd3=__FSEMU_f_HD3; \ + static __fsemu_io_t __fsemu_io_hd4=__FSEMU_f_HD4; + +#define __FSEMU_DEV_TABLE_DECLS \ + &__fsemu_io_rd1, \ + &__fsemu_io_hd1, \ + &__fsemu_io_hd2, \ + &__fsemu_io_hd3, \ + &__fsemu_io_hd4 + +#define __F_READABLE(x) T_FSF(x,READ) +#define __F_WRITABLE(x) T_FSF(x,WRITE) +#define __F_SEEKABLE(x) T_FSF(x,SEEK) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/contrib/media/updf/include/os_layer/queue.h b/contrib/media/updf/include/os_layer/queue.h new file mode 100644 index 0000000000..74997d0af5 --- /dev/null +++ b/contrib/media/updf/include/os_layer/queue.h @@ -0,0 +1,44 @@ +#ifndef __QUEUE_H +#define __QUEUE_H + +#include<menuet/os.h> +#include<menuet/sem.h> + +typedef struct +{ + int in_ptr,out_ptr,size; + unsigned char * databuf; + DECLARE_SEMAPHORE_S(q_lock); +} __oe_queue_t; + +#define DECL_EMPTY_Q(n,sz,buf) __oe_queue_t n = {0,0,sz,buf,SEM_INIT} + +#define __OE_QUEUE_INQ(x,c) \ + ({ \ + register int __ret,temp; \ + sem_lock(&(x)->q_lock); \ + temp=(x)->in_ptr+1; \ + if(temp>=(x)->size) temp=0; \ + if(temp==(x)->out_ptr) { __ret=-1; goto __OEQI_D; } \ + (x)->databuf[(x)->in_ptr]=(c)&0xFF; \ + (x)->in_ptr=temp; \ + __ret=0; \ +__OEQI_D: \ + sem_unlock(&(x)->q_lock); \ + __ret; }) + +#define __OE_QUEUE_DEQ(x,c) \ + ({ \ + register int __ret; \ + register unsigned char __tmp; \ + sem_lock(&(x)->q_lock); \ + if((x)->out_ptr==(x)->in_ptr) { __ret=-1; goto __OEQD_D; } \ + __tmp=(x)->databuf[(x)->out_ptr++]; \ + if((x)->out_ptr>=(x)->size) (x)->out_ptr=0; \ + __ret=0; \ + (c)=__tmp; \ +__OEQD_D: \ + sem_unlock(&(x)->q_lock); \ + __ret; }) + +#endif diff --git a/contrib/media/updf/include/osfcn.h b/contrib/media/updf/include/osfcn.h new file mode 100644 index 0000000000..f199e8a827 --- /dev/null +++ b/contrib/media/updf/include/osfcn.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_osfcn_h_ +#define __dj_include_osfcn_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <unistd.h> +#include <time.h> +#include <sys/resource.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_osfcn_h_ */ diff --git a/contrib/media/updf/include/ostream b/contrib/media/updf/include/ostream new file mode 100644 index 0000000000..4564be746a --- /dev/null +++ b/contrib/media/updf/include/ostream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_OSTREAM +#include <bits/std_ostream.h> +#endif diff --git a/contrib/media/updf/include/panel.h b/contrib/media/updf/include/panel.h new file mode 100755 index 0000000000..d3f44e75fe --- /dev/null +++ b/contrib/media/updf/include/panel.h @@ -0,0 +1,65 @@ +/* +*************************************************************************** +* This file comprises part of PDCurses. PDCurses is Public Domain software. +* You may use this code for whatever purposes you desire. This software +* is provided AS IS with NO WARRANTY whatsoever. +* Should this software be used in another application, an acknowledgement +* that PDCurses code is used would be appreciated, but is not mandatory. +* +* Any changes which you make to this software which may improve or enhance +* it, should be forwarded to the current maintainer for the benefit of +* other users. +* +* The only restriction placed on this code is that no distribution of +* modified PDCurses code be made under the PDCurses name, by anyone +* other than the current maintainer. +* +* See the file maintain.er for details of the current maintainer. +*************************************************************************** +*/ +/* +$Id +*/ +/* +*---------------------------------------------------------------------- +* Panels for PDCurses +*---------------------------------------------------------------------- +*/ + +#include <curses.h> + +typedef struct panelobs +{ + struct panelobs *above; + struct panel *pan; +} PANELOBS; + +typedef struct panel +{ + WINDOW *win; + int wstarty; + int wendy; + int wstartx; + int wendx; + struct panel *below; + struct panel *above; + char *user; + struct panelobs *obscure; +} PANEL; + +WINDOW *panel_window(PANEL *pan); +void update_panels(void ); +int hide_panel(PANEL *pan); +int show_panel(PANEL *pan); +int del_panel(PANEL *pan); +int top_panel(PANEL *pan); +int bottom_panel(PANEL *pan); +PANEL *new_panel(WINDOW *win); +PANEL *panel_above(PANEL *pan); +PANEL *panel_below(PANEL *pan); +int set_panel_userptr(PANEL *pan,char *uptr); +char *panel_userptr(PANEL *pan); +int move_panel(PANEL *pan,int starty,int startx); +int replace_panel(PANEL *pan,WINDOW *win); + +/* end of panel.h */ diff --git a/contrib/media/updf/include/parametrized.h b/contrib/media/updf/include/parametrized.h new file mode 100644 index 0000000000..8a443c43a1 --- /dev/null +++ b/contrib/media/updf/include/parametrized.h @@ -0,0 +1,609 @@ +/* + * parametrized.h --- is a termcap capability parametrized? + * + * Note: this file is generated using parametrized.sh, do not edit by hand. + * A value of -1 in the table means suppress both pad and % translations. + * A value of 0 in the table means do pad but not % translations. + * A value of 1 in the table means do both pad and % translations. + */ + +static short const parametrized[] = { +0, /* cbt */ +0, /* bel */ +0, /* cr */ +1, /* csr */ +0, /* tbc */ +0, /* clear */ +0, /* el */ +0, /* ed */ +1, /* hpa */ +0, /* cmdch */ +1, /* cup */ +0, /* cud1 */ +0, /* home */ +0, /* civis */ +0, /* cub1 */ +0, /* mrcup */ +0, /* cnorm */ +0, /* cuf1 */ +0, /* ll */ +0, /* cuu1 */ +0, /* cvvis */ +0, /* dch1 */ +0, /* dl1 */ +0, /* dsl */ +0, /* hd */ +0, /* smacs */ +0, /* blink */ +0, /* bold */ +0, /* smcup */ +0, /* smdc */ +0, /* dim */ +0, /* smir */ +0, /* invis */ +0, /* prot */ +0, /* rev */ +0, /* smso */ +0, /* smul */ +1, /* ech */ +0, /* rmacs */ +0, /* sgr0 */ +0, /* rmcup */ +0, /* rmdc */ +0, /* rmir */ +0, /* rmso */ +0, /* rmul */ +0, /* flash */ +0, /* ff */ +0, /* fsl */ +0, /* is1 */ +0, /* is2 */ +0, /* is3 */ +0, /* if */ +0, /* ich1 */ +0, /* il1 */ +0, /* ip */ +0, /* kbs */ +0, /* ktbc */ +0, /* kclr */ +0, /* kctab */ +0, /* kdch1 */ +0, /* kdl1 */ +0, /* kcud1 */ +0, /* krmir */ +0, /* kel */ +0, /* ked */ +0, /* kf0 */ +0, /* kf1 */ +0, /* kf10 */ +0, /* kf2 */ +0, /* kf3 */ +0, /* kf4 */ +0, /* kf5 */ +0, /* kf6 */ +0, /* kf7 */ +0, /* kf8 */ +0, /* kf9 */ +0, /* khome */ +0, /* kich1 */ +0, /* kil1 */ +0, /* kcub1 */ +0, /* kll */ +0, /* knp */ +0, /* kpp */ +0, /* kcuf1 */ +0, /* kind */ +0, /* kri */ +0, /* khts */ +0, /* kcuu1 */ +0, /* rmkx */ +0, /* smkx */ +0, /* lf0 */ +0, /* lf1 */ +0, /* lf10 */ +0, /* lf2 */ +0, /* lf3 */ +0, /* lf4 */ +0, /* lf5 */ +0, /* lf6 */ +0, /* lf7 */ +0, /* lf8 */ +0, /* lf9 */ +0, /* rmm */ +0, /* smm */ +0, /* nel */ +0, /* pad */ +1, /* dch */ +1, /* dl */ +1, /* cud */ +1, /* ich */ +1, /* indn */ +1, /* il */ +1, /* cub */ +1, /* cuf */ +1, /* rin */ +1, /* cuu */ +1, /* pfkey */ +1, /* pfloc */ +1, /* pfx */ +0, /* mc0 */ +0, /* mc4 */ +0, /* mc5 */ +1, /* rep */ +0, /* rs1 */ +0, /* rs2 */ +0, /* rs3 */ +0, /* rf */ +0, /* rc */ +1, /* vpa */ +0, /* sc */ +0, /* ind */ +0, /* ri */ +1, /* sgr */ +0, /* hts */ +1, /* wind */ +0, /* ht */ +0, /* tsl */ +0, /* uc */ +0, /* hu */ +0, /* iprog */ +0, /* ka1 */ +0, /* ka3 */ +0, /* kb2 */ +0, /* kc1 */ +0, /* kc3 */ +1, /* mc5p */ +0, /* rmp */ +-1, /* acsc */ +1, /* pln */ +0, /* kcbt */ +0, /* smxon */ +0, /* rmxon */ +0, /* smam */ +0, /* rmam */ +0, /* xonc */ +0, /* xoffc */ +0, /* enacs */ +0, /* smln */ +0, /* rmln */ +0, /* kbeg */ +0, /* kcan */ +0, /* kclo */ +0, /* kcmd */ +0, /* kcpy */ +0, /* kcrt */ +0, /* kend */ +0, /* kent */ +0, /* kext */ +0, /* kfnd */ +0, /* khlp */ +0, /* kmrk */ +0, /* kmsg */ +0, /* kmov */ +0, /* knxt */ +0, /* kopn */ +0, /* kopt */ +0, /* kprv */ +0, /* kprt */ +0, /* krdo */ +0, /* kref */ +0, /* krfr */ +0, /* krpl */ +0, /* krst */ +0, /* kres */ +0, /* ksav */ +0, /* kspd */ +0, /* kund */ +0, /* kBEG */ +0, /* kCAN */ +0, /* kCMD */ +0, /* kCPY */ +0, /* kCRT */ +0, /* kDC */ +0, /* kDL */ +0, /* kslt */ +0, /* kEND */ +0, /* kEOL */ +0, /* kEXT */ +0, /* kFND */ +1, /* kHLP */ +1, /* kHOM */ +1, /* kIC */ +1, /* kLFT */ +0, /* kMSG */ +0, /* kMOV */ +0, /* kNXT */ +0, /* kOPT */ +0, /* kPRV */ +0, /* kPRT */ +0, /* kRDO */ +0, /* kRPL */ +0, /* kRIT */ +0, /* kRES */ +0, /* kSAV */ +0, /* kSPD */ +0, /* kUND */ +0, /* rfi */ +0, /* kf11 */ +0, /* kf12 */ +0, /* kf13 */ +0, /* kf14 */ +0, /* kf15 */ +0, /* kf16 */ +0, /* kf17 */ +0, /* kf18 */ +0, /* kf19 */ +0, /* kf20 */ +0, /* kf21 */ +0, /* kf22 */ +0, /* kf23 */ +0, /* kf24 */ +0, /* kf25 */ +0, /* kf26 */ +0, /* kf27 */ +0, /* kf28 */ +0, /* kf29 */ +0, /* kf30 */ +0, /* kf31 */ +0, /* kf32 */ +0, /* kf33 */ +0, /* kf34 */ +0, /* kf35 */ +0, /* kf36 */ +0, /* kf37 */ +0, /* kf38 */ +0, /* kf39 */ +0, /* kf40 */ +0, /* kf41 */ +0, /* kf42 */ +0, /* kf43 */ +0, /* kf44 */ +0, /* kf45 */ +0, /* kf46 */ +0, /* kf47 */ +0, /* kf48 */ +0, /* kf49 */ +0, /* kf50 */ +0, /* kf51 */ +0, /* kf52 */ +0, /* kf53 */ +0, /* kf54 */ +0, /* kf55 */ +0, /* kf56 */ +0, /* kf57 */ +0, /* kf58 */ +0, /* kf59 */ +0, /* kf60 */ +0, /* kf61 */ +0, /* kf62 */ +0, /* kf63 */ +0, /* el1 */ +0, /* mgc */ +0, /* smgl */ +0, /* smgr */ +0, /* fln */ +1, /* sclk */ +1, /* dclk */ +0, /* rmclk */ +1, /* cwin */ +1, /* wingo */ +0, /* hup */ +1, /* dial */ +1, /* qdial */ +0, /* tone */ +0, /* pulse */ +0, /* hook */ +0, /* pause */ +0, /* wait */ +1, /* u0 */ +1, /* u1 */ +1, /* u2 */ +1, /* u3 */ +1, /* u4 */ +1, /* u5 */ +1, /* u6 */ +1, /* u7 */ +1, /* u8 */ +1, /* u9 */ +0, /* op */ +0, /* oc */ +1, /* initc */ +1, /* initp */ +1, /* scp */ +1, /* setf */ +1, /* setb */ +0, /* cpi */ +0, /* lpi */ +0, /* chr */ +0, /* cvr */ +0, /* defc */ +0, /* swidm */ +0, /* sdrfq */ +0, /* sitm */ +0, /* slm */ +0, /* smicm */ +0, /* snlq */ +0, /* snrmq */ +0, /* sshm */ +0, /* ssubm */ +0, /* ssupm */ +0, /* sum */ +0, /* rwidm */ +0, /* ritm */ +0, /* rlm */ +0, /* rmicm */ +0, /* rshm */ +0, /* rsubm */ +0, /* rsupm */ +0, /* rum */ +0, /* mhpa */ +0, /* mcud1 */ +0, /* mcub1 */ +0, /* mcuf1 */ +0, /* mvpa */ +0, /* mcuu1 */ +0, /* porder */ +0, /* mcud */ +0, /* mcub */ +0, /* mcuf */ +0, /* mcuu */ +0, /* scs */ +0, /* smgb */ +1, /* smgbp */ +1, /* smglp */ +1, /* smgrp */ +0, /* smgt */ +1, /* smgtp */ +0, /* sbim */ +0, /* scsd */ +0, /* rbim */ +0, /* rcsd */ +0, /* subcs */ +0, /* supcs */ +0, /* docr */ +0, /* zerom */ +0, /* csnm */ +0, /* kmous */ +0, /* minfo */ +0, /* reqmp */ +0, /* getm */ +0, /* setaf */ +0, /* setab */ +1, /* pfxl */ +0, /* devt */ +0, /* csin */ +0, /* s0ds */ +0, /* s1ds */ +0, /* s2ds */ +0, /* s3ds */ +1, /* smglr */ +1, /* smgtb */ +1, /* birep */ +0, /* binel */ +0, /* bicr */ +1, /* colornm */ +0, /* defbi */ +0, /* endbi */ +1, /* setcolor */ +1, /* slines */ +0, /* dispc */ +0, /* smpch */ +0, /* rmpch */ +0, /* smsc */ +0, /* rmsc */ +0, /* pctrm */ +0, /* scesc */ +0, /* scesa */ +0, /* ehhlm */ +0, /* elhlm */ +0, /* elohlm */ +0, /* erhlm */ +0, /* ethlm */ +0, /* evhlm */ +0, /* OTi2 */ +0, /* OTrs */ +0, /* OTnl */ +0, /* OTbc */ +0, /* OTko */ +0, /* OTma */ +-1, /* OTG2 */ +-1, /* OTG3 */ +-1, /* OTG1 */ +-1, /* OTG4 */ +-1, /* OTGR */ +-1, /* OTGL */ +-1, /* OTGU */ +-1, /* OTGD */ +-1, /* OTGH */ +-1, /* OTGV */ +-1, /* OTGC */ +0, /* meml */ +0, /* memu */ +1, /* pln */ +0, /* smln */ +0, /* rmln */ +0, /* kf11 */ +0, /* kf12 */ +0, /* kf13 */ +0, /* kf14 */ +0, /* kf15 */ +0, /* kf16 */ +0, /* kf17 */ +0, /* kf18 */ +0, /* kf19 */ +0, /* kf20 */ +0, /* kf21 */ +0, /* kf22 */ +0, /* kf23 */ +0, /* kf24 */ +0, /* kf25 */ +0, /* kf26 */ +0, /* kf27 */ +0, /* kf28 */ +0, /* kf29 */ +0, /* kf30 */ +0, /* kf31 */ +0, /* kf32 */ +0, /* kf33 */ +0, /* kf34 */ +0, /* kf35 */ +0, /* kf36 */ +0, /* kf37 */ +0, /* kf38 */ +0, /* kf39 */ +0, /* kf40 */ +0, /* kf41 */ +0, /* kf42 */ +0, /* kf43 */ +0, /* kf44 */ +0, /* kf45 */ +0, /* kf46 */ +0, /* kf47 */ +0, /* kf48 */ +0, /* kf49 */ +0, /* kf50 */ +0, /* kf51 */ +0, /* kf52 */ +0, /* kf53 */ +0, /* kf54 */ +0, /* kf55 */ +0, /* kf56 */ +0, /* kf57 */ +0, /* kf58 */ +0, /* kf59 */ +0, /* kf60 */ +0, /* kf61 */ +0, /* kf62 */ +0, /* kf63 */ +0, /* box1 */ +0, /* box2 */ +0, /* batt1 */ +0, /* batt2 */ +0, /* colb0 */ +0, /* colb1 */ +0, /* colb2 */ +0, /* colb3 */ +0, /* colb4 */ +0, /* colb5 */ +0, /* colb6 */ +0, /* colb7 */ +0, /* colf0 */ +0, /* colf1 */ +0, /* colf2 */ +0, /* colf3 */ +0, /* colf4 */ +0, /* colf5 */ +0, /* colf6 */ +0, /* colf7 */ +0, /* font0 */ +0, /* font1 */ +0, /* font2 */ +0, /* font3 */ +0, /* font4 */ +0, /* font5 */ +0, /* font6 */ +0, /* font7 */ +0, /* kbtab */ +0, /* kdo */ +0, /* kcmd */ +0, /* kcpn */ +0, /* kend */ +0, /* khlp */ +0, /* knl */ +0, /* knpn */ +0, /* kppn */ +0, /* kppn */ +0, /* kquit */ +0, /* ksel */ +0, /* kscl */ +0, /* kscr */ +0, /* ktab */ +0, /* kmpf1 */ +0, /* kmpt1 */ +0, /* kmpf2 */ +0, /* kmpt2 */ +0, /* kmpf3 */ +0, /* kmpt3 */ +0, /* kmpf4 */ +0, /* kmpt4 */ +0, /* kmpf5 */ +0, /* kmpt5 */ +0, /* apstr */ +0, /* kmpf6 */ +0, /* kmpt6 */ +0, /* kmpf7 */ +0, /* kmpt7 */ +0, /* kmpf8 */ +0, /* kmpt8 */ +0, /* kmpf9 */ +0, /* kmpt9 */ +0, /* ksf1 */ +0, /* ksf2 */ +0, /* ksf3 */ +0, /* ksf4 */ +0, /* ksf5 */ +0, /* ksf6 */ +0, /* ksf7 */ +0, /* ksf8 */ +0, /* ksf9 */ +0, /* ksf10 */ +0, /* kf11 */ +0, /* kf12 */ +0, /* kf13 */ +0, /* kf14 */ +0, /* kf15 */ +0, /* kf16 */ +0, /* kf17 */ +0, /* kf18 */ +0, /* kf19 */ +0, /* kf20 */ +0, /* kf21 */ +0, /* kf22 */ +0, /* kf23 */ +0, /* kf24 */ +0, /* kf25 */ +0, /* kf26 */ +0, /* kf26 */ +0, /* kf28 */ +0, /* kf29 */ +0, /* kf30 */ +0, /* kf31 */ +0, /* kf31 */ +0, /* kf33 */ +0, /* kf34 */ +0, /* kf35 */ +0, /* kf36 */ +0, /* kf37 */ +0, /* kf38 */ +0, /* kf39 */ +0, /* kf40 */ +0, /* kf41 */ +0, /* kf42 */ +0, /* kf43 */ +0, /* kf44 */ +0, /* kf45 */ +0, /* kf46 */ +0, /* kf47 */ +0, /* kf48 */ +0, /* kf49 */ +0, /* kf50 */ +0, /* kf51 */ +0, /* kf52 */ +0, /* kf53 */ +0, /* kf54 */ +0, /* kf55 */ +0, /* kf56 */ +0, /* kf57 */ +0, /* kf58 */ +0, /* kf59 */ +0, /* kf60 */ +0, /* kf61 */ +0, /* kf62 */ +0, /* kf63 */ +0, /* kact */ +0, /* topl */ +0, /* btml */ +0, /* rvert */ +0, /* lvert */ +} /* 597 entries */; + diff --git a/contrib/media/updf/include/patcher.h b/contrib/media/updf/include/patcher.h new file mode 100644 index 0000000000..2f891c2bc6 --- /dev/null +++ b/contrib/media/updf/include/patcher.h @@ -0,0 +1,10 @@ + + +#ifndef __patcher_h__ +#define __patcher_h__ + +void PatchLoad(LispChar * aFileContent, LispOutput& aOutput, + LispEnvironment& aEnvironment); + +#endif + diff --git a/contrib/media/updf/include/patternclass.h b/contrib/media/updf/include/patternclass.h new file mode 100644 index 0000000000..47e056019f --- /dev/null +++ b/contrib/media/updf/include/patternclass.h @@ -0,0 +1,47 @@ + +#ifndef __patternclass_h__ +#define __patternclass_h__ + +#include "lisptype.h" +#include "lispobject.h" +#include "genericobject.h" +#include "patterns.h" + +/// Wrapper for YacasPatternPredicateBase. +/// This class allows a YacasPatternPredicateBase to be put in a +/// LispGenericObject. +class PatternClass : public GenericClass +{ +public: + PatternClass(YacasPatternPredicateBase* aPatternMatcher); + ~PatternClass(); + + LispBoolean Matches(LispEnvironment& aEnvironment, + LispPtr& aArguments); + LispBoolean Matches(LispEnvironment& aEnvironment, + LispPtr* aArguments); +public: //From GenericClass + virtual LispChar * Send(LispArgList& aArgList); + virtual LispChar * TypeName(); + +private: + PatternClass(const PatternClass& aOther): iPatternMatcher(NULL) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + PatternClass& operator=(const PatternClass& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +protected: + YacasPatternPredicateBase* iPatternMatcher; +}; + + + + +#endif + diff --git a/contrib/media/updf/include/patterns.h b/contrib/media/updf/include/patterns.h new file mode 100644 index 0000000000..3147b329fb --- /dev/null +++ b/contrib/media/updf/include/patterns.h @@ -0,0 +1,216 @@ + +#ifndef __patterns_h__ +#define __patterns_h__ + +/// \file +/// Pattern matching code. +/// +/// General idea: have a class that can match function parameters +/// to a pattern, check for predicates on the arguments, and return +/// whether there was a match. +/// +/// First the pattern is mapped onto the arguments. Then local variables +/// are set. Then the predicates are called. If they all return true, +/// Then the pattern matches, and the locals can stay (the body is expected +/// to use these variables). + + +#include "yacasbase.h" +#include "lisptype.h" +#include "grower.h" +#include "lispenvironment.h" + + +/// Abstract class for matching one argument to a pattern. +class YacasParamMatcherBase : public YacasBase +{ +public: + /// Destructor. + /// This function contains no code. + virtual ~YacasParamMatcherBase(); + + /// Check whether some expression matches to the pattern. + /// \param aEnvironment the underlying Lisp environment. + /// \param aExpression the expression to test. + /// \param arguments (input/output) actual values of the pattern + /// variables for \a aExpression. + virtual LispBoolean ArgumentMatches(LispEnvironment& aEnvironment, + LispPtr& aExpression, + LispPtr* arguments)=0; +}; + +/// Class for matching an expression to a given atom. +class MatchAtom : public YacasParamMatcherBase +{ +public: + MatchAtom(LispString * aString); + virtual LispBoolean ArgumentMatches(LispEnvironment& aEnvironment, + LispPtr& aExpression, + LispPtr* arguments); +protected: + LispString * iString; +}; + +/// Class for matching an expression to a given number. +class MatchNumber : public YacasParamMatcherBase +{ +public: + MatchNumber(BigNumber* aNumber); + virtual LispBoolean ArgumentMatches(LispEnvironment& aEnvironment, + LispPtr& aExpression, + LispPtr* arguments); +protected: + RefPtr<BigNumber> iNumber; +}; + +/// Class for matching against a list of YacasParamMatcherBase objects. +class MatchSubList : public YacasParamMatcherBase +{ +public: + MatchSubList(YacasParamMatcherBase** aMatchers, LispInt aNrMatchers); + ~MatchSubList(); + virtual LispBoolean ArgumentMatches(LispEnvironment& aEnvironment, + LispPtr& aExpression, + LispPtr* arguments); +private: + MatchSubList(const MatchSubList& aOther) : iMatchers(NULL),iNrMatchers(0) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + MatchSubList& operator=(const MatchSubList& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } +protected: + YacasParamMatcherBase** iMatchers; + LispInt iNrMatchers; +}; + +/// Class for matching against a pattern variable. +class MatchVariable : public YacasParamMatcherBase +{ +public: + MatchVariable(LispInt aVarIndex); + + /// Matches an expression against the pattern variable. + /// \param aEnvironment the underlying Lisp environment. + /// \param aExpression the expression to test. + /// \param arguments (input/output) actual values of the pattern + /// variables for \a aExpression. + /// + /// If entry #iVarIndex in \a arguments is still empty, the + /// pattern matches and \a aExpression is stored in this + /// entry. Otherwise, the pattern only matches if the entry equals + /// \a aExpression. + virtual LispBoolean ArgumentMatches(LispEnvironment& aEnvironment, + LispPtr& aExpression, + LispPtr* arguments); +protected: + /// Index of variable in YacasPatternPredicateBase::iVariables. + LispInt iVarIndex; +}; + + +/// Class that matches function arguments to a pattern. +/// This class (specifically, the Matches() member function) can match +/// function parameters to a pattern, check for predicates on the +/// arguments, and return whether there was a match. + +class YacasPatternPredicateBase : public YacasBase +{ +public: + /// Constructor. + /// \param aEnvironment the underlying Lisp environment + /// \param aPattern Lisp expression containing the pattern + /// \param aPostPredicate Lisp expression containing the + /// postpredicate + /// + /// The function MakePatternMatcher() is called for every argument + /// in \a aPattern, and the resulting pattern matchers are + /// collected in #iParamMatchers. Additionally, \a aPostPredicate + /// is copied, and the copy is added to #iPredicates. + YacasPatternPredicateBase(LispEnvironment& aEnvironment, + LispPtr& aPattern, + LispPtr& aPostPredicate); + + /// Destructor. + /// This function contains no code. + ~YacasPatternPredicateBase(); + + /// Try to match the pattern against \a aArguments. + /// First, every argument in \a aArguments is matched against the + /// corresponding YacasParamMatcherBase in #iParamMatches. If any + /// match fails, Matches() returns false. Otherwise, a temporary + /// LispLocalFrame is constructed, then SetPatternVariables() and + /// CheckPredicates() are called, and then the LispLocalFrame is + /// immediately deleted. If CheckPredicates() returns false, this + /// function also returns false. Otherwise, SetPatternVariables() + /// is called again, but now in the current LispLocalFrame, and + /// this function returns true. + LispBoolean Matches(LispEnvironment& aEnvironment, + LispPtr& aArguments); + + /// Try to match the pattern against \a aArguments. + /// This function does the same as Matches(LispEnvironment&,LispPtr&), + /// but differs in the type of the arguments. + LispBoolean Matches(LispEnvironment& aEnvironment, + LispPtr* aArguments); + +protected: + /// Construct a pattern matcher out of a Lisp expression. + /// The result of this function depends on the value of \a aPattern: + /// - If \a aPattern is a number, the corresponding MatchNumber is + /// constructed and returned. + /// - If \a aPattern is an atom, the corresponding MatchAtom is + /// constructed and returned. + /// - If \a aPattern is a list of the form <tt>( _ var )<tt>, + /// where \c var is an atom, LookUp() is called on \c var. Then + /// the correspoding MatchVariable is constructed and returned. + /// - If \a aPattern is a list of the form <tt>( _ var expr )<tt>, + /// where \c var is an atom, LookUp() is called on \c var. Then, + /// \a expr is appended to #iPredicates. Finally, the + /// correspoding MatchVariable is constructed and returned. + /// - If \a aPattern is a list of another form, this function + /// calls itself on any of the entries in this list. The + /// resulting YacasParamMatcherBase objects are collected in a + /// MatchSubList, which is returned. + /// - Otherwise, this function returns #NULL. + YacasParamMatcherBase* MakeParamMatcher(LispEnvironment& aEnvironment, LispObject* aPattern); + + /// Look up a variable name in #iVariables + /// \returns index in #iVariables array where \a aVariable + /// appears. + /// + /// If \a aVariable is not in #iVariables, it is added. + LispInt LookUp(LispString * aVariable); + +protected: + /// Set local variables corresponding to the pattern variables. + /// This function goes through the #iVariables array. A local + /// variable is made for every entry in the array, and the + /// corresponding argument is assigned to it. + void SetPatternVariables(LispEnvironment& aEnvironment, LispPtr* arguments); + + /// Check whether all predicates are true. + /// This function goes through all predicates in #iPredicates, and + /// evaluates them. It returns #LispFalse if at least one + /// of these results IsFalse(). An error is raised if any result + /// neither IsTrue() nor IsFalse(). + LispBoolean CheckPredicates(LispEnvironment& aEnvironment); + +protected: + /// List of parameter matches, one for every parameter. + CDeletingArrayGrower<YacasParamMatcherBase*, ArrOpsDeletingPtr<YacasParamMatcherBase> > iParamMatchers; + + /// List of variables appearing in the pattern. + CArrayGrower<LispString *, ArrOpsCustomPtr<LispString> > iVariables; + + /// List of predicates which need to be true for a match. + CArrayGrower<LispPtr, ArrOpsCustomObj<LispPtr> > iPredicates; +}; + + +#endif diff --git a/contrib/media/updf/include/pc.h b/contrib/media/updf/include/pc.h new file mode 100644 index 0000000000..8f00105886 --- /dev/null +++ b/contrib/media/updf/include/pc.h @@ -0,0 +1,80 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_pc_h_ +#define __dj_include_pc_h_ + +#ifdef __GNUC__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +unsigned char inportb (unsigned short _port); +unsigned short inportw (unsigned short _port); +unsigned long inportl (unsigned short _port); +void inportsb (unsigned short _port, unsigned char *_buf, unsigned _len); +void inportsw (unsigned short _port, unsigned short *_buf, unsigned _len); +void inportsl (unsigned short _port, unsigned long *_buf, unsigned _len); +void outportb (unsigned short _port, unsigned char _data); +void outportw (unsigned short _port, unsigned short _data); +void outportl (unsigned short _port, unsigned long _data); +void outportsb(unsigned short _port, const unsigned char *_buf, unsigned _len); +void outportsw(unsigned short _port, const unsigned short *_buf, unsigned _len); +void outportsl(unsigned short _port, const unsigned long *_buf, unsigned _len); + +unsigned char inp(unsigned short _port); +unsigned short inpw(unsigned short _port); +void outp(unsigned short _port, unsigned char _data); +void outpw(unsigned short _port, unsigned short _data); +#ifndef kbhit +int kbhit(void); +#endif +int getkey(void); /* ALT's have 0x100 set */ +int getxkey(void); /* ALT's have 0x100 set, 0xe0 sets 0x200 */ + +// void sound(int _frequency); +#define nosound() sound(0) + +extern unsigned char ScreenAttrib; + +#define ScreenPrimary _go32_info_block.linear_address_of_primary_screen +#define ScreenSecondary _go32_info_block.linear_address_of_secondary_screen + +//int ScreenMode(void); +int ScreenRows(void); +int ScreenCols(void); +void ScreenPutChar(int _ch, int _attr, int _x, int _y); +void ScreenGetChar(int *_ch, int *_attr, int _x, int _y); +void ScreenPutString(const char *_ch, int _attr, int _x, int _y); +void ScreenSetCursor(int _row, int _col); +void ScreenGetCursor(int *_row, int *_col); +void ScreenClear(void); +void ScreenUpdate(void *_virtual_screen); +void ScreenUpdateLine(const void *_virtual_screen_line, int _row); +void ScreenRetrieve(void *_virtual_screen); +void ScreenVisualBell(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS + +#include <inlines/pc.h> + +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif + +#endif /* !__dj_include_pc_h_ */ diff --git a/contrib/media/updf/include/pi.h b/contrib/media/updf/include/pi.h new file mode 100644 index 0000000000..80febc5c65 --- /dev/null +++ b/contrib/media/updf/include/pi.h @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __PI_H +#define __PI_H +/** +@file pi.h +@brief Implementation of a packet iterator (PI) + +The functions in PI.C have for goal to realize a packet iterator that permits to get the next +packet following the progression order and change of it. The functions in PI.C are used +by some function in T2.C. +*/ + +/** @defgroup PI PI - Implementation of a packet iterator */ +/*@{*/ + +/** +FIXME: documentation +*/ +typedef struct opj_pi_resolution { + int pdx, pdy; + int pw, ph; +} opj_pi_resolution_t; + +/** +FIXME: documentation +*/ +typedef struct opj_pi_comp { + int dx, dy; + /** number of resolution levels */ + int numresolutions; + opj_pi_resolution_t *resolutions; +} opj_pi_comp_t; + +/** +Packet iterator +*/ +typedef struct opj_pi_iterator { + /** Enabling Tile part generation*/ + char tp_on; + /** precise if the packet has been already used (usefull for progression order change) */ + short int *include; + /** layer step used to localize the packet in the include vector */ + int step_l; + /** resolution step used to localize the packet in the include vector */ + int step_r; + /** component step used to localize the packet in the include vector */ + int step_c; + /** precinct step used to localize the packet in the include vector */ + int step_p; + /** component that identify the packet */ + int compno; + /** resolution that identify the packet */ + int resno; + /** precinct that identify the packet */ + int precno; + /** layer that identify the packet */ + int layno; + /** 0 if the first packet */ + int first; + /** progression order change information */ + opj_poc_t poc; + /** number of components in the image */ + int numcomps; + /** Components*/ + opj_pi_comp_t *comps; + int tx0, ty0, tx1, ty1; + int x, y, dx, dy; +} opj_pi_iterator_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a packet iterator for Encoder +@param image Raw image for which the packets will be listed +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass +@return Returns a packet iterator that points to the first packet of the tile +@see pi_destroy +*/ +opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno,J2K_T2_MODE t2_mode); +/** +Modify the packet iterator for enabling tile part generation +@param pi Handle to the packet iterator generated in pi_initialise_encode +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@param pino Iterator index for pi +@param tpnum Tile part number of the current tile +@param tppos The position of the tile part flag in the progression order +@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass +@param cur_totnum_tp The total number of tile parts in the current tile +@return Returns true if an error is detected +*/ +bool pi_create_encode(opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp); +/** +Create a packet iterator for Decoder +@param image Raw image for which the packets will be listed +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@return Returns a packet iterator that points to the first packet of the tile +@see pi_destroy +*/ +opj_pi_iterator_t *pi_create_decode(opj_image_t * image, opj_cp_t * cp, int tileno); + +/** +Destroy a packet iterator +@param pi Previously created packet iterator +@param cp Coding parameters +@param tileno Number that identifies the tile for which the packets were listed +@see pi_create +*/ +void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno); + +/** +Modify the packet iterator to point to the next packet +@param pi Packet iterator to modify +@return Returns false if pi pointed to the last packet or else returns true +*/ +bool pi_next(opj_pi_iterator_t * pi); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __PI_H */ diff --git a/contrib/media/updf/include/platmath.h b/contrib/media/updf/include/platmath.h new file mode 100644 index 0000000000..04e25a0b57 --- /dev/null +++ b/contrib/media/updf/include/platmath.h @@ -0,0 +1,24 @@ + +#ifndef __platmath_h__ +#define __platmath_h__ + +// Beware the use of these functions! They cannot be guaranteed to be +// supported on any platform. +double GetDouble(LispObject* aInteger); +LispObject* Double(LispEnvironment& aEnvironment,double aValue); + +LispObject* PlatArcSin(LispEnvironment& aEnvironment,LispObject* int1, LispInt aPrecision); +LispObject* PlatLn(LispEnvironment& aEnvironment,LispObject* int1, LispInt aPrecision); +LispObject* PlatPower(LispEnvironment& aEnvironment,LispObject* int1, LispObject* int2, + LispInt aPrecision); + +LispObject* PlatDiv(LispEnvironment& aEnvironment,LispObject* int1, LispObject* int2,LispInt aPrecision); + +LispObject* PlatIsPrime(LispEnvironment& aEnvironment,LispObject* int1, LispInt aPrecision); + +// table lookup for small prime numbers +unsigned primes_table_check(unsigned long p); +unsigned primes_table_range(); + +#endif + diff --git a/contrib/media/updf/include/png.h b/contrib/media/updf/include/png.h new file mode 100644 index 0000000000..100f56dba2 --- /dev/null +++ b/contrib/media/updf/include/png.h @@ -0,0 +1,2280 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.5.1 - February 3, 2011 + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license (See LICENSE, below) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011: Glenn + * See also "Contributing Authors", below. + * + * Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 + * 1.0.8rc1 1 10008 2.1.0.8rc1 + * 1.0.8 1 10008 2.1.0.8 + * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 + * 1.0.9rc1 1 10009 2.1.0.9rc1 + * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 + * 1.0.9rc2 1 10009 2.1.0.9rc2 + * 1.0.9 1 10009 2.1.0.9 + * 1.0.10beta1 1 10010 2.1.0.10beta1 + * 1.0.10rc1 1 10010 2.1.0.10rc1 + * 1.0.10 1 10010 2.1.0.10 + * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 + * 1.0.11rc1 1 10011 2.1.0.11rc1 + * 1.0.11 1 10011 2.1.0.11 + * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 + * 1.0.12rc1 2 10012 2.1.0.12rc1 + * 1.0.12 2 10012 2.1.0.12 + * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) + * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 + * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 + * 1.2.0rc1 3 10200 3.1.2.0rc1 + * 1.2.0 3 10200 3.1.2.0 + * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 + * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 + * 1.2.1 3 10201 3.1.2.1 + * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 + * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 + * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 + * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 + * 1.0.13 10 10013 10.so.0.1.0.13 + * 1.2.2 12 10202 12.so.0.1.2.2 + * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 + * 1.2.3 12 10203 12.so.0.1.2.3 + * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 + * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 + * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 + * 1.0.14 10 10014 10.so.0.1.0.14 + * 1.2.4 13 10204 12.so.0.1.2.4 + * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 + * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 + * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 + * 1.0.15 10 10015 10.so.0.1.0.15 + * 1.2.5 13 10205 12.so.0.1.2.5 + * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 + * 1.0.16 10 10016 10.so.0.1.0.16 + * 1.2.6 13 10206 12.so.0.1.2.6 + * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 + * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 + * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 + * 1.0.17 10 10017 12.so.0.1.0.17 + * 1.2.7 13 10207 12.so.0.1.2.7 + * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 + * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 + * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 + * 1.0.18 10 10018 12.so.0.1.0.18 + * 1.2.8 13 10208 12.so.0.1.2.8 + * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 + * 1.2.9beta4-11 13 10209 12.so.0.9[.0] + * 1.2.9rc1 13 10209 12.so.0.9[.0] + * 1.2.9 13 10209 12.so.0.9[.0] + * 1.2.10beta1-7 13 10210 12.so.0.10[.0] + * 1.2.10rc1-2 13 10210 12.so.0.10[.0] + * 1.2.10 13 10210 12.so.0.10[.0] + * 1.4.0beta1-5 14 10400 14.so.0.0[.0] + * 1.2.11beta1-4 13 10211 12.so.0.11[.0] + * 1.4.0beta7-8 14 10400 14.so.0.0[.0] + * 1.2.11 13 10211 12.so.0.11[.0] + * 1.2.12 13 10212 12.so.0.12[.0] + * 1.4.0beta9-14 14 10400 14.so.0.0[.0] + * 1.2.13 13 10213 12.so.0.13[.0] + * 1.4.0beta15-36 14 10400 14.so.0.0[.0] + * 1.4.0beta37-87 14 10400 14.so.14.0[.0] + * 1.4.0rc01 14 10400 14.so.14.0[.0] + * 1.4.0beta88-109 14 10400 14.so.14.0[.0] + * 1.4.0rc02-08 14 10400 14.so.14.0[.0] + * 1.4.0 14 10400 14.so.14.0[.0] + * 1.4.1beta01-03 14 10401 14.so.14.1[.0] + * 1.4.1rc01 14 10401 14.so.14.1[.0] + * 1.4.1beta04-12 14 10401 14.so.14.1[.0] + * 1.4.1 14 10401 14.so.14.1[.0] + * 1.4.2 14 10402 14.so.14.2[.0] + * 1.4.3 14 10403 14.so.14.3[.0] + * 1.4.4 14 10404 14.so.14.4[.0] + * 1.5.0beta01-58 15 10500 15.so.15.0[.0] + * 1.5.0rc01-07 15 10500 15.so.15.0[.0] + * 1.5.0 15 10500 15.so.15.0[.0] + * 1.5.1beta01-11 15 10501 15.so.15.1[.0] + * 1.5.1rc01-02 15 10501 15.so.15.1[.0] + * 1.5.1 15 10501 15.so.15.1[.0] + * + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng-manual.txt or libpng.3 for more information. The PNG + * specification is available as a W3C Recommendation and as an ISO + * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/ + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + * + * If you modify libpng you may insert additional notices immediately following + * this sentence. + * + * This code is released under the libpng license. + * + * libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are + * Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are + * distributed according to the same disclaimer and license as libpng-1.2.5 + * with the following individual added to the list of Contributing Authors: + * + * Cosmin Truta + * + * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are + * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are + * distributed according to the same disclaimer and license as libpng-1.0.6 + * with the following individuals added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Gilles Vollant + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of the + * library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is with + * the user. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are + * distributed according to the same disclaimer and license as libpng-0.96, + * with the following individuals added to the list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996, 1997 Andreas Dilger + * Distributed according to the same disclaimer and license as libpng-0.88, + * with the following individuals added to the list of Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing Authors + * and Group 42, Inc. disclaim all warranties, expressed or implied, + * including, without limitation, the warranties of merchantability and of + * fitness for any purpose. The Contributing Authors and Group 42, Inc. + * assume no liability for direct, indirect, incidental, special, exemplary, + * or consequential damages, which may result from the use of the PNG + * Reference Library, even if advised of the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from + * any source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, without + * fee, and encourage the use of this source code as a component to + * supporting the PNG file format in commercial products. If you use this + * source code in a product, acknowledgment is not required but would be + * appreciated. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * Libpng is OSI Certified Open Source Software. OSI Certified is a + * certification mark of the Open Source Initiative. + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* + * Y2K compliance in libpng: + * ========================= + * + * February 3, 2011 + * + * Since the PNG Development group is an ad-hoc body, we can't make + * an official declaration. + * + * This is your unofficial assurance that libpng from version 0.71 and + * upward through 1.5.1 are Y2K compliant. It is my belief that + * earlier versions were also Y2K compliant. + * + * Libpng only has three year fields. One is a 2-byte unsigned integer + * that will hold years up to 65535. The other two hold the date in text + * format, and will hold years up to 9999. + * + * The integer is + * "png_uint_16 year" in png_time_struct. + * + * The strings are + * "png_charp time_buffer" in png_struct and + * "near_time_buffer", which is a local character string in png.c. + * + * There are seven time-related functions: + * png.c: png_convert_to_rfc_1123() in png.c + * (formerly png_convert_to_rfc_1152() in error) + * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c + * png_convert_from_time_t() in pngwrite.c + * png_get_tIME() in pngget.c + * png_handle_tIME() in pngrutil.c, called in pngread.c + * png_set_tIME() in pngset.c + * png_write_tIME() in pngwutil.c, called in pngwrite.c + * + * All handle dates properly in a Y2K environment. The + * png_convert_from_time_t() function calls gmtime() to convert from system + * clock time, which returns (year - 1900), which we properly convert to + * the full 4-digit year. There is a possibility that applications using + * libpng are not passing 4-digit years into the png_convert_to_rfc_1123() + * function, or that they are incorrectly passing only a 2-digit year + * instead of "year - 1900" into the png_convert_from_struct_tm() function, + * but this is not under our control. The libpng documentation has always + * stated that it works with 4-digit years, and the APIs have been + * documented as such. + * + * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned + * integer to hold the year, and can hold years as large as 65535. + * + * zlib, upon which libpng depends, is also Y2K compliant. It contains + * no date-related code. + * + * Glenn Randers-Pehrson + * libpng maintainer + * PNG Development Group + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.5.1" +#define PNG_HEADER_VERSION_STRING \ + " libpng version 1.5.1 - February 3, 2011\n" + +#define PNG_LIBPNG_VER_SONUM 15 +#define PNG_LIBPNG_VER_DLLNUM 15 + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 5 +#define PNG_LIBPNG_VER_RELEASE 1 +/* This should match the numeric part of the final component of + * PNG_LIBPNG_VER_STRING, omitting any leading zero: + */ + +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA + +/* Careful here. At one time, Guy wanted to use 082, but that would be octal. + * We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only + * version 1.0.0 was mis-numbered 100 instead of 10000). From + * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release + */ +#define PNG_LIBPNG_VER 10501 /* 1.5.1 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H + /* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Standard header files (not needed for the version info) */ +# ifdef PNG_SETJMP_SUPPORTED +# include <setjmp.h> +# endif + +/* Need the time information for converting tIME chunks, it + * defines struct tm: + */ +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* "time.h" functions are not supported on all operating systems */ +# include <time.h> +#endif + +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 2. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 3. Exported library functions. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ +/* Section 1: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 2: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_5_1; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color FAR * png_colorp; +typedef PNG_CONST png_color FAR * png_const_colorp; +typedef png_color FAR * FAR * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 FAR * png_color_16p; +typedef PNG_CONST png_color_16 FAR * png_const_color_16p; +typedef png_color_16 FAR * FAR * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 FAR * png_color_8p; +typedef PNG_CONST png_color_8 FAR * png_const_color_8p; +typedef png_color_8 FAR * FAR * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry FAR * png_sPLT_entryp; +typedef PNG_CONST png_sPLT_entry FAR * png_const_sPLT_entryp; +typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t FAR * png_sPLT_tp; +typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp; +typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text", "lang", and + * "lang_key" fields can be regular C strings, empty strings, or NULL pointers. + * However, the * structure returned by png_get_text() will always contain + * regular zero-terminated C strings (possibly empty), never NULL pointers, + * so they can be safely used in printf() and other string-handling functions. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + png_size_t text_length; /* length of the text string */ + png_size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text FAR * png_textp; +typedef PNG_CONST png_text FAR * png_const_textp; +typedef png_text FAR * FAR * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time FAR * png_timep; +typedef PNG_CONST png_time FAR * png_const_timep; +typedef png_time FAR * FAR * png_timepp; + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; + png_byte *data; + png_size_t size; + + /* libpng-using applications should NOT directly modify this byte. */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; +typedef png_unknown_chunk FAR * png_unknown_chunkp; +typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp; +typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; +#endif + +typedef struct png_info_def png_info; +typedef png_info FAR * png_infop; +typedef PNG_CONST png_info FAR * png_const_infop; +typedef png_info FAR * FAR * png_infopp; + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((png_size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_<chunk> defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001 +#define PNG_INFO_sBIT 0x0002 +#define PNG_INFO_cHRM 0x0004 +#define PNG_INFO_PLTE 0x0008 +#define PNG_INFO_tRNS 0x0010 +#define PNG_INFO_bKGD 0x0020 +#define PNG_INFO_hIST 0x0040 +#define PNG_INFO_pHYs 0x0080 +#define PNG_INFO_oFFs 0x0100 +#define PNG_INFO_tIME 0x0200 +#define PNG_INFO_pCAL 0x0400 +#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + png_size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info FAR * png_row_infop; +typedef png_row_info FAR * FAR * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef struct png_struct_def png_struct; +typedef PNG_CONST png_struct FAR * png_const_structp; +typedef png_struct FAR * png_structp; + +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp), ); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t), ); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp), ); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int), ); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int), ); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, + (png_structp, png_infop), ); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, + (png_structp, png_infop), ); +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, + (png_structp, png_bytep, png_uint_32, int), ); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, + (png_structp, png_row_infop, png_bytep), ); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp), ); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp), ); +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in <setjmp.h>, and the + * application must include this before png.h to obtain the definition + * of jmp_buf. The function is required to be PNG_NORETURN. (Note that + * PNG_PTR_NORETURN is used here because current versions of the Microsoft + * C compiler do not support the PNG_NORETURN attribute on a pointer.) + * + * If you get a type warning from the compiler when linking against this line + * then your compiler has 'longjmp' that does not match the requirements of the + * compiler that built libpng. You will have to write a wrapper function for + * your compiler's longjmp and call png_set_longjmp_fn directly (not via the + * png_jmpbuf macro.) + * + * If you get a warning here while building the library you will need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), + PNG_PTR_NORETURN); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t), ); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp), ); + +typedef png_struct FAR * FAR * png_structpp; + +/* Section 3: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first <num_bytes> magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (ie return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, + png_size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, + (png_const_structp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, + png_size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_structp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr)); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, png_size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structp png_ptr, + png_const_bytep data, png_size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr), + PNG_ALLOCATED); + +PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr, + png_size_t png_info_struct_size)); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structp png_ptr, png_infop info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structp png_ptr, png_infop info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structp png_ptr, png_infop info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED +PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123, + (png_structp png_ptr, + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + PNG_CONST struct tm FAR * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, + (png_timep ptime, time_t ttime)); +#endif /* PNG_CONVERT_tIME_SUPPORTED */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr, + int error_action, double red, double green)); +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)); + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp + png_ptr)); +#endif + +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, + (png_structp png_ptr, png_uint_32 filler, + int flags)); +#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)); +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)); +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_16_TO_8_SUPPORTED +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, + (png_structp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_const_uint_16p histogram, + int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent) */ +PNG_FP_EXPORT(50, void, png_set_gamma, + (png_structp png_ptr, double screen_gamma, + double default_file_gamma)); +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr, + png_fixed_point screen_gamma, png_fixed_point default_file_gamma)); +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, + (png_structp png_ptr, png_infop info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, + (png_structp png_ptr, png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, + (png_structp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, + (png_structp png_ptr, png_infop info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, + (png_structp png_ptr, int crit_action, int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explination of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, + (png_structp png_ptr, int method, int filters)); + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ + PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */ +/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ + * defines, either the default (minimum-sum-of-absolute-differences), or + * the experimental method (weighted-minimum-sum-of-absolute-differences). + * + * Weights are factors >= 1.0, indicating how important it is to keep the + * filter type consistent between rows. Larger numbers mean the current + * filter is that many times as likely to be the same as the "num_weights" + * previous filters. This is cumulative for each previous row with a weight. + * There needs to be "num_weights" values in "filter_weights", or it can be + * NULL if the weights aren't being specified. Weights have no influence on + * the selection of the first row filter. Well chosen weights can (in theory) + * improve the compression for a given image. + * + * Costs are factors >= 1.0 indicating the relative decoding costs of a + * filter type. Higher costs indicate more decoding expense, and are + * therefore less likely to be selected over a filter with lower computational + * costs. There needs to be a value in "filter_costs" for each valid filter + * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't + * setting the costs. Costs try to improve the speed of decompression without + * unduly increasing the compressed image size. + * + * A negative weight or cost indicates the default value is to be used, and + * values in the range [0.0, 1.0) indicate the value is to remain unchanged. + * The default values for both weights and costs are currently 1.0, but may + * change if good general weighting/cost heuristics can be found. If both + * the weights and costs are set to 1.0, this degenerates the WEIGHTED method + * to the UNWEIGHTED method, but with added encoding time/computation. + */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)); +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structp png_ptr, + int heuristic_method, int num_weights, png_const_fixed_point_p + filter_weights, png_const_fixed_point_p filter_costs)); +#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ + +/* Heuristic used for row filter selection. These defines should NOT be + * changed. + */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer caclulations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +PNG_EXPORT(69, void, png_set_compression_level, + (png_structp png_ptr, int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr, + int strategy)); + +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr, + int method)); + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, + (png_structp png_ptr, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_structp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is still the row in the final, de-interlaced, image but the row + * only contains the data of the current pass - consult png_row_info for the + * actual width of the row! + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, + (png_structp png_ptr, png_infop info_ptr, + png_bytep buffer, png_size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +PNG_EXPORTA(94, png_voidp, png_malloc, + (png_structp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, + (png_structp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_structp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, + (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); + +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application */ +PNG_EXPORT(99, void, png_data_freer, + (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008 +#define PNG_FREE_ICCP 0x0010 +#define PNG_FREE_SPLT 0x0020 +#define PNG_FREE_ROWS 0x0040 +#define PNG_FREE_PCAL 0x0080 +#define PNG_FREE_SCAL 0x0100 +#define PNG_FREE_UNKN 0x0200 +#define PNG_FREE_LIST 0x0400 +#define PNG_FREE_PLTE 0x1000 +#define PNG_FREE_TRNS 0x2000 +#define PNG_FREE_TEXT 0x4000 +#define PNG_FREE_ALL 0x7fff +#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr)); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, + (png_structp png_ptr, png_const_charp error_message), + PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN); +#endif + +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_structp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +# undef png_benign_error +PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr, + png_const_charp warning_message)); + +/* Same, chunk name is prepended to message. */ +# undef png_chunk_benign_error +PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr, + png_const_charp warning_message)); + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_<chunk> functions are for storing values in the png_info_struct. + * Similarly, the png_get_<chunk> calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_<chunk> functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, + (png_const_structp png_ptr, png_const_infop info_ptr)); +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_structp png_ptr, + png_infop info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +#endif /* PNG_EASY_ACCESS_SUPPORTED */ + +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, + (png_const_structp png_ptr, png_infop info_ptr)); + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, + (png_const_structp png_ptr, png_infop info_ptr, + png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr, + png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr, + png_const_infop info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */ +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structp png_ptr, + png_const_infop info_ptr, png_fixed_point *int_white_x, + png_fixed_point *int_white_y, png_fixed_point *int_red_x, + png_fixed_point *int_red_y, png_fixed_point *int_green_x, + png_fixed_point *int_green_y, png_fixed_point *int_blue_x, + png_fixed_point *int_blue_y)); +#endif +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, + (png_structp png_ptr, png_infop info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)); +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, + (png_const_structp png_ptr, png_const_infop info_ptr, + double *file_gamma)); +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_fixed_point *int_file_gamma)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr, + png_infop info_ptr, double file_gamma)); +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_file_gamma)); +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_16p *hist)); +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr, + png_infop info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, + int *interlace_method, int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, + int interlace_method, int compression_method, int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, + (png_structp png_ptr, png_infop info_ptr, + png_int_32 offset_x, png_int_32 offset_y, int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, + int *nparams, + png_charp *units, png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr, + png_infop info_ptr, + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, + (png_structp png_ptr, png_infop info_ptr, + png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, + (png_const_structp png_ptr, png_infop info_ptr, + png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, + (png_structp png_ptr, png_infop info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr, + png_const_infop info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, + (png_structp png_ptr, png_infop info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr, + png_infop info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_charpp name, int *compression_type, png_bytepp profile, + png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, + (png_structp png_ptr, png_infop info_ptr, + png_const_charp name, int compression_type, png_const_bytep profile, + png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, png_uint_32, png_get_sPLT, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, + (png_structp png_ptr, png_infop info_ptr, + png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, png_uint_32, png_get_text, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, + (png_structp png_ptr, png_infop info_ptr, + png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, + (png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, + (png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, + (png_const_structp png_ptr, png_infop info_ptr, + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, + (png_structp png_ptr, png_infop info_ptr, + png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, + (png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, double *width, double *height)); +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_structp png_ptr, png_const_infop info_ptr, int *unit, + png_fixed_point *width, + png_fixed_point *height)); +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, + (png_structp png_ptr, png_infop info_ptr, + int unit, double width, double height)); +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr, + png_infop info_ptr, int unit, png_fixed_point width, + png_fixed_point height)); +PNG_EXPORT(171, void, png_set_sCAL_s, + (png_structp png_ptr, png_infop info_ptr, + int unit, png_const_charp swidth, png_const_charp sheight)); +#endif /* PNG_sCAL_SUPPORTED */ + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +/* Provide a list of chunks and how they are to be handled, if the built-in + handling or default unknown chunk handling is not desired. Any chunks not + listed will be handled in the default manner. The IHDR and IEND chunks + must not be listed. + keep = 0: follow default behaviour + = 1: do not keep + = 2: keep only if safe-to-copy + = 3: keep even if unsafe-to-copy +*/ +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, + (png_structp png_ptr, int keep, + png_const_bytep chunk_list, int num_chunks)); +PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr, + png_const_bytep chunk_name)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr, + png_infop info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_structp png_ptr, png_infop info_ptr, int chunk, int location)); +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr, + png_const_infop info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, + (png_structp png_ptr, png_infop info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr, + int transforms, png_voidp params)); +PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr, + int transforms, png_voidp params)); +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, + (png_structp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structp png_ptr, png_const_infop info_ptr)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_structp png_ptr, png_const_infop info_ptr)); +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr, + png_const_infop info_ptr)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_structp png_ptr, png_const_infop info_ptr)); +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr, + png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr)); + +PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name, + (png_structp png_ptr), PNG_DEPRECATED); +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* ?PNG_IO_STATE_SUPPORTED */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\ + -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\ + -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass)) + +/* For the progressive reader it is necessary to find the row in the output + * image given a row in an interlaced image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ + (((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass)) +#define PNG_COL_FROM_PASS_COL(xIn, pass) \ + (((xIn)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass)) + +/* Two macros which return a boolean (0 or 1) saying whether the given row + * or column is in a particular pass. These use a common utility macro that + * returns a mask for a given pass - the offset 'off' selects the row or + * column version. The mask has the appropriate bit set for each column in + * the tile. + */ +#define PNG_PASS_MASK(pass,off) ( \ + ((0x110145AFU>>(((7-(off))-(pass))<<2)) & 0xFU) | \ + ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + (png_uint_16)128); \ + (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } + +# define png_composite_16(composite, fg, alpha, bg) \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(png_uint_32)(65535L \ + - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ + (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + (png_uint_16)127) / 255) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ + (png_uint_32)32767) / (png_uint_32)65535L) +#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define png_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define png_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define png_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \ + : (png_int_32)png_get_uint_32(buf))) +#endif + +/* Maintainer: Put new public prototypes here ^, in libpng.3, and project + * defs + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) Maintainer, remember to add an entry to + * scripts/symbols.def as well. + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(220); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/contrib/media/updf/include/pngconf.h b/contrib/media/updf/include/pngconf.h new file mode 100644 index 0000000000..2633bf890c --- /dev/null +++ b/contrib/media/updf/include/pngconf.h @@ -0,0 +1,632 @@ + +/* pngconf.h - machine configurable file for libpng + * + * libpng version 1.5.1 - February 3, 2011 + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + */ + +/* Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C + * definition file for machine specific limits, this may impact the + * correctness of the definitons below (see uses of INT_MAX). + */ +#ifndef PNG_NO_LIMITS_H +# include <limits.h> +#endif + +/* For the memory copy APIs (i.e. the standard definitions of these), + * because this file defines png_memcpy and so on the base APIs must + * be defined here. + */ +#ifdef BSD +# include <strings.h> +#else +# include <string.h> +#endif + +/* For png_FILE_p - this provides the standard definition of a + * FILE + */ +#ifdef PNG_STDIO_SUPPORTED +# include <stdio.h> +#endif + +/* This controls optimization of the reading of 16 and 32 bit values + * from PNG files. It can be set on a per-app-file basis - it + * just changes whether a macro is used to the function is called. + * The library builder sets the default, if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro protects us against machines that don't have function + * prototypes (ie K&R style headers). If your compiler does not handle + * function prototypes, define this macro and use the included ansi2knr. + * I've always been able to use _NO_PROTO as the indicator, but you may + * need to drag the empty declaration out in front of here, or change the + * ifdef to suit your own needs. + */ +#ifndef PNGARG + +# ifdef OF /* zlib prototype munger */ +# define PNGARG(arglist) OF(arglist) +# else + +# ifdef _NO_PROTO +# define PNGARG(arglist) () +# else +# define PNGARG(arglist) arglist +# endif /* _NO_PROTO */ + +# endif /* OF */ + +#endif /* PNGARG */ + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows sytems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows/x86 systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ + defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\ + ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\ + defined(_M_X64) || defined(_M_IA64) ) + /* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes + * builds under Cygwin or MinGW. Also includes Watcom builds but these need + * special treatment because they are not compatible with GCC or Visual C + * because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) + ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows/x86 */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* The default for PNG_IMPEXP depends on whether the library is + * being built or used. + */ +#ifndef PNG_IMPEXP +# ifdef PNGLIB_BUILD + /* Building the library */ +# if (defined(DLL_EXPORT)/*from libtool*/ ||\ + defined(_WINDLL) || defined(_DLL) || defined(__DLL__) ||\ + defined(_USRDLL) ||\ + defined(PNG_BUILD_DLL)) && defined(PNG_DLL_EXPORT) + /* Building a DLL. */ +# define PNG_IMPEXP PNG_DLL_EXPORT +# endif /* DLL */ +# else + /* Using the library */ +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* THe following complexity is concerned with getting the 'attributes' of the + * declared function in the correct place. This potentially requires a separate + * PNG_EXPORT function for every compiler. + */ +#ifndef PNG_FUNCTION +# ifdef __GNUC__ +# define PNG_FUNCTION(type, name, args, attributes)\ + attributes type name args +# else /* !GNUC */ +# ifdef _MSC_VER +# define PNG_FUNCTION(type, name, args, attributes)\ + attributes type name args +# else /* !MSC */ +# define PNG_FUNCTION(type, name, args, attributes)\ + type name args +# endif +# endif +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes)\ + extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\ + attributes) +#endif + +#define PNG_EXPORT(ordinal, type, name, args)\ + PNG_EXPORTA(ordinal, type, name, args, ) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args, attributes)\ + type (PNGCBAPI name) PNGARG(args) attributes +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. + */ +# ifdef __GNUC__ +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# ifndef PNG_PTR_NORETURN +# define PNG_PTR_NORETURN __attribute__((__noreturn__)) +# endif +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif + + /* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ +# ifndef PNGLIB_BUILD +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif /* PNG_PRIVATE */ +# endif /* PNGLIB_BUILD */ +# endif /* __GNUC__ */ +# ifdef _MSC_VER /* may need to check value */ +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /*not supported*/ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_PTR_NORETURN +# define PNG_PTR_NORETURN /*not supported*/ +# endif +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __declspec(restrict) +# endif + + /* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ +# ifndef PNGLIB_BUILD +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif /* PNG_PRIVATE */ +# endif /* PNGLIB_BUILD */ +# endif /* __GNUC__ */ +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args) +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args) +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +/* The following uses const char * instead of char * for error + * and warning message functions, so some compilers won't complain. + * If you do not want to use const, define PNG_NO_CONST here. + * + * This should not change how the APIs are called, so it can be done + * on a per-file basis in the application. + */ +#ifndef PNG_CONST +# ifndef PNG_NO_CONST +# define PNG_CONST const +# else +# define PNG_CONST +# endif +#endif + +/* Some typedefs to get us started. These should be safe on most of the + * common platforms. The typedefs should be at least as large as the + * numbers suggest (a png_uint_32 must be at least 32 bits long), but they + * don't have to be exactly that size. Some compilers dislike passing + * unsigned shorts as function parameters, so you may be better off using + * unsigned int for png_uint_16. + */ + +#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL) +typedef unsigned int png_uint_32; +typedef int png_int_32; +#else +typedef unsigned long png_uint_32; +typedef long png_int_32; +#endif +typedef unsigned short png_uint_16; +typedef short png_int_16; +typedef unsigned char png_byte; + +#ifdef PNG_NO_SIZE_T +typedef unsigned int png_size_t; +#else +typedef size_t png_size_t; +#endif +#define png_sizeof(x) (sizeof (x)) + +/* The following is needed for medium model support. It cannot be in the + * pngpriv.h header. Needs modification for other compilers besides + * MSC. Model independent support declares all arrays and pointers to be + * large using the far keyword. The zlib version used must also support + * model independent data. As of version zlib 1.0.4, the necessary changes + * have been made in zlib. The USE_FAR_KEYWORD define triggers other + * changes that are needed. (Tim Wegner) + */ + +/* Separate compiler dependencies (problem here is that zlib.h always + * defines FAR. (SJT) + */ +#ifdef __BORLANDC__ +# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) +# define LDATA 1 +# else +# define LDATA 0 +# endif + /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ +# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) +# define PNG_MAX_MALLOC_64K /* only used in build */ +# if (LDATA != 1) +# ifndef FAR +# define FAR __far +# endif +# define USE_FAR_KEYWORD +# endif /* LDATA != 1 */ + /* Possibly useful for moving data out of default segment. + * Uncomment it if you want. Could also define FARDATA as + * const if your compiler supports it. (SJT) +# define FARDATA FAR + */ +# endif /* __WIN32__, __FLAT__, __CYGWIN__ */ +#endif /* __BORLANDC__ */ + + +/* Suggest testing for specific compiler first before testing for + * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, + * making reliance oncertain keywords suspect. (SJT) + */ + +/* MSC Medium model */ +#ifdef FAR +# ifdef M_I86MM +# define USE_FAR_KEYWORD +# define FARDATA FAR +# include <dos.h> +# endif +#endif + +/* SJT: default case */ +#ifndef FAR +# define FAR +#endif + +/* At this point FAR is always defined */ +#ifndef FARDATA +# define FARDATA +#endif + +/* Typedef for floating-point numbers that are converted + * to fixed-point with a multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void FAR * png_voidp; +typedef PNG_CONST void FAR * png_const_voidp; +typedef png_byte FAR * png_bytep; +typedef PNG_CONST png_byte FAR * png_const_bytep; +typedef png_uint_32 FAR * png_uint_32p; +typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p; +typedef png_int_32 FAR * png_int_32p; +typedef PNG_CONST png_int_32 FAR * png_const_int_32p; +typedef png_uint_16 FAR * png_uint_16p; +typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p; +typedef png_int_16 FAR * png_int_16p; +typedef PNG_CONST png_int_16 FAR * png_const_int_16p; +typedef char FAR * png_charp; +typedef PNG_CONST char FAR * png_const_charp; +typedef png_fixed_point FAR * png_fixed_point_p; +typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p; +typedef png_size_t FAR * png_size_tp; +typedef PNG_CONST png_size_t FAR * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double FAR * png_doublep; +typedef PNG_CONST double FAR * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte FAR * FAR * png_bytepp; +typedef png_uint_32 FAR * FAR * png_uint_32pp; +typedef png_int_32 FAR * FAR * png_int_32pp; +typedef png_uint_16 FAR * FAR * png_uint_16pp; +typedef png_int_16 FAR * FAR * png_int_16pp; +typedef PNG_CONST char FAR * FAR * png_const_charpp; +typedef char FAR * FAR * png_charpp; +typedef png_fixed_point FAR * FAR * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double FAR * FAR * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char FAR * FAR * FAR * png_charppp; + +/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, + * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32 + * to png_alloc_size_t are not necessary; in fact, it is recommended + * not to use them at all so that the compiler can complain when something + * turns out to be problematic. + * Casts in the other direction (from png_alloc_size_t to png_size_t or + * png_uint_32) should be explicitly applied; however, we do not expect + * to encounter practical situations that require such conversions. + */ +#if defined(__TURBOC__) && !defined(__FLAT__) + typedef unsigned long png_alloc_size_t; +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + typedef unsigned long png_alloc_size_t; +# else + /* This is an attempt to detect an old Windows system where (int) is + * actually 16 bits, in that case png_malloc must have an argument with a + * bigger size to accomodate the requirements of the library. + */ +# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \ + (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) + typedef DWORD png_alloc_size_t; +# else + typedef png_size_t png_alloc_size_t; +# endif +# endif +#endif + +#endif /* PNGCONF_H */ diff --git a/contrib/media/updf/include/pngdebug.h b/contrib/media/updf/include/pngdebug.h new file mode 100644 index 0000000000..16f81fdd14 --- /dev/null +++ b/contrib/media/updf/include/pngdebug.h @@ -0,0 +1,157 @@ + +/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' tab characters (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include <crtdbg.h> +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include <stdio.h> /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ diff --git a/contrib/media/updf/include/pnginfo.h b/contrib/media/updf/include/pnginfo.h new file mode 100644 index 0000000000..fa19f85e72 --- /dev/null +++ b/contrib/media/updf/include/pnginfo.h @@ -0,0 +1,270 @@ + +/* pnginfo.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + + /* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, using png_set_*() functions, then + * call png_write_info(). + * + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. In libpng-1.5.0 this was moved into a separate private + * file that is not visible to applications. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* the following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + png_fixed_point gamma; +#endif + +#ifdef PNG_sRGB_SUPPORTED + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans; /* alpha values for paletted image */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ + png_fixed_point x_white; + png_fixed_point y_white; + png_fixed_point x_red; + png_fixed_point y_red; + png_fixed_point x_green; + png_fixed_point y_green; + png_fixed_point x_blue; + png_fixed_point y_blue; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + int unknown_chunks_num; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ + png_byte iccp_compression; /* Always zero */ +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + png_uint_32 splt_palettes_num; +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +}; +#endif /* PNGINFO_H */ diff --git a/contrib/media/updf/include/pnglibconf.h b/contrib/media/updf/include/pnglibconf.h new file mode 100644 index 0000000000..8fbe0038dd --- /dev/null +++ b/contrib/media/updf/include/pnglibconf.h @@ -0,0 +1,173 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.5.0 - January 6, 2011 */ + +/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* settings */ +#define PNG_MAX_GAMMA_8 11 +#define PNG_CALLOC_SUPPORTED +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_USER_WIDTH_MAX 1000000L +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_API_RULE 0 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_USER_CHUNK_CACHE_MAX 0 +#define PNG_USER_HEIGHT_MAX 1000000L +#define PNG_sCAL_PRECISION 5 +#define PNG_COST_SHIFT 3 +#define PNG_WEIGHT_SHIFT 8 +#define PNG_USER_CHUNK_MALLOC_MAX 0 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_ZBUF_SIZE 8192 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +/* end of settings */ +/* options */ +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +#define PNG_ALIGN_MEMORY_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_ERROR_NUMBERS_SUPPORTED +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_READ_SUPPORTED +/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_16BIT_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_CHECK_cHRM_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_zTXt_SUPPORTED +#define PNG_iTXt_SUPPORTED +/* end of options */ +#endif /* PNGLCONF_H */ diff --git a/contrib/media/updf/include/pngpriv.h b/contrib/media/updf/include/pngpriv.h new file mode 100644 index 0000000000..675608a6ff --- /dev/null +++ b/contrib/media/updf/include/pngpriv.h @@ -0,0 +1,1235 @@ + +/* pngpriv.h - private declarations for use inside libpng + * + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The symbols declared in this file (including the functions declared + * as PNG_EXTERN) are PRIVATE. They are not part of the libpng public + * interface, and are not recommended for use by regular applications. + * Some of them may become public in the future; others may stay private, + * change in an incompatible way, or even disappear. + * Although the libpng users are not forbidden to include this header, + * they should be well aware of the issues that may arise from doing so. + */ + +#ifndef PNGPRIV_H +#define PNGPRIV_H + +/* This is required for the definition of abort(), used as a last ditch + * error handler when all else fails. + */ +#include <stdlib.h> + +#define PNGLIB_BUILD +#ifdef PNG_USER_CONFIG +# include "pngusr.h" + /* These should have been defined in pngusr.h */ +# ifndef PNG_USER_PRIVATEBUILD +# define PNG_USER_PRIVATEBUILD "Custom libpng build" +# endif +# ifndef PNG_USER_DLLFNAME_POSTFIX +# define PNG_USER_DLLFNAME_POSTFIX "Cb" +# endif +#endif +#include "png.h" +#include "pnginfo.h" +#include "pngstruct.h" + +/* This is used for 16 bit gamma tables - only the top level pointers are const, + * this could be changed: + */ +typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; + +/* Added at libpng-1.2.9 */ +/* Moved to pngpriv.h at libpng-1.5.0 */ + +/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" + * script. We may need it here to get the correct configuration on things + * like limits. + */ +#ifdef PNG_CONFIGURE_LIBPNG +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +#endif + +/* Moved to pngpriv.h at libpng-1.5.0 */ +/* NOTE: some of these may have been used in external applications as + * these definitions were exposed in pngconf.h prior to 1.5. + */ + +/* If you are running on a machine where you cannot allocate more + * than 64K of memory at once, uncomment this. While libpng will not + * normally need that much memory in a chunk (unless you load up a very + * large file), zlib needs to know how big of a chunk it can use, and + * libpng thus makes sure to check any memory allocation to verify it + * will fit into memory. + * + * zlib provides 'MAXSEG_64K' which, if defined, indicates the + * same limit and pngconf.h (already included) sets the limit + * if certain operating systems are detected. + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) +# define PNG_MAX_MALLOC_64K +#endif + +/* Unused formal parameter warnings are silenced using the following macro + * which is expected to have no bad effects on performance (optimizing + * compilers will probably remove it entirely). Note that if you replace + * it with something other than whitespace, you must include the terminating + * semicolon. + */ +#define PNG_UNUSED(param) (void)param; + +/* Just a little check that someone hasn't tried to define something + * contradictory. + */ +#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) +# undef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 65536L +#endif + +/* If warnings or errors are turned off the code is disabled + * or redirected here. + */ +#ifndef PNG_WARNINGS_SUPPORTED +# define png_warning(s1,s2) ((void)0) +# define png_chunk_warning(s1,s2) ((void)0) +#endif +#ifndef PNG_ERROR_TEXT_SUPPORTED +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +# define png_fixed_error(s1,s2) png_err(s1) +#endif + +#ifndef PNG_EXTERN +/* The functions exported by PNG_EXTERN are internal functions, which + * aren't usually used outside the library (as far as I know), so it is + * debatable if they should be exported at all. In the future, when it + * is possible to have run-time registry of chunk-handling functions, + * some of these might be made available again. +# define PNG_EXTERN extern + */ +# define PNG_EXTERN +#endif + +/* Some fixed point APIs are still required even if not exported because + * they get used by the corresponding floating point APIs. This magic + * deals with this: + */ +#ifdef PNG_FIXED_POINT_SUPPORTED +# define PNGFAPI PNGAPI +#else +# define PNGFAPI /* PRIVATE */ +#endif + +/* Other defines specific to compilers can go here. Try to keep + * them inside an appropriate ifdef/endif pair for portability. + */ +#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) + /* png.c requires the following ANSI-C constants if the conversion of + * floating point to ASCII is implemented therein: + * + * DBL_DIG Maximum number of decimal digits (can be set to any constant) + * DBL_MIN Smallest normalized fp number (can be set to an arbitrary value) + * DBL_MAX Maximum floating point number (can be set to an arbitrary value) + */ +# include <float.h> + +# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ + defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) + /* We need to check that <math.h> hasn't already been included earlier + * as it seems it doesn't agree with <fp.h>, yet we should really use + * <fp.h> if possible. + */ +# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +# include <fp.h> +# endif +# else +# include <math.h> +# endif +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ +# include <m68881.h> +# endif +#endif + +/* This provides the non-ANSI (far) memory allocation routines. */ +#if defined(__TURBOC__) && defined(__MSDOS__) +# include <mem.h> +# include <alloc.h> +#endif + + +/* Moved here around 1.5.0beta36 from pngconf.h */ +/* Users may want to use these so they are not private. Any library + * functions that are passed far data must be model-independent. + */ + +/* Memory model/platform independent fns */ +#ifndef PNG_ABORT +# ifdef _WINDOWS_ +# define PNG_ABORT() ExitProcess(0) +# else +# define PNG_ABORT() abort() +# endif +#endif + +#ifdef USE_FAR_KEYWORD +/* Use this to make far-to-near assignments */ +# define CHECK 1 +# define NOCHECK 0 +# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) +# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) +# define png_strcpy _fstrcpy +# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ +# define png_strlen _fstrlen +# define png_memcmp _fmemcmp /* SJT: added */ +# define png_memcpy _fmemcpy +# define png_memset _fmemset +# define png_sprintf sprintf +#else +# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy lstrcpyA +# define png_strncpy lstrcpynA +# define png_strlen lstrlenA +# define png_memcmp memcmp +# define png_memcpy CopyMemory +# define png_memset memset +# define png_sprintf wsprintfA +# else +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy strcpy +# define png_strncpy strncpy /* Added to v 1.2.6 */ +# define png_strlen strlen +# define png_memcmp memcmp /* SJT: added */ +# define png_memcpy memcpy +# define png_memset memset +# define png_sprintf sprintf +# endif +#endif +/* End of memory model/platform independent support */ + +#ifndef PNG_NO_SNPRINTF +# ifdef _MSC_VER +# define png_snprintf _snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 _snprintf +# define png_snprintf6 _snprintf +# else +# define png_snprintf snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 snprintf +# define png_snprintf6 snprintf +# endif +#else + /* You don't have or don't want to use snprintf(). Caution: Using + * sprintf instead of snprintf exposes your application to accidental + * or malevolent buffer overflows. If you don't have snprintf() + * as a general rule you should provide one (you can get one from + * Portable OpenSSH). + */ +# define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1) +# define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2) +# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ + png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) +#endif +/* End of 1.5.0beta36 move from pngconf.h */ + +/* CONSTANTS and UTILITY MACROS + * These are used internally by libpng and not exposed in the API + */ + +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. + */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_HAVE_IDAT 0x04 +#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ +#define PNG_HAVE_IEND 0x10 +#define PNG_HAVE_gAMA 0x20 +#define PNG_HAVE_cHRM 0x40 +#define PNG_HAVE_sRGB 0x80 +#define PNG_HAVE_CHUNK_HEADER 0x100 +#define PNG_WROTE_tIME 0x200 +#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 +#define PNG_BACKGROUND_IS_GRAY 0x800 +#define PNG_HAVE_PNG_SIGNATURE 0x1000 +#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ + +/* Flags for the transformations the PNG library does on the image data */ +#define PNG_BGR 0x0001 +#define PNG_INTERLACE 0x0002 +#define PNG_PACK 0x0004 +#define PNG_SHIFT 0x0008 +#define PNG_SWAP_BYTES 0x0010 +#define PNG_INVERT_MONO 0x0020 +#define PNG_QUANTIZE 0x0040 +#define PNG_BACKGROUND 0x0080 +#define PNG_BACKGROUND_EXPAND 0x0100 + /* 0x0200 unused */ +#define PNG_16_TO_8 0x0400 +#define PNG_RGBA 0x0800 +#define PNG_EXPAND 0x1000 +#define PNG_GAMMA 0x2000 +#define PNG_GRAY_TO_RGB 0x4000 +#define PNG_FILLER 0x8000L +#define PNG_PACKSWAP 0x10000L +#define PNG_SWAP_ALPHA 0x20000L +#define PNG_STRIP_ALPHA 0x40000L +#define PNG_INVERT_ALPHA 0x80000L +#define PNG_USER_TRANSFORM 0x100000L +#define PNG_RGB_TO_GRAY_ERR 0x200000L +#define PNG_RGB_TO_GRAY_WARN 0x400000L +#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ + /* 0x800000L Unused */ +#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ +#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ + /* 0x4000000L unused */ + /* 0x8000000L unused */ + /* 0x10000000L unused */ + /* 0x20000000L unused */ + /* 0x40000000L unused */ + +/* Flags for png_create_struct */ +#define PNG_STRUCT_PNG 0x0001 +#define PNG_STRUCT_INFO 0x0002 + +/* Scaling factor for filter heuristic weighting calculations */ +#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) +#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) + +/* Flags for the png_ptr->flags rather than declaring a byte for each one */ +#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 +#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 +#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 +#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 +#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 +#define PNG_FLAG_ZLIB_FINISHED 0x0020 +#define PNG_FLAG_ROW_INIT 0x0040 +#define PNG_FLAG_FILLER_AFTER 0x0080 +#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 +#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 +#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 +#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 + /* 0x1000 unused */ + /* 0x2000 unused */ + /* 0x4000 unused */ +#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L +#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L +#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L +#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L +#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L +#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L +#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ +#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ +#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */ + /* 0x1000000L unused */ + /* 0x2000000L unused */ + /* 0x4000000L unused */ + /* 0x8000000L unused */ + /* 0x10000000L unused */ + /* 0x20000000L unused */ + /* 0x40000000L unused */ + +#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ + PNG_FLAG_CRC_ANCILLARY_NOWARN) + +#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ + PNG_FLAG_CRC_CRITICAL_IGNORE) + +#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ + PNG_FLAG_CRC_CRITICAL_MASK) + +/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib + * can handle at once. This type need be no larger than 16 bits (so maximum of + * 65535), this define allows us to discover how big it is, but limited by the + * maximuum for png_size_t. The value can be overriden in a library build + * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably + * lower value (e.g. 255 works). A lower value may help memory usage (slightly) + * and may even improve performance on some systems (and degrade it on others.) + */ +#ifndef ZLIB_IO_MAX +# define ZLIB_IO_MAX ((uInt)-1) +#endif + +/* Save typing and make code easier to understand */ + +#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ + abs((int)((c1).green) - (int)((c2).green)) + \ + abs((int)((c1).blue) - (int)((c2).blue))) + +/* Added to libpng-1.2.6 JB */ +#define PNG_ROWBYTES(pixel_bits, width) \ + ((pixel_bits) >= 8 ? \ + ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ + (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) + +/* PNG_OUT_OF_RANGE returns true if value is outside the range + * ideal-delta..ideal+delta. Each argument is evaluated twice. + * "ideal" and "delta" should be constants, normally simple + * integers, "value" a variable. Added to libpng-1.2.6 JB + */ +#define PNG_OUT_OF_RANGE(value, ideal, delta) \ + ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + +/* Conversions between fixed and floating point, only defined if + * required (to make sure the code doesn't accidentally use float + * when it is supposedly disabled.) + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* The floating point conversion can't overflow, though it can and + * does lose accuracy relative to the original fixed point value. + * In practice this doesn't matter because png_fixed_point only + * stores numbers with very low precision. The png_ptr and s + * arguments are unused by default but are there in case error + * checking becomes a requirement. + */ +#define png_float(png_ptr, fixed, s) (.00001 * (fixed)) + +/* The fixed point conversion performs range checking and evaluates + * its argument multiple times, so must be used with care. The + * range checking uses the PNG specification values for a signed + * 32 bit fixed point value except that the values are deliberately + * rounded-to-zero to an integral value - 21474 (21474.83 is roughly + * (2^31-1) * 100000). 's' is a string that describes the value being + * converted. + * + * NOTE: this macro will raise a png_error if the range check fails, + * therefore it is normally only appropriate to use this on values + * that come from API calls or other sources where an out of range + * error indicates a programming error, not a data error! + * + * NOTE: by default this is off - the macro is not used - because the + * function call saves a lot of code. + */ +#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED +#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ + ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) +#else +PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp, + png_const_charp text)); +#endif +#endif + +/* Constant strings for known chunk types. If you need to add a chunk, + * define the name here, and add an invocation of the macro wherever it's + * needed. + */ +#define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} +#define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} +#define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} +#define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} +#define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} +#define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} +#define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} +#define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} +#define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} +#define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} +#define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} +#define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} +#define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} +#define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} +#define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} +#define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} +#define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} +#define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115, 84, 69, 82, '\0'} +#define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} +#define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} +#define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} +#define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} + + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* These functions are used internally in the code. They generally + * shouldn't be used unless you are writing code to add or replace some + * functionality in libpng. More information about most functions can + * be found in the files where the functions are located. + */ + +/* Allocate memory for an internal libpng struct */ +PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)), + PNG_ALLOCATED); + +/* Free memory from internal libpng struct */ +PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); + +PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct_2, + PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)), + PNG_ALLOCATED); +PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, + png_free_ptr free_fn, png_voidp mem_ptr)); + +/* Free any memory that info_ptr points to and reset struct. */ +PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* Function to allocate memory for zlib. PNGAPI is disallowed. */ +PNG_EXTERN PNG_FUNCTION(voidpf,png_zalloc,PNGARG((voidpf png_ptr, uInt items, + uInt size)),PNG_ALLOCATED); + +/* Function to free memory for zlib. PNGAPI is disallowed. */ +PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); + +/* Next four functions are used internally as callbacks. PNGCBAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to + * PNGCBAPI at 1.5.0 + */ + +PNG_EXTERN void PNGCBAPI png_default_read_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void PNGCBAPI png_push_fill_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t length)); +#endif + +PNG_EXTERN void PNGCBAPI png_default_write_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED +PNG_EXTERN void PNGCBAPI png_default_flush PNGARG((png_structp png_ptr)); +# endif +#endif + +/* Reset the CRC variable */ +PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); + +/* Write the "data" buffer to whatever output you are using */ +PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, + png_const_bytep data, png_size_t length)); + +/* Read and check the PNG file signature */ +PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr)); + +/* Read the chunk header (length + type name) */ +PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); + +/* Read data from whatever input you are using into the "data" buffer */ +PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +/* Read bytes into buf, and update png_ptr->crc */ +PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, + png_size_t length)); + +/* Decompress data in a chunk that uses compression */ +#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ + defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, + int comp_type, png_size_t chunklength, png_size_t prefix_length, + png_size_t *data_length)); +#endif + +/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ +PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); + +/* Read the CRC from the file and compare it to the libpng calculated CRC */ +PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); + +/* Calculate the CRC over a section of data. Note that we are only + * passing a maximum of 64K on systems that have this as a memory limit, + * since this is the maximum buffer size we can specify. + */ +PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, + png_const_bytep ptr, png_size_t length)); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); +#endif + +/* Write various chunks */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. + */ +PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, + png_uint_32 height, + int bit_depth, int color_type, int compression_method, int filter_method, + int interlace_method)); + +PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, + png_const_colorp palette, png_uint_32 num_pal)); + +PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); + +#ifdef PNG_WRITE_gAMA_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); +# endif +# ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, + png_fixed_point file_gamma)); +# endif +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, + png_const_color_8p sbit, int color_type)); +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, + double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y)); +# endif +PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, + int intent)); +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, + png_const_charp name, int compression_type, + png_const_charp profile, int proflen)); + /* Note to maintainer: profile should be png_bytep */ +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, + png_const_sPLT_tp palette)); +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, + png_const_bytep trans, png_const_color_16p values, int number, + int color_type)); +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, + png_const_color_16p values, int color_type)); +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, + png_const_uint_16p hist, int num_hist)); +#endif + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ + defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) +PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, + png_const_charp key, png_charpp new_key)); +#endif + +#ifdef PNG_WRITE_tEXt_SUPPORTED +PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_const_charp key, + png_const_charp text, png_size_t text_len)); +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_const_charp key, + png_const_charp text, png_size_t text_len, int compression)); +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, + int compression, png_const_charp key, png_const_charp lang, + png_const_charp lang_key, png_const_charp text)); +#endif + +#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ +PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, + png_infop info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, + png_int_32 x_offset, png_int_32 y_offset, int unit_type)); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED +PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, + png_int_32 X0, png_int_32 X1, int type, int nparams, + png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type)); +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, + png_const_timep mod_time)); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, + int unit, png_const_charp width, png_const_charp height)); +#endif + +/* Called when finished processing a row of data */ +PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); + +/* Internal use only. Called before first row of data */ +PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); + +/* Combine a row of data, dealing with alpha, etc. if requested */ +PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, + int mask)); + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Expand an interlaced row */ +/* OLD pre-1.0.9 interface: +PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass, png_uint_32 transformations)); + */ +PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); +#endif + +/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Grab pixels out of a row for an interlaced pass */ +PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass)); +#endif + +/* Unfilter a row */ +PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, + png_row_infop row_info, png_bytep row, png_const_bytep prev_row, + int filter)); + +/* Choose the best filter to use and filter the row data */ +PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, + png_row_infop row_info)); + +/* Write out the filtered row. */ +PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, + png_bytep filtered_row)); +/* Finish a row while reading, dealing with interlacing passes, etc. */ +PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); + +/* Initialize the row buffers, etc. */ +PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); +/* Optional call to update the users info structure */ +PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* These are the functions that do the transformations */ +#ifdef PNG_READ_FILLER_SUPPORTED +PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 filler, png_uint_32 flags)); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED +PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED +PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED +PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED +PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 flags)); +#endif + +#ifdef PNG_16BIT_SUPPORTED +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, + png_bytep row)); +#endif +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, + png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_PACK_SUPPORTED +PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED +PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_8p sig_bits)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_16_TO_8_SUPPORTED +PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info, + png_bytep row, png_const_bytep palette_lookup, + png_const_bytep quantize_lookup)); + +# ifdef PNG_CORRECT_PALETTE_SUPPORTED +PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, + png_colorp palette, int num_palette)); +# endif +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED +PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 bit_depth)); +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED +PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_8p bit_depth)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color, + png_const_color_16p background, png_const_color_16p background_1, + png_const_bytep gamma_table, png_const_bytep gamma_from_1, + png_const_bytep gamma_to_1, png_const_uint_16pp gamma_16, + png_const_uint_16pp gamma_16_from_1, png_const_uint_16pp gamma_16_to_1, + int gamma_shift)); +# else +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color, + png_const_color_16p background)); +# endif +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, + png_bytep row, png_const_bytep gamma_table, + png_const_uint_16pp gamma_16_table, int gamma_shift)); +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED +PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, + png_bytep row, png_const_colorp palette, png_const_bytep trans, + int num_trans)); +PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color)); +#endif + +/* The following decodes the appropriate chunks, and does error correction, + * then calls the appropriate callback for the chunk if it is valid. + */ + +/* Decode the IHDR chunk */ +PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); + +#ifdef PNG_READ_bKGD_SUPPORTED +PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED +PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_gAMA_SUPPORTED +PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_hIST_SUPPORTED +PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_iCCP_SUPPORTED +PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#ifdef PNG_READ_iTXt_SUPPORTED +PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED +PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED +PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED +PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED +PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED +PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sPLT_SUPPORTED +PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#ifdef PNG_READ_sRGB_SUPPORTED +PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED +PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tIME_SUPPORTED +PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tRNS_SUPPORTED +PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED +PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); + +PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, + png_const_bytep chunk_name)); + +/* Handle the transformations for reading and writing */ +PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); + +PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, + png_uint_32 length)); +PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); +PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); +# ifdef PNG_READ_tEXt_SUPPORTED +PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +# endif +# ifdef PNG_READ_zTXt_SUPPORTED +PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +# endif +# ifdef PNG_READ_iTXt_SUPPORTED +PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +# endif + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +/* Added at libpng version 1.4.0 */ +#ifdef PNG_CHECK_cHRM_SUPPORTED +PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif + +#ifdef PNG_CHECK_cHRM_SUPPORTED +/* Added at libpng version 1.2.34 and 1.4.0 */ +/* Currently only used by png_check_cHRM_fixed */ +PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, + unsigned long *hi_product, unsigned long *lo_product)); +#endif + +/* Added at libpng version 1.4.0 */ +PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type)); + +/* Free all memory used by the read (old method - NOT DLL EXPORTED) */ +PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, + png_infop info_ptr, png_infop end_info_ptr)); + +/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ +PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr)); + +#ifdef USE_FAR_KEYWORD /* memory model conversion function */ +PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr, + int check)); +#endif /* USE_FAR_KEYWORD */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp png_ptr, + png_const_charp name),PNG_NORETURN); +#endif + +/* ASCII to FP interfaces, currently only implemented if sCAL + * support is required. + */ +#if defined(PNG_READ_sCAL_SUPPORTED) +/* MAX_DIGITS is actually the maximum number of characters in an sCAL + * width or height, derived from the precision (number of significant + * digits - a build time settable option) and assumpitions about the + * maximum ridiculous exponent. + */ +#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/) + +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_ascii_from_fp PNGARG((png_structp png_ptr, png_charp ascii, + png_size_t size, double fp, unsigned int precision)); +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr, + png_charp ascii, png_size_t size, png_fixed_point fp)); +#endif /* FIXED_POINT */ +#endif /* READ_sCAL */ + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* An internal API to validate the format of a floating point number. + * The result is the index of the next character. If the number is + * not valid it will be the index of a character in the supposed number. + * + * The format of a number is defined in the PNG extensions specification + * and this API is strictly conformant to that spec, not anyone elses! + * + * The format as a regular expression is: + * + * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)? + * + * or: + * + * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)? + * + * The complexity is that either integer or fraction must be present and the + * fraction is permitted to have no digits only if the integer is present. + * + * NOTE: The dangling E problem. + * There is a PNG valid floating point number in the following: + * + * PNG floating point numb1.ers are not greedy. + * + * Working this out requires *TWO* character lookahead (because of the + * sign), the parser does not do this - it will fail at the 'r' - this + * doesn't matter for PNG sCAL chunk values, but it requires more care + * if the value were ever to be embedded in something more complex. Use + * ANSI-C strtod if you need the lookahead. + */ +/* State table for the parser. */ +#define PNG_FP_INTEGER 0 /* before or in integer */ +#define PNG_FP_FRACTION 1 /* before or in fraction */ +#define PNG_FP_EXPONENT 2 /* before or in exponent */ +#define PNG_FP_STATE 3 /* mask for the above */ +#define PNG_FP_SAW_SIGN 4 /* Saw +/- in current state */ +#define PNG_FP_SAW_DIGIT 8 /* Saw a digit in current state */ +#define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */ +#define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */ +#define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */ +#define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */ +#define PNG_FP_INVALID 128 /* Available for callers as a distinct value */ + +/* Result codes for the parser (boolean - true meants ok, false means + * not ok yet.) + */ +#define PNG_FP_MAYBE 0 /* The number may be valid in the future */ +#define PNG_FP_OK 1 /* The number is valid */ + +/* The actual parser. This can be called repeatedly, it updates + * the index into the string and the state variable (which must + * be initialzed to 0). It returns a result code, as above. There + * is no point calling the parser any more if it fails to advance to + * the end of the string - it is stuck on an invalid character (or + * terminated by '\0'). + * + * Note that the pointer will consume an E or even an E+ then leave + * a 'maybe' state even though a preceding integer.fraction is valid. + * The PNG_FP_WAS_VALID flag indicates that a preceding substring was + * a valid number. It's possible to recover from this by calling + * the parser again (from the start, with state 0) but with a string + * that omits the last character (i.e. set the size to the index of + * the problem character.) This has not been tested within libpng. + */ +PNG_EXTERN int png_check_fp_number PNGARG((png_const_charp string, + png_size_t size, int *statep, png_size_tp whereami)); + +/* This is the same but it checks a complete string and returns true + * only if it just contains a floating point number. + */ +PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string, + png_size_t size)); +#endif /* pCAL || sCAL */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) ||\ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) +/* Added at libpng version 1.5.0 */ +/* This is a utility to provide a*times/div (rounded) and indicate + * if there is an overflow. The result is a boolean - false (0) + * for overflow, true (1) if no overflow, in which case *res + * holds the result. + */ +PNG_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a, + png_int_32 times, png_int_32 div)); +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) +/* Same deal, but issue a warning on overflow and return 0. */ +PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr, + png_fixed_point a, png_int_32 times, png_int_32 div)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Calculate a reciprocal - used for gamma values. This returns + * 0 if the argument is 0 in order to maintain an undefined value, + * there are no warnings. + */ +PNG_EXTERN png_fixed_point png_reciprocal PNGARG((png_fixed_point a)); + +/* The same but gives a reciprocal of the product of two fixed point + * values. Accuracy is suitable for gamma calculations but this is + * not exact - use png_muldiv for that. + */ +PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a, + png_fixed_point b)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Internal fixed point gamma correction. These APIs are called as + * required to convert single values - they don't need to be fast, + * they are not used when processing image pixel values. + * + * While the input is an 'unsigned' value it must actually be the + * correct bit value - 0..255 or 0..65535 as required. + */ +PNG_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr, + unsigned int value, png_fixed_point gamma)); +PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma)); +PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value, + png_fixed_point gamma)); +PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value, + png_fixed_point gamma)); +PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, + int bit_depth)); +#endif + +/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ + + +#include "pngdebug.h" + +#ifdef __cplusplus +} +#endif + +#endif /* PNGPRIV_H */ diff --git a/contrib/media/updf/include/pngstruct.h b/contrib/media/updf/include/pngstruct.h new file mode 100644 index 0000000000..8d781faefe --- /dev/null +++ b/contrib/media/updf/include/pngstruct.h @@ -0,0 +1,308 @@ + +/* pngstruct.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application. + */ + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#include "zlib.h" + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf png_jmpbuf; /* used in png_error */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ + png_error_ptr warning_fn; /* function for printing warnings */ + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + z_stream zstream; /* pointer to decompression structure (below) */ + png_bytep zbuf; /* buffer for zlib */ + uInt zbuf_size; /* size of zbuf (typically 65536) */ + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf; /* buffer to save current (unfiltered) row */ + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_row_info row_info; /* used for transformation routines */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + png_uint_16 num_trans; /* number of transparency values */ + png_byte chunk_name[5]; /* null-terminated name of current chunk */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ + png_byte usr_channels; /* channels at start of write */ + png_byte sig_bytes; /* magic bytes read/written from start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point gamma; /* file gamma value */ + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size; /* current size of text input data */ + png_size_t current_text_left; /* how much text left to read in input */ + png_charp current_text; /* current text chunk buffer */ + png_charp current_text_ptr; /* current location in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist; /* histogram */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int num_chunk_list; + png_bytep chunk_list; +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + png_uint_16 rgb_to_gray_blue_coeff; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk; +#endif + +/* New members added in libpng-1.2.26 */ + png_size_t old_big_row_buf_size; + png_size_t old_prev_row_size; + +/* New member added in libpng-1.2.30 */ + png_charp chunkdata; /* buffer for reading chunk data */ + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif +}; +#endif /* PNGSTRUCT_H */ diff --git a/contrib/media/updf/include/process.h b/contrib/media/updf/include/process.h new file mode 100644 index 0000000000..9246ad2537 --- /dev/null +++ b/contrib/media/updf/include/process.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_process_h_ +#define __dj_include_process_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +int _dos_exec(const char *program, const char *args, char *const _envp[]); + +int execl(const char *_path, const char *_argv0, ...); +int execle(const char *_path, const char *_argv0, ... /*, char *const _envp[] */); +int execlp(const char *_path, const char *_argv0, ...); +int execlpe(const char *_path, const char *_argv0, ... /*, char *const _envp[] */); + +int execv(const char *_path, char *const _argv[]); +int execve(const char *_path, char *const _argv[], char *const _envp[]); +int execvp(const char *_path, char *const _argv[]); +int execvpe(const char *_path, char *const _argv[], char *const _envp[]); + +int spawnl(int _mode, const char *_path, const char *_argv0, ...); +int spawnle(int _mode, const char *_path, const char *_argv0, ... /*, char *const _envp[] */); +int spawnlp(int _mode, const char *_path, const char *_argv0, ...); +int spawnlpe(int _mode, const char *_path, const char *_argv0, ... /*, char *const _envp[] */); + +int spawnv(int _mode, const char *_path, char *const _argv[]); +int spawnve(int _mode, const char *_path, char *const _argv[], char *const _envp[]); +int spawnvp(int _mode, const char *_path, char *const _argv[]); +int spawnvpe(int _mode, const char *_path, char *const _argv[], char *const _envp[]); + +#define P_WAIT 1 +#define P_NOWAIT 2 /* always generates error */ +#define P_OVERLAY 3 + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_process_h_ */ diff --git a/contrib/media/updf/include/prototypes.h b/contrib/media/updf/include/prototypes.h new file mode 100644 index 0000000000..df815a22b5 --- /dev/null +++ b/contrib/media/updf/include/prototypes.h @@ -0,0 +1,27 @@ + +/// =========================================================== + +int file_check(char file[]); +int dir_check(char dir[]); +void dir_truncate(char dir[]); +int iswhite(char c); +void trim(char string[]); +void execute(); +void __cdecl kol_main(); + +int executable_run(char cmd[], char args[]); + +void command_execute(); +void command_get(); +int command_get_cmd(char cmd[]); + +int script_check(char file[]); +int script_run(char exec[], char args[]); + +int aliases_check(char alias[]); +int alias_search(char alias[]); +int alias_add(char alias[]); +int alias_split (char alias[], char s1[], char s2[]); +void alias_list(); + +/// =========================================================== diff --git a/contrib/media/updf/include/pwd.h b/contrib/media/updf/include/pwd.h new file mode 100644 index 0000000000..4d50c2e0bf --- /dev/null +++ b/contrib/media/updf/include/pwd.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_pwd_h_ +#define __dj_include_pwd_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> + +__DJ_gid_t +#undef __DJ_gid_t +#define __DJ_gid_t +__DJ_uid_t +#undef __DJ_uid_t +#define __DJ_uid_t + +struct passwd { + char * pw_name; + uid_t pw_uid; + gid_t pw_gid; + char * pw_dir; + char * pw_shell; +}; + +struct passwd * getpwuid(uid_t _uid); +struct passwd * getpwnam(const char *_name); + +#ifndef _POSIX_SOURCE + +struct passwd *getpwent(void); +void setpwent(void); +void endpwent(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_pwd_h_ */ diff --git a/contrib/media/updf/include/queue b/contrib/media/updf/include/queue new file mode 100644 index 0000000000..c4464bf9b8 --- /dev/null +++ b/contrib/media/updf/include/queue @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_QUEUE +#include <bits/std_queue.h> +#endif diff --git a/contrib/media/updf/include/random.h b/contrib/media/updf/include/random.h new file mode 100644 index 0000000000..2533add944 --- /dev/null +++ b/contrib/media/updf/include/random.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_random_h_ +#define __dj_include_random_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdlib.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_random_h_ */ diff --git a/contrib/media/updf/include/raw.h b/contrib/media/updf/include/raw.h new file mode 100644 index 0000000000..3c4b372f3f --- /dev/null +++ b/contrib/media/updf/include/raw.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __RAW_H +#define __RAW_H +/** +@file raw.h +@brief Implementation of operations for raw encoding (RAW) + +The functions in RAW.C have for goal to realize the operation of raw encoding linked +with the corresponding mode switch. +*/ + +/** @defgroup RAW RAW - Implementation of operations for raw encoding */ +/*@{*/ + +/** +RAW encoding operations +*/ +typedef struct opj_raw { + /** temporary buffer where bits are coded or decoded */ + unsigned char c; + /** number of bits already read or free to write */ + unsigned int ct; + /** maximum length to decode */ + unsigned int lenmax; + /** length decoded */ + unsigned int len; + /** pointer to the current position in the buffer */ + unsigned char *bp; + /** pointer to the start of the buffer */ + unsigned char *start; + /** pointer to the end of the buffer */ + unsigned char *end; +} opj_raw_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new RAW handle +@return Returns a new RAW handle if successful, returns NULL otherwise +*/ +opj_raw_t* raw_create(void); +/** +Destroy a previously created RAW handle +@param raw RAW handle to destroy +*/ +void raw_destroy(opj_raw_t *raw); +/** +Return the number of bytes written/read since initialisation +@param raw RAW handle to destroy +@return Returns the number of bytes already encoded +*/ +int raw_numbytes(opj_raw_t *raw); +/** +Initialize the decoder +@param raw RAW handle +@param bp Pointer to the start of the buffer from which the bytes will be read +@param len Length of the input buffer +*/ +void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len); +/** +Decode a symbol using raw-decoder. Cfr p.506 TAUBMAN +@param raw RAW handle +@return Returns the decoded symbol (0 or 1) +*/ +int raw_decode(opj_raw_t *raw); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __RAW_H */ diff --git a/contrib/media/updf/include/refcount.h b/contrib/media/updf/include/refcount.h new file mode 100644 index 0000000000..a0d12a6f65 --- /dev/null +++ b/contrib/media/updf/include/refcount.h @@ -0,0 +1,74 @@ +#ifndef __refcount_h__ +#define __refcount_h__ + +#include "lispassert.h" +#include "yacasbase.h" + +//------------------------------------------------------------------------------ +// RefPtr - Smart pointer for (intrusive) reference counting. +// Simply, an object's reference count is the number of RefPtrs refering to it. +// The RefPtr will delete the referenced object when the count reaches zero. + +/*TODO: this might be improved a little by having RefPtr wrap the object being + pointed to so the user of RefPtr does not need to add ReferenceCount explicitly. + One can use RefPtr on any arbitrary object from that moment on. + */ + +typedef ReferenceType ReferenceCount; + +template<class T> +class RefPtr : public YacasBase // derived, so we can 'NEW LispPtr[nnn]' +{ +public: + // Default constructor (not explicit, so it auto-initializes) + inline RefPtr() : iPtr(NULL) {} + // Construct from pointer to T + explicit RefPtr(T *ptr) : iPtr(ptr) { if (ptr) { ptr->iReferenceCount++; } } + // Copy constructor + RefPtr(const RefPtr &refPtr) : iPtr(refPtr.ptr()) { if (iPtr) { iPtr->iReferenceCount++; } } + // Destructor + ~RefPtr() + { + if (iPtr) + { + iPtr->iReferenceCount--; + if (iPtr->iReferenceCount == 0) + { + delete iPtr; + } + } + } + // Assignment from pointer + RefPtr &operator=(T *ptr) + { + if (ptr) + { + ptr->iReferenceCount++; + } + if (iPtr) + { + iPtr->iReferenceCount--; + if (iPtr->iReferenceCount == 0) + { + delete iPtr; + } + } + iPtr = ptr; + return *this; + } + // Assignment from another + RefPtr &operator=(const RefPtr &refPtr) { return this->operator=(refPtr.ptr()); } + + operator T*() const { return iPtr; } // implicit conversion to pointer to T + T &operator*() const { return *iPtr; } // so (*refPtr) is a reference to T + T *operator->() const { return iPtr; } // so (refPtr->member) accesses T's member + T *ptr() const { return iPtr; } // so (refPtr.ptr()) returns the pointer to T (boost calls this method 'get') + bool operator!() const { return !iPtr; } // is null pointer + +private: + T *iPtr; +}; + + +#endif + diff --git a/contrib/media/updf/include/regex.h b/contrib/media/updf/include/regex.h new file mode 100644 index 0000000000..457a79d0fd --- /dev/null +++ b/contrib/media/updf/include/regex.h @@ -0,0 +1,91 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_regex_h_ +#define __dj_include_regex_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#define _POSIX2_RE_DUP_MAX 256 + + +typedef off_t regoff_t; +typedef struct { + int re_magic; + size_t re_nsub; /* number of parenthesized subexpressions */ + const char *re_endp; /* end pointer for REG_PEND */ + struct re_guts *re_g; /* none of your business :-) */ +} regex_t; +typedef struct { + regoff_t rm_so; /* start of match */ + regoff_t rm_eo; /* end of match */ +} regmatch_t; + + + +extern int regcomp(regex_t *, const char *, int); +#define REG_BASIC 0000 +#define REG_EXTENDED 0001 +#define REG_ICASE 0002 +#define REG_NOSUB 0004 +#define REG_NEWLINE 0010 +#define REG_NOSPEC 0020 +#define REG_PEND 0040 +#define REG_DUMP 0200 + + + +#define REG_OKAY 0 +#define REG_NOMATCH 1 +#define REG_BADPAT 2 +#define REG_ECOLLATE 3 +#define REG_ECTYPE 4 +#define REG_EESCAPE 5 +#define REG_ESUBREG 6 +#define REG_EBRACK 7 +#define REG_EPAREN 8 +#define REG_EBRACE 9 +#define REG_BADBR 10 +#define REG_ERANGE 11 +#define REG_ESPACE 12 +#define REG_BADRPT 13 +#define REG_EMPTY 14 +#define REG_ASSERT 15 +#define REG_INVARG 16 +#define REG_ATOI 255 /* convert name to number (!) */ +#define REG_ITOA 0400 /* convert number to name (!) */ +extern size_t regerror(int, const regex_t *, char *, size_t); + + + +extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int); +#define REG_NOTBOL 00001 +#define REG_NOTEOL 00002 +#define REG_STARTEND 00004 +#define REG_TRACE 00400 /* tracing of execution */ +#define REG_LARGE 01000 /* force large representation */ +#define REG_BACKR 02000 /* force use of backref code */ + + + +extern void regfree(regex_t *); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_regex_h_ */ diff --git a/contrib/media/updf/include/ring.h b/contrib/media/updf/include/ring.h new file mode 100644 index 0000000000..c014d9bc52 --- /dev/null +++ b/contrib/media/updf/include/ring.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)ring.h 8.1 (Berkeley) 6/6/93 + */ + +#if defined(P) +# undef P +#endif + +#if defined(__STDC__) || defined(LINT_ARGS) +# define P(x) x +#else +# define P(x) () +#endif + +/* + * This defines a structure for a ring buffer. + * + * The circular buffer has two parts: + *((( + * full: [consume, supply) + * empty: [supply, consume) + *]]] + * + */ +typedef struct { + unsigned char *consume, /* where data comes out of */ + *supply, /* where data comes in to */ + *bottom, /* lowest address in buffer */ + *top, /* highest address+1 in buffer */ + *mark; /* marker (user defined) */ +#ifdef ENCRYPTION + unsigned char *clearto; /* Data to this point is clear text */ + unsigned char *encryyptedto; /* Data is encrypted to here */ +#endif /* ENCRYPTION */ + int size; /* size in bytes of buffer */ + u_long consumetime, /* help us keep straight full, empty, etc. */ + supplytime; +} Ring; + +/* Here are some functions and macros to deal with the ring buffer */ + +/* Initialization routine */ +extern int + ring_init P((Ring *ring, unsigned char *buffer, int count)); + +/* Data movement routines */ +extern void + ring_supply_data P((Ring *ring, unsigned char *buffer, int count)); +#ifdef notdef +extern void + ring_consume_data P((Ring *ring, unsigned char *buffer, int count)); +#endif + +/* Buffer state transition routines */ +extern void + ring_supplied P((Ring *ring, int count)), + ring_consumed P((Ring *ring, int count)); + +/* Buffer state query routines */ +extern int + ring_empty_count P((Ring *ring)), + ring_empty_consecutive P((Ring *ring)), + ring_full_count P((Ring *ring)), + ring_full_consecutive P((Ring *ring)); + +#ifdef ENCRYPTION +extern void + ring_encrypt P((Ring *ring, void (*func)())), + ring_clearto P((Ring *ring)); +#endif /* ENCRYPTION */ + +extern void ring_clear_mark P ((Ring *)); +extern void ring_mark P ((Ring *)); diff --git a/contrib/media/updf/include/rpc/auth.h b/contrib/media/updf/include/rpc/auth.h new file mode 100644 index 0000000000..6e0ae06759 --- /dev/null +++ b/contrib/media/updf/include/rpc/auth.h @@ -0,0 +1,214 @@ +/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * auth.h, Authentication interface. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + * + * The data structures are completely opaque to the client. The client + * is required to pass a AUTH * to routines that create rpc + * "sessions". + */ + +#ifndef _RPC_AUTH_H + +#define _RPC_AUTH_H 1 +#include <sys/cdefs.h> +#include <sys/socket.h> +#include <rpc/xdr.h> + +__BEGIN_DECLS + +#define MAX_AUTH_BYTES 400 +#define MAXNETNAMELEN 255 /* maximum length of network user's name */ + +/* + * Status returned from authentication check + */ +enum auth_stat { + AUTH_OK=0, + /* + * failed at remote end + */ + AUTH_BADCRED=1, /* bogus credentials (seal broken) */ + AUTH_REJECTEDCRED=2, /* client should begin new session */ + AUTH_BADVERF=3, /* bogus verifier (seal broken) */ + AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ + AUTH_TOOWEAK=5, /* rejected due to security reasons */ + /* + * failed locally + */ + AUTH_INVALIDRESP=6, /* bogus response verifier */ + AUTH_FAILED=7 /* some unknown reason */ +}; + +union des_block { + struct { + uint32_t high; + uint32_t low; + } key; + char c[8]; +}; +typedef union des_block des_block; +extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; + +/* + * Authentication info. Opaque to client. + */ +struct opaque_auth { + enum_t oa_flavor; /* flavor of auth */ + char* oa_base; /* address of more auth stuff */ + unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */ +}; + +/* + * Auth handle, interface to client side authenticators. + */ +typedef struct AUTH AUTH; +struct AUTH { + struct opaque_auth ah_cred; + struct opaque_auth ah_verf; + union des_block ah_key; + struct auth_ops { + void (*ah_nextverf) (AUTH *); + int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ + int (*ah_validate) (AUTH *, struct opaque_auth *); + /* validate verifier */ + int (*ah_refresh) (AUTH *); /* refresh credentials */ + void (*ah_destroy) (AUTH *); /* destroy this structure */ + } *ah_ops; + char* ah_private; +}; + + +/* + * Authentication ops. + * The ops and the auth handle provide the interface to the authenticators. + * + * AUTH *auth; + * XDR *xdrs; + * struct opaque_auth verf; + */ +#define AUTH_NEXTVERF(auth) \ + ((*((auth)->ah_ops->ah_nextverf))(auth)) +#define auth_nextverf(auth) \ + ((*((auth)->ah_ops->ah_nextverf))(auth)) + +#define AUTH_MARSHALL(auth, xdrs) \ + ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) +#define auth_marshall(auth, xdrs) \ + ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) + +#define AUTH_VALIDATE(auth, verfp) \ + ((*((auth)->ah_ops->ah_validate))((auth), verfp)) +#define auth_validate(auth, verfp) \ + ((*((auth)->ah_ops->ah_validate))((auth), verfp)) + +#define AUTH_REFRESH(auth) \ + ((*((auth)->ah_ops->ah_refresh))(auth)) +#define auth_refresh(auth) \ + ((*((auth)->ah_ops->ah_refresh))(auth)) + +#define AUTH_DESTROY(auth) \ + ((*((auth)->ah_ops->ah_destroy))(auth)) +#define auth_destroy(auth) \ + ((*((auth)->ah_ops->ah_destroy))(auth)) + + +extern struct opaque_auth _null_auth; + + +/* + * These are the various implementations of client side authenticators. + */ + +/* + * Unix style authentication + * AUTH *authunix_create(machname, uid, gid, len, aup_gids) + * char *machname; + * int uid; + * int gid; + * int len; + * int *aup_gids; + */ +extern AUTH *authunix_create (char *__machname,uid_t __uid, gid_t __gid, + int __len, gid_t *__aup_gids) __THROW; +extern AUTH *authunix_create_default (void) __THROW; +extern AUTH *authnone_create (void) __THROW; +extern AUTH *authdes_create (const char *__servername, unsigned int __window, + struct sockaddr *__syncaddr, des_block *__ckey) + __THROW; +extern AUTH *authdes_pk_create (const char *, netobj *, unsigned int, + struct sockaddr *, des_block *) __THROW; + + +#define AUTH_NONE 0 /* no authentication */ +#define AUTH_NULL 0 /* backward compatibility */ +#define AUTH_SYS 1 /* unix style (uid, gids) */ +#define AUTH_UNIX AUTH_SYS +#define AUTH_SHORT 2 /* short hand unix style */ +#define AUTH_DES 3 /* des style (encrypted timestamps) */ +#define AUTH_DH AUTH_DES /* Diffie-Hellman (this is DES) */ +#define AUTH_KERB 4 /* kerberos style */ + +/* + * Netname manipulating functions + * + */ +extern int getnetname (char *) __THROW; +extern int host2netname (char *, const char *, const char *) __THROW; +extern int user2netname (char *, const uid_t, const char *) __THROW; +extern int netname2user (const char *, uid_t *, gid_t *, int *, gid_t *) + __THROW; +extern int netname2host (const char *, char *, const int) __THROW; + +/* + * + * These routines interface to the keyserv daemon + * + */ +extern int key_decryptsession (char *, des_block *) __THROW; +extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_encryptsession (char *, des_block *) __THROW; +extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_gendes (des_block *) __THROW; +extern int key_setsecret (char *) __THROW; +extern int key_secretkey_is_set (void) __THROW; +extern int key_get_conv (char *, des_block *) __THROW; + +/* + * XDR an opaque authentication struct. + */ +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; + +__END_DECLS + +#endif /* rpc/auth.h */ diff --git a/contrib/media/updf/include/rpc/auth_des.h b/contrib/media/updf/include/rpc/auth_des.h new file mode 100644 index 0000000000..8accd37799 --- /dev/null +++ b/contrib/media/updf/include/rpc/auth_des.h @@ -0,0 +1,112 @@ +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _RPC_AUTH_DES_H +#define _RPC_AUTH_DES_H 1 + +#include <sys/cdefs.h> +#include <rpc/auth.h> + +__BEGIN_DECLS + +/* There are two kinds of "names": fullnames and nicknames */ +enum authdes_namekind + { + ADN_FULLNAME, + ADN_NICKNAME + }; + +/* A fullname contains the network name of the client, + a conversation key and the window */ +struct authdes_fullname + { + char *name; /* network name of client, up to MAXNETNAMELEN */ + des_block key; /* conversation key */ + uint32_t window; /* associated window */ + }; + +/* A credential */ +struct authdes_cred + { + enum authdes_namekind adc_namekind; + struct authdes_fullname adc_fullname; + uint32_t adc_nickname; + }; + +/* A timeval replacement for !32bit platforms */ +struct rpc_timeval + { + uint32_t tv_sec; /* Seconds. */ + uint32_t tv_usec; /* Microseconds. */ + }; + +/* A des authentication verifier */ +struct authdes_verf + { + union + { + struct rpc_timeval adv_ctime; /* clear time */ + des_block adv_xtime; /* crypt time */ + } + adv_time_u; + uint32_t adv_int_u; + }; + +/* des authentication verifier: client variety + + adv_timestamp is the current time. + adv_winverf is the credential window + 1. + Both are encrypted using the conversation key. */ +#define adv_timestamp adv_time_u.adv_ctime +#define adv_xtimestamp adv_time_u.adv_xtime +#define adv_winverf adv_int_u + +/* des authentication verifier: server variety + + adv_timeverf is the client's timestamp + client's window + adv_nickname is the server's nickname for the client. + adv_timeverf is encrypted using the conversation key. */ +#define adv_timeverf adv_time_u.adv_ctime +#define adv_xtimeverf adv_time_u.adv_xtime +#define adv_nickname adv_int_u + +/* Map a des credential into a unix cred. */ +extern int authdes_getucred (const struct authdes_cred * __adc, + uid_t * __uid, gid_t * __gid, + short *__grouplen, gid_t * __groups) __THROW; + +/* Get the public key for NAME and place it in KEY. NAME can only be + up to MAXNETNAMELEN bytes long and the destination buffer KEY should + have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ +extern int getpublickey (const char *__name, char *__key) __THROW; + +/* Get the secret key for NAME and place it in KEY. PASSWD is used to + decrypt the encrypted key stored in the database. NAME can only be + up to MAXNETNAMELEN bytes long and the destination buffer KEY + should have HEXKEYBYTES + 1 bytes long to fit all characters from + the key. */ +extern int getsecretkey (const char *__name, char *__key, + const char *__passwd) __THROW; + +extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, + struct rpc_timeval *__timeout) __THROW; + +__END_DECLS + + +#endif /* rpc/auth_des.h */ diff --git a/contrib/media/updf/include/rpc/auth_unix.h b/contrib/media/updf/include/rpc/auth_unix.h new file mode 100644 index 0000000000..9dd8142f17 --- /dev/null +++ b/contrib/media/updf/include/rpc/auth_unix.h @@ -0,0 +1,90 @@ +/* @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* @(#)auth_unix.h 1.5 86/07/16 SMI */ + +/* + * auth_unix.h, Protocol for UNIX style authentication parameters for RPC + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +/* + * The system is very weak. The client uses no encryption for it + * credentials and only sends null verifiers. The server sends backs + * null verifiers or optionally a verifier that suggests a new short hand + * for the credentials. + */ + +#ifndef _RPC_AUTH_UNIX_H +#define _RPC_AUTH_UNIX_H 1 + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/auth.h> +#include <rpc/xdr.h> + +__BEGIN_DECLS + +/* The machine name is part of a credential; it may not exceed 255 bytes */ +#define MAX_MACHINE_NAME 255 + +/* gids compose part of a credential; there may not be more than 16 of them */ +#define NGRPS 16 + +/* + * Unix style credentials. + */ +struct authunix_parms + { + unsigned long aup_time; + char *aup_machname; + uid_t aup_uid; + gid_t aup_gid; + unsigned int aup_len; + gid_t *aup_gids; + }; + +extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) + __THROW; + +/* + * If a response verifier has flavor AUTH_SHORT, + * then the body of the response verifier encapsulates the following structure; + * again it is serialized in the obvious fashion. + */ +struct short_hand_verf + { + struct opaque_auth new_cred; + }; + +__END_DECLS + +#endif /* rpc/auth_unix.h */ diff --git a/contrib/media/updf/include/rpc/clnt.h b/contrib/media/updf/include/rpc/clnt.h new file mode 100644 index 0000000000..9b100556c8 --- /dev/null +++ b/contrib/media/updf/include/rpc/clnt.h @@ -0,0 +1,421 @@ +/* @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * clnt.h - Client side remote procedure call interface. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_CLNT_H +#define _RPC_CLNT_H 1 + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/auth.h> +#include <sys/un.h> + +__BEGIN_DECLS + +/* + * Rpc calls return an enum clnt_stat. This should be looked at more, + * since each implementation is required to live with this (implementation + * independent) list of errors. + */ +enum clnt_stat { + RPC_SUCCESS=0, /* call succeeded */ + /* + * local errors + */ + RPC_CANTENCODEARGS=1, /* can't encode arguments */ + RPC_CANTDECODERES=2, /* can't decode results */ + RPC_CANTSEND=3, /* failure in sending call */ + RPC_CANTRECV=4, /* failure in receiving result */ + RPC_TIMEDOUT=5, /* call timed out */ + /* + * remote errors + */ + RPC_VERSMISMATCH=6, /* rpc versions not compatible */ + RPC_AUTHERROR=7, /* authentication error */ + RPC_PROGUNAVAIL=8, /* program not available */ + RPC_PROGVERSMISMATCH=9, /* program version mismatched */ + RPC_PROCUNAVAIL=10, /* procedure unavailable */ + RPC_CANTDECODEARGS=11, /* decode arguments error */ + RPC_SYSTEMERROR=12, /* generic "other problem" */ + RPC_NOBROADCAST = 21, /* Broadcasting not supported */ + /* + * callrpc & clnt_create errors + */ + RPC_UNKNOWNHOST=13, /* unknown host name */ + RPC_UNKNOWNPROTO=17, /* unknown protocol */ + RPC_UNKNOWNADDR = 19, /* Remote address unknown */ + + /* + * rpcbind errors + */ + RPC_RPCBFAILURE=14, /* portmapper failed in its call */ +#define RPC_PMAPFAILURE RPC_RPCBFAILURE + RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ + RPC_N2AXLATEFAILURE = 22, /* Name to addr translation failed */ + /* + * unspecified error + */ + RPC_FAILED=16, + RPC_INTR=18, + RPC_TLIERROR=20, + RPC_UDERROR=23, + /* + * asynchronous errors + */ + RPC_INPROGRESS = 24, + RPC_STALERACHANDLE = 25 +}; + + +/* + * Error info. + */ +struct rpc_err { + enum clnt_stat re_status; + union { + int RE_errno; /* related system error */ + enum auth_stat RE_why; /* why the auth error occurred */ + struct { + unsigned long low; /* lowest verion supported */ + unsigned long high; /* highest verion supported */ + } RE_vers; + struct { /* maybe meaningful if RPC_FAILED */ + long s1; + long s2; + } RE_lb; /* life boot & debugging only */ + } ru; +#define re_errno ru.RE_errno +#define re_why ru.RE_why +#define re_vers ru.RE_vers +#define re_lb ru.RE_lb +}; + + +/* + * Client rpc handle. + * Created by individual implementations, see e.g. rpc_udp.c. + * Client is responsible for initializing auth, see e.g. auth_none.c. + */ +typedef struct CLIENT CLIENT; +struct CLIENT { + AUTH *cl_auth; /* authenticator */ + struct clnt_ops { + enum clnt_stat (*cl_call) (CLIENT *, unsigned long, xdrproc_t, char*, xdrproc_t, + char*, struct timeval); + /* call remote procedure */ + void (*cl_abort) (void); /* abort a call */ + void (*cl_geterr) (CLIENT *, struct rpc_err *); + /* get specific error code */ + bool_t (*cl_freeres) (CLIENT *, xdrproc_t, char*); + /* frees results */ + void (*cl_destroy) (CLIENT *); /* destroy this structure */ + bool_t (*cl_control) (CLIENT *, int, char *); + /* the ioctl() of rpc */ + } *cl_ops; + char* cl_private; /* private stuff */ +}; + + +/* + * client side rpc interface ops + * + * Parameter types are: + * + */ + +/* + * enum clnt_stat + * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) + * CLIENT *rh; + * unsigned long proc; + * xdrproc_t xargs; + * char* argsp; + * xdrproc_t xres; + * char* resp; + * struct timeval timeout; + */ +#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ + ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) +#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ + ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) + +/* + * void + * CLNT_ABORT(rh); + * CLIENT *rh; + */ +#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) +#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) + +/* + * struct rpc_err + * CLNT_GETERR(rh); + * CLIENT *rh; + */ +#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) +#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) + + +/* + * bool_t + * CLNT_FREERES(rh, xres, resp); + * CLIENT *rh; + * xdrproc_t xres; + * char* resp; + */ +#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) +#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) + +/* + * bool_t + * CLNT_CONTROL(cl, request, info) + * CLIENT *cl; + * unsigned int request; + * char *info; + */ +#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) +#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) + +/* + * control operations that apply to all transports + * + * Note: options marked XXX are no-ops in this implementation of RPC. + * The are present in TI-RPC but can't be implemented here since they + * depend on the presence of STREAMS/TLI, which we don't have. + */ +#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ +#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ +#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ +#define CLGET_FD 6 /* get connections file descriptor */ +#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) XXX */ +#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */ +#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy*/ +#define CLGET_XID 10 /* Get xid */ +#define CLSET_XID 11 /* Set xid */ +#define CLGET_VERS 12 /* Get version number */ +#define CLSET_VERS 13 /* Set version number */ +#define CLGET_PROG 14 /* Get program number */ +#define CLSET_PROG 15 /* Set program number */ +#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) XXX */ +#define CLSET_PUSH_TIMOD 17 /* push timod if not already present XXX */ +#define CLSET_POP_TIMOD 18 /* pop timod XXX */ +/* + * Connectionless only control operations + */ +#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ +#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ + +/* + * void + * CLNT_DESTROY(rh); + * CLIENT *rh; + */ +#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) +#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) + + +/* + * RPCTEST is a test program which is accessible on every rpc + * transport/port. It is used for testing, performance evaluation, + * and network administration. + */ + +#define RPCTEST_PROGRAM ((unsigned long)1) +#define RPCTEST_VERSION ((unsigned long)1) +#define RPCTEST_NULL_PROC ((unsigned long)2) +#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3) + +/* + * By convention, procedure 0 takes null arguments and returns them + */ + +#define NULLPROC ((unsigned long)0) + +/* + * Below are the client handle creation routines for the various + * implementations of client side rpc. They can return NULL if a + * creation failure occurs. + */ + +/* + * Memory based rpc (for speed check and testing) + * CLIENT * + * clntraw_create(prog, vers) + * unsigned long prog; + * unsigned long vers; + */ +extern CLIENT *clntraw_create (const unsigned long __prog, const unsigned long __vers) + __THROW; + + +/* + * Generic client creation routine. Supported protocols are "udp", "tcp" and + * "unix" + * CLIENT * + * clnt_create(host, prog, vers, prot) + * char *host; -- hostname + * unsigned long prog; -- program number + * u_ong vers; -- version number + * char *prot; -- protocol + */ +extern CLIENT *clnt_create (const char *__host, const unsigned long __prog, + const unsigned long __vers, const char *__prot) + __THROW; + + +/* + * TCP based rpc + * CLIENT * + * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) + * struct sockaddr_in *raddr; + * unsigned long prog; + * unsigned long version; + * register int *sockp; + * unsigned int sendsz; + * unsigned int recvsz; + */ +extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, unsigned long __prog, + unsigned long __version, int *__sockp, unsigned int __sendsz, + unsigned int __recvsz) __THROW; + +/* + * UDP based rpc. + * CLIENT * + * clntudp_create(raddr, program, version, wait, sockp) + * struct sockaddr_in *raddr; + * unsigned long program; + * unsigned long version; + * struct timeval wait_resend; + * int *sockp; + * + * Same as above, but you specify max packet sizes. + * CLIENT * + * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) + * struct sockaddr_in *raddr; + * unsigned long program; + * unsigned long version; + * struct timeval wait_resend; + * int *sockp; + * unsigned int sendsz; + * unsigned int recvsz; + */ +extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, unsigned long __program, + unsigned long __version, struct timeval __wait_resend, + int *__sockp) __THROW; +extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, + unsigned long __program, unsigned long __version, + struct timeval __wait_resend, int *__sockp, + unsigned int __sendsz, unsigned int __recvsz) __THROW; + + + + +/* + * AF_UNIX based rpc + * CLIENT * + * clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) + * struct sockaddr_un *raddr; + * unsigned long prog; + * unsigned long version; + * register int *sockp; + * unsigned int sendsz; + * unsigned int recvsz; + */ +extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, unsigned long __program, + unsigned long __version, int *__sockp, + unsigned int __sendsz, unsigned int __recvsz) __THROW; + + +extern int callrpc (const char *__host, const unsigned long __prognum, + const unsigned long __versnum, const unsigned long __procnum, + const xdrproc_t __inproc, const char *__in, + const xdrproc_t __outproc, char *__out) __THROW; +extern int _rpc_dtablesize (void) __THROW; + +/* + * Print why creation failed + */ +extern void clnt_pcreateerror (const char *__msg) __THROW; /* stderr */ +extern char *clnt_spcreateerror(const char *__msg) __THROW; /* string */ + +/* + * Like clnt_perror(), but is more verbose in its output + */ +extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ + +/* + * Print an English error message, given the client error code + */ +extern void clnt_perror (CLIENT *__clnt, const char *__msg) __THROW; + /* stderr */ +extern char *clnt_sperror (CLIENT *__clnt, const char *__msg) __THROW; + /* string */ + +/* + * If a creation fails, the following allows the user to figure out why. + */ +struct rpc_createerr { + enum clnt_stat cf_stat; + struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ +}; + +extern struct rpc_createerr rpc_createerr; + + + +/* + * Copy error message to buffer. + */ +extern char *clnt_sperrno (enum clnt_stat __num) __THROW; /* string */ + +/* + * get the port number on the host for the rpc program,version and proto + */ +extern int getrpcport (const char * __host, unsigned long __prognum, + unsigned long __versnum, unsigned int proto) __THROW; + +/* + * get the local host's IP address without consulting + * name service library functions + */ +extern void get_myaddress (struct sockaddr_in *) __THROW; + +#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ +#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ + +__END_DECLS + +#endif /* rpc/clnt.h */ diff --git a/contrib/media/updf/include/rpc/des_crypt.h b/contrib/media/updf/include/rpc/des_crypt.h new file mode 100644 index 0000000000..6a65887d3b --- /dev/null +++ b/contrib/media/updf/include/rpc/des_crypt.h @@ -0,0 +1,97 @@ +/* + * @(#)des_crypt.h 2.1 88/08/11 4.0 RPCSRC; from 1.4 88/02/08 (C) 1986 SMI + * + * des_crypt.h, des library routine interface + * Copyright (C) 1986, Sun Microsystems, Inc. + */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +#ifndef __DES_CRYPT_H__ +#define __DES_CRYPT_H__ 1 + +#include <features.h> + +__BEGIN_DECLS + +#define DES_MAXDATA 8192 /* max bytes encrypted in one call */ +#define DES_DIRMASK (1 << 0) +#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ +#define DES_DECRYPT (1*DES_DIRMASK) /* Decrypt */ + + +#define DES_DEVMASK (1 << 1) +#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ +#define DES_SW (1*DES_DEVMASK) /* Use software device */ + + +#define DESERR_NONE 0 /* succeeded */ +#define DESERR_NOHWDEVICE 1 /* succeeded, but hw device not available */ +#define DESERR_HWERROR 2 /* failed, hardware/driver error */ +#define DESERR_BADPARAM 3 /* failed, bad parameter to call */ + +#define DES_FAILED(err) \ + ((err) > DESERR_NOHWDEVICE) + +/* + * cbc_crypt() + * ecb_crypt() + * + * Encrypt (or decrypt) len bytes of a buffer buf. + * The length must be a multiple of eight. + * The key should have odd parity in the low bit of each byte. + * ivec is the input vector, and is updated to the new one (cbc only). + * The mode is created by oring together the appropriate parameters. + * DESERR_NOHWDEVICE is returned if DES_HW was specified but + * there was no hardware to do it on (the data will still be + * encrypted though, in software). + */ + + +/* + * Cipher Block Chaining mode + */ +extern int cbc_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode, char *__ivec) __THROW; + +/* + * Electronic Code Book mode + */ +extern int ecb_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode) __THROW; + +/* + * Set des parity for a key. + * DES parity is odd and in the low bit of each byte + */ +extern void des_setparity (char *__key) __THROW; + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/rpc/key_prot.h b/contrib/media/updf/include/rpc/key_prot.h new file mode 100644 index 0000000000..c398b82f82 --- /dev/null +++ b/contrib/media/updf/include/rpc/key_prot.h @@ -0,0 +1,346 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#ifndef _KEY_PROT_H_RPCGEN +#define _KEY_PROT_H_RPCGEN + +#include <rpc/rpc.h> + +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +#if 0 +#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" +#endif +/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */ + +/* + * Compiled from key_prot.x using rpcgen. + * DO NOT EDIT THIS FILE! + * This is NOT source code! + */ +#define PROOT 3 +#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" +#define HEXKEYBYTES 48 +#define KEYSIZE 192 +#define KEYBYTES 24 +#define KEYCHECKSUMSIZE 16 + +enum keystatus { + KEY_SUCCESS = 0, + KEY_NOSECRET = 1, + KEY_UNKNOWN = 2, + KEY_SYSTEMERR = 3, +}; +typedef enum keystatus keystatus; +#ifdef __cplusplus +extern "C" bool_t xdr_keystatus(XDR *, keystatus*); +#elif __STDC__ +extern bool_t xdr_keystatus(XDR *, keystatus*); +#else /* Old Style C */ +bool_t xdr_keystatus(); +#endif /* Old Style C */ + + +typedef char keybuf[HEXKEYBYTES]; +#ifdef __cplusplus +extern "C" bool_t xdr_keybuf(XDR *, keybuf); +#elif __STDC__ +extern bool_t xdr_keybuf(XDR *, keybuf); +#else /* Old Style C */ +bool_t xdr_keybuf(); +#endif /* Old Style C */ + + +typedef char *netnamestr; +#ifdef __cplusplus +extern "C" bool_t xdr_netnamestr(XDR *, netnamestr*); +#elif __STDC__ +extern bool_t xdr_netnamestr(XDR *, netnamestr*); +#else /* Old Style C */ +bool_t xdr_netnamestr(); +#endif /* Old Style C */ + + +struct cryptkeyarg { + netnamestr remotename; + des_block deskey; +}; +typedef struct cryptkeyarg cryptkeyarg; +#ifdef __cplusplus +extern "C" bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); +#elif __STDC__ +extern bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); +#else /* Old Style C */ +bool_t xdr_cryptkeyarg(); +#endif /* Old Style C */ + + +struct cryptkeyarg2 { + netnamestr remotename; + netobj remotekey; + des_block deskey; +}; +typedef struct cryptkeyarg2 cryptkeyarg2; +#ifdef __cplusplus +extern "C" bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); +#elif __STDC__ +extern bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); +#else /* Old Style C */ +bool_t xdr_cryptkeyarg2(); +#endif /* Old Style C */ + + +struct cryptkeyres { + keystatus status; + union { + des_block deskey; + } cryptkeyres_u; +}; +typedef struct cryptkeyres cryptkeyres; +#ifdef __cplusplus +extern "C" bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); +#elif __STDC__ +extern bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); +#else /* Old Style C */ +bool_t xdr_cryptkeyres(); +#endif /* Old Style C */ + +#define MAXGIDS 16 + +struct unixcred { + unsigned int uid; + unsigned int gid; + struct { + unsigned int gids_len; + unsigned int *gids_val; + } gids; +}; +typedef struct unixcred unixcred; +#ifdef __cplusplus +extern "C" bool_t xdr_unixcred(XDR *, unixcred*); +#elif __STDC__ +extern bool_t xdr_unixcred(XDR *, unixcred*); +#else /* Old Style C */ +bool_t xdr_unixcred(); +#endif /* Old Style C */ + + +struct getcredres { + keystatus status; + union { + unixcred cred; + } getcredres_u; +}; +typedef struct getcredres getcredres; +#ifdef __cplusplus +extern "C" bool_t xdr_getcredres(XDR *, getcredres*); +#elif __STDC__ +extern bool_t xdr_getcredres(XDR *, getcredres*); +#else /* Old Style C */ +bool_t xdr_getcredres(); +#endif /* Old Style C */ + + +struct key_netstarg { + keybuf st_priv_key; + keybuf st_pub_key; + netnamestr st_netname; +}; +typedef struct key_netstarg key_netstarg; +#ifdef __cplusplus +extern "C" bool_t xdr_key_netstarg(XDR *, key_netstarg*); +#elif __STDC__ +extern bool_t xdr_key_netstarg(XDR *, key_netstarg*); +#else /* Old Style C */ +bool_t xdr_key_netstarg(); +#endif /* Old Style C */ + + +struct key_netstres { + keystatus status; + union { + key_netstarg knet; + } key_netstres_u; +}; +typedef struct key_netstres key_netstres; +#ifdef __cplusplus +extern "C" bool_t xdr_key_netstres(XDR *, key_netstres*); +#elif __STDC__ +extern bool_t xdr_key_netstres(XDR *, key_netstres*); +#else /* Old Style C */ +bool_t xdr_key_netstres(); +#endif /* Old Style C */ + + +#ifndef opaque +#define opaque char +#endif + + +#define KEY_PROG ((unsigned long)100029) +#define KEY_VERS ((unsigned long)1) + +#ifdef __cplusplus +#define KEY_SET ((unsigned long)1) +extern "C" keystatus * key_set_1(opaque *, CLIENT *); +extern "C" keystatus * key_set_1_svc(opaque *, struct svc_req *); +#define KEY_ENCRYPT ((unsigned long)2) +extern "C" cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); +extern "C" cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); +#define KEY_DECRYPT ((unsigned long)3) +extern "C" cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); +extern "C" cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); +#define KEY_GEN ((unsigned long)4) +extern "C" des_block * key_gen_1(void *, CLIENT *); +extern "C" des_block * key_gen_1_svc(void *, struct svc_req *); +#define KEY_GETCRED ((unsigned long)5) +extern "C" getcredres * key_getcred_1(netnamestr *, CLIENT *); +extern "C" getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); + +#elif __STDC__ +#define KEY_SET ((unsigned long)1) +extern keystatus * key_set_1(opaque *, CLIENT *); +extern keystatus * key_set_1_svc(opaque *, struct svc_req *); +#define KEY_ENCRYPT ((unsigned long)2) +extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); +extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); +#define KEY_DECRYPT ((unsigned long)3) +extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); +extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); +#define KEY_GEN ((unsigned long)4) +extern des_block * key_gen_1(void *, CLIENT *); +extern des_block * key_gen_1_svc(void *, struct svc_req *); +#define KEY_GETCRED ((unsigned long)5) +extern getcredres * key_getcred_1(netnamestr *, CLIENT *); +extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); + +#else /* Old Style C */ +#define KEY_SET ((unsigned long)1) +extern keystatus * key_set_1(); +extern keystatus * key_set_1_svc(); +#define KEY_ENCRYPT ((unsigned long)2) +extern cryptkeyres * key_encrypt_1(); +extern cryptkeyres * key_encrypt_1_svc(); +#define KEY_DECRYPT ((unsigned long)3) +extern cryptkeyres * key_decrypt_1(); +extern cryptkeyres * key_decrypt_1_svc(); +#define KEY_GEN ((unsigned long)4) +extern des_block * key_gen_1(); +extern des_block * key_gen_1_svc(); +#define KEY_GETCRED ((unsigned long)5) +extern getcredres * key_getcred_1(); +extern getcredres * key_getcred_1_svc(); +#endif /* Old Style C */ +#define KEY_VERS2 ((unsigned long)2) + +#ifdef __cplusplus +extern "C" keystatus * key_set_2(opaque *, CLIENT *); +extern "C" keystatus * key_set_2_svc(opaque *, struct svc_req *); +extern "C" cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); +extern "C" cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); +extern "C" cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); +extern "C" cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); +extern "C" des_block * key_gen_2(void *, CLIENT *); +extern "C" des_block * key_gen_2_svc(void *, struct svc_req *); +extern "C" getcredres * key_getcred_2(netnamestr *, CLIENT *); +extern "C" getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); +#define KEY_ENCRYPT_PK ((unsigned long)6) +extern "C" cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); +extern "C" cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); +#define KEY_DECRYPT_PK ((unsigned long)7) +extern "C" cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); +extern "C" cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); +#define KEY_NET_PUT ((unsigned long)8) +extern "C" keystatus * key_net_put_2(key_netstarg *, CLIENT *); +extern "C" keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); +#define KEY_NET_GET ((unsigned long)9) +extern "C" key_netstres * key_net_get_2(void *, CLIENT *); +extern "C" key_netstres * key_net_get_2_svc(void *, struct svc_req *); +#define KEY_GET_CONV ((unsigned long)10) +extern "C" cryptkeyres * key_get_conv_2(opaque *, CLIENT *); +extern "C" cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); + +#elif __STDC__ +extern keystatus * key_set_2(opaque *, CLIENT *); +extern keystatus * key_set_2_svc(opaque *, struct svc_req *); +extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); +extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); +extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); +extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); +extern des_block * key_gen_2(void *, CLIENT *); +extern des_block * key_gen_2_svc(void *, struct svc_req *); +extern getcredres * key_getcred_2(netnamestr *, CLIENT *); +extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); +#define KEY_ENCRYPT_PK ((unsigned long)6) +extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); +extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); +#define KEY_DECRYPT_PK ((unsigned long)7) +extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); +extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); +#define KEY_NET_PUT ((unsigned long)8) +extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); +extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); +#define KEY_NET_GET ((unsigned long)9) +extern key_netstres * key_net_get_2(void *, CLIENT *); +extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); +#define KEY_GET_CONV ((unsigned long)10) +extern cryptkeyres * key_get_conv_2(opaque *, CLIENT *); +extern cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); + +#else /* Old Style C */ +extern keystatus * key_set_2(); +extern keystatus * key_set_2_svc(); +extern cryptkeyres * key_encrypt_2(); +extern cryptkeyres * key_encrypt_2_svc(); +extern cryptkeyres * key_decrypt_2(); +extern cryptkeyres * key_decrypt_2_svc(); +extern des_block * key_gen_2(); +extern des_block * key_gen_2_svc(); +extern getcredres * key_getcred_2(); +extern getcredres * key_getcred_2_svc(); +#define KEY_ENCRYPT_PK ((unsigned long)6) +extern cryptkeyres * key_encrypt_pk_2(); +extern cryptkeyres * key_encrypt_pk_2_svc(); +#define KEY_DECRYPT_PK ((unsigned long)7) +extern cryptkeyres * key_decrypt_pk_2(); +extern cryptkeyres * key_decrypt_pk_2_svc(); +#define KEY_NET_PUT ((unsigned long)8) +extern keystatus * key_net_put_2(); +extern keystatus * key_net_put_2_svc(); +#define KEY_NET_GET ((unsigned long)9) +extern key_netstres * key_net_get_2(); +extern key_netstres * key_net_get_2_svc(); +#define KEY_GET_CONV ((unsigned long)10) +extern cryptkeyres * key_get_conv_2(); +extern cryptkeyres * key_get_conv_2_svc(); +#endif /* Old Style C */ + +#endif /* !_KEY_PROT_H_RPCGEN */ diff --git a/contrib/media/updf/include/rpc/netdb.h b/contrib/media/updf/include/rpc/netdb.h new file mode 100644 index 0000000000..a991d3a952 --- /dev/null +++ b/contrib/media/updf/include/rpc/netdb.h @@ -0,0 +1,74 @@ +/* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* @(#)rpc.h 1.8 87/07/24 SMI */ + +/* Cleaned up for GNU C library roland@gnu.ai.mit.edu: + added multiple inclusion protection and use of <sys/cdefs.h>. + In GNU this file is #include'd by <netdb.h>. */ + +#ifndef _RPC_NETDB_H +#define _RPC_NETDB_H 1 + +#include <sys/cdefs.h> + +#define __need_size_t +#include <stddef.h> + +__BEGIN_DECLS + +struct rpcent +{ + char *r_name; /* Name of server for this rpc program. */ + char **r_aliases; /* Alias list. */ + int r_number; /* RPC program number. */ +}; + +extern void setrpcent (int __stayopen) __THROW; +extern void endrpcent (void) __THROW; +extern struct rpcent *getrpcbyname (const char *__name) __THROW; +extern struct rpcent *getrpcbynumber (int __number) __THROW; +extern struct rpcent *getrpcent (void) __THROW; + +#ifdef __USE_MISC +extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; + +extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; + +extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, + size_t __buflen, struct rpcent **__result) __THROW; +#endif + +__END_DECLS + +#endif /* rpc/netdb.h */ diff --git a/contrib/media/updf/include/rpc/pmap_clnt.h b/contrib/media/updf/include/rpc/pmap_clnt.h new file mode 100644 index 0000000000..c63922772e --- /dev/null +++ b/contrib/media/updf/include/rpc/pmap_clnt.h @@ -0,0 +1,98 @@ +/* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * pmap_clnt.h + * Supplies C routines to get to portmap services. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_PMAP_CLNT_H +#define _RPC_PMAP_CLNT_H 1 + +#include <sys/cdefs.h> +#include <rpc/types.h> +#include <rpc/xdr.h> +#include <rpc/clnt.h> + +__BEGIN_DECLS + +typedef bool_t (*resultproc_t) (char* resp, struct sockaddr_in *raddr); + +/* + * Usage: + * success = pmap_set(program, version, protocol, port); + * success = pmap_unset(program, version); + * port = pmap_getport(address, program, version, protocol); + * head = pmap_getmaps(address); + * clnt_stat = pmap_rmtcall(address, program, version, procedure, + * xdrargs, argsp, xdrres, resp, tout, port_ptr) + * (works for udp only.) + * clnt_stat = clnt_broadcast(program, version, procedure, + * xdrargs, argsp, xdrres, resp, eachresult) + * (like pmap_rmtcall, except the call is broadcasted to all + * locally connected nets. For each valid response received, + * the procedure eachresult is called. Its form is: + * done = eachresult(resp, raddr) + * bool_t done; + * char* resp; + * struct sockaddr_in raddr; + * where resp points to the results of the call and raddr is the + * address if the responder to the broadcast. + */ + +extern bool_t pmap_set (const unsigned long __program, const unsigned long __vers, + int __protocol, unsigned short __port) __THROW; +extern bool_t pmap_unset (const unsigned long __program, const unsigned long __vers) + __THROW; +extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; +extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, + const unsigned long __prog, + const unsigned long __vers, + const unsigned long __proc, + xdrproc_t __xdrargs, + char* __argsp, xdrproc_t __xdrres, + char* __resp, struct timeval __tout, + unsigned long *__port_ptr) __THROW; +extern enum clnt_stat clnt_broadcast (const unsigned long __prog, + const unsigned long __vers, + const unsigned long __proc, xdrproc_t __xargs, + char* __argsp, xdrproc_t __xresults, + char* __resultsp, + resultproc_t __eachresult) __THROW; +extern unsigned short pmap_getport (struct sockaddr_in *__address, + const unsigned long __program, + const unsigned long __version, unsigned int __protocol) + __THROW; + +__END_DECLS + +#endif /* rpc/pmap_clnt.h */ diff --git a/contrib/media/updf/include/rpc/pmap_prot.h b/contrib/media/updf/include/rpc/pmap_prot.h new file mode 100644 index 0000000000..da06d34c19 --- /dev/null +++ b/contrib/media/updf/include/rpc/pmap_prot.h @@ -0,0 +1,108 @@ +/* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * pmap_prot.h + * Protocol for the local binder service, or pmap. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_PMAP_PROT_H +#define _RPC_PMAP_PROT_H 1 + +#include <sys/cdefs.h> + +#include <rpc/xdr.h> + +__BEGIN_DECLS + +/* The following procedures are supported by the protocol: + * + * PMAPPROC_NULL() returns () + * takes nothing, returns nothing + * + * PMAPPROC_SET(struct pmap) returns (bool_t) + * TRUE is success, FALSE is failure. Registers the tuple + * [prog, vers, prot, port]. + * + * PMAPPROC_UNSET(struct pmap) returns (bool_t) + * TRUE is success, FALSE is failure. Un-registers pair + * [prog, vers]. prot and port are ignored. + * + * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). + * 0 is failure. Otherwise returns the port number where the pair + * [prog, vers] is registered. It may lie! + * + * PMAPPROC_DUMP() RETURNS (struct pmaplist *) + * + * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) + * RETURNS (port, string<>); + * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); + * Calls the procedure on the local machine. If it is not registered, + * this procedure is quite; ie it does not return error information!!! + * This procedure only is supported on rpc/udp and calls via + * rpc/udp. This routine only passes null authentication parameters. + * This file has no interface to xdr routines for PMAPPROC_CALLIT. + * + * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. + */ + +#define PMAPPORT ((unsigned short)111) +#define PMAPPROG ((unsigned long)100000) +#define PMAPVERS ((unsigned long)2) +#define PMAPVERS_PROTO ((unsigned long)2) +#define PMAPVERS_ORIG ((unsigned long)1) +#define PMAPPROC_NULL ((unsigned long)0) +#define PMAPPROC_SET ((unsigned long)1) +#define PMAPPROC_UNSET ((unsigned long)2) +#define PMAPPROC_GETPORT ((unsigned long)3) +#define PMAPPROC_DUMP ((unsigned long)4) +#define PMAPPROC_CALLIT ((unsigned long)5) + +struct pmap { + long unsigned pm_prog; + long unsigned pm_vers; + long unsigned pm_prot; + long unsigned pm_port; +}; + +extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; + +struct pmaplist { + struct pmap pml_map; + struct pmaplist *pml_next; +}; + +extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; + +__END_DECLS + +#endif /* rpc/pmap_prot.h */ diff --git a/contrib/media/updf/include/rpc/pmap_rmt.h b/contrib/media/updf/include/rpc/pmap_rmt.h new file mode 100644 index 0000000000..3b975d0fb8 --- /dev/null +++ b/contrib/media/updf/include/rpc/pmap_rmt.h @@ -0,0 +1,68 @@ +/* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * Structures and XDR routines for parameters to and replies from + * the portmapper remote-call-service. + * + * Copyright (C) 1986, Sun Microsystems, Inc. + */ + +#ifndef _RPC_PMAP_RMT_H +#define _RPC_PMAP_RMT_H 1 + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/xdr.h> + +__BEGIN_DECLS + +struct rmtcallargs { + unsigned long prog, vers, proc, arglen; + char* args_ptr; + xdrproc_t xdr_args; +}; + +extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) + __THROW; + +struct rmtcallres { + unsigned long *port_ptr; + unsigned long resultslen; + char* results_ptr; + xdrproc_t xdr_results; +}; + +extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; + +__END_DECLS + +#endif /* rpc/pmap_rmt.h */ diff --git a/contrib/media/updf/include/rpc/rpc.h b/contrib/media/updf/include/rpc/rpc.h new file mode 100644 index 0000000000..a966d2e231 --- /dev/null +++ b/contrib/media/updf/include/rpc/rpc.h @@ -0,0 +1,70 @@ +/* @(#)rpc.h 2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * rpc.h, Just includes the billions of rpc header files necessary to + * do remote procedure calling. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_RPC_H +#define _RPC_RPC_H 1 + +#include <rpc/types.h> /* some typedefs */ +#include <netinet/in.h> + +/* external data representation interfaces */ +#include <rpc/xdr.h> /* generic (de)serializer */ + +/* Client side only authentication */ +#include <rpc/auth.h> /* generic authenticator (client side) */ + +/* Client side (mostly) remote procedure call */ +#include <rpc/clnt.h> /* generic rpc stuff */ + +/* semi-private protocol headers */ +#include <rpc/rpc_msg.h> /* protocol for rpc messages */ +#include <rpc/auth_unix.h> /* protocol for unix style cred */ +#include <rpc/auth_des.h> /* protocol for des style cred */ + +/* Server side only remote procedure callee */ +#include <rpc/svc.h> /* service manager and multiplexer */ +#include <rpc/svc_auth.h> /* service side authenticator */ + +/* + * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION + * OF UNIX BASED ON NFSSRC. These systems will already have the structures + * defined by <rpc/netdb.h> included in <netdb.h>. + */ +/* routines for parsing /etc/rpc */ +#include <rpc/netdb.h> /* structures and routines to parse /etc/rpc */ + +#endif /* rpc/rpc.h */ diff --git a/contrib/media/updf/include/rpc/rpc_des.h b/contrib/media/updf/include/rpc/rpc_des.h new file mode 100644 index 0000000000..3d95d8c23a --- /dev/null +++ b/contrib/media/updf/include/rpc/rpc_des.h @@ -0,0 +1,76 @@ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* + * Generic DES driver interface + * Keep this file hardware independent! + * Copyright (c) 1986 by Sun Microsystems, Inc. + */ + +#ifndef _DES_H +#define _DES_H + +#include <sys/types.h> + +__BEGIN_DECLS + +#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ +#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ + +enum desdir + { + ENCRYPT, DECRYPT + }; +enum desmode + { + CBC, ECB + }; + +/* + * parameters to ioctl call + */ +struct desparams + { + u_char des_key[8]; /* key (with low bit parity) */ + enum desdir des_dir; /* direction */ + enum desmode des_mode; /* mode */ + u_char des_ivec[8]; /* input vector */ + unsigned des_len; /* number of bytes to crypt */ + union + { + u_char UDES_data[DES_QUICKLEN]; + u_char *UDES_buf; + } + UDES; +#define des_data UDES.UDES_data /* direct data here if quick */ +#define des_buf UDES.UDES_buf /* otherwise, pointer to data */ + }; + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/rpc/rpc_msg.h b/contrib/media/updf/include/rpc/rpc_msg.h new file mode 100644 index 0000000000..d597608ab7 --- /dev/null +++ b/contrib/media/updf/include/rpc/rpc_msg.h @@ -0,0 +1,202 @@ +/* @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* @(#)rpc_msg.h 1.7 86/07/16 SMI */ + +#ifndef _RPC_MSG_H +#define _RPC_MSG_H 1 + +#include <sys/cdefs.h> + +#include <rpc/xdr.h> +#include <rpc/clnt.h> + +/* + * rpc_msg.h + * rpc message definition + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#define RPC_MSG_VERSION ((unsigned long) 2) +#define RPC_SERVICE_PORT ((unsigned short) 2048) + +__BEGIN_DECLS + +/* + * Bottom up definition of an rpc message. + * NOTE: call and reply use the same overall struct but + * different parts of unions within it. + */ + +enum msg_type { + CALL=0, + REPLY=1 +}; + +enum reply_stat { + MSG_ACCEPTED=0, + MSG_DENIED=1 +}; + +enum accept_stat { + SUCCESS=0, + PROG_UNAVAIL=1, + PROG_MISMATCH=2, + PROC_UNAVAIL=3, + GARBAGE_ARGS=4, + SYSTEM_ERR=5 +}; + +enum reject_stat { + RPC_MISMATCH=0, + AUTH_ERROR=1 +}; + +/* + * Reply part of an rpc exchange + */ + +/* + * Reply to an rpc request that was accepted by the server. + * Note: there could be an error even though the request was + * accepted. + */ +struct accepted_reply { + struct opaque_auth ar_verf; + enum accept_stat ar_stat; + union { + struct { + unsigned long low; + unsigned long high; + } AR_versions; + struct { + char* where; + xdrproc_t proc; + } AR_results; + /* and many other null cases */ + } ru; +#define ar_results ru.AR_results +#define ar_vers ru.AR_versions +}; + +/* + * Reply to an rpc request that was rejected by the server. + */ +struct rejected_reply { + enum reject_stat rj_stat; + union { + struct { + unsigned long low; + unsigned long high; + } RJ_versions; + enum auth_stat RJ_why; /* why authentication did not work */ + } ru; +#define rj_vers ru.RJ_versions +#define rj_why ru.RJ_why +}; + +/* + * Body of a reply to an rpc request. + */ +struct reply_body { + enum reply_stat rp_stat; + union { + struct accepted_reply RP_ar; + struct rejected_reply RP_dr; + } ru; +#define rp_acpt ru.RP_ar +#define rp_rjct ru.RP_dr +}; + +/* + * Body of an rpc request call. + */ +struct call_body { + unsigned long cb_rpcvers; /* must be equal to two */ + unsigned long cb_prog; + unsigned long cb_vers; + unsigned long cb_proc; + struct opaque_auth cb_cred; + struct opaque_auth cb_verf; /* protocol specific - provided by client */ +}; + +/* + * The rpc message + */ +struct rpc_msg { + unsigned long rm_xid; + enum msg_type rm_direction; + union { + struct call_body RM_cmb; + struct reply_body RM_rmb; + } ru; +#define rm_call ru.RM_cmb +#define rm_reply ru.RM_rmb +}; +#define acpted_rply ru.RM_rmb.ru.RP_ar +#define rjcted_rply ru.RM_rmb.ru.RP_dr + + +/* + * XDR routine to handle a rpc message. + * xdr_callmsg(xdrs, cmsg) + * XDR *xdrs; + * struct rpc_msg *cmsg; + */ +extern bool_t xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; + +/* + * XDR routine to pre-serialize the static part of a rpc message. + * xdr_callhdr(xdrs, cmsg) + * XDR *xdrs; + * struct rpc_msg *cmsg; + */ +extern bool_t xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; + +/* + * XDR routine to handle a rpc reply. + * xdr_replymsg(xdrs, rmsg) + * XDR *xdrs; + * struct rpc_msg *rmsg; + */ +extern bool_t xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW; + +/* + * Fills in the error part of a reply message. + * _seterr_reply(msg, error) + * struct rpc_msg *msg; + * struct rpc_err *error; + */ +extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error) + __THROW; + +__END_DECLS + +#endif /* rpc/rpc_msg.h */ diff --git a/contrib/media/updf/include/rpc/svc.h b/contrib/media/updf/include/rpc/svc.h new file mode 100644 index 0000000000..ec598ba79a --- /dev/null +++ b/contrib/media/updf/include/rpc/svc.h @@ -0,0 +1,316 @@ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * svc.h, Server-side remote procedure call interface. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_SVC_H +#define _RPC_SVC_H 1 + +#include <sys/cdefs.h> +#include <rpc/rpc_msg.h> + +__BEGIN_DECLS + +/* + * This interface must manage two items concerning remote procedure calling: + * + * 1) An arbitrary number of transport connections upon which rpc requests + * are received. The two most notable transports are TCP and UDP; they are + * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; + * they in turn call xprt_register and xprt_unregister. + * + * 2) An arbitrary number of locally registered services. Services are + * described by the following four data: program number, version number, + * "service dispatch" function, a transport handle, and a boolean that + * indicates whether or not the exported program should be registered with a + * local binder service; if true the program's number and version and the + * port number from the transport handle are registered with the binder. + * These data are registered with the rpc svc system via svc_register. + * + * A service's dispatch function is called whenever an rpc request comes in + * on a transport. The request's program and version numbers must match + * those of the registered service. The dispatch function is passed two + * parameters, struct svc_req * and SVCXPRT *, defined below. + */ + +enum xprt_stat { + XPRT_DIED, + XPRT_MOREREQS, + XPRT_IDLE +}; + +/* + * Server side transport handle + */ +typedef struct SVCXPRT SVCXPRT; +struct SVCXPRT { + int xp_sock; + unsigned short xp_port; /* associated port number */ + const struct xp_ops { + bool_t (*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg); + /* receive incoming requests */ + enum xprt_stat (*xp_stat) (SVCXPRT *__xprt); + /* get transport status */ + bool_t (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + char* args_ptr); /* get arguments */ + bool_t (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg); + /* send reply */ + bool_t (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + char* args_ptr); + /* free mem allocated for args */ + void (*xp_destroy) (SVCXPRT *__xprt); + /* destroy this struct */ + } *xp_ops; + int xp_addrlen; /* length of remote address */ + struct sockaddr_in xp_raddr; /* remote address */ + struct opaque_auth xp_verf; /* raw response verifier */ + char* xp_p1; /* private */ + char* xp_p2; /* private */ + char xp_pad [256]; /* padding, internal use */ +}; + +/* + * Approved way of getting address of caller + */ +#define svc_getcaller(x) (&(x)->xp_raddr) + +/* + * Operations defined on an SVCXPRT handle + * + * SVCXPRT *xprt; + * struct rpc_msg *msg; + * xdrproc_t xargs; + * char* argsp; + */ +#define SVC_RECV(xprt, msg) \ + (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) +#define svc_recv(xprt, msg) \ + (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) + +#define SVC_STAT(xprt) \ + (*(xprt)->xp_ops->xp_stat)(xprt) +#define svc_stat(xprt) \ + (*(xprt)->xp_ops->xp_stat)(xprt) + +#define SVC_GETARGS(xprt, xargs, argsp) \ + (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) +#define svc_getargs(xprt, xargs, argsp) \ + (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) + +#define SVC_REPLY(xprt, msg) \ + (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) +#define svc_reply(xprt, msg) \ + (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) + +#define SVC_FREEARGS(xprt, xargs, argsp) \ + (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) +#define svc_freeargs(xprt, xargs, argsp) \ + (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) + +#define SVC_DESTROY(xprt) \ + (*(xprt)->xp_ops->xp_destroy)(xprt) +#define svc_destroy(xprt) \ + (*(xprt)->xp_ops->xp_destroy)(xprt) + + +/* + * Service request + */ +struct svc_req { + rpcprog_t rq_prog; /* service program number */ + rpcvers_t rq_vers; /* service protocol version */ + rpcproc_t rq_proc; /* the desired procedure */ + struct opaque_auth rq_cred; /* raw creds from the wire */ + char* rq_clntcred; /* read only cooked cred */ + SVCXPRT *rq_xprt; /* associated transport */ +}; + +#ifndef __DISPATCH_FN_T +#define __DISPATCH_FN_T +typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*); +#endif + +/* + * Service registration + * + * svc_register(xprt, prog, vers, dispatch, protocol) + * SVCXPRT *xprt; + * rpcprog_t prog; + * rpcvers_t vers; + * void (*dispatch)(struct svc_req*, SVCXPRT*); + * rpcprot_t protocol; like TCP or UDP, zero means do not register + */ +extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog, + rpcvers_t __vers, __dispatch_fn_t __dispatch, + rpcprot_t __protocol) __THROW; + +/* + * Service un-registration + * + * svc_unregister(prog, vers) + * rpcprog_t prog; + * rpcvers_t vers; + */ +extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW; + +/* + * Transport registration. + * + * xprt_register(xprt) + * SVCXPRT *xprt; + */ +extern void xprt_register (SVCXPRT *__xprt) __THROW; + +/* + * Transport un-register + * + * xprt_unregister(xprt) + * SVCXPRT *xprt; + */ +extern void xprt_unregister (SVCXPRT *__xprt) __THROW; + + +/* + * When the service routine is called, it must first check to see if it + * knows about the procedure; if not, it should call svcerr_noproc + * and return. If so, it should deserialize its arguments via + * SVC_GETARGS (defined above). If the deserialization does not work, + * svcerr_decode should be called followed by a return. Successful + * decoding of the arguments should be followed the execution of the + * procedure's code and a call to svc_sendreply. + * + * Also, if the service refuses to execute the procedure due to too- + * weak authentication parameters, svcerr_weakauth should be called. + * Note: do not confuse access-control failure with weak authentication! + * + * NB: In pure implementations of rpc, the caller always waits for a reply + * msg. This message is sent when svc_sendreply is called. + * Therefore pure service implementations should always call + * svc_sendreply even if the function logically returns void; use + * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows + * for the abuse of pure rpc via batched calling or pipelining. In the + * case of a batched call, svc_sendreply should NOT be called since + * this would send a return message, which is what batching tries to avoid. + * It is the service/protocol writer's responsibility to know which calls are + * batched and which are not. Warning: responding to batch calls may + * deadlock the caller and server processes! + */ + +extern bool_t svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results, + char* __xdr_location) __THROW; + +extern void svcerr_decode (SVCXPRT *__xprt) __THROW; + +extern void svcerr_weakauth (SVCXPRT *__xprt) __THROW; + +extern void svcerr_noproc (SVCXPRT *__xprt) __THROW; + +extern void svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers, + rpcvers_t __high_vers) __THROW; + +extern void svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW; + +extern void svcerr_noprog (SVCXPRT *__xprt) __THROW; + +extern void svcerr_systemerr (SVCXPRT *__xprt) __THROW; + +/* + * Lowest level dispatching -OR- who owns this process anyway. + * Somebody has to wait for incoming requests and then call the correct + * service routine. The routine svc_run does infinite waiting; i.e., + * svc_run never returns. + * Since another (coexistent) package may wish to selectively wait for + * incoming calls or other events outside of the rpc architecture, the + * routine svc_getreq is provided. It must be passed readfds, the + * "in-place" results of a select system call (see select, section 2). + */ + +/* + * Global keeper of rpc service descriptors in use + * dynamic; must be inspected before each call to select + */ + +extern struct pollfd *svc_pollfd; +extern int svc_max_pollfd; +extern fd_set svc_fdset; +#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ + +/* + * a small program implemented by the svc_rpc implementation itself; + * also see clnt.h for protocol numbers. + */ +extern void svc_getreq (int __rdfds) __THROW; +extern void svc_getreq_common (const int __fd) __THROW; +extern void svc_getreqset (fd_set *__readfds) __THROW; +extern void svc_getreq_poll (struct pollfd *, const int) __THROW; +extern void svc_exit (void) __THROW; +extern void svc_run (void) __THROW; + +/* + * Socket to use on svcxxx_create call to get default socket + */ +#define RPC_ANYSOCK -1 + +/* + * These are the existing service side transport implementations + */ + +/* + * Memory based rpc for testing and timing. + */ +extern SVCXPRT *svcraw_create (void) __THROW; + +/* + * Udp based rpc. + */ +extern SVCXPRT *svcudp_create (int __sock) __THROW; +extern SVCXPRT *svcudp_bufcreate (int __sock, unsigned int __sendsz, unsigned int __recvsz) + __THROW; + +/* + * Tcp based rpc. + */ +extern SVCXPRT *svctcp_create (int __sock, unsigned int __sendsize, unsigned int __recvsize) + __THROW; + + +/* + * Unix based rpc. + */ +extern SVCXPRT *svcunix_create (int __sock, unsigned int __sendsize, unsigned int __recvsize, + char *__path) __THROW; + + +__END_DECLS + +#endif /* rpc/svc.h */ diff --git a/contrib/media/updf/include/rpc/svc_auth.h b/contrib/media/updf/include/rpc/svc_auth.h new file mode 100644 index 0000000000..cd4b8da290 --- /dev/null +++ b/contrib/media/updf/include/rpc/svc_auth.h @@ -0,0 +1,54 @@ +/* @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* @(#)svc_auth.h 1.6 86/07/16 SMI */ + +/* + * svc_auth.h, Service side of rpc authentication. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_SVC_AUTH_H +#define _RPC_SVC_AUTH_H 1 + +#include <sys/cdefs.h> +#include <rpc/svc.h> + +__BEGIN_DECLS + +/* + * Server side authenticator + */ +extern enum auth_stat _authenticate (struct svc_req *__rqst, + struct rpc_msg *__msg) __THROW; + +__END_DECLS + +#endif /* rpc/svc_auth.h */ diff --git a/contrib/media/updf/include/rpc/types.h b/contrib/media/updf/include/rpc/types.h new file mode 100644 index 0000000000..d2e56f59bb --- /dev/null +++ b/contrib/media/updf/include/rpc/types.h @@ -0,0 +1,80 @@ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +/* fixincludes should not add extern "C" to this file */ +/* + * Rpc additions to <sys/types.h> + */ +#ifndef _RPC_TYPES_H +#define _RPC_TYPES_H 1 + +#include <sys/cdefs.h> + +__BEGIN_DECLS + +typedef int bool_t; +typedef int enum_t; +/* This needs to be changed to uint32_t in the future */ +typedef unsigned long rpcprog_t; +typedef unsigned long rpcvers_t; +typedef unsigned long rpcproc_t; +typedef unsigned long rpcprot_t; +typedef unsigned long rpcport_t; + +#define __dontcare__ -1 + +#ifndef FALSE +# define FALSE (0) +#endif + +#ifndef TRUE +# define TRUE (1) +#endif + +#include <stdlib.h> /* For malloc decl. */ +#define mem_alloc(bsize) malloc(bsize) +#define mem_free(ptr, bsize) free(ptr) + +#ifndef makedev /* ie, we haven't already included it */ +#include <sys/types.h> +#endif +#include <sys/time.h> +#include <sys/param.h> + +#include <netinet/in.h> + +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK 0x7F000001UL +#endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +__END_DECLS + +#endif /* rpc/types.h */ diff --git a/contrib/media/updf/include/rpc/xdr.h b/contrib/media/updf/include/rpc/xdr.h new file mode 100644 index 0000000000..5808492e3f --- /dev/null +++ b/contrib/media/updf/include/rpc/xdr.h @@ -0,0 +1,379 @@ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ + +/* + * xdr.h, External Data Representation Serialization Routines. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#ifndef _RPC_XDR_H +#define _RPC_XDR_H 1 + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <rpc/types.h> + +/* We need FILE. */ +#include <stdio.h> + +__BEGIN_DECLS + +/* + * XDR provides a conventional way for converting between C data + * types and an external bit-string representation. Library supplied + * routines provide for the conversion on built-in C data types. These + * routines and utility routines defined here are used to help implement + * a type encode/decode routine for each user-defined type. + * + * Each data type provides a single procedure which takes two arguments: + * + * bool_t + * xdrproc(xdrs, argresp) + * XDR *xdrs; + * <type> *argresp; + * + * xdrs is an instance of a XDR handle, to which or from which the data + * type is to be converted. argresp is a pointer to the structure to be + * converted. The XDR handle contains an operation field which indicates + * which of the operations (ENCODE, DECODE * or FREE) is to be performed. + * + * XDR_DECODE may allocate space if the pointer argresp is null. This + * data can be freed with the XDR_FREE operation. + * + * We write only one procedure per data type to make it easy + * to keep the encode and decode procedures for a data type consistent. + * In many cases the same code performs all operations on a user defined type, + * because all the hard work is done in the component type routines. + * decode as a series of calls on the nested data types. + */ + +/* + * Xdr operations. XDR_ENCODE causes the type to be encoded into the + * stream. XDR_DECODE causes the type to be extracted from the stream. + * XDR_FREE can be used to release the space allocated by an XDR_DECODE + * request. + */ +enum xdr_op { + XDR_ENCODE = 0, + XDR_DECODE = 1, + XDR_FREE = 2 +}; + +/* + * This is the number of bytes per unit of external data. + */ +#define BYTES_PER_XDR_UNIT (4) +/* + * This only works if the above is a power of 2. But it's defined to be + * 4 by the appropriate RFCs. So it will work. And it's normally quicker + * than the old routine. + */ +#if 1 +#define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1)) +#else /* this is the old routine */ +#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ + * BYTES_PER_XDR_UNIT) +#endif + +/* + * The XDR handle. + * Contains operation which is being applied to the stream, + * an operations vector for the particular implementation (e.g. see xdr_mem.c), + * and two private fields for the use of the particular implementation. + */ +typedef struct XDR XDR; +struct XDR + { + enum xdr_op x_op; /* operation; fast additional param */ + struct xdr_ops + { + bool_t (*x_getlong) (XDR *__xdrs, long *__lp); + /* get a long from underlying stream */ + bool_t (*x_putlong) (XDR *__xdrs, const long *__lp); + /* put a long to " */ + bool_t (*x_getbytes) (XDR *__xdrs, char* __addr, unsigned int __len); + /* get some bytes from " */ + bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, unsigned int __len); + /* put some bytes to " */ + unsigned int (*x_getpostn) (const XDR *__xdrs); + /* returns bytes off from beginning */ + bool_t (*x_setpostn) (XDR *__xdrs, unsigned int __pos); + /* lets you reposition the stream */ + int32_t *(*x_inline) (XDR *__xdrs, unsigned int __len); + /* buf quick ptr to buffered data */ + void (*x_destroy) (XDR *__xdrs); + /* free privates of this xdr_stream */ + bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); + /* get a int from underlying stream */ + bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip); + /* put a int to " */ + } + *x_ops; + char* x_public; /* users' data */ + char* x_private; /* pointer to private data */ + char* x_base; /* private used for position info */ + unsigned int x_handy; /* extra private word */ + }; + +/* + * A xdrproc_t exists for each data type which is to be encoded or decoded. + * + * The second argument to the xdrproc_t is a pointer to an opaque pointer. + * The opaque pointer generally points to a structure of the data type + * to be decoded. If this pointer is 0, then the type routines should + * allocate dynamic storage of the appropriate size and return it. + * bool_t (*xdrproc_t)(XDR *, char* *); + */ +typedef bool_t (*xdrproc_t) (XDR *, void *,...); + + +/* + * Operations defined on a XDR handle + * + * XDR *xdrs; + * int32_t *int32p; + * long *longp; + * char* addr; + * unsigned int len; + * unsigned int pos; + */ +#define XDR_GETINT32(xdrs, int32p) \ + (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) +#define xdr_getint32(xdrs, int32p) \ + (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) + +#define XDR_PUTINT32(xdrs, int32p) \ + (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) +#define xdr_putint32(xdrs, int32p) \ + (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) + +#define XDR_GETLONG(xdrs, longp) \ + (*(xdrs)->x_ops->x_getlong)(xdrs, longp) +#define xdr_getlong(xdrs, longp) \ + (*(xdrs)->x_ops->x_getlong)(xdrs, longp) + +#define XDR_PUTLONG(xdrs, longp) \ + (*(xdrs)->x_ops->x_putlong)(xdrs, longp) +#define xdr_putlong(xdrs, longp) \ + (*(xdrs)->x_ops->x_putlong)(xdrs, longp) + +#define XDR_GETBYTES(xdrs, addr, len) \ + (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) +#define xdr_getbytes(xdrs, addr, len) \ + (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) + +#define XDR_PUTBYTES(xdrs, addr, len) \ + (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) +#define xdr_putbytes(xdrs, addr, len) \ + (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) + +#define XDR_GETPOS(xdrs) \ + (*(xdrs)->x_ops->x_getpostn)(xdrs) +#define xdr_getpos(xdrs) \ + (*(xdrs)->x_ops->x_getpostn)(xdrs) + +#define XDR_SETPOS(xdrs, pos) \ + (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) +#define xdr_setpos(xdrs, pos) \ + (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) + +#define XDR_INLINE(xdrs, len) \ + (*(xdrs)->x_ops->x_inline)(xdrs, len) +#define xdr_inline(xdrs, len) \ + (*(xdrs)->x_ops->x_inline)(xdrs, len) + +#define XDR_DESTROY(xdrs) \ + do { \ + if ((xdrs)->x_ops->x_destroy) \ + (*(xdrs)->x_ops->x_destroy)(xdrs); \ + } while (0) +#define xdr_destroy(xdrs) \ + do { \ + if ((xdrs)->x_ops->x_destroy) \ + (*(xdrs)->x_ops->x_destroy)(xdrs); \ + } while (0) + +/* + * Support struct for discriminated unions. + * You create an array of xdrdiscrim structures, terminated with + * a entry with a null procedure pointer. The xdr_union routine gets + * the discriminant value and then searches the array of structures + * for a matching value. If a match is found the associated xdr routine + * is called to handle that part of the union. If there is + * no match, then a default routine may be called. + * If there is no match and no default routine it is an error. + */ +#define NULL_xdrproc_t ((xdrproc_t)0) +struct xdr_discrim +{ + int value; + xdrproc_t proc; +}; + +/* + * Inline routines for fast encode/decode of primitive data types. + * Caveat emptor: these use single memory cycles to get the + * data from the underlying buffer, and will fail to operate + * properly if the data is not aligned. The standard way to use these + * is to say: + * if ((buf = XDR_INLINE(xdrs, count)) == NULL) + * return (FALSE); + * <<< macro calls >>> + * where ``count'' is the number of bytes of data occupied + * by the primitive data types. + * + * N.B. and frozen for all time: each data type here uses 4 bytes + * of external representation. + */ + +#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++)) +#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v))) +#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) +#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32(buf, (int32_t)(v)) + +/* WARNING: The IXDR_*_LONG defines are removed by Sun for new platforms + * and shouldn't be used any longer. Code which use this defines or longs + * in the RPC code will not work on 64bit Solaris platforms ! + */ +#define IXDR_GET_LONG(buf) \ + ((long)ntohl((unsigned long)*__extension__((uint32_t*)(buf))++)) +#define IXDR_PUT_LONG(buf, v) \ + (*__extension__((uint32_t*)(buf))++ = (long)htonl((unsigned long)(v))) +#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf)) +#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) + + +#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) +#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) +#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) +#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf)) + +#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG(buf, (long)(v)) +#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG(buf, (long)(v)) +#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) +#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) + +/* + * These are the "generic" xdr routines. + * None of these can have const applied because it's not possible to + * know whether the call is a read or a write to the passed parameter + * also, the XDR structure is always updated by some of these calls. + */ +extern bool_t xdr_void (void) __THROW; +extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW; +extern bool_t xdr_u_short (XDR *__xdrs, unsigned short *__usp) __THROW; +extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW; +extern bool_t xdr_u_int (XDR *__xdrs, unsigned int *__up) __THROW; +extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW; +extern bool_t xdr_u_long (XDR *__xdrs, unsigned long *__ulp) __THROW; +extern bool_t xdr_hyper (XDR *__xdrs, int64_t *__llp) __THROW; +extern bool_t xdr_u_hyper (XDR *__xdrs, uint64_t *__ullp) __THROW; +extern bool_t xdr_longlong_t (XDR *__xdrs, int64_t *__llp) __THROW; +extern bool_t xdr_u_longlong_t (XDR *__xdrs, uint64_t *__ullp) __THROW; +extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW; +extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW; +extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW; +extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW; +extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW; +extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW; +extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW; +extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW; +extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW; +extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW; +extern bool_t xdr_array (XDR * _xdrs, char* *__addrp, unsigned int *__sizep, + unsigned int __maxsize, unsigned int __elsize, xdrproc_t __elproc) + __THROW; +extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, unsigned int *__sizep, + unsigned int __maxsize) __THROW; +extern bool_t xdr_opaque (XDR *__xdrs, char* __cp, unsigned int __cnt) __THROW; +extern bool_t xdr_string (XDR *__xdrs, char **__cpp, unsigned int __maxsize) __THROW; +extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp, + const struct xdr_discrim *__choices, + xdrproc_t dfault) __THROW; +extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; +extern bool_t xdr_u_char (XDR *__xdrs, unsigned char *__cp) __THROW; +extern bool_t xdr_vector (XDR *__xdrs, char *__basep, unsigned int __nelem, + unsigned int __elemsize, xdrproc_t __xdr_elem) __THROW; +extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW; +extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW; +extern bool_t xdr_reference (XDR *__xdrs, char* *__xpp, unsigned int __size, + xdrproc_t __proc) __THROW; +extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp, + unsigned int __obj_size, xdrproc_t __xdr_obj) __THROW; +extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW; +extern unsigned long xdr_sizeof (xdrproc_t, void *) __THROW; + +/* + * Common opaque bytes objects used by many rpc protocols; + * declared here due to commonality. + */ +#define MAX_NETOBJ_SZ 1024 +struct netobj +{ + unsigned int n_len; + char *n_bytes; +}; +typedef struct netobj netobj; +extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; + +/* + * These are the public routines for the various implementations of + * xdr streams. + */ + +/* XDR using memory buffers */ +extern void xdrmem_create (XDR *__xdrs, const char* __addr, + unsigned int __size, enum xdr_op __xop) __THROW; + +/* XDR using stdio library */ +extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop) + __THROW; + +/* XDR pseudo records for tcp */ +extern void xdrrec_create (XDR *__xdrs, unsigned int __sendsize, + unsigned int __recvsize, char* __tcp_handle, + int (*__readit) (char *, char *, int), + int (*__writeit) (char *, char *, int)) __THROW; + +/* make end of xdr record */ +extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW; + +/* move to beginning of next record */ +extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW; + +/* true if no more input */ +extern bool_t xdrrec_eof (XDR *__xdrs) __THROW; + +/* free memory buffers for xdr */ +extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW; + +__END_DECLS + +#endif /* rpc/xdr.h */ diff --git a/contrib/media/updf/include/scripts/menuetos_app_v01.ld b/contrib/media/updf/include/scripts/menuetos_app_v01.ld new file mode 100644 index 0000000000..be13d5a1d7 --- /dev/null +++ b/contrib/media/updf/include/scripts/menuetos_app_v01.ld @@ -0,0 +1,52 @@ +/*OUTPUT_FORMAT("binary")*/ +ENTRY("start") +SECTIONS +{ + .text 0x000000 : + { + code = . ; _code = . ; + *(.text) + *(.fixup) + *(.gnu.warning) + *(.gnu.linkonce.t*) + *(.const) + *(.ro*) + *(.gnu.linkonce.r*) + ecode = . ; _ecode = . ; + } + .rdata : + { + } + .data : + { + djgpp_first_ctor = . ; + *(.ctor) + *(.ctors) + djgpp_last_ctor = . ; + djgpp_first_dtor = . ; + *(.dtor) + *(.dtors) + djgpp_last_dtor = . ; + *(.gcc_exc*) + __EH_FRAME_BEGIN__ = . ; + *(.eh_fram*) + __EH_FRAME_END__ = . ; + LONG(0); + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata.*) + *(.data) + edata = . ; _edata = . ; + bss = . ; + } + .bss : + { + *(.bss) + *(.note.gnu.build-id); + } + end = . ; _end = . ; + +} + + + diff --git a/contrib/media/updf/include/scripts/menuetos_dll.ld b/contrib/media/updf/include/scripts/menuetos_dll.ld new file mode 100644 index 0000000000..d8857f0a38 --- /dev/null +++ b/contrib/media/updf/include/scripts/menuetos_dll.ld @@ -0,0 +1,41 @@ +OUTPUT_FORMAT("coff-go32") +SECTIONS +{ + .text 0x000000 : + { + code = . ; + *(.text) + *(.fixup) + *(.gnu.warning) + *(.gnu.linkonce.t*) + *(.const) + *(.ro*) + *(.gnu.linkonce.r*) + ecode = . ; _ecode = . ; + } + .data : + { + djgpp_first_ctor = . ; + *(.ctor) + djgpp_last_ctor = . ; + djgpp_first_dtor = . ; + *(.dtor) + djgpp_last_dtor = . ; + *(.gcc_exc*) + __EH_FRAME_BEGIN__ = . ; + *(.eh_fram*) + __EH_FRAME_END__ = . ; + LONG(0); + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata.*) + *(.data) + edata = . ; _edata = . ; + bss = . ; + } + .bss : + { + *(.bss) + } + end = . ; _end = . ; +} diff --git a/contrib/media/updf/include/search.h b/contrib/media/updf/include/search.h new file mode 100644 index 0000000000..6f462e9104 --- /dev/null +++ b/contrib/media/updf/include/search.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_search_h_ +#define __dj_include_search_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +typedef struct qelem { + struct qelem *q_forw; + struct qelem *q_back; + char q_data[0]; +} qelem; + +void insque(struct qelem *_elem, struct qelem *_pred); +void remque(struct qelem *_elem); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_search_h_ */ diff --git a/contrib/media/updf/include/set b/contrib/media/updf/include/set new file mode 100644 index 0000000000..62d6718533 --- /dev/null +++ b/contrib/media/updf/include/set @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_SET +#include <bits/std_set.h> +#endif diff --git a/contrib/media/updf/include/setjmp.h b/contrib/media/updf/include/setjmp.h new file mode 100644 index 0000000000..906f504993 --- /dev/null +++ b/contrib/media/updf/include/setjmp.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_setjmp_h_ +#define __dj_include_setjmp_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +typedef struct __jmp_buf { + unsigned long __eax, __ebx, __ecx, __edx, __esi; + unsigned long __edi, __ebp, __esp, __eip, __eflags; + unsigned short __cs, __ds, __es, __fs, __gs, __ss; + unsigned long __sigmask; /* for POSIX signals only */ + unsigned long __signum; /* for expansion */ + unsigned long __exception_ptr; /* pointer to previous exception */ + unsigned char __fpu_state[108]; /* for future use */ +} jmp_buf[1]; + +void longjmp(jmp_buf env, int val); +int setjmp(jmp_buf env); + +#define _longjmp longjmp +#define _setjmp setjmp + +#ifndef __STRICT_ANSI__ + +typedef jmp_buf sigjmp_buf; + +int sigsetjmp(sigjmp_buf env, int savemask); +int siglongjmp(sigjmp_buf env, int val); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_setjmp_h_ */ diff --git a/contrib/media/updf/include/share.h b/contrib/media/updf/include/share.h new file mode 100644 index 0000000000..1084606937 --- /dev/null +++ b/contrib/media/updf/include/share.h @@ -0,0 +1,5 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* DO NOT USE THIS IN NEW CODE. It is here only + to allow old code to compile. */ + +#include <fcntl.h> diff --git a/contrib/media/updf/include/signal.h b/contrib/media/updf/include/signal.h new file mode 100644 index 0000000000..8339267cc7 --- /dev/null +++ b/contrib/media/updf/include/signal.h @@ -0,0 +1,22 @@ +/*---------------------------------------------------------------------------*/ +/* signal.h - signal header file */ +/*---------------------------------------------------------------------------*/ +#define SIGINT 1 +#define SIGILL 2 +#define SIGFPE 3 +#define SIGSEGV 4 +#define SIGTERM 5 +#define SIGBREAK 6 +#define SIGABRT 7 + +typedef void (* PFSIG)(int); + +#define SIG_DFL ((PFSIG)0) +#define SIG_IGN ((PFSIG)1) +#define SIG_ERR ((PFSIG)-1) + +/*---------------------------------------------------------------------------*/ +/* function prototypes */ +/*---------------------------------------------------------------------------*/ +int raise(int sig); +PFSIG signal(int, PFSIG); diff --git a/contrib/media/updf/include/sstream b/contrib/media/updf/include/sstream new file mode 100644 index 0000000000..095614f941 --- /dev/null +++ b/contrib/media/updf/include/sstream @@ -0,0 +1,6 @@ +#ifndef _SSTREAM_INCLUDED +#define _SSTREAM_INCLUDED +/*namespace std +{ +}*/ +#endif diff --git a/contrib/media/updf/include/stack b/contrib/media/updf/include/stack new file mode 100644 index 0000000000..793a003237 --- /dev/null +++ b/contrib/media/updf/include/stack @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STACK +#include <bits/std_stack.h> +#endif diff --git a/contrib/media/updf/include/standard.h b/contrib/media/updf/include/standard.h new file mode 100644 index 0000000000..d38a32a215 --- /dev/null +++ b/contrib/media/updf/include/standard.h @@ -0,0 +1,92 @@ + +#ifndef __standard_h__ +#define __standard_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lispenvironment.h" +#include "lisphash.h" +#include "lispatom.h" +#include "numbers.h" + +// Prototypes +class LispHashTable; + +LispBoolean InternalIsList(LispPtr& aPtr); +LispBoolean InternalIsString(LispString * aOriginal); +void InternalUnstringify(LispString& aResult, LispString * aOriginal); +void InternalStringify(LispString& aResult, LispString * aOriginal); +void InternalIntToAscii(LispChar * aTrg,LispInt aInt); +LispInt InternalAsciiToInt(LispString * aString); +LispBoolean IsNumber(const LispChar * ptr,LispBoolean aAllowFloat); + +void InternalNth(LispPtr& aResult, LispPtr& aArg, LispInt n); +void InternalTail(LispPtr& aResult, LispPtr& aArg); +void InternalAssociate(LispPtr& aResult, LispPtr& aKey, + LispPtr& aAssociationList); + +void InternalReverseList(LispPtr& aResult, LispPtr& aOriginal); +void InternalFlatCopy(LispPtr& aResult, LispPtr& aOriginal); +LispInt InternalListLength(LispPtr& aOriginal); + +LispBoolean InternalEquals(LispEnvironment& aEnvironment, + LispPtr& aExpression1, + LispPtr& aExpression2); + + +inline LispPtr& Argument(LispPtr& cur, LispInt n); + +inline void InternalTrue(LispEnvironment& aEnvironment, LispPtr& aResult); +inline void InternalFalse(LispEnvironment& aEnvironment, LispPtr& aResult); +inline void InternalBoolean(LispEnvironment& aEnvironment, LispPtr& aResult, + LispBoolean aValue); +inline LispBoolean IsTrue(LispEnvironment& aEnvironment, LispPtr& aExpression); +inline LispBoolean IsFalse(LispEnvironment& aEnvironment, LispPtr& aExpression); +inline void InternalNot(LispPtr& aResult, LispEnvironment& aEnvironment, LispPtr& aExpression); + +void DoInternalLoad(LispEnvironment& aEnvironment,LispInput* aInput); +void InternalLoad(LispEnvironment& aEnvironment,LispString * aFileName); +void InternalUse(LispEnvironment& aEnvironment,LispString * aFileName); +void InternalApplyString(LispEnvironment& aEnvironment, LispPtr& aResult, + LispString * aOperator,LispPtr& aArgs); +void InternalApplyPure(LispPtr& oper,LispPtr& args2,LispPtr& aResult,LispEnvironment& aEnvironment); + +void InternalEvalString(LispEnvironment& aEnvironment, LispPtr& aResult, + LispChar * aString); + +#define ATOML(_s) LispAtom::New(aEnvironment,_s) +#define LIST(_c) LispSubList::New(_c) +class LispObjectAdder : public YacasBase +{ +public: + LispObjectAdder(LispObject* aPtr) + : iPtr(aPtr) {}; + LispObject* iPtr; +}; +#define LA(_o) LispObjectAdder(_o) + +LispObject* operator+(const LispObjectAdder& left, const LispObjectAdder& right); + +#define PARSE(_r,_s) ParseExpression(_r,_s,aEnvironment) +void ParseExpression(LispPtr& aResult,LispChar * aString,LispEnvironment& aEnvironment); + +void ReturnUnEvaluated(LispPtr& aResult,LispPtr& aArguments, + LispEnvironment& aEnvironment); + +/** PrintExpression : print an expression into a string, + limiting it to a maximum number of characters. If aMaxChars + is less than zero, the result is not truncated. + */ +void PrintExpression(LispString& aResult, LispPtr& aExpression, + LispEnvironment& aEnvironment, + LispInt aMaxChars); + +LispString * SymbolName(LispEnvironment& aEnvironment,LispChar * aSymbol); + + + + +#include "standard.inl" + + +#endif diff --git a/contrib/media/updf/include/std.h b/contrib/media/updf/include/std.h new file mode 100644 index 0000000000..408dbb48d6 --- /dev/null +++ b/contrib/media/updf/include/std.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_std_h_ +#define __dj_include_std_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_std_h_ */ diff --git a/contrib/media/updf/include/std/algorithm b/contrib/media/updf/include/std/algorithm new file mode 100644 index 0000000000..06a553fddd --- /dev/null +++ b/contrib/media/updf/include/std/algorithm @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_ALGORITHM +#include <bits/std_algorithm.h> +#endif diff --git a/contrib/media/updf/include/std/bitset b/contrib/media/updf/include/std/bitset new file mode 100644 index 0000000000..9ce6c7962d --- /dev/null +++ b/contrib/media/updf/include/std/bitset @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_BITSET +#include <bits/std_bitset.h> +#endif diff --git a/contrib/media/updf/include/std/cassert b/contrib/media/updf/include/std/cassert new file mode 100644 index 0000000000..fe0b8b5b64 --- /dev/null +++ b/contrib/media/updf/include/std/cassert @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// This one should not have include guards. +#include <bits/std_cassert.h> + diff --git a/contrib/media/updf/include/std/cctype b/contrib/media/updf/include/std/cctype new file mode 100644 index 0000000000..868e4be335 --- /dev/null +++ b/contrib/media/updf/include/std/cctype @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CCTYPE +#include <bits/std_cctype.h> +#endif diff --git a/contrib/media/updf/include/std/cerrno b/contrib/media/updf/include/std/cerrno new file mode 100644 index 0000000000..b7bfe3a393 --- /dev/null +++ b/contrib/media/updf/include/std/cerrno @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CERRNO +#include <bits/std_cerrno.h> +#endif diff --git a/contrib/media/updf/include/std/cfloat b/contrib/media/updf/include/std/cfloat new file mode 100644 index 0000000000..d91824d38a --- /dev/null +++ b/contrib/media/updf/include/std/cfloat @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CFLOAT +#include <bits/std_cfloat.h> +#endif diff --git a/contrib/media/updf/include/std/ciso646 b/contrib/media/updf/include/std/ciso646 new file mode 100644 index 0000000000..f5dd444bd1 --- /dev/null +++ b/contrib/media/updf/include/std/ciso646 @@ -0,0 +1,28 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. diff --git a/contrib/media/updf/include/std/climits b/contrib/media/updf/include/std/climits new file mode 100644 index 0000000000..afadc6403d --- /dev/null +++ b/contrib/media/updf/include/std/climits @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CLIMITS +#include <bits/std_climits.h> +#endif diff --git a/contrib/media/updf/include/std/clocale b/contrib/media/updf/include/std/clocale new file mode 100644 index 0000000000..8a62dfa886 --- /dev/null +++ b/contrib/media/updf/include/std/clocale @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CLOCALE +#include <bits/std_clocale.h> +#endif diff --git a/contrib/media/updf/include/std/cmath b/contrib/media/updf/include/std/cmath new file mode 100644 index 0000000000..95da649724 --- /dev/null +++ b/contrib/media/updf/include/std/cmath @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CMATH +#include <bits/std_cmath.h> +#endif diff --git a/contrib/media/updf/include/std/complex b/contrib/media/updf/include/std/complex new file mode 100644 index 0000000000..dfc144ffdc --- /dev/null +++ b/contrib/media/updf/include/std/complex @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_COMPLEX +#include <bits/std_complex.h> +#endif diff --git a/contrib/media/updf/include/std/csetjmp b/contrib/media/updf/include/std/csetjmp new file mode 100644 index 0000000000..ce6fb32c95 --- /dev/null +++ b/contrib/media/updf/include/std/csetjmp @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSETJMP +#include <bits/std_csetjmp.h> +#endif diff --git a/contrib/media/updf/include/std/csignal b/contrib/media/updf/include/std/csignal new file mode 100644 index 0000000000..b3da42a9a7 --- /dev/null +++ b/contrib/media/updf/include/std/csignal @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSIGNAL +#include <bits/std_csignal.h> +#endif diff --git a/contrib/media/updf/include/std/cstdarg b/contrib/media/updf/include/std/cstdarg new file mode 100644 index 0000000000..36032b22c2 --- /dev/null +++ b/contrib/media/updf/include/std/cstdarg @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDARG +#include <bits/std_cstdarg.h> +#endif diff --git a/contrib/media/updf/include/std/cstddef b/contrib/media/updf/include/std/cstddef new file mode 100644 index 0000000000..086bb726b2 --- /dev/null +++ b/contrib/media/updf/include/std/cstddef @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDDEF +#include <bits/std_cstddef.h> +#endif diff --git a/contrib/media/updf/include/std/cstdio b/contrib/media/updf/include/std/cstdio new file mode 100644 index 0000000000..4d8aced1f8 --- /dev/null +++ b/contrib/media/updf/include/std/cstdio @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDIO +#include <bits/std_cstdio.h> +#endif diff --git a/contrib/media/updf/include/std/cstdlib b/contrib/media/updf/include/std/cstdlib new file mode 100644 index 0000000000..7796c6b325 --- /dev/null +++ b/contrib/media/updf/include/std/cstdlib @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTDLIB +#include <bits/std_cstdlib.h> +#endif diff --git a/contrib/media/updf/include/std/cstring b/contrib/media/updf/include/std/cstring new file mode 100644 index 0000000000..8d30ba8a9c --- /dev/null +++ b/contrib/media/updf/include/std/cstring @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CSTRING +#include <bits/std_cstring.h> +#endif diff --git a/contrib/media/updf/include/std/ctime b/contrib/media/updf/include/std/ctime new file mode 100644 index 0000000000..b19136e87a --- /dev/null +++ b/contrib/media/updf/include/std/ctime @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CTIME +#include <bits/std_ctime.h> +#endif diff --git a/contrib/media/updf/include/std/cwchar b/contrib/media/updf/include/std/cwchar new file mode 100644 index 0000000000..311b2e9e31 --- /dev/null +++ b/contrib/media/updf/include/std/cwchar @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CWCHAR +#include <bits/std_cwchar.h> +#endif diff --git a/contrib/media/updf/include/std/cwctype b/contrib/media/updf/include/std/cwctype new file mode 100644 index 0000000000..4cf2e7dfe7 --- /dev/null +++ b/contrib/media/updf/include/std/cwctype @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_CWCTYPE +#include <bits/std_cwctype.h> +#endif diff --git a/contrib/media/updf/include/std/deque b/contrib/media/updf/include/std/deque new file mode 100644 index 0000000000..c8ee81e9e6 --- /dev/null +++ b/contrib/media/updf/include/std/deque @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_DEQUE +#include <bits/std_deque.h> +#endif diff --git a/contrib/media/updf/include/std/fstream b/contrib/media/updf/include/std/fstream new file mode 100644 index 0000000000..1a68f5ab19 --- /dev/null +++ b/contrib/media/updf/include/std/fstream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_FSTREAM +#include <bits/std_fstream.h> +#endif diff --git a/contrib/media/updf/include/std/functional b/contrib/media/updf/include/std/functional new file mode 100644 index 0000000000..ea48352643 --- /dev/null +++ b/contrib/media/updf/include/std/functional @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_FUNCTIONAL +#include <bits/std_functional.h> +#endif diff --git a/contrib/media/updf/include/std/iomanip b/contrib/media/updf/include/std/iomanip new file mode 100644 index 0000000000..2aa00fa9de --- /dev/null +++ b/contrib/media/updf/include/std/iomanip @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOMANIP +#include <bits/std_iomanip.h> +#endif diff --git a/contrib/media/updf/include/std/ios b/contrib/media/updf/include/std/ios new file mode 100644 index 0000000000..ff398de068 --- /dev/null +++ b/contrib/media/updf/include/std/ios @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOS +#include <bits/std_ios.h> +#endif diff --git a/contrib/media/updf/include/std/iosfwd b/contrib/media/updf/include/std/iosfwd new file mode 100644 index 0000000000..3756982abe --- /dev/null +++ b/contrib/media/updf/include/std/iosfwd @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOSFWD +#include <bits/std_iosfwd.h> +#endif diff --git a/contrib/media/updf/include/std/iostream b/contrib/media/updf/include/std/iostream new file mode 100644 index 0000000000..a85fd08ca5 --- /dev/null +++ b/contrib/media/updf/include/std/iostream @@ -0,0 +1,34 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_IOSTREAM +#include <bits/std_iostream.h> +#endif + + diff --git a/contrib/media/updf/include/std/istream b/contrib/media/updf/include/std/istream new file mode 100644 index 0000000000..9c6bc55eb3 --- /dev/null +++ b/contrib/media/updf/include/std/istream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_ISTREAM +#include <bits/std_istream.h> +#endif diff --git a/contrib/media/updf/include/std/iterator b/contrib/media/updf/include/std/iterator new file mode 100644 index 0000000000..2560439638 --- /dev/null +++ b/contrib/media/updf/include/std/iterator @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_ITERATOR +#include <bits/std_iterator.h> +#endif diff --git a/contrib/media/updf/include/std/limits b/contrib/media/updf/include/std/limits new file mode 100644 index 0000000000..8a52c9cfb8 --- /dev/null +++ b/contrib/media/updf/include/std/limits @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_LIMITS +#include <bits/std_limits.h> +#endif diff --git a/contrib/media/updf/include/std/list b/contrib/media/updf/include/std/list new file mode 100644 index 0000000000..a32e18d127 --- /dev/null +++ b/contrib/media/updf/include/std/list @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_LIST +#include <bits/std_list.h> +#endif diff --git a/contrib/media/updf/include/std/locale b/contrib/media/updf/include/std/locale new file mode 100644 index 0000000000..56c416d8c5 --- /dev/null +++ b/contrib/media/updf/include/std/locale @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_LOCALE +#include <bits/std_locale.h> +#endif diff --git a/contrib/media/updf/include/std/map b/contrib/media/updf/include/std/map new file mode 100644 index 0000000000..06c638d544 --- /dev/null +++ b/contrib/media/updf/include/std/map @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_MAP +#include <bits/std_map.h> +#endif diff --git a/contrib/media/updf/include/std/memory b/contrib/media/updf/include/std/memory new file mode 100644 index 0000000000..ca98df6dad --- /dev/null +++ b/contrib/media/updf/include/std/memory @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_MEMORY +#include <bits/std_memory.h> +#endif diff --git a/contrib/media/updf/include/std/numeric b/contrib/media/updf/include/std/numeric new file mode 100644 index 0000000000..32ba67d1a0 --- /dev/null +++ b/contrib/media/updf/include/std/numeric @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_NUMERIC +#include <bits/std_numeric.h> +#endif diff --git a/contrib/media/updf/include/std/ostream b/contrib/media/updf/include/std/ostream new file mode 100644 index 0000000000..4564be746a --- /dev/null +++ b/contrib/media/updf/include/std/ostream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_OSTREAM +#include <bits/std_ostream.h> +#endif diff --git a/contrib/media/updf/include/std/queue b/contrib/media/updf/include/std/queue new file mode 100644 index 0000000000..c4464bf9b8 --- /dev/null +++ b/contrib/media/updf/include/std/queue @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_QUEUE +#include <bits/std_queue.h> +#endif diff --git a/contrib/media/updf/include/std/set b/contrib/media/updf/include/std/set new file mode 100644 index 0000000000..62d6718533 --- /dev/null +++ b/contrib/media/updf/include/std/set @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_SET +#include <bits/std_set.h> +#endif diff --git a/contrib/media/updf/include/std/sstream b/contrib/media/updf/include/std/sstream new file mode 100644 index 0000000000..1a393ed67e --- /dev/null +++ b/contrib/media/updf/include/std/sstream @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_SSTREAM +#include <bits/std_sstream.h> +#endif diff --git a/contrib/media/updf/include/std/stack b/contrib/media/updf/include/std/stack new file mode 100644 index 0000000000..793a003237 --- /dev/null +++ b/contrib/media/updf/include/std/stack @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STACK +#include <bits/std_stack.h> +#endif diff --git a/contrib/media/updf/include/std/stdexcept b/contrib/media/updf/include/std/stdexcept new file mode 100644 index 0000000000..d9e93f2ef9 --- /dev/null +++ b/contrib/media/updf/include/std/stdexcept @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STDEXCEPT +#include <bits/std_stdexcept.h> +#endif diff --git a/contrib/media/updf/include/std/streambuf b/contrib/media/updf/include/std/streambuf new file mode 100644 index 0000000000..ec6c7b57e1 --- /dev/null +++ b/contrib/media/updf/include/std/streambuf @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STREAMBUF +#include <bits/std_streambuf.h> +#endif diff --git a/contrib/media/updf/include/std/string b/contrib/media/updf/include/std/string new file mode 100644 index 0000000000..a766cddc81 --- /dev/null +++ b/contrib/media/updf/include/std/string @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STRING +#include <bits/std_string.h> +#endif diff --git a/contrib/media/updf/include/std/utility b/contrib/media/updf/include/std/utility new file mode 100644 index 0000000000..787e799734 --- /dev/null +++ b/contrib/media/updf/include/std/utility @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_UTILITY +#include <bits/std_utility.h> +#endif diff --git a/contrib/media/updf/include/std/valarray b/contrib/media/updf/include/std/valarray new file mode 100644 index 0000000000..cb13d82f69 --- /dev/null +++ b/contrib/media/updf/include/std/valarray @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_VALARRAY +#include <bits/std_valarray.h> +#endif diff --git a/contrib/media/updf/include/std/vector b/contrib/media/updf/include/std/vector new file mode 100644 index 0000000000..ce2f51e7b2 --- /dev/null +++ b/contrib/media/updf/include/std/vector @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_VECTOR +#include <bits/std_vector.h> +#endif diff --git a/contrib/media/updf/include/stdarg.h b/contrib/media/updf/include/stdarg.h new file mode 100644 index 0000000000..713c6f5ae1 --- /dev/null +++ b/contrib/media/updf/include/stdarg.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_stdarg_h_ +#define __dj_include_stdarg_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifdef __dj_include_varargs_h_ +#error stdarg.h and varargs.h are mutually exclusive +#endif + +#include <sys/djtypes.h> + +__DJ_va_list +#undef __DJ_va_list +#define __DJ_va_list + +#define __dj_va_rounded_size(T) \ + (((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + +#define va_arg(ap, T) \ + (ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \ + *((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T)))) + +#define va_end(ap) + +#ifdef __GNUC__ +#define va_start(ap, last_arg) \ + (ap = ((va_list) __builtin_next_arg (last_arg))) +#else +#define va_start(ap, last_arg) \ + (ap = (va_list) ((char*) &(last_arg) + __dj_va_rounded_size (last_arg))) +#endif + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_stdarg_h_ */ diff --git a/contrib/media/updf/include/stdbool.h b/contrib/media/updf/include/stdbool.h new file mode 100644 index 0000000000..7dc5a6613f --- /dev/null +++ b/contrib/media/updf/include/stdbool.h @@ -0,0 +1,13 @@ +#ifndef _STDBOOL_H +#define _STDBOOL_H + +/* believe it or not but the Single Unix Specification actually + * specifies this header, see + * http://www.opengroup.org/onlinepubs/007904975/basedefs/stdbool.h.html */ + +#define bool int +#define true 1 +#define false 0 +#define __bool_true_false_are_defined 1 + +#endif diff --git a/contrib/media/updf/include/stdcommandline.h b/contrib/media/updf/include/stdcommandline.h new file mode 100644 index 0000000000..f89d494554 --- /dev/null +++ b/contrib/media/updf/include/stdcommandline.h @@ -0,0 +1,36 @@ + +#ifndef __stdcommandline_h__ +#define __stdcommandline_h__ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <signal.h> +#ifndef WIN32 +# include <unistd.h> +# include <termios.h> +#endif +#include <time.h> + +#include "yacasbase.h" +#include "commandline.h" +/** Simple no-frills implementation of CCommandLine, using stdlibc-functions + * only, and no ansi characters. No history is supported either. + */ +class CStdCommandLine : public CCommandLine +{ +public: + CStdCommandLine(); + ~CStdCommandLine(); + virtual void ReadLine(LispChar * prompt); +public: + virtual LispInt GetKey(); + virtual void NewLine(); + virtual void ShowLine(LispChar * prompt,LispInt promptlen,LispInt cursor); + virtual void Pause(); +}; + + +#endif + diff --git a/contrib/media/updf/include/stddef.h b/contrib/media/updf/include/stddef.h new file mode 100644 index 0000000000..1be2fea73e --- /dev/null +++ b/contrib/media/updf/include/stddef.h @@ -0,0 +1,39 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_stddef_h_ +#define __dj_include_stddef_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <sys/djtypes.h> + +#define NULL 0 +#define offsetof(s_type, mbr) ((size_t) &((s_type *)0)->mbr) +typedef int ptrdiff_t; + +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t +__DJ_wchar_t +#undef __DJ_wchar_t +#define __DJ_wchar_t + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_stddef_h_ */ diff --git a/contrib/media/updf/include/stdexcept b/contrib/media/updf/include/stdexcept new file mode 100644 index 0000000000..d9e93f2ef9 --- /dev/null +++ b/contrib/media/updf/include/stdexcept @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STDEXCEPT +#include <bits/std_stdexcept.h> +#endif diff --git a/contrib/media/updf/include/stdfileio.h b/contrib/media/updf/include/stdfileio.h new file mode 100644 index 0000000000..09cfe34948 --- /dev/null +++ b/contrib/media/updf/include/stdfileio.h @@ -0,0 +1,18 @@ +/** \file stdfileioio.h + * definitions of input output classes that read and write from file. + */ + + +#ifndef __stdfileio_h__ +#define __stdfileio_h__ + +#include "yacasbase.h" +#include "lispio.h" +#include "lispenvironment.h" + + +#include "platfileio.h" + + +#endif + diff --git a/contrib/media/updf/include/stdint.h b/contrib/media/updf/include/stdint.h new file mode 100644 index 0000000000..c54b733b0d --- /dev/null +++ b/contrib/media/updf/include/stdint.h @@ -0,0 +1,312 @@ +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* + * ISO C99: 7.18 Integer types <stdint.h> + */ + +#ifndef _STDINT_H +#define _STDINT_H 1 + +#include <features.h> +#include <bits/wchar.h> +#include <bits/wordsize.h> + +/* Exact integral types. */ + +/* Signed. */ + +/* There is some amount of overlap with <sys/types.h> as known by inet code */ +#ifndef __int8_t_defined +#define __int8_t_defined +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; +# if __WORDSIZE == 64 +typedef long int int64_t; +# else +typedef long long int int64_t; +# endif +#endif + +/* Unsigned. */ +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +#ifndef __uint32_t_defined +typedef unsigned int uint32_t; +# define __uint32_t_defined +#endif +#if __WORDSIZE == 64 +typedef unsigned long int uint64_t; +#else +typedef unsigned long long int uint64_t; +#endif + + +/* Small types. */ + +/* Signed. */ +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; +#if __WORDSIZE == 64 +typedef long int int_least64_t; +#else +typedef long long int int_least64_t; +#endif + +/* Unsigned. */ +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; +#if __WORDSIZE == 64 +typedef unsigned long int uint_least64_t; +#else +typedef unsigned long long int uint_least64_t; +#endif + + +/* Fast types. */ + +/* Signed. */ +typedef signed char int_fast8_t; +#if __WORDSIZE == 64 +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +#else +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef long long int int_fast64_t; +#endif + +/* Unsigned. */ +typedef unsigned char uint_fast8_t; +#if __WORDSIZE == 64 +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +#else +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +typedef unsigned long long int uint_fast64_t; +#endif + + +/* Types for `void *' pointers. */ +#if __WORDSIZE == 64 +# ifndef __intptr_t_defined +typedef long int intptr_t; +# define __intptr_t_defined +# endif +typedef unsigned long int uintptr_t; +#else +# ifndef __intptr_t_defined +typedef int intptr_t; +# define __intptr_t_defined +# endif +typedef unsigned int uintptr_t; +#endif + + +/* Largest integral types. */ +#if __WORDSIZE == 64 +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +#else +typedef long long int intmax_t; +typedef unsigned long long int uintmax_t; +#endif + + +/* The ISO C99 standard specifies that in C++ implementations these + macros should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_LIMIT_MACROS + +# if __WORDSIZE == 64 +# define __INT64_C(c) c ## L +# define __UINT64_C(c) c ## UL +# else +# define __INT64_C(c) c ## LL +# define __UINT64_C(c) c ## ULL +# endif + +/* Limits of integral types. */ + +/* Minimum of signed integral types. */ +# define INT8_MIN (-128) +# define INT16_MIN (-32767-1) +# define INT32_MIN (-2147483647-1) +# define INT64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of signed integral types. */ +# define INT8_MAX (127) +# define INT16_MAX (32767) +# define INT32_MAX (2147483647) +# define INT64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of unsigned integral types. */ +# define UINT8_MAX (255) +# define UINT16_MAX (65535) +# define UINT32_MAX (4294967295U) +# define UINT64_MAX (__UINT64_C(18446744073709551615)) + + +/* Minimum of signed integral types having a minimum size. */ +# define INT_LEAST8_MIN (-128) +# define INT_LEAST16_MIN (-32767-1) +# define INT_LEAST32_MIN (-2147483647-1) +# define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of signed integral types having a minimum size. */ +# define INT_LEAST8_MAX (127) +# define INT_LEAST16_MAX (32767) +# define INT_LEAST32_MAX (2147483647) +# define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of unsigned integral types having a minimum size. */ +# define UINT_LEAST8_MAX (255) +# define UINT_LEAST16_MAX (65535) +# define UINT_LEAST32_MAX (4294967295U) +# define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) + + +/* Minimum of fast signed integral types having a minimum size. */ +# define INT_FAST8_MIN (-128) +# if __WORDSIZE == 64 +# define INT_FAST16_MIN (-9223372036854775807L-1) +# define INT_FAST32_MIN (-9223372036854775807L-1) +# else +# define INT_FAST16_MIN (-2147483647-1) +# define INT_FAST32_MIN (-2147483647-1) +# endif +# define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of fast signed integral types having a minimum size. */ +# define INT_FAST8_MAX (127) +# if __WORDSIZE == 64 +# define INT_FAST16_MAX (9223372036854775807L) +# define INT_FAST32_MAX (9223372036854775807L) +# else +# define INT_FAST16_MAX (2147483647) +# define INT_FAST32_MAX (2147483647) +# endif +# define INT_FAST64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of fast unsigned integral types having a minimum size. */ +# define UINT_FAST8_MAX (255) +# if __WORDSIZE == 64 +# define UINT_FAST16_MAX (18446744073709551615UL) +# define UINT_FAST32_MAX (18446744073709551615UL) +# else +# define UINT_FAST16_MAX (4294967295U) +# define UINT_FAST32_MAX (4294967295U) +# endif +# define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) + + +/* Values to test for integral types holding `void *' pointer. */ +# if __WORDSIZE == 64 +# define INTPTR_MIN (-9223372036854775807L-1) +# define INTPTR_MAX (9223372036854775807L) +# define UINTPTR_MAX (18446744073709551615UL) +# else +# define INTPTR_MIN (-2147483647-1) +# define INTPTR_MAX (2147483647) +# define UINTPTR_MAX (4294967295U) +# endif + + +/* Minimum for largest signed integral type. */ +# define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum for largest signed integral type. */ +# define INTMAX_MAX (__INT64_C(9223372036854775807)) + +/* Maximum for largest unsigned integral type. */ +# define UINTMAX_MAX (__UINT64_C(18446744073709551615)) + + +/* Limits of other integer types. */ + +/* Limits of `ptrdiff_t' type. */ +# if __WORDSIZE == 64 +# define PTRDIFF_MIN (-9223372036854775807L-1) +# define PTRDIFF_MAX (9223372036854775807L) +# else +# define PTRDIFF_MIN (-2147483647-1) +# define PTRDIFF_MAX (2147483647) +# endif + +/* Limits of `sig_atomic_t'. */ +# define SIG_ATOMIC_MIN (-2147483647-1) +# define SIG_ATOMIC_MAX (2147483647) + +/* Limit of `size_t' type. */ +# if __WORDSIZE == 64 +# define SIZE_MAX (18446744073709551615UL) +# else +# define SIZE_MAX (4294967295U) +# endif + +/* Limits of `wchar_t'. */ +# ifndef WCHAR_MIN +/* These constants might also be defined in <wchar.h>. */ +# define WCHAR_MIN __WCHAR_MIN +# define WCHAR_MAX __WCHAR_MAX +# endif + +/* Limits of `wint_t'. */ +# define WINT_MIN (0u) +# define WINT_MAX (4294967295u) + +#endif /* C++ && limit macros */ + + +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS + +/* Signed. */ +# define INT8_C(c) c +# define INT16_C(c) c +# define INT32_C(c) c +# if __WORDSIZE == 64 +# define INT64_C(c) c ## L +# else +# define INT64_C(c) c ## LL +# endif + +/* Unsigned. */ +# define UINT8_C(c) c ## U +# define UINT16_C(c) c ## U +# define UINT32_C(c) c ## U +# if __WORDSIZE == 64 +# define UINT64_C(c) c ## UL +# else +# define UINT64_C(c) c ## ULL +# endif + +/* Maximal type. */ +# if __WORDSIZE == 64 +# define INTMAX_C(c) c ## L +# define UINTMAX_C(c) c ## UL +# else +# define INTMAX_C(c) c ## LL +# define UINTMAX_C(c) c ## ULL +# endif + +#endif /* C++ && constant macros */ + +#endif /* stdint.h */ diff --git a/contrib/media/updf/include/stdio.h b/contrib/media/updf/include/stdio.h new file mode 100644 index 0000000000..b2b40e0148 --- /dev/null +++ b/contrib/media/updf/include/stdio.h @@ -0,0 +1,164 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#ifndef __dj_include_stdio_h_ +#define __dj_include_stdio_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> + +#include<stdarg.h> + +typedef struct __FILE FILE; + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + + +#include <sys/version.h> +#include <sys/djtypes.h> +#include <dos.h> + +#define _IOFBF 00001 +#define _IONBF 00002 +#define _IOLBF 00004 + +/* Some programs think they know better... */ +#undef NULL + +#define BUFSIZ 16384 +#define EOF (-1) +#define FILENAME_MAX 260 +#define FOPEN_MAX 20 +#define L_tmpnam 260 +#define NULL 0 +#define TMP_MAX 999999 + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +__DJ_va_list +#undef __DJ_va_list +#define __DJ_va_list +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t + +/* Note that the definitions of these fields are NOT guaranteed! They + may change with any release without notice! The fact that they + are here at all is to comply with ANSI specifictions. */ + +#include<bits/stdio.h> + +struct __FILE { + int _cnt; + char *_ptr; + char *_base; + int _bufsiz; + int _flag; + int _file; + char *_name_to_remove; + int _fillsize; + struct file_stream_ops * std_ops; +}; + +typedef unsigned long fpos_t; + +extern FILE __dj_stdin, __dj_stdout, __dj_stderr; +#define stdin (&__dj_stdin) +#define stdout (&__dj_stdout) +#define stderr (&__dj_stderr) + +void clearerr(FILE *_stream); +int fclose(FILE *_stream); +int feof(FILE *_stream); +int ferror(FILE *_stream); +int fflush(FILE *_stream); +int fgetc(FILE *_stream); +int fgetpos(FILE *_stream, fpos_t *_pos); +char * fgets(char *_s, int _n, FILE *_stream); +FILE * fopen(const char *_filename, const char *_mode); +int fprintf(FILE *_stream, const char *_format, ...); +int fputc(int _c, FILE *_stream); +int fputs(const char *_s, FILE *_stream); +size_t fread(void *_ptr, size_t _size, size_t _nelem, FILE *_stream); +FILE * freopen(const char *_filename, const char *_mode, FILE *_stream); +int fscanf(FILE *_stream, const char *_format, ...); +int fseek(FILE *_stream, long _offset, int _mode); +int fsetpos(FILE *_stream, const fpos_t *_pos); +long ftell(FILE *_stream); +size_t fwrite(const void *_ptr, size_t _size, size_t _nelem, FILE *_stream); +int getc(FILE *_stream); +int getchar(void); +//char * gets(char *_s); +void perror(const char *_s); +//int printf(const char *_format, ...); +int putc(int _c, FILE *_stream); +int putchar(int _c); +int puts(const char *_s); +int remove(const char *_filename); +int rename(const char *_old, const char *_new); +void rewind(FILE *_stream); +int scanf(const char *_format, ...); +void setbuf(FILE *_stream, char *_buf); +int setvbuf(FILE *_stream, char *_buf, int _mode, size_t _size); +int sprintf(char *_s, const char *_format, ...); +int sscanf(const char *_s, const char *_format, ...); +FILE * tmpfile(void); +char * tmpnam(char *_s); +int ungetc(int _c, FILE *_stream); +int vfprintf(FILE *_stream, const char *_format, va_list _ap); +int vprintf(const char *_format, va_list _ap); +int vsprintf(char *_s, const char *_format, va_list _ap); + +#ifndef __STRICT_ANSI__ + +#define L_ctermid +#define L_cusrid +/* #define STREAM_MAX 20 - DOS can change this */ + +int fileno(FILE *_stream); +FILE * fdopen(int _fildes, const char *_type); +int pclose(FILE *_pf); +FILE * popen(const char *_command, const char *_mode); + +#ifndef _POSIX_SOURCE + +extern FILE __dj_stdprn, __dj_stdaux; +#define stdprn (&__dj_stdprn) +#define stdaux (&__dj_stdaux) + +#define P_tmpdir "c:/" + +void _djstat_describe_lossage(FILE *_to_where); +int _doprnt(const char *_fmt, va_list _args, FILE *_f); +int _doscan(FILE *_f, const char *_fmt, va_list _argp); +int _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE *), const char *_fmt, va_list _argp); +int fpurge(FILE *_f); +int getw(FILE *_f); +int mkstemp(char *_template); +char * mktemp(char *_template); +int putw(int _v, FILE *_f); +void setbuffer(FILE *_f, void *_buf, int _size); +void setlinebuf(FILE *_f); +char * tempnam(const char *_dir, const char *_prefix); +int _rename(const char *_old, const char *_new); /* Simple (no directory) */ +int vfscanf(FILE *_stream, const char *_format, va_list _ap); +int vscanf(const char *_format, va_list _ap); +int vsscanf(const char *_s, const char *_format, va_list _ap); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_stdio_h_ */ diff --git a/contrib/media/updf/include/stdio_.h b/contrib/media/updf/include/stdio_.h new file mode 100644 index 0000000000..e8c1f81ff2 --- /dev/null +++ b/contrib/media/updf/include/stdio_.h @@ -0,0 +1,161 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#ifndef __dj_include_stdio_h_ +#define __dj_include_stdio_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include<menuet/os.h> +typedef struct __FILE FILE; + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + + +#include <sys/version.h> +#include <sys/djtypes.h> +#include <dos.h> + +#define _IOFBF 00001 +#define _IONBF 00002 +#define _IOLBF 00004 + +/* Some programs think they know better... */ +#undef NULL + +#define BUFSIZ 16384 +#define EOF (-1) +#define FILENAME_MAX 260 +#define FOPEN_MAX 20 +#define L_tmpnam 260 +#define NULL 0 +#define TMP_MAX 999999 + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +__DJ_va_list +#undef __DJ_va_list +#define __DJ_va_list +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t + +/* Note that the definitions of these fields are NOT guaranteed! They + may change with any release without notice! The fact that they + are here at all is to comply with ANSI specifictions. */ + +#include<bits/stdio.h> + +struct __FILE { + int _cnt; + char *_ptr; + char *_base; + int _bufsiz; + int _flag; + int _file; + char *_name_to_remove; + int _fillsize; + struct file_stream_ops * std_ops; +}; + +typedef unsigned long fpos_t; + +extern FILE __dj_stdin, __dj_stdout, __dj_stderr; +#define stdin (&__dj_stdin) +#define stdout (&__dj_stdout) +#define stderr (&__dj_stderr) + +void clearerr(FILE *_stream); +int fclose(FILE *_stream); +int feof(FILE *_stream); +int ferror(FILE *_stream); +int fflush(FILE *_stream); +int fgetc(FILE *_stream); +int fgetpos(FILE *_stream, fpos_t *_pos); +char * fgets(char *_s, int _n, FILE *_stream); +FILE * fopen(const char *_filename, const char *_mode); +int fprintf(FILE *_stream, const char *_format, ...); +int fputc(int _c, FILE *_stream); +int fputs(const char *_s, FILE *_stream); +size_t fread(void *_ptr, size_t _size, size_t _nelem, FILE *_stream); +FILE * freopen(const char *_filename, const char *_mode, FILE *_stream); +int fscanf(FILE *_stream, const char *_format, ...); +int fseek(FILE *_stream, long _offset, int _mode); +int fsetpos(FILE *_stream, const fpos_t *_pos); +long ftell(FILE *_stream); +size_t fwrite(const void *_ptr, size_t _size, size_t _nelem, FILE *_stream); +int getc(FILE *_stream); +int getchar(void); +char * gets(char *_s); +void perror(const char *_s); +int printf(const char *_format, ...); +int putc(int _c, FILE *_stream); +int putchar(int _c); +int puts(const char *_s); +int remove(const char *_filename); +int rename(const char *_old, const char *_new); +void rewind(FILE *_stream); +int scanf(const char *_format, ...); +void setbuf(FILE *_stream, char *_buf); +int setvbuf(FILE *_stream, char *_buf, int _mode, size_t _size); +int sprintf(char *_s, const char *_format, ...); +int sscanf(const char *_s, const char *_format, ...); +FILE * tmpfile(void); +char * tmpnam(char *_s); +int ungetc(int _c, FILE *_stream); +int vfprintf(FILE *_stream, const char *_format, va_list _ap); +int vprintf(const char *_format, va_list _ap); +int vsprintf(char *_s, const char *_format, va_list _ap); + +#ifndef __STRICT_ANSI__ + +#define L_ctermid +#define L_cusrid +/* #define STREAM_MAX 20 - DOS can change this */ + +int fileno(FILE *_stream); +FILE * fdopen(int _fildes, const char *_type); +int pclose(FILE *_pf); +FILE * popen(const char *_command, const char *_mode); + +#ifndef _POSIX_SOURCE + +extern FILE __dj_stdprn, __dj_stdaux; +#define stdprn (&__dj_stdprn) +#define stdaux (&__dj_stdaux) + +#define P_tmpdir "c:/" + +void _djstat_describe_lossage(FILE *_to_where); +int _doprnt(const char *_fmt, va_list _args, FILE *_f); +int _doscan(FILE *_f, const char *_fmt, va_list _argp); +int _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE *), const char *_fmt, va_list _argp); +int fpurge(FILE *_f); +int getw(FILE *_f); +int mkstemp(char *_template); +char * mktemp(char *_template); +int putw(int _v, FILE *_f); +void setbuffer(FILE *_f, void *_buf, int _size); +void setlinebuf(FILE *_f); +char * tempnam(const char *_dir, const char *_prefix); +int _rename(const char *_old, const char *_new); /* Simple (no directory) */ +int vfscanf(FILE *_stream, const char *_format, va_list _ap); +int vscanf(const char *_format, va_list _ap); +int vsscanf(const char *_s, const char *_format, va_list _ap); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_stdio_h_ */ diff --git a/contrib/media/updf/include/stdlib.h b/contrib/media/updf/include/stdlib.h new file mode 100644 index 0000000000..75b85eebe8 --- /dev/null +++ b/contrib/media/updf/include/stdlib.h @@ -0,0 +1,154 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_stdlib_h_ +#define __dj_include_stdlib_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#include <sys/djtypes.h> +#include <dos.h> + +/* Some programs think they know better... */ +#undef NULL + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define MB_CUR_MAX __dj_mb_cur_max +#define NULL 0 +#define RAND_MAX 2147483647 + +extern int __dj_mb_cur_max; + +typedef struct { + int quot; + int rem; +} div_t; + +typedef struct { + long quot; + long rem; +} ldiv_t; + +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t +__DJ_wchar_t +#undef __DJ_wchar_t +#define __DJ_wchar_t + +void abort(void) __attribute__((noreturn)); +int abs(int _i); +int atexit(void (*_func)(void)); +double atof(const char *_s); +int atoi(const char *_s); +long atol(const char *_s); +void * bsearch(const void *_key, const void *_base, size_t _nelem, + size_t _size, int (*_cmp)(const void *_ck, const void *_ce)); +void * calloc(size_t _nelem, size_t _size); +div_t div(int _numer, int _denom); +void exit(int _status) __attribute__((noreturn)); +void free(void *_ptr); +char * getenv(const char *_name); +long labs(long _i); +ldiv_t ldiv(long _numer, long _denom); +void * malloc(size_t _size); +int mblen(const char *_s, size_t _n); +size_t mbstowcs(wchar_t *_wcs, const char *_s, size_t _n); +int mbtowc(wchar_t *_pwc, const char *_s, size_t _n); +void qsort(void *_base, size_t _nelem, size_t _size, + int (*_cmp)(const void *_e1, const void *_e2)); +int rand(void); +void * realloc(void *_ptr, size_t _size); +void srand(unsigned _seed); +double strtod(const char *_s, char **_endptr); +long strtol(const char *_s, char **_endptr, int _base); +unsigned long strtoul(const char *_s, char **_endptr, int _base); +int system(const char *_s); +size_t wcstombs(char *_s, const wchar_t *_wcs, size_t _n); +int wctomb(char *_s, wchar_t _wchar); + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +typedef struct { + long long quot; + long long rem; +} lldiv_t; + +void * alloca(size_t _size); +long double _atold(const char *_s); +long long atoll(const char *_s); +void cfree(void *_ptr); +double drand48(void); +char * ecvtbuf(double _val, int _nd, int *_dp, int *_sn, char *_bf); +char * ecvt(double _val, int _nd, int *_dp, int *_sn); +double erand48(unsigned short state[3]); +char * fcvtbuf(double _val, int _nd, int *_dp, int *_sn, char *_bf); +char * fcvt(double _val, int _nd, int *_dp, int *_sn); +char * gcvt(double _val, int _nd, char *_buf); +char * getpass(const char *_prompt); +int getlongpass(const char *_prompt, char *_buffer, int _max_len); +char * itoa(int value, char *buffer, int radix); +long jrand48(unsigned short state[3]); +long long llabs(long long _i); +lldiv_t lldiv(long long _numer, long long _denom); +void lcong48(unsigned short param[7]); +unsigned long lrand48(void); +long mrand48(void); +unsigned long nrand48(unsigned short state[3]); +int putenv(const char *_val); +unsigned short *seed48(unsigned short state_seed[3]); +int setenv(const char *_var, const char *_val, int _replace); +void srand48(long seedval); +int stackavail(void); +long double _strtold(const char *_s, char **_endptr); +long long strtoll(const char *_s, char **_endptr, int _base); +unsigned long long strtoull(const char *_s, char **_endptr, int _base); +void swab(const void *from, void *to, int nbytes); + +#ifndef alloca +#define alloca __builtin_alloca +#endif + +/* BSD Random Number Generator */ +char * initstate (unsigned _seed, char *_arg_state, int _n); +char * setstate(char *_arg_state); +long random(void); +int srandom(int _seed); + +/* These vary in expected prototype, so we just don't prototype them. +void xfree(void *_ptr); +void * xmalloc(size_t _size); +void * xrealloc(void *ptr, size_t _size); +*/ + +#define __system_redirect 0x0001 /* redirect internally */ +#define __system_call_cmdproc 0x0002 /* always call COMMAND/$SHELL */ +#define __system_use_shell 0x0004 /* use $SHELL if set */ +#define __system_allow_multiple_cmds 0x0008 /* allow `cmd1; cmd2; ...' */ +#define __system_allow_long_cmds 0x0010 /* handle commands > 126 chars */ +#define __system_emulate_command 0x0020 /* try to emulate the shell */ +#define __system_handle_null_commands 0x1000 /* ignore cmds with no effect */ +#define __system_ignore_chdir 0x2000 /* make `cd' be a null command */ +#define __system_emulate_chdir 0x4000 /* handle `cd' internally */ + +extern int __system_flags; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_stdlib_h_ */ diff --git a/contrib/media/updf/include/streambuf b/contrib/media/updf/include/streambuf new file mode 100644 index 0000000000..ec6c7b57e1 --- /dev/null +++ b/contrib/media/updf/include/streambuf @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_STREAMBUF +#include <bits/std_streambuf.h> +#endif diff --git a/contrib/media/updf/include/string b/contrib/media/updf/include/string new file mode 100644 index 0000000000..05c9596149 --- /dev/null +++ b/contrib/media/updf/include/string @@ -0,0 +1,253 @@ +#ifndef _STRING_INCLUDED +#define _STRING_INCLUDED +#include <stdlib.h> +#include <string.h> +namespace std +{ + class string + { + char* data; + public: + string() {data=(char*)malloc(1);data[0]=0;} + string(const char* a) + { + int len=strlen(a)+1; + data=(char*)malloc(len); + memcpy(data,a,len); + } + string(char c) + { + data=(char*)malloc(2); + data[0]=c;data[1]=0; + } + string(const string& s) + { + unsigned sz = s.size()+1; + data=(char*)malloc(sz); + memcpy(data,s.c_str(),sz); + } + ~string() {free(data);} + string& operator=(const char* s) + {free(data);unsigned len=strlen(s)+1;data=(char*)malloc(len); + memcpy(data,s,len);return *this;} + string& operator=(const string& s) + {free(data);unsigned len=s.size()+1;data=(char*)malloc(len); + memcpy(data,s.c_str(),len);return *this;} + const char* c_str() const {return data;} + char& operator[](unsigned pos) {return data[pos];} + char operator[](unsigned pos) const {return data[pos];} + unsigned size() const {return strlen(data);} + unsigned length() const {return size();} + bool operator==(const char* str2) const {return !strcmp(data,str2);} + bool operator==(const string& str2) const {return !strcmp(data,str2.data);} + int compare(const char* str2) {return strcmp(data,str2);} + bool operator!=(const char* str2) const {return (bool)strcmp(data,str2);} + string& replace(unsigned p0,unsigned n0,const string& str) + { + unsigned sz = str.size(); + char* newdata=(char*)malloc(size()+1+sz-n0); + memcpy(newdata,data,p0); + memcpy(newdata+p0,str.c_str(),sz); + memcpy(newdata+p0+sz,data+p0+n0,size()+1-p0-n0); + free(data); + data=newdata; + return *this; + } + string& insert(size_t posl,const string& str) + { return replace(posl,0,str); } + string& operator+=(char c) + { + unsigned sz=size(); + data=(char*)realloc(data,sz+2); + data[sz]=c;data[sz+1]=0; + return *this; + } + string& operator+=(const string& s) + { + unsigned mysz=size(); + unsigned ssz=s.size(); + data=(char*)realloc(data,mysz+1+ssz); + memcpy(data+mysz,s.c_str(),ssz+1); + return *this; + } +// friend string operator+(const string& s1, const char* s2); +// friend string operator+(const char* s1, const string& s2); + string& assign(const string& str, unsigned pos, unsigned n) + { + unsigned len=strlen(str.data); + if (pos>len) + pos=len; + if (n>len||pos+n>len) + n=len-pos; + char* d=(char*)malloc(n+1); + memcpy(d,str.c_str()+pos,n); + d[n]=0; + free(data); + data=d; + return *this; + } + string& assign(const char* s) + { + free(data); + unsigned sz=strlen(s)+1; + data=(char*)malloc(sz); + memcpy(data,s,sz); + return *this; + } + string& assign(const string& str) + { return assign(str.data); } + size_t find_first_of(const char* str, size_t pos=0) const + { + const char* p = data; + while (pos) + { + if (!*p) + return npos; + p++; + pos--; + } + while (*p) + { + if (strchr(str,*p)) + return p-data; + p++; + } + return npos; + } + size_t find_first_of(const string& str, size_t pos=0) const + { return find_first_of(str.data, pos); } + size_t find_first_not_of(const char* str, size_t pos=0) const + { + const char* p = data; + while (pos) + { + if (!*p) + return npos; + p++; + pos--; + } + while (*p) + { + if (!strchr(str,*p)) + return p-data; + p++; + } + return npos; + } + size_t find_first_not_of(const string& str, size_t pos=0) const + { return find_first_not_of(str.data, pos); } + size_t find_last_not_of(const char* str, size_t pos=npos) const + { + const char* p = data; + while (pos) + { + if (!*p) + { + p--; + break; + } + p++; + pos--; + } + for (;;) + { + if (p<data) + return npos; + if (!strchr(str,*p)) + return p-data; + p--; + } + } + size_t find_last_not_of(const string& str, size_t pos=npos) const + { return find_last_not_of(str.data, pos); } + class iterator + { + char* cur; + public: + iterator(char* c):cur(c) {} + iterator(const iterator& i):cur(i.cur) {} + iterator& operator++() {++cur;return *this;} + iterator operator++(int) {iterator tmp(*this);++cur;return tmp;} + bool operator==(iterator it) {return cur==it.cur;} + bool operator!=(iterator it) {return cur!=it.cur;} + char& operator*() {return *cur;} + }; + iterator begin() {return iterator(data);} + iterator end() {return iterator(data+strlen(data));} +// void erase() {free(data);data=(char*)malloc(1);data[0]=0;} + string& erase(unsigned p0=0, unsigned n=(unsigned)-1) + { + unsigned sz=size(); + if (n>sz-p0) n=sz-p0; + char* d=(char*)malloc(sz+1-n); + memcpy(d,data,p0); + memcpy(d+p0,data+p0+n,sz+1-n-p0); + free(data); + data=d; + return *this; + } + typedef unsigned size_type; + static const size_type npos=(size_type)-1; + size_type find(const char* s, size_type pos=0) const + { + char* p=strstr(data+pos,s); + if (!p) return npos; + return p-data; + } + size_type find(char c, size_type pos=0) const + { + char* p=strchr(data+pos,c); + if (!p) return npos; + return p-data; + } + size_type rfind(char c, size_type pos=npos) const + { + size_type len=strlen(data); + if (pos>len) + pos=len; + while (pos--) + if (data[pos]==c) + return pos; + return npos; + } + string substr(unsigned pos=0,unsigned n=npos) + { + string res(data+pos); + if (n<res.size()) res.erase(n); + return res; + } + void clear(void) + { + data[0]=0; + } + bool empty(void) const + { + return (data[0]==0); + } + void _toupper(void) + { strupr(data); } + void _tolower(void) + { strlwr(data); } + }; +} + +inline std::string operator+(const std::string& s1, const char* s2) +{ + std::string res(s1); + res += s2; + return res; +} +inline std::string operator+(const char* s1, const std::string& s2) +{ + std::string res(s1); + res += s2; + return res; +} +inline std::string operator+(const std::string& s1, const std::string& s2) +{ + std::string res(s1); + res += s2; + return res; +} + +#endif diff --git a/contrib/media/updf/include/string.h b/contrib/media/updf/include/string.h new file mode 100644 index 0000000000..b4208a68e2 --- /dev/null +++ b/contrib/media/updf/include/string.h @@ -0,0 +1,80 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_string_h_ +#define __dj_include_string_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#include <sys/djtypes.h> + +/* Some programs think they know better... */ +#undef NULL + +#define NULL 0 +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t + +void * memchr(const void *_s, int _c, size_t _n); +int memcmp(const void *_s1, const void *_s2, size_t _n); +void * memcpy(void *_dest, const void *_src, size_t _n); +void * memmove(void *_s1, const void *_s2, size_t _n); +void * memset(void *_s, int _c, size_t _n); +char * strcat(char *_s1, const char *_s2); +char * strchr(const char *_s, int _c); +int strcmp(const char *_s1, const char *_s2); +int strcoll(const char *_s1, const char *_s2); +char * strcpy(char *_s1, const char *_s2); +size_t strcspn(const char *_s1, const char *_s2); +char * strerror(int _errcode); +size_t strlen(const char *_s); +char * strncat(char *_s1, const char *_s2, size_t _n); +int strncmp(const char *_s1, const char *_s2, size_t _n); +char * strncpy(char *_s1, const char *_s2, size_t _n); +char * strpbrk(const char *_s1, const char *_s2); +char * strrchr(const char *_s, int _c); +size_t strspn(const char *_s1, const char *_s2); +char * strstr(const char *_s1, const char *_s2); +char * strtok(char *_s1, const char *_s2); +size_t strxfrm(char *_s1, const char *_s2, size_t _n); + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <sys/movedata.h> + +int bcmp(const void *_ptr1, const void *_ptr2, int _length); +void * bcopy(const void *_a, void *_b, size_t _len); +void * bzero(void *ptr, size_t _len); +int ffs(int _mask); +char * index(const char *_string, int _c); +void * memccpy(void *_to, const void *_from, int c, size_t n); +int memicmp(const void *_s1, const void *_s2, size_t _n); +char * rindex(const char *_string, int _c); +char * stpcpy(char *_dest, const char *_src); +char * strdup(const char *_s); +char * strlwr(char *_s); +int strcasecmp(const char *_s1, const char *_s2); +int stricmp(const char *_s1, const char *_s2); +int strncasecmp(const char *_s1, const char *_s2, size_t _n); +int strnicmp(const char *_s1, const char *_s2, size_t _n); +char * strsep(char **_stringp, const char *_delim); +char * strupr(char *_s); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_string_h_ */ diff --git a/contrib/media/updf/include/stringio.h b/contrib/media/updf/include/stringio.h new file mode 100644 index 0000000000..be4d8ac0d0 --- /dev/null +++ b/contrib/media/updf/include/stringio.h @@ -0,0 +1,41 @@ +/** \file stringio.h + * definitions of input output classes that read and write from string. + */ + + +#ifndef __stringio_h__ +#define __stringio_h__ + +#include "yacasbase.h" +#include "lispio.h" +#include "lispstring.h" + +class StringInput : public LispInput +{ +public: + StringInput(LispString& aString,InputStatus& aStatus); + virtual LispChar Next(); + virtual LispChar Peek(); + virtual LispBoolean EndOfStream(); + virtual LispChar * StartPtr(); + virtual LispInt Position(); + virtual void SetPosition(LispInt aPosition); +protected: + LispString iString; + LispInt iCurrent; +}; + +class StringOutput : public LispOutput +{ +public: + StringOutput(LispString& aString); + virtual ~StringOutput(); + virtual void PutChar(LispChar aChar); +public: + LispString& iString; +}; + + + +#endif + diff --git a/contrib/media/updf/include/strings.h b/contrib/media/updf/include/strings.h new file mode 100644 index 0000000000..03741a229b --- /dev/null +++ b/contrib/media/updf/include/strings.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_strings_h_ +#define __dj_include_strings_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <string.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_strings_h_ */ diff --git a/contrib/media/updf/include/stub/Makefile b/contrib/media/updf/include/stub/Makefile new file mode 100644 index 0000000000..ecf3361235 --- /dev/null +++ b/contrib/media/updf/include/stub/Makefile @@ -0,0 +1,18 @@ +include $(MENUETDEV)/osrules.mak + +.SUFFIXES: .asm; + +OBJS = crt0.o + +all: $(OBJS) + +ifdef ON_WINDOWS +crt0.o: crt0_$(STUBFMT).asm + fasm crt0_$(STUBFMT).asm crt0.o +else +crt0.o: crt0_$(STUBFMT)_nounderscores.asm + fasm crt0_$(STUBFMT)_nounderscores.asm crt0.o +endif + +clean: + $(RM) $(OBJS) diff --git a/contrib/media/updf/include/stub/crt0.asm b/contrib/media/updf/include/stub/crt0.asm new file mode 100644 index 0000000000..bb9ca001a6 Binary files /dev/null and b/contrib/media/updf/include/stub/crt0.asm differ diff --git a/contrib/media/updf/include/stub/crt0__nounderscores.asm b/contrib/media/updf/include/stub/crt0__nounderscores.asm new file mode 100755 index 0000000000..6e369f266e --- /dev/null +++ b/contrib/media/updf/include/stub/crt0__nounderscores.asm @@ -0,0 +1,56 @@ +CATCH_NULL_CALL = 0 + +format ELF +section '.text' executable +public start +EXTRN edata +EXTRN __menuet__app_param_area +EXTRN __menuet__app_path_area +EXTRN __crt1_startup +start: +public __menuet__app_header +public __menuet__memsize +__menuet__app_header: + db 'MENUET01' + dd 0x01 +if CATCH_NULL_CALL + dd do_start +else + dd __crt1_startup +end if + dd edata +__menuet__memsize: + dd 0x800000 + dd app_stack + dd __menuet__app_param_area + dd __menuet__app_path_area + +if CATCH_NULL_CALL +do_start: + mov byte [0], 0xE9 + mov dword [1], _libc_null_call-5 + call __crt1_startup +; Handle exit if __crt1_startup returns (shouldn't happen) + mov eax,-1 + int 0x40 +end if + +if CATCH_NULL_CALL +EXTRN __libc_null_call + +_libc_null_call: + push eax + push ebx + push ecx + push edx + push esi + push edi + push ebp + call __libc_null_call + mov eax,-1 + int 0x40 +end if + +section '.bss' writeable +rd 4096*4 +app_stack: diff --git a/contrib/media/updf/include/stub/crt0_coff.asm b/contrib/media/updf/include/stub/crt0_coff.asm new file mode 100644 index 0000000000..96e27de1d6 --- /dev/null +++ b/contrib/media/updf/include/stub/crt0_coff.asm @@ -0,0 +1,58 @@ +CATCH_NULL_CALL = 0 + +format MS COFF +section '.text' code readable executable +public start +;EXTRN _edata +EXTRN ___menuet__app_param_area +EXTRN ___menuet__app_path_area +EXTRN ___crt1_startup +start: +public ___menuet__app_header +public ___menuet__memsize +section '.A' code readable executable +___menuet__app_header: + db 'MENUET01' + dd 0x01 +if CATCH_NULL_CALL + dd do_start +else + dd ___crt1_startup +end if +; dd _edata + dd 0 +___menuet__memsize: + dd 0x400000 + dd app_stack + dd ___menuet__app_param_area + dd ___menuet__app_path_area + +if CATCH_NULL_CALL +do_start: + mov byte [0], 0xE9 + mov dword [1], _libc_null_call-5 + call ___crt1_startup +; Handle exit if __crt1_startup returns (shouldn't happen) + mov eax,-1 + int 0x40 +end if + +if CATCH_NULL_CALL +EXTRN ___libc_null_call + +_libc_null_call: + push eax + push ebx + push ecx + push edx + push esi + push edi + push ebp + call ___libc_null_call + mov eax,-1 + int 0x40 +end if + +section '.bss' readable writeable +rd 0x20000 +app_stack: diff --git a/contrib/media/updf/include/stub/crt0_elf.asm b/contrib/media/updf/include/stub/crt0_elf.asm new file mode 100644 index 0000000000..3c012f09d3 --- /dev/null +++ b/contrib/media/updf/include/stub/crt0_elf.asm @@ -0,0 +1,56 @@ +CATCH_NULL_CALL = 0 + +format ELF +section '.text' executable +public start +EXTRN _edata +EXTRN ___menuet__app_param_area +EXTRN ___menuet__app_path_area +EXTRN ___crt1_startup +start: +public ___menuet__app_header +public ___menuet__memsize +___menuet__app_header: + db 'MENUET01' + dd 0x01 +if CATCH_NULL_CALL + dd do_start +else + dd ___crt1_startup +end if + dd _edata +___menuet__memsize: + dd 0x800000 + dd app_stack + dd ___menuet__app_param_area + dd ___menuet__app_path_area + +if CATCH_NULL_CALL +do_start: + mov byte [0], 0xE9 + mov dword [1], _libc_null_call-5 + call ___crt1_startup +; Handle exit if __crt1_startup returns (shouldn't happen) + mov eax,-1 + int 0x40 +end if + +if CATCH_NULL_CALL +EXTRN ___libc_null_call + +_libc_null_call: + push eax + push ebx + push ecx + push edx + push esi + push edi + push ebp + call ___libc_null_call + mov eax,-1 + int 0x40 +end if + +section '.bss' writeable +rd 0x20000 +app_stack: diff --git a/contrib/media/updf/include/stubs.h b/contrib/media/updf/include/stubs.h new file mode 100644 index 0000000000..fc8b1f90e9 --- /dev/null +++ b/contrib/media/updf/include/stubs.h @@ -0,0 +1,70 @@ + +/** \file stubs.h interface to platform-dependent functions + */ + +#ifndef __stubs_h__ +#define __stubs_h__ + +#include "lisptype.h" + +/** Simple function that determines if two strings are equal, + should be defined in stubs.inl */ +//inline LispInt StrEqual(const LispChar * ptr1, const LispChar * ptr2); + +#ifdef NO_GLOBALS + #define PlatAlloc malloc + #define PlatReAlloc realloc + #define PlatFree free + #define NEW new + #define CHECKPTR(ptr) +#else // NO_GLOBALS -- goes almost to EOF + void *PlatObAlloc(size_t nbytes); + void PlatObFree(void *p); + void *PlatObReAlloc(void *p, size_t nbytes); + +#ifdef YACAS_DEBUG + #include "debugmem.h" + #define PlatAlloc(nr) YacasMallocPrivate((size_t)nr,__FILE__,__LINE__) + #define PlatReAlloc(orig,nr) YacasReAllocPrivate(orig,(size_t)nr,__FILE__,__LINE__) + #define PlatFree(orig) YacasFreePrivate(orig) + #define NEW new (__FILE__,__LINE__) + #define CHECKPTR(ptr) CheckPtr(ptr,__FILE__,__LINE__) +#else // YACAS_DEBUG + #define PlatAlloc(nr) PlatObAlloc((size_t)nr) + #define PlatReAlloc(orig,nr) PlatObReAlloc(orig,(size_t)nr) + #define PlatFree(orig) PlatObFree(orig) + #define NEW new + #define CHECKPTR(ptr) +#endif // YACAS_DEBUG + +template <class T> +inline T * PlatAllocN(LispInt aSize) { return (T*)PlatAlloc(aSize*sizeof(T)); } + + +#ifdef YACAS_DEBUG // goes almost to EOF + +/* Operators new and delete are only defined globally here in debug mode. This is because + * the global new and delete operators should not be used. So the debug version makes sure + * the executable crashes if one of these are called. + */ + +#define NEW_THROWER throw ()//(std::bad_alloc) +#define DELETE_THROWER throw () + +// TODO: why doesn't MSC itself have this problem? Perhaps wrong signature of these new and delete operators? +#if defined(_MSC_VER) && _MSC_VER <= 1310 // getting C4290 warnings? slowly increase number. +#pragma warning( disable : 4290 ) // C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) +#endif + +void* operator new(size_t size) NEW_THROWER; +void* operator new[](size_t size) NEW_THROWER; +void operator delete(void* object) DELETE_THROWER; +void operator delete[](void* object) DELETE_THROWER; + +#endif // YACAS_DEBUG + +#endif // NO_GLOBALS + +#include "stubs.inl" + +#endif // __stubs_h__ diff --git a/contrib/media/updf/include/substitute.h b/contrib/media/updf/include/substitute.h new file mode 100644 index 0000000000..4949ea118c --- /dev/null +++ b/contrib/media/updf/include/substitute.h @@ -0,0 +1,78 @@ + +#ifndef __substitute_h__ +#define __substitute_h__ + +#include "yacasbase.h" +#include "lispobject.h" +#include "lispenvironment.h" + + +/** Behaviour for substituting sub-expressions. + */ +class SubstBehaviourBase : public YacasBase +{ +public: + virtual ~SubstBehaviourBase(); + virtual LispBoolean Matches(LispPtr& aResult, LispPtr& aElement) = 0; +}; + +/** main routine that can perform substituting of expressions + */ +void InternalSubstitute(LispPtr& aTarget, LispPtr& aSource, + SubstBehaviourBase& aBehaviour); + + +/** Substing one expression for another. The simplest form + * of substitution + */ +class SubstBehaviour : public SubstBehaviourBase +{ +public: + SubstBehaviour(LispEnvironment& aEnvironment,LispPtr& aToMatch, + LispPtr& aToReplaceWith); + virtual LispBoolean Matches(LispPtr& aResult, LispPtr& aElement); +private: + LispEnvironment& iEnvironment; + LispPtr& iToMatch; + LispPtr& iToReplaceWith; +}; + +/** subst behaviour for changing the local variables to have unique + * names. + */ +class LocalSymbolBehaviour : public SubstBehaviourBase +{ +public: + LocalSymbolBehaviour(LispEnvironment& aEnvironment, + LispString ** aOriginalNames, + LispString ** aNewNames, LispInt aNrNames); + virtual LispBoolean Matches(LispPtr& aResult, LispPtr& aElement); +private: + LispEnvironment& iEnvironment; + LispString ** iOriginalNames; + LispString ** iNewNames; + LispInt iNrNames; +}; + +/** subst behaviour for backquote mechanism as in LISP. + * When typing `(...) all occurrences of @a will be + * replaced with: + * 1) a evaluated if a is an atom + * 2) function call with function name replaced by evaluated + * head of function if a is a function. For instance, if + * a is f(x) and f is g, then f(x) gets replaced by g(x) + */ +class BackQuoteBehaviour : public SubstBehaviourBase +{ +public: + BackQuoteBehaviour(LispEnvironment& aEnvironment) + : iEnvironment(aEnvironment) {}; + virtual LispBoolean Matches(LispPtr& aResult, LispPtr& aElement); + LispEnvironment& iEnvironment; +}; + + + + +#endif + diff --git a/contrib/media/updf/include/sys/bitypes.h b/contrib/media/updf/include/sys/bitypes.h new file mode 100644 index 0000000000..02934b67c5 --- /dev/null +++ b/contrib/media/updf/include/sys/bitypes.h @@ -0,0 +1,92 @@ +/* + * bitypes.h,v 1.4 1995/08/24 01:58:54 hjl Exp + */ + +/* + * ++Copyright++ 1993 + * - + * Copyright (c) 1993 Regents of the University of California. + * All rights reserved. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * - + * Portions Copyright (c) 1993 by Digital Equipment Corporation. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies, and that + * the name of Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the document or software without + * specific, written prior permission. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * - + * --Copyright-- + */ + +/* +#ifdef __USE_BSD +*/ + +#ifndef __BIT_TYPES_DEFINED__ +# if (defined(BSD) && (BSD >= 199306)) || \ + (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199312)) +# define __BIT_TYPES_DEFINED__ +# endif +#endif + +#ifndef __BIT_TYPES_DEFINED__ +#define __BIT_TYPES_DEFINED__ + + /* + * Basic integral types. Omit the typedef if + * not possible for a machine/compiler combination. + */ + typedef /*signed*/ char int8_t; + typedef unsigned char u_int8_t; + typedef short int16_t; + typedef unsigned short u_int16_t; + typedef int int32_t; + typedef unsigned int u_int32_t; + +# if __GNUC__ >= 2 + typedef long long int64_t; + typedef unsigned long long u_int64_t; +# endif + +#endif /* __BIT_TYPES_DEFINED__ */ + +/* #endif __USE_BSD */ diff --git a/contrib/media/updf/include/sys/cdefs.h b/contrib/media/updf/include/sys/cdefs.h new file mode 100644 index 0000000000..ea36b5c9f5 --- /dev/null +++ b/contrib/media/updf/include/sys/cdefs.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#undef __P +#if defined(__STDC__) || defined(__cplusplus) +#define __P(p) p +#else +#define __P(p) +#endif +#define _PTR void * +#define _AND , +#define _NOARGS void +#define _CONST const +#define _VOLATILE volatile +#define _SIGNED signed +#define _DOTS , ... +#define _VOID void +#define _EXFUN(name, proto) name proto +#define _DEFUN(name, arglist, args) name(args) +#define _DEFUN_VOID(name) name(_NOARGS) +#define _CAST_VOID (void) +#ifndef _LONG_DOUBLE +#define _LONG_DOUBLE long double +#endif +#ifndef _PARAMS +#define _PARAMS(paramlist) paramlist +#endif + +/* Support gcc's __attribute__ facility. */ + +#define _ATTRIBUTE(attrs) __attribute__ ((attrs)) + +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif diff --git a/contrib/media/updf/include/sys/config.h b/contrib/media/updf/include/sys/config.h new file mode 100644 index 0000000000..07dfa42bac --- /dev/null +++ b/contrib/media/updf/include/sys/config.h @@ -0,0 +1,612 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_config_h_ +#define __dj_include_sys_config_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* config.h for DJGPP. + + This is usually generated automatically from config.h.in by the + configure script. However, it is very hard to run that script under + MS-DOS, because of its extensive use of Unix shell features. This + header file is provided so you can skip the autoconfigure step + altogether and go directly to the compilation step (after copying + Makefile.in to Makefile and setting the defaults there). + + There are several parts in this header file, which closely follow the + GNU Autoconf procedures. + + The first part checks for things which depend on the specific programs + from your programming environment which you use to compile a package. + + The second part mentions all the header files in the include hierarchy, + even those which every C installation must have. The only headers + files which are omitted are those which are specific to the PC + architecture or to DJGPP, because no GNU package should ever look for + those. (Some header files which DJGPP includes only for compatibility, + and which could cause a conflict with the mainstream header file, are + also excluded.) + + The third part mentions all the library functions which aren't included + in every C library. Obviously, it isn't practical to mention every + library function here, so this part has somewhat ad-hoc nature in that + the macros which should go there were assembled by actually porting + some GNU packages. + + The fourth part defines macros which are related to the header files, + like definitions of some structures and specific member fields in some + structures. + + The fifth part deals with some typedefs which aren't standardized + enough between different systems, or might be missing from your header + files. + + The sixth part defines some macros necessary to deal with differences + between compiler and architectural characteristics of various systems. + + In the seventh part, some system services which might be required by + some packages, are mentioned. + + The last part includes all kinds if miscellaneous macros required by + some GNU packages to be successfully compiled under DJGPP. + + Prepared by Eli Zaretskii <eliz@is.elta.co.il> + with help from Morten Welinder <terra@diku.dk> + and using some information from GNU Autoconf package. +*/ + +/* --------------------------------------------------------------------- + Program-related stuff. + --------------------------------------------------------------------- */ + +/* Define if `yytext' is a `char *' instead of a `char []'. This is + true if you use Flex. */ +#undef YYTEXT_POINTER +#define YYTEXT_POINTER 1 + +/* --------------------------------------------------------------------- + Header files. + --------------------------------------------------------------------- */ + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS +#define STDC_HEADERS 1 + +/* Define if you have the <ar.h> header file. */ +#undef HAVE_AR_H +#define HAVE_AR_H 1 + +/* Define if you have the <assert.h> header file. */ +#undef HAVE_ASSERT_H +#define HAVE_ASSERT_H 1 + +/* Define if you have the <coff.h> header file. */ +#undef HAVE_COFF_H +#define HAVE_COFF_H 1 + +/* Define if you have the <ctype.h> header file. */ +#undef HAVE_CTYPE_H +#define HAVE_CTYPE_H 1 + +/* Define if you have the <dirent.h> header file. */ +#undef DIRENT +#define DIRENT 1 + +#undef HAVE_DIRENT_H +#define HAVE_DIRENT_H 1 + +/* Define if you have the <errno.h> header file. */ +#undef HAVE_ERRNO_H +#define HAVE_ERRNO_H 1 + +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H +#define HAVE_FCNTL_H 1 + +/* Define if you have the <float.h> header file. */ +#undef HAVE_FLOAT_H +#define HAVE_FLOAT_H 1 + +/* Define if you have the <fnmatch.h> header file. */ +#undef HAVE_FNMATCH_H +#define HAVE_FNMATCH_H 1 + +/* Define if you have the <ftw.h> header file. */ +#undef HAVE_FTW_H +#define HAVE_FTW_H 1 + +/* Define if you have the <glob.h> header file. */ +#undef HAVE_GLOB_H +#define HAVE_GLOB_H 1 + +/* Define if you have the <grp.h> header file. */ +#undef HAVE_GRP_H +#define HAVE_GRP_H 1 + +/* Define if you have the <io.h> header file. */ +#undef HAVE_IO_H +#define HAVE_IO_H 1 + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H +#define HAVE_LIMITS_H 1 + +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H +#define HAVE_LOCALE_H 1 + +/* Define if you have the <math.h> header file. */ +#undef HAVE_MATH_H +#define HAVE_MATH_H 1 + +/* Define if you have the <mntent.h> header file. */ +#undef HAVE_MNTENT_H +#define HAVE_MNTENT_H 1 + +/* Define if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H +#define HAVE_PWD_H 1 + +/* Define if you have the <search.h> header file. */ +#undef HAVE_SEARCH_H +#define HAVE_SEARCH_H 1 + +/* Define if you have the <setjmp.h> header file. */ +#undef HAVE_SETJMP_H +#define HAVE_SETJMP_H 1 + +/* Define if you have the <signal.h> header file. */ +#undef HAVE_SIGNAL_H +#define HAVE_SIGNAL_H 1 + +#undef HAVE_SYS_SIGLIST +#define HAVE_SYS_SIGLIST 1 + +/* Define if you have the <stdarg.h> header file. */ +#undef HAVE_STDARG_H +#define HAVE_STDARG_H 1 + +/* Define if you have the <stddef.h> header file. */ +#undef HAVE_STDDEF_H +#define HAVE_STDDEF_H 1 + +/* Define if you have the <stdio.h> header file (is there ANY C + installation that doesn't??). */ +#undef HAVE_STDIO_H +#define HAVE_STDIO_H 1 + +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H +#define HAVE_STDLIB_H 1 + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H +#define HAVE_STRING_H 1 + +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H /* we have, but the functions aren't implemented */ +/* #define HAVE_TERMIOS_H 1 */ + +/* Define if you have the <time.h> header file. */ +#undef HAVE_TIME_H +#define HAVE_TIME_H 1 + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H +#define HAVE_SYS_TIME_H 1 + +/* Define this if your <time.h> and <sys/time.h> can both be + included with no conflicts. */ +#undef TIME_WITH_SYS_TIME +#define TIME_WITH_SYS_TIME 1 + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H +#define HAVE_UNISTD_H 1 + +/* Define if you have the <utime.h> header file. */ +#undef HAVE_UTIME_H +#define HAVE_UTIME_H 1 + +/* Define if you have the values.h header file. */ +#undef HAVE_VALUES_H +#define HAVE_VALUES_H 1 + +/* Define if you have the <varargs.h> header file. */ +#undef HAVE_VARARGS_H +#define HAVE_VARARGS_H 1 + +/* Define if you have the <netinet/in.h> header file. */ +#undef HAVE_NETINET_IN_H +#define HAVE_NETINET_IN_H 1 + +/* Define if you have the <sys/file.h> header file. */ +#undef HAVE_SYS_FILE_H +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the <sys/resource.h> header file. */ +#undef HAVE_SYS_RESOURCE_H +#define HAVE_SYS_RESOURCE_H 1 + +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the <sys/timeb.h> header file. */ +#undef HAVE_SYS_TIMEB_H +#define HAVE_SYS_TIMEB_H 1 + +/* Define if you have the <sys/times.h> header file. */ +#undef HAVE_SYS_TIMES_H +#define HAVE_SYS_TIMES_H 1 + +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the <sys/utsname.h> header file. */ +#undef HAVE_SYS_UTSNAME_H +#define HAVE_SYS_UTSNAME_H 1 + +/* Define if you have the <sys/vfs.h> header file. */ +#undef HAVE_SYS_VFS_H +#define HAVE_SYS_VFS_H 1 + +/* Define if you have the <sys/wait.h> header file. */ +#undef HAVE_SYS_WAIT_H +#define HAVE_SYS_WAIT_H 1 + + +/* --------------------------------------------------------------------- + Library functions and related stuff. + --------------------------------------------------------------------- */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define if you have bcmp() and bcopy() library functions. */ +#undef HAVE_BCMP +#define HAVE_BCMP 1 +#undef HAVE_BCOPY +#define HAVE_BCOPY 1 + +/* Define if you have closedir() function in your library. */ +#undef HAVE_CLOSEDIR +#define HAVE_CLOSEDIR 1 + +/* Define if you have dup2() library function. */ +#undef HAVE_DUP2 +#define HAVE_DUP2 1 + +/* Define if you have the endgrent function. */ +#undef HAVE_ENDGRENT +#define HAVE_ENDGRENT 1 + +/* Define if you have the endpwent function. */ +#undef HAVE_ENDPWENT +#define HAVE_ENDPWENT 1 + +/* Define if you have fnmatch() function in your library. */ +#undef HAVE_FNMATCH +#define HAVE_FNMATCH 1 + +/* Define if you have frexp() function in your library. */ +#undef HAVE_FREXP +#define HAVE_FREXP 1 + +/* Define if you have ftime() function in your library. */ +#undef HAVE_FTIME +#define HAVE_FTIME 1 + +/* Define if you have the the ftruncate() library function. */ +#undef HAVE_FTRUNCATE +#define HAVE_FTRUNCATE 1 + +/* Define if you have ftw() function in your library. */ +#undef HAVE_FTW +#define HAVE_FTW 1 + +/* Define if you have getcwd() function in your library. */ +#undef HAVE_GETCWD +#define HAVE_GETCWD 1 + +/* Define if you have getdtablesize() function in your library. */ +#undef HAVE_GETDTABLESIZE +#define HAVE_GETDTABLESIZE 1 + +/* Define if you have the getgroups function. */ +#undef HAVE_GETGROUPS +#define HAVE_GETGROUPS 1 + +/* Define if you have gethostname() function in your library. */ +#undef HAVE_GETHOSTNAME +#define HAVE_GETHOSTNAME 1 + +/* Define if you have getmntent() function in your library. */ +#undef HAVE_GETMNTENT +#define HAVE_GETMNTENT 1 + +/* Define if you have getpagesize() function in your library. */ +#undef HAVE_GETPAGESIZE +#define HAVE_GETPAGESIZE 1 + +/* Define this if your getpgrp() function takes no argument (the + POSIX.1 version). */ +#undef GETPGRP_VOID +#define GETPGRP_VOID 1 + +/* Define if your getmntent() function accepts one argument. */ +#undef MOUNTED_GETMNTENT1 +#define MOUNTED_GETMNTENT1 1 + +/* Define if you have gettimeofday() function in your library. */ +#undef HAVE_GETTIMEOFDAY +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the glob() function in your library. */ +#undef HAVE_GLOB +#define HAVE_GLOB 1 + +/* Define if you have the isascii function. */ +#undef HAVE_ISASCII +#define HAVE_ISASCII 1 + +/* Define if you have memchr() in your library. */ +#undef HAVE_MEMCHR +#define HAVE_MEMCHR 1 + +/* Define if you have the memcpy function. */ +#undef HAVE_MEMCPY +#define HAVE_MEMCPY 1 + +/* Define if you have mkdir() function in your library. */ +#undef HAVE_MKDIR +#define HAVE_MKDIR 1 + +/* Define if you have the mkfifo function. */ +#undef HAVE_MKFIFO +#define HAVE_MKFIFO 1 + +/* Define if you have mktime() function in your library. */ +#undef HAVE_MKTIME +#define HAVE_MKTIME 1 + +/* Define if you have the pow function. */ +#undef HAVE_POW +#define HAVE_POW 1 + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV +#define HAVE_PUTENV 1 + +/* Define if you have random() function in your library. */ +#undef HAVE_RANDOM +#define HAVE_RANDOM 1 + +/* Define if you have rename() function in your library. */ +#undef HAVE_RENAME +#define HAVE_RENAME 1 + +/* Define if you have rmdir() function in your library. */ +#undef HAVE_RMDIR +#define HAVE_RMDIR 1 + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV +#define HAVE_SETENV 1 + +/* Define if you have setlinebuf() function in your library. */ +#undef HAVE_SETLINEBUF +#define HAVE_SETLINEBUF 1 + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE +#define HAVE_SETLOCALE 1 + +/* Define if you have sigaction() function in your library. */ +#undef HAVE_SIGACTION +#define HAVE_SIGACTION 1 + +/* Define if your statfs() function accepts 2 arguments and + struct statfs has f_bsize field. */ +#undef STAT_STATFS2_BSIZE +#define STAT_STATFS2_BSIZE 1 + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY +#define HAVE_STPCPY 1 + +/* Define if you have strcasecmp() function in your library. */ +#undef HAVE_STRCASECMP +#define HAVE_STRCASECMP 1 + +/* Define if you have strchr() function in your library. */ +#undef HAVE_STRCHR +#define HAVE_STRCHR 1 + +/* Define if you have strrchr() function in your library. */ +#undef HAVE_STRRCHR +#define HAVE_STRRCHR 1 + +/* Define if you have strcoll() function in your library. */ +#undef HAVE_STRCOLL +#define HAVE_STRCOLL 1 + +/* Define if you have strdup() function in your library. */ +#undef HAVE_STRDUP +#define HAVE_STRDUP 1 + +/* Define if you have strftime() function in your library. */ +#undef HAVE_STRFTIME +#define HAVE_STRFTIME 1 + +/* Define if you have strerror. */ +#undef HAVE_STRERROR +#define HAVE_STRERROR 1 + +/* Define if your utime() library function accepts NULL as its second + argument (meaning use current time). */ +#undef HAVE_UTIME_NULL +#define HAVE_UTIME_NULL 1 + +/* Define vfork as fork if vfork() does not work. */ +#undef vfork +#define vfork fork + +/* Define if you have the vprintf() library function. */ +#undef HAVE_VPRINTF +#define HAVE_VPRINTF 1 + +/* Define if you have waitpid. */ +#undef HAVE_WAITPID /* we do, but it always fails :-( */ + +/* --------------------------------------------------------------------- + Structures + --------------------------------------------------------------------- */ + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE +#define HAVE_ST_BLKSIZE 1 + +/* Define if your struct stat has st_blocks. */ +#undef HAVE_ST_BLOCKS + +/* Define if your struct stat has st_rdev member. */ +#undef HAVE_ST_RDEV +#define HAVE_ST_RDEV 1 + +/* Define if you have `struct utimbuf' declared in <utime.h>. */ +#undef HAVE_STRUCT_UTIMBUF +#define HAVE_STRUCT_UTIMBUF 1 + +/* Define if you have struct timeval defined in your <time.h> header file. */ +#undef HAVE_TIMEVAL +#define HAVE_TIMEVAL 1 + +/* Define if you have tm_zone field in your struct tm definition (in + <time.h> header file). */ +#undef HAVE_TM_ZONE +#define HAVE_TM_ZONE 1 + +/* --------------------------------------------------------------------- + Typedefs + --------------------------------------------------------------------- */ + +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#undef GETGROUPS_T +#define GETGROUPS_T gid_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE +#define RETSIGTYPE void + + +/* --------------------------------------------------------------------- + Compiler Characteristics + --------------------------------------------------------------------- */ + +/* Define `inline' to `__inline__' if your compiler accepts it. */ +#undef inline +#define inline __inline__ + +/* Define this if the C compiler supports the `long double' type. */ +#undef HAVE_LONG_DOUBLE +#define HAVE_LONG_DOUBLE 1 + +/* Sizes of built-in types and pointers known to the compiler. */ +#define SIZEOF_CHAR 1 +#define SIZEOF_CHAR_P 4 +#define SIZEOF_SHORT 2 +#define SIZEOF_SHORT_P 4 +#define SIZEOF_INT 4 +#define SIZEOF_INT_P 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_P 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_LONG_LONG_P 4 +#define SIZEOF_FLOAT 4 +#define SIZEOF_FLOAT_P 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_DOUBLE_P 4 +#define SIZEOF_LONG_DOUBLE 10 +#define SIZEOF_LONG_DOUBLE_P 4 +#define SIZEOF_VOID_P 4 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define to empty if the `const' keyword does not work. */ +#undef const + +/* --------------------------------------------------------------------- + System Services + --------------------------------------------------------------------- */ + +/* Define this to be the name of your NULL device. */ +#undef NULL_DEVICE +#define NULL_DEVICE "nul" + +/* Do we have long filenames? */ +#undef HAVE_LONG_FILE_NAMES /* not yet, but Win95 might have them... */ + +/* --------------------------------------------------------------------- + Misc definitions + --------------------------------------------------------------------- */ + +/* Define both _LIBC and __GNU_LIBRARY__ if you use GNU C library, + but want link in the version of getopt, regex, fnmatch (and other + routines which are part of GNU C library) which came with the + package. Define _LIBC alone if you use non-GNU C library which + might be incompatible with GNU (e.g., getopt()). Define __GNU_LIBRARY__ + alone if you want the code for the above functions to be effectively + commented out, so you will get the code from the GNU C library. +*/ +#undef _LIBC +#undef __GNU_LIBRARY__ +/* #define _LIBC 1 */ +/* #define __GNU_LIBRARY__ 1 */ + + + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_config_h_ */ diff --git a/contrib/media/updf/include/sys/dir.h b/contrib/media/updf/include/sys/dir.h new file mode 100644 index 0000000000..7ccbd238cb --- /dev/null +++ b/contrib/media/updf/include/sys/dir.h @@ -0,0 +1,32 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_dir_h_ +#define __dj_include_sys_dir_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* WARNING! This file is obsolete! Use <dirent.h> */ + +#define dirent direct +#include <dirent.h> +#undef dirent + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_dir_h_ */ diff --git a/contrib/media/updf/include/sys/djtypes.h b/contrib/media/updf/include/sys/djtypes.h new file mode 100644 index 0000000000..a1f4a9f23c --- /dev/null +++ b/contrib/media/updf/include/sys/djtypes.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifndef __DJ_sys_djtypes_h_ +#define __DJ_sys_djtypes_h_ + +#define __DJ_clock_t typedef int clock_t; +#define __DJ_gid_t typedef int gid_t; +#define __DJ_off_t typedef int off_t; +#define __DJ_pid_t typedef int pid_t; +#define __DJ_size_t typedef unsigned int size_t; +#define __DJ_ssize_t typedef int ssize_t; +#define __DJ_time_t typedef unsigned int time_t; +#define __DJ_uid_t typedef int uid_t; + +/* For GCC 3.00 or later we use its builtin va_list. */ +#if __GNUC__ >= 3 +#define __DJ_va_list typedef __builtin_va_list va_list; +#else +#define __DJ_va_list typedef void *va_list; +#endif + +#if defined(__cplusplus) && ( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 || defined(_MSC_VER)) +/* wchar_t is now a keyword in C++ */ +#define __DJ_wchar_t +#else +/* but remains a typedef in C */ +#define __DJ_wchar_t typedef unsigned short wchar_t; +#endif + +#define __DJ_wint_t typedef int wint_t; + +#endif diff --git a/contrib/media/updf/include/sys/dxe.h b/contrib/media/updf/include/sys/dxe.h new file mode 100644 index 0000000000..634daa647c --- /dev/null +++ b/contrib/media/updf/include/sys/dxe.h @@ -0,0 +1,24 @@ +/* Copyright (C) 1995 Charles Sandmann (sandmann@clio.rice.edu) + This software may be freely distributed with above copyright, no warranty. + Based on code by DJ Delorie, it's really his, enhanced, bugs fixed. */ + +typedef struct { + long magic; + long symbol_offset; + long element_size; + long nrelocs; +} dxe_header; + +#define DXE_MAGIC 0x31455844 + +/* data stored after dxe_header in file; then relocs, 4 bytes each */ + +#ifdef __cplusplus +extern "C" { +#endif + +void *_dxe_load(char *filename); + +#ifdef __cplusplus +} +#endif diff --git a/contrib/media/updf/include/sys/errno.h b/contrib/media/updf/include/sys/errno.h new file mode 100644 index 0000000000..43022ddd35 --- /dev/null +++ b/contrib/media/updf/include/sys/errno.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_errno_h_ +#define __dj_include_sys_errno_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <errno.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_errno_h_ */ diff --git a/contrib/media/updf/include/sys/exceptn.h b/contrib/media/updf/include/sys/exceptn.h new file mode 100644 index 0000000000..c095249d45 --- /dev/null +++ b/contrib/media/updf/include/sys/exceptn.h @@ -0,0 +1,77 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_exceptn_h__ +#define __dj_include_sys_exceptn_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#ifdef __dj_include_setjmp_h_ +extern jmp_buf *__djgpp_exception_state_ptr; /* Must include setjmp.h first */ +#define __djgpp_exception_state (*__djgpp_exception_state_ptr) +#endif + +extern unsigned short __djgpp_our_DS; +extern unsigned short __djgpp_app_DS; /* Data selector invalidated by HW ints */ +extern unsigned short __djgpp_ds_alias; /* Data selector always valid */ +extern unsigned short __djgpp_dos_sel; /* Linear mem selector copy in locked mem */ +/* Hardware Interrupt Flags: + + 1 = Disable INTR and QUIT keys (Ctrl-C and Ctrl-\); + 2 = Count Ctrl-Break (don't kill); + 4 = IRET from our timer interrupt handler, don't chain */ +extern unsigned short __djgpp_hwint_flags; +extern unsigned __djgpp_cbrk_count; /* Count of CTRL-BREAK hits */ +extern int __djgpp_exception_inprog; /* Nested exception count */ + +extern unsigned short __djgpp_sigint_key; /* key that raises SIGINT */ +extern unsigned short __djgpp_sigquit_key; /* key that raises SIGQUIT */ +extern unsigned short __djgpp_sigint_mask; /* kb mask for SIGINT key */ +extern unsigned short __djgpp_sigquit_mask;/* kb mask for SIGQUIT key */ + +void __djgpp_exception_toggle(void); +int __djgpp_set_ctrl_c(int __enable); /* On by default */ +int __djgpp_set_sigint_key(int new_key); /* Set key which raises SIGINT */ +int __djgpp_set_sigquit_key(int new_key); /* Set key which raises SIGQUIT */ + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_exceptn_h__ */ diff --git a/contrib/media/updf/include/sys/farptr.h b/contrib/media/updf/include/sys/farptr.h new file mode 100644 index 0000000000..5a94163ae3 --- /dev/null +++ b/contrib/media/updf/include/sys/farptr.h @@ -0,0 +1,247 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (c) 1995 DJ Delorie. Permission granted to use for any + purpose, provided this copyright remains attached and unmodified. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» +º Far Pointer Simulation Functions º +ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + +This file attempts to make up for the lack of a "far" keyword in GCC. +Although it doesn't provide access to far call APIs (like Windows), it +does allow you to do far pointer data access without the overhead of +movedata() or dosmemget/dosmemput(). + +You should *always* include this file when using these functions and +compile with optimization enabled. They don't exist as normal functions +in any library, and they compile down to only a few opcodes when used +this way. They are almost as fast as native pointer operations, and +about as fast as far pointers can get. + +If you don't use optimization, this file becomes prototypes for +farptr.c, which generates real functions for these when not optimizing. +When optimizing, farptr.c compiles to nothing. + +There are two types of functions here - standalone and invariant. The +standalone functions take a selector and offset. These are used when +you need only a few accesses, time isn't critical, or you don't know +what's in the %fs register. The invariant ones don't take a selector, +they only take an offset. These are used inside loops and in +time-critical accesses where the selector doesn't change. To specify +the selector, use the farsetsel() function. That selector is used for +all farns*() functions until changed. You can use _fargetsel() if you +want to temporary change the selector with _farsetsel() and restore +it afterwards. + +The farpoke* and farpeek* take selectors. + +The farnspoke* and farnspeek* don't (note the `ns' for `no selector'). + +Warning: These routines all use the %fs register for their accesses. +GCC normally uses only %ds and %es, and libc functions (movedata, +dosmemget, dosmemput) use %gs. Still, you should be careful about +assumptions concerning whether or not the value you put in %fs will be +preserved across calls to other functions. If you guess wrong, your +program will crash. Better safe than sorry. + +*/ + +#ifndef __dj_include_sys_farptr_h_ +#define __dj_include_sys_farptr_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +void _farpokeb(unsigned short, unsigned long, unsigned char); +void _farpokew(unsigned short, unsigned long, unsigned short); +void _farpokel(unsigned short, unsigned long, unsigned long); +unsigned char _farpeekb(unsigned short, unsigned long); +unsigned short _farpeekw(unsigned short, unsigned long); +unsigned long _farpeekl(unsigned short, unsigned long); +void _farsetsel(unsigned short); +unsigned short _fargetsel(void); +void _farnspokeb(unsigned long, unsigned char); +void _farnspokew(unsigned long, unsigned short); +void _farnspokel(unsigned long, unsigned long); +unsigned char _farnspeekb(unsigned long); +unsigned short _farnspeekw(unsigned long); +unsigned long _farnspeekl(unsigned long); + +extern __inline__ void +_farpokeb(unsigned short selector, + unsigned long offset, + unsigned char value) +{ + __asm__ __volatile__ ("movw %w0,%%fs\n" + " .byte 0x64 \n" + " movb %b1,(%k2)" + : + : "rm" (selector), "qi" (value), "r" (offset)); +} + +extern __inline__ void +_farpokew(unsigned short selector, + unsigned long offset, + unsigned short value) +{ + __asm__ __volatile__ ("movw %w0,%%fs \n" + " .byte 0x64 \n" + " movw %w1,(%k2)" + : + : "rm" (selector), "ri" (value), "r" (offset)); +} + +extern __inline__ void +_farpokel(unsigned short selector, + unsigned long offset, + unsigned long value) +{ + __asm__ __volatile__ ("movw %w0,%%fs \n" + " .byte 0x64 \n" + " movl %k1,(%k2)" + : + : "rm" (selector), "ri" (value), "r" (offset)); +} + +extern __inline__ unsigned char +_farpeekb(unsigned short selector, + unsigned long offset) +{ + unsigned char result; + __asm__ __volatile__ ("movw %w1,%%fs \n" + " .byte 0x64 \n" + " movb (%k2),%b0" + : "=q" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ unsigned short +_farpeekw(unsigned short selector, + unsigned long offset) +{ + unsigned short result; + __asm__ __volatile__ ("movw %w1, %%fs \n" + " .byte 0x64 \n" + " movw (%k2),%w0 \n" + : "=r" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ unsigned long +_farpeekl(unsigned short selector, + unsigned long offset) +{ + unsigned long result; + __asm__ __volatile__ ("movw %w1,%%fs\n" + " .byte 0x64\n" + " movl (%k2),%k0" + : "=r" (result) + : "rm" (selector), "r" (offset)); + return result; +} + +extern __inline__ void +_farsetsel(unsigned short selector) +{ + __asm__ __volatile__ ("movw %w0,%%fs" + : + : "rm" (selector)); +} + +extern __inline__ unsigned short +_fargetsel(void) +{ + unsigned short selector; + __asm__ __volatile__ ("movw %%fs,%w0 \n" + : "=r" (selector) + : ); + return selector; +} + +extern __inline__ void +_farnspokeb(unsigned long offset, + unsigned char value) +{ + __asm__ __volatile__ (".byte 0x64\n" + " movb %b0,(%k1)" + : + : "qi" (value), "r" (offset)); +} + +extern __inline__ void +_farnspokew(unsigned long offset, + unsigned short value) +{ + __asm__ __volatile__ (".byte 0x64\n" + " movw %w0,(%k1)" + : + : "ri" (value), "r" (offset)); +} + +extern __inline__ void +_farnspokel(unsigned long offset, + unsigned long value) +{ + __asm__ __volatile__ (".byte 0x64\n" + " movl %k0,(%k1)" + : + : "ri" (value), "r" (offset)); +} + +extern __inline__ unsigned char +_farnspeekb(unsigned long offset) +{ + unsigned char result; + __asm__ __volatile__ (".byte 0x64\n" + " movb (%k1),%b0" + : "=q" (result) + : "r" (offset)); + return result; +} + +extern __inline__ unsigned short +_farnspeekw(unsigned long offset) +{ + unsigned short result; + __asm__ __volatile__ (".byte 0x64\n" + " movw (%k1),%w0" + : "=r" (result) + : "r" (offset)); + return result; +} + +extern __inline__ unsigned long +_farnspeekl(unsigned long offset) +{ + unsigned long result; + __asm__ __volatile__ (".byte 0x64\n" + " movl (%k1),%k0" + : "=r" (result) + : "r" (offset)); + return result; +} + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_farptr_h_ */ diff --git a/contrib/media/updf/include/sys/fcntl.h b/contrib/media/updf/include/sys/fcntl.h new file mode 100644 index 0000000000..cf2c955618 --- /dev/null +++ b/contrib/media/updf/include/sys/fcntl.h @@ -0,0 +1,28 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_fcntl_h_ +#define __dj_include_sys_fcntl_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <fcntl.h> + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_fcntl_h_ */ diff --git a/contrib/media/updf/include/sys/file.h b/contrib/media/updf/include/sys/file.h new file mode 100644 index 0000000000..63c76ee143 --- /dev/null +++ b/contrib/media/updf/include/sys/file.h @@ -0,0 +1,33 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_file_h_ +#define __dj_include_sys_file_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#include <fcntl.h> +#include <unistd.h> +#define L_SET 0 +#define L_CURR 1 +#define L_INCR 1 +#define L_XTND 2 + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_file_h_ */ diff --git a/contrib/media/updf/include/sys/fsext.h b/contrib/media/updf/include/sys/fsext.h new file mode 100644 index 0000000000..81f987bcc8 --- /dev/null +++ b/contrib/media/updf/include/sys/fsext.h @@ -0,0 +1,69 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_fsext_h_ +#define __dj_include_sys_fsext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <stdarg.h> + +typedef enum { + __FSEXT_nop, + __FSEXT_open, + __FSEXT_creat, + __FSEXT_read, + __FSEXT_write, + __FSEXT_ready, + __FSEXT_close, + __FSEXT_fcntl, + __FSEXT_ioctl, + __FSEXT_lseek, + __FSEXT_link, + __FSEXT_unlink, + __FSEXT_dup, + __FSEXT_dup2, + __FSEXT_fstat, + __FSEXT_stat +} __FSEXT_Fnumber; + +/* _ready gets passed a fd and should return a mask of these, + as if we were emulating "int ready(int fd)" */ +#define __FSEXT_ready_read 1 +#define __FSEXT_ready_write 2 +#define __FSEXT_ready_error 4 + +/* The return value is nonzero if the function has overridden the + caller's functionality. */ +typedef int (__FSEXT_Function)(__FSEXT_Fnumber _function_number, + int *_rv, /*va_list*/void* _args); + +int __FSEXT_alloc_fd(__FSEXT_Function *_function); +int __FSEXT_set_function(int _fd, __FSEXT_Function *_function); +__FSEXT_Function *__FSEXT_get_function(int _fd); +void *__FSEXT_set_data(int _fd, void *_data); +void *__FSEXT_get_data(int _fd); + +int __FSEXT_add_open_handler(__FSEXT_Function *_function); +int __FSEXT_call_open_handlers(__FSEXT_Fnumber _function_number, + int *rv, /*va_list*/void* _args); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_fsext_h_ */ diff --git a/contrib/media/updf/include/sys/ioctl.h b/contrib/media/updf/include/sys/ioctl.h new file mode 100644 index 0000000000..6195f5900c --- /dev/null +++ b/contrib/media/updf/include/sys/ioctl.h @@ -0,0 +1,361 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_ioctl_h_ +#define __dj_include_sys_ioctl_h_ + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE +/* +** plain ioctl functions. Do not use them. +** Never. Really _N_E_V_E_R_. Unless you really know what +** you are doing. +** +*/ +#define DOS_PLAIN_GETDEVDATA 0x00 +#define DOS_PLAIN_SETDEVDATA 0x01 +#define DOS_PLAIN_RCVDATA 0x02 +#define DOS_PLAIN_SNDDATA 0x03 +#define DOS_PLAIN_RCVCTLDATA 0x04 +#define DOS_PLAIN_SNDCTLDATA 0x05 +#define DOS_PLAIN_CHKINSTAT 0x06 +#define DOS_PLAIN_CHKOUTSTAT 0x07 +#define DOS_PLAIN_ISCHANGEABLE 0x08 +#define DOS_PLAIN_ISREDIRBLK 0x09 +#define DOS_PLAIN_ISREDIRHND 0x0a +#define DOS_PLAIN_SETRETRY 0x0b +#define DOS_PLAIN_GENCHARREQ 0x0c +#define DOS_PLAIN_GENBLKREQ 0x0d +#define DOS_PLAIN_GLDRVMAP 0x0e +#define DOS_PLAIN_SLDRVMAP 0x0f +#define DOS_PLAIN_QGIOCTLCAPH 0x10 +#define DOS_PLAIN_QGIOCTLCAPD 0x11 +/* +** Flags for DOS commands +*/ +#define DOS_XFER 0x8000 /* use xfer buffer */ +#define DOS_RETMASK 0x7000 /* Here we put the bits to tell */ + /* what to return. 8 possible values */ +#define DOS_BRAINDEAD 0x0400 /* CX does not hold the number of */ + /* bytes to transfer */ + +#define DOS_XINARGS(a) ((a & 3)<<12) /* How many extra args we expect. */ +#define DOS_RETAX 0x1000 /* return AX as result */ +#define DOS_RETDX 0x2000 /* return DX as result */ +#define DOS_RETDISI 0x3000 /* return DI SI as result */ +/* +** DOS ioctls we support: +*/ +#define DOS_GETDEVDATA (DOS_PLAIN_GETDEVDATA| DOS_RETDX|DOS_XINARGS(0)) +#define DOS_SETDEVDATA (DOS_PLAIN_SETDEVDATA| DOS_XINARGS(1)) +#define DOS_RCVDATA (DOS_PLAIN_RCVDATA |DOS_XFER|DOS_RETAX|DOS_XINARGS(1)) +#define DOS_SNDDATA (DOS_PLAIN_SNDDATA |DOS_XFER|DOS_RETAX|DOS_XINARGS(1)) +#define DOS_RCVCTLDATA (DOS_PLAIN_RCVCTLDATA|DOS_XFER|DOS_RETAX|DOS_XINARGS(1)) +#define DOS_SNDCTLDATA (DOS_PLAIN_SNDCTLDATA|DOS_XFER|DOS_RETAX|DOS_XINARGS(1)) +#define DOS_CHKINSTAT (DOS_PLAIN_CHKINSTAT | DOS_RETAX) +#define DOS_CHKOUTSTAT (DOS_PLAIN_CHKOUTSTAT| DOS_RETAX) +#define DOS_ISCHANGEABLE (DOS_PLAIN_ISCHANGEABLE| DOS_RETAX) +#define DOS_ISREDIRBLK (DOS_PLAIN_ISREDIRBLK| DOS_RETDX) +#define DOS_ISREDIRHND (DOS_PLAIN_ISREDIRHND| DOS_RETDX) +#define DOS_SETRETRY (DOS_PLAIN_SETRETRY| DOS_XINARGS(1)) +/* +These ones do not fit into my scheme, because they _DO_NOT_ put the size +of the xfer buffer in CX. Aaaaargh +*/ +#define DOS_GENCHARREQ (DOS_PLAIN_GENCHARREQ|DOS_BRAINDEAD|DOS_RETDISI) +#define DOS_GENBLKREQ (DOS_PLAIN_GENBLKREQ |DOS_BRAINDEAD|DOS_RETAX) +#define DOS_GLDRVMAP (DOS_PLAIN_GLDRVMAP| DOS_RETAX) +#define DOS_SLDRVMAP (DOS_PLAIN_SLDRVMAP| DOS_RETAX) +#define DOS_QGIOCTLCAPH (DOS_PLAIN_QGIOCTLCAPH| DOS_RETAX) +#define DOS_QGIOCTLCAPD (DOS_PLAIN_QGIOCTLCAPD| DOS_RETAX) + + +#define __IS_UNIX_IOCTL(a) ((a) & 0xd0000000U) +#if 0 +/* +** UNIX stuff +** +** This is subject to major changes in the near future. +** Do not use it yet. +*/ + +/* +** __WARNING__ : +** This ifdef works for DJGPP, because its io.h +** defines __djgpp_include_io_h_ +*/ +#ifndef _IO +/* +* Ioctl's have the command encoded in the lower word, +* and the size of any in or out parameters in the upper +* word. The high 2 bits of the upper word are used +* to encode the in/out status of the parameter; for now +* we restrict parameters to at most 128 bytes. +*/ +#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ +#define IOC_VOID 0x20000000 /* no parameters */ +#define IOC_OUT 0x40000000 /* copy out parameters */ +#define IOC_IN 0x80000000 /* copy in parameters */ +#define IOC_INOUT (IOC_IN|IOC_OUT) +/* the 0x20000000 is so we can distinguish new ioctl's from old */ +#define _IO(x,y) (IOC_VOID|(x<<8)|y) +#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +/* this should be _IORW, but stdio got there first */ +#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +#endif /* _IO */ +/* Common ioctl's for all disciplines which are handled in ttiocom */ +enum tty_ioctl { + TXISATTY = ('X'<<8), /* quick path for isatty */ + TXTTYNAME, /* quick path for ttyname */ + TXGETLD, /* get line discipline */ + TXSETLD, /* set line discipline */ + TXGETCD, /* get control disciplines */ + TXADDCD, /* add control discipline */ + TXDELCD, /* delete control discipline */ + TXSBAUD, /* set integer baud rate */ + TXGBAUD, /* get integer baud rate */ + TXSETIHOG, /* set the input buffer limit */ + TXSETOHOG, /* set the output buffer limit */ + TXGPGRP, /* get p grp with posix security */ + TXSPGRP /* set p grp with posix security */ +}; + +#define TTNAMEMAX 32 /* used with TXGETLD, et al */ + +union txname { /* used with TXGETCD */ + int tx_which; /* which name to get -- inbound */ + char tx_name[TTNAMEMAX];/* the name -- outbound */ +}; + +/* + * window size structure used with TXSETWIN and TXGETWIN. This is + * exactly the same as the Berkeley structure and can be used with + * TIOCSWINSZ and TIOCGWINSZ -- in fact they are defined to be the + * same. + */ +struct winsize { + unsigned short ws_row; /* rows, in characters */ + unsigned short ws_col; /* columns, in characters */ + unsigned short ws_xpixel; /* horizontal size, pixels */ + unsigned short ws_ypixel; /* vertical size, pixels */ +}; + +struct tchars { + char t_intrc; /* interrupt */ + char t_quitc; /* quit */ + char t_startc; /* start output */ + char t_stopc; /* stop output */ + char t_eofc; /* end-of-file */ + char t_brkc; /* input delimiter (like nl) */ +}; +struct ltchars { + char t_suspc; /* stop process signal */ + char t_dsuspc; /* delayed stop process signal */ + char t_rprntc; /* reprint line */ + char t_flushc; /* flush output (toggles) */ + char t_werasc; /* word erase */ + char t_lnextc; /* literal next character */ +}; + +/* +* Structure for TIOCGETP and TIOCSETP ioctls. +*/ + +struct sgttyb { + char sg_ispeed; /* input speed */ + char sg_ospeed; /* output speed */ + char sg_erase; /* erase character */ + char sg_kill; /* kill character */ + short sg_flags; /* mode flags */ +}; + +/* + * Pun for SUN. + */ +struct ttysize { + unsigned short ts_lines; + unsigned short ts_cols; + unsigned short ts_xxx; + unsigned short ts_yyy; +}; +#define TIOCGSIZE TIOCGWINSZ +#define TIOCSSIZE TIOCSWINSZ + + + + + +#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ +#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ +#define TIOCHPCL _IO('t', 2) /* hang up on last close */ +#define TIOCMODG _IOR('t', 3, int) /* get modem control state */ +#define TIOCMODS _IOW('t', 4, int) /* set modem control state */ +#define TIOCM_LE 0001 /* line enable */ +#define TIOCM_DTR 0002 /* data terminal ready */ +#define TIOCM_RTS 0004 /* request to send */ +#define TIOCM_ST 0010 /* secondary transmit */ +#define TIOCM_SR 0020 /* secondary receive */ +#define TIOCM_CTS 0040 /* clear to send */ +#define TIOCM_CAR 0100 /* carrier detect */ +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RNG 0200 /* ring */ +#define TIOCM_RI TIOCM_RNG +#define TIOCM_DSR 0400 /* data set ready */ +#define TIOCGETP _IOR('t', 8,struct sgttyb) /* get parameters -- gtty */ +#define TIOCSETP _IOW('t', 9,struct sgttyb) /* set parameters -- stty */ +#define TIOCSETN _IOW('t',10,struct sgttyb) /* as above, but no flushtty */ +#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ +#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ +#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ +#define TIOCSETC _IOW('t',17,struct tchars) /* set special characters */ +#define TIOCGETC _IOR('t',18,struct tchars) /* get special characters */ +#define TANDEM 0x00000001 /* send stopc on out q full */ +#define CBREAK 0x00000002 /* half-cooked mode */ +#define LCASE 0x00000004 /* simulate lower case */ +#define ECHO 0x00000008 /* echo input */ +#define CRMOD 0x00000010 /* map \r to \r\n on output */ +#define RAW 0x00000020 /* no i/o processing */ +#define ODDP 0x00000040 /* get/send odd parity */ +#define EVENP 0x00000080 /* get/send even parity */ +#define ANYP 0x000000c0 /* get any parity/send none */ +#define CRDELAY 0x00000300 /* \r delay */ +#define CR0 0x00000000 +#define CR1 0x00000100 /* tn 300 */ +#define CR2 0x00000200 /* tty 37 */ +#define CR3 0x00000300 /* concept 100 */ +#define TBDELAY 0x00000c00 /* horizontal tab delay */ +#define TAB0 0x00000000 +#define TAB1 0x00000400 /* tty 37 */ +#define TAB2 0x00000800 +#define XTABS 0x00000c00 /* expand tabs on output */ +#define BSDELAY 0x00001000 /* \b delay */ +#define BS0 0x00000000 +#define BS1 0x00001000 +#define VTDELAY 0x00002000 /* vertical tab delay */ +#define FF0 0x00000000 +#define FF1 0x00002000 /* tty 37 */ +#define NLDELAY 0x0000c000 /* \n delay */ +#define NL0 0x00000000 +#define NL1 0x00004000 /* tty 37 */ +#define NL2 0x00008000 /* vt05 */ +#define NL3 0x0000c000 +#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) +#define TOSTOP 0x00010000 /* SIGSTOP on bckgnd output */ +#define PRTERA 0x00020000 /* \ ... / erase */ +#define CRTERA 0x00040000 /* " \b " to wipe out char */ +#define TILDE 0x00080000 /* hazeltine tilde kludge */ +#define FLUSHO 0x00100000 /* flush output to terminal */ +#define LITOUT 0x00200000 /* literal output */ +#define CRTBS 0x00400000 /* do backspacing for crt */ +#define MDMBUF 0x00800000 /* dtr pacing */ +#define NOHANG 0x01000000 /* no SIGHUP on carrier drop */ +#define L001000 0x02000000 +#define CRTKIL 0x04000000 /* kill line with " \b " */ +#define PASS8 0x08000000 +#define CTLECH 0x10000000 /* echo control chars as ^X */ +#define PENDIN 0x20000000 /* tp->t_rawq needs reread */ +#define DECCTQ 0x40000000 /* only ^Q starts after ^S */ +#define NOFLUSH 0x80000000 /* no output flush on signal */ +#define TIOCCONS _IOW('t', 98, int) /* become virtual console */ +#ifdef _BSD_INCLUDES +/* + * Added for 4.3 BSD. + */ +#define NOFLSH NOFLUSH /* no output flush on signal */ +#endif /* _BSD_INCLUDES */ + + /* locals, from 127 down */ +#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ +#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ +#define TIOCLSET _IOW('t', 125, int) /* set entire mode word */ +#define TIOCLGET _IOR('t', 124, int) /* get local modes */ +#define LCRTBS (CRTBS>>16) +#define LPRTERA (PRTERA>>16) +#define LCRTERA (CRTERA>>16) +#define LTILDE (TILDE>>16) +#define LMDMBUF (MDMBUF>>16) +#define LLITOUT (LITOUT>>16) +#define LTOSTOP (TOSTOP>>16) +#define LFLUSHO (FLUSHO>>16) +#define LNOHANG (NOHANG>>16) +#define LCRTKIL (CRTKIL>>16) +#define LPASS8 (PASS8>>16) +#define LCTLECH (CTLECH>>16) +#define LPENDIN (PENDIN>>16) +#define LDECCTQ (DECCTQ>>16) +#define LNOFLSH (NOFLUSH>>16) +#define TIOCSBRK _IO('t', 123) /* set break bit */ +#define TIOCCBRK _IO('t', 122) /* clear break bit */ +#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ +#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ +#define TIOCGPGRP _IOR('t', 119, int) /* get process group */ +#define TIOCSPGRP _IOW('t', 118, int) /* set process gorup */ +#define TIOCSLTC _IOW('t',117,struct ltchars) /* set local special chars */ +#define TIOCGLTC _IOR('t',116,struct ltchars) /* get local special chars */ +#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ +#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ +#define TIOCNOTTY _IO('t', 113) /* void tty association */ +#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ +#define TIOCPKT_DATA 0x00 /* data packet */ +#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ +#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ +#define TIOCPKT_STOP 0x04 /* stop output */ +#define TIOCPKT_START 0x08 /* start output */ +#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ +#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ +#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ +#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ +#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ +#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ +#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ +#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ +#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ +#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ +#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ +#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ +#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ + +#define OTTYDISC 0 /* old, v7 std tty driver */ +#define NETLDISC 1 /* line discip for berk net */ +#define NTTYDISC 2 /* new tty discipline */ +#define TABLDISC 3 /* tablet discipline */ +#define SLIPDISC 4 /* serial IP discipline */ + +#define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ +#define FIONCLEX _IO('f', 2) /* remove exclusive use */ +/* another local */ + +#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ +#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ +#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ + +#define FIOSETOWN _IOW('f', 124, int) /* set owner */ +#define FIOGETOWN _IOR('f', 123, int) /* get owner */ + + +#endif /* 0 */ + +int ioctl( int fd, int cmd, ...); + + +#endif /* ! _POSIX_SOURCE */ +#endif /* ! __STRICT_ANSI__ */ +#endif /* ! __dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_ioctl_h_ */ + diff --git a/contrib/media/updf/include/sys/mman.h b/contrib/media/updf/include/sys/mman.h new file mode 100644 index 0000000000..1b85e18403 --- /dev/null +++ b/contrib/media/updf/include/sys/mman.h @@ -0,0 +1,34 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_mman_h_ +#define __dj_include_sys_mman_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* protections are chosen from these bits, or-ed together */ +#define PROT_NONE 0 /* no access to these pages */ +#define PROT_READ 0x1 /* pages can be read */ +#define PROT_WRITE 0x2 /* pages can be written */ +#define PROT_EXEC 0 /* pages can be executed - not used */ + +extern int mprotect(void *addr, size_t len, int prot); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_mman_h_ */ diff --git a/contrib/media/updf/include/sys/mono.h b/contrib/media/updf/include/sys/mono.h new file mode 100644 index 0000000000..4227938835 --- /dev/null +++ b/contrib/media/updf/include/sys/mono.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_mono_h_ +#define __dj_include_sys_mono_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +void _mono_clear(void); +void _mono_printf(const char *fmt, ...) __attribute__((format(printf,1,2))); +void _mono_putc(int c); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_mono_h_ */ diff --git a/contrib/media/updf/include/sys/movedata.h b/contrib/media/updf/include/sys/movedata.h new file mode 100644 index 0000000000..7439e37ff9 --- /dev/null +++ b/contrib/media/updf/include/sys/movedata.h @@ -0,0 +1,60 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_movedata_h_ +#define __dj_include_sys_movedata_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <sys/djtypes.h> + +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t + +/* This header is intended to be included only by other + headers, like <go32.h> and <string.h>. You may + include this directly, but it will be non-portable. */ + +/* These lengths are in bytes, optimized for speed */ +void dosmemget(unsigned long _offset, size_t _length, void *_buffer); +void dosmemput(const void *_buffer, size_t _length, unsigned long _offset); + +/* The lengths here are in TRANSFERS, not bytes! */ +void _dosmemgetb(unsigned long _offset, size_t _xfers, void *_buffer); +void _dosmemgetw(unsigned long _offset, size_t _xfers, void *_buffer); +void _dosmemgetl(unsigned long _offset, size_t _xfers, void *_buffer); +void _dosmemputb(const void *_buffer, size_t _xfers, unsigned long _offset); +void _dosmemputw(const void *_buffer, size_t _xfers, unsigned long _offset); +void _dosmemputl(const void *_buffer, size_t _xfers, unsigned long _offset); + + +/* This length is in bytes, optimized for speed */ +void movedata(unsigned _source_selector, unsigned _source_offset, + unsigned _dest_selector, unsigned _dest_offset, + size_t _length); + +/* The lengths here are in TRANSFERS, not bytes! */ +void _movedatab(unsigned, unsigned, unsigned, unsigned, size_t); +void _movedataw(unsigned, unsigned, unsigned, unsigned, size_t); +void _movedatal(unsigned, unsigned, unsigned, unsigned, size_t); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_movedata_h_ */ diff --git a/contrib/media/updf/include/sys/nearptr.h b/contrib/media/updf/include/sys/nearptr.h new file mode 100644 index 0000000000..6c89959c3c --- /dev/null +++ b/contrib/media/updf/include/sys/nearptr.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_nearptr_h_ +#define __dj_include_sys_nearptr_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* Functions to enable "near" pointer access to DOS memory under DPMI + CW Sandmann 7-95 NO WARRANTY: WARNING, since these functions disable + memory protection, they MAY DESTROY EVERYTHING ON YOUR COMPUTER! */ + +int __djgpp_nearptr_enable(void); /* Returns 0 if feature not avail */ +void __djgpp_nearptr_disable(void); /* Enables protection */ +extern int __djgpp_selector_limit; /* Limit on CS and on DS if prot */ +extern int __djgpp_base_address; /* Used in calculation below */ + +#define __djgpp_conventional_base (-__djgpp_base_address) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_nearptr_h_ */ diff --git a/contrib/media/updf/include/sys/param.h b/contrib/media/updf/include/sys/param.h new file mode 100644 index 0000000000..d8e89b160e --- /dev/null +++ b/contrib/media/updf/include/sys/param.h @@ -0,0 +1,31 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_param_h_ +#define __dj_include_sys_param_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <limits.h> + +#define MAXPATHLEN PATH_MAX +#define MAXGETHOSTNAME 128 + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_param_h_ */ diff --git a/contrib/media/updf/include/sys/poll.h b/contrib/media/updf/include/sys/poll.h new file mode 100644 index 0000000000..4085b785ee --- /dev/null +++ b/contrib/media/updf/include/sys/poll.h @@ -0,0 +1,74 @@ +/* Compatibility definitions for System V `poll' interface. + Copyright (C) 1994,1996-2001,2004,2005,2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_POLL_H +#define _SYS_POLL_H 1 + +#include <features.h> + +/* Get the platform dependent bits of `poll'. */ +#include <bits/poll.h> +#ifdef __USE_GNU +/* Get the __sigset_t definition. */ +# include <bits/sigset.h> +/* Get the timespec definition. */ +# define __need_timespec +# include <time.h> +#endif + + +/* Type used for the number of file descriptors. */ +typedef unsigned long int nfds_t; + +/* Data structure describing a polling request. */ +struct pollfd + { + int fd; /* File descriptor to poll. */ + short int events; /* Types of events poller cares about. */ + short int revents; /* Types of events that actually occurred. */ + }; + + +__BEGIN_DECLS + +/* Poll the file descriptors described by the NFDS structures starting at + FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for + an event to occur; if TIMEOUT is -1, block until an event occurs. + Returns the number of file descriptors with events, zero if timed out, + or -1 for errors. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout); + +#ifdef __USE_GNU +/* Like poll, but before waiting the threads signal mask is replaced + with that specified in the fourth parameter. For better usability, + the timeout value is specified using a TIMESPEC object. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int ppoll (struct pollfd *__fds, nfds_t __nfds, + __const struct timespec *__timeout, + __const __sigset_t *__ss); +#endif + +__END_DECLS + +#endif /* sys/poll.h */ diff --git a/contrib/media/updf/include/sys/resource.h b/contrib/media/updf/include/sys/resource.h new file mode 100644 index 0000000000..bb47237cb9 --- /dev/null +++ b/contrib/media/updf/include/sys/resource.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_resource_h_ +#define __dj_include_sys_resource_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <time.h> + +#define RUSAGE_SELF 0 /* calling process */ +#define RUSAGE_CHILDREN -1 /* terminated child processes */ + +struct rusage { + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ + long ru_maxrss; /* integral max resident set size */ + long ru_ixrss; /* integral shared text memory size */ + long ru_idrss; /* integral unshared data size */ + long ru_isrss; /* integral unshared stack size */ + long ru_minflt; /* page reclaims */ + long ru_majflt; /* page faults */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary context switches */ +}; + +#define RLIMIT_CPU 0 /* cpu time in milliseconds */ +#define RLIMIT_FSIZE 1 /* maximum file size */ +#define RLIMIT_DATA 2 /* data size */ +#define RLIMIT_STACK 3 /* stack size */ +#define RLIMIT_CORE 4 /* core file size */ +#define RLIMIT_RSS 5 /* resident set size */ +#define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */ +#define RLIMIT_NPROC 7 /* number of processes */ +#define RLIMIT_NOFILE 8 /* number of open files */ + +#define RLIM_NLIMITS 9 /* number of resource limits */ +#define RLIM_INFINITY ((long) ((1UL << 31) - 1UL)) + +struct rlimit { + long rlim_cur; /* current (soft) limit */ + long rlim_max; /* maximum value for rlim_cur */ +}; + +int getrusage(int _who, struct rusage *_rusage); +int getrlimit(int _rltype, struct rlimit *_rlimit); +int setrlimit(int _rltype, const struct rlimit *_rlimit); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_resource_h_ */ diff --git a/contrib/media/updf/include/sys/segments.h b/contrib/media/updf/include/sys/segments.h new file mode 100644 index 0000000000..d4889ecdd2 --- /dev/null +++ b/contrib/media/updf/include/sys/segments.h @@ -0,0 +1,52 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_segments_h_ +#define __dj_include_sys_segments_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +static __inline__ int +_my_cs(void) +{ + unsigned short result; + __asm__("movw %%cs,%0" : "=r" (result)); + return result; +} + +static __inline__ int +_my_ds(void) +{ + unsigned short result; + __asm__("movw %%ds,%0" : "=r" (result)); + return result; +} + +static __inline__ int +_my_ss(void) +{ + unsigned short result; + __asm__("movw %%ss,%0" : "=r" (result)); + return result; +} + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_segment_h_ */ diff --git a/contrib/media/updf/include/sys/socket.h b/contrib/media/updf/include/sys/socket.h new file mode 100644 index 0000000000..b7a7b34e3c --- /dev/null +++ b/contrib/media/updf/include/sys/socket.h @@ -0,0 +1,410 @@ +#ifndef _SYS_SOCKET_H +#define _SYS_SOCKET_H + +#include <sys/cdefs.h> +#include <sys/types.h> +#include <inttypes.h> + +__BEGIN_DECLS + +#define SOL_SOCKET 1 + +#define SO_DEBUG 1 +#define SO_REUSEADDR 2 +#define SO_TYPE 3 +#define SO_ERROR 4 +#define SO_DONTROUTE 5 +#define SO_BROADCAST 6 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#define SO_KEEPALIVE 9 +#define SO_OOBINLINE 10 +#define SO_NO_CHECK 11 +#define SO_PRIORITY 12 +#define SO_LINGER 13 +#define SO_BSDCOMPAT 14 +/* To add :#define SO_REUSEPORT 15 */ +#define SO_PASSCRED 16 +#define SO_PEERCRED 17 +#define SO_RCVLOWAT 18 +#define SO_SNDLOWAT 19 +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 +#define SO_ACCEPTCONN 30 + +/* Security levels - as per NRL IPv6 - don't actually do anything */ +#define SO_SECURITY_AUTHENTICATION 22 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 +#define SO_SECURITY_ENCRYPTION_NETWORK 24 + +#define SO_BINDTODEVICE 25 + +/* Socket filtering */ +#define SO_ATTACH_FILTER 26 +#define SO_DETACH_FILTER 27 + +#define SO_PEERNAME 28 +#define SO_TIMESTAMP 29 +#define SCM_TIMESTAMP SO_TIMESTAMP + +/* Socket types. */ +#define SOCK_STREAM 1 /* stream (connection) socket */ +#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ +#define SOCK_RAW 3 /* raw socket */ +#define SOCK_RDM 4 /* reliably-delivered message */ +#define SOCK_SEQPACKET 5 /* sequential packet socket */ +#define SOCK_PACKET 10 /* linux specific way of */ + /* getting packets at the dev */ + /* level. For writing rarp and */ + /* other similar things on the */ + /* user level. */ + +struct sockaddr { + sa_family_t sa_family; + char sa_data[14]; +}; + +struct linger { + int l_onoff; + int l_linger; +}; + +struct iovec { + void* iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ + size_t iov_len; /* Must be size_t (1003.1g) */ +}; + +struct msghdr { + void* msg_name; /* Socket name */ + int msg_namelen; /* Length of name */ + struct iovec* msg_iov; /* Data blocks */ + size_t msg_iovlen; /* Number of blocks */ + void* msg_control; /* Per protocol magic (eg BSD file descriptor passing) */ + size_t msg_controllen; /* Length of cmsg list */ + unsigned msg_flags; +}; + +struct cmsghdr { + size_t cmsg_len; /* data byte count, including hdr */ + int cmsg_level; /* originating protocol */ + int cmsg_type; /* protocol-specific type */ +}; + +#define UIO_FASTIOV 8 +#define UIO_MAXIOV 1024 + +/* "Socket"-level control message types: */ + +#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ +#define SCM_CREDENTIALS 0x02 /* rw: struct ucred */ +#define SCM_CONNECT 0x03 /* rw: struct scm_connect */ + +struct ucred { + unsigned int pid; + unsigned int uid; + unsigned int gid; +}; + +/* Supported address families. */ +#define AF_UNSPEC 0 +#define AF_UNIX 1 /* Unix domain sockets */ +#define AF_LOCAL 1 /* POSIX name for AF_UNIX */ +#define AF_INET 2 /* Internet IP Protocol */ +#define AF_AX25 3 /* Amateur Radio AX.25 */ +#define AF_IPX 4 /* Novell IPX */ +#define AF_APPLETALK 5 /* AppleTalk DDP */ +#define AF_NETROM 6 /* Amateur Radio NET/ROM */ +#define AF_BRIDGE 7 /* Multiprotocol bridge */ +#define AF_ATMPVC 8 /* ATM PVCs */ +#define AF_X25 9 /* Reserved for X.25 project */ +#define AF_INET6 10 /* IP version 6 */ +#define AF_ROSE 11 /* Amateur Radio X.25 PLP */ +#define AF_DECnet 12 /* Reserved for DECnet project */ +#define AF_NETBEUI 13 /* Reserved for 802.2LLC project*/ +#define AF_SECURITY 14 /* Security callback pseudo AF */ +#define AF_KEY 15 /* PF_KEY key management API */ +#define AF_NETLINK 16 +#define AF_ROUTE AF_NETLINK /* Alias to emulate 4.4BSD */ +#define AF_PACKET 17 /* Packet family */ +#define AF_ASH 18 /* Ash */ +#define AF_ECONET 19 /* Acorn Econet */ +#define AF_ATMSVC 20 /* ATM SVCs */ +#define AF_SNA 22 /* Linux SNA Project (nutters!) */ +#define AF_IRDA 23 /* IRDA sockets */ +#define AF_PPPOX 24 /* PPPoX sockets */ +#define AF_WANPIPE 25 /* Wanpipe API Sockets */ +#define AF_MAX 32 /* For now.. */ + +/* Protocol families, same as address families. */ +#define PF_UNSPEC AF_UNSPEC +#define PF_UNIX AF_UNIX +#define PF_LOCAL AF_LOCAL +#define PF_INET AF_INET +#define PF_AX25 AF_AX25 +#define PF_IPX AF_IPX +#define PF_APPLETALK AF_APPLETALK +#define PF_NETROM AF_NETROM +#define PF_BRIDGE AF_BRIDGE +#define PF_ATMPVC AF_ATMPVC +#define PF_X25 AF_X25 +#define PF_INET6 AF_INET6 +#define PF_ROSE AF_ROSE +#define PF_DECnet AF_DECnet +#define PF_NETBEUI AF_NETBEUI +#define PF_SECURITY AF_SECURITY +#define PF_KEY AF_KEY +#define PF_NETLINK AF_NETLINK +#define PF_ROUTE AF_ROUTE +#define PF_PACKET AF_PACKET +#define PF_ASH AF_ASH +#define PF_ECONET AF_ECONET +#define PF_ATMSVC AF_ATMSVC +#define PF_SNA AF_SNA +#define PF_IRDA AF_IRDA +#define PF_PPPOX AF_PPPOX +#define PF_WANPIPE AF_WANPIPE +#define PF_MAX AF_MAX + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Flags we can use with send/ and recv. + Added those for 1003.1g not all are supported yet */ +#define MSG_OOB 1 +#define MSG_PEEK 2 +#define MSG_DONTROUTE 4 +#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */ +#define MSG_CTRUNC 8 +#define MSG_PROBE 0x10 /* Do not send. Only probe path f.e. for MTU */ +#define MSG_TRUNC 0x20 +#define MSG_DONTWAIT 0x40 /* Nonblocking io */ +#define MSG_EOR 0x80 /* End of record */ +#define MSG_WAITALL 0x100 /* Wait for a full request */ +#define MSG_FIN 0x200 +#define MSG_EOF MSG_FIN +#define MSG_SYN 0x400 +#define MSG_CONFIRM 0x800 /* Confirm path validity */ +#define MSG_RST 0x1000 +#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ +#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ +#define MSG_MORE 0x8000 /* Sender will send more */ + +/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ +#define SOL_IP 0 +/* #define SOL_ICMP 1 No-no-no! Due to Linux :-) we cannot use SOL_ICMP=1 */ +#define SOL_TCP 6 +#define SOL_UDP 17 +#define SOL_IPV6 41 +#define SOL_ICMPV6 58 +#define SOL_RAW 255 +#define SOL_IPX 256 +#define SOL_AX25 257 +#define SOL_ATALK 258 +#define SOL_NETROM 259 +#define SOL_ROSE 260 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level) */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level) */ +#define SOL_IRDA 266 + +/* IPX options */ +#define IPX_TYPE 1 + +#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) +#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) +#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg)) + +static inline struct cmsghdr* __cmsg_nxthdr(void *__ctl, size_t __size, struct cmsghdr *__cmsg) +{ + struct cmsghdr * __ptr; + __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len)); + if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size) + return (struct cmsghdr *)0; + return __ptr; +} + +static inline struct cmsghdr* cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) +{ + return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); +} + +#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) +#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) +#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) + +#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \ + (struct cmsghdr *)(ctl) : \ + (struct cmsghdr *)NULL) +#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen) + +struct sockaddr_storage { + sa_family_t ss_family; + uint32_t __ss_align; + char __ss_padding[(128 - (2 * sizeof (uint32_t ))) ]; +}; + +#ifndef SOCK_DGRAM +/* the Linux kernel headers suck really badly on non-x86 */ +#define SOCK_STREAM 1 /* stream (connection) socket */ +#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ +#define SOCK_RAW 3 /* raw socket */ +#define SOCK_RDM 4 /* reliably-delivered message */ +#define SOCK_SEQPACKET 5 /* sequential packet socket */ +#define SOCK_PACKET 10 /* linux specific way of */ +#endif + +int socket(int domain, int type, int protocol) ; +int accept(int s, struct sockaddr *addr, socklen_t *addrlen) ; +int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) ; +int bind(int sockfd, const struct sockaddr *my_addr, socklen_t addrlen) ; +int recv(int s, void *buf, size_t len, int flags) ; +int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) ; +int recvmsg(int s, struct msghdr *msg, int flags) ; +int send(int s, const void *msg, size_t len, int flags) ; +int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) ; +int sendmsg(int s, const struct msghdr *msg, int flags) ; + +int getpeername(int s, struct sockaddr *name, socklen_t *namelen) ; +int getsockname(int s , struct sockaddr * name , socklen_t * namelen) ; + +int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) ; +int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) ; + +int listen(int s, int backlog) ; + +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 +int shutdown(int s, int how) ; + +int socketpair(int d, int type, int protocol, int sv[2]); + +/* currently not supported: */ +#define NI_NOFQDN 1 + +#define NI_NUMERICHOST 2 +#define NI_NAMEREQD 4 +#define NI_NUMERICSERV 8 +#define NI_DGRAM 16 + +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; + +int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags) ; +int getaddrinfo(const char *node, const char *service, const struct + addrinfo *hints, struct addrinfo **res) ; +void freeaddrinfo(struct addrinfo *res) ; +const char *gai_strerror(int errcode) ; + +#define EAI_FAMILY -1 +#define EAI_SOCKTYPE -2 +#define EAI_BADFLAGS -3 +#define EAI_NONAME -4 +#define EAI_SERVICE -5 +#define EAI_ADDRFAMILY -6 +#define EAI_NODATA -7 +#define EAI_MEMORY -8 +#define EAI_FAIL -9 +#define EAI_AGAIN -10 +#define EAI_SYSTEM -11 + +#define AI_NUMERICHOST 1 +#define AI_CANONNAME 2 +#define AI_PASSIVE 4 + +/* Linux-specific socket ioctls */ +#define SIOCINQ FIONREAD +#define SIOCOUTQ TIOCOUTQ + +/* Routing table calls. */ +#define SIOCADDRT 0x890B /* add routing table entry */ +#define SIOCDELRT 0x890C /* delete routing table entry */ +#define SIOCRTMSG 0x890D /* call to routing system */ + +/* Socket configuration controls. */ +#define SIOCGIFNAME 0x8910 /* get iface name */ +#define SIOCSIFLINK 0x8911 /* set iface channel */ +#define SIOCGIFCONF 0x8912 /* get iface list */ +#define SIOCGIFFLAGS 0x8913 /* get flags */ +#define SIOCSIFFLAGS 0x8914 /* set flags */ +#define SIOCGIFADDR 0x8915 /* get PA address */ +#define SIOCSIFADDR 0x8916 /* set PA address */ +#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ +#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ +#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ +#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ +#define SIOCGIFNETMASK 0x891b /* get network PA mask */ +#define SIOCSIFNETMASK 0x891c /* set network PA mask */ +#define SIOCGIFMETRIC 0x891d /* get metric */ +#define SIOCSIFMETRIC 0x891e /* set metric */ +#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ +#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ +#define SIOCGIFMTU 0x8921 /* get MTU size */ +#define SIOCSIFMTU 0x8922 /* set MTU size */ +#define SIOCSIFNAME 0x8923 /* set interface name */ +#define SIOCSIFHWADDR 0x8924 /* set hardware address */ +#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ +#define SIOCSIFENCAP 0x8926 +#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ +#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ +#define SIOCSIFSLAVE 0x8930 +#define SIOCADDMULTI 0x8931 /* Multicast address lists */ +#define SIOCDELMULTI 0x8932 +#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ +#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ +#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ +#define SIOCGIFPFLAGS 0x8935 +#define SIOCDIFADDR 0x8936 /* delete PA address */ +#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ +#define SIOCGIFCOUNT 0x8938 /* get number of devices */ + +#define SIOCGIFBR 0x8940 /* Bridging support */ +#define SIOCSIFBR 0x8941 /* Set bridging options */ + +#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ +#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ + +#define SIOCGIFDIVERT 0x8944 /* Frame diversion support */ +#define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */ + +#define SIOCETHTOOL 0x8946 /* Ethtool interface */ + +/* ARP cache control calls. */ + /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ +#define SIOCDARP 0x8953 /* delete ARP table entry */ +#define SIOCGARP 0x8954 /* get ARP table entry */ +#define SIOCSARP 0x8955 /* set ARP table entry */ + +/* RARP cache control calls. */ +#define SIOCDRARP 0x8960 /* delete RARP table entry */ +#define SIOCGRARP 0x8961 /* get RARP table entry */ +#define SIOCSRARP 0x8962 /* set RARP table entry */ + +/* Driver configuration calls */ + +#define SIOCGIFMAP 0x8970 /* Get device parameters */ +#define SIOCSIFMAP 0x8971 /* Set device parameters */ + +/* DLCI configuration calls */ + +#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ +#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ + +#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ + +#define _LINUX_SOCKET_H + +__END_DECLS + +#endif diff --git a/contrib/media/updf/include/sys/stat.h b/contrib/media/updf/include/sys/stat.h new file mode 100644 index 0000000000..80e4945275 --- /dev/null +++ b/contrib/media/updf/include/sys/stat.h @@ -0,0 +1,128 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_stat_h_ +#define __dj_include_sys_stat_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#define S_ISBLK(m) (((m) & 0xf000) == 0x1000) +#define S_ISCHR(m) (((m) & 0xf000) == 0x2000) +#define S_ISDIR(m) (((m) & 0xf000) == 0x3000) +#define S_ISFIFO(m) (((m) & 0xf000) == 0x4000) +#define S_ISREG(m) (((m) & 0xf000) == 0x0000) + +#define S_ISUID 0x80000000 +#define S_ISGID 0x40000000 + +#define S_IRUSR 00400 +#define S_IRGRP 00040 +#define S_IROTH 00004 +#define S_IWUSR 00200 +#define S_IWGRP 00020 +#define S_IWOTH 00002 +#define S_IXUSR 00100 +#define S_IXGRP 00010 +#define S_IXOTH 00001 +#define S_IRWXU 00700 +#define S_IRWXG 00070 +#define S_IRWXO 00007 + +#include <sys/types.h> +#include <sys/djtypes.h> +__DJ_time_t +#undef __DJ_time_t +#define __DJ_time_t + +struct stat { + time_t st_atime; + time_t st_ctime; + dev_t st_dev; + gid_t st_gid; + ino_t st_ino; + mode_t st_mode; + time_t st_mtime; + nlink_t st_nlink; + off_t st_size; + off_t st_blksize; + uid_t st_uid; + dev_t st_rdev; /* unused */ + int st_blocks; +}; + +int chmod(const char *_path, mode_t _mode); +int fstat(int _fildes, struct stat *_buf); +int mkdir(const char *_path, mode_t _mode); +int mkfifo(const char *_path, mode_t _mode); +int stat(const char *_path, struct stat *_buf); +mode_t umask(mode_t _cmask); + +#ifndef _POSIX_SOURCE + +/* POSIX.1 doesn't mention these at all */ + +#define S_IFMT 0xf000 + +#define S_IFREG 0x0000 +#define S_IFBLK 0x1000 +#define S_IFCHR 0x2000 +#define S_IFDIR 0x3000 +#define S_IFIFO 0x4000 +#define S_IFFIFO S_IFIFO + +#define S_IFLABEL 0x5000 +#define S_ISLABEL(m) (((m) & 0xf000) == 0x5000) + +void _fixpath(const char *, char *); +unsigned short _get_magic(const char *, int); +int _is_executable(const char *, int, const char *); +int mknod(const char *_path, mode_t _mode, dev_t _dev); +char * _truename(const char *, char *); + +/* Bit-mapped variable _djstat_flags describes what expensive + f?stat() features our application needs. If you don't need a + feature, set its bit in the variable. By default, all the + bits are cleared (i.e., you get the most expensive code). */ +#define _STAT_INODE 1 /* should we bother getting inode numbers? */ +#define _STAT_EXEC_EXT 2 /* get execute bits from file extension? */ +#define _STAT_EXEC_MAGIC 4 /* get execute bits from magic signature? */ +#define _STAT_DIRSIZE 8 /* compute directory size? */ +#define _STAT_ROOT_TIME 0x10 /* try to get root dir time stamp? */ +#define _STAT_WRITEBIT 0x20 /* fstat() needs write bit? */ + +extern unsigned short _djstat_flags; + +/* Bit-mapped variable _djstat_fail_bits describes which individual + undocumented features f?stat() failed to use. To get a human- + readable description of the bits, call _djstat_describe_lossage(). */ +#define _STFAIL_SDA 1 /* Get SDA call failed */ +#define _STFAIL_OSVER 2 /* Unsupported DOS version */ +#define _STFAIL_BADSDA 4 /* Bad pointer to SDA */ +#define _STFAIL_TRUENAME 8 /* _truename() failed */ +#define _STFAIL_HASH 0x10 /* inode defaults to hashing */ +#define _STFAIL_LABEL 0x20 /* Root dir, but no volume label */ +#define _STFAIL_DCOUNT 0x40 /* dirent_count ridiculously large */ +#define _STFAIL_WRITEBIT 0x80 /* fstat() failed to get write access bit */ +#define _STFAIL_DEVNO 0x100 /* fstat() failed to get device number */ +#define _STFAIL_BADSFT 0x200 /* SFT entry found, but can't be trusted */ +#define _STFAIL_SFTIDX 0x400 /* bad SFT index in JFT */ +#define _STFAIL_SFTNF 0x800 /* file entry not found in SFT array */ + +extern unsigned short _djstat_fail_bits; + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_stat_h_ */ diff --git a/contrib/media/updf/include/sys/sysmacros.h b/contrib/media/updf/include/sys/sysmacros.h new file mode 100644 index 0000000000..7fd26fa971 --- /dev/null +++ b/contrib/media/updf/include/sys/sysmacros.h @@ -0,0 +1,31 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_sysmacros_h_ +#define __dj_include_sys_sysmacros_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define major(x) ((int)(((unsigned)(x) >> 8) & 0xff)) +#define minor(x) ((int)((x) & 0xff)) + +#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_sysmacros_h_ */ diff --git a/contrib/media/updf/include/sys/system.h b/contrib/media/updf/include/sys/system.h new file mode 100644 index 0000000000..d55428b9e3 --- /dev/null +++ b/contrib/media/updf/include/sys/system.h @@ -0,0 +1,74 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_system_h__ +#define __dj_include_sys_system_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +extern int _shell_command (const char *_prog, const char *_cmdline); +extern int _is_unixy_shell (const char *_prog); +extern int _is_dos_shell (const char *_prog); + +/* Checking for special executable formats */ + +typedef struct { + char magic[16]; + int struct_length; + char go32[16]; + unsigned char buffer[0]; +} _v1_stubinfo; + + +typedef struct { + union { + unsigned version:8; /* The version of DJGPP created that COFF exe */ + struct { + unsigned minor:4; /* The minor version of DJGPP */ + unsigned major:4; /* The major version of DJGPP */ + } v; + } version; + + unsigned object_format:4; /* What an object format */ +# define _V2_OBJECT_FORMAT_UNKNOWN 0x00 +# define _V2_OBJECT_FORMAT_COFF 0x01 + + unsigned exec_format:4; /* What an executable format */ +# define _V2_EXEC_FORMAT_UNKNOWN 0x00 +# define _V2_EXEC_FORMAT_COFF 0x01 +# define _V2_EXEC_FORMAT_STUBCOFF 0x02 +# define _V2_EXEC_FORMAT_EXE 0x03 +# define _V2_EXEC_FORMAT_UNIXSCRIPT 0x04 + + unsigned valid:1; /* Only when nonzero all the information is valid */ + + unsigned has_stubinfo:1; /* When nonzero the stubinfo info is valid */ + + unsigned unused:14; + + _v1_stubinfo *stubinfo; +} _v2_prog_type; + +/* When program == NULL you have to pass a valid file handle + in fd, otherwise the file is opened and closed by the function */ +const _v2_prog_type *_check_v2_prog(const char *program, int fd); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_sys_system_h__ */ diff --git a/contrib/media/updf/include/sys/time.h b/contrib/media/updf/include/sys/time.h new file mode 100644 index 0000000000..3c23fee9f3 --- /dev/null +++ b/contrib/media/updf/include/sys/time.h @@ -0,0 +1,47 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_time_h_ +#define __dj_include_sys_time_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <time.h> + +#define ITIMER_REAL 0 +#define ITIMER_PROF 1 + +struct itimerval { + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ +}; + +/* Applications should set this to the number of microseconds between + timer ticks if they reprogram the system clock. By default, it is + set to -1, which causes setitimer to use the default 54.925 msec + clock granularity. */ +extern long __djgpp_clock_tick_interval; + +int getitimer(int _which, struct itimerval *_value); +int setitimer(int _which, struct itimerval *_value, struct itimerval *_ovalue); +int utimes(const char *_file, struct timeval _tvp[2]); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_time_h_ */ diff --git a/contrib/media/updf/include/sys/timeb.h b/contrib/media/updf/include/sys/timeb.h new file mode 100644 index 0000000000..f6b2028f27 --- /dev/null +++ b/contrib/media/updf/include/sys/timeb.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_timeb_h_ +#define __dj_include_sys_timeb_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#include <sys/djtypes.h> + +__DJ_time_t +#undef __DJ_time_t +#define __DJ_time_t + +struct timeb +{ + time_t time; /* Seconds since the epoch */ + unsigned short millitm; + short timezone; + short dstflag; +}; + +extern int ftime(struct timeb *); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_timeb_h_ */ diff --git a/contrib/media/updf/include/sys/times.h b/contrib/media/updf/include/sys/times.h new file mode 100644 index 0000000000..e702c3b125 --- /dev/null +++ b/contrib/media/updf/include/sys/times.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_times_h_ +#define __dj_include_sys_times_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> +__DJ_clock_t +#undef __DJ_clock_t +#define __DJ_clock_t + +struct tms { + clock_t tms_utime; + clock_t tms_cstime; + clock_t tms_cutime; + clock_t tms_stime; +}; + +clock_t times(struct tms *buffer); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_times_h_ */ diff --git a/contrib/media/updf/include/sys/types.h b/contrib/media/updf/include/sys/types.h new file mode 100644 index 0000000000..79ba1f43b9 --- /dev/null +++ b/contrib/media/updf/include/sys/types.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_types_h_ +#define __dj_include_sys_types_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <sys/djtypes.h> + +typedef int dev_t; +typedef int ino_t; +typedef int mode_t; +typedef int nlink_t; + +__DJ_gid_t +#undef __DJ_gid_t +#define __DJ_gid_t +__DJ_off_t +#undef __DJ_off_t +#define __DJ_off_t +__DJ_pid_t +#undef __DJ_pid_t +#define __DJ_pid_t +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t +__DJ_ssize_t +#undef __DJ_ssize_t +#define __DJ_ssize_t +__DJ_uid_t +#undef __DJ_uid_t +#define __DJ_uid_t + +/* Allow including program to override. */ +#ifndef FD_SETSIZE +#define FD_SETSIZE 256 +#endif + +typedef struct fd_set { + unsigned char fd_bits [((FD_SETSIZE) + 7) / 8]; +} fd_set; + +#define FD_SET(n, p) ((p)->fd_bits[(n) / 8] |= (1 << ((n) & 7))) +#define FD_CLR(n, p) ((p)->fd_bits[(n) / 8] &= ~(1 << ((n) & 7))) +#define FD_ISSET(n, p) ((p)->fd_bits[(n) / 8] & (1 << ((n) & 7))) +#define FD_ZERO(p) memset ((void *)(p), 0, sizeof (*(p))) + +__DJ_time_t +#undef __DJ_time_t +#define __DJ_time_t + +#define __socklen_t_defined +typedef unsigned int socklen_t; +typedef unsigned short sa_family_t; + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_types_h_ */ diff --git a/contrib/media/updf/include/sys/user.h b/contrib/media/updf/include/sys/user.h new file mode 100644 index 0000000000..aca46e7d34 --- /dev/null +++ b/contrib/media/updf/include/sys/user.h @@ -0,0 +1,103 @@ +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs_struct +{ + long int cwd; + long int swd; + long int twd; + long int fip; + long int fcs; + long int foo; + long int fos; + long int st_space [20]; +}; + +struct user_fpxregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int twd; + unsigned short int fop; + long int fip; + long int fcs; + long int foo; + long int fos; + long int mxcsr; + long int reserved; + long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ + long int padding[56]; +}; + +struct user_regs_struct +{ + long int ebx; + long int ecx; + long int edx; + long int esi; + long int edi; + long int ebp; + long int eax; + long int xds; + long int xes; + long int xfs; + long int xgs; + long int orig_eax; + long int eip; + long int xcs; + long int eflags; + long int esp; + long int xss; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long start_code; + unsigned long start_stack; + long int signal; + int reserved; + struct user_regs_struct* u_ar0; + struct user_fpregs_struct* u_fpstate; + unsigned long int magic; + char u_comm [32]; + int u_debugreg [8]; +}; + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ diff --git a/contrib/media/updf/include/sys/utsname.h b/contrib/media/updf/include/sys/utsname.h new file mode 100644 index 0000000000..7a3abb241c --- /dev/null +++ b/contrib/media/updf/include/sys/utsname.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_utsname_h_ +#define __dj_include_sys_utsname_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +struct utsname { + char machine[9]; + char nodename[32]; + char release[9]; + char sysname[9]; + char version[9]; +}; + +int uname(struct utsname *name); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_utsname_h_ */ diff --git a/contrib/media/updf/include/sys/version.h b/contrib/media/updf/include/sys/version.h new file mode 100644 index 0000000000..3537799492 --- /dev/null +++ b/contrib/media/updf/include/sys/version.h @@ -0,0 +1,19 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ + +#undef DJGPP +#undef __DJGPP +#undef __DJGPP__ + +#define DJGPP 2 +#define __DJGPP 2 +#define __DJGPP__ 2 + +#undef DJGPP_MINOR +#undef __DJGPP_MINOR +#undef __DJGPP_MINOR__ + +#define DJGPP_MINOR 3 +#define __DJGPP_MINOR 3 +#define __DJGPP_MINOR__ 3 + diff --git a/contrib/media/updf/include/sys/vfs.h b/contrib/media/updf/include/sys/vfs.h new file mode 100644 index 0000000000..ed8c5993b3 --- /dev/null +++ b/contrib/media/updf/include/sys/vfs.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_vfs_h_ +#define __dj_include_sys_vfs_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +typedef long fsid_t[2]; + +#define MOUNT_UFS 0 +#define MOUNT_NFS 1 /* Not possible on DOS */ +#define MOUNT_CDFS 2 /* Not possible on DOS */ + +#define FS_MAGIC 0x11954 /* Taken from HP-UX */ + +struct statfs +{ + long f_type; + long f_bsize; + long f_blocks; + long f_bfree; + long f_bavail; + long f_files; + long f_ffree; + fsid_t f_fsid; + long f_magic; +}; + +extern int statfs(const char *, struct statfs *); +extern int fstatfs(int, struct statfs *); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_vfs_h_ */ diff --git a/contrib/media/updf/include/sys/wait.h b/contrib/media/updf/include/sys/wait.h new file mode 100644 index 0000000000..550e8642b4 --- /dev/null +++ b/contrib/media/updf/include/sys/wait.h @@ -0,0 +1,45 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_wait_h_ +#define __dj_include_sys_wait_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> + +#define WEXITSTATUS(stat_val) ( (stat_val) & 0x000ff) +#define WIFEXITED(stat_val) (!((stat_val) & 0x3ff00)) +#define WIFSIGNALED(stat_val) ( ((stat_val) & 0x3ff00)) +#define WIFSTOPPED(stat_val) 0 +#define WNOHANG 1 +#define WSTOPSIG(stat_val) 0 +#define WTERMSIG(stat_val) ( ((stat_val) >> 8 ) & 0x3ff) +#define WUNTRACED 0 + +__DJ_pid_t +#undef __DJ_pid_t +#define __DJ_pid_t + +pid_t wait(int *stat_loc); +pid_t waitpid(pid_t pid, int *stat_loc, int options); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_wait_h_ */ diff --git a/contrib/media/updf/include/t1.h b/contrib/media/updf/include/t1.h new file mode 100644 index 0000000000..572ec88d2f --- /dev/null +++ b/contrib/media/updf/include/t1.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __T1_H +#define __T1_H +/** +@file t1.h +@brief Implementation of the tier-1 coding (coding of code-block coefficients) (T1) + +The functions in T1.C have for goal to realize the tier-1 coding operation. The functions +in T1.C are used by some function in TCD.C. +*/ + +/** @defgroup T1 T1 - Implementation of the tier-1 coding */ +/*@{*/ + +/* ----------------------------------------------------------------------- */ +#define T1_NMSEDEC_BITS 7 + +#define T1_SIG_NE 0x0001 /**< Context orientation : North-East direction */ +#define T1_SIG_SE 0x0002 /**< Context orientation : South-East direction */ +#define T1_SIG_SW 0x0004 /**< Context orientation : South-West direction */ +#define T1_SIG_NW 0x0008 /**< Context orientation : North-West direction */ +#define T1_SIG_N 0x0010 /**< Context orientation : North direction */ +#define T1_SIG_E 0x0020 /**< Context orientation : East direction */ +#define T1_SIG_S 0x0040 /**< Context orientation : South direction */ +#define T1_SIG_W 0x0080 /**< Context orientation : West direction */ +#define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_SW|T1_SIG_W|T1_SIG_NW) +#define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W) + +#define T1_SGN_N 0x0100 +#define T1_SGN_E 0x0200 +#define T1_SGN_S 0x0400 +#define T1_SGN_W 0x0800 +#define T1_SGN (T1_SGN_N|T1_SGN_E|T1_SGN_S|T1_SGN_W) + +#define T1_SIG 0x1000 +#define T1_REFINE 0x2000 +#define T1_VISIT 0x4000 + +#define T1_NUMCTXS_ZC 9 +#define T1_NUMCTXS_SC 5 +#define T1_NUMCTXS_MAG 3 +#define T1_NUMCTXS_AGG 1 +#define T1_NUMCTXS_UNI 1 + +#define T1_CTXNO_ZC 0 +#define T1_CTXNO_SC (T1_CTXNO_ZC+T1_NUMCTXS_ZC) +#define T1_CTXNO_MAG (T1_CTXNO_SC+T1_NUMCTXS_SC) +#define T1_CTXNO_AGG (T1_CTXNO_MAG+T1_NUMCTXS_MAG) +#define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG) +#define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI) + +#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1) + +#define T1_TYPE_MQ 0 /**< Normal coding using entropy coder */ +#define T1_TYPE_RAW 1 /**< No encoding the information is store under raw format in codestream (mode switch RAW)*/ + +/* ----------------------------------------------------------------------- */ + +typedef short flag_t; + +/** +Tier-1 coding (coding of code-block coefficients) +*/ +typedef struct opj_t1 { + /** codec context */ + opj_common_ptr cinfo; + + /** MQC component */ + opj_mqc_t *mqc; + /** RAW component */ + opj_raw_t *raw; + + int *data; + flag_t *flags; + int w; + int h; + int datasize; + int flagssize; + int flags_stride; +} opj_t1_t; + +#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)] + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new T1 handle +and initialize the look-up tables of the Tier-1 coder/decoder +@return Returns a new T1 handle if successful, returns NULL otherwise +@see t1_init_luts +*/ +opj_t1_t* t1_create(opj_common_ptr cinfo); +/** +Destroy a previously created T1 handle +@param t1 T1 handle to destroy +*/ +void t1_destroy(opj_t1_t *t1); +/** +Encode the code-blocks of a tile +@param t1 T1 handle +@param tile The tile to encode +@param tcp Tile coding parameters +*/ +void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp); +/** +Decode the code-blocks of a tile +@param t1 T1 handle +@param tilec The tile to decode +@param tccp Tile coding parameters +*/ +void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __T1_H */ diff --git a/contrib/media/updf/include/t1_luts.h b/contrib/media/updf/include/t1_luts.h new file mode 100644 index 0000000000..e5e33f6656 --- /dev/null +++ b/contrib/media/updf/include/t1_luts.h @@ -0,0 +1,143 @@ +/* This file was automatically generated by t1_generate_luts.c */ + +static char lut_ctxno_zc[1024] = { + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 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, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 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, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 3, 3, 6, 3, 6, 6, 8, 3, 6, 6, 8, 6, 8, 8, 8, 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8 +}; + +static char lut_ctxno_sc[256] = { + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd +}; + +static char lut_spb[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + +static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0180, 0x0300, 0x0480, 0x0600, 0x0780, 0x0900, 0x0a80, + 0x0c00, 0x0d80, 0x0f00, 0x1080, 0x1200, 0x1380, 0x1500, 0x1680, + 0x1800, 0x1980, 0x1b00, 0x1c80, 0x1e00, 0x1f80, 0x2100, 0x2280, + 0x2400, 0x2580, 0x2700, 0x2880, 0x2a00, 0x2b80, 0x2d00, 0x2e80, + 0x3000, 0x3180, 0x3300, 0x3480, 0x3600, 0x3780, 0x3900, 0x3a80, + 0x3c00, 0x3d80, 0x3f00, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, + 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5100, 0x5280, + 0x5400, 0x5580, 0x5700, 0x5880, 0x5a00, 0x5b80, 0x5d00, 0x5e80, + 0x6000, 0x6180, 0x6300, 0x6480, 0x6600, 0x6780, 0x6900, 0x6a80, + 0x6c00, 0x6d80, 0x6f00, 0x7080, 0x7200, 0x7380, 0x7500, 0x7680 +}; + +static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, + 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, + 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, + 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, + 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, + 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, + 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, + 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2680, 0x2780, + 0x2880, 0x2980, 0x2b00, 0x2c00, 0x2d00, 0x2e80, 0x2f80, 0x3100, + 0x3200, 0x3380, 0x3480, 0x3600, 0x3700, 0x3880, 0x3a00, 0x3b00, + 0x3c80, 0x3e00, 0x3f80, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, + 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5180, 0x5300, + 0x5480, 0x5600, 0x5800, 0x5980, 0x5b00, 0x5d00, 0x5e80, 0x6080, + 0x6200, 0x6400, 0x6580, 0x6780, 0x6900, 0x6b00, 0x6d00, 0x6e80, + 0x7080, 0x7280, 0x7480, 0x7600, 0x7800, 0x7a00, 0x7c00, 0x7e00 +}; + +static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = { + 0x1800, 0x1780, 0x1700, 0x1680, 0x1600, 0x1580, 0x1500, 0x1480, + 0x1400, 0x1380, 0x1300, 0x1280, 0x1200, 0x1180, 0x1100, 0x1080, + 0x1000, 0x0f80, 0x0f00, 0x0e80, 0x0e00, 0x0d80, 0x0d00, 0x0c80, + 0x0c00, 0x0b80, 0x0b00, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, + 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0500, 0x0480, + 0x0400, 0x0380, 0x0300, 0x0280, 0x0200, 0x0180, 0x0100, 0x0080, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, + 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b00, 0x0b80, + 0x0c00, 0x0c80, 0x0d00, 0x0d80, 0x0e00, 0x0e80, 0x0f00, 0x0f80, + 0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380, + 0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780 +}; + +static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = { + 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x1b00, 0x1a80, 0x1980, + 0x1880, 0x1780, 0x1700, 0x1600, 0x1500, 0x1480, 0x1380, 0x1300, + 0x1200, 0x1180, 0x1080, 0x1000, 0x0f00, 0x0e80, 0x0e00, 0x0d00, + 0x0c80, 0x0c00, 0x0b80, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, + 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0580, 0x0500, + 0x0480, 0x0400, 0x0400, 0x0380, 0x0300, 0x0300, 0x0280, 0x0280, + 0x0200, 0x0200, 0x0180, 0x0180, 0x0100, 0x0100, 0x0100, 0x0080, + 0x0080, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, + 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, + 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, + 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, + 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, + 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, + 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00 +}; + diff --git a/contrib/media/updf/include/t2.h b/contrib/media/updf/include/t2.h new file mode 100644 index 0000000000..2151ba67f4 --- /dev/null +++ b/contrib/media/updf/include/t2.h @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __T2_H +#define __T2_H +/** +@file t2.h +@brief Implementation of a tier-2 coding (packetization of code-block data) (T2) + +*/ + +/** @defgroup T2 T2 - Implementation of a tier-2 coding */ +/*@{*/ + +/** +Tier-2 coding +*/ +typedef struct opj_t2 { + /** codec context */ + opj_common_ptr cinfo; + + /** Encoding: pointer to the src image. Decoding: pointer to the dst image. */ + opj_image_t *image; + /** pointer to the image coding parameters */ + opj_cp_t *cp; +} opj_t2_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Encode the packets of a tile to a destination buffer +@param t2 T2 handle +@param tileno number of the tile encoded +@param tile the tile for which to write the packets +@param maxlayers maximum number of layers +@param dest the destination buffer +@param len the length of the destination buffer +@param cstr_info Codestream information structure +@param tpnum Tile part number of the current tile +@param tppos The position of the tile part flag in the progression order +@param pino +@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass +@param cur_totnum_tp The total number of tile parts in the current tile +*/ +int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino,J2K_T2_MODE t2_mode,int cur_totnum_tp); +/** +Decode the packets of a tile from a source buffer +@param t2 T2 handle +@param src the source buffer +@param len length of the source buffer +@param tileno number that identifies the tile for which to decode the packets +@param tile tile for which to decode the packets +@param cstr_info Codestream information structure + */ +int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info); + +/** +Create a T2 handle +@param cinfo Codec context info +@param image Source or destination image +@param cp Image coding parameters +@return Returns a new T2 handle if successful, returns NULL otherwise +*/ +opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp); +/** +Destroy a T2 handle +@param t2 T2 handle to destroy +*/ +void t2_destroy(opj_t2_t *t2); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __T2_H */ diff --git a/contrib/media/updf/include/table.h b/contrib/media/updf/include/table.h new file mode 100644 index 0000000000..8406ee22d4 --- /dev/null +++ b/contrib/media/updf/include/table.h @@ -0,0 +1,39 @@ +/* +** table.c +** Module to control static tables +** TeCGraf - PUC-Rio +** 11 May 93 +*/ + +#ifndef table_h +#define table_h + +extern Symbol *lua_table; +extern Word lua_ntable; + +extern char **lua_constant; +extern Word lua_nconstant; + +extern char **lua_string; +extern Word lua_nstring; + +extern Hash **lua_array; +extern Word lua_narray; + +extern char *lua_file[]; +extern int lua_nfile; + +#define lua_markstring(s) (*((s)-1)) + + +int lua_findsymbol (char *s); +int lua_findenclosedconstant (char *s); +int lua_findconstant (char *s); +void lua_markobject (Object *o); +char *lua_createstring (char *s); +void *lua_createarray (void *a); +int lua_addfile (char *fn); +char *lua_filename (void); +void lua_nextvar (void); + +#endif diff --git a/contrib/media/updf/include/tcd.h b/contrib/media/updf/include/tcd.h new file mode 100644 index 0000000000..a5330730f4 --- /dev/null +++ b/contrib/media/updf/include/tcd.h @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ +#ifndef __TCD_H +#define __TCD_H +/** +@file tcd.h +@brief Implementation of a tile coder/decoder (TCD) + +The functions in TCD.C have for goal to encode or decode each tile independently from +each other. The functions in TCD.C are used by some function in J2K.C. +*/ + +/** @defgroup TCD TCD - Implementation of a tile coder/decoder */ +/*@{*/ + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_seg { + unsigned char** data; + int dataindex; + int numpasses; + int len; + int maxpasses; + int numnewpasses; + int newlen; +} opj_tcd_seg_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_pass { + int rate; + double distortiondec; + int term, len; +} opj_tcd_pass_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_layer { + int numpasses; /* Number of passes in the layer */ + int len; /* len of information */ + double disto; /* add for index (Cfr. Marcela) */ + unsigned char *data; /* data */ +} opj_tcd_layer_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_cblk_enc { + unsigned char* data; /* Data */ + opj_tcd_layer_t* layers; /* layer information */ + opj_tcd_pass_t* passes; /* information about the passes */ + int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ + int numbps; + int numlenbits; + int numpasses; /* number of pass already done for the code-blocks */ + int numpassesinlayers; /* number of passes in the layer */ + int totalpasses; /* total number of passes */ +} opj_tcd_cblk_enc_t; + +typedef struct opj_tcd_cblk_dec { + unsigned char* data; /* Data */ + opj_tcd_seg_t* segs; /* segments informations */ + int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ + int numbps; + int numlenbits; + int len; /* length */ + int numnewpasses; /* number of pass added to the code-blocks */ + int numsegs; /* number of segments */ +} opj_tcd_cblk_dec_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_precinct { + int x0, y0, x1, y1; /* dimension of the precinct : left upper corner (x0, y0) right low corner (x1,y1) */ + int cw, ch; /* number of precinct in width and heigth */ + union{ /* code-blocks informations */ + opj_tcd_cblk_enc_t* enc; + opj_tcd_cblk_dec_t* dec; + } cblks; + opj_tgt_tree_t *incltree; /* inclusion tree */ + opj_tgt_tree_t *imsbtree; /* IMSB tree */ +} opj_tcd_precinct_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_band { + int x0, y0, x1, y1; /* dimension of the subband : left upper corner (x0, y0) right low corner (x1,y1) */ + int bandno; + opj_tcd_precinct_t *precincts; /* precinct information */ + int numbps; + float stepsize; +} opj_tcd_band_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_resolution { + int x0, y0, x1, y1; /* dimension of the resolution level : left upper corner (x0, y0) right low corner (x1,y1) */ + int pw, ph; + int numbands; /* number sub-band for the resolution level */ + opj_tcd_band_t bands[3]; /* subband information */ +} opj_tcd_resolution_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_tilecomp { + int x0, y0, x1, y1; /* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */ + int numresolutions; /* number of resolutions level */ + opj_tcd_resolution_t *resolutions; /* resolutions information */ + int *data; /* data of the component */ + int numpix; /* add fixed_quality */ +} opj_tcd_tilecomp_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_tile { + int x0, y0, x1, y1; /* dimension of the tile : left upper corner (x0, y0) right low corner (x1,y1) */ + int numcomps; /* number of components in tile */ + opj_tcd_tilecomp_t *comps; /* Components information */ + int numpix; /* add fixed_quality */ + double distotile; /* add fixed_quality */ + double distolayer[100]; /* add fixed_quality */ + /** packet number */ + int packno; +} opj_tcd_tile_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_image { + int tw, th; /* number of tiles in width and heigth */ + opj_tcd_tile_t *tiles; /* Tiles information */ +} opj_tcd_image_t; + +/** +Tile coder/decoder +*/ +typedef struct opj_tcd { + /** Position of the tilepart flag in Progression order*/ + int tp_pos; + /** Tile part number*/ + int tp_num; + /** Current tile part number*/ + int cur_tp_num; + /** Total number of tileparts of the current tile*/ + int cur_totnum_tp; + /** Current Packet iterator number */ + int cur_pino; + /** codec context */ + opj_common_ptr cinfo; + + /** info on each image tile */ + opj_tcd_image_t *tcd_image; + /** image */ + opj_image_t *image; + /** coding parameters */ + opj_cp_t *cp; + /** pointer to the current encoded/decoded tile */ + opj_tcd_tile_t *tcd_tile; + /** coding/decoding parameters common to all tiles */ + opj_tcp_t *tcp; + /** current encoded/decoded tile */ + int tcd_tileno; + /** Time taken to encode a tile*/ + double encoding_time; +} opj_tcd_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Dump the content of a tcd structure +*/ +void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img); +/** +Create a new TCD handle +@param cinfo Codec context info +@return Returns a new TCD handle if successful returns NULL otherwise +*/ +opj_tcd_t* tcd_create(opj_common_ptr cinfo); +/** +Destroy a previously created TCD handle +@param tcd TCD handle to destroy +*/ +void tcd_destroy(opj_tcd_t *tcd); +/** +Initialize the tile coder (allocate the memory) +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +@param curtileno Number that identifies the tile that will be encoded +*/ +void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); +/** +Free the memory allocated for encoding +@param tcd TCD handle +*/ +void tcd_free_encode(opj_tcd_t *tcd); +/** +Initialize the tile coder (reuses the memory allocated by tcd_malloc_encode) +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +@param curtileno Number that identifies the tile that will be encoded +*/ +void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); +/** +Initialize the tile decoder +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +*/ +void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp); +void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int tileno, opj_codestream_info_t *cstr_info); +void tcd_makelayer_fixed(opj_tcd_t *tcd, int layno, int final); +void tcd_rateallocate_fixed(opj_tcd_t *tcd); +void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final); +bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); +/** +Encode a tile from the raw image into a buffer +@param tcd TCD handle +@param tileno Number that identifies one of the tiles to be encoded +@param dest Destination buffer +@param len Length of destination buffer +@param cstr_info Codestream information structure +@return +*/ +int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); +/** +Decode a tile from a buffer into a raw image +@param tcd TCD handle +@param src Source buffer +@param len Length of source buffer +@param tileno Number that identifies one of the tiles to be decoded +@param cstr_info Codestream information structure +*/ +bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info); +/** +Free the memory allocated for decoding +@param tcd TCD handle +*/ +void tcd_free_decode(opj_tcd_t *tcd); +void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __TCD_H */ diff --git a/contrib/media/updf/include/term.h b/contrib/media/updf/include/term.h new file mode 100644 index 0000000000..f5656dc5b1 --- /dev/null +++ b/contrib/media/updf/include/term.h @@ -0,0 +1,731 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * ), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/****************************************************************************/ +/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */ +/* and: Eric S. Raymond <esr@snark.thyrsus.com> */ +/****************************************************************************/ + +/* $Id: MKterm.h.awk.in,v 1.23 1998/02/11 12:13:46 tom Exp $ */ + +/* +** term.h -- Definition of struct term +*/ + +#ifndef _TERM_H +#define _TERM_H + +#undef NCURSES_VERSION +#define NCURSES_VERSION "4.2" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H + * and BROKEN_LINKER definition (based on the system for which this was configured). + */ + +#ifndef HAVE_TERMIOS_H +#define HAVE_TERMIOS_H 1 +#endif + +#ifndef HAVE_TERMIO_H +#define HAVE_TERMIO_H 1 +#endif + +#ifndef HAVE_TCGETATTR +#define HAVE_TCGETATTR 1 +#endif + +#ifndef BROKEN_LINKER +#define BROKEN_LINKER 0 +#endif + +#ifndef NCURSES_CONST +#define NCURSES_CONST /*nothing*/ +#endif + +/* Assume Posix termio if we have the header and function */ +#if HAVE_TERMIOS_H && HAVE_TCGETATTR +#ifndef TERMIOS +#define TERMIOS 1 +#endif +#include <termios.h> +#define TTY struct termios + +#else /* !HAVE_TERMIOS_H */ + +#if HAVE_TERMIO_H +#ifndef TERMIOS +#define TERMIOS 1 +#endif +#include <termio.h> +#define TTY struct termio +#define TCSANOW TCSETA +#define TCSADRAIN TCSETAW +#define TCSAFLUSH TCSETAF +#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg) +#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg) +#define cfgetospeed(t) ((t)->c_cflag & CBAUD) +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 +#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg) + +#else /* !HAVE_TERMIO_H */ + +#undef TERMIOS +#include <sgtty.h> +#include <sys/ioctl.h> +#define TTY struct sgttyb + +#endif /* HAVE_TERMIO_H */ + +#endif /* HAVE_TERMIOS_H */ + +#ifdef TERMIOS +#define GET_TTY(fd, buf) tcgetattr(fd, buf) +#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf) +#else +#define GET_TTY(fd, buf) gtty(fd, buf) +#define SET_TTY(fd, buf) stty(fd, buf) +#endif + +extern char ttytype[]; +#define NAMESIZE 256 + +#define CUR cur_term->type. + +#define auto_left_margin CUR Booleans[0] +#define auto_right_margin CUR Booleans[1] +#define no_esc_ctlc CUR Booleans[2] +#define ceol_standout_glitch CUR Booleans[3] +#define eat_newline_glitch CUR Booleans[4] +#define erase_overstrike CUR Booleans[5] +#define generic_type CUR Booleans[6] +#define hard_copy CUR Booleans[7] +#define has_meta_key CUR Booleans[8] +#define has_status_line CUR Booleans[9] +#define insert_null_glitch CUR Booleans[10] +#define memory_above CUR Booleans[11] +#define memory_below CUR Booleans[12] +#define move_insert_mode CUR Booleans[13] +#define move_standout_mode CUR Booleans[14] +#define over_strike CUR Booleans[15] +#define status_line_esc_ok CUR Booleans[16] +#define dest_tabs_magic_smso CUR Booleans[17] +#define tilde_glitch CUR Booleans[18] +#define transparent_underline CUR Booleans[19] +#define xon_xoff CUR Booleans[20] +#define needs_xon_xoff CUR Booleans[21] +#define prtr_silent CUR Booleans[22] +#define hard_cursor CUR Booleans[23] +#define non_rev_rmcup CUR Booleans[24] +#define no_pad_char CUR Booleans[25] +#define non_dest_scroll_region CUR Booleans[26] +#define can_change CUR Booleans[27] +#define back_color_erase CUR Booleans[28] +#define hue_lightness_saturation CUR Booleans[29] +#define col_addr_glitch CUR Booleans[30] +#define cr_cancels_micro_mode CUR Booleans[31] +#define has_print_wheel CUR Booleans[32] +#define row_addr_glitch CUR Booleans[33] +#define semi_auto_right_margin CUR Booleans[34] +#define cpi_changes_res CUR Booleans[35] +#define lpi_changes_res CUR Booleans[36] +#define columns CUR Numbers[0] +#define init_tabs CUR Numbers[1] +#define lines CUR Numbers[2] +#define lines_of_memory CUR Numbers[3] +#define magic_cookie_glitch CUR Numbers[4] +#define padding_baud_rate CUR Numbers[5] +#define virtual_terminal CUR Numbers[6] +#define width_status_line CUR Numbers[7] +#define num_labels CUR Numbers[8] +#define label_height CUR Numbers[9] +#define label_width CUR Numbers[10] +#define max_attributes CUR Numbers[11] +#define maximum_windows CUR Numbers[12] +#define max_colors CUR Numbers[13] +#define max_pairs CUR Numbers[14] +#define no_color_video CUR Numbers[15] +#define buffer_capacity CUR Numbers[16] +#define dot_vert_spacing CUR Numbers[17] +#define dot_horz_spacing CUR Numbers[18] +#define max_micro_address CUR Numbers[19] +#define max_micro_jump CUR Numbers[20] +#define micro_char_size CUR Numbers[21] +#define micro_line_size CUR Numbers[22] +#define number_of_pins CUR Numbers[23] +#define output_res_char CUR Numbers[24] +#define output_res_line CUR Numbers[25] +#define output_res_horz_inch CUR Numbers[26] +#define output_res_vert_inch CUR Numbers[27] +#define print_rate CUR Numbers[28] +#define wide_char_size CUR Numbers[29] +#define buttons CUR Numbers[30] +#define bit_image_entwining CUR Numbers[31] +#define bit_image_type CUR Numbers[32] +#define back_tab CUR Strings[0] +#define bell CUR Strings[1] +#define carriage_return CUR Strings[2] +#define change_scroll_region CUR Strings[3] +#define clear_all_tabs CUR Strings[4] +#define clear_screen CUR Strings[5] +#define clr_eol CUR Strings[6] +#define clr_eos CUR Strings[7] +#define column_address CUR Strings[8] +#define command_character CUR Strings[9] +#define cursor_address CUR Strings[10] +#define cursor_down CUR Strings[11] +#define cursor_home CUR Strings[12] +#define cursor_invisible CUR Strings[13] +#define cursor_left CUR Strings[14] +#define cursor_mem_address CUR Strings[15] +#define cursor_normal CUR Strings[16] +#define cursor_right CUR Strings[17] +#define cursor_to_ll CUR Strings[18] +#define cursor_up CUR Strings[19] +#define cursor_visible CUR Strings[20] +#define delete_character CUR Strings[21] +#define delete_line CUR Strings[22] +#define dis_status_line CUR Strings[23] +#define down_half_line CUR Strings[24] +#define enter_alt_charset_mode CUR Strings[25] +#define enter_blink_mode CUR Strings[26] +#define enter_bold_mode CUR Strings[27] +#define enter_ca_mode CUR Strings[28] +#define enter_delete_mode CUR Strings[29] +#define enter_dim_mode CUR Strings[30] +#define enter_insert_mode CUR Strings[31] +#define enter_secure_mode CUR Strings[32] +#define enter_protected_mode CUR Strings[33] +#define enter_reverse_mode CUR Strings[34] +#define enter_standout_mode CUR Strings[35] +#define enter_underline_mode CUR Strings[36] +#define erase_chars CUR Strings[37] +#define exit_alt_charset_mode CUR Strings[38] +#define exit_attribute_mode CUR Strings[39] +#define exit_ca_mode CUR Strings[40] +#define exit_delete_mode CUR Strings[41] +#define exit_insert_mode CUR Strings[42] +#define exit_standout_mode CUR Strings[43] +#define exit_underline_mode CUR Strings[44] +#define flash_screen CUR Strings[45] +#define form_feed CUR Strings[46] +#define from_status_line CUR Strings[47] +#define init_1string CUR Strings[48] +#define init_2string CUR Strings[49] +#define init_3string CUR Strings[50] +#define init_file CUR Strings[51] +#define insert_character CUR Strings[52] +#define insert_line CUR Strings[53] +#define insert_padding CUR Strings[54] +#define key_backspace CUR Strings[55] +#define key_catab CUR Strings[56] +#define key_clear CUR Strings[57] +#define key_ctab CUR Strings[58] +#define key_dc CUR Strings[59] +#define key_dl CUR Strings[60] +#define key_down CUR Strings[61] +#define key_eic CUR Strings[62] +#define key_eol CUR Strings[63] +#define key_eos CUR Strings[64] +#define key_f0 CUR Strings[65] +#define key_f1 CUR Strings[66] +#define key_f10 CUR Strings[67] +#define key_f2 CUR Strings[68] +#define key_f3 CUR Strings[69] +#define key_f4 CUR Strings[70] +#define key_f5 CUR Strings[71] +#define key_f6 CUR Strings[72] +#define key_f7 CUR Strings[73] +#define key_f8 CUR Strings[74] +#define key_f9 CUR Strings[75] +#define key_home CUR Strings[76] +#define key_ic CUR Strings[77] +#define key_il CUR Strings[78] +#define key_left CUR Strings[79] +#define key_ll CUR Strings[80] +#define key_npage CUR Strings[81] +#define key_ppage CUR Strings[82] +#define key_right CUR Strings[83] +#define key_sf CUR Strings[84] +#define key_sr CUR Strings[85] +#define key_stab CUR Strings[86] +#define key_up CUR Strings[87] +#define keypad_local CUR Strings[88] +#define keypad_xmit CUR Strings[89] +#define lab_f0 CUR Strings[90] +#define lab_f1 CUR Strings[91] +#define lab_f10 CUR Strings[92] +#define lab_f2 CUR Strings[93] +#define lab_f3 CUR Strings[94] +#define lab_f4 CUR Strings[95] +#define lab_f5 CUR Strings[96] +#define lab_f6 CUR Strings[97] +#define lab_f7 CUR Strings[98] +#define lab_f8 CUR Strings[99] +#define lab_f9 CUR Strings[100] +#define meta_off CUR Strings[101] +#define meta_on CUR Strings[102] +#define newline CUR Strings[103] +#define pad_char CUR Strings[104] +#define parm_dch CUR Strings[105] +#define parm_delete_line CUR Strings[106] +#define parm_down_cursor CUR Strings[107] +#define parm_ich CUR Strings[108] +#define parm_index CUR Strings[109] +#define parm_insert_line CUR Strings[110] +#define parm_left_cursor CUR Strings[111] +#define parm_right_cursor CUR Strings[112] +#define parm_rindex CUR Strings[113] +#define parm_up_cursor CUR Strings[114] +#define pkey_key CUR Strings[115] +#define pkey_local CUR Strings[116] +#define pkey_xmit CUR Strings[117] +#define print_screen CUR Strings[118] +#define prtr_off CUR Strings[119] +#define prtr_on CUR Strings[120] +#define repeat_char CUR Strings[121] +#define reset_1string CUR Strings[122] +#define reset_2string CUR Strings[123] +#define reset_3string CUR Strings[124] +#define reset_file CUR Strings[125] +#define restore_cursor CUR Strings[126] +#define row_address CUR Strings[127] +#define save_cursor CUR Strings[128] +#define scroll_forward CUR Strings[129] +#define scroll_reverse CUR Strings[130] +#define set_attributes CUR Strings[131] +#define set_tab CUR Strings[132] +#define set_window CUR Strings[133] +#define tab CUR Strings[134] +#define to_status_line CUR Strings[135] +#define underline_char CUR Strings[136] +#define up_half_line CUR Strings[137] +#define init_prog CUR Strings[138] +#define key_a1 CUR Strings[139] +#define key_a3 CUR Strings[140] +#define key_b2 CUR Strings[141] +#define key_c1 CUR Strings[142] +#define key_c3 CUR Strings[143] +#define prtr_non CUR Strings[144] +#define char_padding CUR Strings[145] +#define acs_chars CUR Strings[146] +#define plab_norm CUR Strings[147] +#define key_btab CUR Strings[148] +#define enter_xon_mode CUR Strings[149] +#define exit_xon_mode CUR Strings[150] +#define enter_am_mode CUR Strings[151] +#define exit_am_mode CUR Strings[152] +#define xon_character CUR Strings[153] +#define xoff_character CUR Strings[154] +#define ena_acs CUR Strings[155] +#define label_on CUR Strings[156] +#define label_off CUR Strings[157] +#define key_beg CUR Strings[158] +#define key_cancel CUR Strings[159] +#define key_close CUR Strings[160] +#define key_command CUR Strings[161] +#define key_copy CUR Strings[162] +#define key_create CUR Strings[163] +#define key_end CUR Strings[164] +#define key_enter CUR Strings[165] +#define key_exit CUR Strings[166] +#define key_find CUR Strings[167] +#define key_help CUR Strings[168] +#define key_mark CUR Strings[169] +#define key_message CUR Strings[170] +#define key_move CUR Strings[171] +#define key_next CUR Strings[172] +#define key_open CUR Strings[173] +#define key_options CUR Strings[174] +#define key_previous CUR Strings[175] +#define key_print CUR Strings[176] +#define key_redo CUR Strings[177] +#define key_reference CUR Strings[178] +#define key_refresh CUR Strings[179] +#define key_replace CUR Strings[180] +#define key_restart CUR Strings[181] +#define key_resume CUR Strings[182] +#define key_save CUR Strings[183] +#define key_suspend CUR Strings[184] +#define key_undo CUR Strings[185] +#define key_sbeg CUR Strings[186] +#define key_scancel CUR Strings[187] +#define key_scommand CUR Strings[188] +#define key_scopy CUR Strings[189] +#define key_screate CUR Strings[190] +#define key_sdc CUR Strings[191] +#define key_sdl CUR Strings[192] +#define key_select CUR Strings[193] +#define key_send CUR Strings[194] +#define key_seol CUR Strings[195] +#define key_sexit CUR Strings[196] +#define key_sfind CUR Strings[197] +#define key_shelp CUR Strings[198] +#define key_shome CUR Strings[199] +#define key_sic CUR Strings[200] +#define key_sleft CUR Strings[201] +#define key_smessage CUR Strings[202] +#define key_smove CUR Strings[203] +#define key_snext CUR Strings[204] +#define key_soptions CUR Strings[205] +#define key_sprevious CUR Strings[206] +#define key_sprint CUR Strings[207] +#define key_sredo CUR Strings[208] +#define key_sreplace CUR Strings[209] +#define key_sright CUR Strings[210] +#define key_srsume CUR Strings[211] +#define key_ssave CUR Strings[212] +#define key_ssuspend CUR Strings[213] +#define key_sundo CUR Strings[214] +#define req_for_input CUR Strings[215] +#define key_f11 CUR Strings[216] +#define key_f12 CUR Strings[217] +#define key_f13 CUR Strings[218] +#define key_f14 CUR Strings[219] +#define key_f15 CUR Strings[220] +#define key_f16 CUR Strings[221] +#define key_f17 CUR Strings[222] +#define key_f18 CUR Strings[223] +#define key_f19 CUR Strings[224] +#define key_f20 CUR Strings[225] +#define key_f21 CUR Strings[226] +#define key_f22 CUR Strings[227] +#define key_f23 CUR Strings[228] +#define key_f24 CUR Strings[229] +#define key_f25 CUR Strings[230] +#define key_f26 CUR Strings[231] +#define key_f27 CUR Strings[232] +#define key_f28 CUR Strings[233] +#define key_f29 CUR Strings[234] +#define key_f30 CUR Strings[235] +#define key_f31 CUR Strings[236] +#define key_f32 CUR Strings[237] +#define key_f33 CUR Strings[238] +#define key_f34 CUR Strings[239] +#define key_f35 CUR Strings[240] +#define key_f36 CUR Strings[241] +#define key_f37 CUR Strings[242] +#define key_f38 CUR Strings[243] +#define key_f39 CUR Strings[244] +#define key_f40 CUR Strings[245] +#define key_f41 CUR Strings[246] +#define key_f42 CUR Strings[247] +#define key_f43 CUR Strings[248] +#define key_f44 CUR Strings[249] +#define key_f45 CUR Strings[250] +#define key_f46 CUR Strings[251] +#define key_f47 CUR Strings[252] +#define key_f48 CUR Strings[253] +#define key_f49 CUR Strings[254] +#define key_f50 CUR Strings[255] +#define key_f51 CUR Strings[256] +#define key_f52 CUR Strings[257] +#define key_f53 CUR Strings[258] +#define key_f54 CUR Strings[259] +#define key_f55 CUR Strings[260] +#define key_f56 CUR Strings[261] +#define key_f57 CUR Strings[262] +#define key_f58 CUR Strings[263] +#define key_f59 CUR Strings[264] +#define key_f60 CUR Strings[265] +#define key_f61 CUR Strings[266] +#define key_f62 CUR Strings[267] +#define key_f63 CUR Strings[268] +#define clr_bol CUR Strings[269] +#define clear_margins CUR Strings[270] +#define set_left_margin CUR Strings[271] +#define set_right_margin CUR Strings[272] +#define label_format CUR Strings[273] +#define set_clock CUR Strings[274] +#define display_clock CUR Strings[275] +#define remove_clock CUR Strings[276] +#define create_window CUR Strings[277] +#define goto_window CUR Strings[278] +#define hangup CUR Strings[279] +#define dial_phone CUR Strings[280] +#define quick_dial CUR Strings[281] +#define tone CUR Strings[282] +#define pulse CUR Strings[283] +#define flash_hook CUR Strings[284] +#define fixed_pause CUR Strings[285] +#define wait_tone CUR Strings[286] +#define user0 CUR Strings[287] +#define user1 CUR Strings[288] +#define user2 CUR Strings[289] +#define user3 CUR Strings[290] +#define user4 CUR Strings[291] +#define user5 CUR Strings[292] +#define user6 CUR Strings[293] +#define user7 CUR Strings[294] +#define user8 CUR Strings[295] +#define user9 CUR Strings[296] +#define orig_pair CUR Strings[297] +#define orig_colors CUR Strings[298] +#define initialize_color CUR Strings[299] +#define initialize_pair CUR Strings[300] +#define set_color_pair CUR Strings[301] +#define set_foreground CUR Strings[302] +#define set_background CUR Strings[303] +#define change_char_pitch CUR Strings[304] +#define change_line_pitch CUR Strings[305] +#define change_res_horz CUR Strings[306] +#define change_res_vert CUR Strings[307] +#define define_char CUR Strings[308] +#define enter_doublewide_mode CUR Strings[309] +#define enter_draft_quality CUR Strings[310] +#define enter_italics_mode CUR Strings[311] +#define enter_leftward_mode CUR Strings[312] +#define enter_micro_mode CUR Strings[313] +#define enter_near_letter_quality CUR Strings[314] +#define enter_normal_quality CUR Strings[315] +#define enter_shadow_mode CUR Strings[316] +#define enter_subscript_mode CUR Strings[317] +#define enter_superscript_mode CUR Strings[318] +#define enter_upward_mode CUR Strings[319] +#define exit_doublewide_mode CUR Strings[320] +#define exit_italics_mode CUR Strings[321] +#define exit_leftward_mode CUR Strings[322] +#define exit_micro_mode CUR Strings[323] +#define exit_shadow_mode CUR Strings[324] +#define exit_subscript_mode CUR Strings[325] +#define exit_superscript_mode CUR Strings[326] +#define exit_upward_mode CUR Strings[327] +#define micro_column_address CUR Strings[328] +#define micro_down CUR Strings[329] +#define micro_left CUR Strings[330] +#define micro_right CUR Strings[331] +#define micro_row_address CUR Strings[332] +#define micro_up CUR Strings[333] +#define order_of_pins CUR Strings[334] +#define parm_down_micro CUR Strings[335] +#define parm_left_micro CUR Strings[336] +#define parm_right_micro CUR Strings[337] +#define parm_up_micro CUR Strings[338] +#define select_char_set CUR Strings[339] +#define set_bottom_margin CUR Strings[340] +#define set_bottom_margin_parm CUR Strings[341] +#define set_left_margin_parm CUR Strings[342] +#define set_right_margin_parm CUR Strings[343] +#define set_top_margin CUR Strings[344] +#define set_top_margin_parm CUR Strings[345] +#define start_bit_image CUR Strings[346] +#define start_char_set_def CUR Strings[347] +#define stop_bit_image CUR Strings[348] +#define stop_char_set_def CUR Strings[349] +#define subscript_characters CUR Strings[350] +#define superscript_characters CUR Strings[351] +#define these_cause_cr CUR Strings[352] +#define zero_motion CUR Strings[353] +#define char_set_names CUR Strings[354] +#define key_mouse CUR Strings[355] +#define mouse_info CUR Strings[356] +#define req_mouse_pos CUR Strings[357] +#define get_mouse CUR Strings[358] +#define set_a_foreground CUR Strings[359] +#define set_a_background CUR Strings[360] +#define pkey_plab CUR Strings[361] +#define device_type CUR Strings[362] +#define code_set_init CUR Strings[363] +#define set0_des_seq CUR Strings[364] +#define set1_des_seq CUR Strings[365] +#define set2_des_seq CUR Strings[366] +#define set3_des_seq CUR Strings[367] +#define set_lr_margin CUR Strings[368] +#define set_tb_margin CUR Strings[369] +#define bit_image_repeat CUR Strings[370] +#define bit_image_newline CUR Strings[371] +#define bit_image_carriage_return CUR Strings[372] +#define color_names CUR Strings[373] +#define define_bit_image_region CUR Strings[374] +#define end_bit_image_region CUR Strings[375] +#define set_color_band CUR Strings[376] +#define set_page_length CUR Strings[377] +#define display_pc_char CUR Strings[378] +#define enter_pc_charset_mode CUR Strings[379] +#define exit_pc_charset_mode CUR Strings[380] +#define enter_scancode_mode CUR Strings[381] +#define exit_scancode_mode CUR Strings[382] +#define pc_term_options CUR Strings[383] +#define scancode_escape CUR Strings[384] +#define alt_scancode_esc CUR Strings[385] +#define enter_horizontal_hl_mode CUR Strings[386] +#define enter_left_hl_mode CUR Strings[387] +#define enter_low_hl_mode CUR Strings[388] +#define enter_right_hl_mode CUR Strings[389] +#define enter_top_hl_mode CUR Strings[390] +#define enter_vertical_hl_mode CUR Strings[391] + +#define BOOLWRITE 37 +#define NUMWRITE 33 +#define STRWRITE 392 + +/* older synonyms for some capabilities */ +#define beehive_glitch no_esc_ctlc +#define teleray_glitch dest_tabs_magic_smso + +/* XSI synonyms */ +#define micro_col_size micro_char_size + +#ifdef __INTERNAL_CAPS_VISIBLE +#define termcap_init2 CUR Strings[392] +#define termcap_reset CUR Strings[393] +#define magic_cookie_glitch_ul CUR Numbers[33] +#define backspaces_with_bs CUR Booleans[37] +#define crt_no_scrolling CUR Booleans[38] +#define no_correctly_working_cr CUR Booleans[39] +#define carriage_return_delay CUR Numbers[34] +#define new_line_delay CUR Numbers[35] +#define linefeed_if_not_lf CUR Strings[394] +#define backspace_if_not_bs CUR Strings[395] +#define gnu_has_meta_key CUR Booleans[40] +#define linefeed_is_newline CUR Booleans[41] +#define backspace_delay CUR Numbers[36] +#define horizontal_tab_delay CUR Numbers[37] +#define number_of_function_keys CUR Numbers[38] +#define other_non_function_keys CUR Strings[396] +#define arrow_key_map CUR Strings[397] +#define has_hardware_tabs CUR Booleans[42] +#define return_does_clr_eol CUR Booleans[43] +#define acs_ulcorner CUR Strings[398] +#define acs_llcorner CUR Strings[399] +#define acs_urcorner CUR Strings[400] +#define acs_lrcorner CUR Strings[401] +#define acs_ltee CUR Strings[402] +#define acs_rtee CUR Strings[403] +#define acs_btee CUR Strings[404] +#define acs_ttee CUR Strings[405] +#define acs_hline CUR Strings[406] +#define acs_vline CUR Strings[407] +#define acs_plus CUR Strings[408] +#define memory_lock CUR Strings[409] +#define memory_unlock CUR Strings[410] +#define box_chars_1 CUR Strings[411] +#endif /* __INTERNAL_CAPS_VISIBLE */ + + +#define BOOLCOUNT 44 +#define NUMCOUNT 39 +#define STRCOUNT 412 + +typedef struct termtype { /* in-core form of terminfo data */ + char *term_names; /* str_table offset of term names */ + char *str_table; /* pointer to string table */ + char Booleans[BOOLCOUNT]; /* array of values */ + short Numbers[NUMCOUNT]; /* array of values */ + char *Strings[STRCOUNT]; /* array of string offsets */ +} TERMTYPE; + +typedef struct term { /* describe an actual terminal */ + TERMTYPE type; /* terminal type description */ + short Filedes; /* file description being written to */ + TTY Ottyb, /* original state of the terminal */ + Nttyb; /* current state of the terminal */ + int _baudrate; /* used to compute padding */ +} TERMINAL; + +extern TERMINAL *cur_term; + + +#if BROKEN_LINKER +#define boolnames _nc_boolnames() +#define boolcodes _nc_boolcodes() +#define boolfnames _nc_boolfnames() +#define numnames _nc_numnames() +#define numcodes _nc_numcodes() +#define numfnames _nc_numfnames() +#define strnames _nc_strnames() +#define strcodes _nc_strcodes() +#define strfnames _nc_strfnames() + +extern NCURSES_CONST char * const *_nc_boolnames(void); +extern NCURSES_CONST char * const *_nc_boolcodes(void); +extern NCURSES_CONST char * const *_nc_boolfnames(void); +extern NCURSES_CONST char * const *_nc_numnames(void); +extern NCURSES_CONST char * const *_nc_numcodes(void); +extern NCURSES_CONST char * const *_nc_numfnames(void); +extern NCURSES_CONST char * const *_nc_strnames(void); +extern NCURSES_CONST char * const *_nc_strcodes(void); +extern NCURSES_CONST char * const *_nc_strfnames(void); + +#else + +extern NCURSES_CONST char *const boolnames[]; +extern NCURSES_CONST char *const boolcodes[]; +extern NCURSES_CONST char *const boolfnames[]; +extern NCURSES_CONST char *const numnames[]; +extern NCURSES_CONST char *const numcodes[]; +extern NCURSES_CONST char *const numfnames[]; +extern NCURSES_CONST char *const strnames[]; +extern NCURSES_CONST char *const strcodes[]; +extern NCURSES_CONST char *const strfnames[]; + +#endif + +/* internals */ +extern int _nc_set_curterm(TTY *buf); +extern int _nc_get_curterm(TTY *buf); +extern int _nc_read_entry(const char * const, char * const, TERMTYPE *const); +extern int _nc_read_file_entry(const char *const, TERMTYPE *); +extern char *_nc_first_name(const char *const); +extern int _nc_name_match(const char *const, const char *const, const char *const); +extern int _nc_read_termcap_entry(const char *const, TERMTYPE *const); +extern const TERMTYPE *_nc_fallback(const char *); + +/* entry points */ +extern TERMINAL *set_curterm(TERMINAL *); +extern int del_curterm(TERMINAL *); + +/* miscellaneous entry points */ +extern int putp(const char *); +extern int restartterm(const char *, int, int *); +extern int setupterm(const char *,int,int *); +extern int tputs(const char *, int, int (*)(int)); + +/* terminfo entry points */ +extern int tigetflag(const char *); +extern int tigetnum(const char *); +extern char *tigetstr(const char *); +extern char *tparm(const char *, ...); + +/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */ +extern int tgetent(char *, const char *); +extern int tgetflag(const char *); +extern int tgetnum(const char *); +extern char *tgetstr(const char *, char **); +extern char *tgoto(const char *, int, int); + +#ifdef __cplusplus +} +#endif + +#endif /* TERM_H */ diff --git a/contrib/media/updf/include/term_entry.h b/contrib/media/updf/include/term_entry.h new file mode 100644 index 0000000000..ada2791b83 --- /dev/null +++ b/contrib/media/updf/include/term_entry.h @@ -0,0 +1,89 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + ****************************************************************************/ + + +/* + * term_entry.h -- interface to entry-manipulation code + */ + +#ifndef _TERM_ENTRY_H +#define _TERM_ENTRY_H + +#define MAX_USES 32 + +typedef struct entry { + TERMTYPE tterm; + int nuses; + struct + { + void *parent; /* (char *) or (ENTRY *) */ + long line; + } + uses[MAX_USES]; + long cstart, cend; + long startline; + struct entry *next; + struct entry *last; +} +ENTRY; + +extern ENTRY *_nc_head, *_nc_tail; +#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next) + +#define MAX_LINE 132 + +#define NULLHOOK (bool(*)(ENTRY *))0 + +/* alloc_entry.c: elementary allocation code */ +extern void _nc_init_entry(TERMTYPE *const); +extern char *_nc_save_str(const char *const); +extern void _nc_merge_entry(TERMTYPE *const, TERMTYPE *const); +extern void _nc_wrap_entry(ENTRY *const); + +/* parse_entry.c: entry-parsing code */ +extern int _nc_parse_entry(ENTRY *, int, bool); +extern int _nc_capcmp(const char *, const char *); + +/* write_entry.c: writing an entry to the file system */ +extern void _nc_set_writedir(char *); +extern void _nc_write_entry(TERMTYPE *const); + +/* comp_parse.c: entry list handling */ +extern void _nc_read_entry_source(FILE*, char*, int, bool, bool (*)(ENTRY*)); +extern bool _nc_entry_match(char *, char *); +extern int _nc_resolve_uses(void); +extern void _nc_free_entries(ENTRY *); + +#endif /* _TERM_ENTRY_H */ + +/* term_entry.h ends here */ diff --git a/contrib/media/updf/include/termcap.h b/contrib/media/updf/include/termcap.h new file mode 100644 index 0000000000..618419a5c8 --- /dev/null +++ b/contrib/media/updf/include/termcap.h @@ -0,0 +1,67 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + ****************************************************************************/ + +/* $Id: termcap.h.in,v 1.5 1998/02/11 12:13:45 tom Exp $ */ + +#ifndef _TERMCAP_H +#define _TERMCAP_H 1 + +#undef NCURSES_VERSION +#define NCURSES_VERSION "4.2" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include <sys/types.h> + +extern char PC; +extern char *UP; +extern char *BC; +extern short ospeed; + +extern int tgetent(char *, const char *); +extern int tgetflag(const char *); +extern int tgetnum(const char *); +extern char *tgetstr(const char *, char **); + +extern int tputs(const char *, int, int (*)(int)); + +extern char *tgoto(const char *, int, int); + +#ifdef __cplusplus +} +#endif + +#endif /* _TERMCAP_H */ diff --git a/contrib/media/updf/include/termios.h b/contrib/media/updf/include/termios.h new file mode 100644 index 0000000000..deda645612 --- /dev/null +++ b/contrib/media/updf/include/termios.h @@ -0,0 +1,146 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_sys_termios_h_ +#define __dj_include_sys_termios_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#define B0 0x00000000 +#define B50 0x00000001 +#define B75 0x00000002 +#define B110 0x00000003 +#define B134 0x00000004 +#define B150 0x00000005 +#define B200 0x00000006 +#define B300 0x00000007 +#define B600 0x00000008 +#define B1200 0x00000009 +#define B1800 0x0000000a +#define B2400 0x0000000b +#define B4800 0x0000000c +#define B9600 0x0000000d +#define B19200 0x0000000e +#define B38400 0x0000000f + +#define BRKINT 0x00000100 +#define ICRNL 0x00000200 +#define IGNBRK 0x00000400 +#define IGNCR 0x00000800 +#define IGNPAR 0x00001000 +#define INLCR 0x00002000 +#define INPCK 0x00004000 +#define ISTRIP 0x00008000 +#define IXOFF 0x00010000 +#define IXON 0x00020000 +#define PARMRK 0x00040000 + +#define OPOST 0x00000100 + +#define CLOCAL 0x00000100 +#define CREAD 0x00000200 +#define CS5 0x00000000 +#define CS6 0x00000400 +#define CS7 0x00000800 +#define CS8 0x00000c00 +#define CSIZE 0x00000c00 +#define CSTOPB 0x00001000 +#define HUPCL 0x00002000 +#define PARENB 0x00004000 +#define PARODD 0x00008000 + +#define ECHO 0x00000100 +#define ECHOE 0x00000200 +#define ECHOK 0x00000400 +#define ECHONL 0x00000800 +#define ICANON 0x00001000 +#define IEXTEN 0x00002000 +#define ISIG 0x00004000 +#define NOFLSH 0x00008000 +#define TOSTOP 0x00010000 + +#define TCIFLUSH 1 +#define TCOFLUSH 2 +#define TCIOFLUSH 3 +#define TCOOFF 1 +#define TCOON 2 +#define TCIOFF 3 +#define TCION 4 + +#define TCSADRAIN 1 +#define TCSAFLUSH 2 +#define TCSANOW 3 + +#define VEOF 1 +#define VEOL 2 +#define VERASE 3 +#define VINTR 4 +#define VKILL 5 +#define VMIN 6 +#define VQUIT 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VTIME 11 +#define NCCS 12 + +typedef unsigned cc_t; +typedef unsigned speed_t; +typedef unsigned tcflag_t; + +struct termios { + cc_t c_cc[NCCS]; + tcflag_t c_cflag; + tcflag_t c_iflag; + tcflag_t c_lflag; + tcflag_t c_oflag; + speed_t c_ispeed; + speed_t c_ospeed; +}; + +speed_t cfgetispeed(const struct termios *_termios_p); +speed_t cfgetospeed(const struct termios *_termios_p); +int cfsetispeed(struct termios *_termios_p, speed_t _speed); +int cfsetospeed(struct termios *_termios_p, speed_t _speed); +int tcdrain(int _fildes); +int tcflow(int _fildes, int _action); +int tcflush(int _fildes, int _queue_selector); +int tcgetattr(int _fildes, struct termios *_termios_p); +int tcsendbreak(int _fildes, int _duration); +int tcsetattr(int _fildes, int _optional_actions, const struct termios *_termios_p); + +#ifndef _POSIX_SOURCE + +/* Input flags */ +#define IMAXBEL 0x01000000 /* ring bell on input queue full */ + +/* Local flags */ +#define ECHOKE 0x01000000 /* visual erase for line kill */ +#define ECHOCTL 0x02000000 /* echo control chars as ^x */ + +/* Output flags */ +#define ONLCR 0x00000200 /* map NL to CRNL */ +#define OCRNL 0x00000400 /* map CR to NL */ +#define ONOEOT 0x00000800 /* discard EOT's (^D) on output */ + +/* for compatibility */ +void cfmakeraw(struct termios *_termios_p); +int cfsetspeed(struct termios *_termios_p, speed_t _speed); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_sys_termios_h_ */ diff --git a/contrib/media/updf/include/tgt.h b/contrib/media/updf/include/tgt.h new file mode 100644 index 0000000000..c08c8da0af --- /dev/null +++ b/contrib/media/updf/include/tgt.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ + +#ifndef __TGT_H +#define __TGT_H +/** +@file tgt.h +@brief Implementation of a tag-tree coder (TGT) + +The functions in TGT.C have for goal to realize a tag-tree coder. The functions in TGT.C +are used by some function in T2.C. +*/ + +/** @defgroup TGT TGT - Implementation of a tag-tree coder */ +/*@{*/ + +/** +Tag node +*/ +typedef struct opj_tgt_node { + struct opj_tgt_node *parent; + int value; + int low; + int known; +} opj_tgt_node_t; + +/** +Tag tree +*/ +typedef struct opj_tgt_tree { + int numleafsh; + int numleafsv; + int numnodes; + opj_tgt_node_t *nodes; +} opj_tgt_tree_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a tag-tree +@param numleafsh Width of the array of leafs of the tree +@param numleafsv Height of the array of leafs of the tree +@return Returns a new tag-tree if successful, returns NULL otherwise +*/ +opj_tgt_tree_t *tgt_create(int numleafsh, int numleafsv); +/** +Destroy a tag-tree, liberating memory +@param tree Tag-tree to destroy +*/ +void tgt_destroy(opj_tgt_tree_t *tree); +/** +Reset a tag-tree (set all leaves to 0) +@param tree Tag-tree to reset +*/ +void tgt_reset(opj_tgt_tree_t *tree); +/** +Set the value of a leaf of a tag-tree +@param tree Tag-tree to modify +@param leafno Number that identifies the leaf to modify +@param value New value of the leaf +*/ +void tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int value); +/** +Encode the value of a leaf of the tag-tree up to a given threshold +@param bio Pointer to a BIO handle +@param tree Tag-tree to modify +@param leafno Number that identifies the leaf to encode +@param threshold Threshold to use when encoding value of the leaf +*/ +void tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold); +/** +Decode the value of a leaf of the tag-tree up to a given threshold +@param bio Pointer to a BIO handle +@param tree Tag-tree to decode +@param leafno Number that identifies the leaf to decode +@param threshold Threshold to use when decoding value of the leaf +@return Returns 1 if the node's value < threshold, returns 0 otherwise +*/ +int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __TGT_H */ diff --git a/contrib/media/updf/include/tic.h b/contrib/media/updf/include/tic.h new file mode 100644 index 0000000000..e8660958dc --- /dev/null +++ b/contrib/media/updf/include/tic.h @@ -0,0 +1,245 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + ****************************************************************************/ + +/* + * tic.h - Global variables and structures for the terminfo + * compiler. + * + */ + +#ifndef __TIC_H +#define __TIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */ + +/* +** The format of compiled terminfo files is as follows: +** +** Header (12 bytes), containing information given below +** Names Section, containing the names of the terminal +** Boolean Section, containing the values of all of the +** boolean capabilities +** A null byte may be inserted here to make +** sure that the Number Section begins on an +** even word boundary. +** Number Section, containing the values of all of the numeric +** capabilities, each as a short integer +** String Section, containing short integer offsets into the +** String Table, one per string capability +** String Table, containing the actual characters of the string +** capabilities. +** +** NOTE that all short integers in the file are stored using VAX/PDP-style +** byte-order, i.e., least-significant byte first. +** +** There is no structure definition here because it would only confuse +** matters. Terminfo format is a raw byte layout, not a structure +** dump. If you happen to be on a little-endian machine with 16-bit +** shorts that requires no padding between short members in a struct, +** then there is a natural C structure that captures the header, but +** not very helpfully. +*/ + +#define MAGIC 0432 /* first two bytes of a compiled entry */ + +/* + * The "maximum" here is misleading; XSI guarantees minimum values, which a + * given implementation may exceed. + */ +#define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */ +#define MAX_ENTRY_SIZE 4096 /* maximum legal entry size */ + +/* The maximum size of individual name or alias is guaranteed in XSI to + * be 14, since that corresponds to the older filename lengths. Newer + * systems allow longer aliases, though not many terminal descriptions + * are written to use them. + */ +#if HAVE_LONG_FILE_NAMES +#define MAX_ALIAS 32 /* POSIX minimum for PATH_MAX */ +#else +#define MAX_ALIAS 14 /* SVr3 filename length */ +#endif + +/* location of user's personal info directory */ +#define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */ + +#define DEBUG(n, a) if (_nc_tracing & (1 << (n - 1))) _tracef a +extern unsigned _nc_tracing; +extern void _nc_tracef(char *, ...) GCC_PRINTFLIKE(1,2); +extern const char *_nc_visbuf(const char *); + +/* + * These are the types of tokens returned by the scanner. The first + * three are also used in the hash table of capability names. The scanner + * returns one of these values after loading the specifics into the global + * structure curr_token. + */ + +#define BOOLEAN 0 /* Boolean capability */ +#define NUMBER 1 /* Numeric capability */ +#define STRING 2 /* String-valued capability */ +#define CANCEL 3 /* Capability to be cancelled in following tc's */ +#define NAMES 4 /* The names for a terminal type */ +#define UNDEF 5 /* Undefined */ + +#define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */ + + /* + * The global structure in which the specific parts of a + * scanned token are returned. + * + */ + +struct token +{ + char *tk_name; /* name of capability */ + int tk_valnumber; /* value of capability (if a number) */ + char *tk_valstring; /* value of capability (if a string) */ +}; + +extern struct token _nc_curr_token; + + /* + * The file comp_captab.c contains an array of these structures, one + * per possible capability. These are indexed by a hash table array of + * pointers to the same structures for use by the parser. + */ + +struct name_table_entry +{ + const char *nte_name; /* name to hash on */ + int nte_type; /* BOOLEAN, NUMBER or STRING */ + short nte_index; /* index of associated variable in its array */ + short nte_link; /* index in table of next hash, or -1 */ +}; + +struct alias +{ + const char *from; + const char *to; + const char *source; +}; + +extern const struct name_table_entry * const _nc_info_hash_table[]; +extern const struct name_table_entry * const _nc_cap_hash_table[]; + +extern const struct alias _nc_capalias_table[]; +extern const struct alias _nc_infoalias_table[]; + +extern const struct name_table_entry *_nc_get_table(bool); + +#define NOTFOUND ((struct name_table_entry *) 0) + +/* out-of-band values for representing absent capabilities */ +#define ABSENT_BOOLEAN -1 +#define ABSENT_NUMERIC -1 +#define ABSENT_STRING (char *)0 + +/* out-of-band values for representing cancels */ +#define CANCELLED_BOOLEAN (char)(-2) +#define CANCELLED_NUMERIC -2 +#define CANCELLED_STRING (char *)-1 + +#define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING) + +/* termcap entries longer than this may break old binaries */ +#define MAX_TERMCAP_LENGTH 1023 + +/* this is a documented limitation of terminfo */ +#define MAX_TERMINFO_LENGTH 4096 + +#ifndef TERMINFO +#define TERMINFO "/usr/share/terminfo" +#endif + +/* comp_hash.c: name lookup */ +struct name_table_entry const *_nc_find_entry(const char *, + const struct name_table_entry *const *); +struct name_table_entry const *_nc_find_type_entry(const char *, + int, + const struct name_table_entry *); + +/* comp_scan.c: lexical analysis */ +extern int _nc_get_token(void); +extern void _nc_push_token(int); +extern void _nc_reset_input(FILE *, char *); +extern void _nc_panic_mode(char); +extern int _nc_curr_line; +extern int _nc_curr_col; +extern long _nc_curr_file_pos; +extern long _nc_comment_start, _nc_comment_end; +extern int _nc_syntax; +extern long _nc_start_line; +#define SYN_TERMINFO 0 +#define SYN_TERMCAP 1 + +/* comp_error.c: warning & abort messages */ +extern void _nc_set_source(const char *const name); +extern void _nc_get_type(char *name); +extern void _nc_set_type(const char *const name); +extern void _nc_syserr_abort(const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; +extern void _nc_err_abort(const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; +extern void _nc_warning(const char *const,...) GCC_PRINTFLIKE(1,2); +extern bool _nc_suppress_warnings; + +/* comp_expand.c: expand string into readable form */ +extern char *_nc_tic_expand(const char *, bool); + +/* comp_scan.c: decode string from readable form */ +extern char _nc_trans_string(char *); + +/* captoinfo.c: capability conversion */ +extern char *_nc_captoinfo(const char *, const char *, int const); +extern char *_nc_infotocap(const char *, const char *, int const); + +/* lib_tputs.c */ +extern int _nc_nulls_sent; /* Add one for every null sent */ + +/* comp_main.c: compiler main */ +extern const char *_nc_progname; + +/* read_entry.c */ +extern const char *_nc_tic_dir(const char *); + +/* write_entry.c */ +extern int _nc_tic_written(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __TIC_H */ diff --git a/contrib/media/updf/include/time.h b/contrib/media/updf/include/time.h new file mode 100644 index 0000000000..a4372468e6 --- /dev/null +++ b/contrib/media/updf/include/time.h @@ -0,0 +1,104 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_time_h_ +#define __dj_include_time_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +/* 65536(tics/hour) / 3600(sec/hour) * 5(scale) = 91.02 + The 5 is to make it a whole number (18.2*5=91) so that + floating point ops aren't required to use it. */ +#define CLOCKS_PER_SEC 91 + +#include <sys/djtypes.h> + +/* Some programs think they know better... */ +#undef NULL + +#define NULL 0 +__DJ_clock_t +#undef __DJ_clock_t +#define __DJ_clock_t +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t +__DJ_time_t +#undef __DJ_time_t +#define __DJ_time_t + +struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + char *__tm_zone; + int __tm_gmtoff; +}; + +char * asctime(const struct tm *_tptr); +clock_t clock(void); +char * ctime(const time_t *_cal); +double difftime(time_t _t1, time_t _t0); +struct tm * gmtime(const time_t *_tod); +struct tm * localtime(const time_t *_tod); +time_t mktime(struct tm *_tptr); +size_t strftime(char *_s, size_t _n, const char *_format, const struct tm *_tptr); +time_t time(time_t *_tod); + +#ifndef __STRICT_ANSI__ + +#define CLK_TCK CLOCKS_PER_SEC + +extern char *tzname[2]; + +void tzset(void); + +#ifndef _POSIX_SOURCE + +#define tm_zone __tm_zone +#define tm_gmtoff __tm_gmtoff + +struct timeval { + time_t tv_sec; + long tv_usec; +}; + +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; + +#include <sys/types.h> + +typedef long long uclock_t; +#define UCLOCKS_PER_SEC 1193180 + +int gettimeofday(struct timeval *_tp, struct timezone *_tzp); +unsigned long rawclock(void); +int select(int _nfds, fd_set *_readfds, fd_set *_writefds, fd_set *_exceptfds, struct timeval *_timeout); +int settimeofday(struct timeval *_tp, ...); +void tzsetwall(void); +uclock_t uclock(void); + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_time_h_ */ diff --git a/contrib/media/updf/include/tokenizer.h b/contrib/media/updf/include/tokenizer.h new file mode 100644 index 0000000000..d63827000f --- /dev/null +++ b/contrib/media/updf/include/tokenizer.h @@ -0,0 +1,44 @@ +/** \file tokenizer.h + * definitions of input output classes that read and write from string. + */ + + +#ifndef __tokenizer_h__ +#define __tokenizer_h__ + +#include "yacasbase.h" +#include "lispstring.h" +#include "lispio.h" +#include "lisphash.h" +class LispTokenizer : public YacasBase +{ +public: + LispTokenizer() : iToken() {} + /// NextToken returns a string representing the next token, + /// or an empty list. + virtual LispString * NextToken(LispInput& aInput, + LispHashTable& aHashTable); + virtual ~LispTokenizer(){} +protected: + LispString iToken; //Can be used as a token container. +}; + +class CommonLispTokenizer : public LispTokenizer +{ +public: + virtual LispString * NextToken(LispInput& aInput, + LispHashTable& aHashTable); +}; + + +// utility functions +LispBoolean IsDigit(LispChar c); +LispBoolean IsAlpha(LispChar c); +LispBoolean IsAlNum(LispChar c); +LispBoolean IsSymbolic(LispChar c); + + + +#endif + + diff --git a/contrib/media/updf/include/types.h b/contrib/media/updf/include/types.h new file mode 100644 index 0000000000..ebb578830e --- /dev/null +++ b/contrib/media/updf/include/types.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * @(#)types.h 8.1 (Berkeley) 6/6/93 + */ + +typedef struct { + char *modedescriptions; + char modetype; +} Modelist; + +extern Modelist modelist[]; + +typedef struct { + int + system, /* what the current time is */ + echotoggle, /* last time user entered echo character */ + modenegotiated, /* last time operating mode negotiated */ + didnetreceive, /* last time we read data from network */ + gotDM; /* when did we last see a data mark */ +} Clocks; + +extern Clocks clocks; diff --git a/contrib/media/updf/include/tzfile.h b/contrib/media/updf/include/tzfile.h new file mode 100644 index 0000000000..c3128126c3 --- /dev/null +++ b/contrib/media/updf/include/tzfile.h @@ -0,0 +1,160 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_tzfile_h__ +#define __dj_include_tzfile_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Arthur David Olson of the National Cancer Institute. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)tzfile.h 5.9 (Berkeley) 6/11/90 + */ + +/* +** Information about time zone files. +*/ + + /* Time zone object file directory */ +#define TZDIR "/hd/1/menuetos/zoneinfo" +#define TZDEFAULT "/hd/1/menuetos/localtim" +#define TZDEFRULES "posixrul" + +/* +** Each file begins with. . . +*/ + +struct tzhead { + char tzh_reserved[24]; /* reserved for future use */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ +}; + +/* +** . . .followed by. . . +** +** tzh_timecnt (char [4])s coded transition times a la time(2) +** tzh_timecnt (unsigned char)s types of local time starting at above +** tzh_typecnt repetitions of +** one (char [4]) coded GMT offset in seconds +** one (unsigned char) used to set tm_isdst +** one (unsigned char) that's an abbreviation list index +** tzh_charcnt (char)s '\0'-terminated zone abbreviations +** tzh_leapcnt repetitions of +** one (char [4]) coded leap second transition times +** one (char [4]) total correction after above +** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition +** time is standard time, if FALSE, +** transition time is wall clock time +** if absent, transition times are +** assumed to be wall clock time +*/ + +/* +** In the current implementation, "tzset()" refuses to deal with files that +** exceed any of the limits below. +*/ + +/* +** The TZ_MAX_TIMES value below is enough to handle a bit more than a +** year's worth of solar time (corrected daily to the nearest second) or +** 138 years of Pacific Presidential Election time +** (where there are three time zone transitions every fourth year). +*/ +#define TZ_MAX_TIMES 370 + +#define NOSOLAR /* 4BSD doesn't currently handle solar time */ + +#ifndef NOSOLAR +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#else +#define TZ_MAX_TYPES 10 /* Maximum number of local time types */ +#endif + +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ + +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +/* +** Accurate only for the past couple of centuries; +** that will probably do. +*/ + +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_tzfile_h__ */ diff --git a/contrib/media/updf/include/unctrl.h b/contrib/media/updf/include/unctrl.h new file mode 100644 index 0000000000..3e31e7bb80 --- /dev/null +++ b/contrib/media/updf/include/unctrl.h @@ -0,0 +1,63 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + ****************************************************************************/ + +/* + * unctrl.h + * + * Display a printable version of a control character. + * Control characters are displayed in caret notation (^x), DELETE is displayed + * as ^?. Printable characters are displayed as is. + */ + +/* $Id: unctrl.h.in,v 1.8 1998/02/11 12:13:45 tom Exp $ */ + +#ifndef _UNCTRL_H +#define _UNCTRL_H 1 + +#undef NCURSES_VERSION +#define NCURSES_VERSION "4.2" + +#ifdef __cplusplus +extern "C" { +#endif + +#include <curses.h> + +#undef unctrl +extern NCURSES_CONST char *unctrl(chtype); + +#ifdef __cplusplus +} +#endif + +#endif /* _UNCTRL_H */ diff --git a/contrib/media/updf/include/unistd.h b/contrib/media/updf/include/unistd.h new file mode 100644 index 0000000000..b8dea60bec --- /dev/null +++ b/contrib/media/updf/include/unistd.h @@ -0,0 +1,164 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_unistd_h_ +#define __dj_include_unistd_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/types.h> /* NOT POSIX but you can't include just unistd.h without it */ +#include <sys/djtypes.h> + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +/* Some programs think they know better... */ +#undef NULL + +#define NULL 0 + +#define F_OK 0x01 +#define R_OK 0x02 +#define W_OK 0x04 +#define X_OK 0x08 + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +#define _PC_CHOWN_RESTRICTED 1 +#define _PC_LINK_MAX 2 +#define _PC_MAX_CANON 3 +#define _PC_MAX_INPUT 4 +#define _PC_NAME_MAX 5 +#define _PC_NO_TRUNC 6 +#define _PC_PATH_MAX 7 +#define _PC_PIPE_BUF 8 +#define _PC_VDISABLE 9 + +#define _POSIX_CHOWN_RESTRICTED 0 +#undef _POSIX_JOB_CONTROL +#define _POSIX_NO_TRUNC 0 +#undef _POSIX_SAVED_IDS +#define _POSIX_VDISABLE -1 +#define _POSIX_VERSION 199009L + +#define _SC_ARG_MAX 1 +#define _SC_CHILD_MAX 2 +#define _SC_CLK_TCK 3 +#define _SC_JOB_CONTROL 4 +#define _SC_NGROUPS_MAX 5 +#define _SC_OPEN_MAX 6 +#define _SC_SAVED_IDS 7 +#define _SC_STREAM_MAX 8 +#define _SC_TZNAME_MAX 9 +#define _SC_VERSION 10 + +__DJ_size_t +#undef __DJ_size_t +#define __DJ_size_t +__DJ_ssize_t +#undef __DJ_ssize_t +#define __DJ_ssize_t + +extern char *optarg; +extern int optind, opterr, optopt; + +#ifdef _MSC_VER +void __declspec(noreturn) __exit(int _status); +void __declspec(noreturn) _exit(int _status); +#else +void __exit(int _status) __attribute__((noreturn)); +void _exit(int _status) __attribute__((noreturn)); +#endif +int access(const char *_path, int _amode); +unsigned int alarm(unsigned int _seconds); +int chdir(const char *_path); +int chown(const char *_path, uid_t _owner, gid_t _group); +int close(int _fildes); +char * ctermid(char *_s); +int dup(int _fildes); +int dup2(int _fildes, int _fildes2); +int execl(const char *_path, const char *_arg, ...); +int execle(const char *_path, const char *_arg, ...); +int execlp(const char *_file, const char *_arg, ...); +int execv(const char *_path, char *const _argv[]); +int execve(const char *_path, char *const _argv[], char *const _envp[]); +int execvp(const char *_file, char *const _argv[]); +pid_t fork(void); +long fpathconf(int _fildes, int _name); +char * getcwd(char *_buf, size_t _size); +gid_t getegid(void); +uid_t geteuid(void); +gid_t getgid(void); +int getgroups(int _gidsetsize, gid_t *_grouplist); +char * getlogin(void); +int getopt(int _argc, char *const _argv[], const char *_optstring); +pid_t getpgrp(void); +pid_t getpid(void); +pid_t getppid(void); +uid_t getuid(void); +int isatty(int _fildes); +int link(const char *_existing, const char *_new); +off_t lseek(int _fildes, off_t _offset, int _whence); +long pathconf(const char *_path, int _name); +int pause(void); +int pipe(int _fildes[2]); +ssize_t read(int _fildes, void *_buf, size_t _nbyte); +int rmdir(const char *_path); +int setgid(gid_t _gid); +int setpgid(pid_t _pid, pid_t _pgid); +pid_t setsid(void); +int setuid(uid_t uid); +unsigned int sleep(unsigned int _seconds); +long sysconf(int _name); +pid_t tcgetpgrp(int _fildes); +int tcsetpgrp(int _fildes, pid_t _pgrp_id); +char * ttyname(int _fildes); +int unlink(const char *_path); +ssize_t write(int _fildes, const void *_buf, size_t _nbyte); + +#ifndef _POSIX_SOURCE + +/* additional access() checks */ +#define D_OK 0x10 + +char * basename(const char *); +/*int brk(void *_heaptop);*/ +char * dirname(const char *_fn); +int __file_exists(const char *_fn); +int fsync(int _fd); +int ftruncate(int, off_t); +int getdtablesize(void); +int gethostname(char *buf, int size); +int getpagesize(void); +char * getwd(char *__buffer); +int nice(int _increment); +void * sbrk(int _delta); +int symlink (const char *, const char *); +int sync(void); +int truncate(const char*, off_t); +unsigned int usleep(unsigned int _useconds); +#ifndef vfork +pid_t vfork(void); +#endif + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_unistd_h_ */ diff --git a/contrib/media/updf/include/unixcommandline.h b/contrib/media/updf/include/unixcommandline.h new file mode 100644 index 0000000000..9c70fbae2b --- /dev/null +++ b/contrib/media/updf/include/unixcommandline.h @@ -0,0 +1,40 @@ + +#ifndef __unixcommandline_h__ +#define __unixcommandline_h__ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <signal.h> +#include <unistd.h> +#include <termios.h> +#include <time.h> + +#include "yacasbase.h" +#include "commandline.h" + +/** Unix command line class, using assorted termios functionality + * and sending ansi character sequences to the console. + */ +class CUnixCommandLine : public CCommandLine +{ +public: + CUnixCommandLine(); + ~CUnixCommandLine(); +public: + virtual LispInt GetKey(); + virtual void NewLine(); + virtual void ShowLine(LispChar * prompt,LispInt promptlen,LispInt cursor); + virtual void Pause(); + virtual void MaxHistoryLinesSaved(LispInt aNrLines); +private: + unsigned char term_chars[NCCS]; + struct termios orig_termio, rl_termio; +public: + LispInt iMaxLines; +}; + + +#endif + diff --git a/contrib/media/updf/include/utility b/contrib/media/updf/include/utility new file mode 100644 index 0000000000..787e799734 --- /dev/null +++ b/contrib/media/updf/include/utility @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_UTILITY +#include <bits/std_utility.h> +#endif diff --git a/contrib/media/updf/include/utime.h b/contrib/media/updf/include/utime.h new file mode 100644 index 0000000000..0ca0b8610f --- /dev/null +++ b/contrib/media/updf/include/utime.h @@ -0,0 +1,38 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_utime_h_ +#define __dj_include_utime_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#include <sys/djtypes.h> +__DJ_time_t +#undef __DJ_time_t +#define __DJ_time_t + +struct utimbuf { + time_t actime; + time_t modtime; +}; + +int utime(const char *_path, const struct utimbuf *_times); + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_utime_h_ */ diff --git a/contrib/media/updf/include/valarray b/contrib/media/updf/include/valarray new file mode 100644 index 0000000000..cb13d82f69 --- /dev/null +++ b/contrib/media/updf/include/valarray @@ -0,0 +1,32 @@ +// -*- C++ -*- std header. + +// Copyright (C) 2001 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _CPP_VALARRAY +#include <bits/std_valarray.h> +#endif diff --git a/contrib/media/updf/include/values.h b/contrib/media/updf/include/values.h new file mode 100644 index 0000000000..66689a97fd --- /dev/null +++ b/contrib/media/updf/include/values.h @@ -0,0 +1,57 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_values_h_ +#define __dj_include_values_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#define BITSPERBYTE 8 + +#define CHARBITS 8 +#define SHORTBITS 16 +#define INTBITS 32 +#define LONGBITS 32 +#define PTRBITS 32 +#define DOUBLEBITS 64 +#define FLOATBITS 32 + +#define MINSHORT ((short)0x8000) +#define MININT ((int)0x80000000L) +#define MINLONG ((long)0x80000000L) + +#define MAXSHORT ((short)0x7fff) +#define MAXINT ((int)0x7fffffff) +#define MAXLONG ((long)0x7fffffff) + +#define MAXDOUBLE 1.79769313486231570e+308 +#define MAXFLOAT ((float)3.40282346638528860e+38) +#define MINDOUBLE 2.22507385850720140e-308 +#define MINFLOAT ((float)1.17549435082228750e-38) +#define _IEEE 0 +#define _DEXPLEN 11 +#define _FEXPLEN 8 +#define _HIDDENBIT 1 +#define DMAXEXP ((1 << _DEXPLEN - 1) - 1 + _IEEE) +#define FMAXEXP ((1 << _FEXPLEN - 1) - 1 + _IEEE) +#define DMINEXP (-DMAXEXP) +#define FMINEXP (-FMAXEXP) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_values_h_ */ diff --git a/contrib/media/updf/include/varargs.h b/contrib/media/updf/include/varargs.h new file mode 100644 index 0000000000..033d3e60d4 --- /dev/null +++ b/contrib/media/updf/include/varargs.h @@ -0,0 +1,51 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_vararg_h_ +#define __dj_include_vararg_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifdef __dj_include_stdarg_h_ +#error varargs.h and stdarg.h are mutually exclusive +#endif + +#include <sys/djtypes.h> + +__DJ_va_list +#undef __DJ_va_list +#define __DJ_va_list + +#define va_alist __dj_last_arg + +#define va_dcl int __dj_last_arg; + +#define __dj_va_rounded_size(T) \ + (((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + +#define va_arg(ap, T) \ + (ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \ + *((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T)))) + +#define va_end(ap) + +#define va_start(ap) (ap=(char *)(&__dj_last_arg)) + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_varargs_h_ */ diff --git a/contrib/media/updf/include/vector b/contrib/media/updf/include/vector new file mode 100644 index 0000000000..113b69eaf4 --- /dev/null +++ b/contrib/media/updf/include/vector @@ -0,0 +1,135 @@ +#ifndef _VECTOR_INCLUDED +#define _VECTOR_INCLUDED +#include <stdlib.h> +#include <string.h> +extern void *__cdecl operator new(size_t); +inline void *__cdecl operator new(size_t, void *_P) +{ return (_P); } +namespace std +{ + template<class T> class vector + { + unsigned length; + unsigned allocated; + T* data; + public: + typedef unsigned size_type; + typedef T* iterator; + vector():length(0),allocated(0),data(NULL) {} + ~vector() {for (unsigned i=length;i--;)data[i].~T();free(data);} + unsigned size() const {return length;} + void clear() {length=0;} + T& operator[](unsigned pos) {return data[pos];} + T* begin() {return data;} + T* end() {return data+length;} + void push_back(const T& x) + { + if (length==allocated) + { + allocated+=16; + data=(T*)realloc(data,allocated*sizeof(T)); + } + new (data+length++) T(x); + } + bool empty() const {return length==0;} + void pop_back() {data[--length].~T();} + T& back() {return data[length-1];} + iterator erase(iterator it) + { + T* a=it; + while (++a != data+length) + { + a[-1] = *a; + } + length--; + return it; + } + /*iterator*/T* insert(iterator where, const T& what = T()) + { + int z=where-data; + if (length==allocated) + { + allocated+=16; + data=(T*)realloc(data,allocated*sizeof(T)); + } + T* a=data+length; + T* b=data+z; + length++; + while (a != b) + { + *a = a[-1]; + --a; + } + *a = what; + return /*iterator*/a; + } + }; + struct _generic_vector + { + unsigned length; + unsigned allocated; + void** data; + }; + inline void _generic_pointer_push_back(_generic_vector* v, void* a) + { + if (v->length==v->allocated) + { + v->allocated+=16; + v->data=(void**)realloc(v->data,v->allocated*sizeof(void*)); + } + v->data[v->length++]=a; + } + inline void _generic_pointer_erase(_generic_vector* v, void** a) + { + while (++a != v->data+v->length) + { + a[-1] = *a; + } + v->length--; + } + inline void** _generic_pointer_insert(_generic_vector* v, void** where, void* what) + { + int z=where-v->data; + if (v->length==v->allocated) + { + v->allocated+=16; + v->data=(void**)realloc(v->data,v->allocated*sizeof(void*)); + } + void** a=v->data+v->length; + void** b=v->data+z; + v->length++; + while (a != b) + { + *a = a[-1]; + --a; + } + *a = what; + return a; + } + template<class T> class vector<T*> + { + unsigned length; + unsigned allocated; + T** data; + public: + typedef unsigned size_type; + typedef T** iterator; + vector():length(0),allocated(0),data(NULL) {} + ~vector() {free(data);} + unsigned size() const {return length;} + void clear() {length=0;} + T*& operator[](unsigned pos) {return data[pos];} + iterator begin() {return iterator(data);} + iterator end() {return iterator(data+length);} + void push_back(T* const& x) + { _generic_pointer_push_back((_generic_vector*)this, (void*)x); } + bool empty() const {return length==0;} + void pop_back() {--length;} + T*& back() {return data[length-1];} + iterator erase(iterator it) + { _generic_pointer_erase((_generic_vector*)this, (void**)it); return it; } + iterator insert(iterator where, T* const& what) + { return (T**)_generic_pointer_insert((_generic_vector*)this, (void**)where, what); } + }; +} +#endif diff --git a/contrib/media/updf/include/version.h b/contrib/media/updf/include/version.h new file mode 100644 index 0000000000..b23e8e2963 --- /dev/null +++ b/contrib/media/updf/include/version.h @@ -0,0 +1 @@ +#define VERSION "1.2.2" diff --git a/contrib/media/updf/include/wchar.h b/contrib/media/updf/include/wchar.h new file mode 100644 index 0000000000..2c051dfb09 --- /dev/null +++ b/contrib/media/updf/include/wchar.h @@ -0,0 +1,45 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_wchar_h_ +#define __dj_include_wchar_h_ + +/* Bare bones header to satisfy SGI STL's basic_string<> */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#include <stddef.h> + +__DJ_wint_t +#undef __DJ_wint_t +#define __DJ_wint_t + +#ifndef WEOF +#define WEOF ((wint_t)(-1)) +#endif + +typedef struct +{ + int shift_state; +} mbstate_t; + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_wchar_h_ */ + diff --git a/contrib/media/updf/include/wctype.h b/contrib/media/updf/include/wctype.h new file mode 100644 index 0000000000..b36909b53b --- /dev/null +++ b/contrib/media/updf/include/wctype.h @@ -0,0 +1,47 @@ +/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_wctype_h_ +#define __dj_include_wctype_h_ + +/* Bare bones header to satisfy SGI STL's basic_string<> */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#include <sys/djtypes.h> + +__DJ_wchar_t +#undef __DJ_wchar_t +#define __DJ_wchar_t +__DJ_wint_t +#undef __DJ_wint_t +#define __DJ_wint_t + +#ifndef WEOF +#define WEOF ((wint_t)(-1)) +#endif + +/* Implementation defined types */ +typedef unsigned short wctype_t; +typedef const unsigned char *wctrans_t; + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !__dj_include_wctype_h_ */ + diff --git a/contrib/media/updf/include/xmltokenizer.h b/contrib/media/updf/include/xmltokenizer.h new file mode 100644 index 0000000000..1bd4e059b3 --- /dev/null +++ b/contrib/media/updf/include/xmltokenizer.h @@ -0,0 +1,20 @@ + +#ifndef _xmltokenizer_h_ +#define _xmltokenizer_h_ + +#include "yacasbase.h" +#include "tokenizer.h" + +class XmlTokenizer : public LispTokenizer +{ +public: + XmlTokenizer() {} + /// NextToken returns a string representing the next token, + /// or an empty list. + virtual LispString * NextToken(LispInput& aInput, + LispHashTable& aHashTable); + virtual ~XmlTokenizer(); +}; + +#endif + diff --git a/contrib/media/updf/include/y_tab.h b/contrib/media/updf/include/y_tab.h new file mode 100644 index 0000000000..b973d540c5 --- /dev/null +++ b/contrib/media/updf/include/y_tab.h @@ -0,0 +1,35 @@ + +typedef union +{ + int vInt; + long vLong; + float vFloat; + Word vWord; + Byte *pByte; +} YYSTYPE; +extern YYSTYPE yylval; +# define NIL 257 +# define IF 258 +# define THEN 259 +# define ELSE 260 +# define ELSEIF 261 +# define WHILE 262 +# define DO 263 +# define REPEAT 264 +# define UNTIL 265 +# define END 266 +# define RETURN 267 +# define LOCAL 268 +# define NUMBER 269 +# define FUNCTION 270 +# define NAME 271 +# define STRING 272 +# define DEBUG 273 +# define NOT 274 +# define AND 275 +# define OR 276 +# define NE 277 +# define LE 278 +# define GE 279 +# define CONC 280 +# define UNARY 281 diff --git a/contrib/media/updf/include/yacas.h b/contrib/media/updf/include/yacas.h new file mode 100644 index 0000000000..1d8b37c3c4 --- /dev/null +++ b/contrib/media/updf/include/yacas.h @@ -0,0 +1,145 @@ +/// \file +/// Definitions of DefaultYacasEnvironment and CYacas. + +#ifndef __yacas_h__ +#define __yacas_h__ + +#include "yacasbase.h" +#include "lispstring.h" +#include "stringio.h" +#include "tokenizer.h" +#include "lisphash.h" +#include "lispevalhash.h" +#include "infixparser.h" +#include "stdfileio.h" +#include "lispatom.h" +#include "lispeval.h" +#include "mathenvironment.h" +#include "lispglobals.h" +#include "lisperror.h" +#include "lispuserfunc.h" + + +/// The default environment for a Yacas session. +/// This class constructs a LispEnvironment (to be found in +/// #iEnvironment), and defines the Yacas core functions. The core +/// functions are listed in corefunctions.h . Examples of core +/// functions are \c Head, \c Set and \c Eval. + +class DefaultYacasEnvironment : public YacasBase +{ +public: + DefaultYacasEnvironment(); + DefaultYacasEnvironment(LispOutput* aOutput, LispInt aStackSize); + virtual ~DefaultYacasEnvironment(); + LispEnvironment& getEnv() {return iEnvironment;} + +private: + DefaultYacasEnvironment(const DefaultYacasEnvironment& aOther) + : output(NULL),hash(),printer(),coreCommands(),globals(),prefixoperators(),infixoperators(),postfixoperators(),bodiedoperators(),infixprinter(aOther.infixprinter),userFunctions(), + iEnvironment(coreCommands,userFunctions, + globals,hash,output,infixprinter, + prefixoperators,infixoperators, + postfixoperators,bodiedoperators,&input,0), + input(aOther.input.Status()) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + } + DefaultYacasEnvironment& operator=(const DefaultYacasEnvironment& aOther) + { + // copy constructor not written yet, hence the assert + LISPASSERT(0); + return *this; + } + +private: + LispOutput* output; + LispHashTable hash; + LispPrinter printer; + + YacasCoreCommands coreCommands; + LispGlobal globals; + + //Define the default operators. + LispOperators prefixoperators; + LispOperators infixoperators; + LispOperators postfixoperators; + LispOperators bodiedoperators; + InfixPrinter infixprinter; + + LispUserFunctions userFunctions; + + LispEnvironment iEnvironment; + +public: + CachedStdUserInput input; +}; + + +/// The Yacas engine. +/// This is the only class that applications need to use. It can +/// evaluate Yacas expressions. Every instance has its own Yacas +/// environment, in which the expressions are evaluated. + + + +class CYacas : public YacasBase +{ +public: + + /// Pseudo-constructor. + /// \return A new instance of CYacas, with output connected to \p aOutput. + /// If aOutput is NULL, connect to a new instance of StdUserOutput. + LISPIMPORT static CYacas* NewL(LispOutput* aOutput=0, LispInt aStackSize=50000); + + /// Destructor. + LISPIMPORT virtual ~CYacas(); + + /// Return the underlying Yacas environment. + inline DefaultYacasEnvironment& getDefEnv() {return environment;} + + /// Evaluate a Yacas expression. + /// First, \p aExpression is parsed by an InfixParser. Then it is + /// evaluated in the underlying Lisp environment. Finally, the + /// result is printed to #iResultOutput via the pretty printer or, + /// if this is not defined, via an InfixPrinter. + virtual void Evaluate(const LispChar * aExpression); + + /// Return the result of the expression. + /// This is stored in #iResult. + virtual LispChar * Result(); + + /// Return the error message produced by the last evaluation. + /// The error is retrieved from #environment. + virtual LispChar * Error(); + + /// Whether an error occured during the last evaluation. + inline LispBoolean IsError(); + +private: + + /// Constructor. + /// The output of #environment is directed to \p aOutput. + CYacas(LispOutput* aOutput,LispInt aStackSize); + +private: + + /// The underlying Yacas environment + DefaultYacasEnvironment environment; + + /// String containing the result of the last evaluation + LispString iResult; + + /// Stream pointing to #iResult. + StringOutput iResultOutput; +}; + +inline LispBoolean CYacas::IsError() +{ + return (Error()[0] != '\0'); +} + +#endif + + diff --git a/contrib/media/updf/include/yacasbase.h b/contrib/media/updf/include/yacasbase.h new file mode 100644 index 0000000000..204f15a8ee --- /dev/null +++ b/contrib/media/updf/include/yacasbase.h @@ -0,0 +1,58 @@ +#ifndef __yacasbase_h__ +#define __yacasbase_h__ +#include "yacasprivate.h" + +/* /class YacasBase. All other objects should derive from YacasBase so that they use the correct + * operators new and delete. This ensures a Yacas-specific memory manager is used. + */ + +class YacasBase +{ +public: + inline YacasBase() {}; +#ifdef YACAS_DEBUG + // New operators with additional debug arguments need to be handled differently + static inline void* operator new(size_t size, char* aFile, int aLine) + { return YacasMallocPrivate(size,aFile,aLine); } + static inline void* operator new[](size_t size, char* aFile, int aLine) + { return YacasMallocPrivate(size,aFile,aLine); } +#else + // Normal versions of operator new + static inline void* operator new(size_t size) + { return PlatAlloc(size); } + static inline void* operator new[](size_t size) + { return PlatAlloc(size); } +#endif + /* Operators delete are shared, they behave the same whether in debug or release (as + PlatFree is mapped to the debug version of freeing memory any way) + */ + static inline void operator delete(void* object) + { PlatFree(object); } + static inline void operator delete[](void* object) + { PlatFree(object); } + // Placement form of new and delete. + static inline void* operator new(size_t, void* where) { return where; } + static inline void operator delete(void*, void*) {} + + /** If we don't want to force vtables, we can make the destructor inline and protected. + * The following might cause a little bit of overhead but has the advantage that even + * the compiler can see that this is safe (thus no unnecessary warnings). Preferrably + * though this class has a protected inline destructor. + * + * When I use Xcode on the MacOSX, I would prefer to not see the warnings that the + * destructor of this class is not virtual, and speed is not the primary concern in + * that build (as that build is used mostly for debugging). + * + * HIDE_UNIMPORTANT_COMPILER_WARNINGS can be defined in case one wants to get rid of + * compiler warnings, as opposed to having maximum running speed. + */ +protected: +#ifdef HIDE_UNIMPORTANT_COMPILER_WARNINGS + virtual +#else // HIDE_UNIMPORTANT_COMPILER_WARNINGS + inline +#endif // HIDE_UNIMPORTANT_COMPILER_WARNINGS + ~YacasBase() {}; +}; + +#endif diff --git a/contrib/media/updf/include/yacasprivate.h b/contrib/media/updf/include/yacasprivate.h new file mode 100644 index 0000000000..726d16f6b8 --- /dev/null +++ b/contrib/media/updf/include/yacasprivate.h @@ -0,0 +1,13 @@ + +#ifndef __yacasprivate_h__ +#define __yacasprivate_h__ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "lisptype.h" +#include "stubs.h" + +#endif + diff --git a/contrib/media/updf/include/zAVLTree.h b/contrib/media/updf/include/zAVLTree.h new file mode 100644 index 0000000000..de6965e088 --- /dev/null +++ b/contrib/media/updf/include/zAVLTree.h @@ -0,0 +1,67 @@ +/* + * zAVLTree.h: Header file for AVLTrees with string keys. + * Copyright (C) 1998 Michael H. Buselli + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The author of this library can be reached at the following address: + * Michael H. Buselli + * 4334 N. Hazel St. #515 + * Chicago, IL 60613-1456 + * + * Or you can send email to <cosine@tezcat.com>. + * The official web page for this product is: + * http://www.tezcat.com/~cosine/pub/AVLTree/ + * + * This is version 0.1.0 (alpha). + */ + +#ifndef _ZAVLTREE_H_ +#define _ZAVLTREE_H_ + + +typedef struct _zAVLNode { + const char *key; + long depth; + void *item; + struct _zAVLNode *parent; + struct _zAVLNode *left; + struct _zAVLNode *right; +} zAVLNode; + + +typedef struct { + zAVLNode *top; + long count; + const char *(*getkey)(const void *item); +} zAVLTree; + + +typedef struct { + const zAVLTree *avltree; + const zAVLNode *curnode; +} zAVLCursor; + + +extern zAVLTree *zAVLAllocTree (const char *(*getkey)(void const *item)); +extern void zAVLFreeTree (zAVLTree *avltree, void (freeitem)(void *item)); +extern int zAVLInsert (zAVLTree *avltree, void *item); +extern void *zAVLSearch (zAVLTree const *avltree, const char *key); +extern int zAVLDelete (zAVLTree *avltree, const char *key); +extern void *zAVLFirst (zAVLCursor *avlcursor, zAVLTree const *avltree); +extern void *zAVLNext (zAVLCursor *avlcursor); + + +#endif diff --git a/contrib/media/updf/include/zconf.h b/contrib/media/updf/include/zconf.h new file mode 100644 index 0000000000..6d450fc793 --- /dev/null +++ b/contrib/media/updf/include/zconf.h @@ -0,0 +1,279 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-1998 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef _ZCONF_H +#define _ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateReset z_inflateReset +# define compress z_compress +# define compress2 z_compress2 +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table + +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +# define WIN32 +#endif +#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) +# ifndef __32BIT__ +# define __32BIT__ +# endif +#endif +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#if defined(MSDOS) && !defined(__32BIT__) +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) +# define STDC +#endif +#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +# ifndef STDC +# define STDC +# endif +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Old Borland C incorrectly complains about missing returns: */ +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) +# define NEED_DUMMY_RETURN +#endif + + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +#endif +#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) +# ifndef __32BIT__ +# define SMALL_MEDIUM +# define FAR _far +# endif +#endif + +/* Compile with -DZLIB_DLL for Windows DLL support */ +#if defined(ZLIB_DLL) +# if defined(_WINDOWS) || defined(WINDOWS) +# ifdef FAR +# undef FAR +# endif +# include <windows.h> +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR _cdecl _export +# endif +# endif +# if defined (__BORLANDC__) +# if (__BORLANDC__ >= 0x0500) && defined (WIN32) +# include <windows.h> +# define ZEXPORT __declspec(dllexport) WINAPI +# define ZEXPORTRVA __declspec(dllexport) WINAPIV +# else +# if defined (_Windows) && defined (__DLL__) +# define ZEXPORT _export +# define ZEXPORTVA _export +# endif +# endif +# endif +#endif + +#if defined (__BEOS__) +# if defined (ZLIB_DLL) +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +#endif + +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif +#ifndef ZEXTERN +# define ZEXTERN extern +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(MACOS) && !defined(TARGET_OS_MAC) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H +# include <sys/types.h> /* for off_t */ +# include <unistd.h> /* for SEEK_* and off_t */ +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(inflate_blocks,"INBL") +# pragma map(inflate_blocks_new,"INBLNE") +# pragma map(inflate_blocks_free,"INBLFR") +# pragma map(inflate_blocks_reset,"INBLRE") +# pragma map(inflate_codes_free,"INCOFR") +# pragma map(inflate_codes,"INCO") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_flush,"INFLU") +# pragma map(inflate_mask,"INMA") +# pragma map(inflate_set_dictionary,"INSEDI2") +# pragma map(inflate_copyright,"INCOPY") +# pragma map(inflate_trees_bits,"INTRBI") +# pragma map(inflate_trees_dynamic,"INTRDY") +# pragma map(inflate_trees_fixed,"INTRFI") +# pragma map(inflate_trees_free,"INTRFR") +#endif + +#endif /* _ZCONF_H */ diff --git a/contrib/media/updf/include/zlib.h b/contrib/media/updf/include/zlib.h new file mode 100644 index 0000000000..49f56b43bc --- /dev/null +++ b/contrib/media/updf/include/zlib.h @@ -0,0 +1,893 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.3, July 9th, 1998 + + Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef _ZLIB_H +#define _ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.1.3" + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: ascii or binary */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +/* Allowed flush values; see deflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative + * values are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_ASCII 1 +#define Z_UNKNOWN 2 +/* Possible values of the data_type field */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + the compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update data_type if it can make a good guess about + the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster routine + may be used for the single inflate() call. + + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise + it sets strm->adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match). Filtered data consists mostly of small values with a + somewhat random distribution. In this case, the compression algorithm is + tuned to compress them better. The effect of Z_FILTERED is to force more + Huffman coding and less string matching; it is somewhat intermediate + between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects + the compression ratio but not the correctness of the compressed output even + if it is not set appropriately. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. + + Upon return of this function, strm->adler is set to the Adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.) +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary). + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ + + +typedef voidp gzFile; + +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +/* + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h". (See the description + of deflateInit2 for more information about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). */ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). */ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + const voidp buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + gzgets returns buf, or Z_NULL in case of error. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. +*/ + +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); +/* + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +/* + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); + +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running crc with the bytes buf[0..len-1] and return the updated + crc. If buf is NULL, this function returns the required initial value + for the crc. Pre- and post-conditioning (one's complement) is performed + within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; /* hack for buggy compilers */ +#endif + +ZEXTERN const char * ZEXPORT zError OF((int err)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _ZLIB_H */ diff --git a/contrib/media/updf/pdf/data_encodings.h b/contrib/media/updf/pdf/data_encodings.h new file mode 100644 index 0000000000..4a86e51407 --- /dev/null +++ b/contrib/media/updf/pdf/data_encodings.h @@ -0,0 +1,214 @@ +#define _notdef NULL + +const unsigned short pdf_doc_encoding[256] = +{ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0009, 0x000A, 0x0000, 0x0000, 0x000D, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x02d8, 0x02c7, 0x02c6, 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000, + 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x0192, 0x2044, + 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, + 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x0141, 0x0152, 0x0160, + 0x0178, 0x017d, 0x0131, 0x0142, 0x0153, 0x0161, 0x017e, 0x0000, + 0x20ac, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x0000, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff +}; + +const char * const pdf_standard[256] = { _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", + "ampersand", "quoteright", "parenleft", "parenright", "asterisk", + "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", + "three", "four", "five", "six", "seven", "eight", "nine", "colon", + "semicolon", "less", "equal", "greater", "question", "at", "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", + "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", + "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, "exclamdown", "cent", "sterling", + "fraction", "yen", "florin", "section", "currency", "quotesingle", + "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", + "fi", "fl", _notdef, "endash", "dagger", "daggerdbl", "periodcentered", + _notdef, "paragraph", "bullet", "quotesinglbase", "quotedblbase", + "quotedblright", "guillemotright", "ellipsis", "perthousand", + _notdef, "questiondown", _notdef, "grave", "acute", "circumflex", + "tilde", "macron", "breve", "dotaccent", "dieresis", _notdef, + "ring", "cedilla", _notdef, "hungarumlaut", "ogonek", "caron", + "emdash", _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, "AE", + _notdef, "ordfeminine", _notdef, _notdef, _notdef, _notdef, + "Lslash", "Oslash", "OE", "ordmasculine", _notdef, _notdef, + _notdef, _notdef, _notdef, "ae", _notdef, _notdef, + _notdef, "dotlessi", _notdef, _notdef, "lslash", "oslash", + "oe", "germandbls", _notdef, _notdef, _notdef, _notdef +}; + +const char * const pdf_mac_roman[256] = { _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", + "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", + "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", + "three", "four", "five", "six", "seven", "eight", "nine", "colon", + "semicolon", "less", "equal", "greater", "question", "at", "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", + "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", + "grave", "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", "braceleft", "bar", "braceright", "asciitilde", _notdef, + "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", + "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", + "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", + "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", + "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", + "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", + "section", "bullet", "paragraph", "germandbls", "registered", + "copyright", "trademark", "acute", "dieresis", _notdef, "AE", + "Oslash", _notdef, "plusminus", _notdef, _notdef, "yen", "mu", + _notdef, _notdef, _notdef, _notdef, _notdef, "ordfeminine", + "ordmasculine", _notdef, "ae", "oslash", "questiondown", "exclamdown", + "logicalnot", _notdef, "florin", _notdef, _notdef, "guillemotleft", + "guillemotright", "ellipsis", "space", "Agrave", "Atilde", "Otilde", + "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", + "quoteleft", "quoteright", "divide", _notdef, "ydieresis", + "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", + "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", + "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", + "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", + "Oacute", "Ocircumflex", _notdef, "Ograve", "Uacute", "Ucircumflex", + "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", + "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron" +}; + +const char * const pdf_mac_expert[256] = { _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", + "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", + "parenleftsuperior", "parenrightsuperior", "twodotenleader", + "onedotenleader", "comma", "hyphen", "period", "fraction", + "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", + "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", + "eightoldstyle", "nineoldstyle", "colon", "semicolon", _notdef, + "threequartersemdash", _notdef, "questionsmall", _notdef, + _notdef, _notdef, _notdef, "Ethsmall", _notdef, _notdef, + "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", + "fiveeighths", "seveneighths", "onethird", "twothirds", _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, "ff", "fi", + "fl", "ffi", "ffl", "parenleftinferior", _notdef, "parenrightinferior", + "Circumflexsmall", "hypheninferior", "Gravesmall", "Asmall", "Bsmall", + "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", + "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", + "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", + "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", + "Tildesmall", _notdef, _notdef, "asuperior", "centsuperior", + _notdef, _notdef, _notdef, _notdef, "Aacutesmall", + "Agravesmall", "Acircumflexsmall", "Adieresissmall", "Atildesmall", + "Aringsmall", "Ccedillasmall", "Eacutesmall", "Egravesmall", + "Ecircumflexsmall", "Edieresissmall", "Iacutesmall", "Igravesmall", + "Icircumflexsmall", "Idieresissmall", "Ntildesmall", "Oacutesmall", + "Ogravesmall", "Ocircumflexsmall", "Odieresissmall", "Otildesmall", + "Uacutesmall", "Ugravesmall", "Ucircumflexsmall", "Udieresissmall", + _notdef, "eightsuperior", "fourinferior", "threeinferior", + "sixinferior", "eightinferior", "seveninferior", "Scaronsmall", + _notdef, "centinferior", "twoinferior", _notdef, "Dieresissmall", + _notdef, "Caronsmall", "osuperior", "fiveinferior", _notdef, + "commainferior", "periodinferior", "Yacutesmall", _notdef, + "dollarinferior", _notdef, _notdef, "Thornsmall", _notdef, + "nineinferior", "zeroinferior", "Zcaronsmall", "AEsmall", "Oslashsmall", + "questiondownsmall", "oneinferior", "Lslashsmall", _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, "Cedillasmall", + _notdef, _notdef, _notdef, _notdef, _notdef, "OEsmall", + "figuredash", "hyphensuperior", _notdef, _notdef, _notdef, + _notdef, "exclamdownsmall", _notdef, "Ydieresissmall", _notdef, + "onesuperior", "twosuperior", "threesuperior", "foursuperior", + "fivesuperior", "sixsuperior", "sevensuperior", "ninesuperior", + "zerosuperior", _notdef, "esuperior", "rsuperior", "tsuperior", + _notdef, _notdef, "isuperior", "ssuperior", "dsuperior", + _notdef, _notdef, _notdef, _notdef, _notdef, "lsuperior", + "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", + "msuperior", "commasuperior", "periodsuperior", "Dotaccentsmall", + "Ringsmall", _notdef, _notdef, _notdef, _notdef }; + +const char * const pdf_win_ansi[256] = { _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, + _notdef, _notdef, _notdef, _notdef, _notdef, "space", + "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", + "quotesingle", "parenleft", "parenright", "asterisk", "plus", + "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", + "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", + "less", "equal", "greater", "question", "at", "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", "bracketleft", + "backslash", "bracketright", "asciicircum", "underscore", "grave", + "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", + "braceleft", "bar", "braceright", "asciitilde", "bullet", "Euro", + "bullet", "quotesinglbase", "florin", "quotedblbase", "ellipsis", + "dagger", "daggerdbl", "circumflex", "perthousand", "Scaron", + "guilsinglleft", "OE", "bullet", "Zcaron", "bullet", "bullet", + "quoteleft", "quoteright", "quotedblleft", "quotedblright", "bullet", + "endash", "emdash", "tilde", "trademark", "scaron", "guilsinglright", + "oe", "bullet", "zcaron", "Ydieresis", "space", "exclamdown", "cent", + "sterling", "currency", "yen", "brokenbar", "section", "dieresis", + "copyright", "ordfeminine", "guillemotleft", "logicalnot", "hyphen", + "registered", "macron", "degree", "plusminus", "twosuperior", + "threesuperior", "acute", "mu", "paragraph", "periodcentered", + "cedilla", "onesuperior", "ordmasculine", "guillemotright", + "onequarter", "onehalf", "threequarters", "questiondown", "Agrave", + "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring", "AE", + "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Edieresis", "Igrave", + "Iacute", "Icircumflex", "Idieresis", "Eth", "Ntilde", "Ograve", + "Oacute", "Ocircumflex", "Otilde", "Odieresis", "multiply", "Oslash", + "Ugrave", "Uacute", "Ucircumflex", "Udieresis", "Yacute", "Thorn", + "germandbls", "agrave", "aacute", "acircumflex", "atilde", "adieresis", + "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex", + "edieresis", "igrave", "iacute", "icircumflex", "idieresis", "eth", + "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", + "divide", "oslash", "ugrave", "uacute", "ucircumflex", "udieresis", + "yacute", "thorn", "ydieresis" +}; diff --git a/contrib/media/updf/pdf/data_glyphlist.h b/contrib/media/updf/pdf/data_glyphlist.h new file mode 100644 index 0000000000..f141691683 --- /dev/null +++ b/contrib/media/updf/pdf/data_glyphlist.h @@ -0,0 +1,1461 @@ +/* +# Name: Adobe Glyph List +# Table version: 2.0 +# Date: September 20, 2002 +# +# See http://partners.adobe.com/asn/developer/typeforum/unicodegn.html +# +# Format: Semicolon-delimited fields: +# (1) glyph name +# (2) Unicode scalar value +#--end +*/ + +static const char *agl_name_list[] = { +"A","AE","AEacute","AEmacron","AEsmall","Aacute","Aacutesmall","Abreve", +"Abreveacute","Abrevecyrillic","Abrevedotbelow","Abrevegrave", +"Abrevehookabove","Abrevetilde","Acaron","Acircle","Acircumflex", +"Acircumflexacute","Acircumflexdotbelow","Acircumflexgrave", +"Acircumflexhookabove","Acircumflexsmall","Acircumflextilde","Acute", +"Acutesmall","Acyrillic","Adblgrave","Adieresis","Adieresiscyrillic", +"Adieresismacron","Adieresissmall","Adotbelow","Adotmacron","Agrave", +"Agravesmall","Ahookabove","Aiecyrillic","Ainvertedbreve","Alpha", +"Alphatonos","Amacron","Amonospace","Aogonek","Aring","Aringacute", +"Aringbelow","Aringsmall","Asmall","Atilde","Atildesmall","Aybarmenian","B", +"Bcircle","Bdotaccent","Bdotbelow","Becyrillic","Benarmenian","Beta","Bhook", +"Blinebelow","Bmonospace","Brevesmall","Bsmall","Btopbar","C","Caarmenian", +"Cacute","Caron","Caronsmall","Ccaron","Ccedilla","Ccedillaacute", +"Ccedillasmall","Ccircle","Ccircumflex","Cdot","Cdotaccent","Cedillasmall", +"Chaarmenian","Cheabkhasiancyrillic","Checyrillic", +"Chedescenderabkhasiancyrillic","Chedescendercyrillic","Chedieresiscyrillic", +"Cheharmenian","Chekhakassiancyrillic","Cheverticalstrokecyrillic","Chi", +"Chook","Circumflexsmall","Cmonospace","Coarmenian","Csmall","D","DZ", +"DZcaron","Daarmenian","Dafrican","Dcaron","Dcedilla","Dcircle", +"Dcircumflexbelow","Dcroat","Ddotaccent","Ddotbelow","Decyrillic","Deicoptic", +"Delta","Deltagreek","Dhook","Dieresis","DieresisAcute","DieresisGrave", +"Dieresissmall","Digammagreek","Djecyrillic","Dlinebelow","Dmonospace", +"Dotaccentsmall","Dslash","Dsmall","Dtopbar","Dz","Dzcaron", +"Dzeabkhasiancyrillic","Dzecyrillic","Dzhecyrillic","E","Eacute", +"Eacutesmall","Ebreve","Ecaron","Ecedillabreve","Echarmenian","Ecircle", +"Ecircumflex","Ecircumflexacute","Ecircumflexbelow","Ecircumflexdotbelow", +"Ecircumflexgrave","Ecircumflexhookabove","Ecircumflexsmall", +"Ecircumflextilde","Ecyrillic","Edblgrave","Edieresis","Edieresissmall", +"Edot","Edotaccent","Edotbelow","Efcyrillic","Egrave","Egravesmall", +"Eharmenian","Ehookabove","Eightroman","Einvertedbreve","Eiotifiedcyrillic", +"Elcyrillic","Elevenroman","Emacron","Emacronacute","Emacrongrave", +"Emcyrillic","Emonospace","Encyrillic","Endescendercyrillic","Eng", +"Enghecyrillic","Enhookcyrillic","Eogonek","Eopen","Epsilon","Epsilontonos", +"Ercyrillic","Ereversed","Ereversedcyrillic","Escyrillic", +"Esdescendercyrillic","Esh","Esmall","Eta","Etarmenian","Etatonos","Eth", +"Ethsmall","Etilde","Etildebelow","Euro","Ezh","Ezhcaron","Ezhreversed","F", +"Fcircle","Fdotaccent","Feharmenian","Feicoptic","Fhook","Fitacyrillic", +"Fiveroman","Fmonospace","Fourroman","Fsmall","G","GBsquare","Gacute","Gamma", +"Gammaafrican","Gangiacoptic","Gbreve","Gcaron","Gcedilla","Gcircle", +"Gcircumflex","Gcommaaccent","Gdot","Gdotaccent","Gecyrillic","Ghadarmenian", +"Ghemiddlehookcyrillic","Ghestrokecyrillic","Gheupturncyrillic","Ghook", +"Gimarmenian","Gjecyrillic","Gmacron","Gmonospace","Grave","Gravesmall", +"Gsmall","Gsmallhook","Gstroke","H","H18533","H18543","H18551","H22073", +"HPsquare","Haabkhasiancyrillic","Hadescendercyrillic","Hardsigncyrillic", +"Hbar","Hbrevebelow","Hcedilla","Hcircle","Hcircumflex","Hdieresis", +"Hdotaccent","Hdotbelow","Hmonospace","Hoarmenian","Horicoptic","Hsmall", +"Hungarumlaut","Hungarumlautsmall","Hzsquare","I","IAcyrillic","IJ", +"IUcyrillic","Iacute","Iacutesmall","Ibreve","Icaron","Icircle","Icircumflex", +"Icircumflexsmall","Icyrillic","Idblgrave","Idieresis","Idieresisacute", +"Idieresiscyrillic","Idieresissmall","Idot","Idotaccent","Idotbelow", +"Iebrevecyrillic","Iecyrillic","Ifraktur","Igrave","Igravesmall","Ihookabove", +"Iicyrillic","Iinvertedbreve","Iishortcyrillic","Imacron","Imacroncyrillic", +"Imonospace","Iniarmenian","Iocyrillic","Iogonek","Iota","Iotaafrican", +"Iotadieresis","Iotatonos","Ismall","Istroke","Itilde","Itildebelow", +"Izhitsacyrillic","Izhitsadblgravecyrillic","J","Jaarmenian","Jcircle", +"Jcircumflex","Jecyrillic","Jheharmenian","Jmonospace","Jsmall","K", +"KBsquare","KKsquare","Kabashkircyrillic","Kacute","Kacyrillic", +"Kadescendercyrillic","Kahookcyrillic","Kappa","Kastrokecyrillic", +"Kaverticalstrokecyrillic","Kcaron","Kcedilla","Kcircle","Kcommaaccent", +"Kdotbelow","Keharmenian","Kenarmenian","Khacyrillic","Kheicoptic","Khook", +"Kjecyrillic","Klinebelow","Kmonospace","Koppacyrillic","Koppagreek", +"Ksicyrillic","Ksmall","L","LJ","LL","Lacute","Lambda","Lcaron","Lcedilla", +"Lcircle","Lcircumflexbelow","Lcommaaccent","Ldot","Ldotaccent","Ldotbelow", +"Ldotbelowmacron","Liwnarmenian","Lj","Ljecyrillic","Llinebelow","Lmonospace", +"Lslash","Lslashsmall","Lsmall","M","MBsquare","Macron","Macronsmall", +"Macute","Mcircle","Mdotaccent","Mdotbelow","Menarmenian","Mmonospace", +"Msmall","Mturned","Mu","N","NJ","Nacute","Ncaron","Ncedilla","Ncircle", +"Ncircumflexbelow","Ncommaaccent","Ndotaccent","Ndotbelow","Nhookleft", +"Nineroman","Nj","Njecyrillic","Nlinebelow","Nmonospace","Nowarmenian", +"Nsmall","Ntilde","Ntildesmall","Nu","O","OE","OEsmall","Oacute", +"Oacutesmall","Obarredcyrillic","Obarreddieresiscyrillic","Obreve","Ocaron", +"Ocenteredtilde","Ocircle","Ocircumflex","Ocircumflexacute", +"Ocircumflexdotbelow","Ocircumflexgrave","Ocircumflexhookabove", +"Ocircumflexsmall","Ocircumflextilde","Ocyrillic","Odblacute","Odblgrave", +"Odieresis","Odieresiscyrillic","Odieresissmall","Odotbelow","Ogoneksmall", +"Ograve","Ogravesmall","Oharmenian","Ohm","Ohookabove","Ohorn","Ohornacute", +"Ohorndotbelow","Ohorngrave","Ohornhookabove","Ohorntilde","Ohungarumlaut", +"Oi","Oinvertedbreve","Omacron","Omacronacute","Omacrongrave","Omega", +"Omegacyrillic","Omegagreek","Omegaroundcyrillic","Omegatitlocyrillic", +"Omegatonos","Omicron","Omicrontonos","Omonospace","Oneroman","Oogonek", +"Oogonekmacron","Oopen","Oslash","Oslashacute","Oslashsmall","Osmall", +"Ostrokeacute","Otcyrillic","Otilde","Otildeacute","Otildedieresis", +"Otildesmall","P","Pacute","Pcircle","Pdotaccent","Pecyrillic","Peharmenian", +"Pemiddlehookcyrillic","Phi","Phook","Pi","Piwrarmenian","Pmonospace","Psi", +"Psicyrillic","Psmall","Q","Qcircle","Qmonospace","Qsmall","R","Raarmenian", +"Racute","Rcaron","Rcedilla","Rcircle","Rcommaaccent","Rdblgrave", +"Rdotaccent","Rdotbelow","Rdotbelowmacron","Reharmenian","Rfraktur","Rho", +"Ringsmall","Rinvertedbreve","Rlinebelow","Rmonospace","Rsmall", +"Rsmallinverted","Rsmallinvertedsuperior","S","SF010000","SF020000", +"SF030000","SF040000","SF050000","SF060000","SF070000","SF080000","SF090000", +"SF100000","SF110000","SF190000","SF200000","SF210000","SF220000","SF230000", +"SF240000","SF250000","SF260000","SF270000","SF280000","SF360000","SF370000", +"SF380000","SF390000","SF400000","SF410000","SF420000","SF430000","SF440000", +"SF450000","SF460000","SF470000","SF480000","SF490000","SF500000","SF510000", +"SF520000","SF530000","SF540000","Sacute","Sacutedotaccent","Sampigreek", +"Scaron","Scarondotaccent","Scaronsmall","Scedilla","Schwa","Schwacyrillic", +"Schwadieresiscyrillic","Scircle","Scircumflex","Scommaaccent","Sdotaccent", +"Sdotbelow","Sdotbelowdotaccent","Seharmenian","Sevenroman","Shaarmenian", +"Shacyrillic","Shchacyrillic","Sheicoptic","Shhacyrillic","Shimacoptic", +"Sigma","Sixroman","Smonospace","Softsigncyrillic","Ssmall","Stigmagreek","T", +"Tau","Tbar","Tcaron","Tcedilla","Tcircle","Tcircumflexbelow","Tcommaaccent", +"Tdotaccent","Tdotbelow","Tecyrillic","Tedescendercyrillic","Tenroman", +"Tetsecyrillic","Theta","Thook","Thorn","Thornsmall","Threeroman", +"Tildesmall","Tiwnarmenian","Tlinebelow","Tmonospace","Toarmenian","Tonefive", +"Tonesix","Tonetwo","Tretroflexhook","Tsecyrillic","Tshecyrillic","Tsmall", +"Twelveroman","Tworoman","U","Uacute","Uacutesmall","Ubreve","Ucaron", +"Ucircle","Ucircumflex","Ucircumflexbelow","Ucircumflexsmall","Ucyrillic", +"Udblacute","Udblgrave","Udieresis","Udieresisacute","Udieresisbelow", +"Udieresiscaron","Udieresiscyrillic","Udieresisgrave","Udieresismacron", +"Udieresissmall","Udotbelow","Ugrave","Ugravesmall","Uhookabove","Uhorn", +"Uhornacute","Uhorndotbelow","Uhorngrave","Uhornhookabove","Uhorntilde", +"Uhungarumlaut","Uhungarumlautcyrillic","Uinvertedbreve","Ukcyrillic", +"Umacron","Umacroncyrillic","Umacrondieresis","Umonospace","Uogonek", +"Upsilon","Upsilon1","Upsilonacutehooksymbolgreek","Upsilonafrican", +"Upsilondieresis","Upsilondieresishooksymbolgreek","Upsilonhooksymbol", +"Upsilontonos","Uring","Ushortcyrillic","Usmall","Ustraightcyrillic", +"Ustraightstrokecyrillic","Utilde","Utildeacute","Utildebelow","V","Vcircle", +"Vdotbelow","Vecyrillic","Vewarmenian","Vhook","Vmonospace","Voarmenian", +"Vsmall","Vtilde","W","Wacute","Wcircle","Wcircumflex","Wdieresis", +"Wdotaccent","Wdotbelow","Wgrave","Wmonospace","Wsmall","X","Xcircle", +"Xdieresis","Xdotaccent","Xeharmenian","Xi","Xmonospace","Xsmall","Y", +"Yacute","Yacutesmall","Yatcyrillic","Ycircle","Ycircumflex","Ydieresis", +"Ydieresissmall","Ydotaccent","Ydotbelow","Yericyrillic", +"Yerudieresiscyrillic","Ygrave","Yhook","Yhookabove","Yiarmenian", +"Yicyrillic","Yiwnarmenian","Ymonospace","Ysmall","Ytilde","Yusbigcyrillic", +"Yusbigiotifiedcyrillic","Yuslittlecyrillic","Yuslittleiotifiedcyrillic","Z", +"Zaarmenian","Zacute","Zcaron","Zcaronsmall","Zcircle","Zcircumflex","Zdot", +"Zdotaccent","Zdotbelow","Zecyrillic","Zedescendercyrillic", +"Zedieresiscyrillic","Zeta","Zhearmenian","Zhebrevecyrillic","Zhecyrillic", +"Zhedescendercyrillic","Zhedieresiscyrillic","Zlinebelow","Zmonospace", +"Zsmall","Zstroke","a","aabengali","aacute","aadeva","aagujarati", +"aagurmukhi","aamatragurmukhi","aarusquare","aavowelsignbengali", +"aavowelsigndeva","aavowelsigngujarati","abbreviationmarkarmenian", +"abbreviationsigndeva","abengali","abopomofo","abreve","abreveacute", +"abrevecyrillic","abrevedotbelow","abrevegrave","abrevehookabove", +"abrevetilde","acaron","acircle","acircumflex","acircumflexacute", +"acircumflexdotbelow","acircumflexgrave","acircumflexhookabove", +"acircumflextilde","acute","acutebelowcmb","acutecmb","acutecomb","acutedeva", +"acutelowmod","acutetonecmb","acyrillic","adblgrave","addakgurmukhi","adeva", +"adieresis","adieresiscyrillic","adieresismacron","adotbelow","adotmacron", +"ae","aeacute","aekorean","aemacron","afii00208","afii08941","afii10017", +"afii10018","afii10019","afii10020","afii10021","afii10022","afii10023", +"afii10024","afii10025","afii10026","afii10027","afii10028","afii10029", +"afii10030","afii10031","afii10032","afii10033","afii10034","afii10035", +"afii10036","afii10037","afii10038","afii10039","afii10040","afii10041", +"afii10042","afii10043","afii10044","afii10045","afii10046","afii10047", +"afii10048","afii10049","afii10050","afii10051","afii10052","afii10053", +"afii10054","afii10055","afii10056","afii10057","afii10058","afii10059", +"afii10060","afii10061","afii10062","afii10063","afii10064","afii10065", +"afii10066","afii10067","afii10068","afii10069","afii10070","afii10071", +"afii10072","afii10073","afii10074","afii10075","afii10076","afii10077", +"afii10078","afii10079","afii10080","afii10081","afii10082","afii10083", +"afii10084","afii10085","afii10086","afii10087","afii10088","afii10089", +"afii10090","afii10091","afii10092","afii10093","afii10094","afii10095", +"afii10096","afii10097","afii10098","afii10099","afii10100","afii10101", +"afii10102","afii10103","afii10104","afii10105","afii10106","afii10107", +"afii10108","afii10109","afii10110","afii10145","afii10146","afii10147", +"afii10148","afii10192","afii10193","afii10194","afii10195","afii10196", +"afii10831","afii10832","afii10846","afii299","afii300","afii301","afii57381", +"afii57388","afii57392","afii57393","afii57394","afii57395","afii57396", +"afii57397","afii57398","afii57399","afii57400","afii57401","afii57403", +"afii57407","afii57409","afii57410","afii57411","afii57412","afii57413", +"afii57414","afii57415","afii57416","afii57417","afii57418","afii57419", +"afii57420","afii57421","afii57422","afii57423","afii57424","afii57425", +"afii57426","afii57427","afii57428","afii57429","afii57430","afii57431", +"afii57432","afii57433","afii57434","afii57440","afii57441","afii57442", +"afii57443","afii57444","afii57445","afii57446","afii57448","afii57449", +"afii57450","afii57451","afii57452","afii57453","afii57454","afii57455", +"afii57456","afii57457","afii57458","afii57470","afii57505","afii57506", +"afii57507","afii57508","afii57509","afii57511","afii57512","afii57513", +"afii57514","afii57519","afii57534","afii57636","afii57645","afii57658", +"afii57664","afii57665","afii57666","afii57667","afii57668","afii57669", +"afii57670","afii57671","afii57672","afii57673","afii57674","afii57675", +"afii57676","afii57677","afii57678","afii57679","afii57680","afii57681", +"afii57682","afii57683","afii57684","afii57685","afii57686","afii57687", +"afii57688","afii57689","afii57690","afii57694","afii57695","afii57700", +"afii57705","afii57716","afii57717","afii57718","afii57723","afii57793", +"afii57794","afii57795","afii57796","afii57797","afii57798","afii57799", +"afii57800","afii57801","afii57802","afii57803","afii57804","afii57806", +"afii57807","afii57839","afii57841","afii57842","afii57929","afii61248", +"afii61289","afii61352","afii61573","afii61574","afii61575","afii61664", +"afii63167","afii64937","agrave","agujarati","agurmukhi","ahiragana", +"ahookabove","aibengali","aibopomofo","aideva","aiecyrillic","aigujarati", +"aigurmukhi","aimatragurmukhi","ainarabic","ainfinalarabic", +"aininitialarabic","ainmedialarabic","ainvertedbreve","aivowelsignbengali", +"aivowelsigndeva","aivowelsigngujarati","akatakana","akatakanahalfwidth", +"akorean","alef","alefarabic","alefdageshhebrew","aleffinalarabic", +"alefhamzaabovearabic","alefhamzaabovefinalarabic","alefhamzabelowarabic", +"alefhamzabelowfinalarabic","alefhebrew","aleflamedhebrew", +"alefmaddaabovearabic","alefmaddaabovefinalarabic","alefmaksuraarabic", +"alefmaksurafinalarabic","alefmaksurainitialarabic","alefmaksuramedialarabic", +"alefpatahhebrew","alefqamatshebrew","aleph","allequal","alpha","alphatonos", +"amacron","amonospace","ampersand","ampersandmonospace","ampersandsmall", +"amsquare","anbopomofo","angbopomofo","angkhankhuthai","angle", +"anglebracketleft","anglebracketleftvertical","anglebracketright", +"anglebracketrightvertical","angleleft","angleright","angstrom","anoteleia", +"anudattadeva","anusvarabengali","anusvaradeva","anusvaragujarati","aogonek", +"apaatosquare","aparen","apostrophearmenian","apostrophemod","apple", +"approaches","approxequal","approxequalorimage","approximatelyequal", +"araeaekorean","araeakorean","arc","arighthalfring","aring","aringacute", +"aringbelow","arrowboth","arrowdashdown","arrowdashleft","arrowdashright", +"arrowdashup","arrowdblboth","arrowdbldown","arrowdblleft","arrowdblright", +"arrowdblup","arrowdown","arrowdownleft","arrowdownright","arrowdownwhite", +"arrowheaddownmod","arrowheadleftmod","arrowheadrightmod","arrowheadupmod", +"arrowhorizex","arrowleft","arrowleftdbl","arrowleftdblstroke", +"arrowleftoverright","arrowleftwhite","arrowright","arrowrightdblstroke", +"arrowrightheavy","arrowrightoverleft","arrowrightwhite","arrowtableft", +"arrowtabright","arrowup","arrowupdn","arrowupdnbse","arrowupdownbase", +"arrowupleft","arrowupleftofdown","arrowupright","arrowupwhite","arrowvertex", +"asciicircum","asciicircummonospace","asciitilde","asciitildemonospace", +"ascript","ascriptturned","asmallhiragana","asmallkatakana", +"asmallkatakanahalfwidth","asterisk","asteriskaltonearabic","asteriskarabic", +"asteriskmath","asteriskmonospace","asterisksmall","asterism","asuperior", +"asymptoticallyequal","at","atilde","atmonospace","atsmall","aturned", +"aubengali","aubopomofo","audeva","augujarati","augurmukhi", +"aulengthmarkbengali","aumatragurmukhi","auvowelsignbengali", +"auvowelsigndeva","auvowelsigngujarati","avagrahadeva","aybarmenian","ayin", +"ayinaltonehebrew","ayinhebrew","b","babengali","backslash", +"backslashmonospace","badeva","bagujarati","bagurmukhi","bahiragana", +"bahtthai","bakatakana","bar","barmonospace","bbopomofo","bcircle", +"bdotaccent","bdotbelow","beamedsixteenthnotes","because","becyrillic", +"beharabic","behfinalarabic","behinitialarabic","behiragana", +"behmedialarabic","behmeeminitialarabic","behmeemisolatedarabic", +"behnoonfinalarabic","bekatakana","benarmenian","bet","beta", +"betasymbolgreek","betdagesh","betdageshhebrew","bethebrew","betrafehebrew", +"bhabengali","bhadeva","bhagujarati","bhagurmukhi","bhook","bihiragana", +"bikatakana","bilabialclick","bindigurmukhi","birusquare","blackcircle", +"blackdiamond","blackdownpointingtriangle","blackleftpointingpointer", +"blackleftpointingtriangle","blacklenticularbracketleft", +"blacklenticularbracketleftvertical","blacklenticularbracketright", +"blacklenticularbracketrightvertical","blacklowerlefttriangle", +"blacklowerrighttriangle","blackrectangle","blackrightpointingpointer", +"blackrightpointingtriangle","blacksmallsquare","blacksmilingface", +"blacksquare","blackstar","blackupperlefttriangle","blackupperrighttriangle", +"blackuppointingsmalltriangle","blackuppointingtriangle","blank","blinebelow", +"block","bmonospace","bobaimaithai","bohiragana","bokatakana","bparen", +"bqsquare","braceex","braceleft","braceleftbt","braceleftmid", +"braceleftmonospace","braceleftsmall","bracelefttp","braceleftvertical", +"braceright","bracerightbt","bracerightmid","bracerightmonospace", +"bracerightsmall","bracerighttp","bracerightvertical","bracketleft", +"bracketleftbt","bracketleftex","bracketleftmonospace","bracketlefttp", +"bracketright","bracketrightbt","bracketrightex","bracketrightmonospace", +"bracketrighttp","breve","brevebelowcmb","brevecmb","breveinvertedbelowcmb", +"breveinvertedcmb","breveinverteddoublecmb","bridgebelowcmb", +"bridgeinvertedbelowcmb","brokenbar","bstroke","bsuperior","btopbar", +"buhiragana","bukatakana","bullet","bulletinverse","bulletoperator", +"bullseye","c","caarmenian","cabengali","cacute","cadeva","cagujarati", +"cagurmukhi","calsquare","candrabindubengali","candrabinducmb", +"candrabindudeva","candrabindugujarati","capslock","careof","caron", +"caronbelowcmb","caroncmb","carriagereturn","cbopomofo","ccaron","ccedilla", +"ccedillaacute","ccircle","ccircumflex","ccurl","cdot","cdotaccent", +"cdsquare","cedilla","cedillacmb","cent","centigrade","centinferior", +"centmonospace","centoldstyle","centsuperior","chaarmenian","chabengali", +"chadeva","chagujarati","chagurmukhi","chbopomofo","cheabkhasiancyrillic", +"checkmark","checyrillic","chedescenderabkhasiancyrillic", +"chedescendercyrillic","chedieresiscyrillic","cheharmenian", +"chekhakassiancyrillic","cheverticalstrokecyrillic","chi", +"chieuchacirclekorean","chieuchaparenkorean","chieuchcirclekorean", +"chieuchkorean","chieuchparenkorean","chochangthai","chochanthai", +"chochingthai","chochoethai","chook","cieucacirclekorean","cieucaparenkorean", +"cieuccirclekorean","cieuckorean","cieucparenkorean","cieucuparenkorean", +"circle","circlemultiply","circleot","circleplus","circlepostalmark", +"circlewithlefthalfblack","circlewithrighthalfblack","circumflex", +"circumflexbelowcmb","circumflexcmb","clear","clickalveolar","clickdental", +"clicklateral","clickretroflex","club","clubsuitblack","clubsuitwhite", +"cmcubedsquare","cmonospace","cmsquaredsquare","coarmenian","colon", +"colonmonetary","colonmonospace","colonsign","colonsmall", +"colontriangularhalfmod","colontriangularmod","comma","commaabovecmb", +"commaaboverightcmb","commaaccent","commaarabic","commaarmenian", +"commainferior","commamonospace","commareversedabovecmb","commareversedmod", +"commasmall","commasuperior","commaturnedabovecmb","commaturnedmod","compass", +"congruent","contourintegral","control","controlACK","controlBEL","controlBS", +"controlCAN","controlCR","controlDC1","controlDC2","controlDC3","controlDC4", +"controlDEL","controlDLE","controlEM","controlENQ","controlEOT","controlESC", +"controlETB","controlETX","controlFF","controlFS","controlGS","controlHT", +"controlLF","controlNAK","controlRS","controlSI","controlSO","controlSOT", +"controlSTX","controlSUB","controlSYN","controlUS","controlVT","copyright", +"copyrightsans","copyrightserif","cornerbracketleft", +"cornerbracketlefthalfwidth","cornerbracketleftvertical","cornerbracketright", +"cornerbracketrighthalfwidth","cornerbracketrightvertical", +"corporationsquare","cosquare","coverkgsquare","cparen","cruzeiro", +"cstretched","curlyand","curlyor","currency","cyrBreve","cyrFlex","cyrbreve", +"cyrflex","d","daarmenian","dabengali","dadarabic","dadeva","dadfinalarabic", +"dadinitialarabic","dadmedialarabic","dagesh","dageshhebrew","dagger", +"daggerdbl","dagujarati","dagurmukhi","dahiragana","dakatakana","dalarabic", +"dalet","daletdagesh","daletdageshhebrew","dalethatafpatah", +"dalethatafpatahhebrew","dalethatafsegol","dalethatafsegolhebrew", +"dalethebrew","dalethiriq","dalethiriqhebrew","daletholam","daletholamhebrew", +"daletpatah","daletpatahhebrew","daletqamats","daletqamatshebrew", +"daletqubuts","daletqubutshebrew","daletsegol","daletsegolhebrew", +"daletsheva","daletshevahebrew","dalettsere","dalettserehebrew", +"dalfinalarabic","dammaarabic","dammalowarabic","dammatanaltonearabic", +"dammatanarabic","danda","dargahebrew","dargalefthebrew", +"dasiapneumatacyrilliccmb","dblGrave","dblanglebracketleft", +"dblanglebracketleftvertical","dblanglebracketright", +"dblanglebracketrightvertical","dblarchinvertedbelowcmb","dblarrowleft", +"dblarrowright","dbldanda","dblgrave","dblgravecmb","dblintegral", +"dbllowline","dbllowlinecmb","dbloverlinecmb","dblprimemod","dblverticalbar", +"dblverticallineabovecmb","dbopomofo","dbsquare","dcaron","dcedilla", +"dcircle","dcircumflexbelow","dcroat","ddabengali","ddadeva","ddagujarati", +"ddagurmukhi","ddalarabic","ddalfinalarabic","dddhadeva","ddhabengali", +"ddhadeva","ddhagujarati","ddhagurmukhi","ddotaccent","ddotbelow", +"decimalseparatorarabic","decimalseparatorpersian","decyrillic","degree", +"dehihebrew","dehiragana","deicoptic","dekatakana","deleteleft","deleteright", +"delta","deltaturned","denominatorminusonenumeratorbengali","dezh", +"dhabengali","dhadeva","dhagujarati","dhagurmukhi","dhook","dialytikatonos", +"dialytikatonoscmb","diamond","diamondsuitwhite","dieresis","dieresisacute", +"dieresisbelowcmb","dieresiscmb","dieresisgrave","dieresistonos","dihiragana", +"dikatakana","dittomark","divide","divides","divisionslash","djecyrillic", +"dkshade","dlinebelow","dlsquare","dmacron","dmonospace","dnblock", +"dochadathai","dodekthai","dohiragana","dokatakana","dollar","dollarinferior", +"dollarmonospace","dollaroldstyle","dollarsmall","dollarsuperior","dong", +"dorusquare","dotaccent","dotaccentcmb","dotbelowcmb","dotbelowcomb", +"dotkatakana","dotlessi","dotlessj","dotlessjstrokehook","dotmath", +"dottedcircle","doubleyodpatah","doubleyodpatahhebrew","downtackbelowcmb", +"downtackmod","dparen","dsuperior","dtail","dtopbar","duhiragana", +"dukatakana","dz","dzaltone","dzcaron","dzcurl","dzeabkhasiancyrillic", +"dzecyrillic","dzhecyrillic","e","eacute","earth","ebengali","ebopomofo", +"ebreve","ecandradeva","ecandragujarati","ecandravowelsigndeva", +"ecandravowelsigngujarati","ecaron","ecedillabreve","echarmenian", +"echyiwnarmenian","ecircle","ecircumflex","ecircumflexacute", +"ecircumflexbelow","ecircumflexdotbelow","ecircumflexgrave", +"ecircumflexhookabove","ecircumflextilde","ecyrillic","edblgrave","edeva", +"edieresis","edot","edotaccent","edotbelow","eegurmukhi","eematragurmukhi", +"efcyrillic","egrave","egujarati","eharmenian","ehbopomofo","ehiragana", +"ehookabove","eibopomofo","eight","eightarabic","eightbengali","eightcircle", +"eightcircleinversesansserif","eightdeva","eighteencircle","eighteenparen", +"eighteenperiod","eightgujarati","eightgurmukhi","eighthackarabic", +"eighthangzhou","eighthnotebeamed","eightideographicparen","eightinferior", +"eightmonospace","eightoldstyle","eightparen","eightperiod","eightpersian", +"eightroman","eightsuperior","eightthai","einvertedbreve","eiotifiedcyrillic", +"ekatakana","ekatakanahalfwidth","ekonkargurmukhi","ekorean","elcyrillic", +"element","elevencircle","elevenparen","elevenperiod","elevenroman", +"ellipsis","ellipsisvertical","emacron","emacronacute","emacrongrave", +"emcyrillic","emdash","emdashvertical","emonospace","emphasismarkarmenian", +"emptyset","enbopomofo","encyrillic","endash","endashvertical", +"endescendercyrillic","eng","engbopomofo","enghecyrillic","enhookcyrillic", +"enspace","eogonek","eokorean","eopen","eopenclosed","eopenreversed", +"eopenreversedclosed","eopenreversedhook","eparen","epsilon","epsilontonos", +"equal","equalmonospace","equalsmall","equalsuperior","equivalence", +"erbopomofo","ercyrillic","ereversed","ereversedcyrillic","escyrillic", +"esdescendercyrillic","esh","eshcurl","eshortdeva","eshortvowelsigndeva", +"eshreversedloop","eshsquatreversed","esmallhiragana","esmallkatakana", +"esmallkatakanahalfwidth","estimated","esuperior","eta","etarmenian", +"etatonos","eth","etilde","etildebelow","etnahtafoukhhebrew", +"etnahtafoukhlefthebrew","etnahtahebrew","etnahtalefthebrew","eturned", +"eukorean","euro","evowelsignbengali","evowelsigndeva","evowelsigngujarati", +"exclam","exclamarmenian","exclamdbl","exclamdown","exclamdownsmall", +"exclammonospace","exclamsmall","existential","ezh","ezhcaron","ezhcurl", +"ezhreversed","ezhtail","f","fadeva","fagurmukhi","fahrenheit","fathaarabic", +"fathalowarabic","fathatanarabic","fbopomofo","fcircle","fdotaccent", +"feharabic","feharmenian","fehfinalarabic","fehinitialarabic", +"fehmedialarabic","feicoptic","female","ff","ffi","ffl","fi","fifteencircle", +"fifteenparen","fifteenperiod","figuredash","filledbox","filledrect", +"finalkaf","finalkafdagesh","finalkafdageshhebrew","finalkafhebrew", +"finalkafqamats","finalkafqamatshebrew","finalkafsheva","finalkafshevahebrew", +"finalmem","finalmemhebrew","finalnun","finalnunhebrew","finalpe", +"finalpehebrew","finaltsadi","finaltsadihebrew","firsttonechinese","fisheye", +"fitacyrillic","five","fivearabic","fivebengali","fivecircle", +"fivecircleinversesansserif","fivedeva","fiveeighths","fivegujarati", +"fivegurmukhi","fivehackarabic","fivehangzhou","fiveideographicparen", +"fiveinferior","fivemonospace","fiveoldstyle","fiveparen","fiveperiod", +"fivepersian","fiveroman","fivesuperior","fivethai","fl","florin", +"fmonospace","fmsquare","fofanthai","fofathai","fongmanthai","forall","four", +"fourarabic","fourbengali","fourcircle","fourcircleinversesansserif", +"fourdeva","fourgujarati","fourgurmukhi","fourhackarabic","fourhangzhou", +"fourideographicparen","fourinferior","fourmonospace","fournumeratorbengali", +"fouroldstyle","fourparen","fourperiod","fourpersian","fourroman", +"foursuperior","fourteencircle","fourteenparen","fourteenperiod","fourthai", +"fourthtonechinese","fparen","fraction","franc","g","gabengali","gacute", +"gadeva","gafarabic","gaffinalarabic","gafinitialarabic","gafmedialarabic", +"gagujarati","gagurmukhi","gahiragana","gakatakana","gamma","gammalatinsmall", +"gammasuperior","gangiacoptic","gbopomofo","gbreve","gcaron","gcedilla", +"gcircle","gcircumflex","gcommaaccent","gdot","gdotaccent","gecyrillic", +"gehiragana","gekatakana","geometricallyequal","gereshaccenthebrew", +"gereshhebrew","gereshmuqdamhebrew","germandbls","gershayimaccenthebrew", +"gershayimhebrew","getamark","ghabengali","ghadarmenian","ghadeva", +"ghagujarati","ghagurmukhi","ghainarabic","ghainfinalarabic", +"ghaininitialarabic","ghainmedialarabic","ghemiddlehookcyrillic", +"ghestrokecyrillic","gheupturncyrillic","ghhadeva","ghhagurmukhi","ghook", +"ghzsquare","gihiragana","gikatakana","gimarmenian","gimel","gimeldagesh", +"gimeldageshhebrew","gimelhebrew","gjecyrillic","glottalinvertedstroke", +"glottalstop","glottalstopinverted","glottalstopmod","glottalstopreversed", +"glottalstopreversedmod","glottalstopreversedsuperior","glottalstopstroke", +"glottalstopstrokereversed","gmacron","gmonospace","gohiragana","gokatakana", +"gparen","gpasquare","gradient","grave","gravebelowcmb","gravecmb", +"gravecomb","gravedeva","gravelowmod","gravemonospace","gravetonecmb", +"greater","greaterequal","greaterequalorless","greatermonospace", +"greaterorequivalent","greaterorless","greateroverequal","greatersmall", +"gscript","gstroke","guhiragana","guillemotleft","guillemotright", +"guilsinglleft","guilsinglright","gukatakana","guramusquare","gysquare","h", +"haabkhasiancyrillic","haaltonearabic","habengali","hadescendercyrillic", +"hadeva","hagujarati","hagurmukhi","haharabic","hahfinalarabic", +"hahinitialarabic","hahiragana","hahmedialarabic","haitusquare","hakatakana", +"hakatakanahalfwidth","halantgurmukhi","hamzaarabic","hamzadammaarabic", +"hamzadammatanarabic","hamzafathaarabic","hamzafathatanarabic", +"hamzalowarabic","hamzalowkasraarabic","hamzalowkasratanarabic", +"hamzasukunarabic","hangulfiller","hardsigncyrillic","harpoonleftbarbup", +"harpoonrightbarbup","hasquare","hatafpatah","hatafpatah16","hatafpatah23", +"hatafpatah2f","hatafpatahhebrew","hatafpatahnarrowhebrew", +"hatafpatahquarterhebrew","hatafpatahwidehebrew","hatafqamats", +"hatafqamats1b","hatafqamats28","hatafqamats34","hatafqamatshebrew", +"hatafqamatsnarrowhebrew","hatafqamatsquarterhebrew","hatafqamatswidehebrew", +"hatafsegol","hatafsegol17","hatafsegol24","hatafsegol30","hatafsegolhebrew", +"hatafsegolnarrowhebrew","hatafsegolquarterhebrew","hatafsegolwidehebrew", +"hbar","hbopomofo","hbrevebelow","hcedilla","hcircle","hcircumflex", +"hdieresis","hdotaccent","hdotbelow","he","heart","heartsuitblack", +"heartsuitwhite","hedagesh","hedageshhebrew","hehaltonearabic","heharabic", +"hehebrew","hehfinalaltonearabic","hehfinalalttwoarabic","hehfinalarabic", +"hehhamzaabovefinalarabic","hehhamzaaboveisolatedarabic", +"hehinitialaltonearabic","hehinitialarabic","hehiragana", +"hehmedialaltonearabic","hehmedialarabic","heiseierasquare","hekatakana", +"hekatakanahalfwidth","hekutaarusquare","henghook","herutusquare","het", +"hethebrew","hhook","hhooksuperior","hieuhacirclekorean","hieuhaparenkorean", +"hieuhcirclekorean","hieuhkorean","hieuhparenkorean","hihiragana", +"hikatakana","hikatakanahalfwidth","hiriq","hiriq14","hiriq21","hiriq2d", +"hiriqhebrew","hiriqnarrowhebrew","hiriqquarterhebrew","hiriqwidehebrew", +"hlinebelow","hmonospace","hoarmenian","hohipthai","hohiragana","hokatakana", +"hokatakanahalfwidth","holam","holam19","holam26","holam32","holamhebrew", +"holamnarrowhebrew","holamquarterhebrew","holamwidehebrew","honokhukthai", +"hookabovecomb","hookcmb","hookpalatalizedbelowcmb","hookretroflexbelowcmb", +"hoonsquare","horicoptic","horizontalbar","horncmb","hotsprings","house", +"hparen","hsuperior","hturned","huhiragana","huiitosquare","hukatakana", +"hukatakanahalfwidth","hungarumlaut","hungarumlautcmb","hv","hyphen", +"hypheninferior","hyphenmonospace","hyphensmall","hyphensuperior","hyphentwo", +"i","iacute","iacyrillic","ibengali","ibopomofo","ibreve","icaron","icircle", +"icircumflex","icyrillic","idblgrave","ideographearthcircle", +"ideographfirecircle","ideographicallianceparen","ideographiccallparen", +"ideographiccentrecircle","ideographicclose","ideographiccomma", +"ideographiccommaleft","ideographiccongratulationparen", +"ideographiccorrectcircle","ideographicearthparen", +"ideographicenterpriseparen","ideographicexcellentcircle", +"ideographicfestivalparen","ideographicfinancialcircle", +"ideographicfinancialparen","ideographicfireparen","ideographichaveparen", +"ideographichighcircle","ideographiciterationmark","ideographiclaborcircle", +"ideographiclaborparen","ideographicleftcircle","ideographiclowcircle", +"ideographicmedicinecircle","ideographicmetalparen","ideographicmoonparen", +"ideographicnameparen","ideographicperiod","ideographicprintcircle", +"ideographicreachparen","ideographicrepresentparen", +"ideographicresourceparen","ideographicrightcircle","ideographicsecretcircle", +"ideographicselfparen","ideographicsocietyparen","ideographicspace", +"ideographicspecialparen","ideographicstockparen","ideographicstudyparen", +"ideographicsunparen","ideographicsuperviseparen","ideographicwaterparen", +"ideographicwoodparen","ideographiczero","ideographmetalcircle", +"ideographmooncircle","ideographnamecircle","ideographsuncircle", +"ideographwatercircle","ideographwoodcircle","ideva","idieresis", +"idieresisacute","idieresiscyrillic","idotbelow","iebrevecyrillic", +"iecyrillic","ieungacirclekorean","ieungaparenkorean","ieungcirclekorean", +"ieungkorean","ieungparenkorean","igrave","igujarati","igurmukhi","ihiragana", +"ihookabove","iibengali","iicyrillic","iideva","iigujarati","iigurmukhi", +"iimatragurmukhi","iinvertedbreve","iishortcyrillic","iivowelsignbengali", +"iivowelsigndeva","iivowelsigngujarati","ij","ikatakana","ikatakanahalfwidth", +"ikorean","ilde","iluyhebrew","imacron","imacroncyrillic", +"imageorapproximatelyequal","imatragurmukhi","imonospace","increment", +"infinity","iniarmenian","integral","integralbottom","integralbt", +"integralex","integraltop","integraltp","intersection","intisquare", +"invbullet","invcircle","invsmileface","iocyrillic","iogonek","iota", +"iotadieresis","iotadieresistonos","iotalatin","iotatonos","iparen", +"irigurmukhi","ismallhiragana","ismallkatakana","ismallkatakanahalfwidth", +"issharbengali","istroke","isuperior","iterationhiragana","iterationkatakana", +"itilde","itildebelow","iubopomofo","iucyrillic","ivowelsignbengali", +"ivowelsigndeva","ivowelsigngujarati","izhitsacyrillic", +"izhitsadblgravecyrillic","j","jaarmenian","jabengali","jadeva","jagujarati", +"jagurmukhi","jbopomofo","jcaron","jcircle","jcircumflex","jcrossedtail", +"jdotlessstroke","jecyrillic","jeemarabic","jeemfinalarabic", +"jeeminitialarabic","jeemmedialarabic","jeharabic","jehfinalarabic", +"jhabengali","jhadeva","jhagujarati","jhagurmukhi","jheharmenian","jis", +"jmonospace","jparen","jsuperior","k","kabashkircyrillic","kabengali", +"kacute","kacyrillic","kadescendercyrillic","kadeva","kaf","kafarabic", +"kafdagesh","kafdageshhebrew","kaffinalarabic","kafhebrew","kafinitialarabic", +"kafmedialarabic","kafrafehebrew","kagujarati","kagurmukhi","kahiragana", +"kahookcyrillic","kakatakana","kakatakanahalfwidth","kappa", +"kappasymbolgreek","kapyeounmieumkorean","kapyeounphieuphkorean", +"kapyeounpieupkorean","kapyeounssangpieupkorean","karoriisquare", +"kashidaautoarabic","kashidaautonosidebearingarabic","kasmallkatakana", +"kasquare","kasraarabic","kasratanarabic","kastrokecyrillic", +"katahiraprolongmarkhalfwidth","kaverticalstrokecyrillic","kbopomofo", +"kcalsquare","kcaron","kcedilla","kcircle","kcommaaccent","kdotbelow", +"keharmenian","kehiragana","kekatakana","kekatakanahalfwidth","kenarmenian", +"kesmallkatakana","kgreenlandic","khabengali","khacyrillic","khadeva", +"khagujarati","khagurmukhi","khaharabic","khahfinalarabic", +"khahinitialarabic","khahmedialarabic","kheicoptic","khhadeva","khhagurmukhi", +"khieukhacirclekorean","khieukhaparenkorean","khieukhcirclekorean", +"khieukhkorean","khieukhparenkorean","khokhaithai","khokhonthai", +"khokhuatthai","khokhwaithai","khomutthai","khook","khorakhangthai", +"khzsquare","kihiragana","kikatakana","kikatakanahalfwidth", +"kiroguramusquare","kiromeetorusquare","kirosquare","kiyeokacirclekorean", +"kiyeokaparenkorean","kiyeokcirclekorean","kiyeokkorean","kiyeokparenkorean", +"kiyeoksioskorean","kjecyrillic","klinebelow","klsquare","kmcubedsquare", +"kmonospace","kmsquaredsquare","kohiragana","kohmsquare","kokaithai", +"kokatakana","kokatakanahalfwidth","kooposquare","koppacyrillic", +"koreanstandardsymbol","koroniscmb","kparen","kpasquare","ksicyrillic", +"ktsquare","kturned","kuhiragana","kukatakana","kukatakanahalfwidth", +"kvsquare","kwsquare","l","labengali","lacute","ladeva","lagujarati", +"lagurmukhi","lakkhangyaothai","lamaleffinalarabic", +"lamalefhamzaabovefinalarabic","lamalefhamzaaboveisolatedarabic", +"lamalefhamzabelowfinalarabic","lamalefhamzabelowisolatedarabic", +"lamalefisolatedarabic","lamalefmaddaabovefinalarabic", +"lamalefmaddaaboveisolatedarabic","lamarabic","lambda","lambdastroke","lamed", +"lameddagesh","lameddageshhebrew","lamedhebrew","lamedholam", +"lamedholamdagesh","lamedholamdageshhebrew","lamedholamhebrew", +"lamfinalarabic","lamhahinitialarabic","laminitialarabic", +"lamjeeminitialarabic","lamkhahinitialarabic","lamlamhehisolatedarabic", +"lammedialarabic","lammeemhahinitialarabic","lammeeminitialarabic", +"lammeemjeeminitialarabic","lammeemkhahinitialarabic","largecircle","lbar", +"lbelt","lbopomofo","lcaron","lcedilla","lcircle","lcircumflexbelow", +"lcommaaccent","ldot","ldotaccent","ldotbelow","ldotbelowmacron", +"leftangleabovecmb","lefttackbelowcmb","less","lessequal", +"lessequalorgreater","lessmonospace","lessorequivalent","lessorgreater", +"lessoverequal","lesssmall","lezh","lfblock","lhookretroflex","lira", +"liwnarmenian","lj","ljecyrillic","ll","lladeva","llagujarati","llinebelow", +"llladeva","llvocalicbengali","llvocalicdeva","llvocalicvowelsignbengali", +"llvocalicvowelsigndeva","lmiddletilde","lmonospace","lmsquare","lochulathai", +"logicaland","logicalnot","logicalnotreversed","logicalor","lolingthai", +"longs","lowlinecenterline","lowlinecmb","lowlinedashed","lozenge","lparen", +"lslash","lsquare","lsuperior","ltshade","luthai","lvocalicbengali", +"lvocalicdeva","lvocalicvowelsignbengali","lvocalicvowelsigndeva","lxsquare", +"m","mabengali","macron","macronbelowcmb","macroncmb","macronlowmod", +"macronmonospace","macute","madeva","magujarati","magurmukhi", +"mahapakhhebrew","mahapakhlefthebrew","mahiragana","maichattawalowleftthai", +"maichattawalowrightthai","maichattawathai","maichattawaupperleftthai", +"maieklowleftthai","maieklowrightthai","maiekthai","maiekupperleftthai", +"maihanakatleftthai","maihanakatthai","maitaikhuleftthai","maitaikhuthai", +"maitholowleftthai","maitholowrightthai","maithothai","maithoupperleftthai", +"maitrilowleftthai","maitrilowrightthai","maitrithai","maitriupperleftthai", +"maiyamokthai","makatakana","makatakanahalfwidth","male","mansyonsquare", +"maqafhebrew","mars","masoracirclehebrew","masquare","mbopomofo","mbsquare", +"mcircle","mcubedsquare","mdotaccent","mdotbelow","meemarabic", +"meemfinalarabic","meeminitialarabic","meemmedialarabic", +"meemmeeminitialarabic","meemmeemisolatedarabic","meetorusquare","mehiragana", +"meizierasquare","mekatakana","mekatakanahalfwidth","mem","memdagesh", +"memdageshhebrew","memhebrew","menarmenian","merkhahebrew", +"merkhakefulahebrew","merkhakefulalefthebrew","merkhalefthebrew","mhook", +"mhzsquare","middledotkatakanahalfwidth","middot","mieumacirclekorean", +"mieumaparenkorean","mieumcirclekorean","mieumkorean","mieumpansioskorean", +"mieumparenkorean","mieumpieupkorean","mieumsioskorean","mihiragana", +"mikatakana","mikatakanahalfwidth","minus","minusbelowcmb","minuscircle", +"minusmod","minusplus","minute","miribaarusquare","mirisquare", +"mlonglegturned","mlsquare","mmcubedsquare","mmonospace","mmsquaredsquare", +"mohiragana","mohmsquare","mokatakana","mokatakanahalfwidth","molsquare", +"momathai","moverssquare","moverssquaredsquare","mparen","mpasquare", +"mssquare","msuperior","mturned","mu","mu1","muasquare","muchgreater", +"muchless","mufsquare","mugreek","mugsquare","muhiragana","mukatakana", +"mukatakanahalfwidth","mulsquare","multiply","mumsquare","munahhebrew", +"munahlefthebrew","musicalnote","musicalnotedbl","musicflatsign", +"musicsharpsign","mussquare","muvsquare","muwsquare","mvmegasquare", +"mvsquare","mwmegasquare","mwsquare","n","nabengali","nabla","nacute", +"nadeva","nagujarati","nagurmukhi","nahiragana","nakatakana", +"nakatakanahalfwidth","napostrophe","nasquare","nbopomofo","nbspace","ncaron", +"ncedilla","ncircle","ncircumflexbelow","ncommaaccent","ndotaccent", +"ndotbelow","nehiragana","nekatakana","nekatakanahalfwidth","newsheqelsign", +"nfsquare","ngabengali","ngadeva","ngagujarati","ngagurmukhi","ngonguthai", +"nhiragana","nhookleft","nhookretroflex","nieunacirclekorean", +"nieunaparenkorean","nieuncieuckorean","nieuncirclekorean","nieunhieuhkorean", +"nieunkorean","nieunpansioskorean","nieunparenkorean","nieunsioskorean", +"nieuntikeutkorean","nihiragana","nikatakana","nikatakanahalfwidth", +"nikhahitleftthai","nikhahitthai","nine","ninearabic","ninebengali", +"ninecircle","ninecircleinversesansserif","ninedeva","ninegujarati", +"ninegurmukhi","ninehackarabic","ninehangzhou","nineideographicparen", +"nineinferior","ninemonospace","nineoldstyle","nineparen","nineperiod", +"ninepersian","nineroman","ninesuperior","nineteencircle","nineteenparen", +"nineteenperiod","ninethai","nj","njecyrillic","nkatakana", +"nkatakanahalfwidth","nlegrightlong","nlinebelow","nmonospace","nmsquare", +"nnabengali","nnadeva","nnagujarati","nnagurmukhi","nnnadeva","nohiragana", +"nokatakana","nokatakanahalfwidth","nonbreakingspace","nonenthai","nonuthai", +"noonarabic","noonfinalarabic","noonghunnaarabic","noonghunnafinalarabic", +"noonhehinitialarabic","nooninitialarabic","noonjeeminitialarabic", +"noonjeemisolatedarabic","noonmedialarabic","noonmeeminitialarabic", +"noonmeemisolatedarabic","noonnoonfinalarabic","notcontains","notelement", +"notelementof","notequal","notgreater","notgreaternorequal", +"notgreaternorless","notidentical","notless","notlessnorequal","notparallel", +"notprecedes","notsubset","notsucceeds","notsuperset","nowarmenian","nparen", +"nssquare","nsuperior","ntilde","nu","nuhiragana","nukatakana", +"nukatakanahalfwidth","nuktabengali","nuktadeva","nuktagujarati", +"nuktagurmukhi","numbersign","numbersignmonospace","numbersignsmall", +"numeralsigngreek","numeralsignlowergreek","numero","nun","nundagesh", +"nundageshhebrew","nunhebrew","nvsquare","nwsquare","nyabengali","nyadeva", +"nyagujarati","nyagurmukhi","o","oacute","oangthai","obarred", +"obarredcyrillic","obarreddieresiscyrillic","obengali","obopomofo","obreve", +"ocandradeva","ocandragujarati","ocandravowelsigndeva", +"ocandravowelsigngujarati","ocaron","ocircle","ocircumflex", +"ocircumflexacute","ocircumflexdotbelow","ocircumflexgrave", +"ocircumflexhookabove","ocircumflextilde","ocyrillic","odblacute","odblgrave", +"odeva","odieresis","odieresiscyrillic","odotbelow","oe","oekorean","ogonek", +"ogonekcmb","ograve","ogujarati","oharmenian","ohiragana","ohookabove", +"ohorn","ohornacute","ohorndotbelow","ohorngrave","ohornhookabove", +"ohorntilde","ohungarumlaut","oi","oinvertedbreve","okatakana", +"okatakanahalfwidth","okorean","olehebrew","omacron","omacronacute", +"omacrongrave","omdeva","omega","omega1","omegacyrillic","omegalatinclosed", +"omegaroundcyrillic","omegatitlocyrillic","omegatonos","omgujarati","omicron", +"omicrontonos","omonospace","one","onearabic","onebengali","onecircle", +"onecircleinversesansserif","onedeva","onedotenleader","oneeighth", +"onefitted","onegujarati","onegurmukhi","onehackarabic","onehalf", +"onehangzhou","oneideographicparen","oneinferior","onemonospace", +"onenumeratorbengali","oneoldstyle","oneparen","oneperiod","onepersian", +"onequarter","oneroman","onesuperior","onethai","onethird","oogonek", +"oogonekmacron","oogurmukhi","oomatragurmukhi","oopen","oparen","openbullet", +"option","ordfeminine","ordmasculine","orthogonal","oshortdeva", +"oshortvowelsigndeva","oslash","oslashacute","osmallhiragana", +"osmallkatakana","osmallkatakanahalfwidth","ostrokeacute","osuperior", +"otcyrillic","otilde","otildeacute","otildedieresis","oubopomofo","overline", +"overlinecenterline","overlinecmb","overlinedashed","overlinedblwavy", +"overlinewavy","overscore","ovowelsignbengali","ovowelsigndeva", +"ovowelsigngujarati","p","paampssquare","paasentosquare","pabengali","pacute", +"padeva","pagedown","pageup","pagujarati","pagurmukhi","pahiragana", +"paiyannoithai","pakatakana","palatalizationcyrilliccmb","palochkacyrillic", +"pansioskorean","paragraph","parallel","parenleft","parenleftaltonearabic", +"parenleftbt","parenleftex","parenleftinferior","parenleftmonospace", +"parenleftsmall","parenleftsuperior","parenlefttp","parenleftvertical", +"parenright","parenrightaltonearabic","parenrightbt","parenrightex", +"parenrightinferior","parenrightmonospace","parenrightsmall", +"parenrightsuperior","parenrighttp","parenrightvertical","partialdiff", +"paseqhebrew","pashtahebrew","pasquare","patah","patah11","patah1d","patah2a", +"patahhebrew","patahnarrowhebrew","patahquarterhebrew","patahwidehebrew", +"pazerhebrew","pbopomofo","pcircle","pdotaccent","pe","pecyrillic","pedagesh", +"pedageshhebrew","peezisquare","pefinaldageshhebrew","peharabic", +"peharmenian","pehebrew","pehfinalarabic","pehinitialarabic","pehiragana", +"pehmedialarabic","pekatakana","pemiddlehookcyrillic","perafehebrew", +"percent","percentarabic","percentmonospace","percentsmall","period", +"periodarmenian","periodcentered","periodhalfwidth","periodinferior", +"periodmonospace","periodsmall","periodsuperior","perispomenigreekcmb", +"perpendicular","perthousand","peseta","pfsquare","phabengali","phadeva", +"phagujarati","phagurmukhi","phi","phi1","phieuphacirclekorean", +"phieuphaparenkorean","phieuphcirclekorean","phieuphkorean", +"phieuphparenkorean","philatin","phinthuthai","phisymbolgreek","phook", +"phophanthai","phophungthai","phosamphaothai","pi","pieupacirclekorean", +"pieupaparenkorean","pieupcieuckorean","pieupcirclekorean", +"pieupkiyeokkorean","pieupkorean","pieupparenkorean","pieupsioskiyeokkorean", +"pieupsioskorean","pieupsiostikeutkorean","pieupthieuthkorean", +"pieuptikeutkorean","pihiragana","pikatakana","pisymbolgreek","piwrarmenian", +"plus","plusbelowcmb","pluscircle","plusminus","plusmod","plusmonospace", +"plussmall","plussuperior","pmonospace","pmsquare","pohiragana", +"pointingindexdownwhite","pointingindexleftwhite","pointingindexrightwhite", +"pointingindexupwhite","pokatakana","poplathai","postalmark","postalmarkface", +"pparen","precedes","prescription","primemod","primereversed","product", +"projective","prolongedkana","propellor","propersubset","propersuperset", +"proportion","proportional","psi","psicyrillic","psilipneumatacyrilliccmb", +"pssquare","puhiragana","pukatakana","pvsquare","pwsquare","q","qadeva", +"qadmahebrew","qafarabic","qaffinalarabic","qafinitialarabic", +"qafmedialarabic","qamats","qamats10","qamats1a","qamats1c","qamats27", +"qamats29","qamats33","qamatsde","qamatshebrew","qamatsnarrowhebrew", +"qamatsqatanhebrew","qamatsqatannarrowhebrew","qamatsqatanquarterhebrew", +"qamatsqatanwidehebrew","qamatsquarterhebrew","qamatswidehebrew", +"qarneyparahebrew","qbopomofo","qcircle","qhook","qmonospace","qof", +"qofdagesh","qofdageshhebrew","qofhatafpatah","qofhatafpatahhebrew", +"qofhatafsegol","qofhatafsegolhebrew","qofhebrew","qofhiriq","qofhiriqhebrew", +"qofholam","qofholamhebrew","qofpatah","qofpatahhebrew","qofqamats", +"qofqamatshebrew","qofqubuts","qofqubutshebrew","qofsegol","qofsegolhebrew", +"qofsheva","qofshevahebrew","qoftsere","qoftserehebrew","qparen", +"quarternote","qubuts","qubuts18","qubuts25","qubuts31","qubutshebrew", +"qubutsnarrowhebrew","qubutsquarterhebrew","qubutswidehebrew","question", +"questionarabic","questionarmenian","questiondown","questiondownsmall", +"questiongreek","questionmonospace","questionsmall","quotedbl","quotedblbase", +"quotedblleft","quotedblmonospace","quotedblprime","quotedblprimereversed", +"quotedblright","quoteleft","quoteleftreversed","quotereversed","quoteright", +"quoterightn","quotesinglbase","quotesingle","quotesinglemonospace","r", +"raarmenian","rabengali","racute","radeva","radical","radicalex", +"radoverssquare","radoverssquaredsquare","radsquare","rafe","rafehebrew", +"ragujarati","ragurmukhi","rahiragana","rakatakana","rakatakanahalfwidth", +"ralowerdiagonalbengali","ramiddlediagonalbengali","ramshorn","ratio", +"rbopomofo","rcaron","rcedilla","rcircle","rcommaaccent","rdblgrave", +"rdotaccent","rdotbelow","rdotbelowmacron","referencemark","reflexsubset", +"reflexsuperset","registered","registersans","registerserif","reharabic", +"reharmenian","rehfinalarabic","rehiragana","rehyehaleflamarabic", +"rekatakana","rekatakanahalfwidth","resh","reshdageshhebrew","reshhatafpatah", +"reshhatafpatahhebrew","reshhatafsegol","reshhatafsegolhebrew","reshhebrew", +"reshhiriq","reshhiriqhebrew","reshholam","reshholamhebrew","reshpatah", +"reshpatahhebrew","reshqamats","reshqamatshebrew","reshqubuts", +"reshqubutshebrew","reshsegol","reshsegolhebrew","reshsheva", +"reshshevahebrew","reshtsere","reshtserehebrew","reversedtilde","reviahebrew", +"reviamugrashhebrew","revlogicalnot","rfishhook","rfishhookreversed", +"rhabengali","rhadeva","rho","rhook","rhookturned","rhookturnedsuperior", +"rhosymbolgreek","rhotichookmod","rieulacirclekorean","rieulaparenkorean", +"rieulcirclekorean","rieulhieuhkorean","rieulkiyeokkorean", +"rieulkiyeoksioskorean","rieulkorean","rieulmieumkorean","rieulpansioskorean", +"rieulparenkorean","rieulphieuphkorean","rieulpieupkorean", +"rieulpieupsioskorean","rieulsioskorean","rieulthieuthkorean", +"rieultikeutkorean","rieulyeorinhieuhkorean","rightangle","righttackbelowcmb", +"righttriangle","rihiragana","rikatakana","rikatakanahalfwidth","ring", +"ringbelowcmb","ringcmb","ringhalfleft","ringhalfleftarmenian", +"ringhalfleftbelowcmb","ringhalfleftcentered","ringhalfright", +"ringhalfrightbelowcmb","ringhalfrightcentered","rinvertedbreve", +"rittorusquare","rlinebelow","rlongleg","rlonglegturned","rmonospace", +"rohiragana","rokatakana","rokatakanahalfwidth","roruathai","rparen", +"rrabengali","rradeva","rragurmukhi","rreharabic","rrehfinalarabic", +"rrvocalicbengali","rrvocalicdeva","rrvocalicgujarati", +"rrvocalicvowelsignbengali","rrvocalicvowelsigndeva", +"rrvocalicvowelsigngujarati","rsuperior","rtblock","rturned", +"rturnedsuperior","ruhiragana","rukatakana","rukatakanahalfwidth", +"rupeemarkbengali","rupeesignbengali","rupiah","ruthai","rvocalicbengali", +"rvocalicdeva","rvocalicgujarati","rvocalicvowelsignbengali", +"rvocalicvowelsigndeva","rvocalicvowelsigngujarati","s","sabengali","sacute", +"sacutedotaccent","sadarabic","sadeva","sadfinalarabic","sadinitialarabic", +"sadmedialarabic","sagujarati","sagurmukhi","sahiragana","sakatakana", +"sakatakanahalfwidth","sallallahoualayhewasallamarabic","samekh", +"samekhdagesh","samekhdageshhebrew","samekhhebrew","saraaathai","saraaethai", +"saraaimaimalaithai","saraaimaimuanthai","saraamthai","saraathai","saraethai", +"saraiileftthai","saraiithai","saraileftthai","saraithai","saraothai", +"saraueeleftthai","saraueethai","saraueleftthai","sarauethai","sarauthai", +"sarauuthai","sbopomofo","scaron","scarondotaccent","scedilla","schwa", +"schwacyrillic","schwadieresiscyrillic","schwahook","scircle","scircumflex", +"scommaaccent","sdotaccent","sdotbelow","sdotbelowdotaccent", +"seagullbelowcmb","second","secondtonechinese","section","seenarabic", +"seenfinalarabic","seeninitialarabic","seenmedialarabic","segol","segol13", +"segol1f","segol2c","segolhebrew","segolnarrowhebrew","segolquarterhebrew", +"segoltahebrew","segolwidehebrew","seharmenian","sehiragana","sekatakana", +"sekatakanahalfwidth","semicolon","semicolonarabic","semicolonmonospace", +"semicolonsmall","semivoicedmarkkana","semivoicedmarkkanahalfwidth", +"sentisquare","sentosquare","seven","sevenarabic","sevenbengali", +"sevencircle","sevencircleinversesansserif","sevendeva","seveneighths", +"sevengujarati","sevengurmukhi","sevenhackarabic","sevenhangzhou", +"sevenideographicparen","seveninferior","sevenmonospace","sevenoldstyle", +"sevenparen","sevenperiod","sevenpersian","sevenroman","sevensuperior", +"seventeencircle","seventeenparen","seventeenperiod","seventhai","sfthyphen", +"shaarmenian","shabengali","shacyrillic","shaddaarabic","shaddadammaarabic", +"shaddadammatanarabic","shaddafathaarabic","shaddafathatanarabic", +"shaddakasraarabic","shaddakasratanarabic","shade","shadedark","shadelight", +"shademedium","shadeva","shagujarati","shagurmukhi","shalshelethebrew", +"shbopomofo","shchacyrillic","sheenarabic","sheenfinalarabic", +"sheeninitialarabic","sheenmedialarabic","sheicoptic","sheqel","sheqelhebrew", +"sheva","sheva115","sheva15","sheva22","sheva2e","shevahebrew", +"shevanarrowhebrew","shevaquarterhebrew","shevawidehebrew","shhacyrillic", +"shimacoptic","shin","shindagesh","shindageshhebrew","shindageshshindot", +"shindageshshindothebrew","shindageshsindot","shindageshsindothebrew", +"shindothebrew","shinhebrew","shinshindot","shinshindothebrew","shinsindot", +"shinsindothebrew","shook","sigma","sigma1","sigmafinal", +"sigmalunatesymbolgreek","sihiragana","sikatakana","sikatakanahalfwidth", +"siluqhebrew","siluqlefthebrew","similar","sindothebrew","siosacirclekorean", +"siosaparenkorean","sioscieuckorean","sioscirclekorean","sioskiyeokkorean", +"sioskorean","siosnieunkorean","siosparenkorean","siospieupkorean", +"siostikeutkorean","six","sixarabic","sixbengali","sixcircle", +"sixcircleinversesansserif","sixdeva","sixgujarati","sixgurmukhi", +"sixhackarabic","sixhangzhou","sixideographicparen","sixinferior", +"sixmonospace","sixoldstyle","sixparen","sixperiod","sixpersian","sixroman", +"sixsuperior","sixteencircle","sixteencurrencydenominatorbengali", +"sixteenparen","sixteenperiod","sixthai","slash","slashmonospace","slong", +"slongdotaccent","smileface","smonospace","sofpasuqhebrew","softhyphen", +"softsigncyrillic","sohiragana","sokatakana","sokatakanahalfwidth", +"soliduslongoverlaycmb","solidusshortoverlaycmb","sorusithai","sosalathai", +"sosothai","sosuathai","space","spacehackarabic","spade","spadesuitblack", +"spadesuitwhite","sparen","squarebelowcmb","squarecc","squarecm", +"squarediagonalcrosshatchfill","squarehorizontalfill","squarekg","squarekm", +"squarekmcapital","squareln","squarelog","squaremg","squaremil","squaremm", +"squaremsquared","squareorthogonalcrosshatchfill", +"squareupperlefttolowerrightfill","squareupperrighttolowerleftfill", +"squareverticalfill","squarewhitewithsmallblack","srsquare","ssabengali", +"ssadeva","ssagujarati","ssangcieuckorean","ssanghieuhkorean", +"ssangieungkorean","ssangkiyeokkorean","ssangnieunkorean","ssangpieupkorean", +"ssangsioskorean","ssangtikeutkorean","ssuperior","sterling", +"sterlingmonospace","strokelongoverlaycmb","strokeshortoverlaycmb","subset", +"subsetnotequal","subsetorequal","succeeds","suchthat","suhiragana", +"sukatakana","sukatakanahalfwidth","sukunarabic","summation","sun","superset", +"supersetnotequal","supersetorequal","svsquare","syouwaerasquare","t", +"tabengali","tackdown","tackleft","tadeva","tagujarati","tagurmukhi", +"taharabic","tahfinalarabic","tahinitialarabic","tahiragana", +"tahmedialarabic","taisyouerasquare","takatakana","takatakanahalfwidth", +"tatweelarabic","tau","tav","tavdages","tavdagesh","tavdageshhebrew", +"tavhebrew","tbar","tbopomofo","tcaron","tccurl","tcedilla","tcheharabic", +"tchehfinalarabic","tchehinitialarabic","tchehmedialarabic", +"tchehmeeminitialarabic","tcircle","tcircumflexbelow","tcommaaccent", +"tdieresis","tdotaccent","tdotbelow","tecyrillic","tedescendercyrillic", +"teharabic","tehfinalarabic","tehhahinitialarabic","tehhahisolatedarabic", +"tehinitialarabic","tehiragana","tehjeeminitialarabic", +"tehjeemisolatedarabic","tehmarbutaarabic","tehmarbutafinalarabic", +"tehmedialarabic","tehmeeminitialarabic","tehmeemisolatedarabic", +"tehnoonfinalarabic","tekatakana","tekatakanahalfwidth","telephone", +"telephoneblack","telishagedolahebrew","telishaqetanahebrew","tencircle", +"tenideographicparen","tenparen","tenperiod","tenroman","tesh","tet", +"tetdagesh","tetdageshhebrew","tethebrew","tetsecyrillic","tevirhebrew", +"tevirlefthebrew","thabengali","thadeva","thagujarati","thagurmukhi", +"thalarabic","thalfinalarabic","thanthakhatlowleftthai", +"thanthakhatlowrightthai","thanthakhatthai","thanthakhatupperleftthai", +"theharabic","thehfinalarabic","thehinitialarabic","thehmedialarabic", +"thereexists","therefore","theta","theta1","thetasymbolgreek", +"thieuthacirclekorean","thieuthaparenkorean","thieuthcirclekorean", +"thieuthkorean","thieuthparenkorean","thirteencircle","thirteenparen", +"thirteenperiod","thonangmonthothai","thook","thophuthaothai","thorn", +"thothahanthai","thothanthai","thothongthai","thothungthai", +"thousandcyrillic","thousandsseparatorarabic","thousandsseparatorpersian", +"three","threearabic","threebengali","threecircle", +"threecircleinversesansserif","threedeva","threeeighths","threegujarati", +"threegurmukhi","threehackarabic","threehangzhou","threeideographicparen", +"threeinferior","threemonospace","threenumeratorbengali","threeoldstyle", +"threeparen","threeperiod","threepersian","threequarters", +"threequartersemdash","threeroman","threesuperior","threethai","thzsquare", +"tihiragana","tikatakana","tikatakanahalfwidth","tikeutacirclekorean", +"tikeutaparenkorean","tikeutcirclekorean","tikeutkorean","tikeutparenkorean", +"tilde","tildebelowcmb","tildecmb","tildecomb","tildedoublecmb", +"tildeoperator","tildeoverlaycmb","tildeverticalcmb","timescircle", +"tipehahebrew","tipehalefthebrew","tippigurmukhi","titlocyrilliccmb", +"tiwnarmenian","tlinebelow","tmonospace","toarmenian","tohiragana", +"tokatakana","tokatakanahalfwidth","tonebarextrahighmod","tonebarextralowmod", +"tonebarhighmod","tonebarlowmod","tonebarmidmod","tonefive","tonesix", +"tonetwo","tonos","tonsquare","topatakthai","tortoiseshellbracketleft", +"tortoiseshellbracketleftsmall","tortoiseshellbracketleftvertical", +"tortoiseshellbracketright","tortoiseshellbracketrightsmall", +"tortoiseshellbracketrightvertical","totaothai","tpalatalhook","tparen", +"trademark","trademarksans","trademarkserif","tretroflexhook","triagdn", +"triaglf","triagrt","triagup","ts","tsadi","tsadidagesh","tsadidageshhebrew", +"tsadihebrew","tsecyrillic","tsere","tsere12","tsere1e","tsere2b", +"tserehebrew","tserenarrowhebrew","tserequarterhebrew","tserewidehebrew", +"tshecyrillic","tsuperior","ttabengali","ttadeva","ttagujarati","ttagurmukhi", +"tteharabic","ttehfinalarabic","ttehinitialarabic","ttehmedialarabic", +"tthabengali","tthadeva","tthagujarati","tthagurmukhi","tturned","tuhiragana", +"tukatakana","tukatakanahalfwidth","tusmallhiragana","tusmallkatakana", +"tusmallkatakanahalfwidth","twelvecircle","twelveparen","twelveperiod", +"twelveroman","twentycircle","twentyhangzhou","twentyparen","twentyperiod", +"two","twoarabic","twobengali","twocircle","twocircleinversesansserif", +"twodeva","twodotenleader","twodotleader","twodotleadervertical", +"twogujarati","twogurmukhi","twohackarabic","twohangzhou", +"twoideographicparen","twoinferior","twomonospace","twonumeratorbengali", +"twooldstyle","twoparen","twoperiod","twopersian","tworoman","twostroke", +"twosuperior","twothai","twothirds","u","uacute","ubar","ubengali", +"ubopomofo","ubreve","ucaron","ucircle","ucircumflex","ucircumflexbelow", +"ucyrillic","udattadeva","udblacute","udblgrave","udeva","udieresis", +"udieresisacute","udieresisbelow","udieresiscaron","udieresiscyrillic", +"udieresisgrave","udieresismacron","udotbelow","ugrave","ugujarati", +"ugurmukhi","uhiragana","uhookabove","uhorn","uhornacute","uhorndotbelow", +"uhorngrave","uhornhookabove","uhorntilde","uhungarumlaut", +"uhungarumlautcyrillic","uinvertedbreve","ukatakana","ukatakanahalfwidth", +"ukcyrillic","ukorean","umacron","umacroncyrillic","umacrondieresis", +"umatragurmukhi","umonospace","underscore","underscoredbl", +"underscoremonospace","underscorevertical","underscorewavy","union", +"universal","uogonek","uparen","upblock","upperdothebrew","upsilon", +"upsilondieresis","upsilondieresistonos","upsilonlatin","upsilontonos", +"uptackbelowcmb","uptackmod","uragurmukhi","uring","ushortcyrillic", +"usmallhiragana","usmallkatakana","usmallkatakanahalfwidth", +"ustraightcyrillic","ustraightstrokecyrillic","utilde","utildeacute", +"utildebelow","uubengali","uudeva","uugujarati","uugurmukhi", +"uumatragurmukhi","uuvowelsignbengali","uuvowelsigndeva", +"uuvowelsigngujarati","uvowelsignbengali","uvowelsigndeva", +"uvowelsigngujarati","v","vadeva","vagujarati","vagurmukhi","vakatakana", +"vav","vavdagesh","vavdagesh65","vavdageshhebrew","vavhebrew","vavholam", +"vavholamhebrew","vavvavhebrew","vavyodhebrew","vcircle","vdotbelow", +"vecyrillic","veharabic","vehfinalarabic","vehinitialarabic", +"vehmedialarabic","vekatakana","venus","verticalbar","verticallineabovecmb", +"verticallinebelowcmb","verticallinelowmod","verticallinemod","vewarmenian", +"vhook","vikatakana","viramabengali","viramadeva","viramagujarati", +"visargabengali","visargadeva","visargagujarati","vmonospace","voarmenian", +"voicediterationhiragana","voicediterationkatakana","voicedmarkkana", +"voicedmarkkanahalfwidth","vokatakana","vparen","vtilde","vturned", +"vuhiragana","vukatakana","w","wacute","waekorean","wahiragana","wakatakana", +"wakatakanahalfwidth","wakorean","wasmallhiragana","wasmallkatakana", +"wattosquare","wavedash","wavyunderscorevertical","wawarabic", +"wawfinalarabic","wawhamzaabovearabic","wawhamzaabovefinalarabic","wbsquare", +"wcircle","wcircumflex","wdieresis","wdotaccent","wdotbelow","wehiragana", +"weierstrass","wekatakana","wekorean","weokorean","wgrave","whitebullet", +"whitecircle","whitecircleinverse","whitecornerbracketleft", +"whitecornerbracketleftvertical","whitecornerbracketright", +"whitecornerbracketrightvertical","whitediamond", +"whitediamondcontainingblacksmalldiamond","whitedownpointingsmalltriangle", +"whitedownpointingtriangle","whiteleftpointingsmalltriangle", +"whiteleftpointingtriangle","whitelenticularbracketleft", +"whitelenticularbracketright","whiterightpointingsmalltriangle", +"whiterightpointingtriangle","whitesmallsquare","whitesmilingface", +"whitesquare","whitestar","whitetelephone","whitetortoiseshellbracketleft", +"whitetortoiseshellbracketright","whiteuppointingsmalltriangle", +"whiteuppointingtriangle","wihiragana","wikatakana","wikorean","wmonospace", +"wohiragana","wokatakana","wokatakanahalfwidth","won","wonmonospace", +"wowaenthai","wparen","wring","wsuperior","wturned","wynn","x","xabovecmb", +"xbopomofo","xcircle","xdieresis","xdotaccent","xeharmenian","xi", +"xmonospace","xparen","xsuperior","y","yaadosquare","yabengali","yacute", +"yadeva","yaekorean","yagujarati","yagurmukhi","yahiragana","yakatakana", +"yakatakanahalfwidth","yakorean","yamakkanthai","yasmallhiragana", +"yasmallkatakana","yasmallkatakanahalfwidth","yatcyrillic","ycircle", +"ycircumflex","ydieresis","ydotaccent","ydotbelow","yeharabic", +"yehbarreearabic","yehbarreefinalarabic","yehfinalarabic", +"yehhamzaabovearabic","yehhamzaabovefinalarabic","yehhamzaaboveinitialarabic", +"yehhamzaabovemedialarabic","yehinitialarabic","yehmedialarabic", +"yehmeeminitialarabic","yehmeemisolatedarabic","yehnoonfinalarabic", +"yehthreedotsbelowarabic","yekorean","yen","yenmonospace","yeokorean", +"yeorinhieuhkorean","yerahbenyomohebrew","yerahbenyomolefthebrew", +"yericyrillic","yerudieresiscyrillic","yesieungkorean", +"yesieungpansioskorean","yesieungsioskorean","yetivhebrew","ygrave","yhook", +"yhookabove","yiarmenian","yicyrillic","yikorean","yinyang","yiwnarmenian", +"ymonospace","yod","yoddagesh","yoddageshhebrew","yodhebrew","yodyodhebrew", +"yodyodpatahhebrew","yohiragana","yoikorean","yokatakana", +"yokatakanahalfwidth","yokorean","yosmallhiragana","yosmallkatakana", +"yosmallkatakanahalfwidth","yotgreek","yoyaekorean","yoyakorean","yoyakthai", +"yoyingthai","yparen","ypogegrammeni","ypogegrammenigreekcmb","yr","yring", +"ysuperior","ytilde","yturned","yuhiragana","yuikorean","yukatakana", +"yukatakanahalfwidth","yukorean","yusbigcyrillic","yusbigiotifiedcyrillic", +"yuslittlecyrillic","yuslittleiotifiedcyrillic","yusmallhiragana", +"yusmallkatakana","yusmallkatakanahalfwidth","yuyekorean","yuyeokorean", +"yyabengali","yyadeva","z","zaarmenian","zacute","zadeva","zagurmukhi", +"zaharabic","zahfinalarabic","zahinitialarabic","zahiragana", +"zahmedialarabic","zainarabic","zainfinalarabic","zakatakana", +"zaqefgadolhebrew","zaqefqatanhebrew","zarqahebrew","zayin","zayindagesh", +"zayindageshhebrew","zayinhebrew","zbopomofo","zcaron","zcircle", +"zcircumflex","zcurl","zdot","zdotaccent","zdotbelow","zecyrillic", +"zedescendercyrillic","zedieresiscyrillic","zehiragana","zekatakana","zero", +"zeroarabic","zerobengali","zerodeva","zerogujarati","zerogurmukhi", +"zerohackarabic","zeroinferior","zeromonospace","zerooldstyle","zeropersian", +"zerosuperior","zerothai","zerowidthjoiner","zerowidthnonjoiner", +"zerowidthspace","zeta","zhbopomofo","zhearmenian","zhebrevecyrillic", +"zhecyrillic","zhedescendercyrillic","zhedieresiscyrillic","zihiragana", +"zikatakana","zinorhebrew","zlinebelow","zmonospace","zohiragana", +"zokatakana","zparen","zretroflexhook","zstroke","zuhiragana","zukatakana", +}; + +static const unsigned short agl_code_list[] = { +65,198,508,482,63462,193,63457,258,7854,1232,7862,7856,7858,7860,461,9398,194, +7844,7852,7846,7848,63458,7850,63177,63412,1040,512,196,1234,478,63460,7840, +480,192,63456,7842,1236,514,913,902,256,65313,260,197,506,7680,63461,63329, +195,63459,1329,66,9399,7682,7684,1041,1330,914,385,7686,65314,63220,63330,386, +67,1342,262,63178,63221,268,199,7688,63463,9400,264,266,266,63416,1353,1212, +1063,1214,1206,1268,1347,1227,1208,935,391,63222,65315,1361,63331,68,497,452, +1332,393,270,7696,9401,7698,272,7690,7692,1044,1006,8710,916,394,63179,63180, +63181,63400,988,1026,7694,65316,63223,272,63332,395,498,453,1248,1029,1039,69, +201,63465,276,282,7708,1333,9402,202,7870,7704,7878,7872,7874,63466,7876,1028, +516,203,63467,278,278,7864,1060,200,63464,1335,7866,8551,518,1124,1051,8554, +274,7702,7700,1052,65317,1053,1186,330,1188,1223,280,400,917,904,1056,398, +1069,1057,1194,425,63333,919,1336,905,208,63472,7868,7706,8364,439,494,440,70, +9403,7710,1366,996,401,1138,8548,65318,8547,63334,71,13191,500,915,404,1002, +286,486,290,9404,284,290,288,288,1043,1346,1172,1170,1168,403,1331,1027,7712, +65319,63182,63328,63335,667,484,72,9679,9642,9643,9633,13259,1192,1202,1066, +294,7722,7720,9405,292,7718,7714,7716,65320,1344,1000,63336,63183,63224,13200, +73,1071,306,1070,205,63469,300,463,9406,206,63470,1030,520,207,7726,1252, +63471,304,304,7882,1238,1045,8465,204,63468,7880,1048,522,1049,298,1250,65321, +1339,1025,302,921,406,938,906,63337,407,296,7724,1140,1142,74,1345,9407,308, +1032,1355,65322,63338,75,13189,13261,1184,7728,1050,1178,1219,922,1182,1180, +488,310,9408,310,7730,1364,1343,1061,998,408,1036,7732,65323,1152,990,1134, +63339,76,455,63167,313,923,317,315,9409,7740,315,319,319,7734,7736,1340,456, +1033,7738,65324,321,63225,63340,77,13190,63184,63407,7742,9410,7744,7746,1348, +65325,63341,412,924,78,458,323,327,325,9411,7754,325,7748,7750,413,8552,459, +1034,7752,65326,1350,63342,209,63473,925,79,338,63226,211,63475,1256,1258,334, +465,415,9412,212,7888,7896,7890,7892,63476,7894,1054,336,524,214,1254,63478, +7884,63227,210,63474,1365,8486,7886,416,7898,7906,7900,7902,7904,336,418,526, +332,7762,7760,8486,1120,937,1146,1148,911,927,908,65327,8544,490,492,390,216, +510,63480,63343,510,1150,213,7756,7758,63477,80,7764,9413,7766,1055,1354,1190, +934,420,928,1363,65328,936,1136,63344,81,9414,65329,63345,82,1356,340,344,342, +9415,342,528,7768,7770,7772,1360,8476,929,63228,530,7774,65330,63346,641,694, +83,9484,9492,9488,9496,9532,9516,9524,9500,9508,9472,9474,9569,9570,9558,9557, +9571,9553,9559,9565,9564,9563,9566,9567,9562,9556,9577,9574,9568,9552,9580, +9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,346,7780,992,352,7782,63229, +350,399,1240,1242,9416,348,536,7776,7778,7784,1357,8550,1351,1064,1065,994, +1210,1004,931,8549,65331,1068,63347,986,84,932,358,356,354,9417,7792,354,7786, +7788,1058,1196,8553,1204,920,428,222,63486,8546,63230,1359,7790,65332,1337, +444,388,423,430,1062,1035,63348,8555,8545,85,218,63482,364,467,9418,219,7798, +63483,1059,368,532,220,471,7794,473,1264,475,469,63484,7908,217,63481,7910, +431,7912,7920,7914,7916,7918,368,1266,534,1144,362,1262,7802,65333,370,933, +978,979,433,939,980,978,910,366,1038,63349,1198,1200,360,7800,7796,86,9419, +7806,1042,1358,434,65334,1352,63350,7804,87,7810,9420,372,7812,7814,7816,7808, +65335,63351,88,9421,7820,7818,1341,926,65336,63352,89,221,63485,1122,9422,374, +376,63487,7822,7924,1067,1272,7922,435,7926,1349,1031,1362,65337,63353,7928, +1130,1132,1126,1128,90,1334,377,381,63231,9423,7824,379,379,7826,1047,1176, +1246,918,1338,1217,1046,1174,1244,7828,65338,63354,437,97,2438,225,2310,2694, +2566,2622,13059,2494,2366,2750,1375,2416,2437,12570,259,7855,1233,7863,7857, +7859,7861,462,9424,226,7845,7853,7847,7849,7851,180,791,769,769,2388,719,833, +1072,513,2673,2309,228,1235,479,7841,481,230,509,12624,483,8213,8356,1040, +1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054, +1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069, +1070,1071,1168,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038, +63172,63173,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083, +1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098, +1099,1100,1101,1102,1103,1169,1106,1107,1108,1109,1110,1111,1112,1113,1114, +1115,1116,1118,1039,1122,1138,1140,63174,1119,1123,1139,1141,63175,63176,1241, +8206,8207,8205,1642,1548,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641, +1563,1567,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581, +1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1600,1601, +1602,1603,1604,1605,1606,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617, +1618,1607,1700,1662,1670,1688,1711,1657,1672,1681,1722,1746,1749,8362,1470, +1475,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501, +1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,64298,64299, +64331,64287,1520,1521,1522,64309,1460,1461,1462,1467,1464,1463,1456,1458,1457, +1459,1474,1473,1465,1468,1469,1471,1472,700,8453,8467,8470,8236,8237,8238, +8204,1645,701,224,2693,2565,12354,7843,2448,12574,2320,1237,2704,2576,2632, +1593,65226,65227,65228,515,2504,2376,2760,12450,65393,12623,1488,1575,64304, +65166,1571,65156,1573,65160,1488,64335,1570,65154,1609,65264,65267,65268, +64302,64303,8501,8780,945,940,257,65345,38,65286,63270,13250,12578,12580,3674, +8736,12296,65087,12297,65088,9001,9002,8491,903,2386,2434,2306,2690,261,13056, +9372,1370,700,63743,8784,8776,8786,8773,12686,12685,8978,7834,229,507,7681, +8596,8675,8672,8674,8673,8660,8659,8656,8658,8657,8595,8601,8600,8681,709,706, +707,708,63719,8592,8656,8653,8646,8678,8594,8655,10142,8644,8680,8676,8677, +8593,8597,8616,8616,8598,8645,8599,8679,63718,94,65342,126,65374,593,594, +12353,12449,65383,42,1645,1645,8727,65290,65121,8258,63209,8771,64,227,65312, +65131,592,2452,12576,2324,2708,2580,2519,2636,2508,2380,2764,2365,1377,1506, +64288,1506,98,2476,92,65340,2348,2732,2604,12400,3647,12496,124,65372,12549, +9425,7683,7685,9836,8757,1073,1576,65168,65169,12409,65170,64671,64520,64621, +12505,1378,1489,946,976,64305,64305,1489,64332,2477,2349,2733,2605,595,12403, +12499,664,2562,13105,9679,9670,9660,9668,9664,12304,65083,12305,65084,9699, +9698,9644,9658,9654,9642,9787,9632,9733,9700,9701,9652,9650,9251,7687,9608, +65346,3610,12412,12508,9373,13251,63732,123,63731,63730,65371,65115,63729, +65079,125,63742,63741,65373,65116,63740,65080,91,63728,63727,65339,63726,93, +63739,63738,65341,63737,728,814,774,815,785,865,810,826,166,384,63210,387, +12406,12502,8226,9688,8729,9678,99,1390,2458,263,2330,2714,2586,13192,2433, +784,2305,2689,8682,8453,711,812,780,8629,12568,269,231,7689,9426,265,597,267, +267,13253,184,807,162,8451,63199,65504,63394,63200,1401,2459,2331,2715,2587, +12564,1213,10003,1095,1215,1207,1269,1395,1228,1209,967,12919,12823,12905, +12618,12809,3594,3592,3593,3596,392,12918,12822,12904,12616,12808,12828,9675, +8855,8857,8853,12342,9680,9681,710,813,770,8999,450,448,449,451,9827,9827, +9831,13220,65347,13216,1409,58,8353,65306,8353,65109,721,720,44,787,789,63171, +1548,1373,63201,65292,788,701,65104,63202,786,699,9788,8773,8750,8963,6,7,8, +24,13,17,18,19,20,127,16,25,5,4,27,23,3,12,28,29,9,10,21,30,15,14,2,1,26,22, +31,11,169,63721,63193,12300,65378,65089,12301,65379,65090,13183,13255,13254, +9374,8354,663,8911,8910,164,63185,63186,63188,63189,100,1380,2470,1590,2342, +65214,65215,65216,1468,1468,8224,8225,2726,2598,12384,12480,1583,1491,64307, +64307,1491,1491,1491,1491,1491,1491,1491,1491,1491,1491,1491,1491,1491,1491, +1491,1491,1491,1491,1491,1491,1491,65194,1615,1615,1612,1612,2404,1447,1447, +1157,63187,12298,65085,12299,65086,811,8660,8658,2405,63190,783,8748,8215,819, +831,698,8214,782,12553,13256,271,7697,9427,7699,273,2465,2337,2721,2593,1672, +64393,2396,2466,2338,2722,2594,7691,7693,1643,1643,1076,176,1453,12391,1007, +12487,9003,8998,948,397,2552,676,2471,2343,2727,2599,599,901,836,9830,9826, +168,63191,804,776,63192,901,12386,12482,12291,247,8739,8725,1106,9619,7695, +13207,273,65348,9604,3598,3604,12393,12489,36,63203,65284,63268,65129,63204, +8363,13094,729,775,803,803,12539,305,63166,644,8901,9676,64287,64287,798,725, +9375,63211,598,396,12389,12485,499,675,454,677,1249,1109,1119,101,233,9793, +2447,12572,277,2317,2701,2373,2757,283,7709,1381,1415,9428,234,7871,7705,7879, +7873,7875,7877,1108,517,2319,235,279,279,7865,2575,2631,1092,232,2703,1383, +12573,12360,7867,12575,56,1640,2542,9319,10129,2414,9329,9349,9369,2798,2670, +1640,12328,9835,12839,8328,65304,63288,9339,9359,1784,8567,8312,3672,519,1125, +12456,65396,2676,12628,1083,8712,9322,9342,9362,8570,8230,8942,275,7703,7701, +1084,8212,65073,65349,1371,8709,12579,1085,8211,65074,1187,331,12581,1189, +1224,8194,281,12627,603,666,604,606,605,9376,949,941,61,65309,65126,8316,8801, +12582,1088,600,1101,1089,1195,643,646,2318,2374,426,645,12359,12455,65386, +8494,63212,951,1384,942,240,7869,7707,1425,1425,1425,1425,477,12641,8364,2503, +2375,2759,33,1372,8252,161,63393,65281,63265,8707,658,495,659,441,442,102, +2398,2654,8457,1614,1614,1611,12552,9429,7711,1601,1414,65234,65235,65236,997, +9792,64256,64259,64260,64257,9326,9346,9366,8210,9632,9644,1498,64314,64314, +1498,1498,1498,1498,1498,1501,1501,1503,1503,1507,1507,1509,1509,713,9673, +1139,53,1637,2539,9316,10126,2411,8541,2795,2667,1637,12325,12836,8325,65301, +63285,9336,9356,1781,8564,8309,3669,64258,402,65350,13209,3615,3613,3663,8704, +52,1636,2538,9315,10125,2410,2794,2666,1636,12324,12835,8324,65300,2551,63284, +9335,9355,1780,8563,8308,9325,9345,9365,3668,715,9377,8260,8355,103,2455,501, +2327,1711,64403,64404,64405,2711,2583,12364,12460,947,611,736,1003,12557,287, +487,291,9430,285,291,289,289,1075,12370,12466,8785,1436,1523,1437,223,1438, +1524,12307,2456,1394,2328,2712,2584,1594,65230,65231,65232,1173,1171,1169, +2394,2650,608,13203,12366,12462,1379,1490,64306,64306,1490,1107,446,660,662, +704,661,705,740,673,674,7713,65351,12372,12468,9378,13228,8711,96,790,768,768, +2387,718,65344,832,62,8805,8923,65310,8819,8823,8807,65125,609,485,12368,171, +187,8249,8250,12464,13080,13257,104,1193,1729,2489,1203,2361,2745,2617,1581, +65186,65187,12399,65188,13098,12495,65418,2637,1569,1569,1569,1569,1569,1569, +1569,1569,1569,12644,1098,8636,8640,13258,1458,1458,1458,1458,1458,1458,1458, +1458,1459,1459,1459,1459,1459,1459,1459,1459,1457,1457,1457,1457,1457,1457, +1457,1457,295,12559,7723,7721,9431,293,7719,7715,7717,1492,9829,9829,9825, +64308,64308,1729,1607,1492,64423,65258,65258,64421,64420,64424,65259,12408, +64425,65260,13179,12504,65421,13110,615,13113,1495,1495,614,689,12923,12827, +12909,12622,12813,12402,12498,65419,1460,1460,1460,1460,1460,1460,1460,1460, +7830,65352,1392,3627,12411,12507,65422,1465,1465,1465,1465,1465,1465,1465, +1465,3630,777,777,801,802,13122,1001,8213,795,9832,8962,9379,688,613,12405, +13107,12501,65420,733,779,405,45,63205,65293,65123,63206,8208,105,237,1103, +2439,12583,301,464,9432,238,1110,521,12943,12939,12863,12858,12965,12294, +12289,65380,12855,12963,12847,12861,12957,12864,12950,12854,12843,12850,12964, +12293,12952,12856,12967,12966,12969,12846,12842,12852,12290,12958,12867,12857, +12862,12968,12953,12866,12851,12288,12853,12849,12859,12848,12860,12844,12845, +12295,12942,12938,12948,12944,12940,12941,2311,239,7727,1253,7883,1239,1077, +12917,12821,12903,12615,12807,236,2695,2567,12356,7881,2440,1080,2312,2696, +2568,2624,523,1081,2496,2368,2752,307,12452,65394,12643,732,1452,299,1251, +8787,2623,65353,8710,8734,1387,8747,8993,8993,63733,8992,8992,8745,13061,9688, +9689,9787,1105,303,953,970,912,617,943,9380,2674,12355,12451,65384,2554,616, +63213,12445,12541,297,7725,12585,1102,2495,2367,2751,1141,1143,106,1393,2460, +2332,2716,2588,12560,496,9433,309,669,607,1112,1580,65182,65183,65184,1688, +64395,2461,2333,2717,2589,1403,12292,65354,9381,690,107,1185,2453,7729,1082, +1179,2325,1499,1603,64315,64315,65242,1499,65243,65244,64333,2709,2581,12363, +1220,12459,65398,954,1008,12657,12676,12664,12665,13069,1600,1600,12533,13188, +1616,1613,1183,65392,1181,12558,13193,489,311,9434,311,7731,1412,12369,12465, +65401,1391,12534,312,2454,1093,2326,2710,2582,1582,65190,65191,65192,999,2393, +2649,12920,12824,12906,12619,12810,3586,3589,3587,3588,3675,409,3590,13201, +12365,12461,65399,13077,13078,13076,12910,12814,12896,12593,12800,12595,1116, +7733,13208,13222,65355,13218,12371,13248,3585,12467,65402,13086,1153,12927, +835,9382,13226,1135,13263,670,12367,12463,65400,13240,13246,108,2482,314,2354, +2738,2610,3653,65276,65272,65271,65274,65273,65275,65270,65269,1604,955,411, +1500,64316,64316,1500,1500,1500,1500,1500,65246,64714,65247,64713,64715,65010, +65248,64904,64716,65247,65247,9711,410,620,12556,318,316,9435,7741,316,320, +320,7735,7737,794,792,60,8804,8922,65308,8818,8822,8806,65124,622,9612,621, +8356,1388,457,1113,63168,2355,2739,7739,2356,2529,2401,2531,2403,619,65356, +13264,3628,8743,172,8976,8744,3621,383,65102,818,65101,9674,9383,322,8467, +63214,9617,3622,2444,2316,2530,2402,13267,109,2478,175,817,772,717,65507,7743, +2350,2734,2606,1444,1444,12414,63637,63636,3659,63635,63628,63627,3656,63626, +63620,3633,63625,3655,63631,63630,3657,63629,63634,63633,3658,63632,3654, +12510,65423,9794,13127,1470,9794,1455,13187,12551,13268,9436,13221,7745,7747, +1605,65250,65251,65252,64721,64584,13133,12417,13182,12513,65426,1502,64318, +64318,1502,1396,1445,1446,1446,1445,625,13202,65381,183,12914,12818,12900, +12609,12656,12804,12654,12655,12415,12511,65424,8722,800,8854,727,8723,8242, +13130,13129,624,13206,13219,65357,13215,12418,13249,12514,65427,13270,3617, +13223,13224,9384,13227,13235,63215,623,181,181,13186,8811,8810,13196,956, +13197,12416,12512,65425,13205,215,13211,1443,1443,9834,9835,9837,9839,13234, +13238,13244,13241,13239,13247,13245,110,2472,8711,324,2344,2728,2600,12394, +12490,65413,329,13185,12555,160,328,326,9437,7755,326,7749,7751,12397,12493, +65416,8362,13195,2457,2329,2713,2585,3591,12435,626,627,12911,12815,12597, +12897,12598,12596,12648,12801,12647,12646,12395,12491,65414,63641,3661,57, +1641,2543,9320,10130,2415,2799,2671,1641,12329,12840,8329,65305,63289,9340, +9360,1785,8568,8313,9330,9350,9370,3673,460,1114,12531,65437,414,7753,65358, +13210,2467,2339,2723,2595,2345,12398,12494,65417,160,3603,3609,1606,65254, +1722,64415,65255,65255,64722,64587,65256,64725,64590,64653,8716,8713,8713, +8800,8815,8817,8825,8802,8814,8816,8742,8832,8836,8833,8837,1398,9385,13233, +8319,241,957,12396,12492,65415,2492,2364,2748,2620,35,65283,65119,884,885, +8470,1504,64320,64320,1504,13237,13243,2462,2334,2718,2590,111,243,3629,629, +1257,1259,2451,12571,335,2321,2705,2377,2761,466,9438,244,7889,7897,7891,7893, +7895,1086,337,525,2323,246,1255,7885,339,12634,731,808,242,2707,1413,12362, +7887,417,7899,7907,7901,7903,7905,337,419,527,12458,65397,12631,1451,333,7763, +7761,2384,969,982,1121,631,1147,1149,974,2768,959,972,65359,49,1633,2535,9312, +10122,2407,8228,8539,63196,2791,2663,1633,189,12321,12832,8321,65297,2548, +63281,9332,9352,1777,188,8560,185,3665,8531,491,493,2579,2635,596,9386,9702, +8997,170,186,8735,2322,2378,248,511,12361,12457,65387,511,63216,1151,245,7757, +7759,12577,8254,65098,773,65097,65100,65099,175,2507,2379,2763,112,13184, +13099,2474,7765,2346,8671,8670,2730,2602,12401,3631,12497,1156,1216,12671,182, +8741,40,64830,63725,63724,8333,65288,65113,8317,63723,65077,41,64831,63736, +63735,8334,65289,65114,8318,63734,65078,8706,1472,1433,13225,1463,1463,1463, +1463,1463,1463,1463,1463,1441,12550,9439,7767,1508,1087,64324,64324,13115, +64323,1662,1402,1508,64343,64344,12410,64345,12506,1191,64334,37,1642,65285, +65130,46,1417,183,65377,63207,65294,65106,63208,834,8869,8240,8359,13194,2475, +2347,2731,2603,966,981,12922,12826,12908,12621,12812,632,3642,981,421,3614, +3612,3616,960,12915,12819,12662,12901,12658,12610,12805,12660,12612,12661, +12663,12659,12404,12500,982,1411,43,799,8853,177,726,65291,65122,8314,65360, +13272,12413,9759,9756,9758,9757,12509,3611,12306,12320,9387,8826,8478,697, +8245,8719,8965,12540,8984,8834,8835,8759,8733,968,1137,1158,13232,12407,12503, +13236,13242,113,2392,1448,1602,65238,65239,65240,1464,1464,1464,1464,1464, +1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1464,1439,12561,9440,672, +65361,1511,64327,64327,1511,1511,1511,1511,1511,1511,1511,1511,1511,1511,1511, +1511,1511,1511,1511,1511,1511,1511,1511,1511,1511,9388,9833,1467,1467,1467, +1467,1467,1467,1467,1467,63,1567,1374,191,63423,894,65311,63295,34,8222,8220, +65282,12318,12317,8221,8216,8219,8219,8217,329,8218,39,65287,114,1404,2480, +341,2352,8730,63717,13230,13231,13229,1471,1471,2736,2608,12425,12521,65431, +2545,2544,612,8758,12566,345,343,9441,343,529,7769,7771,7773,8251,8838,8839, +174,63720,63194,1585,1408,65198,12428,1585,12524,65434,1512,64328,1512,1512, +1512,1512,1512,1512,1512,1512,1512,1512,1512,1512,1512,1512,1512,1512,1512, +1512,1512,1512,1512,8765,1431,1431,8976,638,639,2525,2397,961,637,635,693, +1009,734,12913,12817,12899,12608,12602,12649,12601,12603,12652,12803,12607, +12604,12651,12605,12606,12650,12653,8735,793,8895,12426,12522,65432,730,805, +778,703,1369,796,723,702,825,722,531,13137,7775,636,634,65362,12429,12525, +65435,3619,9389,2524,2353,2652,1681,64397,2528,2400,2784,2500,2372,2756,63217, +9616,633,692,12427,12523,65433,2546,2547,63197,3620,2443,2315,2699,2499,2371, +2755,115,2488,347,7781,1589,2360,65210,65211,65212,2744,2616,12373,12469, +65403,65018,1505,64321,64321,1505,3634,3649,3652,3651,3635,3632,3648,63622, +3637,63621,3636,3650,63624,3639,63623,3638,3640,3641,12569,353,7783,351,601, +1241,1243,602,9442,349,537,7777,7779,7785,828,8243,714,167,1587,65202,65203, +65204,1462,1462,1462,1462,1462,1462,1462,1426,1462,1405,12379,12475,65406,59, +1563,65307,65108,12444,65439,13090,13091,55,1639,2541,9318,10128,2413,8542, +2797,2669,1639,12327,12838,8327,65303,63287,9338,9358,1783,8566,8311,9328, +9348,9368,3671,173,1399,2486,1096,1617,64609,64606,64608,1617,64610,64607, +9618,9619,9617,9618,2358,2742,2614,1427,12565,1097,1588,65206,65207,65208,995, +8362,8362,1456,1456,1456,1456,1456,1456,1456,1456,1456,1211,1005,1513,64329, +64329,64300,64300,64301,64301,1473,1513,64298,64298,64299,64299,642,963,962, +962,1010,12375,12471,65404,1469,1469,8764,1474,12916,12820,12670,12902,12666, +12613,12667,12806,12669,12668,54,1638,2540,9317,10127,2412,2796,2668,1638, +12326,12837,8326,65302,63286,9337,9357,1782,8565,8310,9327,2553,9347,9367, +3670,47,65295,383,7835,9786,65363,1475,173,1100,12381,12477,65407,824,823, +3625,3624,3595,3626,32,32,9824,9824,9828,9390,827,13252,13213,9641,9636,13199, +13214,13262,13265,13266,13198,13269,13212,13217,9638,9639,9640,9637,9635, +13275,2487,2359,2743,12617,12677,12672,12594,12645,12611,12614,12600,63218, +163,65505,822,821,8834,8842,8838,8827,8715,12377,12473,65405,1618,8721,9788, +8835,8843,8839,13276,13180,116,2468,8868,8867,2340,2724,2596,1591,65218,65219, +12383,65220,13181,12479,65408,1600,964,1514,64330,64330,64330,1514,359,12554, +357,680,355,1670,64379,64380,64381,64380,9443,7793,355,7831,7787,7789,1090, +1197,1578,65174,64674,64524,65175,12390,64673,64523,1577,65172,65176,64676, +64526,64627,12486,65411,8481,9742,1440,1449,9321,12841,9341,9361,8569,679, +1496,64312,64312,1496,1205,1435,1435,2469,2341,2725,2597,1584,65196,63640, +63639,3660,63638,1579,65178,65179,65180,8707,8756,952,977,977,12921,12825, +12907,12620,12811,9324,9344,9364,3601,429,3602,254,3607,3600,3608,3606,1154, +1644,1644,51,1635,2537,9314,10124,2409,8540,2793,2665,1635,12323,12834,8323, +65299,2550,63283,9334,9354,1779,190,63198,8562,179,3667,13204,12385,12481, +65409,12912,12816,12898,12599,12802,732,816,771,771,864,8764,820,830,8855, +1430,1430,2672,1155,1407,7791,65364,1385,12392,12488,65412,741,745,742,744, +743,445,389,424,900,13095,3599,12308,65117,65081,12309,65118,65082,3605,427, +9391,8482,63722,63195,648,9660,9668,9658,9650,678,1510,64326,64326,1510,1094, +1461,1461,1461,1461,1461,1461,1461,1461,1115,63219,2463,2335,2719,2591,1657, +64359,64360,64361,2464,2336,2720,2592,647,12388,12484,65410,12387,12483,65391, +9323,9343,9363,8571,9331,21316,9351,9371,50,1634,2536,9313,10123,2408,8229, +8229,65072,2792,2664,1634,12322,12833,8322,65298,2549,63282,9333,9353,1778, +8561,443,178,3666,8532,117,250,649,2441,12584,365,468,9444,251,7799,1091,2385, +369,533,2313,252,472,7795,474,1265,476,470,7909,249,2697,2569,12358,7911,432, +7913,7921,7915,7917,7919,369,1267,535,12454,65395,1145,12636,363,1263,7803, +2625,65365,95,8215,65343,65075,65103,8746,8704,371,9392,9600,1476,965,971,944, +650,973,797,724,2675,367,1118,12357,12453,65385,1199,1201,361,7801,7797,2442, +2314,2698,2570,2626,2498,2370,2754,2497,2369,2753,118,2357,2741,2613,12535, +1493,64309,64309,64309,1493,64331,64331,1520,1521,9445,7807,1074,1700,64363, +64364,64365,12537,9792,124,781,809,716,712,1406,651,12536,2509,2381,2765,2435, +2307,2691,65366,1400,12446,12542,12443,65438,12538,9393,7805,652,12436,12532, +119,7811,12633,12431,12527,65436,12632,12430,12526,13143,12316,65076,1608, +65262,1572,65158,13277,9446,373,7813,7815,7817,12433,8472,12529,12638,12637, +7809,9702,9675,9689,12302,65091,12303,65092,9671,9672,9663,9661,9667,9665, +12310,12311,9657,9655,9643,9786,9633,9734,9743,12312,12313,9653,9651,12432, +12528,12639,65367,12434,12530,65382,8361,65510,3623,9394,7832,695,653,447,120, +829,12562,9447,7821,7819,1389,958,65368,9395,739,121,13134,2479,253,2351, +12626,2735,2607,12420,12516,65428,12625,3662,12419,12515,65388,1123,9448,375, +255,7823,7925,1610,1746,64431,65266,1574,65162,65163,65164,65267,65268,64733, +64600,64660,1745,12630,165,65509,12629,12678,1450,1450,1099,1273,12673,12675, +12674,1434,7923,436,7927,1397,1111,12642,9775,1410,65369,1497,64313,64313, +1497,1522,64287,12424,12681,12520,65430,12635,12423,12519,65390,1011,12680, +12679,3618,3597,9396,890,837,422,7833,696,7929,654,12422,12684,12518,65429, +12640,1131,1133,1127,1129,12421,12517,65389,12683,12682,2527,2399,122,1382, +378,2395,2651,1592,65222,65223,12374,65224,1586,65200,12470,1429,1428,1432, +1494,64310,64310,1494,12567,382,9449,7825,657,380,380,7827,1079,1177,1247, +12380,12476,48,1632,2534,2406,2790,2662,1632,8320,65296,63280,1776,8304,3664, +65279,8204,8203,950,12563,1386,1218,1078,1175,1245,12376,12472,1454,7829, +65370,12382,12478,9397,656,438,12378,12474, +}; + +static const unsigned short agl_dup_offsets[] = { +32,0,124,3,160,6,173,9,175,12,181,15,183,18,266,21,267,24,272,27,273,30, +278,33,279,36,288,39,289,42,290,45,291,48,304,51,310,54,311,57,315,60,316,63, +319,66,320,69,325,72,326,75,329,78,336,81,337,84,342,87,343,90,354,93,355,96, +368,99,369,102,379,105,380,108,383,111,510,114,511,117,700,120,701,123, +732,126,768,129,769,132,771,135,777,138,803,141,901,144,962,147,977,150, +978,153,981,156,982,159,1025,162,1026,165,1027,168,1028,171,1029,174,1030,177, +1031,180,1032,183,1033,186,1034,189,1035,192,1036,195,1038,198,1039,201, +1040,204,1041,207,1042,210,1043,213,1044,216,1045,219,1046,222,1047,225, +1048,228,1049,231,1050,234,1051,237,1052,240,1053,243,1054,246,1055,249, +1056,252,1057,255,1058,258,1059,261,1060,264,1061,267,1062,270,1063,273, +1064,276,1065,279,1066,282,1067,285,1068,288,1069,291,1070,294,1071,297, +1072,300,1073,303,1074,306,1075,309,1076,312,1077,315,1078,318,1079,321, +1080,324,1081,327,1082,330,1083,333,1084,336,1085,339,1086,342,1087,345, +1088,348,1089,351,1090,354,1091,357,1092,360,1093,363,1094,366,1095,369, +1096,372,1097,375,1098,378,1099,381,1100,384,1101,387,1102,390,1103,393, +1105,396,1106,399,1107,402,1108,405,1109,408,1110,411,1111,414,1112,417, +1113,420,1114,423,1115,426,1116,429,1118,432,1119,435,1122,438,1123,441, +1138,444,1139,447,1140,450,1141,453,1168,456,1169,459,1241,462,1425,465, +1430,470,1431,473,1435,476,1443,479,1444,482,1445,485,1446,488,1447,491, +1450,494,1456,497,1457,508,1458,518,1459,528,1460,538,1461,548,1462,558, +1463,568,1464,578,1465,596,1467,606,1468,616,1469,620,1470,624,1471,627, +1472,631,1473,634,1474,637,1475,640,1488,643,1489,647,1490,651,1491,655, +1492,679,1493,683,1494,687,1495,691,1496,695,1497,699,1498,703,1499,711, +1500,715,1501,723,1502,727,1503,731,1504,735,1505,739,1506,743,1507,747, +1508,751,1509,755,1510,759,1511,763,1512,787,1513,811,1514,815,1520,819, +1521,822,1522,825,1548,828,1563,831,1567,834,1569,837,1570,848,1571,851, +1572,854,1573,857,1574,860,1575,863,1576,866,1577,869,1578,872,1579,875, +1580,878,1581,881,1582,884,1583,887,1584,890,1585,893,1586,897,1587,900, +1588,903,1589,906,1590,909,1591,912,1592,915,1593,918,1594,921,1600,924, +1601,929,1602,932,1603,935,1604,938,1605,941,1606,944,1607,947,1608,950, +1609,953,1610,956,1611,959,1612,962,1613,966,1614,969,1615,973,1616,977, +1617,980,1618,984,1632,987,1633,991,1634,995,1635,999,1636,1003,1637,1007, +1638,1011,1639,1015,1640,1019,1641,1023,1642,1027,1643,1030,1644,1033, +1645,1036,1657,1040,1662,1043,1670,1046,1672,1049,1681,1052,1688,1055, +1700,1058,1711,1061,1722,1064,1729,1067,1746,1070,8204,1073,8213,1076, +8215,1079,8219,1082,8229,1085,8353,1088,8356,1091,8362,1094,8364,1099, +8453,1102,8467,1105,8470,1108,8486,1111,8616,1114,8656,1117,8658,1120, +8660,1123,8704,1126,8707,1129,8710,1132,8711,1135,8713,1138,8735,1141, +8764,1144,8773,1147,8834,1150,8835,1153,8838,1156,8839,1159,8853,1162, +8855,1165,8976,1168,8992,1171,8993,1174,9617,1177,9618,1180,9619,1183, +9632,1186,9633,1189,9642,1192,9643,1195,9644,1198,9650,1201,9658,1204, +9660,1207,9668,1210,9675,1213,9679,1216,9688,1219,9689,1222,9702,1225, +9786,1228,9787,1231,9788,1234,9792,1237,9794,1240,9824,1243,9827,1246, +9829,1249,9835,1252,64287,1255,64298,1260,64299,1264,64300,1268,64301,1271, +64305,1274,64306,1277,64307,1280,64308,1283,64309,1286,64310,1291,64312,1294, +64313,1297,64314,1300,64315,1303,64316,1306,64318,1309,64320,1312,64321,1315, +64324,1318,64326,1321,64327,1324,64329,1327,64330,1330,64331,1334,64380,1338, +65247,1341,65255,1345,65258,1348,65267,1351,65268,1354, +}; + +static const char *agl_dup_names[] = { +"space","spacehackarabic",0,"bar","verticalbar",0,"nbspace", +"nonbreakingspace",0,"sfthyphen","softhyphen",0,"macron","overscore",0,"mu", +"mu1",0,"middot","periodcentered",0,"Cdot","Cdotaccent",0,"cdot","cdotaccent", +0,"Dcroat","Dslash",0,"dcroat","dmacron",0,"Edot","Edotaccent",0,"edot", +"edotaccent",0,"Gdot","Gdotaccent",0,"gdot","gdotaccent",0,"Gcedilla", +"Gcommaaccent",0,"gcedilla","gcommaaccent",0,"Idot","Idotaccent",0,"Kcedilla", +"Kcommaaccent",0,"kcedilla","kcommaaccent",0,"Lcedilla","Lcommaaccent",0, +"lcedilla","lcommaaccent",0,"Ldot","Ldotaccent",0,"ldot","ldotaccent",0, +"Ncedilla","Ncommaaccent",0,"ncedilla","ncommaaccent",0,"napostrophe", +"quoterightn",0,"Odblacute","Ohungarumlaut",0,"odblacute","ohungarumlaut",0, +"Rcedilla","Rcommaaccent",0,"rcedilla","rcommaaccent",0,"Tcedilla", +"Tcommaaccent",0,"tcedilla","tcommaaccent",0,"Udblacute","Uhungarumlaut",0, +"udblacute","uhungarumlaut",0,"Zdot","Zdotaccent",0,"zdot","zdotaccent",0, +"longs","slong",0,"Oslashacute","Ostrokeacute",0,"oslashacute","ostrokeacute", +0,"afii57929","apostrophemod",0,"afii64937","commareversedmod",0,"ilde", +"tilde",0,"gravecmb","gravecomb",0,"acutecmb","acutecomb",0,"tildecmb", +"tildecomb",0,"hookabovecomb","hookcmb",0,"dotbelowcmb","dotbelowcomb",0, +"dialytikatonos","dieresistonos",0,"sigma1","sigmafinal",0,"theta1", +"thetasymbolgreek",0,"Upsilon1","Upsilonhooksymbol",0,"phi1","phisymbolgreek", +0,"omega1","pisymbolgreek",0,"Iocyrillic","afii10023",0,"Djecyrillic", +"afii10051",0,"Gjecyrillic","afii10052",0,"Ecyrillic","afii10053",0, +"Dzecyrillic","afii10054",0,"Icyrillic","afii10055",0,"Yicyrillic", +"afii10056",0,"Jecyrillic","afii10057",0,"Ljecyrillic","afii10058",0, +"Njecyrillic","afii10059",0,"Tshecyrillic","afii10060",0,"Kjecyrillic", +"afii10061",0,"Ushortcyrillic","afii10062",0,"Dzhecyrillic","afii10145",0, +"Acyrillic","afii10017",0,"Becyrillic","afii10018",0,"Vecyrillic","afii10019", +0,"Gecyrillic","afii10020",0,"Decyrillic","afii10021",0,"Iecyrillic", +"afii10022",0,"Zhecyrillic","afii10024",0,"Zecyrillic","afii10025",0, +"Iicyrillic","afii10026",0,"Iishortcyrillic","afii10027",0,"Kacyrillic", +"afii10028",0,"Elcyrillic","afii10029",0,"Emcyrillic","afii10030",0, +"Encyrillic","afii10031",0,"Ocyrillic","afii10032",0,"Pecyrillic","afii10033", +0,"Ercyrillic","afii10034",0,"Escyrillic","afii10035",0,"Tecyrillic", +"afii10036",0,"Ucyrillic","afii10037",0,"Efcyrillic","afii10038",0, +"Khacyrillic","afii10039",0,"Tsecyrillic","afii10040",0,"Checyrillic", +"afii10041",0,"Shacyrillic","afii10042",0,"Shchacyrillic","afii10043",0, +"Hardsigncyrillic","afii10044",0,"Yericyrillic","afii10045",0, +"Softsigncyrillic","afii10046",0,"Ereversedcyrillic","afii10047",0, +"IUcyrillic","afii10048",0,"IAcyrillic","afii10049",0,"acyrillic","afii10065", +0,"afii10066","becyrillic",0,"afii10067","vecyrillic",0,"afii10068", +"gecyrillic",0,"afii10069","decyrillic",0,"afii10070","iecyrillic",0, +"afii10072","zhecyrillic",0,"afii10073","zecyrillic",0,"afii10074", +"iicyrillic",0,"afii10075","iishortcyrillic",0,"afii10076","kacyrillic",0, +"afii10077","elcyrillic",0,"afii10078","emcyrillic",0,"afii10079", +"encyrillic",0,"afii10080","ocyrillic",0,"afii10081","pecyrillic",0, +"afii10082","ercyrillic",0,"afii10083","escyrillic",0,"afii10084", +"tecyrillic",0,"afii10085","ucyrillic",0,"afii10086","efcyrillic",0, +"afii10087","khacyrillic",0,"afii10088","tsecyrillic",0,"afii10089", +"checyrillic",0,"afii10090","shacyrillic",0,"afii10091","shchacyrillic",0, +"afii10092","hardsigncyrillic",0,"afii10093","yericyrillic",0,"afii10094", +"softsigncyrillic",0,"afii10095","ereversedcyrillic",0,"afii10096", +"iucyrillic",0,"afii10097","iacyrillic",0,"afii10071","iocyrillic",0, +"afii10099","djecyrillic",0,"afii10100","gjecyrillic",0,"afii10101", +"ecyrillic",0,"afii10102","dzecyrillic",0,"afii10103","icyrillic",0, +"afii10104","yicyrillic",0,"afii10105","jecyrillic",0,"afii10106", +"ljecyrillic",0,"afii10107","njecyrillic",0,"afii10108","tshecyrillic",0, +"afii10109","kjecyrillic",0,"afii10110","ushortcyrillic",0,"afii10193", +"dzhecyrillic",0,"Yatcyrillic","afii10146",0,"afii10194","yatcyrillic",0, +"Fitacyrillic","afii10147",0,"afii10195","fitacyrillic",0,"Izhitsacyrillic", +"afii10148",0,"afii10196","izhitsacyrillic",0,"Gheupturncyrillic","afii10050", +0,"afii10098","gheupturncyrillic",0,"afii10846","schwacyrillic",0, +"etnahtafoukhhebrew","etnahtafoukhlefthebrew","etnahtahebrew", +"etnahtalefthebrew",0,"tipehahebrew","tipehalefthebrew",0,"reviahebrew", +"reviamugrashhebrew",0,"tevirhebrew","tevirlefthebrew",0,"munahhebrew", +"munahlefthebrew",0,"mahapakhhebrew","mahapakhlefthebrew",0,"merkhahebrew", +"merkhalefthebrew",0,"merkhakefulahebrew","merkhakefulalefthebrew",0, +"dargahebrew","dargalefthebrew",0,"yerahbenyomohebrew", +"yerahbenyomolefthebrew",0,"afii57799","sheva","sheva115","sheva15","sheva22", +"sheva2e","shevahebrew","shevanarrowhebrew","shevaquarterhebrew", +"shevawidehebrew",0,"afii57801","hatafsegol","hatafsegol17","hatafsegol24", +"hatafsegol30","hatafsegolhebrew","hatafsegolnarrowhebrew", +"hatafsegolquarterhebrew","hatafsegolwidehebrew",0,"afii57800","hatafpatah", +"hatafpatah16","hatafpatah23","hatafpatah2f","hatafpatahhebrew", +"hatafpatahnarrowhebrew","hatafpatahquarterhebrew","hatafpatahwidehebrew",0, +"afii57802","hatafqamats","hatafqamats1b","hatafqamats28","hatafqamats34", +"hatafqamatshebrew","hatafqamatsnarrowhebrew","hatafqamatsquarterhebrew", +"hatafqamatswidehebrew",0,"afii57793","hiriq","hiriq14","hiriq21","hiriq2d", +"hiriqhebrew","hiriqnarrowhebrew","hiriqquarterhebrew","hiriqwidehebrew",0, +"afii57794","tsere","tsere12","tsere1e","tsere2b","tserehebrew", +"tserenarrowhebrew","tserequarterhebrew","tserewidehebrew",0,"afii57795", +"segol","segol13","segol1f","segol2c","segolhebrew","segolnarrowhebrew", +"segolquarterhebrew","segolwidehebrew",0,"afii57798","patah","patah11", +"patah1d","patah2a","patahhebrew","patahnarrowhebrew","patahquarterhebrew", +"patahwidehebrew",0,"afii57797","qamats","qamats10","qamats1a","qamats1c", +"qamats27","qamats29","qamats33","qamatsde","qamatshebrew", +"qamatsnarrowhebrew","qamatsqatanhebrew","qamatsqatannarrowhebrew", +"qamatsqatanquarterhebrew","qamatsqatanwidehebrew","qamatsquarterhebrew", +"qamatswidehebrew",0,"afii57806","holam","holam19","holam26","holam32", +"holamhebrew","holamnarrowhebrew","holamquarterhebrew","holamwidehebrew",0, +"afii57796","qubuts","qubuts18","qubuts25","qubuts31","qubutshebrew", +"qubutsnarrowhebrew","qubutsquarterhebrew","qubutswidehebrew",0,"afii57807", +"dagesh","dageshhebrew",0,"afii57839","siluqhebrew","siluqlefthebrew",0, +"afii57645","maqafhebrew",0,"afii57841","rafe","rafehebrew",0,"afii57842", +"paseqhebrew",0,"afii57804","shindothebrew",0,"afii57803","sindothebrew",0, +"afii57658","sofpasuqhebrew",0,"afii57664","alef","alefhebrew",0,"afii57665", +"bet","bethebrew",0,"afii57666","gimel","gimelhebrew",0,"afii57667","dalet", +"dalethatafpatah","dalethatafpatahhebrew","dalethatafsegol", +"dalethatafsegolhebrew","dalethebrew","dalethiriq","dalethiriqhebrew", +"daletholam","daletholamhebrew","daletpatah","daletpatahhebrew","daletqamats", +"daletqamatshebrew","daletqubuts","daletqubutshebrew","daletsegol", +"daletsegolhebrew","daletsheva","daletshevahebrew","dalettsere", +"dalettserehebrew",0,"afii57668","he","hehebrew",0,"afii57669","vav", +"vavhebrew",0,"afii57670","zayin","zayinhebrew",0,"afii57671","het", +"hethebrew",0,"afii57672","tet","tethebrew",0,"afii57673","yod","yodhebrew",0, +"afii57674","finalkaf","finalkafhebrew","finalkafqamats", +"finalkafqamatshebrew","finalkafsheva","finalkafshevahebrew",0,"afii57675", +"kaf","kafhebrew",0,"afii57676","lamed","lamedhebrew","lamedholam", +"lamedholamdagesh","lamedholamdageshhebrew","lamedholamhebrew",0,"afii57677", +"finalmem","finalmemhebrew",0,"afii57678","mem","memhebrew",0,"afii57679", +"finalnun","finalnunhebrew",0,"afii57680","nun","nunhebrew",0,"afii57681", +"samekh","samekhhebrew",0,"afii57682","ayin","ayinhebrew",0,"afii57683", +"finalpe","finalpehebrew",0,"afii57684","pe","pehebrew",0,"afii57685", +"finaltsadi","finaltsadihebrew",0,"afii57686","tsadi","tsadihebrew",0, +"afii57687","qof","qofhatafpatah","qofhatafpatahhebrew","qofhatafsegol", +"qofhatafsegolhebrew","qofhebrew","qofhiriq","qofhiriqhebrew","qofholam", +"qofholamhebrew","qofpatah","qofpatahhebrew","qofqamats","qofqamatshebrew", +"qofqubuts","qofqubutshebrew","qofsegol","qofsegolhebrew","qofsheva", +"qofshevahebrew","qoftsere","qoftserehebrew",0,"afii57688","resh", +"reshhatafpatah","reshhatafpatahhebrew","reshhatafsegol", +"reshhatafsegolhebrew","reshhebrew","reshhiriq","reshhiriqhebrew","reshholam", +"reshholamhebrew","reshpatah","reshpatahhebrew","reshqamats", +"reshqamatshebrew","reshqubuts","reshqubutshebrew","reshsegol", +"reshsegolhebrew","reshsheva","reshshevahebrew","reshtsere","reshtserehebrew", +0,"afii57689","shin","shinhebrew",0,"afii57690","tav","tavhebrew",0, +"afii57716","vavvavhebrew",0,"afii57717","vavyodhebrew",0,"afii57718", +"yodyodhebrew",0,"afii57388","commaarabic",0,"afii57403","semicolonarabic",0, +"afii57407","questionarabic",0,"afii57409","hamzaarabic","hamzadammaarabic", +"hamzadammatanarabic","hamzafathaarabic","hamzafathatanarabic", +"hamzalowarabic","hamzalowkasraarabic","hamzalowkasratanarabic", +"hamzasukunarabic",0,"afii57410","alefmaddaabovearabic",0,"afii57411", +"alefhamzaabovearabic",0,"afii57412","wawhamzaabovearabic",0,"afii57413", +"alefhamzabelowarabic",0,"afii57414","yehhamzaabovearabic",0,"afii57415", +"alefarabic",0,"afii57416","beharabic",0,"afii57417","tehmarbutaarabic",0, +"afii57418","teharabic",0,"afii57419","theharabic",0,"afii57420","jeemarabic", +0,"afii57421","haharabic",0,"afii57422","khaharabic",0,"afii57423", +"dalarabic",0,"afii57424","thalarabic",0,"afii57425","reharabic", +"rehyehaleflamarabic",0,"afii57426","zainarabic",0,"afii57427","seenarabic",0, +"afii57428","sheenarabic",0,"afii57429","sadarabic",0,"afii57430","dadarabic", +0,"afii57431","taharabic",0,"afii57432","zaharabic",0,"afii57433","ainarabic", +0,"afii57434","ghainarabic",0,"afii57440","kashidaautoarabic", +"kashidaautonosidebearingarabic","tatweelarabic",0,"afii57441","feharabic",0, +"afii57442","qafarabic",0,"afii57443","kafarabic",0,"afii57444","lamarabic",0, +"afii57445","meemarabic",0,"afii57446","noonarabic",0,"afii57470","heharabic", +0,"afii57448","wawarabic",0,"afii57449","alefmaksuraarabic",0,"afii57450", +"yeharabic",0,"afii57451","fathatanarabic",0,"afii57452", +"dammatanaltonearabic","dammatanarabic",0,"afii57453","kasratanarabic",0, +"afii57454","fathaarabic","fathalowarabic",0,"afii57455","dammaarabic", +"dammalowarabic",0,"afii57456","kasraarabic",0,"afii57457","shaddaarabic", +"shaddafathatanarabic",0,"afii57458","sukunarabic",0,"afii57392","zeroarabic", +"zerohackarabic",0,"afii57393","onearabic","onehackarabic",0,"afii57394", +"twoarabic","twohackarabic",0,"afii57395","threearabic","threehackarabic",0, +"afii57396","fourarabic","fourhackarabic",0,"afii57397","fivearabic", +"fivehackarabic",0,"afii57398","sixarabic","sixhackarabic",0,"afii57399", +"sevenarabic","sevenhackarabic",0,"afii57400","eightarabic","eighthackarabic", +0,"afii57401","ninearabic","ninehackarabic",0,"afii57381","percentarabic",0, +"decimalseparatorarabic","decimalseparatorpersian",0, +"thousandsseparatorarabic","thousandsseparatorpersian",0,"afii63167", +"asteriskaltonearabic","asteriskarabic",0,"afii57511","tteharabic",0, +"afii57506","peharabic",0,"afii57507","tcheharabic",0,"afii57512", +"ddalarabic",0,"afii57513","rreharabic",0,"afii57508","jeharabic",0, +"afii57505","veharabic",0,"afii57509","gafarabic",0,"afii57514", +"noonghunnaarabic",0,"haaltonearabic","hehaltonearabic",0,"afii57519", +"yehbarreearabic",0,"afii61664","zerowidthnonjoiner",0,"afii00208", +"horizontalbar",0,"dbllowline","underscoredbl",0,"quoteleftreversed", +"quotereversed",0,"twodotenleader","twodotleader",0,"colonmonetary", +"colonsign",0,"afii08941","lira",0,"afii57636","newsheqelsign","sheqel", +"sheqelhebrew",0,"Euro","euro",0,"afii61248","careof",0,"afii61289","lsquare", +0,"afii61352","numero",0,"Ohm","Omega",0,"arrowupdnbse","arrowupdownbase",0, +"arrowdblleft","arrowleftdbl",0,"arrowdblright","dblarrowright",0, +"arrowdblboth","dblarrowleft",0,"forall","universal",0,"existential", +"thereexists",0,"Delta","increment",0,"gradient","nabla",0,"notelement", +"notelementof",0,"orthogonal","rightangle",0,"similar","tildeoperator",0, +"approximatelyequal","congruent",0,"propersubset","subset",0,"propersuperset", +"superset",0,"reflexsubset","subsetorequal",0,"reflexsuperset", +"supersetorequal",0,"circleplus","pluscircle",0,"circlemultiply", +"timescircle",0,"logicalnotreversed","revlogicalnot",0,"integraltop", +"integraltp",0,"integralbottom","integralbt",0,"ltshade","shadelight",0, +"shade","shademedium",0,"dkshade","shadedark",0,"blacksquare","filledbox",0, +"H22073","whitesquare",0,"H18543","blacksmallsquare",0,"H18551", +"whitesmallsquare",0,"blackrectangle","filledrect",0, +"blackuppointingtriangle","triagup",0,"blackrightpointingpointer","triagrt",0, +"blackdownpointingtriangle","triagdn",0,"blackleftpointingpointer","triaglf", +0,"circle","whitecircle",0,"H18533","blackcircle",0,"bulletinverse", +"invbullet",0,"invcircle","whitecircleinverse",0,"openbullet","whitebullet",0, +"smileface","whitesmilingface",0,"blacksmilingface","invsmileface",0, +"compass","sun",0,"female","venus",0,"male","mars",0,"spade","spadesuitblack", +0,"club","clubsuitblack",0,"heart","heartsuitblack",0,"eighthnotebeamed", +"musicalnotedbl",0,"afii57705","doubleyodpatah","doubleyodpatahhebrew", +"yodyodpatahhebrew",0,"afii57694","shinshindot","shinshindothebrew",0, +"afii57695","shinsindot","shinsindothebrew",0,"shindageshshindot", +"shindageshshindothebrew",0,"shindageshsindot","shindageshsindothebrew",0, +"betdagesh","betdageshhebrew",0,"gimeldagesh","gimeldageshhebrew",0, +"daletdagesh","daletdageshhebrew",0,"hedagesh","hedageshhebrew",0,"afii57723", +"vavdagesh","vavdagesh65","vavdageshhebrew",0,"zayindagesh", +"zayindageshhebrew",0,"tetdagesh","tetdageshhebrew",0,"yoddagesh", +"yoddageshhebrew",0,"finalkafdagesh","finalkafdageshhebrew",0,"kafdagesh", +"kafdageshhebrew",0,"lameddagesh","lameddageshhebrew",0,"memdagesh", +"memdageshhebrew",0,"nundagesh","nundageshhebrew",0,"samekhdagesh", +"samekhdageshhebrew",0,"pedagesh","pedageshhebrew",0,"tsadidagesh", +"tsadidageshhebrew",0,"qofdagesh","qofdageshhebrew",0,"shindagesh", +"shindageshhebrew",0,"tavdages","tavdagesh","tavdageshhebrew",0,"afii57700", +"vavholam","vavholamhebrew",0,"tchehinitialarabic","tchehmeeminitialarabic",0, +"laminitialarabic","lammeemjeeminitialarabic","lammeemkhahinitialarabic",0, +"noonhehinitialarabic","nooninitialarabic",0,"hehfinalalttwoarabic", +"hehfinalarabic",0,"alefmaksurainitialarabic","yehinitialarabic",0, +"alefmaksuramedialarabic","yehmedialarabic",0, +}; diff --git a/contrib/media/updf/pdf/mupdf.h b/contrib/media/updf/pdf/mupdf.h new file mode 100644 index 0000000000..6870edfc6f --- /dev/null +++ b/contrib/media/updf/pdf/mupdf.h @@ -0,0 +1,493 @@ +#ifndef _MUPDF_H_ +#define _MUPDF_H_ + +#ifndef _FITZ_H_ +#error "fitz.h must be included before mupdf.h" +#endif + +typedef struct pdf_xref_s pdf_xref; + +/* + * tokenizer and low-level object parser + */ + +enum +{ + PDF_TOK_ERROR, PDF_TOK_EOF, + PDF_TOK_OPEN_ARRAY, PDF_TOK_CLOSE_ARRAY, + PDF_TOK_OPEN_DICT, PDF_TOK_CLOSE_DICT, + PDF_TOK_OPEN_BRACE, PDF_TOK_CLOSE_BRACE, + PDF_TOK_NAME, PDF_TOK_INT, PDF_TOK_REAL, PDF_TOK_STRING, PDF_TOK_KEYWORD, + PDF_TOK_R, PDF_TOK_TRUE, PDF_TOK_FALSE, PDF_TOK_NULL, + PDF_TOK_OBJ, PDF_TOK_ENDOBJ, + PDF_TOK_STREAM, PDF_TOK_ENDSTREAM, + PDF_TOK_XREF, PDF_TOK_TRAILER, PDF_TOK_STARTXREF, + PDF_NUM_TOKENS +}; + +fz_error pdf_lex(int *tok, fz_stream *f, char *buf, int n, int *len); + +fz_error pdf_parse_array(fz_obj **op, pdf_xref *xref, fz_stream *f, char *buf, int cap); +fz_error pdf_parse_dict(fz_obj **op, pdf_xref *xref, fz_stream *f, char *buf, int cap); +fz_error pdf_parse_stm_obj(fz_obj **op, pdf_xref *xref, fz_stream *f, char *buf, int cap); +fz_error pdf_parse_ind_obj(fz_obj **op, pdf_xref *xref, fz_stream *f, char *buf, int cap, int *num, int *gen, int *stm_ofs); + +fz_rect pdf_to_rect(fz_obj *array); +fz_matrix pdf_to_matrix(fz_obj *array); +char *pdf_to_utf8(fz_obj *src); +unsigned short *pdf_to_ucs2(fz_obj *src); +fz_obj *pdf_to_utf8_name(fz_obj *src); +char *pdf_from_ucs2(unsigned short *str); + +/* + * xref and object / stream api + */ + +typedef struct pdf_xref_entry_s pdf_xref_entry; +typedef struct pdf_crypt_s pdf_crypt; + +struct pdf_xref_entry_s +{ + int ofs; /* file offset / objstm object number */ + int gen; /* generation / objstm index */ + int stm_ofs; /* on-disk stream */ + fz_obj *obj; /* stored/cached object */ + int type; /* 0=unset (f)ree i(n)use (o)bjstm */ +}; + +struct pdf_xref_s +{ + fz_stream *file; + int version; + int startxref; + int file_size; + pdf_crypt *crypt; + fz_obj *trailer; + + int len; + pdf_xref_entry *table; + + int page_len; + int page_cap; + fz_obj **page_objs; + fz_obj **page_refs; + + struct pdf_store_s *store; + + char scratch[65536]; +}; + +fz_obj *pdf_resolve_indirect(fz_obj *ref); +fz_error pdf_cache_object(pdf_xref *, int num, int gen); +fz_error pdf_load_object(fz_obj **objp, pdf_xref *, int num, int gen); +void pdf_update_object( pdf_xref *xref, int num, int gen, fz_obj *newobj); + +int pdf_is_stream(pdf_xref *xref, int num, int gen); +fz_stream *pdf_open_inline_stream(fz_stream *chain, pdf_xref *xref, fz_obj *stmobj, int length); +fz_error pdf_load_raw_stream(fz_buffer **bufp, pdf_xref *xref, int num, int gen); +fz_error pdf_load_stream(fz_buffer **bufp, pdf_xref *xref, int num, int gen); +fz_error pdf_open_raw_stream(fz_stream **stmp, pdf_xref *, int num, int gen); +fz_error pdf_open_stream(fz_stream **stmp, pdf_xref *, int num, int gen); +fz_error pdf_open_stream_at(fz_stream **stmp, pdf_xref *xref, int num, int gen, fz_obj *dict, int stm_ofs); + +fz_error pdf_open_xref_with_stream(pdf_xref **xrefp, fz_stream *file, char *password); +fz_error pdf_open_xref(pdf_xref **xrefp, const char *filename, char *password); +void pdf_free_xref(pdf_xref *); + +/* private */ +fz_error pdf_repair_xref(pdf_xref *xref, char *buf, int bufsize); +fz_error pdf_repair_obj_stms(pdf_xref *xref); +void pdf_debug_xref(pdf_xref *); +void pdf_resize_xref(pdf_xref *xref, int newcap); + +/* + * Encryption + */ + +enum +{ + PDF_PERM_PRINT = 1 << 2, + PDF_PERM_CHANGE = 1 << 3, + PDF_PERM_COPY = 1 << 4, + PDF_PERM_NOTES = 1 << 5, + PDF_PERM_FILL_FORM = 1 << 8, + PDF_PERM_ACCESSIBILITY = 1 << 9, + PDF_PERM_ASSEMBLE = 1 << 10, + PDF_PERM_HIGH_RES_PRINT = 1 << 11, + PDF_DEFAULT_PERM_FLAGS = 0xfffc +}; + +fz_error pdf_new_crypt(pdf_crypt **cp, fz_obj *enc, fz_obj *id); +void pdf_free_crypt(pdf_crypt *crypt); + +void pdf_crypt_obj(pdf_crypt *crypt, fz_obj *obj, int num, int gen); +fz_stream *pdf_open_crypt(fz_stream *chain, pdf_crypt *crypt, int num, int gen); +fz_stream *pdf_open_crypt_with_filter(fz_stream *chain, pdf_crypt *crypt, char *name, int num, int gen); + +int pdf_needs_password(pdf_xref *xref); +int pdf_authenticate_password(pdf_xref *xref, char *pw); +int pdf_has_permission(pdf_xref *xref, int p); + +int pdf_get_crypt_revision(pdf_xref *xref); +char *pdf_get_crypt_method(pdf_xref *xref); +int pdf_get_crypt_length(pdf_xref *xref); +unsigned char *pdf_get_crypt_key(pdf_xref *xref); + +void pdf_debug_crypt(pdf_crypt *crypt); + +/* + * Resource store + */ + +typedef struct pdf_store_s pdf_store; + +pdf_store *pdf_new_store(void); +void pdf_free_store(pdf_store *store); +void pdf_debug_store(pdf_store *store); + +void pdf_store_item(pdf_store *store, void *keepfn, void *dropfn, fz_obj *key, void *val); +void *pdf_find_item(pdf_store *store, void *dropfn, fz_obj *key); +void pdf_remove_item(pdf_store *store, void *dropfn, fz_obj *key); +void pdf_age_store(pdf_store *store, int maxage); + +/* + * Functions, Colorspaces, Shadings and Images + */ + +typedef struct pdf_function_s pdf_function; + +fz_error pdf_load_function(pdf_function **func, pdf_xref *xref, fz_obj *ref); +void pdf_eval_function(pdf_function *func, float *in, int inlen, float *out, int outlen); +pdf_function *pdf_keep_function(pdf_function *func); +void pdf_drop_function(pdf_function *func); + +fz_error pdf_load_colorspace(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj); +fz_pixmap *pdf_expand_indexed_pixmap(fz_pixmap *src); + +fz_error pdf_load_shading(fz_shade **shadep, pdf_xref *xref, fz_obj *obj); + +fz_error pdf_load_inline_image(fz_pixmap **imgp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *file); +fz_error pdf_load_image(fz_pixmap **imgp, pdf_xref *xref, fz_obj *obj); +int pdf_is_jpx_image(fz_obj *dict); + +/* + * Pattern + */ + +typedef struct pdf_pattern_s pdf_pattern; + +struct pdf_pattern_s +{ + int refs; + int ismask; + float xstep; + float ystep; + fz_matrix matrix; + fz_rect bbox; + fz_obj *resources; + fz_buffer *contents; +}; + +fz_error pdf_load_pattern(pdf_pattern **patp, pdf_xref *xref, fz_obj *obj); +pdf_pattern *pdf_keep_pattern(pdf_pattern *pat); +void pdf_drop_pattern(pdf_pattern *pat); + +/* + * XObject + */ + +typedef struct pdf_xobject_s pdf_xobject; + +struct pdf_xobject_s +{ + int refs; + fz_matrix matrix; + fz_rect bbox; + int isolated; + int knockout; + int transparency; + fz_colorspace *colorspace; + fz_obj *resources; + fz_buffer *contents; +}; + +fz_error pdf_load_xobject(pdf_xobject **xobjp, pdf_xref *xref, fz_obj *obj); +pdf_xobject *pdf_keep_xobject(pdf_xobject *xobj); +void pdf_drop_xobject(pdf_xobject *xobj); + +/* + * CMap + */ + +typedef struct pdf_cmap_s pdf_cmap; +typedef struct pdf_range_s pdf_range; + +enum { PDF_CMAP_SINGLE, PDF_CMAP_RANGE, PDF_CMAP_TABLE, PDF_CMAP_MULTI }; + +struct pdf_range_s +{ + unsigned short low; + /* Next, we pack 2 fields into the same unsigned short. Top 14 bits + * are the extent, bottom 2 bits are flags: single, range, table, + * multi */ + unsigned short extent_flags; + unsigned short offset; /* range-delta or table-index */ +}; + +struct pdf_cmap_s +{ + int refs; + char cmap_name[32]; + + char usecmap_name[32]; + pdf_cmap *usecmap; + + int wmode; + + int codespace_len; + struct + { + unsigned short n; + unsigned short low; + unsigned short high; + } codespace[40]; + + int rlen, rcap; + pdf_range *ranges; + + int tlen, tcap; + unsigned short *table; +}; + +pdf_cmap *pdf_new_cmap(void); +pdf_cmap *pdf_keep_cmap(pdf_cmap *cmap); +void pdf_drop_cmap(pdf_cmap *cmap); + +void pdf_debug_cmap(pdf_cmap *cmap); +int pdf_get_wmode(pdf_cmap *cmap); +void pdf_set_wmode(pdf_cmap *cmap, int wmode); +void pdf_set_usecmap(pdf_cmap *cmap, pdf_cmap *usecmap); + +void pdf_add_codespace(pdf_cmap *cmap, int low, int high, int n); +void pdf_map_range_to_table(pdf_cmap *cmap, int low, int *map, int len); +void pdf_map_range_to_range(pdf_cmap *cmap, int srclo, int srchi, int dstlo); +void pdf_map_one_to_many(pdf_cmap *cmap, int one, int *many, int len); +void pdf_sort_cmap(pdf_cmap *cmap); + +int pdf_lookup_cmap(pdf_cmap *cmap, int cpt); +int pdf_lookup_cmap_full(pdf_cmap *cmap, int cpt, int *out); +unsigned char *pdf_decode_cmap(pdf_cmap *cmap, unsigned char *s, int *cpt); + +pdf_cmap *pdf_new_identity_cmap(int wmode, int bytes); +fz_error pdf_parse_cmap(pdf_cmap **cmapp, fz_stream *file); +fz_error pdf_load_embedded_cmap(pdf_cmap **cmapp, pdf_xref *xref, fz_obj *ref); +fz_error pdf_load_system_cmap(pdf_cmap **cmapp, char *name); +pdf_cmap *pdf_find_builtin_cmap(char *cmap_name); + +/* + * Font + */ + +enum +{ + PDF_FD_FIXED_PITCH = 1 << 0, + PDF_FD_SERIF = 1 << 1, + PDF_FD_SYMBOLIC = 1 << 2, + PDF_FD_SCRIPT = 1 << 3, + PDF_FD_NONSYMBOLIC = 1 << 5, + PDF_FD_ITALIC = 1 << 6, + PDF_FD_ALL_CAP = 1 << 16, + PDF_FD_SMALL_CAP = 1 << 17, + PDF_FD_FORCE_BOLD = 1 << 18 +}; + +enum { PDF_ROS_CNS, PDF_ROS_GB, PDF_ROS_JAPAN, PDF_ROS_KOREA }; + +void pdf_load_encoding(char **estrings, char *encoding); +int pdf_lookup_agl(char *name); +const char **pdf_lookup_agl_duplicates(int ucs); + +extern const unsigned short pdf_doc_encoding[256]; +extern const char * const pdf_mac_roman[256]; +extern const char * const pdf_mac_expert[256]; +extern const char * const pdf_win_ansi[256]; +extern const char * const pdf_standard[256]; + +typedef struct pdf_font_desc_s pdf_font_desc; +typedef struct pdf_hmtx_s pdf_hmtx; +typedef struct pdf_vmtx_s pdf_vmtx; + +struct pdf_hmtx_s +{ + unsigned short lo; + unsigned short hi; + int w; /* type3 fonts can be big! */ +}; + +struct pdf_vmtx_s +{ + unsigned short lo; + unsigned short hi; + short x; + short y; + short w; +}; + +struct pdf_font_desc_s +{ + int refs; + + fz_font *font; + + /* FontDescriptor */ + int flags; + float italic_angle; + float ascent; + float descent; + float cap_height; + float x_height; + float missing_width; + + /* Encoding (CMap) */ + pdf_cmap *encoding; + pdf_cmap *to_ttf_cmap; + int cid_to_gid_len; + unsigned short *cid_to_gid; + + /* ToUnicode */ + pdf_cmap *to_unicode; + int cid_to_ucs_len; + unsigned short *cid_to_ucs; + + /* Metrics (given in the PDF file) */ + int wmode; + + int hmtx_len, hmtx_cap; + pdf_hmtx dhmtx; + pdf_hmtx *hmtx; + + int vmtx_len, vmtx_cap; + pdf_vmtx dvmtx; + pdf_vmtx *vmtx; + + int is_embedded; +}; + +void pdf_set_font_wmode(pdf_font_desc *font, int wmode); +void pdf_set_default_hmtx(pdf_font_desc *font, int w); +void pdf_set_default_vmtx(pdf_font_desc *font, int y, int w); +void pdf_add_hmtx(pdf_font_desc *font, int lo, int hi, int w); +void pdf_add_vmtx(pdf_font_desc *font, int lo, int hi, int x, int y, int w); +void pdf_end_hmtx(pdf_font_desc *font); +void pdf_end_vmtx(pdf_font_desc *font); +pdf_hmtx pdf_get_hmtx(pdf_font_desc *font, int cid); +pdf_vmtx pdf_get_vmtx(pdf_font_desc *font, int cid); + +fz_error pdf_load_to_unicode(pdf_font_desc *font, pdf_xref *xref, char **strings, char *collection, fz_obj *cmapstm); + +int pdf_font_cid_to_gid(pdf_font_desc *fontdesc, int cid); + +unsigned char *pdf_find_builtin_font(char *name, unsigned int *len); +unsigned char *pdf_find_substitute_font(int mono, int serif, int bold, int italic, unsigned int *len); +unsigned char *pdf_find_substitute_cjk_font(int ros, int serif, unsigned int *len); + +fz_error pdf_load_type3_font(pdf_font_desc **fontp, pdf_xref *xref, fz_obj *rdb, fz_obj *obj); +fz_error pdf_load_font(pdf_font_desc **fontp, pdf_xref *xref, fz_obj *rdb, fz_obj *obj); + +pdf_font_desc *pdf_new_font_desc(void); +pdf_font_desc *pdf_keep_font(pdf_font_desc *fontdesc); +void pdf_drop_font(pdf_font_desc *font); + +void pdf_debug_font(pdf_font_desc *fontdesc); + +/* + * Interactive features + */ + +typedef struct pdf_link_s pdf_link; +typedef struct pdf_annot_s pdf_annot; +typedef struct pdf_outline_s pdf_outline; + +typedef enum pdf_link_kind_e +{ + PDF_LINK_GOTO = 0, + PDF_LINK_URI, + PDF_LINK_LAUNCH, + PDF_LINK_NAMED, + PDF_LINK_ACTION, +} pdf_link_kind; + +struct pdf_link_s +{ + pdf_link_kind kind; + fz_rect rect; + fz_obj *dest; + pdf_link *next; +}; + +struct pdf_annot_s +{ + fz_obj *obj; + fz_rect rect; + pdf_xobject *ap; + fz_matrix matrix; + pdf_annot *next; +}; + +struct pdf_outline_s +{ + char *title; + pdf_link *link; + int count; + pdf_outline *child; + pdf_outline *next; +}; + +fz_obj *pdf_lookup_dest(pdf_xref *xref, fz_obj *needle); +fz_obj *pdf_lookup_name(pdf_xref *xref, char *which, fz_obj *needle); +fz_obj *pdf_load_name_tree(pdf_xref *xref, char *which); + +pdf_outline *pdf_load_outline(pdf_xref *xref); +void pdf_debug_outline(pdf_outline *outline, int level); +void pdf_free_outline(pdf_outline *outline); + +pdf_link *pdf_load_link(pdf_xref *xref, fz_obj *dict); +void pdf_load_links(pdf_link **, pdf_xref *, fz_obj *annots); +void pdf_free_link(pdf_link *link); + +void pdf_load_annots(pdf_annot **, pdf_xref *, fz_obj *annots); +void pdf_free_annot(pdf_annot *link); + +/* + * Page tree, pages and related objects + */ + +typedef struct pdf_page_s pdf_page; + +struct pdf_page_s +{ + fz_rect mediabox; + int rotate; + int transparency; + fz_obj *resources; + fz_buffer *contents; + pdf_link *links; + pdf_annot *annots; +}; + +fz_error pdf_load_page_tree(pdf_xref *xref); +int pdf_find_page_number(pdf_xref *xref, fz_obj *pageobj); +int pdf_count_pages(pdf_xref *xref); + +fz_error pdf_load_page(pdf_page **pagep, pdf_xref *xref, int number); +void pdf_free_page(pdf_page *page); + +/* + * Content stream parsing + */ + +fz_error pdf_run_page_with_usage(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matrix ctm, char *target); +fz_error pdf_run_page(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matrix ctm); +fz_error pdf_run_glyph(pdf_xref *xref, fz_obj *resources, fz_buffer *contents, fz_device *dev, fz_matrix ctm); + +#endif diff --git a/contrib/media/updf/pdf/pdf_annot.c b/contrib/media/updf/pdf/pdf_annot.c new file mode 100644 index 0000000000..2fc9d7bb9a --- /dev/null +++ b/contrib/media/updf/pdf/pdf_annot.c @@ -0,0 +1,234 @@ +#include "fitz.h" +#include "mupdf.h" + +void +pdf_free_link(pdf_link *link) +{ + if (link->next) + pdf_free_link(link->next); + if (link->dest) + fz_drop_obj(link->dest); + fz_free(link); +} + +static fz_obj * +resolve_dest(pdf_xref *xref, fz_obj *dest) +{ + if (fz_is_name(dest) || fz_is_string(dest)) + { + dest = pdf_lookup_dest(xref, dest); + return resolve_dest(xref, dest); + } + + else if (fz_is_array(dest)) + { + return dest; + } + + else if (fz_is_dict(dest)) + { + dest = fz_dict_gets(dest, "D"); + return resolve_dest(xref, dest); + } + + else if (fz_is_indirect(dest)) + return dest; + + return NULL; +} + +pdf_link * +pdf_load_link(pdf_xref *xref, fz_obj *dict) +{ + fz_obj *dest; + fz_obj *action; + fz_obj *obj; + fz_rect bbox; + pdf_link_kind kind; + + dest = NULL; + + obj = fz_dict_gets(dict, "Rect"); + if (obj) + bbox = pdf_to_rect(obj); + else + bbox = fz_empty_rect; + + obj = fz_dict_gets(dict, "Dest"); + if (obj) + { + kind = PDF_LINK_GOTO; + dest = resolve_dest(xref, obj); + } + + action = fz_dict_gets(dict, "A"); + + /* fall back to additional action button's down/up action */ + if (!action) + action = fz_dict_getsa(fz_dict_gets(dict, "AA"), "U", "D"); + + if (action) + { + obj = fz_dict_gets(action, "S"); + if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "GoTo")) + { + kind = PDF_LINK_GOTO; + dest = resolve_dest(xref, fz_dict_gets(action, "D")); + } + else if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "URI")) + { + kind = PDF_LINK_URI; + dest = fz_dict_gets(action, "URI"); + } + else if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "Launch")) + { + kind = PDF_LINK_LAUNCH; + dest = fz_dict_gets(action, "F"); + } + else if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "Named")) + { + kind = PDF_LINK_NAMED; + dest = fz_dict_gets(action, "N"); + } + else if (fz_is_name(obj) && (!strcmp(fz_to_name(obj), "GoToR"))) + { + kind = PDF_LINK_ACTION; + dest = action; + } + else + { + dest = NULL; + } + } + + if (dest) + { + pdf_link *link = fz_malloc(sizeof(pdf_link)); + link->kind = kind; + link->rect = bbox; + link->dest = fz_keep_obj(dest); + link->next = NULL; + return link; + } + + return NULL; +} + +void +pdf_load_links(pdf_link **linkp, pdf_xref *xref, fz_obj *annots) +{ + pdf_link *link, *head, *tail; + fz_obj *obj; + int i; + + head = tail = NULL; + link = NULL; + + for (i = 0; i < fz_array_len(annots); i++) + { + obj = fz_array_get(annots, i); + link = pdf_load_link(xref, obj); + if (link) + { + if (!head) + head = tail = link; + else + { + tail->next = link; + tail = link; + } + } + } + + *linkp = head; +} + +void +pdf_free_annot(pdf_annot *annot) +{ + if (annot->next) + pdf_free_annot(annot->next); + if (annot->ap) + pdf_drop_xobject(annot->ap); + if (annot->obj) + fz_drop_obj(annot->obj); + fz_free(annot); +} + +static void +pdf_transform_annot(pdf_annot *annot) +{ + fz_matrix matrix = annot->ap->matrix; + fz_rect bbox = annot->ap->bbox; + fz_rect rect = annot->rect; + float w, h, x, y; + + bbox = fz_transform_rect(matrix, bbox); + w = (rect.x1 - rect.x0) / (bbox.x1 - bbox.x0); + h = (rect.y1 - rect.y0) / (bbox.y1 - bbox.y0); + x = rect.x0 - bbox.x0; + y = rect.y0 - bbox.y0; + + annot->matrix = fz_concat(fz_scale(w, h), fz_translate(x, y)); +} + +void +pdf_load_annots(pdf_annot **annotp, pdf_xref *xref, fz_obj *annots) +{ + pdf_annot *annot, *head, *tail; + fz_obj *obj, *ap, *as, *n, *rect; + pdf_xobject *form; + fz_error error; + int i; + + head = tail = NULL; + annot = NULL; + + for (i = 0; i < fz_array_len(annots); i++) + { + obj = fz_array_get(annots, i); + + rect = fz_dict_gets(obj, "Rect"); + ap = fz_dict_gets(obj, "AP"); + as = fz_dict_gets(obj, "AS"); + if (fz_is_dict(ap)) + { + n = fz_dict_gets(ap, "N"); /* normal state */ + + /* lookup current state in sub-dictionary */ + if (!pdf_is_stream(xref, fz_to_num(n), fz_to_gen(n))) + n = fz_dict_get(n, as); + + if (pdf_is_stream(xref, fz_to_num(n), fz_to_gen(n))) + { + error = pdf_load_xobject(&form, xref, n); + if (error) + { + fz_catch(error, "ignoring broken annotation"); + continue; + } + + annot = fz_malloc(sizeof(pdf_annot)); + annot->obj = fz_keep_obj(obj); + annot->rect = pdf_to_rect(rect); + annot->ap = form; + annot->next = NULL; + + pdf_transform_annot(annot); + + if (annot) + { + if (!head) + head = tail = annot; + else + { + tail->next = annot; + tail = annot; + } + } + } + } + } + + *annotp = head; +} diff --git a/contrib/media/updf/pdf/pdf_cmap.c b/contrib/media/updf/pdf/pdf_cmap.c new file mode 100644 index 0000000000..2c5048aee9 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_cmap.c @@ -0,0 +1,510 @@ +/* + * The CMap data structure here is constructed on the fly by + * adding simple range-to-range mappings. Then the data structure + * is optimized to contain both range-to-range and range-to-table + * lookups. + * + * Any one-to-many mappings are inserted as one-to-table + * lookups in the beginning, and are not affected by the optimization + * stage. + * + * There is a special function to add a 256-length range-to-table mapping. + * The ranges do not have to be added in order. + * + * This code can be a lot simpler if we don't care about wasting memory, + * or can trust the parser to give us optimal mappings. + */ + +#include "fitz.h" +#include "mupdf.h" + +/* Macros for accessing the combined extent_flags field */ +#define pdf_range_high(r) ((r)->low + ((r)->extent_flags >> 2)) +#define pdf_range_flags(r) ((r)->extent_flags & 3) +#define pdf_range_set_high(r, h) \ + ((r)->extent_flags = (((r)->extent_flags & 3) | ((h - (r)->low) << 2))) +#define pdf_range_set_flags(r, f) \ + ((r)->extent_flags = (((r)->extent_flags & ~3) | f)) + +/* + * Allocate, destroy and simple parameters. + */ + +pdf_cmap * +pdf_new_cmap(void) +{ + pdf_cmap *cmap; + + cmap = fz_malloc(sizeof(pdf_cmap)); + cmap->refs = 1; + + strcpy(cmap->cmap_name, ""); + strcpy(cmap->usecmap_name, ""); + cmap->usecmap = NULL; + cmap->wmode = 0; + cmap->codespace_len = 0; + + cmap->rlen = 0; + cmap->rcap = 0; + cmap->ranges = NULL; + + cmap->tlen = 0; + cmap->tcap = 0; + cmap->table = NULL; + + return cmap; +} + +pdf_cmap * +pdf_keep_cmap(pdf_cmap *cmap) +{ + if (cmap->refs >= 0) + cmap->refs ++; + return cmap; +} + +void +pdf_drop_cmap(pdf_cmap *cmap) +{ + if (cmap->refs >= 0) + { + if (--cmap->refs == 0) + { + if (cmap->usecmap) + pdf_drop_cmap(cmap->usecmap); + fz_free(cmap->ranges); + fz_free(cmap->table); + fz_free(cmap); + } + } +} + +void +pdf_set_usecmap(pdf_cmap *cmap, pdf_cmap *usecmap) +{ + int i; + + if (cmap->usecmap) + pdf_drop_cmap(cmap->usecmap); + cmap->usecmap = pdf_keep_cmap(usecmap); + + if (cmap->codespace_len == 0) + { + cmap->codespace_len = usecmap->codespace_len; + for (i = 0; i < usecmap->codespace_len; i++) + cmap->codespace[i] = usecmap->codespace[i]; + } +} + +int +pdf_get_wmode(pdf_cmap *cmap) +{ + return cmap->wmode; +} + +void +pdf_set_wmode(pdf_cmap *cmap, int wmode) +{ + cmap->wmode = wmode; +} + +void +pdf_debug_cmap(pdf_cmap *cmap) +{ + int i, k, n; + + printf("cmap $%p /%s {\n", (void *) cmap, cmap->cmap_name); + + if (cmap->usecmap_name[0]) + printf("\tusecmap /%s\n", cmap->usecmap_name); + if (cmap->usecmap) + printf("\tusecmap $%p\n", (void *) cmap->usecmap); + + printf("\twmode %d\n", cmap->wmode); + + printf("\tcodespaces {\n"); + for (i = 0; i < cmap->codespace_len; i++) + { + printf("\t\t<%x> <%x>\n", cmap->codespace[i].low, cmap->codespace[i].high); + } + printf("\t}\n"); + + printf("\tranges (%d,%d) {\n", cmap->rlen, cmap->tlen); + for (i = 0; i < cmap->rlen; i++) + { + pdf_range *r = &cmap->ranges[i]; + printf("\t\t<%04x> <%04x> ", r->low, pdf_range_high(r)); + if (pdf_range_flags(r) == PDF_CMAP_TABLE) + { + printf("[ "); + for (k = 0; k < pdf_range_high(r) - r->low + 1; k++) + printf("%d ", cmap->table[r->offset + k]); + printf("]\n"); + } + else if (pdf_range_flags(r) == PDF_CMAP_MULTI) + { + printf("< "); + n = cmap->table[r->offset]; + for (k = 0; k < n; k++) + printf("%04x ", cmap->table[r->offset + 1 + k]); + printf(">\n"); + } + else + printf("%d\n", r->offset); + } + printf("\t}\n}\n"); +} + +/* + * Add a codespacerange section. + * These ranges are used by pdf_decode_cmap to decode + * multi-byte encoded strings. + */ +void +pdf_add_codespace(pdf_cmap *cmap, int low, int high, int n) +{ + if (cmap->codespace_len + 1 == nelem(cmap->codespace)) + { + fz_warn("assert: too many code space ranges"); + return; + } + + cmap->codespace[cmap->codespace_len].n = n; + cmap->codespace[cmap->codespace_len].low = low; + cmap->codespace[cmap->codespace_len].high = high; + cmap->codespace_len ++; +} + +/* + * Add an integer to the table. + */ +static void +add_table(pdf_cmap *cmap, int value) +{ + if (cmap->tlen == USHRT_MAX) + { + fz_warn("cmap table is full; ignoring additional entries"); + return; + } + if (cmap->tlen + 1 > cmap->tcap) + { + cmap->tcap = cmap->tcap > 1 ? (cmap->tcap * 3) / 2 : 256; + cmap->table = fz_realloc(cmap->table, cmap->tcap, sizeof(unsigned short)); + } + cmap->table[cmap->tlen++] = value; +} + +/* + * Add a range. + */ +static void +add_range(pdf_cmap *cmap, int low, int high, int flag, int offset) +{ + /* If the range is too large to be represented, split it */ + if (high - low > 0x3fff) + { + add_range(cmap, low, low+0x3fff, flag, offset); + add_range(cmap, low+0x3fff, high, flag, offset+0x3fff); + return; + } + if (cmap->rlen + 1 > cmap->rcap) + { + cmap->rcap = cmap->rcap > 1 ? (cmap->rcap * 3) / 2 : 256; + cmap->ranges = fz_realloc(cmap->ranges, cmap->rcap, sizeof(pdf_range)); + } + cmap->ranges[cmap->rlen].low = low; + pdf_range_set_high(&cmap->ranges[cmap->rlen], high); + pdf_range_set_flags(&cmap->ranges[cmap->rlen], flag); + cmap->ranges[cmap->rlen].offset = offset; + cmap->rlen ++; +} + +/* + * Add a range-to-table mapping. + */ +void +pdf_map_range_to_table(pdf_cmap *cmap, int low, int *table, int len) +{ + int i; + int high = low + len; + int offset = cmap->tlen; + if (cmap->tlen + len >= USHRT_MAX) + fz_warn("cannot map range to table; table is full"); + else + { + for (i = 0; i < len; i++) + add_table(cmap, table[i]); + add_range(cmap, low, high, PDF_CMAP_TABLE, offset); + } +} + +/* + * Add a range of contiguous one-to-one mappings (ie 1..5 maps to 21..25) + */ +void +pdf_map_range_to_range(pdf_cmap *cmap, int low, int high, int offset) +{ + add_range(cmap, low, high, high - low == 0 ? PDF_CMAP_SINGLE : PDF_CMAP_RANGE, offset); +} + +/* + * Add a single one-to-many mapping. + */ +void +pdf_map_one_to_many(pdf_cmap *cmap, int low, int *values, int len) +{ + int offset, i; + + if (len == 1) + { + add_range(cmap, low, low, PDF_CMAP_SINGLE, values[0]); + return; + } + + if (len > 8) + { + fz_warn("one to many mapping is too large (%d); truncating", len); + len = 8; + } + + if (len == 2 && + values[0] >= 0xD800 && values[0] <= 0xDBFF && + values[1] >= 0xDC00 && values[1] <= 0xDFFF) + { + fz_warn("ignoring surrogate pair mapping in cmap"); + return; + } + + if (cmap->tlen + len + 1 >= USHRT_MAX) + fz_warn("cannot map one to many; table is full"); + else + { + offset = cmap->tlen; + add_table(cmap, len); + for (i = 0; i < len; i++) + add_table(cmap, values[i]); + add_range(cmap, low, low, PDF_CMAP_MULTI, offset); + } +} + +/* + * Sort the input ranges. + * Merge contiguous input ranges to range-to-range if the output is contiguous. + * Merge contiguous input ranges to range-to-table if the output is random. + */ + +static int cmprange(const void *va, const void *vb) +{ + return ((const pdf_range*)va)->low - ((const pdf_range*)vb)->low; +} + +void +pdf_sort_cmap(pdf_cmap *cmap) +{ + pdf_range *a; /* last written range on output */ + pdf_range *b; /* current range examined on input */ + + if (cmap->rlen == 0) + return; + + qsort(cmap->ranges, cmap->rlen, sizeof(pdf_range), cmprange); + + if (cmap->tlen == USHRT_MAX) + { + fz_warn("cmap table is full; will not combine ranges"); + return; + } + + a = cmap->ranges; + b = cmap->ranges + 1; + + while (b < cmap->ranges + cmap->rlen) + { + /* ignore one-to-many mappings */ + if (pdf_range_flags(b) == PDF_CMAP_MULTI) + { + *(++a) = *b; + } + + /* input contiguous */ + else if (pdf_range_high(a) + 1 == b->low) + { + /* output contiguous */ + if (pdf_range_high(a) - a->low + a->offset + 1 == b->offset) + { + /* SR -> R and SS -> R and RR -> R and RS -> R */ + if ((pdf_range_flags(a) == PDF_CMAP_SINGLE || pdf_range_flags(a) == PDF_CMAP_RANGE) && (pdf_range_high(b) - a->low <= 0x3fff)) + { + pdf_range_set_flags(a, PDF_CMAP_RANGE); + pdf_range_set_high(a, pdf_range_high(b)); + } + + /* LS -> L */ + else if (pdf_range_flags(a) == PDF_CMAP_TABLE && pdf_range_flags(b) == PDF_CMAP_SINGLE && (pdf_range_high(b) - a->low <= 0x3fff)) + { + pdf_range_set_high(a, pdf_range_high(b)); + add_table(cmap, b->offset); + } + + /* LR -> LR */ + else if (pdf_range_flags(a) == PDF_CMAP_TABLE && pdf_range_flags(b) == PDF_CMAP_RANGE) + { + *(++a) = *b; + } + + /* XX -> XX */ + else + { + *(++a) = *b; + } + } + + /* output separated */ + else + { + /* SS -> L */ + if (pdf_range_flags(a) == PDF_CMAP_SINGLE && pdf_range_flags(b) == PDF_CMAP_SINGLE) + { + pdf_range_set_flags(a, PDF_CMAP_TABLE); + pdf_range_set_high(a, pdf_range_high(b)); + add_table(cmap, a->offset); + add_table(cmap, b->offset); + a->offset = cmap->tlen - 2; + } + + /* LS -> L */ + else if (pdf_range_flags(a) == PDF_CMAP_TABLE && pdf_range_flags(b) == PDF_CMAP_SINGLE && (pdf_range_high(b) - a->low <= 0x3fff)) + { + pdf_range_set_high(a, pdf_range_high(b)); + add_table(cmap, b->offset); + } + + /* XX -> XX */ + else + { + *(++a) = *b; + } + } + } + + /* input separated: XX -> XX */ + else + { + *(++a) = *b; + } + + b ++; + } + + cmap->rlen = a - cmap->ranges + 1; + + fz_flush_warnings(); +} + +/* + * Lookup the mapping of a codepoint. + */ +int +pdf_lookup_cmap(pdf_cmap *cmap, int cpt) +{ + int l = 0; + int r = cmap->rlen - 1; + int m; + + while (l <= r) + { + m = (l + r) >> 1; + if (cpt < cmap->ranges[m].low) + r = m - 1; + else if (cpt > pdf_range_high(&cmap->ranges[m])) + l = m + 1; + else + { + int i = cpt - cmap->ranges[m].low + cmap->ranges[m].offset; + if (pdf_range_flags(&cmap->ranges[m]) == PDF_CMAP_TABLE) + return cmap->table[i]; + if (pdf_range_flags(&cmap->ranges[m]) == PDF_CMAP_MULTI) + return -1; /* should use lookup_cmap_full */ + return i; + } + } + + if (cmap->usecmap) + return pdf_lookup_cmap(cmap->usecmap, cpt); + + return -1; +} + +int +pdf_lookup_cmap_full(pdf_cmap *cmap, int cpt, int *out) +{ + int i, k, n; + int l = 0; + int r = cmap->rlen - 1; + int m; + + while (l <= r) + { + m = (l + r) >> 1; + if (cpt < cmap->ranges[m].low) + r = m - 1; + else if (cpt > pdf_range_high(&cmap->ranges[m])) + l = m + 1; + else + { + k = cpt - cmap->ranges[m].low + cmap->ranges[m].offset; + if (pdf_range_flags(&cmap->ranges[m]) == PDF_CMAP_TABLE) + { + out[0] = cmap->table[k]; + return 1; + } + else if (pdf_range_flags(&cmap->ranges[m]) == PDF_CMAP_MULTI) + { + n = cmap->ranges[m].offset; + for (i = 0; i < cmap->table[n]; i++) + out[i] = cmap->table[n + i + 1]; + return cmap->table[n]; + } + else + { + out[0] = k; + return 1; + } + } + } + + if (cmap->usecmap) + return pdf_lookup_cmap_full(cmap->usecmap, cpt, out); + + return 0; +} + +/* + * Use the codespace ranges to extract a codepoint from a + * multi-byte encoded string. + */ +unsigned char * +pdf_decode_cmap(pdf_cmap *cmap, unsigned char *buf, int *cpt) +{ + int k, n, c; + + c = 0; + for (n = 0; n < 4; n++) + { + c = (c << 8) | buf[n]; + for (k = 0; k < cmap->codespace_len; k++) + { + if (cmap->codespace[k].n == n + 1) + { + if (c >= cmap->codespace[k].low && c <= cmap->codespace[k].high) + { + *cpt = c; + return buf + n + 1; + } + } + } + } + + *cpt = 0; + return buf + 1; +} diff --git a/contrib/media/updf/pdf/pdf_cmap_load.c b/contrib/media/updf/pdf/pdf_cmap_load.c new file mode 100644 index 0000000000..12adeb40d0 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_cmap_load.c @@ -0,0 +1,118 @@ +#include "fitz.h" +#include "mupdf.h" + +/* + * Load CMap stream in PDF file + */ +fz_error +pdf_load_embedded_cmap(pdf_cmap **cmapp, pdf_xref *xref, fz_obj *stmobj) +{ + fz_error error = fz_okay; + fz_stream *file = NULL; + pdf_cmap *cmap = NULL; + pdf_cmap *usecmap; + fz_obj *wmode; + fz_obj *obj; + + if ((*cmapp = pdf_find_item(xref->store, pdf_drop_cmap, stmobj))) + { + pdf_keep_cmap(*cmapp); + return fz_okay; + } + + error = pdf_open_stream(&file, xref, fz_to_num(stmobj), fz_to_gen(stmobj)); + if (error) + { + error = fz_rethrow(error, "cannot open cmap stream (%d %d R)", fz_to_num(stmobj), fz_to_gen(stmobj)); + goto cleanup; + } + + error = pdf_parse_cmap(&cmap, file); + if (error) + { + error = fz_rethrow(error, "cannot parse cmap stream (%d %d R)", fz_to_num(stmobj), fz_to_gen(stmobj)); + goto cleanup; + } + + fz_close(file); + + wmode = fz_dict_gets(stmobj, "WMode"); + if (fz_is_int(wmode)) + pdf_set_wmode(cmap, fz_to_int(wmode)); + + obj = fz_dict_gets(stmobj, "UseCMap"); + if (fz_is_name(obj)) + { + error = pdf_load_system_cmap(&usecmap, fz_to_name(obj)); + if (error) + { + error = fz_rethrow(error, "cannot load system usecmap '%s'", fz_to_name(obj)); + goto cleanup; + } + pdf_set_usecmap(cmap, usecmap); + pdf_drop_cmap(usecmap); + } + else if (fz_is_indirect(obj)) + { + error = pdf_load_embedded_cmap(&usecmap, xref, obj); + if (error) + { + error = fz_rethrow(error, "cannot load embedded usecmap (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + goto cleanup; + } + pdf_set_usecmap(cmap, usecmap); + pdf_drop_cmap(usecmap); + } + + pdf_store_item(xref->store, pdf_keep_cmap, pdf_drop_cmap, stmobj, cmap); + + *cmapp = cmap; + return fz_okay; + +cleanup: + if (file) + fz_close(file); + if (cmap) + pdf_drop_cmap(cmap); + return error; /* already rethrown */ +} + +/* + * Create an Identity-* CMap (for both 1 and 2-byte encodings) + */ +pdf_cmap * +pdf_new_identity_cmap(int wmode, int bytes) +{ + pdf_cmap *cmap = pdf_new_cmap(); + sprintf(cmap->cmap_name, "Identity-%c", wmode ? 'V' : 'H'); + pdf_add_codespace(cmap, 0x0000, 0xffff, bytes); + pdf_map_range_to_range(cmap, 0x0000, 0xffff, 0); + pdf_sort_cmap(cmap); + pdf_set_wmode(cmap, wmode); + return cmap; +} + +/* + * Load predefined CMap from system. + */ +fz_error +pdf_load_system_cmap(pdf_cmap **cmapp, char *cmap_name) +{ + pdf_cmap *usecmap; + pdf_cmap *cmap; + + cmap = pdf_find_builtin_cmap(cmap_name); + if (!cmap) + return fz_throw("no builtin cmap file: %s", cmap_name); + + if (cmap->usecmap_name[0] && !cmap->usecmap) + { + usecmap = pdf_find_builtin_cmap(cmap->usecmap_name); + if (!usecmap) + return fz_throw("nu builtin cmap file: %s", cmap->usecmap_name); + pdf_set_usecmap(cmap, usecmap); + } + + *cmapp = cmap; + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_cmap_parse.c b/contrib/media/updf/pdf/pdf_cmap_parse.c new file mode 100644 index 0000000000..edd97de817 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_cmap_parse.c @@ -0,0 +1,490 @@ +#include "fitz.h" +#include "mupdf.h" + +/* + * CMap parser + */ + +enum +{ + TOK_USECMAP = PDF_NUM_TOKENS, + TOK_BEGIN_CODESPACE_RANGE, + TOK_END_CODESPACE_RANGE, + TOK_BEGIN_BF_CHAR, + TOK_END_BF_CHAR, + TOK_BEGIN_BF_RANGE, + TOK_END_BF_RANGE, + TOK_BEGIN_CID_CHAR, + TOK_END_CID_CHAR, + TOK_BEGIN_CID_RANGE, + TOK_END_CID_RANGE, + TOK_END_CMAP +}; + +static int +pdf_cmap_token_from_keyword(char *key) +{ + if (!strcmp(key, "usecmap")) return TOK_USECMAP; + if (!strcmp(key, "begincodespacerange")) return TOK_BEGIN_CODESPACE_RANGE; + if (!strcmp(key, "endcodespacerange")) return TOK_END_CODESPACE_RANGE; + if (!strcmp(key, "beginbfchar")) return TOK_BEGIN_BF_CHAR; + if (!strcmp(key, "endbfchar")) return TOK_END_BF_CHAR; + if (!strcmp(key, "beginbfrange")) return TOK_BEGIN_BF_RANGE; + if (!strcmp(key, "endbfrange")) return TOK_END_BF_RANGE; + if (!strcmp(key, "begincidchar")) return TOK_BEGIN_CID_CHAR; + if (!strcmp(key, "endcidchar")) return TOK_END_CID_CHAR; + if (!strcmp(key, "begincidrange")) return TOK_BEGIN_CID_RANGE; + if (!strcmp(key, "endcidrange")) return TOK_END_CID_RANGE; + if (!strcmp(key, "endcmap")) return TOK_END_CMAP; + return PDF_TOK_KEYWORD; +} + +static int +pdf_code_from_string(char *buf, int len) +{ + int a = 0; + while (len--) + a = (a << 8) | *(unsigned char *)buf++; + return a; +} + +static fz_error +pdf_lex_cmap(int *tok, fz_stream *file, char *buf, int n, int *sl) +{ + fz_error error; + + error = pdf_lex(tok, file, buf, n, sl); + if (error) + return fz_rethrow(error, "cannot parse cmap token"); + + if (*tok == PDF_TOK_KEYWORD) + *tok = pdf_cmap_token_from_keyword(buf); + + return fz_okay; +} + +static fz_error +pdf_parse_cmap_name(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == PDF_TOK_NAME) + fz_strlcpy(cmap->cmap_name, buf, sizeof(cmap->cmap_name)); + else + fz_warn("expected name after CMapName in cmap"); + + return fz_okay; +} + +static fz_error +pdf_parse_wmode(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == PDF_TOK_INT) + pdf_set_wmode(cmap, atoi(buf)); + else + fz_warn("expected integer after WMode in cmap"); + + return fz_okay; +} + +static fz_error +pdf_parse_codespace_range(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int lo, hi; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == TOK_END_CODESPACE_RANGE) + return fz_okay; + + else if (tok == PDF_TOK_STRING) + { + lo = pdf_code_from_string(buf, len); + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + if (tok == PDF_TOK_STRING) + { + hi = pdf_code_from_string(buf, len); + pdf_add_codespace(cmap, lo, hi, len); + } + else break; + } + + else break; + } + + return fz_throw("expected string or endcodespacerange"); +} + +static fz_error +pdf_parse_cid_range(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int lo, hi, dst; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == TOK_END_CID_RANGE) + return fz_okay; + + else if (tok != PDF_TOK_STRING) + return fz_throw("expected string or endcidrange"); + + lo = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + if (tok != PDF_TOK_STRING) + return fz_throw("expected string"); + + hi = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + if (tok != PDF_TOK_INT) + return fz_throw("expected integer"); + + dst = atoi(buf); + + pdf_map_range_to_range(cmap, lo, hi, dst); + } +} + +static fz_error +pdf_parse_cid_char(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int src, dst; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == TOK_END_CID_CHAR) + return fz_okay; + + else if (tok != PDF_TOK_STRING) + return fz_throw("expected string or endcidchar"); + + src = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + if (tok != PDF_TOK_INT) + return fz_throw("expected integer"); + + dst = atoi(buf); + + pdf_map_range_to_range(cmap, src, src, dst); + } +} + +static fz_error +pdf_parse_bf_range_array(pdf_cmap *cmap, fz_stream *file, int lo, int hi) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int dst[256]; + int i; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == PDF_TOK_CLOSE_ARRAY) + return fz_okay; + + /* Note: does not handle [ /Name /Name ... ] */ + else if (tok != PDF_TOK_STRING) + return fz_throw("expected string or ]"); + + if (len / 2) + { + for (i = 0; i < len / 2; i++) + dst[i] = pdf_code_from_string(buf + i * 2, 2); + + pdf_map_one_to_many(cmap, lo, dst, len / 2); + } + + lo ++; + } +} + +static fz_error +pdf_parse_bf_range(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int lo, hi, dst; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == TOK_END_BF_RANGE) + return fz_okay; + + else if (tok != PDF_TOK_STRING) + return fz_throw("expected string or endbfrange"); + + lo = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + if (tok != PDF_TOK_STRING) + return fz_throw("expected string"); + + hi = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == PDF_TOK_STRING) + { + if (len == 2) + { + dst = pdf_code_from_string(buf, len); + pdf_map_range_to_range(cmap, lo, hi, dst); + } + else + { + int dststr[256]; + int i; + + if (len / 2) + { + for (i = 0; i < len / 2; i++) + dststr[i] = pdf_code_from_string(buf + i * 2, 2); + + while (lo <= hi) + { + dststr[i-1] ++; + pdf_map_one_to_many(cmap, lo, dststr, i); + lo ++; + } + } + } + } + + else if (tok == PDF_TOK_OPEN_ARRAY) + { + error = pdf_parse_bf_range_array(cmap, file, lo, hi); + if (error) + return fz_rethrow(error, "cannot map bfrange"); + } + + else + { + return fz_throw("expected string or array or endbfrange"); + } + } +} + +static fz_error +pdf_parse_bf_char(pdf_cmap *cmap, fz_stream *file) +{ + fz_error error; + char buf[256]; + int tok; + int len; + int dst[256]; + int src; + int i; + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + + if (tok == TOK_END_BF_CHAR) + return fz_okay; + + else if (tok != PDF_TOK_STRING) + return fz_throw("expected string or endbfchar"); + + src = pdf_code_from_string(buf, len); + + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "syntaxerror in cmap"); + /* Note: does not handle /dstName */ + if (tok != PDF_TOK_STRING) + return fz_throw("expected string"); + + if (len / 2) + { + for (i = 0; i < len / 2; i++) + dst[i] = pdf_code_from_string(buf + i * 2, 2); + pdf_map_one_to_many(cmap, src, dst, i); + } + } +} + +fz_error +pdf_parse_cmap(pdf_cmap **cmapp, fz_stream *file) +{ + fz_error error; + pdf_cmap *cmap; + char key[64]; + char buf[256]; + int tok; + int len; + + cmap = pdf_new_cmap(); + + strcpy(key, ".notdef"); + + while (1) + { + error = pdf_lex_cmap(&tok, file, buf, sizeof buf, &len); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap"); + goto cleanup; + } + + if (tok == PDF_TOK_EOF || tok == TOK_END_CMAP) + break; + + else if (tok == PDF_TOK_NAME) + { + if (!strcmp(buf, "CMapName")) + { + error = pdf_parse_cmap_name(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap after CMapName"); + goto cleanup; + } + } + else if (!strcmp(buf, "WMode")) + { + error = pdf_parse_wmode(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap after WMode"); + goto cleanup; + } + } + else + fz_strlcpy(key, buf, sizeof key); + } + + else if (tok == TOK_USECMAP) + { + fz_strlcpy(cmap->usecmap_name, key, sizeof(cmap->usecmap_name)); + } + + else if (tok == TOK_BEGIN_CODESPACE_RANGE) + { + error = pdf_parse_codespace_range(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap codespacerange"); + goto cleanup; + } + } + + else if (tok == TOK_BEGIN_BF_CHAR) + { + error = pdf_parse_bf_char(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap bfchar"); + goto cleanup; + } + } + + else if (tok == TOK_BEGIN_CID_CHAR) + { + error = pdf_parse_cid_char(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap cidchar"); + goto cleanup; + } + } + + else if (tok == TOK_BEGIN_BF_RANGE) + { + error = pdf_parse_bf_range(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap bfrange"); + goto cleanup; + } + } + + else if (tok == TOK_BEGIN_CID_RANGE) + { + error = pdf_parse_cid_range(cmap, file); + if (error) + { + error = fz_rethrow(error, "syntaxerror in cmap cidrange"); + goto cleanup; + } + } + + /* ignore everything else */ + } + + pdf_sort_cmap(cmap); + + *cmapp = cmap; + return fz_okay; + +cleanup: + pdf_drop_cmap(cmap); + return error; /* already rethrown */ +} diff --git a/contrib/media/updf/pdf/pdf_cmap_table.c b/contrib/media/updf/pdf/pdf_cmap_table.c new file mode 100644 index 0000000000..daf81ed45d --- /dev/null +++ b/contrib/media/updf/pdf/pdf_cmap_table.c @@ -0,0 +1,184 @@ +#include "fitz.h" +#include "mupdf.h" + +#ifndef NOCJK +#include "../generated/cmap_cns.h" +#include "../generated/cmap_gb.h" +#include "../generated/cmap_japan.h" +#include "../generated/cmap_korea.h" +#endif + +static const struct { char *name; pdf_cmap *cmap; } cmap_table[] = +{ +#ifndef NOCJK + {"78-EUC-H",&cmap_78_EUC_H}, + {"78-EUC-V",&cmap_78_EUC_V}, + {"78-H",&cmap_78_H}, + {"78-RKSJ-H",&cmap_78_RKSJ_H}, + {"78-RKSJ-V",&cmap_78_RKSJ_V}, + {"78-V",&cmap_78_V}, + {"78ms-RKSJ-H",&cmap_78ms_RKSJ_H}, + {"78ms-RKSJ-V",&cmap_78ms_RKSJ_V}, + {"83pv-RKSJ-H",&cmap_83pv_RKSJ_H}, + {"90ms-RKSJ-H",&cmap_90ms_RKSJ_H}, + {"90ms-RKSJ-V",&cmap_90ms_RKSJ_V}, + {"90msp-RKSJ-H",&cmap_90msp_RKSJ_H}, + {"90msp-RKSJ-V",&cmap_90msp_RKSJ_V}, + {"90pv-RKSJ-H",&cmap_90pv_RKSJ_H}, + {"90pv-RKSJ-V",&cmap_90pv_RKSJ_V}, + {"Add-H",&cmap_Add_H}, + {"Add-RKSJ-H",&cmap_Add_RKSJ_H}, + {"Add-RKSJ-V",&cmap_Add_RKSJ_V}, + {"Add-V",&cmap_Add_V}, + {"Adobe-CNS1-0",&cmap_Adobe_CNS1_0}, + {"Adobe-CNS1-1",&cmap_Adobe_CNS1_1}, + {"Adobe-CNS1-2",&cmap_Adobe_CNS1_2}, + {"Adobe-CNS1-3",&cmap_Adobe_CNS1_3}, + {"Adobe-CNS1-4",&cmap_Adobe_CNS1_4}, + {"Adobe-CNS1-5",&cmap_Adobe_CNS1_5}, + {"Adobe-CNS1-6",&cmap_Adobe_CNS1_6}, + {"Adobe-CNS1-UCS2",&cmap_Adobe_CNS1_UCS2}, + {"Adobe-GB1-0",&cmap_Adobe_GB1_0}, + {"Adobe-GB1-1",&cmap_Adobe_GB1_1}, + {"Adobe-GB1-2",&cmap_Adobe_GB1_2}, + {"Adobe-GB1-3",&cmap_Adobe_GB1_3}, + {"Adobe-GB1-4",&cmap_Adobe_GB1_4}, + {"Adobe-GB1-5",&cmap_Adobe_GB1_5}, + {"Adobe-GB1-UCS2",&cmap_Adobe_GB1_UCS2}, + {"Adobe-Japan1-0",&cmap_Adobe_Japan1_0}, + {"Adobe-Japan1-1",&cmap_Adobe_Japan1_1}, + {"Adobe-Japan1-2",&cmap_Adobe_Japan1_2}, + {"Adobe-Japan1-3",&cmap_Adobe_Japan1_3}, + {"Adobe-Japan1-4",&cmap_Adobe_Japan1_4}, + {"Adobe-Japan1-5",&cmap_Adobe_Japan1_5}, + {"Adobe-Japan1-6",&cmap_Adobe_Japan1_6}, + {"Adobe-Japan1-UCS2",&cmap_Adobe_Japan1_UCS2}, + {"Adobe-Japan2-0",&cmap_Adobe_Japan2_0}, + {"Adobe-Korea1-0",&cmap_Adobe_Korea1_0}, + {"Adobe-Korea1-1",&cmap_Adobe_Korea1_1}, + {"Adobe-Korea1-2",&cmap_Adobe_Korea1_2}, + {"Adobe-Korea1-UCS2",&cmap_Adobe_Korea1_UCS2}, + {"B5-H",&cmap_B5_H}, + {"B5-V",&cmap_B5_V}, + {"B5pc-H",&cmap_B5pc_H}, + {"B5pc-V",&cmap_B5pc_V}, + {"CNS-EUC-H",&cmap_CNS_EUC_H}, + {"CNS-EUC-V",&cmap_CNS_EUC_V}, + {"CNS1-H",&cmap_CNS1_H}, + {"CNS1-V",&cmap_CNS1_V}, + {"CNS2-H",&cmap_CNS2_H}, + {"CNS2-V",&cmap_CNS2_V}, + {"ETHK-B5-H",&cmap_ETHK_B5_H}, + {"ETHK-B5-V",&cmap_ETHK_B5_V}, + {"ETen-B5-H",&cmap_ETen_B5_H}, + {"ETen-B5-V",&cmap_ETen_B5_V}, + {"ETenms-B5-H",&cmap_ETenms_B5_H}, + {"ETenms-B5-V",&cmap_ETenms_B5_V}, + {"EUC-H",&cmap_EUC_H}, + {"EUC-V",&cmap_EUC_V}, + {"Ext-H",&cmap_Ext_H}, + {"Ext-RKSJ-H",&cmap_Ext_RKSJ_H}, + {"Ext-RKSJ-V",&cmap_Ext_RKSJ_V}, + {"Ext-V",&cmap_Ext_V}, + {"GB-EUC-H",&cmap_GB_EUC_H}, + {"GB-EUC-V",&cmap_GB_EUC_V}, + {"GB-H",&cmap_GB_H}, + {"GB-V",&cmap_GB_V}, + {"GBK-EUC-H",&cmap_GBK_EUC_H}, + {"GBK-EUC-V",&cmap_GBK_EUC_V}, + {"GBK2K-H",&cmap_GBK2K_H}, + {"GBK2K-V",&cmap_GBK2K_V}, + {"GBKp-EUC-H",&cmap_GBKp_EUC_H}, + {"GBKp-EUC-V",&cmap_GBKp_EUC_V}, + {"GBT-EUC-H",&cmap_GBT_EUC_H}, + {"GBT-EUC-V",&cmap_GBT_EUC_V}, + {"GBT-H",&cmap_GBT_H}, + {"GBT-V",&cmap_GBT_V}, + {"GBTpc-EUC-H",&cmap_GBTpc_EUC_H}, + {"GBTpc-EUC-V",&cmap_GBTpc_EUC_V}, + {"GBpc-EUC-H",&cmap_GBpc_EUC_H}, + {"GBpc-EUC-V",&cmap_GBpc_EUC_V}, + {"H",&cmap_H}, + {"HKdla-B5-H",&cmap_HKdla_B5_H}, + {"HKdla-B5-V",&cmap_HKdla_B5_V}, + {"HKdlb-B5-H",&cmap_HKdlb_B5_H}, + {"HKdlb-B5-V",&cmap_HKdlb_B5_V}, + {"HKgccs-B5-H",&cmap_HKgccs_B5_H}, + {"HKgccs-B5-V",&cmap_HKgccs_B5_V}, + {"HKm314-B5-H",&cmap_HKm314_B5_H}, + {"HKm314-B5-V",&cmap_HKm314_B5_V}, + {"HKm471-B5-H",&cmap_HKm471_B5_H}, + {"HKm471-B5-V",&cmap_HKm471_B5_V}, + {"HKscs-B5-H",&cmap_HKscs_B5_H}, + {"HKscs-B5-V",&cmap_HKscs_B5_V}, + {"Hankaku",&cmap_Hankaku}, + {"Hiragana",&cmap_Hiragana}, + {"Hojo-EUC-H",&cmap_Hojo_EUC_H}, + {"Hojo-EUC-V",&cmap_Hojo_EUC_V}, + {"Hojo-H",&cmap_Hojo_H}, + {"Hojo-V",&cmap_Hojo_V}, + {"KSC-EUC-H",&cmap_KSC_EUC_H}, + {"KSC-EUC-V",&cmap_KSC_EUC_V}, + {"KSC-H",&cmap_KSC_H}, + {"KSC-Johab-H",&cmap_KSC_Johab_H}, + {"KSC-Johab-V",&cmap_KSC_Johab_V}, + {"KSC-V",&cmap_KSC_V}, + {"KSCms-UHC-H",&cmap_KSCms_UHC_H}, + {"KSCms-UHC-HW-H",&cmap_KSCms_UHC_HW_H}, + {"KSCms-UHC-HW-V",&cmap_KSCms_UHC_HW_V}, + {"KSCms-UHC-V",&cmap_KSCms_UHC_V}, + {"KSCpc-EUC-H",&cmap_KSCpc_EUC_H}, + {"KSCpc-EUC-V",&cmap_KSCpc_EUC_V}, + {"Katakana",&cmap_Katakana}, + {"NWP-H",&cmap_NWP_H}, + {"NWP-V",&cmap_NWP_V}, + {"RKSJ-H",&cmap_RKSJ_H}, + {"RKSJ-V",&cmap_RKSJ_V}, + {"Roman",&cmap_Roman}, + {"UniCNS-UCS2-H",&cmap_UniCNS_UCS2_H}, + {"UniCNS-UCS2-V",&cmap_UniCNS_UCS2_V}, + {"UniCNS-UTF16-H",&cmap_UniCNS_UTF16_H}, + {"UniCNS-UTF16-V",&cmap_UniCNS_UTF16_V}, + {"UniGB-UCS2-H",&cmap_UniGB_UCS2_H}, + {"UniGB-UCS2-V",&cmap_UniGB_UCS2_V}, + {"UniGB-UTF16-H",&cmap_UniGB_UTF16_H}, + {"UniGB-UTF16-V",&cmap_UniGB_UTF16_V}, + {"UniHojo-UCS2-H",&cmap_UniHojo_UCS2_H}, + {"UniHojo-UCS2-V",&cmap_UniHojo_UCS2_V}, + {"UniHojo-UTF16-H",&cmap_UniHojo_UTF16_H}, + {"UniHojo-UTF16-V",&cmap_UniHojo_UTF16_V}, + {"UniJIS-UCS2-H",&cmap_UniJIS_UCS2_H}, + {"UniJIS-UCS2-HW-H",&cmap_UniJIS_UCS2_HW_H}, + {"UniJIS-UCS2-HW-V",&cmap_UniJIS_UCS2_HW_V}, + {"UniJIS-UCS2-V",&cmap_UniJIS_UCS2_V}, + {"UniJIS-UTF16-H",&cmap_UniJIS_UTF16_H}, + {"UniJIS-UTF16-V",&cmap_UniJIS_UTF16_V}, + {"UniJISPro-UCS2-HW-V",&cmap_UniJISPro_UCS2_HW_V}, + {"UniJISPro-UCS2-V",&cmap_UniJISPro_UCS2_V}, + {"UniKS-UCS2-H",&cmap_UniKS_UCS2_H}, + {"UniKS-UCS2-V",&cmap_UniKS_UCS2_V}, + {"UniKS-UTF16-H",&cmap_UniKS_UTF16_H}, + {"UniKS-UTF16-V",&cmap_UniKS_UTF16_V}, + {"V",&cmap_V}, + {"WP-Symbol",&cmap_WP_Symbol}, +#endif +}; + +pdf_cmap * +pdf_find_builtin_cmap(char *cmap_name) +{ + int l = 0; + int r = nelem(cmap_table) - 1; + while (l <= r) + { + int m = (l + r) >> 1; + int c = strcmp(cmap_name, cmap_table[m].name); + if (c < 0) + r = m - 1; + else if (c > 0) + l = m + 1; + else + return cmap_table[m].cmap; + } + return NULL; +} diff --git a/contrib/media/updf/pdf/pdf_colorspace.c b/contrib/media/updf/pdf/pdf_colorspace.c new file mode 100644 index 0000000000..b7ea51a324 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_colorspace.c @@ -0,0 +1,387 @@ +#include "fitz.h" +#include "mupdf.h" + +/* ICCBased */ + +static fz_error +load_icc_based(fz_colorspace **csp, pdf_xref *xref, fz_obj *dict) +{ + int n; + + n = fz_to_int(fz_dict_gets(dict, "N")); + + switch (n) + { + case 1: *csp = fz_device_gray; return fz_okay; + case 3: *csp = fz_device_rgb; return fz_okay; + case 4: *csp = fz_device_cmyk; return fz_okay; + } + + return fz_throw("syntaxerror: ICCBased must have 1, 3 or 4 components"); +} + +/* Lab */ + +static inline float fung(float x) +{ + if (x >= 6.0f / 29.0f) + return x * x * x; + return (108.0f / 841.0f) * (x - (4.0f / 29.0f)); +} + +static void +lab_to_rgb(fz_colorspace *cs, float *lab, float *rgb) +{ + /* input is in range (0..100, -128..127, -128..127) not (0..1, 0..1, 0..1) */ + float lstar, astar, bstar, l, m, n, x, y, z, r, g, b; + lstar = lab[0]; + astar = lab[1]; + bstar = lab[2]; + m = (lstar + 16) / 116; + l = m + astar / 500; + n = m - bstar / 200; + x = fung(l); + y = fung(m); + z = fung(n); + r = (3.240449f * x + -1.537136f * y + -0.498531f * z) * 0.830026f; + g = (-0.969265f * x + 1.876011f * y + 0.041556f * z) * 1.05452f; + b = (0.055643f * x + -0.204026f * y + 1.057229f * z) * 1.1003f; + rgb[0] = sqrtf(CLAMP(r, 0, 1)); + rgb[1] = sqrtf(CLAMP(g, 0, 1)); + rgb[2] = sqrtf(CLAMP(b, 0, 1)); +} + +static void +rgb_to_lab(fz_colorspace *cs, float *rgb, float *lab) +{ + fz_warn("cannot convert into L*a*b colorspace"); + lab[0] = rgb[0]; + lab[1] = rgb[1]; + lab[2] = rgb[2]; +} + +static fz_colorspace k_device_lab = { -1, "Lab", 3, lab_to_rgb, rgb_to_lab }; +static fz_colorspace *fz_device_lab = &k_device_lab; + +/* Separation and DeviceN */ + +struct separation +{ + fz_colorspace *base; + pdf_function *tint; +}; + +static void +separation_to_rgb(fz_colorspace *cs, float *color, float *rgb) +{ + struct separation *sep = cs->data; + float alt[FZ_MAX_COLORS]; + pdf_eval_function(sep->tint, color, cs->n, alt, sep->base->n); + sep->base->to_rgb(sep->base, alt, rgb); +} + +static void +free_separation(fz_colorspace *cs) +{ + struct separation *sep = cs->data; + fz_drop_colorspace(sep->base); + pdf_drop_function(sep->tint); + fz_free(sep); +} + +static fz_error +load_separation(fz_colorspace **csp, pdf_xref *xref, fz_obj *array) +{ + fz_error error; + fz_colorspace *cs; + struct separation *sep; + fz_obj *nameobj = fz_array_get(array, 1); + fz_obj *baseobj = fz_array_get(array, 2); + fz_obj *tintobj = fz_array_get(array, 3); + fz_colorspace *base; + pdf_function *tint; + int n; + + if (fz_is_array(nameobj)) + n = fz_array_len(nameobj); + else + n = 1; + + if (n > FZ_MAX_COLORS) + return fz_throw("too many components in colorspace"); + + error = pdf_load_colorspace(&base, xref, baseobj); + if (error) + return fz_rethrow(error, "cannot load base colorspace (%d %d R)", fz_to_num(baseobj), fz_to_gen(baseobj)); + + error = pdf_load_function(&tint, xref, tintobj); + if (error) + { + fz_drop_colorspace(base); + return fz_rethrow(error, "cannot load tint function (%d %d R)", fz_to_num(tintobj), fz_to_gen(tintobj)); + } + + sep = fz_malloc(sizeof(struct separation)); + sep->base = base; + sep->tint = tint; + + cs = fz_new_colorspace(n == 1 ? "Separation" : "DeviceN", n); + cs->to_rgb = separation_to_rgb; + cs->free_data = free_separation; + cs->data = sep; + + *csp = cs; + return fz_okay; +} + +/* Indexed */ + +struct indexed +{ + fz_colorspace *base; + int high; + unsigned char *lookup; +}; + +static void +indexed_to_rgb(fz_colorspace *cs, float *color, float *rgb) +{ + struct indexed *idx = cs->data; + float alt[FZ_MAX_COLORS]; + int i, k; + i = color[0] * 255; + i = CLAMP(i, 0, idx->high); + for (k = 0; k < idx->base->n; k++) + alt[k] = idx->lookup[i * idx->base->n + k] / 255.0f; + idx->base->to_rgb(idx->base, alt, rgb); +} + +static void +free_indexed(fz_colorspace *cs) +{ + struct indexed *idx = cs->data; + if (idx->base) + fz_drop_colorspace(idx->base); + fz_free(idx->lookup); + fz_free(idx); +} + +fz_pixmap * +pdf_expand_indexed_pixmap(fz_pixmap *src) +{ + struct indexed *idx; + fz_pixmap *dst; + unsigned char *s, *d; + int y, x, k, n, high; + unsigned char *lookup; + + assert(src->colorspace->to_rgb == indexed_to_rgb); + assert(src->n == 2); + + idx = src->colorspace->data; + high = idx->high; + lookup = idx->lookup; + n = idx->base->n; + + dst = fz_new_pixmap_with_rect(idx->base, fz_bound_pixmap(src)); + s = src->samples; + d = dst->samples; + + for (y = 0; y < src->h; y++) + { + for (x = 0; x < src->w; x++) + { + int v = *s++; + int a = *s++; + v = MIN(v, high); + for (k = 0; k < n; k++) + *d++ = fz_mul255(lookup[v * n + k], a); + *d++ = a; + } + } + + if (src->mask) + dst->mask = fz_keep_pixmap(src->mask); + dst->interpolate = src->interpolate; + + return dst; +} + +static fz_error +load_indexed(fz_colorspace **csp, pdf_xref *xref, fz_obj *array) +{ + fz_error error; + fz_colorspace *cs; + struct indexed *idx; + fz_obj *baseobj = fz_array_get(array, 1); + fz_obj *highobj = fz_array_get(array, 2); + fz_obj *lookup = fz_array_get(array, 3); + fz_colorspace *base; + int i, n; + + error = pdf_load_colorspace(&base, xref, baseobj); + if (error) + return fz_rethrow(error, "cannot load base colorspace (%d %d R)", fz_to_num(baseobj), fz_to_gen(baseobj)); + + idx = fz_malloc(sizeof(struct indexed)); + idx->base = base; + idx->high = fz_to_int(highobj); + idx->high = CLAMP(idx->high, 0, 255); + n = base->n * (idx->high + 1); + idx->lookup = fz_malloc(n); + memset(idx->lookup, 0, n); + + cs = fz_new_colorspace("Indexed", 1); + cs->to_rgb = indexed_to_rgb; + cs->free_data = free_indexed; + cs->data = idx; + + if (fz_is_string(lookup) && fz_to_str_len(lookup) == n) + { + unsigned char *buf = (unsigned char *) fz_to_str_buf(lookup); + for (i = 0; i < n; i++) + idx->lookup[i] = buf[i]; + } + else if (fz_is_indirect(lookup)) + { + fz_stream *file; + + error = pdf_open_stream(&file, xref, fz_to_num(lookup), fz_to_gen(lookup)); + if (error) + { + fz_drop_colorspace(cs); + return fz_rethrow(error, "cannot open colorspace lookup table (%d 0 R)", fz_to_num(lookup)); + } + + i = fz_read(file, idx->lookup, n); + if (i < 0) + { + fz_drop_colorspace(cs); + return fz_throw("cannot read colorspace lookup table (%d 0 R)", fz_to_num(lookup)); + } + + fz_close(file); + } + else + { + fz_drop_colorspace(cs); + return fz_throw("cannot parse colorspace lookup table"); + } + + *csp = cs; + return fz_okay; +} + +/* Parse and create colorspace from PDF object */ + +static fz_error +pdf_load_colorspace_imp(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj) +{ + if (fz_is_name(obj)) + { + if (!strcmp(fz_to_name(obj), "Pattern")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(obj), "G")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(obj), "RGB")) + *csp = fz_device_rgb; + else if (!strcmp(fz_to_name(obj), "CMYK")) + *csp = fz_device_cmyk; + else if (!strcmp(fz_to_name(obj), "DeviceGray")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(obj), "DeviceRGB")) + *csp = fz_device_rgb; + else if (!strcmp(fz_to_name(obj), "DeviceCMYK")) + *csp = fz_device_cmyk; + else + return fz_throw("unknown colorspace: %s", fz_to_name(obj)); + return fz_okay; + } + + else if (fz_is_array(obj)) + { + fz_obj *name = fz_array_get(obj, 0); + + if (fz_is_name(name)) + { + /* load base colorspace instead */ + if (!strcmp(fz_to_name(name), "Pattern")) + { + fz_error error; + + obj = fz_array_get(obj, 1); + if (!obj) + { + *csp = fz_device_gray; + return fz_okay; + } + + error = pdf_load_colorspace(csp, xref, obj); + if (error) + return fz_rethrow(error, "cannot load pattern (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + } + + else if (!strcmp(fz_to_name(name), "G")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(name), "RGB")) + *csp = fz_device_rgb; + else if (!strcmp(fz_to_name(name), "CMYK")) + *csp = fz_device_cmyk; + else if (!strcmp(fz_to_name(name), "DeviceGray")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(name), "DeviceRGB")) + *csp = fz_device_rgb; + else if (!strcmp(fz_to_name(name), "DeviceCMYK")) + *csp = fz_device_cmyk; + else if (!strcmp(fz_to_name(name), "CalGray")) + *csp = fz_device_gray; + else if (!strcmp(fz_to_name(name), "CalRGB")) + *csp = fz_device_rgb; + else if (!strcmp(fz_to_name(name), "CalCMYK")) + *csp = fz_device_cmyk; + else if (!strcmp(fz_to_name(name), "Lab")) + *csp = fz_device_lab; + + else if (!strcmp(fz_to_name(name), "ICCBased")) + return load_icc_based(csp, xref, fz_array_get(obj, 1)); + + else if (!strcmp(fz_to_name(name), "Indexed")) + return load_indexed(csp, xref, obj); + else if (!strcmp(fz_to_name(name), "I")) + return load_indexed(csp, xref, obj); + + else if (!strcmp(fz_to_name(name), "Separation")) + return load_separation(csp, xref, obj); + + else if (!strcmp(fz_to_name(name), "DeviceN")) + return load_separation(csp, xref, obj); + + else + return fz_throw("syntaxerror: unknown colorspace %s", fz_to_name(name)); + + return fz_okay; + } + } + + return fz_throw("syntaxerror: could not parse color space (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); +} + +fz_error +pdf_load_colorspace(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj) +{ + fz_error error; + + if ((*csp = pdf_find_item(xref->store, fz_drop_colorspace, obj))) + { + fz_keep_colorspace(*csp); + return fz_okay; + } + + error = pdf_load_colorspace_imp(csp, xref, obj); + if (error) + return fz_rethrow(error, "cannot load colorspace (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + + pdf_store_item(xref->store, fz_keep_colorspace, fz_drop_colorspace, obj, *csp); + + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_crypt.c b/contrib/media/updf/pdf/pdf_crypt.c new file mode 100644 index 0000000000..4dd4c4e17a --- /dev/null +++ b/contrib/media/updf/pdf/pdf_crypt.c @@ -0,0 +1,847 @@ +#include "fitz.h" +#include "mupdf.h" + +enum +{ + PDF_CRYPT_NONE, + PDF_CRYPT_RC4, + PDF_CRYPT_AESV2, + PDF_CRYPT_AESV3, + PDF_CRYPT_UNKNOWN, +}; + +typedef struct pdf_crypt_filter_s pdf_crypt_filter; + +struct pdf_crypt_filter_s +{ + int method; + int length; +}; + +struct pdf_crypt_s +{ + fz_obj *id; + + int v; + int length; + fz_obj *cf; + pdf_crypt_filter stmf; + pdf_crypt_filter strf; + + int r; + unsigned char o[48]; + unsigned char u[48]; + unsigned char oe[32]; + unsigned char ue[32]; + int p; + int encrypt_metadata; + + unsigned char key[32]; /* decryption key generated from password */ +}; + +static fz_error pdf_parse_crypt_filter(pdf_crypt_filter *cf, fz_obj *dict, char *name, int defaultlength); + +/* + * Create crypt object for decrypting strings and streams + * given the Encryption and ID objects. + */ + +fz_error +pdf_new_crypt(pdf_crypt **cryptp, fz_obj *dict, fz_obj *id) +{ + pdf_crypt *crypt; + fz_error error; + fz_obj *obj; + + crypt = fz_malloc(sizeof(pdf_crypt)); + memset(crypt, 0x00, sizeof(pdf_crypt)); + + /* Common to all security handlers (PDF 1.7 table 3.18) */ + + obj = fz_dict_gets(dict, "Filter"); + if (!fz_is_name(obj)) + { + pdf_free_crypt(crypt); + return fz_throw("unspecified encryption handler"); + } + if (strcmp(fz_to_name(obj), "Standard") != 0) + { + pdf_free_crypt(crypt); + return fz_throw("unknown encryption handler: '%s'", fz_to_name(obj)); + } + + crypt->v = 0; + obj = fz_dict_gets(dict, "V"); + if (fz_is_int(obj)) + crypt->v = fz_to_int(obj); + if (crypt->v != 1 && crypt->v != 2 && crypt->v != 4 && crypt->v != 5) + { + pdf_free_crypt(crypt); + return fz_throw("unknown encryption version"); + } + + crypt->length = 40; + if (crypt->v == 2 || crypt->v == 4) + { + obj = fz_dict_gets(dict, "Length"); + if (fz_is_int(obj)) + crypt->length = fz_to_int(obj); + + /* work-around for pdf generators that assume length is in bytes */ + if (crypt->length < 40) + crypt->length = crypt->length * 8; + + if (crypt->length % 8 != 0) + { + pdf_free_crypt(crypt); + return fz_throw("invalid encryption key length"); + } + if (crypt->length > 256) + { + pdf_free_crypt(crypt); + return fz_throw("invalid encryption key length"); + } + } + + if (crypt->v == 5) + crypt->length = 256; + + if (crypt->v == 1 || crypt->v == 2) + { + crypt->stmf.method = PDF_CRYPT_RC4; + crypt->stmf.length = crypt->length; + + crypt->strf.method = PDF_CRYPT_RC4; + crypt->strf.length = crypt->length; + } + + if (crypt->v == 4 || crypt->v == 5) + { + crypt->stmf.method = PDF_CRYPT_NONE; + crypt->stmf.length = crypt->length; + + crypt->strf.method = PDF_CRYPT_NONE; + crypt->strf.length = crypt->length; + + obj = fz_dict_gets(dict, "CF"); + if (fz_is_dict(obj)) + { + crypt->cf = fz_keep_obj(obj); + } + else + { + crypt->cf = NULL; + } + + obj = fz_dict_gets(dict, "StmF"); + if (fz_is_name(obj)) + { + error = pdf_parse_crypt_filter(&crypt->stmf, crypt->cf, fz_to_name(obj), crypt->length); + if (error) + { + pdf_free_crypt(crypt); + return fz_rethrow(error, "cannot parse stream crypt filter (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + } + } + + obj = fz_dict_gets(dict, "StrF"); + if (fz_is_name(obj)) + { + error = pdf_parse_crypt_filter(&crypt->strf, crypt->cf, fz_to_name(obj), crypt->length); + if (error) + { + pdf_free_crypt(crypt); + return fz_rethrow(error, "cannot parse string crypt filter (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + } + } + + /* in crypt revision 4, the crypt filter determines the key length */ + if (crypt->strf.method != PDF_CRYPT_NONE) + crypt->length = crypt->stmf.length; + } + + /* Standard security handler (PDF 1.7 table 3.19) */ + + obj = fz_dict_gets(dict, "R"); + if (fz_is_int(obj)) + crypt->r = fz_to_int(obj); + else + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing revision value"); + } + + obj = fz_dict_gets(dict, "O"); + if (fz_is_string(obj) && fz_to_str_len(obj) == 32) + memcpy(crypt->o, fz_to_str_buf(obj), 32); + /* /O and /U are supposed to be 48 bytes long for revision 5, they're often longer, though */ + else if (crypt->r == 5 && fz_is_string(obj) && fz_to_str_len(obj) >= 48) + memcpy(crypt->o, fz_to_str_buf(obj), 48); + else + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing owner password"); + } + + obj = fz_dict_gets(dict, "U"); + if (fz_is_string(obj) && fz_to_str_len(obj) == 32) + memcpy(crypt->u, fz_to_str_buf(obj), 32); + else if (fz_is_string(obj) && fz_to_str_len(obj) >= 48 && crypt->r == 5) + memcpy(crypt->u, fz_to_str_buf(obj), 48); + else if (fz_is_string(obj) && fz_to_str_len(obj) < 32) + { + fz_warn("encryption password key too short (%d)", fz_to_str_len(obj)); + memcpy(crypt->u, fz_to_str_buf(obj), fz_to_str_len(obj)); + } + else + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing user password"); + } + + obj = fz_dict_gets(dict, "P"); + if (fz_is_int(obj)) + crypt->p = fz_to_int(obj); + else + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing permissions value"); + } + + if (crypt->r == 5) + { + obj = fz_dict_gets(dict, "OE"); + if (!fz_is_string(obj) || fz_to_str_len(obj) != 32) + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing owner encryption key"); + } + memcpy(crypt->oe, fz_to_str_buf(obj), 32); + + obj = fz_dict_gets(dict, "UE"); + if (!fz_is_string(obj) || fz_to_str_len(obj) != 32) + { + pdf_free_crypt(crypt); + return fz_throw("encryption dictionary missing user encryption key"); + } + memcpy(crypt->ue, fz_to_str_buf(obj), 32); + } + + crypt->encrypt_metadata = 1; + obj = fz_dict_gets(dict, "EncryptMetadata"); + if (fz_is_bool(obj)) + crypt->encrypt_metadata = fz_to_bool(obj); + + /* Extract file identifier string */ + + if (fz_is_array(id) && fz_array_len(id) == 2) + { + obj = fz_array_get(id, 0); + if (fz_is_string(obj)) + crypt->id = fz_keep_obj(obj); + } + else + fz_warn("missing file identifier, may not be able to do decryption"); + + *cryptp = crypt; + return fz_okay; +} + +void +pdf_free_crypt(pdf_crypt *crypt) +{ + if (crypt->id) fz_drop_obj(crypt->id); + if (crypt->cf) fz_drop_obj(crypt->cf); + fz_free(crypt); +} + +/* + * Parse a CF dictionary entry (PDF 1.7 table 3.22) + */ + +static fz_error +pdf_parse_crypt_filter(pdf_crypt_filter *cf, fz_obj *cf_obj, char *name, int defaultlength) +{ + fz_obj *obj; + fz_obj *dict; + int is_identity = (strcmp(name, "Identity") == 0); + int is_stdcf = (!is_identity && (strcmp(name, "StdCF") == 0)); + + if (!is_identity && !is_stdcf) + { + return fz_throw("Crypt Filter not Identity or StdCF (%d %d R)", fz_to_num(cf_obj), fz_to_gen(cf_obj)); + } + cf->method = PDF_CRYPT_NONE; + cf->length = defaultlength; + + if (cf_obj == NULL) + { + cf->method = (is_identity ? PDF_CRYPT_NONE : PDF_CRYPT_RC4); + return fz_okay; + } + + dict = fz_dict_gets(cf_obj, name); + if (!fz_is_dict(dict)) + { + return fz_throw("cannot parse crypt filter (%d %d R)", fz_to_num(cf_obj), fz_to_gen(cf_obj)); + } + obj = fz_dict_gets(dict, "CFM"); + if (fz_is_name(obj)) + { + if (!strcmp(fz_to_name(obj), "None")) + cf->method = PDF_CRYPT_NONE; + else if (!strcmp(fz_to_name(obj), "V2")) + cf->method = PDF_CRYPT_RC4; + else if (!strcmp(fz_to_name(obj), "AESV2")) + cf->method = PDF_CRYPT_AESV2; + else if (!strcmp(fz_to_name(obj), "AESV3")) + cf->method = PDF_CRYPT_AESV3; + else + fz_throw("unknown encryption method: %s", fz_to_name(obj)); + } + + obj = fz_dict_gets(dict, "Length"); + if (fz_is_int(obj)) + cf->length = fz_to_int(obj); + + /* the length for crypt filters is supposed to be in bytes not bits */ + if (cf->length < 40) + cf->length = cf->length * 8; + + if ((cf->length % 8) != 0) + return fz_throw("invalid key length: %d", cf->length); + + return fz_okay; +} + +/* + * Compute an encryption key (PDF 1.7 algorithm 3.2) + */ + +static const unsigned char padding[32] = +{ + 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, + 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, + 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, + 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a +}; + +static void +pdf_compute_encryption_key(pdf_crypt *crypt, unsigned char *password, int pwlen, unsigned char *key) +{ + unsigned char buf[32]; + unsigned int p; + int i, n; + fz_md5 md5; + + n = crypt->length / 8; + + /* Step 1 - copy and pad password string */ + if (pwlen > 32) + pwlen = 32; + memcpy(buf, password, pwlen); + memcpy(buf + pwlen, padding, 32 - pwlen); + + /* Step 2 - init md5 and pass value of step 1 */ + fz_md5_init(&md5); + fz_md5_update(&md5, buf, 32); + + /* Step 3 - pass O value */ + fz_md5_update(&md5, crypt->o, 32); + + /* Step 4 - pass P value as unsigned int, low-order byte first */ + p = (unsigned int) crypt->p; + buf[0] = (p) & 0xFF; + buf[1] = (p >> 8) & 0xFF; + buf[2] = (p >> 16) & 0xFF; + buf[3] = (p >> 24) & 0xFF; + fz_md5_update(&md5, buf, 4); + + /* Step 5 - pass first element of ID array */ + fz_md5_update(&md5, (unsigned char *)fz_to_str_buf(crypt->id), fz_to_str_len(crypt->id)); + + /* Step 6 (revision 4 or greater) - if metadata is not encrypted pass 0xFFFFFFFF */ + if (crypt->r >= 4) + { + if (!crypt->encrypt_metadata) + { + buf[0] = 0xFF; + buf[1] = 0xFF; + buf[2] = 0xFF; + buf[3] = 0xFF; + fz_md5_update(&md5, buf, 4); + } + } + + /* Step 7 - finish the hash */ + fz_md5_final(&md5, buf); + + /* Step 8 (revision 3 or greater) - do some voodoo 50 times */ + if (crypt->r >= 3) + { + for (i = 0; i < 50; i++) + { + fz_md5_init(&md5); + fz_md5_update(&md5, buf, n); + fz_md5_final(&md5, buf); + } + } + + /* Step 9 - the key is the first 'n' bytes of the result */ + memcpy(key, buf, n); +} + +/* + * Compute an encryption key (PDF 1.7 ExtensionLevel 3 algorithm 3.2a) + */ + +static void +pdf_compute_encryption_key_r5(pdf_crypt *crypt, unsigned char *password, int pwlen, int ownerkey, unsigned char *validationkey) +{ + unsigned char buffer[128 + 8 + 48]; + fz_sha256 sha256; + fz_aes aes; + + /* Step 2 - truncate UTF-8 password to 127 characters */ + + if (pwlen > 127) + pwlen = 127; + + /* Step 3/4 - test password against owner/user key and compute encryption key */ + + memcpy(buffer, password, pwlen); + if (ownerkey) + { + memcpy(buffer + pwlen, crypt->o + 32, 8); + memcpy(buffer + pwlen + 8, crypt->u, 48); + } + else + memcpy(buffer + pwlen, crypt->u + 32, 8); + + fz_sha256_init(&sha256); + fz_sha256_update(&sha256, buffer, pwlen + 8 + (ownerkey ? 48 : 0)); + fz_sha256_final(&sha256, validationkey); + + /* Step 3.5/4.5 - compute file encryption key from OE/UE */ + + memcpy(buffer + pwlen, crypt->u + 40, 8); + + fz_sha256_init(&sha256); + fz_sha256_update(&sha256, buffer, pwlen + 8); + fz_sha256_final(&sha256, buffer); + + // clear password buffer and use it as iv + memset(buffer + 32, 0, sizeof(buffer) - 32); + aes_setkey_dec(&aes, buffer, crypt->length); + aes_crypt_cbc(&aes, AES_DECRYPT, 32, buffer + 32, ownerkey ? crypt->oe : crypt->ue, crypt->key); +} + +/* + * Computing the user password (PDF 1.7 algorithm 3.4 and 3.5) + * Also save the generated key for decrypting objects and streams in crypt->key. + */ + +static void +pdf_compute_user_password(pdf_crypt *crypt, unsigned char *password, int pwlen, unsigned char *output) +{ + if (crypt->r == 2) + { + fz_arc4 arc4; + + pdf_compute_encryption_key(crypt, password, pwlen, crypt->key); + fz_arc4_init(&arc4, crypt->key, crypt->length / 8); + fz_arc4_encrypt(&arc4, output, padding, 32); + } + + if (crypt->r == 3 || crypt->r == 4) + { + unsigned char xor[32]; + unsigned char digest[16]; + fz_md5 md5; + fz_arc4 arc4; + int i, x, n; + + n = crypt->length / 8; + + pdf_compute_encryption_key(crypt, password, pwlen, crypt->key); + + fz_md5_init(&md5); + fz_md5_update(&md5, padding, 32); + fz_md5_update(&md5, (unsigned char*)fz_to_str_buf(crypt->id), fz_to_str_len(crypt->id)); + fz_md5_final(&md5, digest); + + fz_arc4_init(&arc4, crypt->key, n); + fz_arc4_encrypt(&arc4, output, digest, 16); + + for (x = 1; x <= 19; x++) + { + for (i = 0; i < n; i++) + xor[i] = crypt->key[i] ^ x; + fz_arc4_init(&arc4, xor, n); + fz_arc4_encrypt(&arc4, output, output, 16); + } + + memcpy(output + 16, padding, 16); + } + + if (crypt->r == 5) + { + pdf_compute_encryption_key_r5(crypt, password, pwlen, 0, output); + } +} + +/* + * Authenticating the user password (PDF 1.7 algorithm 3.6 + * and ExtensionLevel 3 algorithm 3.11) + * This also has the side effect of saving a key generated + * from the password for decrypting objects and streams. + */ + +static int +pdf_authenticate_user_password(pdf_crypt *crypt, unsigned char *password, int pwlen) +{ + unsigned char output[32]; + pdf_compute_user_password(crypt, password, pwlen, output); + if (crypt->r == 2 || crypt->r == 5) + return memcmp(output, crypt->u, 32) == 0; + if (crypt->r == 3 || crypt->r == 4) + return memcmp(output, crypt->u, 16) == 0; + return 0; +} + +/* + * Authenticating the owner password (PDF 1.7 algorithm 3.7 + * and ExtensionLevel 3 algorithm 3.12) + * Generates the user password from the owner password + * and calls pdf_authenticate_user_password. + */ + +static int +pdf_authenticate_owner_password(pdf_crypt *crypt, unsigned char *ownerpass, int pwlen) +{ + unsigned char pwbuf[32]; + unsigned char key[32]; + unsigned char xor[32]; + unsigned char userpass[32]; + int i, n, x; + fz_md5 md5; + fz_arc4 arc4; + + if (crypt->r == 5) + { + /* PDF 1.7 ExtensionLevel 3 algorithm 3.12 */ + + pdf_compute_encryption_key_r5(crypt, ownerpass, pwlen, 1, key); + + return !memcmp(key, crypt->o, 32); + } + + n = crypt->length / 8; + + /* Step 1 -- steps 1 to 4 of PDF 1.7 algorithm 3.3 */ + + /* copy and pad password string */ + if (pwlen > 32) + pwlen = 32; + memcpy(pwbuf, ownerpass, pwlen); + memcpy(pwbuf + pwlen, padding, 32 - pwlen); + + /* take md5 hash of padded password */ + fz_md5_init(&md5); + fz_md5_update(&md5, pwbuf, 32); + fz_md5_final(&md5, key); + + /* do some voodoo 50 times (Revision 3 or greater) */ + if (crypt->r >= 3) + { + for (i = 0; i < 50; i++) + { + fz_md5_init(&md5); + fz_md5_update(&md5, key, 16); + fz_md5_final(&md5, key); + } + } + + /* Step 2 (Revision 2) */ + if (crypt->r == 2) + { + fz_arc4_init(&arc4, key, n); + fz_arc4_encrypt(&arc4, userpass, crypt->o, 32); + } + + /* Step 2 (Revision 3 or greater) */ + if (crypt->r >= 3) + { + memcpy(userpass, crypt->o, 32); + for (x = 0; x < 20; x++) + { + for (i = 0; i < n; i++) + xor[i] = key[i] ^ (19 - x); + fz_arc4_init(&arc4, xor, n); + fz_arc4_encrypt(&arc4, userpass, userpass, 32); + } + } + + return pdf_authenticate_user_password(crypt, userpass, 32); +} + +int +pdf_authenticate_password(pdf_xref *xref, char *password) +{ + if (xref->crypt) + { + if (pdf_authenticate_user_password(xref->crypt, (unsigned char *)password, strlen(password))) + return 1; + if (pdf_authenticate_owner_password(xref->crypt, (unsigned char *)password, strlen(password))) + return 1; + return 0; + } + return 1; +} + +int +pdf_needs_password(pdf_xref *xref) +{ + if (!xref->crypt) + return 0; + if (pdf_authenticate_password(xref, "")) + return 0; + return 1; +} + +int +pdf_has_permission(pdf_xref *xref, int p) +{ + if (!xref->crypt) + return 1; + return xref->crypt->p & p; +} + +unsigned char * +pdf_get_crypt_key(pdf_xref *xref) +{ + if (xref->crypt) + return xref->crypt->key; + return NULL; +} + +int +pdf_get_crypt_revision(pdf_xref *xref) +{ + if (xref->crypt) + return xref->crypt->v; + return 0; +} + +char * +pdf_get_crypt_method(pdf_xref *xref) +{ + if (xref->crypt) + { + switch (xref->crypt->strf.method) + { + case PDF_CRYPT_NONE: return "None"; + case PDF_CRYPT_RC4: return "RC4"; + case PDF_CRYPT_AESV2: return "AES"; + case PDF_CRYPT_AESV3: return "AES"; + case PDF_CRYPT_UNKNOWN: return "Unknown"; + } + } + return "None"; +} + +int +pdf_get_crypt_length(pdf_xref *xref) +{ + if (xref->crypt) + return xref->crypt->length; + return 0; +} + +/* + * PDF 1.7 algorithm 3.1 and ExtensionLevel 3 algorithm 3.1a + * + * Using the global encryption key that was generated from the + * password, create a new key that is used to decrypt indivual + * objects and streams. This key is based on the object and + * generation numbers. + */ + +static int +pdf_compute_object_key(pdf_crypt *crypt, pdf_crypt_filter *cf, int num, int gen, unsigned char *key) +{ + fz_md5 md5; + unsigned char message[5]; + + if (cf->method == PDF_CRYPT_AESV3) + { + memcpy(key, crypt->key, crypt->length / 8); + return crypt->length / 8; + } + + fz_md5_init(&md5); + fz_md5_update(&md5, crypt->key, crypt->length / 8); + message[0] = (num) & 0xFF; + message[1] = (num >> 8) & 0xFF; + message[2] = (num >> 16) & 0xFF; + message[3] = (gen) & 0xFF; + message[4] = (gen >> 8) & 0xFF; + fz_md5_update(&md5, message, 5); + + if (cf->method == PDF_CRYPT_AESV2) + fz_md5_update(&md5, (unsigned char *)"sAlT", 4); + + fz_md5_final(&md5, key); + + if (crypt->length / 8 + 5 > 16) + return 16; + return crypt->length / 8 + 5; +} + +/* + * PDF 1.7 algorithm 3.1 and ExtensionLevel 3 algorithm 3.1a + * + * Decrypt all strings in obj modifying the data in-place. + * Recurse through arrays and dictionaries, but do not follow + * indirect references. + */ + +static void +pdf_crypt_obj_imp(pdf_crypt *crypt, fz_obj *obj, unsigned char *key, int keylen) +{ + unsigned char *s; + int i, n; + + if (fz_is_indirect(obj)) + return; + + if (fz_is_string(obj)) + { + s = (unsigned char *) fz_to_str_buf(obj); + n = fz_to_str_len(obj); + + if (crypt->strf.method == PDF_CRYPT_RC4) + { + fz_arc4 arc4; + fz_arc4_init(&arc4, key, keylen); + fz_arc4_encrypt(&arc4, s, s, n); + } + + if (crypt->strf.method == PDF_CRYPT_AESV2 || crypt->strf.method == PDF_CRYPT_AESV3) + { + if (n & 15 || n < 32) + fz_warn("invalid string length for aes encryption"); + else + { + unsigned char iv[16]; + fz_aes aes; + memcpy(iv, s, 16); + aes_setkey_dec(&aes, key, keylen * 8); + aes_crypt_cbc(&aes, AES_DECRYPT, n - 16, iv, s + 16, s); + /* delete space used for iv and padding bytes at end */ + if (s[n - 17] < 1 || s[n - 17] > 16) + fz_warn("aes padding out of range"); + else + fz_set_str_len(obj, n - 16 - s[n - 17]); + } + } + } + + else if (fz_is_array(obj)) + { + n = fz_array_len(obj); + for (i = 0; i < n; i++) + { + pdf_crypt_obj_imp(crypt, fz_array_get(obj, i), key, keylen); + } + } + + else if (fz_is_dict(obj)) + { + n = fz_dict_len(obj); + for (i = 0; i < n; i++) + { + pdf_crypt_obj_imp(crypt, fz_dict_get_val(obj, i), key, keylen); + } + } +} + +void +pdf_crypt_obj(pdf_crypt *crypt, fz_obj *obj, int num, int gen) +{ + unsigned char key[32]; + int len; + + len = pdf_compute_object_key(crypt, &crypt->strf, num, gen, key); + + pdf_crypt_obj_imp(crypt, obj, key, len); +} + +/* + * PDF 1.7 algorithm 3.1 and ExtensionLevel 3 algorithm 3.1a + * + * Create filter suitable for de/encrypting a stream. + */ +static fz_stream * +pdf_open_crypt_imp(fz_stream *chain, pdf_crypt *crypt, pdf_crypt_filter *stmf, int num, int gen) +{ + unsigned char key[32]; + int len; + + len = pdf_compute_object_key(crypt, stmf, num, gen, key); + + if (stmf->method == PDF_CRYPT_RC4) + return fz_open_arc4(chain, key, len); + + if (stmf->method == PDF_CRYPT_AESV2 || stmf->method == PDF_CRYPT_AESV3) + return fz_open_aesd(chain, key, len); + + return fz_open_copy(chain); +} + +fz_stream * +pdf_open_crypt(fz_stream *chain, pdf_crypt *crypt, int num, int gen) +{ + return pdf_open_crypt_imp(chain, crypt, &crypt->stmf, num, gen); +} + +fz_stream * +pdf_open_crypt_with_filter(fz_stream *chain, pdf_crypt *crypt, char *name, int num, int gen) +{ + fz_error error; + pdf_crypt_filter cf; + + if (strcmp(name, "Identity")) + { + error = pdf_parse_crypt_filter(&cf, crypt->cf, name, crypt->length); + if (error) + fz_catch(error, "cannot parse crypt filter (%d %d R)", num, gen); + else + return pdf_open_crypt_imp(chain, crypt, &cf, num, gen); + } + return chain; +} + +void pdf_debug_crypt(pdf_crypt *crypt) +{ + int i; + + printf("crypt {\n"); + + printf("\tv=%d length=%d\n", crypt->v, crypt->length); + printf("\tstmf method=%d length=%d\n", crypt->stmf.method, crypt->stmf.length); + printf("\tstrf method=%d length=%d\n", crypt->strf.method, crypt->strf.length); + printf("\tr=%d\n", crypt->r); + + printf("\to=<"); + for (i = 0; i < 32; i++) + printf("%02X", crypt->o[i]); + printf(">\n"); + + printf("\tu=<"); + for (i = 0; i < 32; i++) + printf("%02X", crypt->u[i]); + printf(">\n"); + + printf("}\n"); +} diff --git a/contrib/media/updf/pdf/pdf_encoding.c b/contrib/media/updf/pdf/pdf_encoding.c new file mode 100644 index 0000000000..9a42a1c1d9 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_encoding.c @@ -0,0 +1,83 @@ +#include "fitz.h" +#include "mupdf.h" + +#include "data_encodings.h" +#include "data_glyphlist.h" + +void +pdf_load_encoding(char **estrings, char *encoding) +{ + char **bstrings = NULL; + int i; + + if (!strcmp(encoding, "StandardEncoding")) + bstrings = (char**) pdf_standard; + if (!strcmp(encoding, "MacRomanEncoding")) + bstrings = (char**) pdf_mac_roman; + if (!strcmp(encoding, "MacExpertEncoding")) + bstrings = (char**) pdf_mac_expert; + if (!strcmp(encoding, "WinAnsiEncoding")) + bstrings = (char**) pdf_win_ansi; + + if (bstrings) + for (i = 0; i < 256; i++) + estrings[i] = bstrings[i]; +} + +int +pdf_lookup_agl(char *name) +{ + char buf[64]; + char *p; + int l = 0; + int r = nelem(agl_name_list) - 1; + + fz_strlcpy(buf, name, sizeof buf); + + /* kill anything after first period and underscore */ + p = strchr(buf, '.'); + if (p) p[0] = 0; + p = strchr(buf, '_'); + if (p) p[0] = 0; + + while (l <= r) + { + int m = (l + r) >> 1; + int c = strcmp(buf, agl_name_list[m]); + if (c < 0) + r = m - 1; + else if (c > 0) + l = m + 1; + else + return agl_code_list[m]; + } + + if (strstr(buf, "uni") == buf) + return strtol(buf + 3, NULL, 16); + else if (strstr(buf, "u") == buf) + return strtol(buf + 1, NULL, 16); + else if (strstr(buf, "a") == buf && strlen(buf) >= 3) + return strtol(buf + 1, NULL, 10); + + return 0; +} + +static const char *empty_dup_list[] = { 0 }; + +const char ** +pdf_lookup_agl_duplicates(int ucs) +{ + int l = 0; + int r = nelem(agl_dup_offsets) / 2 - 1; + while (l <= r) + { + int m = (l + r) >> 1; + if (ucs < agl_dup_offsets[m << 1]) + r = m - 1; + else if (ucs > agl_dup_offsets[m << 1]) + l = m + 1; + else + return agl_dup_names + agl_dup_offsets[(m << 1) + 1]; + } + return empty_dup_list; +} diff --git a/contrib/media/updf/pdf/pdf_font.c b/contrib/media/updf/pdf/pdf_font.c new file mode 100644 index 0000000000..e7da43c078 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_font.c @@ -0,0 +1,1162 @@ +#include "fitz.h" +#include "mupdf.h" + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_XFREE86_H + +static fz_error pdf_load_font_descriptor(pdf_font_desc *fontdesc, pdf_xref *xref, fz_obj *dict, char *collection, char *basefont); + +static char *base_font_names[14][7] = +{ + { "Courier", "CourierNew", "CourierNewPSMT", NULL }, + { "Courier-Bold", "CourierNew,Bold", "Courier,Bold", + "CourierNewPS-BoldMT", "CourierNew-Bold", NULL }, + { "Courier-Oblique", "CourierNew,Italic", "Courier,Italic", + "CourierNewPS-ItalicMT", "CourierNew-Italic", NULL }, + { "Courier-BoldOblique", "CourierNew,BoldItalic", "Courier,BoldItalic", + "CourierNewPS-BoldItalicMT", "CourierNew-BoldItalic", NULL }, + { "Helvetica", "ArialMT", "Arial", NULL }, + { "Helvetica-Bold", "Arial-BoldMT", "Arial,Bold", "Arial-Bold", + "Helvetica,Bold", NULL }, + { "Helvetica-Oblique", "Arial-ItalicMT", "Arial,Italic", "Arial-Italic", + "Helvetica,Italic", "Helvetica-Italic", NULL }, + { "Helvetica-BoldOblique", "Arial-BoldItalicMT", + "Arial,BoldItalic", "Arial-BoldItalic", + "Helvetica,BoldItalic", "Helvetica-BoldItalic", NULL }, + { "Times-Roman", "TimesNewRomanPSMT", "TimesNewRoman", + "TimesNewRomanPS", NULL }, + { "Times-Bold", "TimesNewRomanPS-BoldMT", "TimesNewRoman,Bold", + "TimesNewRomanPS-Bold", "TimesNewRoman-Bold", NULL }, + { "Times-Italic", "TimesNewRomanPS-ItalicMT", "TimesNewRoman,Italic", + "TimesNewRomanPS-Italic", "TimesNewRoman-Italic", NULL }, + { "Times-BoldItalic", "TimesNewRomanPS-BoldItalicMT", + "TimesNewRoman,BoldItalic", "TimesNewRomanPS-BoldItalic", + "TimesNewRoman-BoldItalic", NULL }, + { "Symbol", NULL }, + { "ZapfDingbats", NULL } +}; + +static int is_dynalab(char *name) +{ + if (strstr(name, "HuaTian")) + return 1; + if (strstr(name, "MingLi")) + return 1; + if ((strstr(name, "DF") == name) || strstr(name, "+DF")) + return 1; + if ((strstr(name, "DLC") == name) || strstr(name, "+DLC")) + return 1; + return 0; +} + +static int strcmp_ignore_space(char *a, char *b) +{ + while (1) + { + while (*a == ' ') + a++; + while (*b == ' ') + b++; + if (*a != *b) + return 1; + if (*a == 0) + return *a != *b; + if (*b == 0) + return *a != *b; + a++; + b++; + } +} + +static char *clean_font_name(char *fontname) +{ + int i, k; + for (i = 0; i < 14; i++) + for (k = 0; base_font_names[i][k]; k++) + if (!strcmp_ignore_space(base_font_names[i][k], fontname)) + return base_font_names[i][0]; + return fontname; +} + +/* + * FreeType and Rendering glue + */ + +enum { UNKNOWN, TYPE1, TRUETYPE }; + +static int ft_kind(FT_Face face) +{ + const char *kind = FT_Get_X11_Font_Format(face); + if (!strcmp(kind, "TrueType")) + return TRUETYPE; + if (!strcmp(kind, "Type 1")) + return TYPE1; + if (!strcmp(kind, "CFF")) + return TYPE1; + if (!strcmp(kind, "CID Type 1")) + return TYPE1; + return UNKNOWN; +} + +static int ft_is_bold(FT_Face face) +{ + return face->style_flags & FT_STYLE_FLAG_BOLD; +} + +static int ft_is_italic(FT_Face face) +{ + return face->style_flags & FT_STYLE_FLAG_ITALIC; +} + +static int ft_char_index(FT_Face face, int cid) +{ + int gid = FT_Get_Char_Index(face, cid); + if (gid == 0) + gid = FT_Get_Char_Index(face, 0xf000 + cid); + + /* some chinese fonts only ship the similarly looking 0x2026 */ + if (gid == 0 && cid == 0x22ef) + gid = FT_Get_Char_Index(face, 0x2026); + + return gid; +} + +static int ft_cid_to_gid(pdf_font_desc *fontdesc, int cid) +{ + if (fontdesc->to_ttf_cmap) + { + cid = pdf_lookup_cmap(fontdesc->to_ttf_cmap, cid); + return ft_char_index(fontdesc->font->ft_face, cid); + } + + if (fontdesc->cid_to_gid) + return fontdesc->cid_to_gid[cid]; + + return cid; +} + +int +pdf_font_cid_to_gid(pdf_font_desc *fontdesc, int cid) +{ + if (fontdesc->font->ft_face) + return ft_cid_to_gid(fontdesc, cid); + return cid; +} + +static int ft_width(pdf_font_desc *fontdesc, int cid) +{ + int gid = ft_cid_to_gid(fontdesc, cid); + int fterr = FT_Load_Glyph(fontdesc->font->ft_face, gid, + FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_TRANSFORM); + if (fterr) + { + fz_warn("freetype load glyph (gid %d): %s", gid, ft_error_string(fterr)); + return 0; + } + return ((FT_Face)fontdesc->font->ft_face)->glyph->advance.x; +} + +static int lookup_mre_code(char *name) +{ + int i; + for (i = 0; i < 256; i++) + if (pdf_mac_roman[i] && !strcmp(name, pdf_mac_roman[i])) + return i; + return -1; +} + +/* + * Load font files. + */ + +static fz_error +pdf_load_builtin_font(pdf_font_desc *fontdesc, char *fontname) +{ + fz_error error; + unsigned char *data; + unsigned int len; + + data = pdf_find_builtin_font(fontname, &len); + if (!data) + return fz_throw("cannot find builtin font: '%s'", fontname); + + error = fz_new_font_from_memory(&fontdesc->font, data, len, 0); + if (error) + return fz_rethrow(error, "cannot load freetype font from memory"); + + if (!strcmp(fontname, "Symbol") || !strcmp(fontname, "ZapfDingbats")) + fontdesc->flags |= PDF_FD_SYMBOLIC; + + return fz_okay; +} + +static fz_error +pdf_load_substitute_font(pdf_font_desc *fontdesc, int mono, int serif, int bold, int italic) +{ + fz_error error; + unsigned char *data; + unsigned int len; + + data = pdf_find_substitute_font(mono, serif, bold, italic, &len); + if (!data) + return fz_throw("cannot find substitute font"); + + error = fz_new_font_from_memory(&fontdesc->font, data, len, 0); + if (error) + return fz_rethrow(error, "cannot load freetype font from memory"); + + fontdesc->font->ft_substitute = 1; + fontdesc->font->ft_bold = bold && !ft_is_bold(fontdesc->font->ft_face); + fontdesc->font->ft_italic = italic && !ft_is_italic(fontdesc->font->ft_face); + return fz_okay; +} + +static fz_error +pdf_load_substitute_cjk_font(pdf_font_desc *fontdesc, int ros, int serif) +{ + fz_error error; + unsigned char *data; + unsigned int len; + + data = pdf_find_substitute_cjk_font(ros, serif, &len); + if (!data) + return fz_throw("cannot find builtin CJK font"); + + error = fz_new_font_from_memory(&fontdesc->font, data, len, 0); + if (error) + return fz_rethrow(error, "cannot load builtin CJK font"); + + fontdesc->font->ft_substitute = 1; + return fz_okay; +} + +static fz_error +pdf_load_system_font(pdf_font_desc *fontdesc, char *fontname, char *collection) +{ + fz_error error; + int bold = 0; + int italic = 0; + int serif = 0; + int mono = 0; + + if (strstr(fontname, "Bold")) + bold = 1; + if (strstr(fontname, "Italic")) + italic = 1; + if (strstr(fontname, "Oblique")) + italic = 1; + + if (fontdesc->flags & PDF_FD_FIXED_PITCH) + mono = 1; + if (fontdesc->flags & PDF_FD_SERIF) + serif = 1; + if (fontdesc->flags & PDF_FD_ITALIC) + italic = 1; + if (fontdesc->flags & PDF_FD_FORCE_BOLD) + bold = 1; + + if (collection) + { + if (!strcmp(collection, "Adobe-CNS1")) + return pdf_load_substitute_cjk_font(fontdesc, PDF_ROS_CNS, serif); + else if (!strcmp(collection, "Adobe-GB1")) + return pdf_load_substitute_cjk_font(fontdesc, PDF_ROS_GB, serif); + else if (!strcmp(collection, "Adobe-Japan1")) + return pdf_load_substitute_cjk_font(fontdesc, PDF_ROS_JAPAN, serif); + else if (!strcmp(collection, "Adobe-Korea1")) + return pdf_load_substitute_cjk_font(fontdesc, PDF_ROS_KOREA, serif); + return fz_throw("unknown cid collection: %s", collection); + } + + error = pdf_load_substitute_font(fontdesc, mono, serif, bold, italic); + if (error) + return fz_rethrow(error, "cannot load substitute font"); + + return fz_okay; +} + +static fz_error +pdf_load_embedded_font(pdf_font_desc *fontdesc, pdf_xref *xref, fz_obj *stmref) +{ + fz_error error; + fz_buffer *buf; + + error = pdf_load_stream(&buf, xref, fz_to_num(stmref), fz_to_gen(stmref)); + if (error) + return fz_rethrow(error, "cannot load font stream (%d %d R)", fz_to_num(stmref), fz_to_gen(stmref)); + + error = fz_new_font_from_memory(&fontdesc->font, buf->data, buf->len, 0); + if (error) + { + fz_drop_buffer(buf); + return fz_rethrow(error, "cannot load embedded font (%d %d R)", fz_to_num(stmref), fz_to_gen(stmref)); + } + + /* save the buffer so we can free it later */ + fontdesc->font->ft_data = buf->data; + fontdesc->font->ft_size = buf->len; + fz_free(buf); /* only free the fz_buffer struct, not the contained data */ + + fontdesc->is_embedded = 1; + + return fz_okay; +} + +/* + * Create and destroy + */ + +pdf_font_desc * +pdf_keep_font(pdf_font_desc *fontdesc) +{ + fontdesc->refs ++; + return fontdesc; +} + +void +pdf_drop_font(pdf_font_desc *fontdesc) +{ + if (fontdesc && --fontdesc->refs == 0) + { + if (fontdesc->font) + fz_drop_font(fontdesc->font); + if (fontdesc->encoding) + pdf_drop_cmap(fontdesc->encoding); + if (fontdesc->to_ttf_cmap) + pdf_drop_cmap(fontdesc->to_ttf_cmap); + if (fontdesc->to_unicode) + pdf_drop_cmap(fontdesc->to_unicode); + fz_free(fontdesc->cid_to_gid); + fz_free(fontdesc->cid_to_ucs); + fz_free(fontdesc->hmtx); + fz_free(fontdesc->vmtx); + fz_free(fontdesc); + } +} + +pdf_font_desc * +pdf_new_font_desc(void) +{ + pdf_font_desc *fontdesc; + + fontdesc = fz_malloc(sizeof(pdf_font_desc)); + fontdesc->refs = 1; + + fontdesc->font = NULL; + + fontdesc->flags = 0; + fontdesc->italic_angle = 0; + fontdesc->ascent = 0; + fontdesc->descent = 0; + fontdesc->cap_height = 0; + fontdesc->x_height = 0; + fontdesc->missing_width = 0; + + fontdesc->encoding = NULL; + fontdesc->to_ttf_cmap = NULL; + fontdesc->cid_to_gid_len = 0; + fontdesc->cid_to_gid = NULL; + + fontdesc->to_unicode = NULL; + fontdesc->cid_to_ucs_len = 0; + fontdesc->cid_to_ucs = NULL; + + fontdesc->wmode = 0; + + fontdesc->hmtx_cap = 0; + fontdesc->vmtx_cap = 0; + fontdesc->hmtx_len = 0; + fontdesc->vmtx_len = 0; + fontdesc->hmtx = NULL; + fontdesc->vmtx = NULL; + + fontdesc->dhmtx.lo = 0x0000; + fontdesc->dhmtx.hi = 0xFFFF; + fontdesc->dhmtx.w = 1000; + + fontdesc->dvmtx.lo = 0x0000; + fontdesc->dvmtx.hi = 0xFFFF; + fontdesc->dvmtx.x = 0; + fontdesc->dvmtx.y = 880; + fontdesc->dvmtx.w = -1000; + + fontdesc->is_embedded = 0; + + return fontdesc; +} + +/* + * Simple fonts (Type1 and TrueType) + */ + +static fz_error +pdf_load_simple_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + fz_obj *descriptor; + fz_obj *encoding; + fz_obj *widths; + unsigned short *etable = NULL; + pdf_font_desc *fontdesc; + FT_Face face; + FT_CharMap cmap; + int symbolic; + int kind; + + char *basefont; + char *fontname; + char *estrings[256]; + char ebuffer[256][32]; + int i, k, n; + int fterr; + + basefont = fz_to_name(fz_dict_gets(dict, "BaseFont")); + fontname = clean_font_name(basefont); + + /* Load font file */ + + fontdesc = pdf_new_font_desc(); + + descriptor = fz_dict_gets(dict, "FontDescriptor"); + if (descriptor) + error = pdf_load_font_descriptor(fontdesc, xref, descriptor, NULL, basefont); + else + error = pdf_load_builtin_font(fontdesc, fontname); + if (error) + goto cleanup; + + /* Some chinese documents mistakenly consider WinAnsiEncoding to be codepage 936 */ + if (!*fontdesc->font->name && + !fz_dict_gets(dict, "ToUnicode") && + !strcmp(fz_to_name(fz_dict_gets(dict, "Encoding")), "WinAnsiEncoding") && + fz_to_int(fz_dict_gets(descriptor, "Flags")) == 4) + { + /* note: without the comma, pdf_load_font_descriptor would prefer /FontName over /BaseFont */ + char *cp936fonts[] = { + "\xCB\xCE\xCC\xE5", "SimSun,Regular", + "\xBA\xDA\xCC\xE5", "SimHei,Regular", + "\xBF\xAC\xCC\xE5_GB2312", "SimKai,Regular", + "\xB7\xC2\xCB\xCE_GB2312", "SimFang,Regular", + "\xC1\xA5\xCA\xE9", "SimLi,Regular", + NULL + }; + for (i = 0; cp936fonts[i]; i += 2) + if (!strcmp(basefont, cp936fonts[i])) + break; + if (cp936fonts[i]) + { + fz_warn("workaround for S22PDF lying about chinese font encodings"); + pdf_drop_font(fontdesc); + fontdesc = pdf_new_font_desc(); + error = pdf_load_font_descriptor(fontdesc, xref, descriptor, "Adobe-GB1", cp936fonts[i+1]); + error |= pdf_load_system_cmap(&fontdesc->encoding, "GBK-EUC-H"); + error |= pdf_load_system_cmap(&fontdesc->to_unicode, "Adobe-GB1-UCS2"); + error |= pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-GB1-UCS2"); + if (error) + return fz_rethrow(error, "cannot load font"); + + face = fontdesc->font->ft_face; + kind = ft_kind(face); + goto skip_encoding; + } + } + + face = fontdesc->font->ft_face; + kind = ft_kind(face); + + /* Encoding */ + + symbolic = fontdesc->flags & 4; + + if (face->num_charmaps > 0) + cmap = face->charmaps[0]; + else + cmap = NULL; + + for (i = 0; i < face->num_charmaps; i++) + { + FT_CharMap test = face->charmaps[i]; + + if (kind == TYPE1) + { + if (test->platform_id == 7) + cmap = test; + } + + if (kind == TRUETYPE) + { + if (test->platform_id == 1 && test->encoding_id == 0) + cmap = test; + if (test->platform_id == 3 && test->encoding_id == 1) + cmap = test; + } + } + + if (cmap) + { + fterr = FT_Set_Charmap(face, cmap); + if (fterr) + fz_warn("freetype could not set cmap: %s", ft_error_string(fterr)); + } + else + fz_warn("freetype could not find any cmaps"); + + etable = fz_calloc(256, sizeof(unsigned short)); + for (i = 0; i < 256; i++) + { + estrings[i] = NULL; + etable[i] = 0; + } + + encoding = fz_dict_gets(dict, "Encoding"); + if (encoding) + { + if (fz_is_name(encoding)) + pdf_load_encoding(estrings, fz_to_name(encoding)); + + if (fz_is_dict(encoding)) + { + fz_obj *base, *diff, *item; + + base = fz_dict_gets(encoding, "BaseEncoding"); + if (fz_is_name(base)) + pdf_load_encoding(estrings, fz_to_name(base)); + else if (!fontdesc->is_embedded && !symbolic) + pdf_load_encoding(estrings, "StandardEncoding"); + + diff = fz_dict_gets(encoding, "Differences"); + if (fz_is_array(diff)) + { + n = fz_array_len(diff); + k = 0; + for (i = 0; i < n; i++) + { + item = fz_array_get(diff, i); + if (fz_is_int(item)) + k = fz_to_int(item); + if (fz_is_name(item)) + estrings[k++] = fz_to_name(item); + if (k < 0) k = 0; + if (k > 255) k = 255; + } + } + } + } + + /* start with the builtin encoding */ + for (i = 0; i < 256; i++) + etable[i] = ft_char_index(face, i); + + /* encode by glyph name where we can */ + if (kind == TYPE1) + { + for (i = 0; i < 256; i++) + { + if (estrings[i]) + { + etable[i] = FT_Get_Name_Index(face, estrings[i]); + if (etable[i] == 0) + { + int aglcode = pdf_lookup_agl(estrings[i]); + const char **dupnames = pdf_lookup_agl_duplicates(aglcode); + while (*dupnames) + { + etable[i] = FT_Get_Name_Index(face, (char*)*dupnames); + if (etable[i]) + break; + dupnames++; + } + } + } + } + } + + /* encode by glyph name where we can */ + if (kind == TRUETYPE) + { + /* Unicode cmap */ + if (!symbolic && face->charmap && face->charmap->platform_id == 3) + { + for (i = 0; i < 256; i++) + { + if (estrings[i]) + { + int aglcode = pdf_lookup_agl(estrings[i]); + if (!aglcode) + etable[i] = FT_Get_Name_Index(face, estrings[i]); + else + etable[i] = ft_char_index(face, aglcode); + } + } + } + + /* MacRoman cmap */ + else if (!symbolic && face->charmap && face->charmap->platform_id == 1) + { + for (i = 0; i < 256; i++) + { + if (estrings[i]) + { + k = lookup_mre_code(estrings[i]); + if (k <= 0) + etable[i] = FT_Get_Name_Index(face, estrings[i]); + else + etable[i] = ft_char_index(face, k); + } + } + } + + /* Symbolic cmap */ + else + { + for (i = 0; i < 256; i++) + { + if (estrings[i]) + { + etable[i] = FT_Get_Name_Index(face, estrings[i]); + if (etable[i] == 0) + etable[i] = ft_char_index(face, i); + } + } + } + } + + /* try to reverse the glyph names from the builtin encoding */ + for (i = 0; i < 256; i++) + { + if (etable[i] && !estrings[i]) + { + if (FT_HAS_GLYPH_NAMES(face)) + { + fterr = FT_Get_Glyph_Name(face, etable[i], ebuffer[i], 32); + if (fterr) + fz_warn("freetype get glyph name (gid %d): %s", etable[i], ft_error_string(fterr)); + if (ebuffer[i][0]) + estrings[i] = ebuffer[i]; + } + else + { + estrings[i] = (char*) pdf_win_ansi[i]; /* discard const */ + } + } + } + + fontdesc->encoding = pdf_new_identity_cmap(0, 1); + fontdesc->cid_to_gid_len = 256; + fontdesc->cid_to_gid = etable; + + error = pdf_load_to_unicode(fontdesc, xref, estrings, NULL, fz_dict_gets(dict, "ToUnicode")); + if (error) + fz_catch(error, "cannot load to_unicode"); + +skip_encoding: + + /* Widths */ + + pdf_set_default_hmtx(fontdesc, fontdesc->missing_width); + + widths = fz_dict_gets(dict, "Widths"); + if (widths) + { + int first, last; + + first = fz_to_int(fz_dict_gets(dict, "FirstChar")); + last = fz_to_int(fz_dict_gets(dict, "LastChar")); + + if (first < 0 || last > 255 || first > last) + first = last = 0; + + for (i = 0; i < last - first + 1; i++) + { + int wid = fz_to_int(fz_array_get(widths, i)); + pdf_add_hmtx(fontdesc, i + first, i + first, wid); + } + } + else + { + fterr = FT_Set_Char_Size(face, 1000, 1000, 72, 72); + if (fterr) + fz_warn("freetype set character size: %s", ft_error_string(fterr)); + for (i = 0; i < 256; i++) + { + pdf_add_hmtx(fontdesc, i, i, ft_width(fontdesc, i)); + } + } + + pdf_end_hmtx(fontdesc); + + *fontdescp = fontdesc; + return fz_okay; + +cleanup: + if (etable != fontdesc->cid_to_gid) + fz_free(etable); + pdf_drop_font(fontdesc); + return fz_rethrow(error, "cannot load simple font (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); +} + +/* + * CID Fonts + */ + +static fz_error +load_cid_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *encoding, fz_obj *to_unicode) +{ + fz_error error; + fz_obj *widths; + fz_obj *descriptor; + pdf_font_desc *fontdesc; + FT_Face face; + int kind; + char collection[256]; + char *basefont; + int i, k, fterr; + fz_obj *obj; + int dw; + + /* Get font name and CID collection */ + + basefont = fz_to_name(fz_dict_gets(dict, "BaseFont")); + + { + fz_obj *cidinfo; + char tmpstr[64]; + int tmplen; + + cidinfo = fz_dict_gets(dict, "CIDSystemInfo"); + if (!cidinfo) + return fz_throw("cid font is missing info"); + + obj = fz_dict_gets(cidinfo, "Registry"); + tmplen = MIN(sizeof tmpstr - 1, fz_to_str_len(obj)); + memcpy(tmpstr, fz_to_str_buf(obj), tmplen); + tmpstr[tmplen] = '\0'; + fz_strlcpy(collection, tmpstr, sizeof collection); + + fz_strlcat(collection, "-", sizeof collection); + + obj = fz_dict_gets(cidinfo, "Ordering"); + tmplen = MIN(sizeof tmpstr - 1, fz_to_str_len(obj)); + memcpy(tmpstr, fz_to_str_buf(obj), tmplen); + tmpstr[tmplen] = '\0'; + fz_strlcat(collection, tmpstr, sizeof collection); + } + + /* Load font file */ + + fontdesc = pdf_new_font_desc(); + + descriptor = fz_dict_gets(dict, "FontDescriptor"); + if (descriptor) + error = pdf_load_font_descriptor(fontdesc, xref, descriptor, collection, basefont); + else + error = fz_throw("syntaxerror: missing font descriptor"); + if (error) + goto cleanup; + + face = fontdesc->font->ft_face; + kind = ft_kind(face); + + /* Encoding */ + + error = fz_okay; + if (fz_is_name(encoding)) + { + if (!strcmp(fz_to_name(encoding), "Identity-H")) + fontdesc->encoding = pdf_new_identity_cmap(0, 2); + else if (!strcmp(fz_to_name(encoding), "Identity-V")) + fontdesc->encoding = pdf_new_identity_cmap(1, 2); + else + error = pdf_load_system_cmap(&fontdesc->encoding, fz_to_name(encoding)); + } + else if (fz_is_indirect(encoding)) + { + error = pdf_load_embedded_cmap(&fontdesc->encoding, xref, encoding); + } + else + { + error = fz_throw("syntaxerror: font missing encoding"); + } + if (error) + goto cleanup; + + pdf_set_font_wmode(fontdesc, pdf_get_wmode(fontdesc->encoding)); + + if (kind == TRUETYPE) + { + fz_obj *cidtogidmap; + + cidtogidmap = fz_dict_gets(dict, "CIDToGIDMap"); + if (fz_is_indirect(cidtogidmap)) + { + fz_buffer *buf; + + error = pdf_load_stream(&buf, xref, fz_to_num(cidtogidmap), fz_to_gen(cidtogidmap)); + if (error) + goto cleanup; + + fontdesc->cid_to_gid_len = (buf->len) / 2; + fontdesc->cid_to_gid = fz_calloc(fontdesc->cid_to_gid_len, sizeof(unsigned short)); + for (i = 0; i < fontdesc->cid_to_gid_len; i++) + fontdesc->cid_to_gid[i] = (buf->data[i * 2] << 8) + buf->data[i * 2 + 1]; + + fz_drop_buffer(buf); + } + + /* if truetype font is external, cidtogidmap should not be identity */ + /* so we map from cid to unicode and then map that through the (3 1) */ + /* unicode cmap to get a glyph id */ + else if (fontdesc->font->ft_substitute) + { + fterr = FT_Select_Charmap(face, ft_encoding_unicode); + if (fterr) + { + error = fz_throw("fonterror: no unicode cmap when emulating CID font: %s", ft_error_string(fterr)); + goto cleanup; + } + + if (!strcmp(collection, "Adobe-CNS1")) + error = pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-CNS1-UCS2"); + else if (!strcmp(collection, "Adobe-GB1")) + error = pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-GB1-UCS2"); + else if (!strcmp(collection, "Adobe-Japan1")) + error = pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-Japan1-UCS2"); + else if (!strcmp(collection, "Adobe-Japan2")) + error = pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-Japan2-UCS2"); + else if (!strcmp(collection, "Adobe-Korea1")) + error = pdf_load_system_cmap(&fontdesc->to_ttf_cmap, "Adobe-Korea1-UCS2"); + else + error = fz_okay; + + if (error) + { + error = fz_rethrow(error, "cannot load system cmap %s", collection); + goto cleanup; + } + } + } + + error = pdf_load_to_unicode(fontdesc, xref, NULL, collection, to_unicode); + if (error) + fz_catch(error, "cannot load to_unicode"); + + /* Horizontal */ + + dw = 1000; + obj = fz_dict_gets(dict, "DW"); + if (obj) + dw = fz_to_int(obj); + pdf_set_default_hmtx(fontdesc, dw); + + widths = fz_dict_gets(dict, "W"); + if (widths) + { + int c0, c1, w; + + for (i = 0; i < fz_array_len(widths); ) + { + c0 = fz_to_int(fz_array_get(widths, i)); + obj = fz_array_get(widths, i + 1); + if (fz_is_array(obj)) + { + for (k = 0; k < fz_array_len(obj); k++) + { + w = fz_to_int(fz_array_get(obj, k)); + pdf_add_hmtx(fontdesc, c0 + k, c0 + k, w); + } + i += 2; + } + else + { + c1 = fz_to_int(obj); + w = fz_to_int(fz_array_get(widths, i + 2)); + pdf_add_hmtx(fontdesc, c0, c1, w); + i += 3; + } + } + } + + pdf_end_hmtx(fontdesc); + + /* Vertical */ + + if (pdf_get_wmode(fontdesc->encoding) == 1) + { + int dw2y = 880; + int dw2w = -1000; + + obj = fz_dict_gets(dict, "DW2"); + if (obj) + { + dw2y = fz_to_int(fz_array_get(obj, 0)); + dw2w = fz_to_int(fz_array_get(obj, 1)); + } + + pdf_set_default_vmtx(fontdesc, dw2y, dw2w); + + widths = fz_dict_gets(dict, "W2"); + if (widths) + { + int c0, c1, w, x, y; + + for (i = 0; i < fz_array_len(widths); ) + { + c0 = fz_to_int(fz_array_get(widths, i)); + obj = fz_array_get(widths, i + 1); + if (fz_is_array(obj)) + { + for (k = 0; k * 3 < fz_array_len(obj); k ++) + { + w = fz_to_int(fz_array_get(obj, k * 3 + 0)); + x = fz_to_int(fz_array_get(obj, k * 3 + 1)); + y = fz_to_int(fz_array_get(obj, k * 3 + 2)); + pdf_add_vmtx(fontdesc, c0 + k, c0 + k, x, y, w); + } + i += 2; + } + else + { + c1 = fz_to_int(obj); + w = fz_to_int(fz_array_get(widths, i + 2)); + x = fz_to_int(fz_array_get(widths, i + 3)); + y = fz_to_int(fz_array_get(widths, i + 4)); + pdf_add_vmtx(fontdesc, c0, c1, x, y, w); + i += 5; + } + } + } + + pdf_end_vmtx(fontdesc); + } + + *fontdescp = fontdesc; + return fz_okay; + +cleanup: + pdf_drop_font(fontdesc); + return fz_rethrow(error, "cannot load cid font (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); +} + +static fz_error +pdf_load_type0_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + fz_obj *dfonts; + fz_obj *dfont; + fz_obj *subtype; + fz_obj *encoding; + fz_obj *to_unicode; + + dfonts = fz_dict_gets(dict, "DescendantFonts"); + if (!dfonts) + return fz_throw("cid font is missing descendant fonts"); + + dfont = fz_array_get(dfonts, 0); + + subtype = fz_dict_gets(dfont, "Subtype"); + encoding = fz_dict_gets(dict, "Encoding"); + to_unicode = fz_dict_gets(dict, "ToUnicode"); + + if (fz_is_name(subtype) && !strcmp(fz_to_name(subtype), "CIDFontType0")) + error = load_cid_font(fontdescp, xref, dfont, encoding, to_unicode); + else if (fz_is_name(subtype) && !strcmp(fz_to_name(subtype), "CIDFontType2")) + error = load_cid_font(fontdescp, xref, dfont, encoding, to_unicode); + else + error = fz_throw("syntaxerror: unknown cid font type"); + if (error) + return fz_rethrow(error, "cannot load descendant font (%d %d R)", fz_to_num(dfont), fz_to_gen(dfont)); + + return fz_okay; +} + +/* + * FontDescriptor + */ + +static fz_error +pdf_load_font_descriptor(pdf_font_desc *fontdesc, pdf_xref *xref, fz_obj *dict, char *collection, char *basefont) +{ + fz_error error; + fz_obj *obj1, *obj2, *obj3, *obj; + char *fontname; + char *origname; + FT_Face face; + + if (!strchr(basefont, ',') || strchr(basefont, '+')) + origname = fz_to_name(fz_dict_gets(dict, "FontName")); + else + origname = basefont; + fontname = clean_font_name(origname); + + fontdesc->flags = fz_to_int(fz_dict_gets(dict, "Flags")); + fontdesc->italic_angle = fz_to_real(fz_dict_gets(dict, "ItalicAngle")); + fontdesc->ascent = fz_to_real(fz_dict_gets(dict, "Ascent")); + fontdesc->descent = fz_to_real(fz_dict_gets(dict, "Descent")); + fontdesc->cap_height = fz_to_real(fz_dict_gets(dict, "CapHeight")); + fontdesc->x_height = fz_to_real(fz_dict_gets(dict, "XHeight")); + fontdesc->missing_width = fz_to_real(fz_dict_gets(dict, "MissingWidth")); + + obj1 = fz_dict_gets(dict, "FontFile"); + obj2 = fz_dict_gets(dict, "FontFile2"); + obj3 = fz_dict_gets(dict, "FontFile3"); + obj = obj1 ? obj1 : obj2 ? obj2 : obj3; + + if (fz_is_indirect(obj)) + { + error = pdf_load_embedded_font(fontdesc, xref, obj); + if (error) + { + fz_catch(error, "ignored error when loading embedded font, attempting to load system font"); + if (origname != fontname) + error = pdf_load_builtin_font(fontdesc, fontname); + else + error = pdf_load_system_font(fontdesc, fontname, collection); + if (error) + return fz_rethrow(error, "cannot load font descriptor (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + } + else + { + if (origname != fontname) + error = pdf_load_builtin_font(fontdesc, fontname); + else + error = pdf_load_system_font(fontdesc, fontname, collection); + if (error) + return fz_rethrow(error, "cannot load font descriptor (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + + fz_strlcpy(fontdesc->font->name, fontname, sizeof fontdesc->font->name); + + /* Check for DynaLab fonts that must use hinting */ + face = fontdesc->font->ft_face; + if (ft_kind(face) == TRUETYPE) + { + if (FT_IS_TRICKY(face) || is_dynalab(fontdesc->font->name)) + fontdesc->font->ft_hint = 1; + } + + return fz_okay; + +} + +static void +pdf_make_width_table(pdf_font_desc *fontdesc) +{ + fz_font *font = fontdesc->font; + int i, k, cid, gid; + + font->width_count = 0; + for (i = 0; i < fontdesc->hmtx_len; i++) + { + for (k = fontdesc->hmtx[i].lo; k <= fontdesc->hmtx[i].hi; k++) + { + cid = pdf_lookup_cmap(fontdesc->encoding, k); + gid = pdf_font_cid_to_gid(fontdesc, cid); + if (gid > font->width_count) + font->width_count = gid; + } + } + font->width_count ++; + + font->width_table = fz_calloc(font->width_count, sizeof(int)); + memset(font->width_table, 0, sizeof(int) * font->width_count); + + for (i = 0; i < fontdesc->hmtx_len; i++) + { + for (k = fontdesc->hmtx[i].lo; k <= fontdesc->hmtx[i].hi; k++) + { + cid = pdf_lookup_cmap(fontdesc->encoding, k); + gid = pdf_font_cid_to_gid(fontdesc, cid); + if (gid >= 0 && gid < font->width_count) + font->width_table[gid] = fontdesc->hmtx[i].w; + } + } +} + +fz_error +pdf_load_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict) +{ + fz_error error; + char *subtype; + fz_obj *dfonts; + fz_obj *charprocs; + + if ((*fontdescp = pdf_find_item(xref->store, pdf_drop_font, dict))) + { + pdf_keep_font(*fontdescp); + return fz_okay; + } + + subtype = fz_to_name(fz_dict_gets(dict, "Subtype")); + dfonts = fz_dict_gets(dict, "DescendantFonts"); + charprocs = fz_dict_gets(dict, "CharProcs"); + + if (subtype && !strcmp(subtype, "Type0")) + error = pdf_load_type0_font(fontdescp, xref, dict); + else if (subtype && !strcmp(subtype, "Type1")) + error = pdf_load_simple_font(fontdescp, xref, dict); + else if (subtype && !strcmp(subtype, "MMType1")) + error = pdf_load_simple_font(fontdescp, xref, dict); + else if (subtype && !strcmp(subtype, "TrueType")) + error = pdf_load_simple_font(fontdescp, xref, dict); + else if (subtype && !strcmp(subtype, "Type3")) + error = pdf_load_type3_font(fontdescp, xref, rdb, dict); + else if (charprocs) + { + fz_warn("unknown font format, guessing type3."); + error = pdf_load_type3_font(fontdescp, xref, rdb, dict); + } + else if (dfonts) + { + fz_warn("unknown font format, guessing type0."); + error = pdf_load_type0_font(fontdescp, xref, dict); + } + else + { + fz_warn("unknown font format, guessing type1 or truetype."); + error = pdf_load_simple_font(fontdescp, xref, dict); + } + if (error) + return fz_rethrow(error, "cannot load font (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + + /* Save the widths to stretch non-CJK substitute fonts */ + if ((*fontdescp)->font->ft_substitute && !(*fontdescp)->to_ttf_cmap) + pdf_make_width_table(*fontdescp); + + pdf_store_item(xref->store, pdf_keep_font, pdf_drop_font, dict, *fontdescp); + + return fz_okay; +} + +void +pdf_debug_font(pdf_font_desc *fontdesc) +{ + int i; + + printf("fontdesc {\n"); + + if (fontdesc->font->ft_face) + printf("\tfreetype font\n"); + if (fontdesc->font->t3procs) + printf("\ttype3 font\n"); + + printf("\twmode %d\n", fontdesc->wmode); + printf("\tDW %d\n", fontdesc->dhmtx.w); + + printf("\tW {\n"); + for (i = 0; i < fontdesc->hmtx_len; i++) + printf("\t\t<%04x> <%04x> %d\n", + fontdesc->hmtx[i].lo, fontdesc->hmtx[i].hi, fontdesc->hmtx[i].w); + printf("\t}\n"); + + if (fontdesc->wmode) + { + printf("\tDW2 [%d %d]\n", fontdesc->dvmtx.y, fontdesc->dvmtx.w); + printf("\tW2 {\n"); + for (i = 0; i < fontdesc->vmtx_len; i++) + printf("\t\t<%04x> <%04x> %d %d %d\n", fontdesc->vmtx[i].lo, fontdesc->vmtx[i].hi, + fontdesc->vmtx[i].x, fontdesc->vmtx[i].y, fontdesc->vmtx[i].w); + printf("\t}\n"); + } +} diff --git a/contrib/media/updf/pdf/pdf_fontfile.c b/contrib/media/updf/pdf/pdf_fontfile.c new file mode 100644 index 0000000000..fb85bee402 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_fontfile.c @@ -0,0 +1,139 @@ +#include "fitz.h" +#include "mupdf.h" + +#ifdef NOCJK +#define NOCJKFONT +#endif + +#include "../generated/font_base14.h" + +#ifndef NODROIDFONT +#include "../generated/font_droid.h" +#endif + +#ifndef NOCJKFONT +#include "../generated/font_cjk.h" +#endif + +unsigned char * +pdf_find_builtin_font(char *name, unsigned int *len) +{ + if (!strcmp("Courier", name)) { + *len = sizeof pdf_font_NimbusMonL_Regu; + return (unsigned char*) pdf_font_NimbusMonL_Regu; + } + if (!strcmp("Courier-Bold", name)) { + *len = sizeof pdf_font_NimbusMonL_Bold; + return (unsigned char*) pdf_font_NimbusMonL_Bold; + } + if (!strcmp("Courier", name)) { + *len = sizeof pdf_font_NimbusMonL_Regu; + return (unsigned char*) pdf_font_NimbusMonL_Regu; + } + if (!strcmp("Courier-Bold", name)) { + *len = sizeof pdf_font_NimbusMonL_Bold; + return (unsigned char*) pdf_font_NimbusMonL_Bold; + } + if (!strcmp("Courier-Oblique", name)) { + *len = sizeof pdf_font_NimbusMonL_ReguObli; + return (unsigned char*) pdf_font_NimbusMonL_ReguObli; + } + if (!strcmp("Courier-BoldOblique", name)) { + *len = sizeof pdf_font_NimbusMonL_BoldObli; + return (unsigned char*) pdf_font_NimbusMonL_BoldObli; + } + if (!strcmp("Helvetica", name)) { + *len = sizeof pdf_font_NimbusSanL_Regu; + return (unsigned char*) pdf_font_NimbusSanL_Regu; + } + if (!strcmp("Helvetica-Bold", name)) { + *len = sizeof pdf_font_NimbusSanL_Bold; + return (unsigned char*) pdf_font_NimbusSanL_Bold; + } + if (!strcmp("Helvetica-Oblique", name)) { + *len = sizeof pdf_font_NimbusSanL_ReguItal; + return (unsigned char*) pdf_font_NimbusSanL_ReguItal; + } + if (!strcmp("Helvetica-BoldOblique", name)) { + *len = sizeof pdf_font_NimbusSanL_BoldItal; + return (unsigned char*) pdf_font_NimbusSanL_BoldItal; + } + if (!strcmp("Times-Roman", name)) { + *len = sizeof pdf_font_NimbusRomNo9L_Regu; + return (unsigned char*) pdf_font_NimbusRomNo9L_Regu; + } + if (!strcmp("Times-Bold", name)) { + *len = sizeof pdf_font_NimbusRomNo9L_Medi; + return (unsigned char*) pdf_font_NimbusRomNo9L_Medi; + } + if (!strcmp("Times-Italic", name)) { + *len = sizeof pdf_font_NimbusRomNo9L_ReguItal; + return (unsigned char*) pdf_font_NimbusRomNo9L_ReguItal; + } + if (!strcmp("Times-BoldItalic", name)) { + *len = sizeof pdf_font_NimbusRomNo9L_MediItal; + return (unsigned char*) pdf_font_NimbusRomNo9L_MediItal; + } + if (!strcmp("Symbol", name)) { + *len = sizeof pdf_font_StandardSymL; + return (unsigned char*) pdf_font_StandardSymL; + } + if (!strcmp("ZapfDingbats", name)) { + *len = sizeof pdf_font_Dingbats; + return (unsigned char*) pdf_font_Dingbats; + } + *len = 0; + return NULL; +} + +unsigned char * +pdf_find_substitute_font(int mono, int serif, int bold, int italic, unsigned int *len) +{ +#ifdef NODROIDFONT + if (mono) { + if (bold) { + if (italic) return pdf_find_builtin_font("Courier-BoldOblique", len); + else return pdf_find_builtin_font("Courier-Bold", len); + } else { + if (italic) return pdf_find_builtin_font("Courier-Oblique", len); + else return pdf_find_builtin_font("Courier", len); + } + } else if (serif) { + if (bold) { + if (italic) return pdf_find_builtin_font("Times-BoldItalic", len); + else return pdf_find_builtin_font("Times-Bold", len); + } else { + if (italic) return pdf_find_builtin_font("Times-Italic", len); + else return pdf_find_builtin_font("Times-Roman", len); + } + } else { + if (bold) { + if (italic) return pdf_find_builtin_font("Helvetica-BoldOblique", len); + else return pdf_find_builtin_font("Helvetica-Bold", len); + } else { + if (italic) return pdf_find_builtin_font("Helvetica-Oblique", len); + else return pdf_find_builtin_font("Helvetica", len); + } + } +#else + if (mono) { + *len = sizeof pdf_font_DroidSansMono; + return (unsigned char*) pdf_font_DroidSansMono; + } else { + *len = sizeof pdf_font_DroidSans; + return (unsigned char*) pdf_font_DroidSans; + } +#endif +} + +unsigned char * +pdf_find_substitute_cjk_font(int ros, int serif, unsigned int *len) +{ +#ifndef NOCJKFONT + *len = sizeof pdf_font_DroidSansFallback; + return (unsigned char*) pdf_font_DroidSansFallback; +#else + *len = 0; + return NULL; +#endif +} diff --git a/contrib/media/updf/pdf/pdf_function.c b/contrib/media/updf/pdf/pdf_function.c new file mode 100644 index 0000000000..c11323656a --- /dev/null +++ b/contrib/media/updf/pdf/pdf_function.c @@ -0,0 +1,1694 @@ +#include "fitz.h" +#include "mupdf.h" + +enum +{ + MAXN = FZ_MAX_COLORS, + MAXM = FZ_MAX_COLORS, +}; + +typedef struct psobj_s psobj; + +enum +{ + SAMPLE = 0, + EXPONENTIAL = 2, + STITCHING = 3, + POSTSCRIPT = 4 +}; + +struct pdf_function_s +{ + int refs; + int type; /* 0=sample 2=exponential 3=stitching 4=postscript */ + int m; /* number of input values */ + int n; /* number of output values */ + float domain[MAXM][2]; /* even index : min value, odd index : max value */ + float range[MAXN][2]; /* even index : min value, odd index : max value */ + int has_range; + + union + { + struct { + unsigned short bps; + int size[MAXM]; + float encode[MAXM][2]; + float decode[MAXN][2]; + float *samples; + } sa; + + struct { + float n; + float c0[MAXN]; + float c1[MAXN]; + } e; + + struct { + int k; + pdf_function **funcs; /* k */ + float *bounds; /* k - 1 */ + float *encode; /* k * 2 */ + } st; + + struct { + psobj *code; + int cap; + } p; + } u; +}; + +#define RADIAN 57.2957795 + +static inline float lerp(float x, float xmin, float xmax, float ymin, float ymax) +{ + if (xmin == xmax) + return ymin; + if (ymin == ymax) + return ymin; + return ymin + (x - xmin) * (ymax - ymin) / (xmax - xmin); +} + +/* + * PostScript calculator + */ + +enum { PS_BOOL, PS_INT, PS_REAL, PS_OPERATOR, PS_BLOCK }; + +enum +{ + PS_OP_ABS, PS_OP_ADD, PS_OP_AND, PS_OP_ATAN, PS_OP_BITSHIFT, + PS_OP_CEILING, PS_OP_COPY, PS_OP_COS, PS_OP_CVI, PS_OP_CVR, + PS_OP_DIV, PS_OP_DUP, PS_OP_EQ, PS_OP_EXCH, PS_OP_EXP, + PS_OP_FALSE, PS_OP_FLOOR, PS_OP_GE, PS_OP_GT, PS_OP_IDIV, + PS_OP_INDEX, PS_OP_LE, PS_OP_LN, PS_OP_LOG, PS_OP_LT, PS_OP_MOD, + PS_OP_MUL, PS_OP_NE, PS_OP_NEG, PS_OP_NOT, PS_OP_OR, PS_OP_POP, + PS_OP_ROLL, PS_OP_ROUND, PS_OP_SIN, PS_OP_SQRT, PS_OP_SUB, + PS_OP_TRUE, PS_OP_TRUNCATE, PS_OP_XOR, PS_OP_IF, PS_OP_IFELSE, + PS_OP_RETURN +}; + +static char *ps_op_names[] = +{ + "abs", "add", "and", "atan", "bitshift", "ceiling", "copy", + "cos", "cvi", "cvr", "div", "dup", "eq", "exch", "exp", + "false", "floor", "ge", "gt", "idiv", "index", "le", "ln", + "log", "lt", "mod", "mul", "ne", "neg", "not", "or", "pop", + "roll", "round", "sin", "sqrt", "sub", "true", "truncate", + "xor", "if", "ifelse", "return" +}; + +struct psobj_s +{ + int type; + union + { + int b; /* boolean (stack only) */ + int i; /* integer (stack and code) */ + float f; /* real (stack and code) */ + int op; /* operator (code only) */ + int block; /* if/ifelse block pointer (code only) */ + } u; +}; + +typedef struct ps_stack_s ps_stack; + +struct ps_stack_s +{ + psobj stack[100]; + int sp; +}; + +void +pdf_debug_ps_stack(ps_stack *st) +{ + int i; + + printf("stack: "); + + for (i = 0; i < st->sp; i++) + { + switch (st->stack[i].type) + { + case PS_BOOL: + if (st->stack[i].u.b) + printf("true "); + else + printf("false "); + break; + + case PS_INT: + printf("%d ", st->stack[i].u.i); + break; + + case PS_REAL: + printf("%g ", st->stack[i].u.f); + break; + } + } + printf("\n"); + +} + +static void +ps_init_stack(ps_stack *st) +{ + memset(st->stack, 0, sizeof(st->stack)); + st->sp = 0; +} + +static inline int ps_overflow(ps_stack *st, int n) +{ + return n < 0 || st->sp + n >= nelem(st->stack); +} + +static inline int ps_underflow(ps_stack *st, int n) +{ + return n < 0 || st->sp - n < 0; +} + +static inline int ps_is_type(ps_stack *st, int t) +{ + return !ps_underflow(st, 1) && st->stack[st->sp - 1].type == t; +} + +static inline int ps_is_type2(ps_stack *st, int t) +{ + return !ps_underflow(st, 2) && st->stack[st->sp - 1].type == t && st->stack[st->sp - 2].type == t; +} + +static void +ps_push_bool(ps_stack *st, int b) +{ + if (!ps_overflow(st, 1)) + { + st->stack[st->sp].type = PS_BOOL; + st->stack[st->sp].u.b = b; + st->sp++; + } +} + +static void +ps_push_int(ps_stack *st, int n) +{ + if (!ps_overflow(st, 1)) + { + st->stack[st->sp].type = PS_INT; + st->stack[st->sp].u.i = n; + st->sp++; + } +} + +static void +ps_push_real(ps_stack *st, float n) +{ + if (!ps_overflow(st, 1)) + { + st->stack[st->sp].type = PS_REAL; + st->stack[st->sp].u.f = n; + st->sp++; + } +} + +static int +ps_pop_bool(ps_stack *st) +{ + if (!ps_underflow(st, 1)) + { + if (ps_is_type(st, PS_BOOL)) + return st->stack[--st->sp].u.b; + } + return 0; +} + +static int +ps_pop_int(ps_stack *st) +{ + if (!ps_underflow(st, 1)) + { + if (ps_is_type(st, PS_INT)) + return st->stack[--st->sp].u.i; + if (ps_is_type(st, PS_REAL)) + return st->stack[--st->sp].u.f; + } + return 0; +} + +static float +ps_pop_real(ps_stack *st) +{ + if (!ps_underflow(st, 1)) + { + if (ps_is_type(st, PS_INT)) + return st->stack[--st->sp].u.i; + if (ps_is_type(st, PS_REAL)) + return st->stack[--st->sp].u.f; + } + return 0; +} + +static void +ps_copy(ps_stack *st, int n) +{ + if (!ps_underflow(st, n) && !ps_overflow(st, n)) + { + memcpy(st->stack + st->sp, st->stack + st->sp - n, n * sizeof(psobj)); + st->sp += n; + } +} + +static void +ps_roll(ps_stack *st, int n, int j) +{ + psobj tmp; + int i; + + if (ps_underflow(st, n) || j == 0 || n == 0) + return; + + if (j >= 0) + { + j %= n; + } + else + { + j = -j % n; + if (j != 0) + j = n - j; + } + + for (i = 0; i < j; i++) + { + tmp = st->stack[st->sp - 1]; + memmove(st->stack + st->sp - n + 1, st->stack + st->sp - n, n * sizeof(psobj)); + st->stack[st->sp - n] = tmp; + } +} + +static void +ps_index(ps_stack *st, int n) +{ + if (!ps_overflow(st, 1) && !ps_underflow(st, n)) + { + st->stack[st->sp] = st->stack[st->sp - n - 1]; + st->sp++; + } +} + +static void +ps_run(psobj *code, ps_stack *st, int pc) +{ + int i1, i2; + float r1, r2; + int b1, b2; + + while (1) + { + switch (code[pc].type) + { + case PS_INT: + ps_push_int(st, code[pc++].u.i); + break; + + case PS_REAL: + ps_push_real(st, code[pc++].u.f); + break; + + case PS_OPERATOR: + switch (code[pc++].u.op) + { + case PS_OP_ABS: + if (ps_is_type(st, PS_INT)) + ps_push_int(st, abs(ps_pop_int(st))); + else + ps_push_real(st, fabsf(ps_pop_real(st))); + break; + + case PS_OP_ADD: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 + i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_real(st, r1 + r2); + } + break; + + case PS_OP_AND: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 & i2); + } + else { + b2 = ps_pop_bool(st); + b1 = ps_pop_bool(st); + ps_push_bool(st, b1 && b2); + } + break; + + case PS_OP_ATAN: + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + r1 = atan2f(r1, r2) * RADIAN; + if (r1 < 0) + r1 += 360; + ps_push_real(st, r1); + break; + + case PS_OP_BITSHIFT: + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + if (i2 > 0) + ps_push_int(st, i1 << i2); + else if (i2 < 0) + ps_push_int(st, (int)((unsigned int)i1 >> i2)); + else + ps_push_int(st, i1); + break; + + case PS_OP_CEILING: + r1 = ps_pop_real(st); + ps_push_real(st, ceilf(r1)); + break; + + case PS_OP_COPY: + ps_copy(st, ps_pop_int(st)); + break; + + case PS_OP_COS: + r1 = ps_pop_real(st); + ps_push_real(st, cosf(r1/RADIAN)); + break; + + case PS_OP_CVI: + ps_push_int(st, ps_pop_int(st)); + break; + + case PS_OP_CVR: + ps_push_real(st, ps_pop_real(st)); + break; + + case PS_OP_DIV: + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_real(st, r1 / r2); + break; + + case PS_OP_DUP: + ps_copy(st, 1); + break; + + case PS_OP_EQ: + if (ps_is_type2(st, PS_BOOL)) { + b2 = ps_pop_bool(st); + b1 = ps_pop_bool(st); + ps_push_bool(st, b1 == b2); + } + else if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 == i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 == r2); + } + break; + + case PS_OP_EXCH: + ps_roll(st, 2, 1); + break; + + case PS_OP_EXP: + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_real(st, powf(r1, r2)); + break; + + case PS_OP_FALSE: + ps_push_bool(st, 0); + break; + + case PS_OP_FLOOR: + r1 = ps_pop_real(st); + ps_push_real(st, floorf(r1)); + break; + + case PS_OP_GE: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 >= i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 >= r2); + } + break; + + case PS_OP_GT: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 > i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 > r2); + } + break; + + case PS_OP_IDIV: + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 / i2); + break; + + case PS_OP_INDEX: + ps_index(st, ps_pop_int(st)); + break; + + case PS_OP_LE: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 <= i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 <= r2); + } + break; + + case PS_OP_LN: + r1 = ps_pop_real(st); + ps_push_real(st, logf(r1)); + break; + + case PS_OP_LOG: + r1 = ps_pop_real(st); + ps_push_real(st, log10f(r1)); + break; + + case PS_OP_LT: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 < i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 < r2); + } + break; + + case PS_OP_MOD: + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 % i2); + break; + + case PS_OP_MUL: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 * i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_real(st, r1 * r2); + } + break; + + case PS_OP_NE: + if (ps_is_type2(st, PS_BOOL)) { + b2 = ps_pop_bool(st); + b1 = ps_pop_bool(st); + ps_push_bool(st, b1 != b2); + } + else if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_bool(st, i1 != i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_bool(st, r1 != r2); + } + break; + + case PS_OP_NEG: + if (ps_is_type(st, PS_INT)) + ps_push_int(st, -ps_pop_int(st)); + else + ps_push_real(st, -ps_pop_real(st)); + break; + + case PS_OP_NOT: + if (ps_is_type(st, PS_BOOL)) + ps_push_bool(st, !ps_pop_bool(st)); + else + ps_push_int(st, ~ps_pop_int(st)); + break; + + case PS_OP_OR: + if (ps_is_type2(st, PS_BOOL)) { + b2 = ps_pop_bool(st); + b1 = ps_pop_bool(st); + ps_push_bool(st, b1 || b2); + } + else { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 | i2); + } + break; + + case PS_OP_POP: + if (!ps_underflow(st, 1)) + st->sp--; + break; + + case PS_OP_ROLL: + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_roll(st, i1, i2); + break; + + case PS_OP_ROUND: + if (!ps_is_type(st, PS_INT)) { + r1 = ps_pop_real(st); + ps_push_real(st, (r1 >= 0) ? floorf(r1 + 0.5f) : ceilf(r1 - 0.5f)); + } + break; + + case PS_OP_SIN: + r1 = ps_pop_real(st); + ps_push_real(st, sinf(r1/RADIAN)); + break; + + case PS_OP_SQRT: + r1 = ps_pop_real(st); + ps_push_real(st, sqrtf(r1)); + break; + + case PS_OP_SUB: + if (ps_is_type2(st, PS_INT)) { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 - i2); + } + else { + r2 = ps_pop_real(st); + r1 = ps_pop_real(st); + ps_push_real(st, r1 - r2); + } + break; + + case PS_OP_TRUE: + ps_push_bool(st, 1); + break; + + case PS_OP_TRUNCATE: + if (!ps_is_type(st, PS_INT)) { + r1 = ps_pop_real(st); + ps_push_real(st, (r1 >= 0) ? floorf(r1) : ceilf(r1)); + } + break; + + case PS_OP_XOR: + if (ps_is_type2(st, PS_BOOL)) { + b2 = ps_pop_bool(st); + b1 = ps_pop_bool(st); + ps_push_bool(st, b1 ^ b2); + } + else { + i2 = ps_pop_int(st); + i1 = ps_pop_int(st); + ps_push_int(st, i1 ^ i2); + } + break; + + case PS_OP_IF: + b1 = ps_pop_bool(st); + if (b1) + ps_run(code, st, code[pc + 1].u.block); + pc = code[pc + 2].u.block; + break; + + case PS_OP_IFELSE: + b1 = ps_pop_bool(st); + if (b1) + ps_run(code, st, code[pc + 1].u.block); + else + ps_run(code, st, code[pc + 0].u.block); + pc = code[pc + 2].u.block; + break; + + case PS_OP_RETURN: + return; + + default: + fz_warn("foreign operator in calculator function"); + return; + } + break; + + default: + fz_warn("foreign object in calculator function"); + return; + } + } +} + +static void +resize_code(pdf_function *func, int newsize) +{ + if (newsize >= func->u.p.cap) + { + func->u.p.cap = func->u.p.cap + 64; + func->u.p.code = fz_realloc(func->u.p.code, func->u.p.cap, sizeof(psobj)); + } +} + +static fz_error +parse_code(pdf_function *func, fz_stream *stream, int *codeptr) +{ + fz_error error; + char buf[64]; + int len; + int tok; + int opptr, elseptr, ifptr; + int a, b, mid, cmp; + + memset(buf, 0, sizeof(buf)); + + while (1) + { + error = pdf_lex(&tok, stream, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "calculator function lexical error"); + + switch(tok) + { + case PDF_TOK_EOF: + return fz_throw("truncated calculator function"); + + case PDF_TOK_INT: + resize_code(func, *codeptr); + func->u.p.code[*codeptr].type = PS_INT; + func->u.p.code[*codeptr].u.i = atoi(buf); + ++*codeptr; + break; + + case PDF_TOK_REAL: + resize_code(func, *codeptr); + func->u.p.code[*codeptr].type = PS_REAL; + func->u.p.code[*codeptr].u.f = fz_atof(buf); + ++*codeptr; + break; + + case PDF_TOK_OPEN_BRACE: + opptr = *codeptr; + *codeptr += 4; + + resize_code(func, *codeptr); + + ifptr = *codeptr; + error = parse_code(func, stream, codeptr); + if (error) + return fz_rethrow(error, "error in 'if' branch"); + + error = pdf_lex(&tok, stream, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "calculator function syntax error"); + + if (tok == PDF_TOK_OPEN_BRACE) + { + elseptr = *codeptr; + error = parse_code(func, stream, codeptr); + if (error) + return fz_rethrow(error, "error in 'else' branch"); + + error = pdf_lex(&tok, stream, buf, sizeof buf, &len); + if (error) + return fz_rethrow(error, "calculator function syntax error"); + } + else + { + elseptr = -1; + } + + if (tok == PDF_TOK_KEYWORD) + { + if (!strcmp(buf, "if")) + { + if (elseptr >= 0) + return fz_throw("too many branches for 'if'"); + func->u.p.code[opptr].type = PS_OPERATOR; + func->u.p.code[opptr].u.op = PS_OP_IF; + func->u.p.code[opptr+2].type = PS_BLOCK; + func->u.p.code[opptr+2].u.block = ifptr; + func->u.p.code[opptr+3].type = PS_BLOCK; + func->u.p.code[opptr+3].u.block = *codeptr; + } + else if (!strcmp(buf, "ifelse")) + { + if (elseptr < 0) + return fz_throw("not enough branches for 'ifelse'"); + func->u.p.code[opptr].type = PS_OPERATOR; + func->u.p.code[opptr].u.op = PS_OP_IFELSE; + func->u.p.code[opptr+1].type = PS_BLOCK; + func->u.p.code[opptr+1].u.block = elseptr; + func->u.p.code[opptr+2].type = PS_BLOCK; + func->u.p.code[opptr+2].u.block = ifptr; + func->u.p.code[opptr+3].type = PS_BLOCK; + func->u.p.code[opptr+3].u.block = *codeptr; + } + else + { + return fz_throw("unknown keyword in 'if-else' context: '%s'", buf); + } + } + else + { + return fz_throw("missing keyword in 'if-else' context"); + } + break; + + case PDF_TOK_CLOSE_BRACE: + resize_code(func, *codeptr); + func->u.p.code[*codeptr].type = PS_OPERATOR; + func->u.p.code[*codeptr].u.op = PS_OP_RETURN; + ++*codeptr; + return fz_okay; + + case PDF_TOK_KEYWORD: + cmp = -1; + a = -1; + b = nelem(ps_op_names); + while (b - a > 1) + { + mid = (a + b) / 2; + cmp = strcmp(buf, ps_op_names[mid]); + if (cmp > 0) + a = mid; + else if (cmp < 0) + b = mid; + else + a = b = mid; + } + if (cmp != 0) + return fz_throw("unknown operator: '%s'", buf); + + resize_code(func, *codeptr); + func->u.p.code[*codeptr].type = PS_OPERATOR; + func->u.p.code[*codeptr].u.op = a; + ++*codeptr; + break; + + default: + return fz_throw("calculator function syntax error"); + } + } +} + +static fz_error +load_postscript_func(pdf_function *func, pdf_xref *xref, fz_obj *dict, int num, int gen) +{ + fz_error error; + fz_stream *stream; + int codeptr; + char buf[64]; + int tok; + int len; + + error = pdf_open_stream(&stream, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot open calculator function stream"); + + error = pdf_lex(&tok, stream, buf, sizeof buf, &len); + if (error) + { + fz_close(stream); + return fz_rethrow(error, "stream is not a calculator function"); + } + + if (tok != PDF_TOK_OPEN_BRACE) + { + fz_close(stream); + return fz_throw("stream is not a calculator function"); + } + + func->u.p.code = NULL; + func->u.p.cap = 0; + + codeptr = 0; + error = parse_code(func, stream, &codeptr); + if (error) + { + fz_close(stream); + return fz_rethrow(error, "cannot parse calculator function (%d %d R)", num, gen); + } + + fz_close(stream); + return fz_okay; +} + +static void +eval_postscript_func(pdf_function *func, float *in, float *out) +{ + ps_stack st; + float x; + int i; + + ps_init_stack(&st); + + for (i = 0; i < func->m; i++) + { + x = CLAMP(in[i], func->domain[i][0], func->domain[i][1]); + ps_push_real(&st, x); + } + + ps_run(func->u.p.code, &st, 0); + + for (i = func->n - 1; i >= 0; i--) + { + x = ps_pop_real(&st); + out[i] = CLAMP(x, func->range[i][0], func->range[i][1]); + } +} + +/* + * Sample function + */ + +static fz_error +load_sample_func(pdf_function *func, pdf_xref *xref, fz_obj *dict, int num, int gen) +{ + fz_error error; + fz_stream *stream; + fz_obj *obj; + int samplecount; + int bps; + int i; + + func->u.sa.samples = NULL; + + obj = fz_dict_gets(dict, "Size"); + if (!fz_is_array(obj) || fz_array_len(obj) != func->m) + return fz_throw("malformed /Size"); + for (i = 0; i < func->m; i++) + func->u.sa.size[i] = fz_to_int(fz_array_get(obj, i)); + + obj = fz_dict_gets(dict, "BitsPerSample"); + if (!fz_is_int(obj)) + return fz_throw("malformed /BitsPerSample"); + func->u.sa.bps = bps = fz_to_int(obj); + + obj = fz_dict_gets(dict, "Encode"); + if (fz_is_array(obj)) + { + if (fz_array_len(obj) != func->m * 2) + return fz_throw("malformed /Encode"); + for (i = 0; i < func->m; i++) + { + func->u.sa.encode[i][0] = fz_to_real(fz_array_get(obj, i*2+0)); + func->u.sa.encode[i][1] = fz_to_real(fz_array_get(obj, i*2+1)); + } + } + else + { + for (i = 0; i < func->m; i++) + { + func->u.sa.encode[i][0] = 0; + func->u.sa.encode[i][1] = func->u.sa.size[i] - 1; + } + } + + obj = fz_dict_gets(dict, "Decode"); + if (fz_is_array(obj)) + { + if (fz_array_len(obj) != func->n * 2) + return fz_throw("malformed /Decode"); + for (i = 0; i < func->n; i++) + { + func->u.sa.decode[i][0] = fz_to_real(fz_array_get(obj, i*2+0)); + func->u.sa.decode[i][1] = fz_to_real(fz_array_get(obj, i*2+1)); + } + } + else + { + for (i = 0; i < func->n; i++) + { + func->u.sa.decode[i][0] = func->range[i][0]; + func->u.sa.decode[i][1] = func->range[i][1]; + } + } + + for (i = 0, samplecount = func->n; i < func->m; i++) + samplecount *= func->u.sa.size[i]; + + func->u.sa.samples = fz_calloc(samplecount, sizeof(float)); + + error = pdf_open_stream(&stream, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot open samples stream (%d %d R)", num, gen); + + /* read samples */ + for (i = 0; i < samplecount; i++) + { + unsigned int x; + float s; + + if (fz_is_eof_bits(stream)) + { + fz_close(stream); + return fz_throw("truncated sample stream"); + } + + switch (bps) + { + case 1: s = fz_read_bits(stream, 1); break; + case 2: s = fz_read_bits(stream, 2) / 3.0f; break; + case 4: s = fz_read_bits(stream, 4) / 15.0f; break; + case 8: s = fz_read_byte(stream) / 255.0f; break; + case 12: s = fz_read_bits(stream, 12) / 4095.0f; break; + case 16: + x = fz_read_byte(stream) << 8; + x |= fz_read_byte(stream); + s = x / 65535.0f; + break; + case 24: + x = fz_read_byte(stream) << 16; + x |= fz_read_byte(stream) << 8; + x |= fz_read_byte(stream); + s = x / 16777215.0f; + break; + case 32: + x = fz_read_byte(stream) << 24; + x |= fz_read_byte(stream) << 16; + x |= fz_read_byte(stream) << 8; + x |= fz_read_byte(stream); + s = x / 4294967295.0f; + break; + default: + fz_close(stream); + return fz_throw("sample stream bit depth %d unsupported", bps); + } + + func->u.sa.samples[i] = s; + } + + fz_close(stream); + + return fz_okay; +} + +static float +interpolate_sample(pdf_function *func, int *scale, int *e0, int *e1, float *efrac, int dim, int idx) +{ + float a, b; + int idx0, idx1; + + idx0 = e0[dim] * scale[dim] + idx; + idx1 = e1[dim] * scale[dim] + idx; + + if (dim == 0) + { + a = func->u.sa.samples[idx0]; + b = func->u.sa.samples[idx1]; + } + else + { + a = interpolate_sample(func, scale, e0, e1, efrac, dim - 1, idx0); + b = interpolate_sample(func, scale, e0, e1, efrac, dim - 1, idx1); + } + + return a + (b - a) * efrac[dim]; +} + +static void +eval_sample_func(pdf_function *func, float *in, float *out) +{ + int e0[MAXM], e1[MAXM], scale[MAXM]; + float efrac[MAXM]; + float x; + int i; + + /* encode input coordinates */ + for (i = 0; i < func->m; i++) + { + x = CLAMP(in[i], func->domain[i][0], func->domain[i][1]); + x = lerp(x, func->domain[i][0], func->domain[i][1], + func->u.sa.encode[i][0], func->u.sa.encode[i][1]); + x = CLAMP(x, 0, func->u.sa.size[i] - 1); + e0[i] = floorf(x); + e1[i] = ceilf(x); + efrac[i] = x - floorf(x); + } + + scale[0] = func->n; + for (i = 1; i < func->m; i++) + scale[i] = scale[i - 1] * func->u.sa.size[i]; + + for (i = 0; i < func->n; i++) + { + if (func->m == 1) + { + float a = func->u.sa.samples[e0[0] * func->n + i]; + float b = func->u.sa.samples[e1[0] * func->n + i]; + + float ab = a + (b - a) * efrac[0]; + + out[i] = lerp(ab, 0, 1, func->u.sa.decode[i][0], func->u.sa.decode[i][1]); + out[i] = CLAMP(out[i], func->range[i][0], func->range[i][1]); + } + + else if (func->m == 2) + { + int s0 = func->n; + int s1 = s0 * func->u.sa.size[0]; + + float a = func->u.sa.samples[e0[0] * s0 + e0[1] * s1 + i]; + float b = func->u.sa.samples[e1[0] * s0 + e0[1] * s1 + i]; + float c = func->u.sa.samples[e0[0] * s0 + e1[1] * s1 + i]; + float d = func->u.sa.samples[e1[0] * s0 + e1[1] * s1 + i]; + + float ab = a + (b - a) * efrac[0]; + float cd = c + (d - c) * efrac[0]; + float abcd = ab + (cd - ab) * efrac[1]; + + out[i] = lerp(abcd, 0, 1, func->u.sa.decode[i][0], func->u.sa.decode[i][1]); + out[i] = CLAMP(out[i], func->range[i][0], func->range[i][1]); + } + + else + { + float x = interpolate_sample(func, scale, e0, e1, efrac, func->m - 1, i); + out[i] = lerp(x, 0, 1, func->u.sa.decode[i][0], func->u.sa.decode[i][1]); + out[i] = CLAMP(out[i], func->range[i][0], func->range[i][1]); + } + } +} + +/* + * Exponential function + */ + +static fz_error +load_exponential_func(pdf_function *func, fz_obj *dict) +{ + fz_obj *obj; + int i; + + if (func->m != 1) + return fz_throw("/Domain must be one dimension (%d)", func->m); + + obj = fz_dict_gets(dict, "N"); + if (!fz_is_int(obj) && !fz_is_real(obj)) + return fz_throw("malformed /N"); + func->u.e.n = fz_to_real(obj); + + obj = fz_dict_gets(dict, "C0"); + if (fz_is_array(obj)) + { + func->n = fz_array_len(obj); + if (func->n >= MAXN) + return fz_throw("exponential function result array out of range"); + for (i = 0; i < func->n; i++) + func->u.e.c0[i] = fz_to_real(fz_array_get(obj, i)); + } + else + { + func->n = 1; + func->u.e.c0[0] = 0; + } + + obj = fz_dict_gets(dict, "C1"); + if (fz_is_array(obj)) + { + if (fz_array_len(obj) != func->n) + return fz_throw("/C1 must match /C0 length"); + for (i = 0; i < func->n; i++) + func->u.e.c1[i] = fz_to_real(fz_array_get(obj, i)); + } + else + { + if (func->n != 1) + return fz_throw("/C1 must match /C0 length"); + func->u.e.c1[0] = 1; + } + + return fz_okay; +} + +static void +eval_exponential_func(pdf_function *func, float in, float *out) +{ + float x = in; + float tmp; + int i; + + x = CLAMP(x, func->domain[0][0], func->domain[0][1]); + + /* constraint */ + if ((func->u.e.n != (int)func->u.e.n && x < 0) || (func->u.e.n < 0 && x == 0)) + { + fz_warn("constraint error"); + return; + } + + tmp = powf(x, func->u.e.n); + for (i = 0; i < func->n; i++) + { + out[i] = func->u.e.c0[i] + tmp * (func->u.e.c1[i] - func->u.e.c0[i]); + if (func->has_range) + out[i] = CLAMP(out[i], func->range[i][0], func->range[i][1]); + } +} + +/* + * Stitching function + */ + +static fz_error +load_stitching_func(pdf_function *func, pdf_xref *xref, fz_obj *dict) +{ + pdf_function **funcs; + fz_error error; + fz_obj *obj; + fz_obj *sub; + fz_obj *num; + int k; + int i; + + func->u.st.k = 0; + + if (func->m != 1) + return fz_throw("/Domain must be one dimension (%d)", func->m); + + obj = fz_dict_gets(dict, "Functions"); + if (!fz_is_array(obj)) + return fz_throw("stitching function has no input functions"); + { + k = fz_array_len(obj); + + func->u.st.funcs = fz_calloc(k, sizeof(pdf_function*)); + func->u.st.bounds = fz_calloc(k - 1, sizeof(float)); + func->u.st.encode = fz_calloc(k * 2, sizeof(float)); + funcs = func->u.st.funcs; + + for (i = 0; i < k; i++) + { + sub = fz_array_get(obj, i); + error = pdf_load_function(&funcs[i], xref, sub); + if (error) + return fz_rethrow(error, "cannot load sub function %d (%d %d R)", i, fz_to_num(sub), fz_to_gen(sub)); + if (funcs[i]->m != 1 || funcs[i]->n != funcs[0]->n) + return fz_throw("sub function %d /Domain or /Range mismatch", i); + func->u.st.k ++; + } + + if (!func->n) + func->n = funcs[0]->n; + else if (func->n != funcs[0]->n) + return fz_throw("sub function /Domain or /Range mismatch"); + } + + obj = fz_dict_gets(dict, "Bounds"); + if (!fz_is_array(obj)) + return fz_throw("stitching function has no bounds"); + { + if (!fz_is_array(obj) || fz_array_len(obj) != k - 1) + return fz_throw("malformed /Bounds (not array or wrong length)"); + + for (i = 0; i < k-1; i++) + { + num = fz_array_get(obj, i); + if (!fz_is_int(num) && !fz_is_real(num)) + return fz_throw("malformed /Bounds (item not real)"); + func->u.st.bounds[i] = fz_to_real(num); + if (i && func->u.st.bounds[i-1] > func->u.st.bounds[i]) + return fz_throw("malformed /Bounds (item not monotonic)"); + } + + if (k != 1 && (func->domain[0][0] > func->u.st.bounds[0] || + func->domain[0][1] < func->u.st.bounds[k-2])) + fz_warn("malformed shading function bounds (domain mismatch), proceeding anyway."); + } + + obj = fz_dict_gets(dict, "Encode"); + if (!fz_is_array(obj)) + return fz_throw("stitching function is missing encoding"); + { + if (!fz_is_array(obj) || fz_array_len(obj) != k * 2) + return fz_throw("malformed /Encode"); + for (i = 0; i < k; i++) + { + func->u.st.encode[i*2+0] = fz_to_real(fz_array_get(obj, i*2+0)); + func->u.st.encode[i*2+1] = fz_to_real(fz_array_get(obj, i*2+1)); + } + } + + return fz_okay; +} + +static void +eval_stitching_func(pdf_function *func, float in, float *out) +{ + float low, high; + int k = func->u.st.k; + float *bounds = func->u.st.bounds; + int i; + + in = CLAMP(in, func->domain[0][0], func->domain[0][1]); + + for (i = 0; i < k - 1; i++) + { + if (in < bounds[i]) + break; + } + + if (i == 0 && k == 1) + { + low = func->domain[0][0]; + high = func->domain[0][1]; + } + else if (i == 0) + { + low = func->domain[0][0]; + high = bounds[0]; + } + else if (i == k - 1) + { + low = bounds[k-2]; + high = func->domain[0][1]; + } + else + { + low = bounds[i-1]; + high = bounds[i]; + } + + in = lerp(in, low, high, func->u.st.encode[i*2+0], func->u.st.encode[i*2+1]); + + pdf_eval_function(func->u.st.funcs[i], &in, 1, out, func->n); +} + +/* + * Common + */ + +pdf_function * +pdf_keep_function(pdf_function *func) +{ + func->refs ++; + return func; +} + +void +pdf_drop_function(pdf_function *func) +{ + int i; + if (--func->refs == 0) + { + switch(func->type) + { + case SAMPLE: + fz_free(func->u.sa.samples); + break; + case EXPONENTIAL: + break; + case STITCHING: + for (i = 0; i < func->u.st.k; i++) + pdf_drop_function(func->u.st.funcs[i]); + fz_free(func->u.st.funcs); + fz_free(func->u.st.bounds); + fz_free(func->u.st.encode); + break; + case POSTSCRIPT: + fz_free(func->u.p.code); + break; + } + fz_free(func); + } +} + +fz_error +pdf_load_function(pdf_function **funcp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + pdf_function *func; + fz_obj *obj; + int i; + + if ((*funcp = pdf_find_item(xref->store, pdf_drop_function, dict))) + { + pdf_keep_function(*funcp); + return fz_okay; + } + + func = fz_malloc(sizeof(pdf_function)); + memset(func, 0, sizeof(pdf_function)); + func->refs = 1; + + obj = fz_dict_gets(dict, "FunctionType"); + func->type = fz_to_int(obj); + + /* required for all */ + obj = fz_dict_gets(dict, "Domain"); + func->m = fz_array_len(obj) / 2; + for (i = 0; i < func->m; i++) + { + func->domain[i][0] = fz_to_real(fz_array_get(obj, i * 2 + 0)); + func->domain[i][1] = fz_to_real(fz_array_get(obj, i * 2 + 1)); + } + + /* required for type0 and type4, optional otherwise */ + obj = fz_dict_gets(dict, "Range"); + if (fz_is_array(obj)) + { + func->has_range = 1; + func->n = fz_array_len(obj) / 2; + for (i = 0; i < func->n; i++) + { + func->range[i][0] = fz_to_real(fz_array_get(obj, i * 2 + 0)); + func->range[i][1] = fz_to_real(fz_array_get(obj, i * 2 + 1)); + } + } + else + { + func->has_range = 0; + func->n = 0; + } + + if (func->m >= MAXM || func->n >= MAXN) + { + fz_free(func); + return fz_throw("assert: /Domain or /Range too big"); + } + + switch(func->type) + { + case SAMPLE: + error = load_sample_func(func, xref, dict, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + pdf_drop_function(func); + return fz_rethrow(error, "cannot load sampled function (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + break; + + case EXPONENTIAL: + error = load_exponential_func(func, dict); + if (error) + { + pdf_drop_function(func); + return fz_rethrow(error, "cannot load exponential function (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + break; + + case STITCHING: + error = load_stitching_func(func, xref, dict); + if (error) + { + pdf_drop_function(func); + return fz_rethrow(error, "cannot load stitching function (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + break; + + case POSTSCRIPT: + error = load_postscript_func(func, xref, dict, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + pdf_drop_function(func); + return fz_rethrow(error, "cannot load calculator function (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + break; + + default: + fz_free(func); + return fz_throw("unknown function type (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + + pdf_store_item(xref->store, pdf_keep_function, pdf_drop_function, dict, func); + + *funcp = func; + return fz_okay; +} + +void +pdf_eval_function(pdf_function *func, float *in, int inlen, float *out, int outlen) +{ + memset(out, 0, sizeof(float) * outlen); + + if (inlen != func->m) + { + fz_warn("tried to evaluate function with wrong number of inputs"); + return; + } + if (func->n != outlen) + { + fz_warn("tried to evaluate function with wrong number of outputs"); + return; + } + + switch(func->type) + { + case SAMPLE: eval_sample_func(func, in, out); break; + case EXPONENTIAL: eval_exponential_func(func, *in, out); break; + case STITCHING: eval_stitching_func(func, *in, out); break; + case POSTSCRIPT: eval_postscript_func(func, in, out); break; + } +} + +/* + * Debugging prints + */ + +static void +pdf_debug_indent(char *prefix, int level, char *suffix) +{ + int i; + + printf("%s", prefix); + + for (i = 0; i < level; i++) + printf("\t"); + + printf("%s", suffix); +} + +static void +pdf_debug_ps_func_code(psobj *funccode, psobj *code, int level) +{ + int eof, wasop; + + pdf_debug_indent("", level, "{"); + + /* Print empty blocks as { }, instead of separating braces on different lines. */ + if (code->type == PS_OPERATOR && code->u.op == PS_OP_RETURN) + { + printf(" } "); + return; + } + + pdf_debug_indent("\n", ++level, ""); + + eof = 0; + wasop = 0; + while (!eof) + { + switch (code->type) + { + case PS_INT: + if (wasop) + pdf_debug_indent("\n", level, ""); + + printf("%d ", code->u.i); + wasop = 0; + code++; + break; + + case PS_REAL: + if (wasop) + pdf_debug_indent("\n", level, ""); + + printf("%g ", code->u.f); + wasop = 0; + code++; + break; + + case PS_OPERATOR: + if (code->u.op == PS_OP_RETURN) + { + printf("\n"); + eof = 1; + } + else if (code->u.op == PS_OP_IF) + { + printf("\n"); + pdf_debug_ps_func_code(funccode, &funccode[(code + 2)->u.block], level); + + printf("%s", ps_op_names[code->u.op]); + code = &funccode[(code + 3)->u.block]; + if (code->type != PS_OPERATOR || code->u.op != PS_OP_RETURN) + pdf_debug_indent("\n", level, ""); + + wasop = 0; + } + else if (code->u.op == PS_OP_IFELSE) + { + printf("\n"); + pdf_debug_ps_func_code(funccode, &funccode[(code + 2)->u.block], level); + + printf("\n"); + pdf_debug_ps_func_code(funccode, &funccode[(code + 1)->u.block], level); + + printf("%s", ps_op_names[code->u.op]); + code = &funccode[(code + 3)->u.block]; + if (code->type != PS_OPERATOR || code->u.op != PS_OP_RETURN) + pdf_debug_indent("\n", level, ""); + + wasop = 0; + } + else + { + printf("%s ", ps_op_names[code->u.op]); + code++; + wasop = 1; + } + break; + } + } + + pdf_debug_indent("", --level, "} "); +} + +static void +pdf_debug_function_imp(pdf_function *func, int level) +{ + int i; + + pdf_debug_indent("", level, "function {\n"); + + pdf_debug_indent("", ++level, ""); + switch (func->type) + { + case SAMPLE: + printf("sampled"); + break; + case EXPONENTIAL: + printf("exponential"); + break; + case STITCHING: + printf("stitching"); + break; + case POSTSCRIPT: + printf("postscript"); + break; + } + + pdf_debug_indent("\n", level, ""); + printf("%d input -> %d output\n", func->m, func->n); + + pdf_debug_indent("", level, "domain "); + for (i = 0; i < func->m; i++) + printf("%g %g ", func->domain[i][0], func->domain[i][1]); + printf("\n"); + + if (func->has_range) + { + pdf_debug_indent("", level, "range "); + for (i = 0; i < func->n; i++) + printf("%g %g ", func->range[i][0], func->range[i][1]); + printf("\n"); + } + + switch (func->type) + { + case SAMPLE: + pdf_debug_indent("", level, ""); + printf("bps: %d\n", func->u.sa.bps); + + pdf_debug_indent("", level, ""); + printf("size: [ "); + for (i = 0; i < func->m; i++) + printf("%d ", func->u.sa.size[i]); + printf("]\n"); + + pdf_debug_indent("", level, ""); + printf("encode: [ "); + for (i = 0; i < func->m; i++) + printf("%g %g ", func->u.sa.encode[i][0], func->u.sa.encode[i][1]); + printf("]\n"); + + pdf_debug_indent("", level, ""); + printf("decode: [ "); + for (i = 0; i < func->m; i++) + printf("%g %g ", func->u.sa.decode[i][0], func->u.sa.decode[i][1]); + printf("]\n"); + break; + + case EXPONENTIAL: + pdf_debug_indent("", level, ""); + printf("n: %g\n", func->u.e.n); + + pdf_debug_indent("", level, ""); + printf("c0: [ "); + for (i = 0; i < func->n; i++) + printf("%g ", func->u.e.c0[i]); + printf("]\n"); + + pdf_debug_indent("", level, ""); + printf("c1: [ "); + for (i = 0; i < func->n; i++) + printf("%g ", func->u.e.c1[i]); + printf("]\n"); + break; + + case STITCHING: + pdf_debug_indent("", level, ""); + printf("%d functions\n", func->u.st.k); + + pdf_debug_indent("", level, ""); + printf("bounds: [ "); + for (i = 0; i < func->u.st.k - 1; i++) + printf("%g ", func->u.st.bounds[i]); + printf("]\n"); + + pdf_debug_indent("", level, ""); + printf("encode: [ "); + for (i = 0; i < func->u.st.k * 2; i++) + printf("%g ", func->u.st.encode[i]); + printf("]\n"); + + for (i = 0; i < func->u.st.k; i++) + pdf_debug_function_imp(func->u.st.funcs[i], level); + break; + + case POSTSCRIPT: + pdf_debug_ps_func_code(func->u.p.code, func->u.p.code, level); + printf("\n"); + break; + } + + pdf_debug_indent("", --level, "}\n"); +} + +void +pdf_debug_function(pdf_function *func) +{ + pdf_debug_function_imp(func, 0); +} diff --git a/contrib/media/updf/pdf/pdf_image.c b/contrib/media/updf/pdf/pdf_image.c new file mode 100644 index 0000000000..e19011005c --- /dev/null +++ b/contrib/media/updf/pdf/pdf_image.c @@ -0,0 +1,354 @@ +#include "fitz.h" +#include "mupdf.h" + +/* TODO: store JPEG compressed samples */ +/* TODO: store flate compressed samples */ + +static fz_error pdf_load_jpx_image(fz_pixmap **imgp, pdf_xref *xref, fz_obj *dict); + +static void +pdf_mask_color_key(fz_pixmap *pix, int n, int *colorkey) +{ + unsigned char *p = pix->samples; + int len = pix->w * pix->h; + int k, t; + while (len--) + { + t = 1; + for (k = 0; k < n; k++) + if (p[k] < colorkey[k * 2] || p[k] > colorkey[k * 2 + 1]) + t = 0; + if (t) + for (k = 0; k < pix->n; k++) + p[k] = 0; + p += pix->n; + } +} + +static fz_error +pdf_load_image_imp(fz_pixmap **imgp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *cstm, int forcemask) +{ + fz_stream *stm; + fz_pixmap *tile; + fz_obj *obj, *res; + fz_error error; + + int w, h, bpc, n; + int imagemask; + int interpolate; + int indexed; + fz_colorspace *colorspace; + fz_pixmap *mask; /* explicit mask/softmask image */ + int usecolorkey; + int colorkey[FZ_MAX_COLORS * 2]; + float decode[FZ_MAX_COLORS * 2]; + + int stride; + unsigned char *samples; + int i, len; + + /* special case for JPEG2000 images */ + if (pdf_is_jpx_image(dict)) + { + tile = NULL; + error = pdf_load_jpx_image(&tile, xref, dict); + if (error) + return fz_rethrow(error, "cannot load jpx image"); + if (forcemask) + { + if (tile->n != 2) + { + fz_drop_pixmap(tile); + return fz_throw("softmask must be grayscale"); + } + mask = fz_alpha_from_gray(tile, 1); + fz_drop_pixmap(tile); + *imgp = mask; + return fz_okay; + } + *imgp = tile; + return fz_okay; + } + + w = fz_to_int(fz_dict_getsa(dict, "Width", "W")); + h = fz_to_int(fz_dict_getsa(dict, "Height", "H")); + bpc = fz_to_int(fz_dict_getsa(dict, "BitsPerComponent", "BPC")); + imagemask = fz_to_bool(fz_dict_getsa(dict, "ImageMask", "IM")); + interpolate = fz_to_bool(fz_dict_getsa(dict, "Interpolate", "I")); + + indexed = 0; + usecolorkey = 0; + colorspace = NULL; + mask = NULL; + + if (imagemask) + bpc = 1; + + if (w == 0) + return fz_throw("image width is zero"); + if (h == 0) + return fz_throw("image height is zero"); + if (bpc == 0) + return fz_throw("image depth is zero"); + if (bpc > 16) + return fz_throw("image depth is too large: %d", bpc); + if (w > (1 << 16)) + return fz_throw("image is too wide"); + if (h > (1 << 16)) + return fz_throw("image is too high"); + + obj = fz_dict_getsa(dict, "ColorSpace", "CS"); + if (obj && !imagemask && !forcemask) + { + /* colorspace resource lookup is only done for inline images */ + if (fz_is_name(obj)) + { + res = fz_dict_get(fz_dict_gets(rdb, "ColorSpace"), obj); + if (res) + obj = res; + } + + error = pdf_load_colorspace(&colorspace, xref, obj); + if (error) + return fz_rethrow(error, "cannot load image colorspace"); + + if (!strcmp(colorspace->name, "Indexed")) + indexed = 1; + + n = colorspace->n; + } + else + { + n = 1; + } + + obj = fz_dict_getsa(dict, "Decode", "D"); + if (obj) + { + for (i = 0; i < n * 2; i++) + decode[i] = fz_to_real(fz_array_get(obj, i)); + } + else + { + float maxval = indexed ? (1 << bpc) - 1 : 1; + for (i = 0; i < n * 2; i++) + decode[i] = i & 1 ? maxval : 0; + } + + obj = fz_dict_getsa(dict, "SMask", "Mask"); + if (fz_is_dict(obj)) + { + /* Not allowed for inline images */ + if (!cstm) + { + error = pdf_load_image_imp(&mask, xref, rdb, obj, NULL, 1); + if (error) + { + if (colorspace) + fz_drop_colorspace(colorspace); + return fz_rethrow(error, "cannot load image mask/softmask"); + } + } + } + else if (fz_is_array(obj)) + { + usecolorkey = 1; + for (i = 0; i < n * 2; i++) + colorkey[i] = fz_to_int(fz_array_get(obj, i)); + } + + /* Allocate now, to fail early if we run out of memory */ + tile = fz_new_pixmap_with_limit(colorspace, w, h); + if (!tile) + { + if (colorspace) + fz_drop_colorspace(colorspace); + if (mask) + fz_drop_pixmap(mask); + return fz_throw("out of memory"); + } + + if (colorspace) + fz_drop_colorspace(colorspace); + + tile->mask = mask; + tile->interpolate = interpolate; + + stride = (w * n * bpc + 7) / 8; + + if (cstm) + { + stm = pdf_open_inline_stream(cstm, xref, dict, stride * h); + } + else + { + error = pdf_open_stream(&stm, xref, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + fz_drop_pixmap(tile); + return fz_rethrow(error, "cannot open image data stream (%d 0 R)", fz_to_num(dict)); + } + } + + samples = fz_calloc(h, stride); + + len = fz_read(stm, samples, h * stride); + if (len < 0) + { + fz_close(stm); + fz_free(samples); + fz_drop_pixmap(tile); + return fz_rethrow(len, "cannot read image data"); + } + + /* Make sure we read the EOF marker (for inline images only) */ + if (cstm) + { + unsigned char tbuf[512]; + int tlen = fz_read(stm, tbuf, sizeof tbuf); + if (tlen < 0) + fz_catch(tlen, "ignoring error at end of image"); + if (tlen > 0) + fz_warn("ignoring garbage at end of image"); + } + + fz_close(stm); + + /* Pad truncated images */ + if (len < stride * h) + { + fz_warn("padding truncated image (%d 0 R)", fz_to_num(dict)); + memset(samples + len, 0, stride * h - len); + } + + /* Invert 1-bit image masks */ + if (imagemask) + { + /* 0=opaque and 1=transparent so we need to invert */ + unsigned char *p = samples; + len = h * stride; + for (i = 0; i < len; i++) + p[i] = ~p[i]; + } + + fz_unpack_tile(tile, samples, n, bpc, stride, indexed); + + fz_free(samples); + + if (usecolorkey) + pdf_mask_color_key(tile, n, colorkey); + + if (indexed) + { + fz_pixmap *conv; + fz_decode_indexed_tile(tile, decode, (1 << bpc) - 1); + conv = pdf_expand_indexed_pixmap(tile); + fz_drop_pixmap(tile); + tile = conv; + } + else + { + fz_decode_tile(tile, decode); + } + + *imgp = tile; + return fz_okay; +} + +fz_error +pdf_load_inline_image(fz_pixmap **pixp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *file) +{ + fz_error error; + + error = pdf_load_image_imp(pixp, xref, rdb, dict, file, 0); + if (error) + return fz_rethrow(error, "cannot load inline image"); + + return fz_okay; +} + +int +pdf_is_jpx_image(fz_obj *dict) +{ + fz_obj *filter; + int i; + + filter = fz_dict_gets(dict, "Filter"); + if (!strcmp(fz_to_name(filter), "JPXDecode")) + return 1; + for (i = 0; i < fz_array_len(filter); i++) + if (!strcmp(fz_to_name(fz_array_get(filter, i)), "JPXDecode")) + return 1; + return 0; +} + +static fz_error +pdf_load_jpx_image(fz_pixmap **imgp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + fz_buffer *buf; + fz_colorspace *colorspace; + fz_pixmap *img; + fz_obj *obj; + + colorspace = NULL; + + error = pdf_load_stream(&buf, xref, fz_to_num(dict), fz_to_gen(dict)); + if (error) + return fz_rethrow(error, "cannot load jpx image data"); + + obj = fz_dict_gets(dict, "ColorSpace"); + if (obj) + { + error = pdf_load_colorspace(&colorspace, xref, obj); + if (error) + fz_catch(error, "cannot load image colorspace"); + } + + error = fz_load_jpx_image(&img, buf->data, buf->len, colorspace); + if (error) + { + if (colorspace) + fz_drop_colorspace(colorspace); + fz_drop_buffer(buf); + return fz_rethrow(error, "cannot load jpx image"); + } + + if (colorspace) + fz_drop_colorspace(colorspace); + fz_drop_buffer(buf); + + obj = fz_dict_getsa(dict, "SMask", "Mask"); + if (fz_is_dict(obj)) + { + error = pdf_load_image_imp(&img->mask, xref, NULL, obj, NULL, 1); + if (error) + { + fz_drop_pixmap(img); + return fz_rethrow(error, "cannot load image mask/softmask"); + } + } + + *imgp = img; + return fz_okay; +} + +fz_error +pdf_load_image(fz_pixmap **pixp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + + if ((*pixp = pdf_find_item(xref->store, fz_drop_pixmap, dict))) + { + fz_keep_pixmap(*pixp); + return fz_okay; + } + + error = pdf_load_image_imp(pixp, xref, NULL, dict, NULL, 0); + if (error) + return fz_rethrow(error, "cannot load image (%d 0 R)", fz_to_num(dict)); + + pdf_store_item(xref->store, fz_keep_pixmap, fz_drop_pixmap, dict, *pixp); + + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_interpret.c b/contrib/media/updf/pdf/pdf_interpret.c new file mode 100644 index 0000000000..1682f79a8f --- /dev/null +++ b/contrib/media/updf/pdf/pdf_interpret.c @@ -0,0 +1,2304 @@ +#include "fitz.h" +#include "mupdf.h" + +#define TILE + +typedef struct pdf_material_s pdf_material; +typedef struct pdf_gstate_s pdf_gstate; +typedef struct pdf_csi_s pdf_csi; + +enum +{ + PDF_FILL, + PDF_STROKE, +}; + +enum +{ + PDF_MAT_NONE, + PDF_MAT_COLOR, + PDF_MAT_PATTERN, + PDF_MAT_SHADE, +}; + +struct pdf_material_s +{ + int kind; + fz_colorspace *colorspace; + pdf_pattern *pattern; + fz_shade *shade; + float alpha; + float v[32]; +}; + +struct pdf_gstate_s +{ + fz_matrix ctm; + int clip_depth; + + /* path stroking */ + fz_stroke_state stroke_state; + + /* materials */ + pdf_material stroke; + pdf_material fill; + + /* text state */ + float char_space; + float word_space; + float scale; + float leading; + pdf_font_desc *font; + float size; + int render; + float rise; + + /* transparency */ + int blendmode; + pdf_xobject *softmask; + fz_matrix softmask_ctm; + float softmask_bc[FZ_MAX_COLORS]; + int luminosity; +}; + +struct pdf_csi_s +{ + fz_device *dev; + pdf_xref *xref; + + /* usage mode for optional content groups */ + char *target; /* "View", "Print", "Export" */ + + /* interpreter stack */ + fz_obj *obj; + char name[256]; + unsigned char string[256]; + int string_len; + float stack[32]; + int top; + + int xbalance; + int in_text; + + /* path object state */ + fz_path *path; + + /* text object state */ + fz_text *text; + fz_matrix tlm; + fz_matrix tm; + int text_mode; + int accumulate; + + /* graphics state */ + fz_matrix top_ctm; + pdf_gstate gstate[64]; + int gtop; +}; + +static fz_error pdf_run_buffer(pdf_csi *csi, fz_obj *rdb, fz_buffer *contents); +static fz_error pdf_run_xobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj, fz_matrix transform); +static void pdf_show_pattern(pdf_csi *csi, pdf_pattern *pat, fz_rect area, int what); + + +static int +pdf_is_hidden_ocg(fz_obj *xobj, char *target) +{ + char target_state[16]; + fz_obj *obj; + + fz_strlcpy(target_state, target, sizeof target_state); + fz_strlcat(target_state, "State", sizeof target_state); + + obj = fz_dict_gets(xobj, "OC"); + obj = fz_dict_gets(obj, "OCGs"); + if (fz_is_array(obj)) + obj = fz_array_get(obj, 0); + obj = fz_dict_gets(obj, "Usage"); + obj = fz_dict_gets(obj, target); + obj = fz_dict_gets(obj, target_state); + return !strcmp(fz_to_name(obj), "OFF"); +} + +/* + * Emit graphics calls to device. + */ + +static void +pdf_begin_group(pdf_csi *csi, fz_rect bbox) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_error error; + + if (gstate->softmask) + { + pdf_xobject *softmask = gstate->softmask; + fz_rect bbox = fz_transform_rect(gstate->softmask_ctm, softmask->bbox); + fz_matrix save_ctm = gstate->ctm; + + gstate->softmask = NULL; + gstate->ctm = gstate->softmask_ctm; + + fz_begin_mask(csi->dev, bbox, gstate->luminosity, + softmask->colorspace, gstate->softmask_bc); + error = pdf_run_xobject(csi, NULL, softmask, fz_identity); + if (error) + fz_catch(error, "cannot run softmask"); + fz_end_mask(csi->dev); + + gstate->softmask = softmask; + gstate->ctm = save_ctm; + } + + if (gstate->blendmode) + fz_begin_group(csi->dev, bbox, 1, 0, gstate->blendmode, 1); +} + +static void +pdf_end_group(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + + if (gstate->blendmode) + fz_end_group(csi->dev); + + if (gstate->softmask) + fz_pop_clip(csi->dev); +} + +static void +pdf_show_shade(pdf_csi *csi, fz_shade *shd) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_rect bbox; + + bbox = fz_bound_shade(shd, gstate->ctm); + + pdf_begin_group(csi, bbox); + + fz_fill_shade(csi->dev, shd, gstate->ctm, gstate->fill.alpha); + + pdf_end_group(csi); +} + +static void +pdf_show_image(pdf_csi *csi, fz_pixmap *image) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_rect bbox; + + bbox = fz_transform_rect(gstate->ctm, fz_unit_rect); + + if (image->mask) + { + /* apply blend group even though we skip the softmask */ + if (gstate->blendmode) + fz_begin_group(csi->dev, bbox, 0, 0, gstate->blendmode, 1); + fz_clip_image_mask(csi->dev, image->mask, &bbox, gstate->ctm); + } + else + pdf_begin_group(csi, bbox); + + if (!image->colorspace) + { + + switch (gstate->fill.kind) + { + case PDF_MAT_NONE: + break; + case PDF_MAT_COLOR: + fz_fill_image_mask(csi->dev, image, gstate->ctm, + gstate->fill.colorspace, gstate->fill.v, gstate->fill.alpha); + break; + case PDF_MAT_PATTERN: + if (gstate->fill.pattern) + { + fz_clip_image_mask(csi->dev, image, &bbox, gstate->ctm); + pdf_show_pattern(csi, gstate->fill.pattern, bbox, PDF_FILL); + fz_pop_clip(csi->dev); + } + break; + case PDF_MAT_SHADE: + if (gstate->fill.shade) + { + fz_clip_image_mask(csi->dev, image, &bbox, gstate->ctm); + fz_fill_shade(csi->dev, gstate->fill.shade, gstate->ctm, gstate->fill.alpha); + fz_pop_clip(csi->dev); + } + break; + } + } + else + { + fz_fill_image(csi->dev, image, gstate->ctm, gstate->fill.alpha); + } + + if (image->mask) + { + fz_pop_clip(csi->dev); + if (gstate->blendmode) + fz_end_group(csi->dev); + } + else + pdf_end_group(csi); +} + +static void pdf_show_clip(pdf_csi *csi, int even_odd) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + + gstate->clip_depth++; + fz_clip_path(csi->dev, csi->path, NULL, even_odd, gstate->ctm); +} + +static void +pdf_show_path(pdf_csi *csi, int doclose, int dofill, int dostroke, int even_odd) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_path *path; + fz_rect bbox; + + path = csi->path; + csi->path = fz_new_path(); + + if (doclose) + fz_closepath(path); + + if (dostroke) + bbox = fz_bound_path(path, &gstate->stroke_state, gstate->ctm); + else + bbox = fz_bound_path(path, NULL, gstate->ctm); + + if (dofill || dostroke) + pdf_begin_group(csi, bbox); + + if (dofill) + { + switch (gstate->fill.kind) + { + case PDF_MAT_NONE: + break; + case PDF_MAT_COLOR: + fz_fill_path(csi->dev, path, even_odd, gstate->ctm, + gstate->fill.colorspace, gstate->fill.v, gstate->fill.alpha); + break; + case PDF_MAT_PATTERN: + if (gstate->fill.pattern) + { + fz_clip_path(csi->dev, path, NULL, even_odd, gstate->ctm); + pdf_show_pattern(csi, gstate->fill.pattern, bbox, PDF_FILL); + fz_pop_clip(csi->dev); + } + break; + case PDF_MAT_SHADE: + if (gstate->fill.shade) + { + fz_clip_path(csi->dev, path, NULL, even_odd, gstate->ctm); + fz_fill_shade(csi->dev, gstate->fill.shade, csi->top_ctm, gstate->fill.alpha); + fz_pop_clip(csi->dev); + } + break; + } + } + + if (dostroke) + { + switch (gstate->stroke.kind) + { + case PDF_MAT_NONE: + break; + case PDF_MAT_COLOR: + fz_stroke_path(csi->dev, path, &gstate->stroke_state, gstate->ctm, + gstate->stroke.colorspace, gstate->stroke.v, gstate->stroke.alpha); + break; + case PDF_MAT_PATTERN: + if (gstate->stroke.pattern) + { + fz_clip_stroke_path(csi->dev, path, &bbox, &gstate->stroke_state, gstate->ctm); + pdf_show_pattern(csi, gstate->stroke.pattern, bbox, PDF_FILL); + fz_pop_clip(csi->dev); + } + break; + case PDF_MAT_SHADE: + if (gstate->stroke.shade) + { + fz_clip_stroke_path(csi->dev, path, &bbox, &gstate->stroke_state, gstate->ctm); + fz_fill_shade(csi->dev, gstate->stroke.shade, csi->top_ctm, gstate->stroke.alpha); + fz_pop_clip(csi->dev); + } + break; + } + } + + if (dofill || dostroke) + pdf_end_group(csi); + + fz_free_path(path); +} + +/* + * Assemble and emit text + */ + +static void +pdf_flush_text(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_text *text; + int dofill = 0; + int dostroke = 0; + int doclip = 0; + int doinvisible = 0; + fz_rect bbox; + + if (!csi->text) + return; + text = csi->text; + csi->text = NULL; + + dofill = dostroke = doclip = doinvisible = 0; + switch (csi->text_mode) + { + case 0: dofill = 1; break; + case 1: dostroke = 1; break; + case 2: dofill = dostroke = 1; break; + case 3: doinvisible = 1; break; + case 4: dofill = doclip = 1; break; + case 5: dostroke = doclip = 1; break; + case 6: dofill = dostroke = doclip = 1; break; + case 7: doclip = 1; break; + } + + bbox = fz_bound_text(text, gstate->ctm); + + pdf_begin_group(csi, bbox); + + if (doinvisible) + fz_ignore_text(csi->dev, text, gstate->ctm); + + if (doclip) + { + if (csi->accumulate < 2) + gstate->clip_depth++; + fz_clip_text(csi->dev, text, gstate->ctm, csi->accumulate); + csi->accumulate = 2; + } + + if (dofill) + { + switch (gstate->fill.kind) + { + case PDF_MAT_NONE: + break; + case PDF_MAT_COLOR: + fz_fill_text(csi->dev, text, gstate->ctm, + gstate->fill.colorspace, gstate->fill.v, gstate->fill.alpha); + break; + case PDF_MAT_PATTERN: + if (gstate->fill.pattern) + { + fz_clip_text(csi->dev, text, gstate->ctm, 0); + pdf_show_pattern(csi, gstate->fill.pattern, bbox, PDF_FILL); + fz_pop_clip(csi->dev); + } + break; + case PDF_MAT_SHADE: + if (gstate->fill.shade) + { + fz_clip_text(csi->dev, text, gstate->ctm, 0); + fz_fill_shade(csi->dev, gstate->fill.shade, csi->top_ctm, gstate->fill.alpha); + fz_pop_clip(csi->dev); + } + break; + } + } + + if (dostroke) + { + switch (gstate->stroke.kind) + { + case PDF_MAT_NONE: + break; + case PDF_MAT_COLOR: + fz_stroke_text(csi->dev, text, &gstate->stroke_state, gstate->ctm, + gstate->stroke.colorspace, gstate->stroke.v, gstate->stroke.alpha); + break; + case PDF_MAT_PATTERN: + if (gstate->stroke.pattern) + { + fz_clip_stroke_text(csi->dev, text, &gstate->stroke_state, gstate->ctm); + pdf_show_pattern(csi, gstate->stroke.pattern, bbox, PDF_FILL); + fz_pop_clip(csi->dev); + } + break; + case PDF_MAT_SHADE: + if (gstate->stroke.shade) + { + fz_clip_stroke_text(csi->dev, text, &gstate->stroke_state, gstate->ctm); + fz_fill_shade(csi->dev, gstate->stroke.shade, csi->top_ctm, gstate->stroke.alpha); + fz_pop_clip(csi->dev); + } + break; + } + } + + pdf_end_group(csi); + + fz_free_text(text); +} + +static void +pdf_show_char(pdf_csi *csi, int cid) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + pdf_font_desc *fontdesc = gstate->font; + fz_matrix tsm, trm; + float w0, w1, tx, ty; + pdf_hmtx h; + pdf_vmtx v; + int gid; + int ucsbuf[8]; + int ucslen; + int i; + + tsm.a = gstate->size * gstate->scale; + tsm.b = 0; + tsm.c = 0; + tsm.d = gstate->size; + tsm.e = 0; + tsm.f = gstate->rise; + + ucslen = 0; + if (fontdesc->to_unicode) + ucslen = pdf_lookup_cmap_full(fontdesc->to_unicode, cid, ucsbuf); + if (ucslen == 0 && cid < fontdesc->cid_to_ucs_len) + { + ucsbuf[0] = fontdesc->cid_to_ucs[cid]; + ucslen = 1; + } + if (ucslen == 0 || (ucslen == 1 && ucsbuf[0] == 0)) + { + ucsbuf[0] = '?'; + ucslen = 1; + } + + gid = pdf_font_cid_to_gid(fontdesc, cid); + + if (fontdesc->wmode == 1) + { + v = pdf_get_vmtx(fontdesc, cid); + tsm.e -= v.x * gstate->size * 0.001f; + tsm.f -= v.y * gstate->size * 0.001f; + } + + trm = fz_concat(tsm, csi->tm); + + /* flush buffered text if face or matrix or rendermode has changed */ + if (!csi->text || + fontdesc->font != csi->text->font || + fontdesc->wmode != csi->text->wmode || + fabsf(trm.a - csi->text->trm.a) > FLT_EPSILON || + fabsf(trm.b - csi->text->trm.b) > FLT_EPSILON || + fabsf(trm.c - csi->text->trm.c) > FLT_EPSILON || + fabsf(trm.d - csi->text->trm.d) > FLT_EPSILON || + gstate->render != csi->text_mode) + { + pdf_flush_text(csi); + + csi->text = fz_new_text(fontdesc->font, trm, fontdesc->wmode); + csi->text->trm.e = 0; + csi->text->trm.f = 0; + csi->text_mode = gstate->render; + } + + /* add glyph to textobject */ + fz_add_text(csi->text, gid, ucsbuf[0], trm.e, trm.f); + + /* add filler glyphs for one-to-many unicode mapping */ + for (i = 1; i < ucslen; i++) + fz_add_text(csi->text, -1, ucsbuf[i], trm.e, trm.f); + + if (fontdesc->wmode == 0) + { + h = pdf_get_hmtx(fontdesc, cid); + w0 = h.w * 0.001f; + tx = (w0 * gstate->size + gstate->char_space) * gstate->scale; + csi->tm = fz_concat(fz_translate(tx, 0), csi->tm); + } + + if (fontdesc->wmode == 1) + { + w1 = v.w * 0.001f; + ty = w1 * gstate->size + gstate->char_space; + csi->tm = fz_concat(fz_translate(0, ty), csi->tm); + } +} + +static void +pdf_show_space(pdf_csi *csi, float tadj) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + pdf_font_desc *fontdesc = gstate->font; + + if (!fontdesc) + { + fz_warn("cannot draw text since font and size not set"); + return; + } + + if (fontdesc->wmode == 0) + csi->tm = fz_concat(fz_translate(tadj * gstate->scale, 0), csi->tm); + else + csi->tm = fz_concat(fz_translate(0, tadj), csi->tm); +} + +static void +pdf_show_string(pdf_csi *csi, unsigned char *buf, int len) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + pdf_font_desc *fontdesc = gstate->font; + unsigned char *end = buf + len; + int cpt, cid; + + if (!fontdesc) + { + fz_warn("cannot draw text since font and size not set"); + return; + } + + while (buf < end) + { + buf = pdf_decode_cmap(fontdesc->encoding, buf, &cpt); + cid = pdf_lookup_cmap(fontdesc->encoding, cpt); + if (cid >= 0) + pdf_show_char(csi, cid); + else + fz_warn("cannot encode character with code point %#x", cpt); + if (cpt == 32) + pdf_show_space(csi, gstate->word_space); + } +} + +static void +pdf_show_text(pdf_csi *csi, fz_obj *text) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + int i; + + if (fz_is_array(text)) + { + for (i = 0; i < fz_array_len(text); i++) + { + fz_obj *item = fz_array_get(text, i); + if (fz_is_string(item)) + pdf_show_string(csi, (unsigned char *)fz_to_str_buf(item), fz_to_str_len(item)); + else + pdf_show_space(csi, - fz_to_real(item) * gstate->size * 0.001f); + } + } + else if (fz_is_string(text)) + { + pdf_show_string(csi, (unsigned char *)fz_to_str_buf(text), fz_to_str_len(text)); + } +} + +/* + * Interpreter and graphics state stack. + */ + +static void +pdf_init_gstate(pdf_gstate *gs, fz_matrix ctm) +{ + gs->ctm = ctm; + gs->clip_depth = 0; + + gs->stroke_state.start_cap = 0; + gs->stroke_state.dash_cap = 0; + gs->stroke_state.end_cap = 0; + gs->stroke_state.linejoin = 0; + gs->stroke_state.linewidth = 1; + gs->stroke_state.miterlimit = 10; + gs->stroke_state.dash_phase = 0; + gs->stroke_state.dash_len = 0; + memset(gs->stroke_state.dash_list, 0, sizeof(gs->stroke_state.dash_list)); + + gs->stroke.kind = PDF_MAT_COLOR; + gs->stroke.colorspace = fz_keep_colorspace(fz_device_gray); + gs->stroke.v[0] = 0; + gs->stroke.pattern = NULL; + gs->stroke.shade = NULL; + gs->stroke.alpha = 1; + + gs->fill.kind = PDF_MAT_COLOR; + gs->fill.colorspace = fz_keep_colorspace(fz_device_gray); + gs->fill.v[0] = 0; + gs->fill.pattern = NULL; + gs->fill.shade = NULL; + gs->fill.alpha = 1; + + gs->char_space = 0; + gs->word_space = 0; + gs->scale = 1; + gs->leading = 0; + gs->font = NULL; + gs->size = -1; + gs->render = 0; + gs->rise = 0; + + gs->blendmode = 0; + gs->softmask = NULL; + gs->softmask_ctm = fz_identity; + gs->luminosity = 0; +} + +static pdf_csi * +pdf_new_csi(pdf_xref *xref, fz_device *dev, fz_matrix ctm, char *target) +{ + pdf_csi *csi; + + csi = fz_malloc(sizeof(pdf_csi)); + csi->xref = xref; + csi->dev = dev; + csi->target = target; + + csi->top = 0; + csi->obj = NULL; + csi->name[0] = 0; + csi->string_len = 0; + memset(csi->stack, 0, sizeof csi->stack); + + csi->xbalance = 0; + csi->in_text = 0; + + csi->path = fz_new_path(); + + csi->text = NULL; + csi->tlm = fz_identity; + csi->tm = fz_identity; + csi->text_mode = 0; + csi->accumulate = 1; + + csi->top_ctm = ctm; + pdf_init_gstate(&csi->gstate[0], ctm); + csi->gtop = 0; + + return csi; +} + +static void +pdf_clear_stack(pdf_csi *csi) +{ + int i; + + if (csi->obj) + fz_drop_obj(csi->obj); + csi->obj = NULL; + + csi->name[0] = 0; + csi->string_len = 0; + for (i = 0; i < csi->top; i++) + csi->stack[i] = 0; + + csi->top = 0; +} + +static pdf_material * +pdf_keep_material(pdf_material *mat) +{ + if (mat->colorspace) + fz_keep_colorspace(mat->colorspace); + if (mat->pattern) + pdf_keep_pattern(mat->pattern); + if (mat->shade) + fz_keep_shade(mat->shade); + return mat; +} + +static pdf_material * +pdf_drop_material(pdf_material *mat) +{ + if (mat->colorspace) + fz_drop_colorspace(mat->colorspace); + if (mat->pattern) + pdf_drop_pattern(mat->pattern); + if (mat->shade) + fz_drop_shade(mat->shade); + return mat; +} + +static void +pdf_gsave(pdf_csi *csi) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + + if (csi->gtop == nelem(csi->gstate) - 1) + { + fz_warn("gstate overflow in content stream"); + return; + } + + memcpy(&csi->gstate[csi->gtop + 1], &csi->gstate[csi->gtop], sizeof(pdf_gstate)); + + csi->gtop ++; + + pdf_keep_material(&gs->stroke); + pdf_keep_material(&gs->fill); + if (gs->font) + pdf_keep_font(gs->font); + if (gs->softmask) + pdf_keep_xobject(gs->softmask); +} + +static void +pdf_grestore(pdf_csi *csi) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + int clip_depth = gs->clip_depth; + + if (csi->gtop == 0) + { + fz_warn("gstate underflow in content stream"); + return; + } + + pdf_drop_material(&gs->stroke); + pdf_drop_material(&gs->fill); + if (gs->font) + pdf_drop_font(gs->font); + if (gs->softmask) + pdf_drop_xobject(gs->softmask); + + csi->gtop --; + + gs = csi->gstate + csi->gtop; + while (clip_depth > gs->clip_depth) + { + fz_pop_clip(csi->dev); + clip_depth--; + } +} + +static void +pdf_free_csi(pdf_csi *csi) +{ + while (csi->gtop) + pdf_grestore(csi); + + pdf_drop_material(&csi->gstate[0].fill); + pdf_drop_material(&csi->gstate[0].stroke); + if (csi->gstate[0].font) + pdf_drop_font(csi->gstate[0].font); + if (csi->gstate[0].softmask) + pdf_drop_xobject(csi->gstate[0].softmask); + + while (csi->gstate[0].clip_depth--) + fz_pop_clip(csi->dev); + + if (csi->path) fz_free_path(csi->path); + if (csi->text) fz_free_text(csi->text); + + pdf_clear_stack(csi); + + fz_free(csi); +} + +/* + * Material state + */ + +static void +pdf_set_colorspace(pdf_csi *csi, int what, fz_colorspace *colorspace) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + pdf_material *mat; + + pdf_flush_text(csi); + + mat = what == PDF_FILL ? &gs->fill : &gs->stroke; + + fz_drop_colorspace(mat->colorspace); + + mat->kind = PDF_MAT_COLOR; + mat->colorspace = fz_keep_colorspace(colorspace); + + mat->v[0] = 0; + mat->v[1] = 0; + mat->v[2] = 0; + mat->v[3] = 1; +} + +static void +pdf_set_color(pdf_csi *csi, int what, float *v) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + pdf_material *mat; + int i; + + pdf_flush_text(csi); + + mat = what == PDF_FILL ? &gs->fill : &gs->stroke; + + switch (mat->kind) + { + case PDF_MAT_PATTERN: + case PDF_MAT_COLOR: + if (!strcmp(mat->colorspace->name, "Lab")) + { + mat->v[0] = v[0] / 100; + mat->v[1] = (v[1] + 100) / 200; + mat->v[2] = (v[2] + 100) / 200; + } + for (i = 0; i < mat->colorspace->n; i++) + mat->v[i] = v[i]; + break; + default: + fz_warn("color incompatible with material"); + } +} + +static void +pdf_set_shade(pdf_csi *csi, int what, fz_shade *shade) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + pdf_material *mat; + + pdf_flush_text(csi); + + mat = what == PDF_FILL ? &gs->fill : &gs->stroke; + + if (mat->shade) + fz_drop_shade(mat->shade); + + mat->kind = PDF_MAT_SHADE; + mat->shade = fz_keep_shade(shade); +} + +static void +pdf_set_pattern(pdf_csi *csi, int what, pdf_pattern *pat, float *v) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + pdf_material *mat; + + pdf_flush_text(csi); + + mat = what == PDF_FILL ? &gs->fill : &gs->stroke; + + if (mat->pattern) + pdf_drop_pattern(mat->pattern); + + mat->kind = PDF_MAT_PATTERN; + if (pat) + mat->pattern = pdf_keep_pattern(pat); + else + mat->pattern = NULL; + + if (v) + pdf_set_color(csi, what, v); +} + +static void +pdf_unset_pattern(pdf_csi *csi, int what) +{ + pdf_gstate *gs = csi->gstate + csi->gtop; + pdf_material *mat; + mat = what == PDF_FILL ? &gs->fill : &gs->stroke; + if (mat->kind == PDF_MAT_PATTERN) + { + if (mat->pattern) + pdf_drop_pattern(mat->pattern); + mat->pattern = NULL; + mat->kind = PDF_MAT_COLOR; + } +} + +/* + * Patterns, XObjects and ExtGState + */ + +static void +pdf_show_pattern(pdf_csi *csi, pdf_pattern *pat, fz_rect area, int what) +{ + pdf_gstate *gstate; + fz_matrix ptm, invptm; + fz_matrix oldtopctm; + fz_error error; + int x0, y0, x1, y1; + int oldtop; + + pdf_gsave(csi); + gstate = csi->gstate + csi->gtop; + + if (pat->ismask) + { + pdf_unset_pattern(csi, PDF_FILL); + pdf_unset_pattern(csi, PDF_STROKE); + if (what == PDF_FILL) + { + pdf_drop_material(&gstate->stroke); + pdf_keep_material(&gstate->fill); + gstate->stroke = gstate->fill; + } + if (what == PDF_STROKE) + { + pdf_drop_material(&gstate->fill); + pdf_keep_material(&gstate->stroke); + gstate->fill = gstate->stroke; + } + } + else + { + // TODO: unset only the current fill/stroke or both? + pdf_unset_pattern(csi, what); + } + + /* don't apply softmasks to objects in the pattern as well */ + if (gstate->softmask) + { + pdf_drop_xobject(gstate->softmask); + gstate->softmask = NULL; + } + + ptm = fz_concat(pat->matrix, csi->top_ctm); + invptm = fz_invert_matrix(ptm); + + /* patterns are painted using the ctm in effect at the beginning of the content stream */ + /* get bbox of shape in pattern space for stamping */ + area = fz_transform_rect(invptm, area); + x0 = floorf(area.x0 / pat->xstep); + y0 = floorf(area.y0 / pat->ystep); + x1 = ceilf(area.x1 / pat->xstep); + y1 = ceilf(area.y1 / pat->ystep); + + oldtopctm = csi->top_ctm; + oldtop = csi->gtop; + +#ifdef TILE + if ((x1 - x0) * (y1 - y0) > 0) + { + fz_begin_tile(csi->dev, area, pat->bbox, pat->xstep, pat->ystep, ptm); + gstate->ctm = ptm; + csi->top_ctm = gstate->ctm; + pdf_gsave(csi); + error = pdf_run_buffer(csi, pat->resources, pat->contents); + if (error) + fz_catch(error, "cannot render pattern tile"); + pdf_grestore(csi); + while (oldtop < csi->gtop) + pdf_grestore(csi); + fz_end_tile(csi->dev); + } +#else + { + int x, y; + for (y = y0; y < y1; y++) + { + for (x = x0; x < x1; x++) + { + gstate->ctm = fz_concat(fz_translate(x * pat->xstep, y * pat->ystep), ptm); + csi->top_ctm = gstate->ctm; + error = pdf_run_csi_buffer(csi, pat->resources, pat->contents); + while (oldtop < csi->gtop) + pdf_grestore(csi); + if (error) + { + fz_catch(error, "cannot render pattern tile"); + goto cleanup; + } + } + } + } +cleanup: +#endif + + csi->top_ctm = oldtopctm; + + pdf_grestore(csi); +} + +static fz_error +pdf_run_xobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj, fz_matrix transform) +{ + fz_error error; + pdf_gstate *gstate; + fz_matrix oldtopctm; + int oldtop; + int popmask; + + pdf_gsave(csi); + + gstate = csi->gstate + csi->gtop; + oldtop = csi->gtop; + popmask = 0; + + /* apply xobject's transform matrix */ + transform = fz_concat(xobj->matrix, transform); + gstate->ctm = fz_concat(transform, gstate->ctm); + + /* apply soft mask, create transparency group and reset state */ + if (xobj->transparency) + { + if (gstate->softmask) + { + pdf_xobject *softmask = gstate->softmask; + fz_rect bbox = fz_transform_rect(gstate->ctm, xobj->bbox); + + gstate->softmask = NULL; + popmask = 1; + + fz_begin_mask(csi->dev, bbox, gstate->luminosity, + softmask->colorspace, gstate->softmask_bc); + error = pdf_run_xobject(csi, resources, softmask, fz_identity); + if (error) + return fz_rethrow(error, "cannot run softmask"); + fz_end_mask(csi->dev); + + pdf_drop_xobject(softmask); + } + + fz_begin_group(csi->dev, + fz_transform_rect(gstate->ctm, xobj->bbox), + xobj->isolated, xobj->knockout, gstate->blendmode, gstate->fill.alpha); + + gstate->blendmode = 0; + gstate->stroke.alpha = 1; + gstate->fill.alpha = 1; + } + + /* clip to the bounds */ + + fz_moveto(csi->path, xobj->bbox.x0, xobj->bbox.y0); + fz_lineto(csi->path, xobj->bbox.x1, xobj->bbox.y0); + fz_lineto(csi->path, xobj->bbox.x1, xobj->bbox.y1); + fz_lineto(csi->path, xobj->bbox.x0, xobj->bbox.y1); + fz_closepath(csi->path); + pdf_show_clip(csi, 0); + pdf_show_path(csi, 0, 0, 0, 0); + + /* run contents */ + + oldtopctm = csi->top_ctm; + csi->top_ctm = gstate->ctm; + + if (xobj->resources) + resources = xobj->resources; + + error = pdf_run_buffer(csi, resources, xobj->contents); + if (error) + fz_catch(error, "cannot interpret XObject stream"); + + csi->top_ctm = oldtopctm; + + while (oldtop < csi->gtop) + pdf_grestore(csi); + + pdf_grestore(csi); + + /* wrap up transparency stacks */ + + if (xobj->transparency) + { + fz_end_group(csi->dev); + if (popmask) + fz_pop_clip(csi->dev); + } + + return fz_okay; +} + +static fz_error +pdf_run_extgstate(pdf_csi *csi, fz_obj *rdb, fz_obj *extgstate) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_colorspace *colorspace; + int i, k; + + pdf_flush_text(csi); + + for (i = 0; i < fz_dict_len(extgstate); i++) + { + fz_obj *key = fz_dict_get_key(extgstate, i); + fz_obj *val = fz_dict_get_val(extgstate, i); + char *s = fz_to_name(key); + + if (!strcmp(s, "Font")) + { + if (fz_is_array(val) && fz_array_len(val) == 2) + { + fz_error error; + fz_obj *font = fz_array_get(val, 0); + + if (gstate->font) + { + pdf_drop_font(gstate->font); + gstate->font = NULL; + } + + error = pdf_load_font(&gstate->font, csi->xref, rdb, font); + if (error) + return fz_rethrow(error, "cannot load font (%d %d R)", fz_to_num(font), fz_to_gen(font)); + if (!gstate->font) + return fz_throw("cannot find font in store"); + gstate->size = fz_to_real(fz_array_get(val, 1)); + } + else + return fz_throw("malformed /Font dictionary"); + } + + else if (!strcmp(s, "LC")) + { + gstate->stroke_state.start_cap = fz_to_int(val); + gstate->stroke_state.dash_cap = fz_to_int(val); + gstate->stroke_state.end_cap = fz_to_int(val); + } + else if (!strcmp(s, "LW")) + gstate->stroke_state.linewidth = fz_to_real(val); + else if (!strcmp(s, "LJ")) + gstate->stroke_state.linejoin = fz_to_int(val); + else if (!strcmp(s, "ML")) + gstate->stroke_state.miterlimit = fz_to_real(val); + + else if (!strcmp(s, "D")) + { + if (fz_is_array(val) && fz_array_len(val) == 2) + { + fz_obj *dashes = fz_array_get(val, 0); + gstate->stroke_state.dash_len = MAX(fz_array_len(dashes), 32); + for (k = 0; k < gstate->stroke_state.dash_len; k++) + gstate->stroke_state.dash_list[k] = fz_to_real(fz_array_get(dashes, k)); + gstate->stroke_state.dash_phase = fz_to_real(fz_array_get(val, 1)); + } + else + return fz_throw("malformed /D"); + } + + else if (!strcmp(s, "CA")) + gstate->stroke.alpha = fz_to_real(val); + + else if (!strcmp(s, "ca")) + gstate->fill.alpha = fz_to_real(val); + + else if (!strcmp(s, "BM")) + { + if (fz_is_array(val)) + val = fz_array_get(val, 0); + gstate->blendmode = fz_find_blendmode(fz_to_name(val)); + } + + else if (!strcmp(s, "SMask")) + { + if (fz_is_dict(val)) + { + fz_error error; + pdf_xobject *xobj; + fz_obj *group, *luminosity, *bc; + + if (gstate->softmask) + { + pdf_drop_xobject(gstate->softmask); + gstate->softmask = NULL; + } + + group = fz_dict_gets(val, "G"); + if (!group) + return fz_throw("cannot load softmask xobject (%d %d R)", fz_to_num(val), fz_to_gen(val)); + error = pdf_load_xobject(&xobj, csi->xref, group); + if (error) + return fz_rethrow(error, "cannot load xobject (%d %d R)", fz_to_num(val), fz_to_gen(val)); + + colorspace = xobj->colorspace; + if (!colorspace) + colorspace = fz_device_gray; + + gstate->softmask_ctm = fz_concat(xobj->matrix, gstate->ctm); + gstate->softmask = xobj; + for (k = 0; k < colorspace->n; k++) + gstate->softmask_bc[k] = 0; + + bc = fz_dict_gets(val, "BC"); + if (fz_is_array(bc)) + { + for (k = 0; k < colorspace->n; k++) + gstate->softmask_bc[k] = fz_to_real(fz_array_get(bc, k)); + } + + luminosity = fz_dict_gets(val, "S"); + if (fz_is_name(luminosity) && !strcmp(fz_to_name(luminosity), "Luminosity")) + gstate->luminosity = 1; + else + gstate->luminosity = 0; + } + else if (fz_is_name(val) && !strcmp(fz_to_name(val), "None")) + { + if (gstate->softmask) + { + pdf_drop_xobject(gstate->softmask); + gstate->softmask = NULL; + } + } + } + + else if (!strcmp(s, "TR")) + { + if (fz_is_name(val) && strcmp(fz_to_name(val), "Identity")) + fz_warn("ignoring transfer function"); + } + } + + return fz_okay; +} + +/* + * Operators + */ + +static void pdf_run_BDC(pdf_csi *csi) +{ +} + +static fz_error pdf_run_BI(pdf_csi *csi, fz_obj *rdb, fz_stream *file) +{ + int ch; + fz_error error; + char *buf = csi->xref->scratch; + int buflen = sizeof(csi->xref->scratch); + fz_pixmap *img; + fz_obj *obj; + + error = pdf_parse_dict(&obj, csi->xref, file, buf, buflen); + if (error) + return fz_rethrow(error, "cannot parse inline image dictionary"); + + /* read whitespace after ID keyword */ + ch = fz_read_byte(file); + if (ch == '\r') + if (fz_peek_byte(file) == '\n') + fz_read_byte(file); + + error = pdf_load_inline_image(&img, csi->xref, rdb, obj, file); + fz_drop_obj(obj); + if (error) + return fz_rethrow(error, "cannot load inline image"); + + pdf_show_image(csi, img); + + fz_drop_pixmap(img); + + /* find EI */ + ch = fz_read_byte(file); + while (ch != 'E' && ch != EOF) + ch = fz_read_byte(file); + ch = fz_read_byte(file); + if (ch != 'I') + return fz_rethrow(error, "syntax error after inline image"); + + return fz_okay; +} + +static void pdf_run_B(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 1, 1, 0); +} + +static void pdf_run_BMC(pdf_csi *csi) +{ +} + +static void pdf_run_BT(pdf_csi *csi) +{ + csi->in_text = 1; + csi->tm = fz_identity; + csi->tlm = fz_identity; +} + +static void pdf_run_BX(pdf_csi *csi) +{ + csi->xbalance ++; +} + +static void pdf_run_Bstar(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 1, 1, 1); +} + +static fz_error pdf_run_cs_imp(pdf_csi *csi, fz_obj *rdb, int what) +{ + fz_colorspace *colorspace; + fz_obj *obj, *dict; + fz_error error; + + if (!strcmp(csi->name, "Pattern")) + { + pdf_set_pattern(csi, what, NULL, NULL); + } + else + { + if (!strcmp(csi->name, "DeviceGray")) + colorspace = fz_keep_colorspace(fz_device_gray); + else if (!strcmp(csi->name, "DeviceRGB")) + colorspace = fz_keep_colorspace(fz_device_rgb); + else if (!strcmp(csi->name, "DeviceCMYK")) + colorspace = fz_keep_colorspace(fz_device_cmyk); + else + { + dict = fz_dict_gets(rdb, "ColorSpace"); + if (!dict) + return fz_throw("cannot find ColorSpace dictionary"); + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find colorspace resource '%s'", csi->name); + error = pdf_load_colorspace(&colorspace, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load colorspace (%d 0 R)", fz_to_num(obj)); + } + + pdf_set_colorspace(csi, what, colorspace); + + fz_drop_colorspace(colorspace); + } + return fz_okay; +} + +static void pdf_run_CS(pdf_csi *csi, fz_obj *rdb) +{ + fz_error error; + error = pdf_run_cs_imp(csi, rdb, PDF_STROKE); + if (error) + fz_catch(error, "cannot set colorspace"); +} + +static void pdf_run_cs(pdf_csi *csi, fz_obj *rdb) +{ + fz_error error; + error = pdf_run_cs_imp(csi, rdb, PDF_FILL); + if (error) + fz_catch(error, "cannot set colorspace"); +} + +static void pdf_run_DP(pdf_csi *csi) +{ +} + +static fz_error pdf_run_Do(pdf_csi *csi, fz_obj *rdb) +{ + fz_obj *dict; + fz_obj *obj; + fz_obj *subtype; + fz_error error; + + dict = fz_dict_gets(rdb, "XObject"); + if (!dict) + return fz_throw("cannot find XObject dictionary when looking for: '%s'", csi->name); + + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find xobject resource: '%s'", csi->name); + + subtype = fz_dict_gets(obj, "Subtype"); + if (!fz_is_name(subtype)) + return fz_throw("no XObject subtype specified"); + + if (pdf_is_hidden_ocg(obj, csi->target)) + return fz_okay; + + if (!strcmp(fz_to_name(subtype), "Form") && fz_dict_gets(obj, "Subtype2")) + subtype = fz_dict_gets(obj, "Subtype2"); + + if (!strcmp(fz_to_name(subtype), "Form")) + { + pdf_xobject *xobj; + + error = pdf_load_xobject(&xobj, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load xobject (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + + /* Inherit parent resources, in case this one was empty XXX check where it's loaded */ + if (!xobj->resources) + xobj->resources = fz_keep_obj(rdb); + + error = pdf_run_xobject(csi, xobj->resources, xobj, fz_identity); + if (error) + return fz_rethrow(error, "cannot draw xobject (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + + pdf_drop_xobject(xobj); + } + + else if (!strcmp(fz_to_name(subtype), "Image")) + { + if ((csi->dev->hints & FZ_IGNORE_IMAGE) == 0) + { + fz_pixmap *img; + error = pdf_load_image(&img, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load image (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + pdf_show_image(csi, img); + fz_drop_pixmap(img); + } + } + + else if (!strcmp(fz_to_name(subtype), "PS")) + { + fz_warn("ignoring XObject with subtype PS"); + } + + else + { + return fz_throw("unknown XObject subtype: '%s'", fz_to_name(subtype)); + } + + return fz_okay; +} + +static void pdf_run_EMC(pdf_csi *csi) +{ +} + +static void pdf_run_ET(pdf_csi *csi) +{ + pdf_flush_text(csi); + csi->accumulate = 1; + csi->in_text = 0; +} + +static void pdf_run_EX(pdf_csi *csi) +{ + csi->xbalance --; +} + +static void pdf_run_F(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 1, 0, 0); +} + +static void pdf_run_G(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_STROKE, fz_device_gray); + pdf_set_color(csi, PDF_STROKE, csi->stack); +} + +static void pdf_run_J(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->stroke_state.start_cap = csi->stack[0]; + gstate->stroke_state.dash_cap = csi->stack[0]; + gstate->stroke_state.end_cap = csi->stack[0]; +} + +static void pdf_run_K(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_STROKE, fz_device_cmyk); + pdf_set_color(csi, PDF_STROKE, csi->stack); +} + +static void pdf_run_M(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->stroke_state.miterlimit = csi->stack[0]; +} + +static void pdf_run_MP(pdf_csi *csi) +{ +} + +static void pdf_run_Q(pdf_csi *csi) +{ + pdf_grestore(csi); +} + +static void pdf_run_RG(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_STROKE, fz_device_rgb); + pdf_set_color(csi, PDF_STROKE, csi->stack); +} + +static void pdf_run_S(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 0, 1, 0); +} + +static fz_error pdf_run_SC_imp(pdf_csi *csi, fz_obj *rdb, int what, pdf_material *mat) +{ + fz_error error; + fz_obj *patterntype; + fz_obj *dict; + fz_obj *obj; + int kind; + + kind = mat->kind; + if (csi->name[0]) + kind = PDF_MAT_PATTERN; + + switch (kind) + { + case PDF_MAT_NONE: + return fz_throw("cannot set color in mask objects"); + + case PDF_MAT_COLOR: + pdf_set_color(csi, what, csi->stack); + break; + + case PDF_MAT_PATTERN: + dict = fz_dict_gets(rdb, "Pattern"); + if (!dict) + return fz_throw("cannot find Pattern dictionary"); + + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find pattern resource '%s'", csi->name); + + patterntype = fz_dict_gets(obj, "PatternType"); + + if (fz_to_int(patterntype) == 1) + { + pdf_pattern *pat; + error = pdf_load_pattern(&pat, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load pattern (%d 0 R)", fz_to_num(obj)); + pdf_set_pattern(csi, what, pat, csi->top > 0 ? csi->stack : NULL); + pdf_drop_pattern(pat); + } + else if (fz_to_int(patterntype) == 2) + { + fz_shade *shd; + error = pdf_load_shading(&shd, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load shading (%d 0 R)", fz_to_num(obj)); + pdf_set_shade(csi, what, shd); + fz_drop_shade(shd); + } + else + { + return fz_throw("unknown pattern type: %d", fz_to_int(patterntype)); + } + break; + + case PDF_MAT_SHADE: + return fz_throw("cannot set color in shade objects"); + } + + return fz_okay; +} + +static void pdf_run_SC(pdf_csi *csi, fz_obj *rdb) +{ + fz_error error; + pdf_gstate *gstate = csi->gstate + csi->gtop; + error = pdf_run_SC_imp(csi, rdb, PDF_STROKE, &gstate->stroke); + if (error) + fz_catch(error, "cannot set color and colorspace"); +} + +static void pdf_run_sc(pdf_csi *csi, fz_obj *rdb) +{ + fz_error error; + pdf_gstate *gstate = csi->gstate + csi->gtop; + error = pdf_run_SC_imp(csi, rdb, PDF_FILL, &gstate->fill); + if (error) + fz_catch(error, "cannot set color and colorspace"); +} + +static void pdf_run_Tc(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->char_space = csi->stack[0]; +} + +static void pdf_run_Tw(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->word_space = csi->stack[0]; +} + +static void pdf_run_Tz(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + float a = csi->stack[0] / 100; + pdf_flush_text(csi); + gstate->scale = a; +} + +static void pdf_run_TL(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->leading = csi->stack[0]; +} + +static fz_error pdf_run_Tf(pdf_csi *csi, fz_obj *rdb) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_error error; + fz_obj *dict; + fz_obj *obj; + + gstate->size = csi->stack[0]; + if (gstate->font) + pdf_drop_font(gstate->font); + gstate->font = NULL; + + dict = fz_dict_gets(rdb, "Font"); + if (!dict) + return fz_throw("cannot find Font dictionary"); + + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find font resource: '%s'", csi->name); + + error = pdf_load_font(&gstate->font, csi->xref, rdb, obj); + if (error) + return fz_rethrow(error, "cannot load font (%d 0 R)", fz_to_num(obj)); + + return fz_okay; +} + +static void pdf_run_Tr(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->render = csi->stack[0]; +} + +static void pdf_run_Ts(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->rise = csi->stack[0]; +} + +static void pdf_run_Td(pdf_csi *csi) +{ + fz_matrix m = fz_translate(csi->stack[0], csi->stack[1]); + csi->tlm = fz_concat(m, csi->tlm); + csi->tm = csi->tlm; +} + +static void pdf_run_TD(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_matrix m; + + gstate->leading = -csi->stack[1]; + m = fz_translate(csi->stack[0], csi->stack[1]); + csi->tlm = fz_concat(m, csi->tlm); + csi->tm = csi->tlm; +} + +static void pdf_run_Tm(pdf_csi *csi) +{ + csi->tm.a = csi->stack[0]; + csi->tm.b = csi->stack[1]; + csi->tm.c = csi->stack[2]; + csi->tm.d = csi->stack[3]; + csi->tm.e = csi->stack[4]; + csi->tm.f = csi->stack[5]; + csi->tlm = csi->tm; +} + +static void pdf_run_Tstar(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_matrix m = fz_translate(0, -gstate->leading); + csi->tlm = fz_concat(m, csi->tlm); + csi->tm = csi->tlm; +} + +static void pdf_run_Tj(pdf_csi *csi) +{ + if (csi->string_len) + pdf_show_string(csi, csi->string, csi->string_len); + else + pdf_show_text(csi, csi->obj); +} + +static void pdf_run_TJ(pdf_csi *csi) +{ + if (csi->string_len) + pdf_show_string(csi, csi->string, csi->string_len); + else + pdf_show_text(csi, csi->obj); +} + +static void pdf_run_W(pdf_csi *csi) +{ + pdf_show_clip(csi, 0); +} + +static void pdf_run_Wstar(pdf_csi *csi) +{ + pdf_show_clip(csi, 1); +} + +static void pdf_run_b(pdf_csi *csi) +{ + pdf_show_path(csi, 1, 1, 1, 0); +} + +static void pdf_run_bstar(pdf_csi *csi) +{ + pdf_show_path(csi, 1, 1, 1, 1); +} + +static void pdf_run_c(pdf_csi *csi) +{ + float a, b, c, d, e, f; + a = csi->stack[0]; + b = csi->stack[1]; + c = csi->stack[2]; + d = csi->stack[3]; + e = csi->stack[4]; + f = csi->stack[5]; + fz_curveto(csi->path, a, b, c, d, e, f); +} + +static void pdf_run_cm(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_matrix m; + + m.a = csi->stack[0]; + m.b = csi->stack[1]; + m.c = csi->stack[2]; + m.d = csi->stack[3]; + m.e = csi->stack[4]; + m.f = csi->stack[5]; + + gstate->ctm = fz_concat(m, gstate->ctm); +} + +static void pdf_run_d(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + fz_obj *array; + int i; + + array = csi->obj; + gstate->stroke_state.dash_len = MIN(fz_array_len(array), nelem(gstate->stroke_state.dash_list)); + for (i = 0; i < gstate->stroke_state.dash_len; i++) + gstate->stroke_state.dash_list[i] = fz_to_real(fz_array_get(array, i)); + gstate->stroke_state.dash_phase = csi->stack[0]; +} + +static void pdf_run_d0(pdf_csi *csi) +{ + csi->dev->flags |= FZ_CHARPROC_COLOR; +} + +static void pdf_run_d1(pdf_csi *csi) +{ + csi->dev->flags |= FZ_CHARPROC_MASK; +} + +static void pdf_run_f(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 1, 0, 0); +} + +static void pdf_run_fstar(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 1, 0, 1); +} + +static void pdf_run_g(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_FILL, fz_device_gray); + pdf_set_color(csi, PDF_FILL, csi->stack); +} + +static fz_error pdf_run_gs(pdf_csi *csi, fz_obj *rdb) +{ + fz_error error; + fz_obj *dict; + fz_obj *obj; + + dict = fz_dict_gets(rdb, "ExtGState"); + if (!dict) + return fz_throw("cannot find ExtGState dictionary"); + + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find extgstate resource '%s'", csi->name); + + error = pdf_run_extgstate(csi, rdb, obj); + if (error) + return fz_rethrow(error, "cannot set ExtGState (%d 0 R)", fz_to_num(obj)); + return fz_okay; +} + +static void pdf_run_h(pdf_csi *csi) +{ + fz_closepath(csi->path); +} + +static void pdf_run_i(pdf_csi *csi) +{ +} + +static void pdf_run_j(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + gstate->stroke_state.linejoin = csi->stack[0]; +} + +static void pdf_run_k(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_FILL, fz_device_cmyk); + pdf_set_color(csi, PDF_FILL, csi->stack); +} + +static void pdf_run_l(pdf_csi *csi) +{ + float a, b; + a = csi->stack[0]; + b = csi->stack[1]; + fz_lineto(csi->path, a, b); +} + +static void pdf_run_m(pdf_csi *csi) +{ + float a, b; + a = csi->stack[0]; + b = csi->stack[1]; + fz_moveto(csi->path, a, b); +} + +static void pdf_run_n(pdf_csi *csi) +{ + pdf_show_path(csi, 0, 0, 0, 0); +} + +static void pdf_run_q(pdf_csi *csi) +{ + pdf_gsave(csi); +} + +static void pdf_run_re(pdf_csi *csi) +{ + float x, y, w, h; + + x = csi->stack[0]; + y = csi->stack[1]; + w = csi->stack[2]; + h = csi->stack[3]; + + fz_moveto(csi->path, x, y); + fz_lineto(csi->path, x + w, y); + fz_lineto(csi->path, x + w, y + h); + fz_lineto(csi->path, x, y + h); + fz_closepath(csi->path); +} + +static void pdf_run_rg(pdf_csi *csi) +{ + pdf_set_colorspace(csi, PDF_FILL, fz_device_rgb); + pdf_set_color(csi, PDF_FILL, csi->stack); +} + +static void pdf_run_ri(pdf_csi *csi) +{ +} + +static void pdf_run(pdf_csi *csi) +{ + pdf_show_path(csi, 1, 0, 1, 0); +} + +static fz_error pdf_run_sh(pdf_csi *csi, fz_obj *rdb) +{ + fz_obj *dict; + fz_obj *obj; + fz_shade *shd; + fz_error error; + + dict = fz_dict_gets(rdb, "Shading"); + if (!dict) + return fz_throw("cannot find shading dictionary"); + + obj = fz_dict_gets(dict, csi->name); + if (!obj) + return fz_throw("cannot find shading resource: '%s'", csi->name); + + if ((csi->dev->hints & FZ_IGNORE_SHADE) == 0) + { + error = pdf_load_shading(&shd, csi->xref, obj); + if (error) + return fz_rethrow(error, "cannot load shading (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + pdf_show_shade(csi, shd); + fz_drop_shade(shd); + } + return fz_okay; +} + +static void pdf_run_v(pdf_csi *csi) +{ + float a, b, c, d; + a = csi->stack[0]; + b = csi->stack[1]; + c = csi->stack[2]; + d = csi->stack[3]; + fz_curvetov(csi->path, a, b, c, d); +} + +static void pdf_run_w(pdf_csi *csi) +{ + pdf_gstate *gstate = csi->gstate + csi->gtop; + pdf_flush_text(csi); /* linewidth affects stroked text rendering mode */ + gstate->stroke_state.linewidth = csi->stack[0]; +} + +static void pdf_run_y(pdf_csi *csi) +{ + float a, b, c, d; + a = csi->stack[0]; + b = csi->stack[1]; + c = csi->stack[2]; + d = csi->stack[3]; + fz_curvetoy(csi->path, a, b, c, d); +} + +static void pdf_run_squote(pdf_csi *csi) +{ + fz_matrix m; + pdf_gstate *gstate = csi->gstate + csi->gtop; + + m = fz_translate(0, -gstate->leading); + csi->tlm = fz_concat(m, csi->tlm); + csi->tm = csi->tlm; + + if (csi->string_len) + pdf_show_string(csi, csi->string, csi->string_len); + else + pdf_show_text(csi, csi->obj); +} + +static void pdf_run_dquote(pdf_csi *csi) +{ + fz_matrix m; + pdf_gstate *gstate = csi->gstate + csi->gtop; + + gstate->word_space = csi->stack[0]; + gstate->char_space = csi->stack[1]; + + m = fz_translate(0, -gstate->leading); + csi->tlm = fz_concat(m, csi->tlm); + csi->tm = csi->tlm; + + if (csi->string_len) + pdf_show_string(csi, csi->string, csi->string_len); + else + pdf_show_text(csi, csi->obj); +} + +#define A(a) (a) +#define B(a,b) (a | b << 8) +#define C(a,b,c) (a | b << 8 | c << 16) + +static fz_error +pdf_run_keyword(pdf_csi *csi, fz_obj *rdb, fz_stream *file, char *buf) +{ + fz_error error; + int key; + + key = buf[0]; + if (buf[1]) + { + key |= buf[1] << 8; + if (buf[2]) + { + key |= buf[2] << 16; + if (buf[3]) + key = 0; + } + } + + switch (key) + { + case A('"'): pdf_run_dquote(csi); break; + case A('\''): pdf_run_squote(csi); break; + case A('B'): pdf_run_B(csi); break; + case B('B','*'): pdf_run_Bstar(csi); break; + case C('B','D','C'): pdf_run_BDC(csi); break; + case B('B','I'): + error = pdf_run_BI(csi, rdb, file); + if (error) + return fz_rethrow(error, "cannot draw inline image"); + break; + case C('B','M','C'): pdf_run_BMC(csi); break; + case B('B','T'): pdf_run_BT(csi); break; + case B('B','X'): pdf_run_BX(csi); break; + case B('C','S'): pdf_run_CS(csi, rdb); break; + case B('D','P'): pdf_run_DP(csi); break; + case B('D','o'): + error = pdf_run_Do(csi, rdb); + if (error) + fz_catch(error, "cannot draw xobject/image"); + break; + case C('E','M','C'): pdf_run_EMC(csi); break; + case B('E','T'): pdf_run_ET(csi); break; + case B('E','X'): pdf_run_EX(csi); break; + case A('F'): pdf_run_F(csi); break; + case A('G'): pdf_run_G(csi); break; + case A('J'): pdf_run_J(csi); break; + case A('K'): pdf_run_K(csi); break; + case A('M'): pdf_run_M(csi); break; + case B('M','P'): pdf_run_MP(csi); break; + case A('Q'): pdf_run_Q(csi); break; + case B('R','G'): pdf_run_RG(csi); break; + case A('S'): pdf_run_S(csi); break; + case B('S','C'): pdf_run_SC(csi, rdb); break; + case C('S','C','N'): pdf_run_SC(csi, rdb); break; + case B('T','*'): pdf_run_Tstar(csi); break; + case B('T','D'): pdf_run_TD(csi); break; + case B('T','J'): pdf_run_TJ(csi); break; + case B('T','L'): pdf_run_TL(csi); break; + case B('T','c'): pdf_run_Tc(csi); break; + case B('T','d'): pdf_run_Td(csi); break; + case B('T','f'): + error = pdf_run_Tf(csi, rdb); + if (error) + fz_catch(error, "cannot set font"); + break; + case B('T','j'): pdf_run_Tj(csi); break; + case B('T','m'): pdf_run_Tm(csi); break; + case B('T','r'): pdf_run_Tr(csi); break; + case B('T','s'): pdf_run_Ts(csi); break; + case B('T','w'): pdf_run_Tw(csi); break; + case B('T','z'): pdf_run_Tz(csi); break; + case A('W'): pdf_run_W(csi); break; + case B('W','*'): pdf_run_Wstar(csi); break; + case A('b'): pdf_run_b(csi); break; + case B('b','*'): pdf_run_bstar(csi); break; + case A('c'): pdf_run_c(csi); break; + case B('c','m'): pdf_run_cm(csi); break; + case B('c','s'): pdf_run_cs(csi, rdb); break; + case A('d'): pdf_run_d(csi); break; + case B('d','0'): pdf_run_d0(csi); break; + case B('d','1'): pdf_run_d1(csi); break; + case A('f'): pdf_run_f(csi); break; + case B('f','*'): pdf_run_fstar(csi); break; + case A('g'): pdf_run_g(csi); break; + case B('g','s'): + error = pdf_run_gs(csi, rdb); + if (error) + fz_catch(error, "cannot set graphics state"); + break; + case A('h'): pdf_run_h(csi); break; + case A('i'): pdf_run_i(csi); break; + case A('j'): pdf_run_j(csi); break; + case A('k'): pdf_run_k(csi); break; + case A('l'): pdf_run_l(csi); break; + case A('m'): pdf_run_m(csi); break; + case A('n'): pdf_run_n(csi); break; + case A('q'): pdf_run_q(csi); break; + case B('r','e'): pdf_run_re(csi); break; + case B('r','g'): pdf_run_rg(csi); break; + case B('r','i'): pdf_run_ri(csi); break; + case A('s'): pdf_run(csi); break; + case B('s','c'): pdf_run_sc(csi, rdb); break; + case C('s','c','n'): pdf_run_sc(csi, rdb); break; + case B('s','h'): + error = pdf_run_sh(csi, rdb); + if (error) + fz_catch(error, "cannot draw shading"); + break; + case A('v'): pdf_run_v(csi); break; + case A('w'): pdf_run_w(csi); break; + case A('y'): pdf_run_y(csi); break; + default: + if (!csi->xbalance) + fz_warn("unknown keyword: '%s'", buf); + break; + } + + return fz_okay; +} + +static fz_error +pdf_run_stream(pdf_csi *csi, fz_obj *rdb, fz_stream *file, char *buf, int buflen) +{ + fz_error error; + int tok, len, in_array; + + /* make sure we have a clean slate if we come here from flush_text */ + pdf_clear_stack(csi); + in_array = 0; + + while (1) + { + if (csi->top == nelem(csi->stack) - 1) + return fz_throw("stack overflow"); + + error = pdf_lex(&tok, file, buf, buflen, &len); + if (error) + return fz_rethrow(error, "lexical error in content stream"); + + if (in_array) + { + if (tok == PDF_TOK_CLOSE_ARRAY) + { + in_array = 0; + } + else if (tok == PDF_TOK_INT || tok == PDF_TOK_REAL) + { + pdf_gstate *gstate = csi->gstate + csi->gtop; + pdf_show_space(csi, -fz_atof(buf) * gstate->size * 0.001f); + } + else if (tok == PDF_TOK_STRING) + { + pdf_show_string(csi, (unsigned char *)buf, len); + } + else if (tok == PDF_TOK_KEYWORD) + { + if (!strcmp(buf, "Tw") || !strcmp(buf, "Tc")) + fz_warn("ignoring keyword '%s' inside array", buf); + else + return fz_throw("syntax error in array"); + } + else if (tok == PDF_TOK_EOF) + return fz_okay; + else + return fz_throw("syntax error in array"); + } + + else switch (tok) + { + case PDF_TOK_ENDSTREAM: + case PDF_TOK_EOF: + return fz_okay; + + case PDF_TOK_OPEN_ARRAY: + if (!csi->in_text) + { + error = pdf_parse_array(&csi->obj, csi->xref, file, buf, buflen); + if (error) + return fz_rethrow(error, "cannot parse array"); + } + else + { + in_array = 1; + } + break; + + case PDF_TOK_OPEN_DICT: + error = pdf_parse_dict(&csi->obj, csi->xref, file, buf, buflen); + if (error) + return fz_rethrow(error, "cannot parse dictionary"); + break; + + case PDF_TOK_NAME: + fz_strlcpy(csi->name, buf, sizeof(csi->name)); + break; + + case PDF_TOK_INT: + csi->stack[csi->top] = atoi(buf); + csi->top ++; + break; + + case PDF_TOK_REAL: + csi->stack[csi->top] = fz_atof(buf); + csi->top ++; + break; + + case PDF_TOK_STRING: + if (len <= sizeof(csi->string)) + { + memcpy(csi->string, buf, len); + csi->string_len = len; + } + else + { + csi->obj = fz_new_string(buf, len); + } + break; + + case PDF_TOK_KEYWORD: + error = pdf_run_keyword(csi, rdb, file, buf); + if (error) + return fz_rethrow(error, "cannot run keyword"); + pdf_clear_stack(csi); + break; + + default: + return fz_throw("syntax error in content stream"); + } + } +} + +/* + * Entry points + */ + +static fz_error +pdf_run_buffer(pdf_csi *csi, fz_obj *rdb, fz_buffer *contents) +{ + fz_error error; + int len = sizeof csi->xref->scratch; + char *buf = fz_malloc(len); /* we must be re-entrant for type3 fonts */ + fz_stream *file = fz_open_buffer(contents); + int save_in_text = csi->in_text; + csi->in_text = 0; + error = pdf_run_stream(csi, rdb, file, buf, len); + csi->in_text = save_in_text; + fz_close(file); + fz_free(buf); + if (error) + return fz_rethrow(error, "cannot parse content stream"); + return fz_okay; +} + +fz_error +pdf_run_page_with_usage(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matrix ctm, char *target) +{ + pdf_csi *csi; + fz_error error; + pdf_annot *annot; + int flags; + + if (page->transparency) + fz_begin_group(dev, fz_transform_rect(ctm, page->mediabox), 1, 0, 0, 1); + + csi = pdf_new_csi(xref, dev, ctm, target); + error = pdf_run_buffer(csi, page->resources, page->contents); + pdf_free_csi(csi); + if (error) + return fz_rethrow(error, "cannot parse page content stream"); + + for (annot = page->annots; annot; annot = annot->next) + { + flags = fz_to_int(fz_dict_gets(annot->obj, "F")); + + /* TODO: NoZoom and NoRotate */ + if (flags & (1 << 0)) /* Invisible */ + continue; + if (flags & (1 << 1)) /* Hidden */ + continue; + if (flags & (1 << 5)) /* NoView */ + continue; + + if (pdf_is_hidden_ocg(annot->obj, target)) + continue; + + csi = pdf_new_csi(xref, dev, ctm, target); + error = pdf_run_xobject(csi, page->resources, annot->ap, annot->matrix); + pdf_free_csi(csi); + if (error) + return fz_rethrow(error, "cannot parse annotation appearance stream"); + } + + if (page->transparency) + fz_end_group(dev); + + return fz_okay; +} + +fz_error +pdf_run_page(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matrix ctm) +{ + return pdf_run_page_with_usage(xref, page, dev, ctm, "View"); +} + +fz_error +pdf_run_glyph(pdf_xref *xref, fz_obj *resources, fz_buffer *contents, fz_device *dev, fz_matrix ctm) +{ + pdf_csi *csi = pdf_new_csi(xref, dev, ctm, "View"); + fz_error error = pdf_run_buffer(csi, resources, contents); + pdf_free_csi(csi); + if (error) + return fz_rethrow(error, "cannot parse glyph content stream"); + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_lex.c b/contrib/media/updf/pdf/pdf_lex.c new file mode 100644 index 0000000000..23a5781f6d --- /dev/null +++ b/contrib/media/updf/pdf/pdf_lex.c @@ -0,0 +1,461 @@ +#include "fitz.h" +#include "mupdf.h" + +#define IS_NUMBER \ + '+':case'-':case'.':case'0':case'1':case'2':case'3':\ + case'4':case'5':case'6':case'7':case'8':case'9' +#define IS_WHITE \ + '\000':case'\011':case'\012':case'\014':case'\015':case'\040' +#define IS_HEX \ + '0':case'1':case'2':case'3':case'4':case'5':case'6':\ + case'7':case'8':case'9':case'A':case'B':case'C':\ + case'D':case'E':case'F':case'a':case'b':case'c':\ + case'd':case'e':case'f' +#define IS_DELIM \ + '(':case')':case'<':case'>':case'[':case']':case'{':\ + case'}':case'/':case'%' + +#define RANGE_0_9 \ + '0':case'1':case'2':case'3':case'4':case'5':\ + case'6':case'7':case'8':case'9' +#define RANGE_a_f \ + 'a':case'b':case'c':case'd':case'e':case'f' +#define RANGE_A_F \ + 'A':case'B':case'C':case'D':case'E':case'F' + +static inline int iswhite(int ch) +{ + return + ch == '\000' || + ch == '\011' || + ch == '\012' || + ch == '\014' || + ch == '\015' || + ch == '\040'; +} + +static inline int unhex(int ch) +{ + if (ch >= '0' && ch <= '9') return ch - '0'; + if (ch >= 'A' && ch <= 'F') return ch - 'A' + 0xA; + if (ch >= 'a' && ch <= 'f') return ch - 'a' + 0xA; + return 0; +} + +static void +lex_white(fz_stream *f) +{ + int c; + do { + c = fz_read_byte(f); + } while ((c <= 32) && (iswhite(c))); + if (c != EOF) + fz_unread_byte(f); +} + +static void +lex_comment(fz_stream *f) +{ + int c; + do { + c = fz_read_byte(f); + } while ((c != '\012') && (c != '\015') && (c != EOF)); +} + +static int +lex_number(fz_stream *f, char *s, int n, int *tok) +{ + char *buf = s; + *tok = PDF_TOK_INT; + + /* Initially we might have +, -, . or a digit */ + if (n > 1) + { + int c = fz_read_byte(f); + switch (c) + { + case '.': + *tok = PDF_TOK_REAL; + *s++ = c; + n--; + goto loop_after_dot; + case '+': + case '-': + case RANGE_0_9: + *s++ = c; + n--; + goto loop_after_sign; + default: + fz_unread_byte(f); + goto end; + case EOF: + goto end; + } + } + + /* We can't accept a sign from here on in, just . or a digit */ +loop_after_sign: + while (n > 1) + { + int c = fz_read_byte(f); + switch (c) + { + case '.': + *tok = PDF_TOK_REAL; + *s++ = c; + n--; + goto loop_after_dot; + case RANGE_0_9: + *s++ = c; + break; + default: + fz_unread_byte(f); + goto end; + case EOF: + goto end; + } + n--; + } + + /* In here, we've seen a dot, so can accept just digits */ +loop_after_dot: + while (n > 1) + { + int c = fz_read_byte(f); + switch (c) + { + case RANGE_0_9: + *s++ = c; + break; + default: + fz_unread_byte(f); + goto end; + case EOF: + goto end; + } + n--; + } + +end: + *s = '\0'; + return s-buf; +} + +static void +lex_name(fz_stream *f, char *s, int n) +{ + while (n > 1) + { + int c = fz_read_byte(f); + switch (c) + { + case IS_WHITE: + case IS_DELIM: + fz_unread_byte(f); + goto end; + case EOF: + goto end; + case '#': + { + int d; + c = fz_read_byte(f); + switch (c) + { + case RANGE_0_9: + d = (c - '0') << 4; + break; + case RANGE_a_f: + d = (c - 'a' + 10) << 4; + break; + case RANGE_A_F: + d = (c - 'A' + 10) << 4; + break; + default: + fz_unread_byte(f); + /* fallthrough */ + case EOF: + goto end; + } + c = fz_read_byte(f); + switch (c) + { + case RANGE_0_9: + c -= '0'; + break; + case RANGE_a_f: + c -= 'a' - 10; + break; + case RANGE_A_F: + c -= 'A' - 10; + break; + default: + fz_unread_byte(f); + /* fallthrough */ + case EOF: + *s++ = d; + n--; + goto end; + } + *s++ = d + c; + n--; + break; + } + default: + *s++ = c; + n--; + break; + } + } +end: + *s = '\0'; +} + +static int +lex_string(fz_stream *f, char *buf, int n) +{ + char *s = buf; + char *e = buf + n; + int bal = 1; + int oct; + int c; + + while (s < e) + { + c = fz_read_byte(f); + switch (c) + { + case EOF: + goto end; + case '(': + bal++; + *s++ = c; + break; + case ')': + bal --; + if (bal == 0) + goto end; + *s++ = c; + break; + case '\\': + c = fz_read_byte(f); + switch (c) + { + case EOF: + goto end; + case 'n': + *s++ = '\n'; + break; + case 'r': + *s++ = '\r'; + break; + case 't': + *s++ = '\t'; + break; + case 'b': + *s++ = '\b'; + break; + case 'f': + *s++ = '\f'; + break; + case '(': + *s++ = '('; + break; + case ')': + *s++ = ')'; + break; + case '\\': + *s++ = '\\'; + break; + case RANGE_0_9: + oct = c - '0'; + c = fz_read_byte(f); + if (c >= '0' && c <= '9') + { + oct = oct * 8 + (c - '0'); + c = fz_read_byte(f); + if (c >= '0' && c <= '9') + oct = oct * 8 + (c - '0'); + else if (c != EOF) + fz_unread_byte(f); + } + else if (c != EOF) + fz_unread_byte(f); + *s++ = oct; + break; + case '\n': + break; + case '\r': + c = fz_read_byte(f); + if ((c != '\n') && (c != EOF)) + fz_unread_byte(f); + break; + default: + *s++ = c; + } + break; + default: + *s++ = c; + break; + } + } +end: + return s - buf; +} + +static int +lex_hex_string(fz_stream *f, char *buf, int n) +{ + char *s = buf; + char *e = buf + n; + int a = 0, x = 0; + int c; + + while (s < e) + { + c = fz_read_byte(f); + switch (c) + { + case IS_WHITE: + break; + case IS_HEX: + if (x) + { + *s++ = a * 16 + unhex(c); + x = !x; + } + else + { + a = unhex(c); + x = !x; + } + break; + case '>': + case EOF: + goto end; + default: + fz_warn("ignoring invalid character in hex string: '%c'", c); + } + } +end: + return s - buf; +} + +static int +pdf_token_from_keyword(char *key) +{ + switch (*key) + { + case 'R': + if (!strcmp(key, "R")) return PDF_TOK_R; + break; + case 't': + if (!strcmp(key, "true")) return PDF_TOK_TRUE; + if (!strcmp(key, "trailer")) return PDF_TOK_TRAILER; + break; + case 'f': + if (!strcmp(key, "false")) return PDF_TOK_FALSE; + break; + case 'n': + if (!strcmp(key, "null")) return PDF_TOK_NULL; + break; + case 'o': + if (!strcmp(key, "obj")) return PDF_TOK_OBJ; + break; + case 'e': + if (!strcmp(key, "endobj")) return PDF_TOK_ENDOBJ; + if (!strcmp(key, "endstream")) return PDF_TOK_ENDSTREAM; + break; + case 's': + if (!strcmp(key, "stream")) return PDF_TOK_STREAM; + if (!strcmp(key, "startxref")) return PDF_TOK_STARTXREF; + break; + case 'x': + if (!strcmp(key, "xref")) return PDF_TOK_XREF; + break; + default: + break; + } + + return PDF_TOK_KEYWORD; +} + +fz_error +pdf_lex(int *tok, fz_stream *f, char *buf, int n, int *sl) +{ + while (1) + { + int c = fz_read_byte(f); + switch (c) + { + case EOF: + *tok = PDF_TOK_EOF; + return fz_okay; + case IS_WHITE: + lex_white(f); + break; + case '%': + lex_comment(f); + break; + case '/': + lex_name(f, buf, n); + *sl = strlen(buf); + *tok = PDF_TOK_NAME; + return fz_okay; + case '(': + *sl = lex_string(f, buf, n); + *tok = PDF_TOK_STRING; + return fz_okay; + case ')': + *tok = PDF_TOK_ERROR; + goto cleanuperror; + case '<': + c = fz_read_byte(f); + if (c == '<') + { + *tok = PDF_TOK_OPEN_DICT; + } + else + { + fz_unread_byte(f); + *sl = lex_hex_string(f, buf, n); + *tok = PDF_TOK_STRING; + } + return fz_okay; + case '>': + c = fz_read_byte(f); + if (c == '>') + { + *tok = PDF_TOK_CLOSE_DICT; + return fz_okay; + } + *tok = PDF_TOK_ERROR; + goto cleanuperror; + case '[': + *tok = PDF_TOK_OPEN_ARRAY; + return fz_okay; + case ']': + *tok = PDF_TOK_CLOSE_ARRAY; + return fz_okay; + case '{': + *tok = PDF_TOK_OPEN_BRACE; + return fz_okay; + case '}': + *tok = PDF_TOK_CLOSE_BRACE; + return fz_okay; + case IS_NUMBER: + fz_unread_byte(f); + *sl = lex_number(f, buf, n, tok); + return fz_okay; + default: /* isregular: !isdelim && !iswhite && c != EOF */ + fz_unread_byte(f); + lex_name(f, buf, n); + *sl = strlen(buf); + *tok = pdf_token_from_keyword(buf); + return fz_okay; + } + } + +cleanuperror: + *tok = PDF_TOK_ERROR; + return fz_throw("lexical error"); +} diff --git a/contrib/media/updf/pdf/pdf_metrics.c b/contrib/media/updf/pdf/pdf_metrics.c new file mode 100644 index 0000000000..2fc085dee0 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_metrics.c @@ -0,0 +1,138 @@ +#include "fitz.h" +#include "mupdf.h" + +void +pdf_set_font_wmode(pdf_font_desc *font, int wmode) +{ + font->wmode = wmode; +} + +void +pdf_set_default_hmtx(pdf_font_desc *font, int w) +{ + font->dhmtx.w = w; +} + +void +pdf_set_default_vmtx(pdf_font_desc *font, int y, int w) +{ + font->dvmtx.y = y; + font->dvmtx.w = w; +} + +void +pdf_add_hmtx(pdf_font_desc *font, int lo, int hi, int w) +{ + if (font->hmtx_len + 1 >= font->hmtx_cap) + { + font->hmtx_cap = font->hmtx_cap + 16; + font->hmtx = fz_realloc(font->hmtx, font->hmtx_cap, sizeof(pdf_hmtx)); + } + + font->hmtx[font->hmtx_len].lo = lo; + font->hmtx[font->hmtx_len].hi = hi; + font->hmtx[font->hmtx_len].w = w; + font->hmtx_len++; +} + +void +pdf_add_vmtx(pdf_font_desc *font, int lo, int hi, int x, int y, int w) +{ + if (font->vmtx_len + 1 >= font->vmtx_cap) + { + font->vmtx_cap = font->vmtx_cap + 16; + font->vmtx = fz_realloc(font->vmtx, font->vmtx_cap, sizeof(pdf_vmtx)); + } + + font->vmtx[font->vmtx_len].lo = lo; + font->vmtx[font->vmtx_len].hi = hi; + font->vmtx[font->vmtx_len].x = x; + font->vmtx[font->vmtx_len].y = y; + font->vmtx[font->vmtx_len].w = w; + font->vmtx_len++; +} + +static int cmph(const void *a0, const void *b0) +{ + pdf_hmtx *a = (pdf_hmtx*)a0; + pdf_hmtx *b = (pdf_hmtx*)b0; + return a->lo - b->lo; +} + +static int cmpv(const void *a0, const void *b0) +{ + pdf_vmtx *a = (pdf_vmtx*)a0; + pdf_vmtx *b = (pdf_vmtx*)b0; + return a->lo - b->lo; +} + +void +pdf_end_hmtx(pdf_font_desc *font) +{ + if (!font->hmtx) + return; + qsort(font->hmtx, font->hmtx_len, sizeof(pdf_hmtx), cmph); +} + +void +pdf_end_vmtx(pdf_font_desc *font) +{ + if (!font->vmtx) + return; + qsort(font->vmtx, font->vmtx_len, sizeof(pdf_vmtx), cmpv); +} + +pdf_hmtx +pdf_get_hmtx(pdf_font_desc *font, int cid) +{ + int l = 0; + int r = font->hmtx_len - 1; + int m; + + if (!font->hmtx) + goto notfound; + + while (l <= r) + { + m = (l + r) >> 1; + if (cid < font->hmtx[m].lo) + r = m - 1; + else if (cid > font->hmtx[m].hi) + l = m + 1; + else + return font->hmtx[m]; + } + +notfound: + return font->dhmtx; +} + +pdf_vmtx +pdf_get_vmtx(pdf_font_desc *font, int cid) +{ + pdf_hmtx h; + pdf_vmtx v; + int l = 0; + int r = font->vmtx_len - 1; + int m; + + if (!font->vmtx) + goto notfound; + + while (l <= r) + { + m = (l + r) >> 1; + if (cid < font->vmtx[m].lo) + r = m - 1; + else if (cid > font->vmtx[m].hi) + l = m + 1; + else + return font->vmtx[m]; + } + +notfound: + h = pdf_get_hmtx(font, cid); + v = font->dvmtx; + v.x = h.w / 2; + return v; +} diff --git a/contrib/media/updf/pdf/pdf_nametree.c b/contrib/media/updf/pdf/pdf_nametree.c new file mode 100644 index 0000000000..e2b3e160ad --- /dev/null +++ b/contrib/media/updf/pdf/pdf_nametree.c @@ -0,0 +1,139 @@ +#include "fitz.h" +#include "mupdf.h" + +static fz_obj * +pdf_lookup_name_imp(fz_obj *node, fz_obj *needle) +{ + fz_obj *kids = fz_dict_gets(node, "Kids"); + fz_obj *names = fz_dict_gets(node, "Names"); + + if (fz_is_array(kids)) + { + int l = 0; + int r = fz_array_len(kids) - 1; + + while (l <= r) + { + int m = (l + r) >> 1; + fz_obj *kid = fz_array_get(kids, m); + fz_obj *limits = fz_dict_gets(kid, "Limits"); + fz_obj *first = fz_array_get(limits, 0); + fz_obj *last = fz_array_get(limits, 1); + + if (fz_objcmp(needle, first) < 0) + r = m - 1; + else if (fz_objcmp(needle, last) > 0) + l = m + 1; + else + return pdf_lookup_name_imp(kid, needle); + } + } + + if (fz_is_array(names)) + { + int l = 0; + int r = (fz_array_len(names) / 2) - 1; + + while (l <= r) + { + int m = (l + r) >> 1; + int c; + fz_obj *key = fz_array_get(names, m * 2); + fz_obj *val = fz_array_get(names, m * 2 + 1); + + c = fz_objcmp(needle, key); + if (c < 0) + r = m - 1; + else if (c > 0) + l = m + 1; + else + return val; + } + } + + return NULL; +} + +fz_obj * +pdf_lookup_name(pdf_xref *xref, char *which, fz_obj *needle) +{ + fz_obj *root = fz_dict_gets(xref->trailer, "Root"); + fz_obj *names = fz_dict_gets(root, "Names"); + fz_obj *tree = fz_dict_gets(names, which); + return pdf_lookup_name_imp(tree, needle); +} + +fz_obj * +pdf_lookup_dest(pdf_xref *xref, fz_obj *needle) +{ + fz_obj *root = fz_dict_gets(xref->trailer, "Root"); + fz_obj *dests = fz_dict_gets(root, "Dests"); + fz_obj *names = fz_dict_gets(root, "Names"); + fz_obj *dest = NULL; + + /* PDF 1.1 has destinations in a dictionary */ + if (dests) + { + if (fz_is_name(needle)) + return fz_dict_get(dests, needle); + else + return fz_dict_gets(dests, fz_to_str_buf(needle)); + } + + /* PDF 1.2 has destinations in a name tree */ + if (names && !dest) + { + fz_obj *tree = fz_dict_gets(names, "Dests"); + return pdf_lookup_name_imp(tree, needle); + } + + return NULL; +} + +static void +pdf_load_name_tree_imp(fz_obj *dict, pdf_xref *xref, fz_obj *node) +{ + fz_obj *kids = fz_dict_gets(node, "Kids"); + fz_obj *names = fz_dict_gets(node, "Names"); + int i; + + if (kids) + { + for (i = 0; i < fz_array_len(kids); i++) + pdf_load_name_tree_imp(dict, xref, fz_array_get(kids, i)); + } + + if (names) + { + for (i = 0; i + 1 < fz_array_len(names); i += 2) + { + fz_obj *key = fz_array_get(names, i); + fz_obj *val = fz_array_get(names, i + 1); + if (fz_is_string(key)) + { + key = pdf_to_utf8_name(key); + fz_dict_put(dict, key, val); + fz_drop_obj(key); + } + else if (fz_is_name(key)) + { + fz_dict_put(dict, key, val); + } + } + } +} + +fz_obj * +pdf_load_name_tree(pdf_xref *xref, char *which) +{ + fz_obj *root = fz_dict_gets(xref->trailer, "Root"); + fz_obj *names = fz_dict_gets(root, "Names"); + fz_obj *tree = fz_dict_gets(names, which); + if (fz_is_dict(tree)) + { + fz_obj *dict = fz_new_dict(100); + pdf_load_name_tree_imp(dict, xref, tree); + return dict; + } + return NULL; +} diff --git a/contrib/media/updf/pdf/pdf_outline.c b/contrib/media/updf/pdf/pdf_outline.c new file mode 100644 index 0000000000..4f81bb9b3c --- /dev/null +++ b/contrib/media/updf/pdf/pdf_outline.c @@ -0,0 +1,93 @@ +#include "fitz.h" +#include "mupdf.h" + +static pdf_outline * +pdf_load_outline_imp(pdf_xref *xref, fz_obj *dict) +{ + pdf_outline *node; + fz_obj *obj; + + if (fz_is_null(dict)) + return NULL; + + node = fz_malloc(sizeof(pdf_outline)); + node->title = NULL; + node->link = NULL; + node->child = NULL; + node->next = NULL; + node->count = 0; + + obj = fz_dict_gets(dict, "Title"); + if (obj) + node->title = pdf_to_utf8(obj); + + obj = fz_dict_gets(dict, "Count"); + if (obj) + node->count = fz_to_int(obj); + + if (fz_dict_gets(dict, "Dest") || fz_dict_gets(dict, "A")) + node->link = pdf_load_link(xref, dict); + + obj = fz_dict_gets(dict, "First"); + if (obj) + node->child = pdf_load_outline_imp(xref, obj); + + obj = fz_dict_gets(dict, "Next"); + if (obj) + node->next = pdf_load_outline_imp(xref, obj); + + return node; +} + +pdf_outline * +pdf_load_outline(pdf_xref *xref) +{ + fz_obj *root, *obj, *first; + + root = fz_dict_gets(xref->trailer, "Root"); + obj = fz_dict_gets(root, "Outlines"); + first = fz_dict_gets(obj, "First"); + if (first) + return pdf_load_outline_imp(xref, first); + + return NULL; +} + +void +pdf_free_outline(pdf_outline *outline) +{ + if (outline->child) + pdf_free_outline(outline->child); + if (outline->next) + pdf_free_outline(outline->next); + if (outline->link) + pdf_free_link(outline->link); + fz_free(outline->title); + fz_free(outline); +} + +void +pdf_debug_outline(pdf_outline *outline, int level) +{ + int i; + while (outline) + { + for (i = 0; i < level; i++) + putchar(' '); + + if (outline->title) + printf("%s ", outline->title); + else + printf("<NULL> "); + + if (outline->link) + fz_debug_obj(outline->link->dest); + else + printf("<NULL>\n"); + + if (outline->child) + pdf_debug_outline(outline->child, level + 2); + + outline = outline->next; + } +} diff --git a/contrib/media/updf/pdf/pdf_page.c b/contrib/media/updf/pdf/pdf_page.c new file mode 100644 index 0000000000..7837c4cf3e --- /dev/null +++ b/contrib/media/updf/pdf/pdf_page.c @@ -0,0 +1,370 @@ +#include "fitz.h" +#include "mupdf.h" + +struct info +{ + fz_obj *resources; + fz_obj *mediabox; + fz_obj *cropbox; + fz_obj *rotate; +}; + +int +pdf_count_pages(pdf_xref *xref) +{ + return xref->page_len; +} + +int +pdf_find_page_number(pdf_xref *xref, fz_obj *page) +{ + int i, num = fz_to_num(page); + for (i = 0; i < xref->page_len; i++) + if (num == fz_to_num(xref->page_refs[i])) + return i; + return -1; +} + +static void +pdf_load_page_tree_node(pdf_xref *xref, fz_obj *node, struct info info) +{ + fz_obj *dict, *kids, *count; + fz_obj *obj, *tmp; + int i, n; + + /* prevent infinite recursion */ + if (fz_dict_gets(node, ".seen")) + return; + + kids = fz_dict_gets(node, "Kids"); + count = fz_dict_gets(node, "Count"); + + if (fz_is_array(kids) && fz_is_int(count)) + { + obj = fz_dict_gets(node, "Resources"); + if (obj) + info.resources = obj; + obj = fz_dict_gets(node, "MediaBox"); + if (obj) + info.mediabox = obj; + obj = fz_dict_gets(node, "CropBox"); + if (obj) + info.cropbox = obj; + obj = fz_dict_gets(node, "Rotate"); + if (obj) + info.rotate = obj; + + tmp = fz_new_null(); + fz_dict_puts(node, ".seen", tmp); + fz_drop_obj(tmp); + + n = fz_array_len(kids); + for (i = 0; i < n; i++) + { + obj = fz_array_get(kids, i); + pdf_load_page_tree_node(xref, obj, info); + } + + fz_dict_dels(node, ".seen"); + } + else + { + dict = fz_resolve_indirect(node); + + if (info.resources && !fz_dict_gets(dict, "Resources")) + fz_dict_puts(dict, "Resources", info.resources); + if (info.mediabox && !fz_dict_gets(dict, "MediaBox")) + fz_dict_puts(dict, "MediaBox", info.mediabox); + if (info.cropbox && !fz_dict_gets(dict, "CropBox")) + fz_dict_puts(dict, "CropBox", info.cropbox); + if (info.rotate && !fz_dict_gets(dict, "Rotate")) + fz_dict_puts(dict, "Rotate", info.rotate); + + if (xref->page_len == xref->page_cap) + { + fz_warn("found more pages than expected"); + xref->page_cap ++; + xref->page_refs = fz_realloc(xref->page_refs, xref->page_cap, sizeof(fz_obj*)); + xref->page_objs = fz_realloc(xref->page_objs, xref->page_cap, sizeof(fz_obj*)); + } + + xref->page_refs[xref->page_len] = fz_keep_obj(node); + xref->page_objs[xref->page_len] = fz_keep_obj(dict); + xref->page_len ++; + } +} + +fz_error +pdf_load_page_tree(pdf_xref *xref) +{ + struct info info; + fz_obj *catalog = fz_dict_gets(xref->trailer, "Root"); + fz_obj *pages = fz_dict_gets(catalog, "Pages"); + fz_obj *count = fz_dict_gets(pages, "Count"); + + if (!fz_is_dict(pages)) + return fz_throw("missing page tree"); + if (!fz_is_int(count)) + return fz_throw("missing page count"); + + xref->page_cap = fz_to_int(count); + xref->page_len = 0; + xref->page_refs = fz_calloc(xref->page_cap, sizeof(fz_obj*)); + xref->page_objs = fz_calloc(xref->page_cap, sizeof(fz_obj*)); + + info.resources = NULL; + info.mediabox = NULL; + info.cropbox = NULL; + info.rotate = NULL; + + pdf_load_page_tree_node(xref, pages, info); + + return fz_okay; +} + +/* We need to know whether to install a page-level transparency group */ + +static int pdf_resources_use_blending(fz_obj *rdb); + +static int +pdf_extgstate_uses_blending(fz_obj *dict) +{ + fz_obj *obj = fz_dict_gets(dict, "BM"); + if (fz_is_name(obj) && strcmp(fz_to_name(obj), "Normal")) + return 1; + return 0; +} + +static int +pdf_pattern_uses_blending(fz_obj *dict) +{ + fz_obj *obj; + obj = fz_dict_gets(dict, "Resources"); + if (pdf_resources_use_blending(obj)) + return 1; + obj = fz_dict_gets(dict, "ExtGState"); + if (pdf_extgstate_uses_blending(obj)) + return 1; + return 0; +} + +static int +pdf_xobject_uses_blending(fz_obj *dict) +{ + fz_obj *obj = fz_dict_gets(dict, "Resources"); + if (pdf_resources_use_blending(obj)) + return 1; + return 0; +} + +static int +pdf_resources_use_blending(fz_obj *rdb) +{ + fz_obj *dict; + fz_obj *tmp; + int i; + + if (!rdb) + return 0; + + /* stop on cyclic resource dependencies */ + if (fz_dict_gets(rdb, ".useBM")) + return fz_to_bool(fz_dict_gets(rdb, ".useBM")); + + tmp = fz_new_bool(0); + fz_dict_puts(rdb, ".useBM", tmp); + fz_drop_obj(tmp); + + dict = fz_dict_gets(rdb, "ExtGState"); + for (i = 0; i < fz_dict_len(dict); i++) + if (pdf_extgstate_uses_blending(fz_dict_get_val(dict, i))) + goto found; + + dict = fz_dict_gets(rdb, "Pattern"); + for (i = 0; i < fz_dict_len(dict); i++) + if (pdf_pattern_uses_blending(fz_dict_get_val(dict, i))) + goto found; + + dict = fz_dict_gets(rdb, "XObject"); + for (i = 0; i < fz_dict_len(dict); i++) + if (pdf_xobject_uses_blending(fz_dict_get_val(dict, i))) + goto found; + + return 0; + +found: + tmp = fz_new_bool(1); + fz_dict_puts(rdb, ".useBM", tmp); + fz_drop_obj(tmp); + return 1; +} + +/* we need to combine all sub-streams into one for the content stream interpreter */ + +static fz_error +pdf_load_page_contents_array(fz_buffer **bigbufp, pdf_xref *xref, fz_obj *list) +{ + fz_error error; + fz_buffer *big; + fz_buffer *one; + int i, n; + + big = fz_new_buffer(32 * 1024); + + n = fz_array_len(list); + for (i = 0; i < n; i++) + { + fz_obj *stm = fz_array_get(list, i); + error = pdf_load_stream(&one, xref, fz_to_num(stm), fz_to_gen(stm)); + if (error) + { + fz_catch(error, "cannot load content stream part %d/%d", i + 1, n); + continue; + } + + if (big->len + one->len + 1 > big->cap) + fz_resize_buffer(big, big->len + one->len + 1); + memcpy(big->data + big->len, one->data, one->len); + big->data[big->len + one->len] = ' '; + big->len += one->len + 1; + + fz_drop_buffer(one); + } + + if (n > 0 && big->len == 0) + { + fz_drop_buffer(big); + return fz_throw("cannot load content stream"); + } + + *bigbufp = big; + return fz_okay; +} + +static fz_error +pdf_load_page_contents(fz_buffer **bufp, pdf_xref *xref, fz_obj *obj) +{ + fz_error error; + + if (fz_is_array(obj)) + { + error = pdf_load_page_contents_array(bufp, xref, obj); + if (error) + return fz_rethrow(error, "cannot load content stream array"); + } + else if (pdf_is_stream(xref, fz_to_num(obj), fz_to_gen(obj))) + { + error = pdf_load_stream(bufp, xref, fz_to_num(obj), fz_to_gen(obj)); + if (error) + return fz_rethrow(error, "cannot load content stream (%d 0 R)", fz_to_num(obj)); + } + else + { + fz_warn("page contents missing, leaving page blank"); + *bufp = fz_new_buffer(0); + } + + return fz_okay; +} + +fz_error +pdf_load_page(pdf_page **pagep, pdf_xref *xref, int number) +{ + fz_error error; + pdf_page *page; + pdf_annot *annot; + fz_obj *pageobj, *pageref; + fz_obj *obj; + fz_bbox bbox; + + if (number < 0 || number >= xref->page_len) + return fz_throw("cannot find page %d", number + 1); + + /* Ensure that we have a store for resource objects */ + if (!xref->store) + xref->store = pdf_new_store(); + + pageobj = xref->page_objs[number]; + pageref = xref->page_refs[number]; + + page = fz_malloc(sizeof(pdf_page)); + page->resources = NULL; + page->contents = NULL; + page->transparency = 0; + page->links = NULL; + page->annots = NULL; + + obj = fz_dict_gets(pageobj, "MediaBox"); + bbox = fz_round_rect(pdf_to_rect(obj)); + if (fz_is_empty_rect(pdf_to_rect(obj))) + { + fz_warn("cannot find page size for page %d", number + 1); + bbox.x0 = 0; + bbox.y0 = 0; + bbox.x1 = 612; + bbox.y1 = 792; + } + + obj = fz_dict_gets(pageobj, "CropBox"); + if (fz_is_array(obj)) + { + fz_bbox cropbox = fz_round_rect(pdf_to_rect(obj)); + bbox = fz_intersect_bbox(bbox, cropbox); + } + + page->mediabox.x0 = MIN(bbox.x0, bbox.x1); + page->mediabox.y0 = MIN(bbox.y0, bbox.y1); + page->mediabox.x1 = MAX(bbox.x0, bbox.x1); + page->mediabox.y1 = MAX(bbox.y0, bbox.y1); + + if (page->mediabox.x1 - page->mediabox.x0 < 1 || page->mediabox.y1 - page->mediabox.y0 < 1) + { + fz_warn("invalid page size in page %d", number + 1); + page->mediabox = fz_unit_rect; + } + + page->rotate = fz_to_int(fz_dict_gets(pageobj, "Rotate")); + + obj = fz_dict_gets(pageobj, "Annots"); + if (obj) + { + pdf_load_links(&page->links, xref, obj); + pdf_load_annots(&page->annots, xref, obj); + } + + page->resources = fz_dict_gets(pageobj, "Resources"); + if (page->resources) + fz_keep_obj(page->resources); + + obj = fz_dict_gets(pageobj, "Contents"); + error = pdf_load_page_contents(&page->contents, xref, obj); + if (error) + { + pdf_free_page(page); + return fz_rethrow(error, "cannot load page %d contents (%d 0 R)", number + 1, fz_to_num(pageref)); + } + + if (pdf_resources_use_blending(page->resources)) + page->transparency = 1; + + for (annot = page->annots; annot && !page->transparency; annot = annot->next) + if (pdf_resources_use_blending(annot->ap->resources)) + page->transparency = 1; + + *pagep = page; + return fz_okay; +} + +void +pdf_free_page(pdf_page *page) +{ + if (page->resources) + fz_drop_obj(page->resources); + if (page->contents) + fz_drop_buffer(page->contents); + if (page->links) + pdf_free_link(page->links); + if (page->annots) + pdf_free_annot(page->annots); + fz_free(page); +} diff --git a/contrib/media/updf/pdf/pdf_parse.c b/contrib/media/updf/pdf/pdf_parse.c new file mode 100644 index 0000000000..d6497bc418 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_parse.c @@ -0,0 +1,581 @@ +#include "fitz.h" +#include "mupdf.h" + +fz_rect +pdf_to_rect(fz_obj *array) +{ + fz_rect r; + float a = fz_to_real(fz_array_get(array, 0)); + float b = fz_to_real(fz_array_get(array, 1)); + float c = fz_to_real(fz_array_get(array, 2)); + float d = fz_to_real(fz_array_get(array, 3)); + r.x0 = MIN(a, c); + r.y0 = MIN(b, d); + r.x1 = MAX(a, c); + r.y1 = MAX(b, d); + return r; +} + +fz_matrix +pdf_to_matrix(fz_obj *array) +{ + fz_matrix m; + m.a = fz_to_real(fz_array_get(array, 0)); + m.b = fz_to_real(fz_array_get(array, 1)); + m.c = fz_to_real(fz_array_get(array, 2)); + m.d = fz_to_real(fz_array_get(array, 3)); + m.e = fz_to_real(fz_array_get(array, 4)); + m.f = fz_to_real(fz_array_get(array, 5)); + return m; +} + +/* Convert Unicode/PdfDocEncoding string into utf-8 */ +char * +pdf_to_utf8(fz_obj *src) +{ + unsigned char *srcptr = (unsigned char *) fz_to_str_buf(src); + char *dstptr, *dst; + int srclen = fz_to_str_len(src); + int dstlen = 0; + int ucs; + int i; + + if (srclen > 2 && srcptr[0] == 254 && srcptr[1] == 255) + { + for (i = 2; i < srclen; i += 2) + { + ucs = (srcptr[i] << 8) | srcptr[i+1]; + dstlen += runelen(ucs); + } + + dstptr = dst = fz_malloc(dstlen + 1); + + for (i = 2; i < srclen; i += 2) + { + ucs = (srcptr[i] << 8) | srcptr[i+1]; + dstptr += runetochar(dstptr, &ucs); + } + } + + else + { + for (i = 0; i < srclen; i++) + dstlen += runelen(pdf_doc_encoding[srcptr[i]]); + + dstptr = dst = fz_malloc(dstlen + 1); + + for (i = 0; i < srclen; i++) + { + ucs = pdf_doc_encoding[srcptr[i]]; + dstptr += runetochar(dstptr, &ucs); + } + } + + *dstptr = '\0'; + return dst; +} + +/* Convert Unicode/PdfDocEncoding string into ucs-2 */ +unsigned short * +pdf_to_ucs2(fz_obj *src) +{ + unsigned char *srcptr = (unsigned char *) fz_to_str_buf(src); + unsigned short *dstptr, *dst; + int srclen = fz_to_str_len(src); + int i; + + if (srclen > 2 && srcptr[0] == 254 && srcptr[1] == 255) + { + dstptr = dst = fz_calloc((srclen - 2) / 2 + 1, sizeof(short)); + for (i = 2; i < srclen; i += 2) + *dstptr++ = (srcptr[i] << 8) | srcptr[i+1]; + } + + else + { + dstptr = dst = fz_calloc(srclen + 1, sizeof(short)); + for (i = 0; i < srclen; i++) + *dstptr++ = pdf_doc_encoding[srcptr[i]]; + } + + *dstptr = '\0'; + return dst; +} + +/* Convert UCS-2 string into PdfDocEncoding for authentication */ +char * +pdf_from_ucs2(unsigned short *src) +{ + int i, j, len; + char *docstr; + + len = 0; + while (src[len]) + len++; + + docstr = fz_malloc(len + 1); + + for (i = 0; i < len; i++) + { + /* shortcut: check if the character has the same code point in both encodings */ + if (0 < src[i] && src[i] < 256 && pdf_doc_encoding[src[i]] == src[i]) { + docstr[i] = src[i]; + continue; + } + + /* search through pdf_docencoding for the character's code point */ + for (j = 0; j < 256; j++) + if (pdf_doc_encoding[j] == src[i]) + break; + docstr[i] = j; + + /* fail, if a character can't be encoded */ + if (!docstr[i]) + { + fz_free(docstr); + return NULL; + } + } + docstr[len] = '\0'; + + return docstr; +} + +fz_obj * +pdf_to_utf8_name(fz_obj *src) +{ + char *buf = pdf_to_utf8(src); + fz_obj *dst = fz_new_name(buf); + fz_free(buf); + return dst; +} + +fz_error +pdf_parse_array(fz_obj **op, pdf_xref *xref, fz_stream *file, char *buf, int cap) +{ + fz_error error = fz_okay; + fz_obj *ary = NULL; + fz_obj *obj = NULL; + int a = 0, b = 0, n = 0; + int tok; + int len; + + ary = fz_new_array(4); + + while (1) + { + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(ary); + return fz_rethrow(error, "cannot parse array"); + } + + if (tok != PDF_TOK_INT && tok != PDF_TOK_R) + { + if (n > 0) + { + obj = fz_new_int(a); + fz_array_push(ary, obj); + fz_drop_obj(obj); + } + if (n > 1) + { + obj = fz_new_int(b); + fz_array_push(ary, obj); + fz_drop_obj(obj); + } + n = 0; + } + + if (tok == PDF_TOK_INT && n == 2) + { + obj = fz_new_int(a); + fz_array_push(ary, obj); + fz_drop_obj(obj); + a = b; + n --; + } + + switch (tok) + { + case PDF_TOK_CLOSE_ARRAY: + *op = ary; + return fz_okay; + + case PDF_TOK_INT: + if (n == 0) + a = atoi(buf); + if (n == 1) + b = atoi(buf); + n ++; + break; + + case PDF_TOK_R: + if (n != 2) + { + fz_drop_obj(ary); + return fz_throw("cannot parse indirect reference in array"); + } + obj = fz_new_indirect(a, b, xref); + fz_array_push(ary, obj); + fz_drop_obj(obj); + n = 0; + break; + + case PDF_TOK_OPEN_ARRAY: + error = pdf_parse_array(&obj, xref, file, buf, cap); + if (error) + { + fz_drop_obj(ary); + return fz_rethrow(error, "cannot parse array"); + } + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + + case PDF_TOK_OPEN_DICT: + error = pdf_parse_dict(&obj, xref, file, buf, cap); + if (error) + { + fz_drop_obj(ary); + return fz_rethrow(error, "cannot parse array"); + } + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + + case PDF_TOK_NAME: + obj = fz_new_name(buf); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + case PDF_TOK_REAL: + obj = fz_new_real(fz_atof(buf)); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + case PDF_TOK_STRING: + obj = fz_new_string(buf, len); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + case PDF_TOK_TRUE: + obj = fz_new_bool(1); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + case PDF_TOK_FALSE: + obj = fz_new_bool(0); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + case PDF_TOK_NULL: + obj = fz_new_null(); + fz_array_push(ary, obj); + fz_drop_obj(obj); + break; + + default: + fz_drop_obj(ary); + return fz_throw("cannot parse token in array"); + } + } +} + +fz_error +pdf_parse_dict(fz_obj **op, pdf_xref *xref, fz_stream *file, char *buf, int cap) +{ + fz_error error = fz_okay; + fz_obj *dict = NULL; + fz_obj *key = NULL; + fz_obj *val = NULL; + int tok; + int len; + int a, b; + + dict = fz_new_dict(8); + + while (1) + { + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + +skip: + if (tok == PDF_TOK_CLOSE_DICT) + { + *op = dict; + return fz_okay; + } + + /* for BI .. ID .. EI in content streams */ + if (tok == PDF_TOK_KEYWORD && !strcmp(buf, "ID")) + { + *op = dict; + return fz_okay; + } + + if (tok != PDF_TOK_NAME) + { + fz_drop_obj(dict); + return fz_throw("invalid key in dict"); + } + + key = fz_new_name(buf); + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + + switch (tok) + { + case PDF_TOK_OPEN_ARRAY: + error = pdf_parse_array(&val, xref, file, buf, cap); + if (error) + { + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + break; + + case PDF_TOK_OPEN_DICT: + error = pdf_parse_dict(&val, xref, file, buf, cap); + if (error) + { + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + break; + + case PDF_TOK_NAME: val = fz_new_name(buf); break; + case PDF_TOK_REAL: val = fz_new_real(fz_atof(buf)); break; + case PDF_TOK_STRING: val = fz_new_string(buf, len); break; + case PDF_TOK_TRUE: val = fz_new_bool(1); break; + case PDF_TOK_FALSE: val = fz_new_bool(0); break; + case PDF_TOK_NULL: val = fz_new_null(); break; + + case PDF_TOK_INT: + /* 64-bit to allow for numbers > INT_MAX and overflow */ + a = (int) strtoll(buf, 0, 10); + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + if (tok == PDF_TOK_CLOSE_DICT || tok == PDF_TOK_NAME || + (tok == PDF_TOK_KEYWORD && !strcmp(buf, "ID"))) + { + val = fz_new_int(a); + fz_dict_put(dict, key, val); + fz_drop_obj(val); + fz_drop_obj(key); + goto skip; + } + if (tok == PDF_TOK_INT) + { + b = atoi(buf); + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_rethrow(error, "cannot parse dict"); + } + if (tok == PDF_TOK_R) + { + val = fz_new_indirect(a, b, xref); + break; + } + } + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_throw("invalid indirect reference in dict"); + + default: + fz_drop_obj(key); + fz_drop_obj(dict); + return fz_throw("unknown token in dict"); + } + + fz_dict_put(dict, key, val); + fz_drop_obj(val); + fz_drop_obj(key); + } +} + +fz_error +pdf_parse_stm_obj(fz_obj **op, pdf_xref *xref, fz_stream *file, char *buf, int cap) +{ + fz_error error; + int tok; + int len; + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse token in object stream"); + + switch (tok) + { + case PDF_TOK_OPEN_ARRAY: + error = pdf_parse_array(op, xref, file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse object stream"); + break; + case PDF_TOK_OPEN_DICT: + error = pdf_parse_dict(op, xref, file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse object stream"); + break; + case PDF_TOK_NAME: *op = fz_new_name(buf); break; + case PDF_TOK_REAL: *op = fz_new_real(fz_atof(buf)); break; + case PDF_TOK_STRING: *op = fz_new_string(buf, len); break; + case PDF_TOK_TRUE: *op = fz_new_bool(1); break; + case PDF_TOK_FALSE: *op = fz_new_bool(0); break; + case PDF_TOK_NULL: *op = fz_new_null(); break; + case PDF_TOK_INT: *op = fz_new_int(atoi(buf)); break; + default: return fz_throw("unknown token in object stream"); + } + + return fz_okay; +} + +fz_error +pdf_parse_ind_obj(fz_obj **op, pdf_xref *xref, + fz_stream *file, char *buf, int cap, + int *onum, int *ogen, int *ostmofs) +{ + fz_error error = fz_okay; + fz_obj *obj = NULL; + int num = 0, gen = 0, stm_ofs; + int tok; + int len; + int a, b; + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + if (tok != PDF_TOK_INT) + return fz_throw("expected object number (%d %d R)", num, gen); + num = atoi(buf); + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + if (tok != PDF_TOK_INT) + return fz_throw("expected generation number (%d %d R)", num, gen); + gen = atoi(buf); + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + if (tok != PDF_TOK_OBJ) + return fz_throw("expected 'obj' keyword (%d %d R)", num, gen); + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + + switch (tok) + { + case PDF_TOK_OPEN_ARRAY: + error = pdf_parse_array(&obj, xref, file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + break; + + case PDF_TOK_OPEN_DICT: + error = pdf_parse_dict(&obj, xref, file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + break; + + case PDF_TOK_NAME: obj = fz_new_name(buf); break; + case PDF_TOK_REAL: obj = fz_new_real(fz_atof(buf)); break; + case PDF_TOK_STRING: obj = fz_new_string(buf, len); break; + case PDF_TOK_TRUE: obj = fz_new_bool(1); break; + case PDF_TOK_FALSE: obj = fz_new_bool(0); break; + case PDF_TOK_NULL: obj = fz_new_null(); break; + + case PDF_TOK_INT: + a = atoi(buf); + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + if (tok == PDF_TOK_STREAM || tok == PDF_TOK_ENDOBJ) + { + obj = fz_new_int(a); + goto skip; + } + if (tok == PDF_TOK_INT) + { + b = atoi(buf); + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + if (tok == PDF_TOK_R) + { + obj = fz_new_indirect(a, b, xref); + break; + } + } + return fz_throw("expected 'R' keyword (%d %d R)", num, gen); + + case PDF_TOK_ENDOBJ: + obj = fz_new_null(); + goto skip; + + default: + return fz_throw("syntax error in object (%d %d R)", num, gen); + } + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + { + fz_drop_obj(obj); + return fz_rethrow(error, "cannot parse indirect object (%d %d R)", num, gen); + } + +skip: + if (tok == PDF_TOK_STREAM) + { + int c = fz_read_byte(file); + while (c == ' ') + c = fz_read_byte(file); + if (c == '\r') + { + c = fz_peek_byte(file); + if (c != '\n') + fz_warn("line feed missing after stream begin marker (%d %d R)", num, gen); + else + fz_read_byte(file); + } + stm_ofs = fz_tell(file); + } + else if (tok == PDF_TOK_ENDOBJ) + { + stm_ofs = 0; + } + else + { + fz_warn("expected 'endobj' or 'stream' keyword (%d %d R)", num, gen); + stm_ofs = 0; + } + + if (onum) *onum = num; + if (ogen) *ogen = gen; + if (ostmofs) *ostmofs = stm_ofs; + *op = obj; + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_pattern.c b/contrib/media/updf/pdf/pdf_pattern.c new file mode 100644 index 0000000000..33d84c99cc --- /dev/null +++ b/contrib/media/updf/pdf/pdf_pattern.c @@ -0,0 +1,72 @@ +#include "fitz.h" +#include "mupdf.h" + +fz_error +pdf_load_pattern(pdf_pattern **patp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + pdf_pattern *pat; + fz_obj *obj; + + if ((*patp = pdf_find_item(xref->store, pdf_drop_pattern, dict))) + { + pdf_keep_pattern(*patp); + return fz_okay; + } + + pat = fz_malloc(sizeof(pdf_pattern)); + pat->refs = 1; + pat->resources = NULL; + pat->contents = NULL; + + /* Store pattern now, to avoid possible recursion if objects refer back to this one */ + pdf_store_item(xref->store, pdf_keep_pattern, pdf_drop_pattern, dict, pat); + + pat->ismask = fz_to_int(fz_dict_gets(dict, "PaintType")) == 2; + pat->xstep = fz_to_real(fz_dict_gets(dict, "XStep")); + pat->ystep = fz_to_real(fz_dict_gets(dict, "YStep")); + + obj = fz_dict_gets(dict, "BBox"); + pat->bbox = pdf_to_rect(obj); + + obj = fz_dict_gets(dict, "Matrix"); + if (obj) + pat->matrix = pdf_to_matrix(obj); + else + pat->matrix = fz_identity; + + pat->resources = fz_dict_gets(dict, "Resources"); + if (pat->resources) + fz_keep_obj(pat->resources); + + error = pdf_load_stream(&pat->contents, xref, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + pdf_remove_item(xref->store, pdf_drop_pattern, dict); + pdf_drop_pattern(pat); + return fz_rethrow(error, "cannot load pattern stream (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + + *patp = pat; + return fz_okay; +} + +pdf_pattern * +pdf_keep_pattern(pdf_pattern *pat) +{ + pat->refs ++; + return pat; +} + +void +pdf_drop_pattern(pdf_pattern *pat) +{ + if (pat && --pat->refs == 0) + { + if (pat->resources) + fz_drop_obj(pat->resources); + if (pat->contents) + fz_drop_buffer(pat->contents); + fz_free(pat); + } +} diff --git a/contrib/media/updf/pdf/pdf_repair.c b/contrib/media/updf/pdf/pdf_repair.c new file mode 100644 index 0000000000..067fe2cf72 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_repair.c @@ -0,0 +1,463 @@ +#include "fitz.h" +#include "mupdf.h" + +/* Scan file for objects and reconstruct xref table */ + +struct entry +{ + int num; + int gen; + int ofs; + int stm_ofs; + int stm_len; +}; + +static fz_error +pdf_repair_obj(fz_stream *file, char *buf, int cap, int *stmofsp, int *stmlenp, fz_obj **encrypt, fz_obj **id) +{ + fz_error error; + int tok; + int stm_len; + int len; + int n; + + *stmofsp = 0; + *stmlenp = -1; + + stm_len = 0; + + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot parse object"); + if (tok == PDF_TOK_OPEN_DICT) + { + fz_obj *dict, *obj; + + /* Send NULL xref so we don't try to resolve references */ + error = pdf_parse_dict(&dict, NULL, file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse object"); + + obj = fz_dict_gets(dict, "Type"); + if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "XRef")) + { + obj = fz_dict_gets(dict, "Encrypt"); + if (obj) + { + if (*encrypt) + fz_drop_obj(*encrypt); + *encrypt = fz_keep_obj(obj); + } + + obj = fz_dict_gets(dict, "ID"); + if (obj) + { + if (*id) + fz_drop_obj(*id); + *id = fz_keep_obj(obj); + } + } + + obj = fz_dict_gets(dict, "Length"); + if (fz_is_int(obj)) + stm_len = fz_to_int(obj); + + fz_drop_obj(dict); + } + + while ( tok != PDF_TOK_STREAM && + tok != PDF_TOK_ENDOBJ && + tok != PDF_TOK_ERROR && + tok != PDF_TOK_EOF ) + { + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot scan for endobj or stream token"); + } + + if (tok == PDF_TOK_STREAM) + { + int c = fz_read_byte(file); + if (c == '\r') { + c = fz_peek_byte(file); + if (c == '\n') + fz_read_byte(file); + } + + *stmofsp = fz_tell(file); + if (*stmofsp < 0) + return fz_throw("cannot seek in file"); + + if (stm_len > 0) + { + fz_seek(file, *stmofsp + stm_len, 0); + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + fz_catch(error, "cannot find endstream token, falling back to scanning"); + if (tok == PDF_TOK_ENDSTREAM) + goto atobjend; + fz_seek(file, *stmofsp, 0); + } + + n = fz_read(file, (unsigned char *) buf, 9); + if (n < 0) + return fz_rethrow(n, "cannot read from file"); + + while (memcmp(buf, "endstream", 9) != 0) + { + c = fz_read_byte(file); + if (c == EOF) + break; + memmove(buf, buf + 1, 8); + buf[8] = c; + } + + *stmlenp = fz_tell(file) - *stmofsp - 9; + +atobjend: + error = pdf_lex(&tok, file, buf, cap, &len); + if (error) + return fz_rethrow(error, "cannot scan for endobj token"); + if (tok != PDF_TOK_ENDOBJ) + fz_warn("object missing 'endobj' token"); + } + + return fz_okay; +} + +static fz_error +pdf_repair_obj_stm(pdf_xref *xref, int num, int gen) +{ + fz_error error; + fz_obj *obj; + fz_stream *stm; + int tok; + int i, n, count; + char buf[256]; + + error = pdf_load_object(&obj, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load object stream object (%d %d R)", num, gen); + + count = fz_to_int(fz_dict_gets(obj, "N")); + + fz_drop_obj(obj); + + error = pdf_open_stream(&stm, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot open object stream object (%d %d R)", num, gen); + + for (i = 0; i < count; i++) + { + error = pdf_lex(&tok, stm, buf, sizeof buf, &n); + if (error || tok != PDF_TOK_INT) + { + fz_close(stm); + return fz_rethrow(error, "corrupt object stream (%d %d R)", num, gen); + } + + n = atoi(buf); + if (n >= xref->len) + pdf_resize_xref(xref, n + 1); + + xref->table[n].ofs = num; + xref->table[n].gen = i; + xref->table[n].stm_ofs = 0; + xref->table[n].obj = NULL; + xref->table[n].type = 'o'; + + error = pdf_lex(&tok, stm, buf, sizeof buf, &n); + if (error || tok != PDF_TOK_INT) + { + fz_close(stm); + return fz_rethrow(error, "corrupt object stream (%d %d R)", num, gen); + } + } + + fz_close(stm); + return fz_okay; +} + +fz_error +pdf_repair_xref(pdf_xref *xref, char *buf, int bufsize) +{ + fz_error error; + fz_obj *dict, *obj; + fz_obj *length; + + fz_obj *encrypt = NULL; + fz_obj *id = NULL; + fz_obj *root = NULL; + fz_obj *info = NULL; + + struct entry *list = NULL; + int listlen; + int listcap; + int maxnum = 0; + + int num = 0; + int gen = 0; + int tmpofs, numofs = 0, genofs = 0; + int stm_len, stm_ofs = 0; + int tok; + int next; + int i, n, c; + + fz_seek(xref->file, 0, 0); + + listlen = 0; + listcap = 1024; + list = fz_calloc(listcap, sizeof(struct entry)); + + /* look for '%PDF' version marker within first kilobyte of file */ + n = fz_read(xref->file, (unsigned char *)buf, MAX(bufsize, 1024)); + if (n < 0) + { + error = fz_rethrow(n, "cannot read from file"); + goto cleanup; + } + + fz_seek(xref->file, 0, 0); + for (i = 0; i < n - 4; i++) + { + if (memcmp(buf + i, "%PDF", 4) == 0) + { + fz_seek(xref->file, i + 8, 0); /* skip "%PDF-X.Y" */ + break; + } + } + + /* skip comment line after version marker since some generators + * forget to terminate the comment with a newline */ + c = fz_read_byte(xref->file); + while (c >= 0 && (c == ' ' || c == '%')) + c = fz_read_byte(xref->file); + fz_unread_byte(xref->file); + + while (1) + { + tmpofs = fz_tell(xref->file); + if (tmpofs < 0) + { + error = fz_throw("cannot tell in file"); + goto cleanup; + } + + error = pdf_lex(&tok, xref->file, buf, bufsize, &n); + if (error) + { + fz_catch(error, "ignoring the rest of the file"); + break; + } + + if (tok == PDF_TOK_INT) + { + numofs = genofs; + num = gen; + genofs = tmpofs; + gen = atoi(buf); + } + + else if (tok == PDF_TOK_OBJ) + { + error = pdf_repair_obj(xref->file, buf, bufsize, &stm_ofs, &stm_len, &encrypt, &id); + if (error) + { + error = fz_rethrow(error, "cannot parse object (%d %d R)", num, gen); + goto cleanup; + } + + if (listlen + 1 == listcap) + { + listcap = (listcap * 3) / 2; + list = fz_realloc(list, listcap, sizeof(struct entry)); + } + + list[listlen].num = num; + list[listlen].gen = gen; + list[listlen].ofs = numofs; + list[listlen].stm_ofs = stm_ofs; + list[listlen].stm_len = stm_len; + listlen ++; + + if (num > maxnum) + maxnum = num; + } + + /* trailer dictionary */ + else if (tok == PDF_TOK_OPEN_DICT) + { + error = pdf_parse_dict(&dict, xref, xref->file, buf, bufsize); + if (error) + { + error = fz_rethrow(error, "cannot parse object"); + goto cleanup; + } + + obj = fz_dict_gets(dict, "Encrypt"); + if (obj) + { + if (encrypt) + fz_drop_obj(encrypt); + encrypt = fz_keep_obj(obj); + } + + obj = fz_dict_gets(dict, "ID"); + if (obj) + { + if (id) + fz_drop_obj(id); + id = fz_keep_obj(obj); + } + + obj = fz_dict_gets(dict, "Root"); + if (obj) + { + if (root) + fz_drop_obj(root); + root = fz_keep_obj(obj); + } + + obj = fz_dict_gets(dict, "Info"); + if (obj) + { + if (info) + fz_drop_obj(info); + info = fz_keep_obj(obj); + } + + fz_drop_obj(dict); + } + + else if (tok == PDF_TOK_ERROR) + fz_read_byte(xref->file); + + else if (tok == PDF_TOK_EOF) + break; + } + + /* make xref reasonable */ + + pdf_resize_xref(xref, maxnum + 1); + + for (i = 0; i < listlen; i++) + { + xref->table[list[i].num].type = 'n'; + xref->table[list[i].num].ofs = list[i].ofs; + xref->table[list[i].num].gen = list[i].gen; + + xref->table[list[i].num].stm_ofs = list[i].stm_ofs; + + /* corrected stream length */ + if (list[i].stm_len >= 0) + { + error = pdf_load_object(&dict, xref, list[i].num, list[i].gen); + if (error) + { + error = fz_rethrow(error, "cannot load stream object (%d %d R)", list[i].num, list[i].gen); + goto cleanup; + } + + length = fz_new_int(list[i].stm_len); + fz_dict_puts(dict, "Length", length); + fz_drop_obj(length); + + fz_drop_obj(dict); + } + + } + + xref->table[0].type = 'f'; + xref->table[0].ofs = 0; + xref->table[0].gen = 65535; + xref->table[0].stm_ofs = 0; + xref->table[0].obj = NULL; + + next = 0; + for (i = xref->len - 1; i >= 0; i--) + { + if (xref->table[i].type == 'f') + { + xref->table[i].ofs = next; + if (xref->table[i].gen < 65535) + xref->table[i].gen ++; + next = i; + } + } + + /* create a repaired trailer, Root will be added later */ + + xref->trailer = fz_new_dict(5); + + obj = fz_new_int(maxnum + 1); + fz_dict_puts(xref->trailer, "Size", obj); + fz_drop_obj(obj); + + if (root) + { + fz_dict_puts(xref->trailer, "Root", root); + fz_drop_obj(root); + } + if (info) + { + fz_dict_puts(xref->trailer, "Info", info); + fz_drop_obj(info); + } + + if (encrypt) + { + if (fz_is_indirect(encrypt)) + { + /* create new reference with non-NULL xref pointer */ + obj = fz_new_indirect(fz_to_num(encrypt), fz_to_gen(encrypt), xref); + fz_drop_obj(encrypt); + encrypt = obj; + } + fz_dict_puts(xref->trailer, "Encrypt", encrypt); + fz_drop_obj(encrypt); + } + + if (id) + { + if (fz_is_indirect(id)) + { + /* create new reference with non-NULL xref pointer */ + obj = fz_new_indirect(fz_to_num(id), fz_to_gen(id), xref); + fz_drop_obj(id); + id = obj; + } + fz_dict_puts(xref->trailer, "ID", id); + fz_drop_obj(id); + } + + fz_free(list); + return fz_okay; + +cleanup: + if (encrypt) fz_drop_obj(encrypt); + if (id) fz_drop_obj(id); + if (root) fz_drop_obj(root); + if (info) fz_drop_obj(info); + fz_free(list); + return error; /* already rethrown */ +} + +fz_error +pdf_repair_obj_stms(pdf_xref *xref) +{ + fz_obj *dict; + int i; + + for (i = 0; i < xref->len; i++) + { + if (xref->table[i].stm_ofs) + { + pdf_load_object(&dict, xref, i, 0); + if (!strcmp(fz_to_name(fz_dict_gets(dict, "Type")), "ObjStm")) + pdf_repair_obj_stm(xref, i, 0); + fz_drop_obj(dict); + } + } + + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_shade.c b/contrib/media/updf/pdf/pdf_shade.c new file mode 100644 index 0000000000..1e0bf5fff9 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_shade.c @@ -0,0 +1,1140 @@ +#include "fitz.h" +#include "mupdf.h" + +#define HUGENUM 32000 /* how far to extend axial/radial shadings */ +#define FUNSEGS 32 /* size of sampled mesh for function-based shadings */ +#define RADSEGS 32 /* how many segments to generate for radial meshes */ +#define SUBDIV 3 /* how many levels to subdivide patches */ + +struct vertex +{ + float x, y; + float c[FZ_MAX_COLORS]; +}; + +static void +pdf_grow_mesh(fz_shade *shade, int amount) +{ + if (shade->mesh_len + amount < shade->mesh_cap) + return; + + if (shade->mesh_cap == 0) + shade->mesh_cap = 1024; + + while (shade->mesh_len + amount > shade->mesh_cap) + shade->mesh_cap = (shade->mesh_cap * 3) / 2; + + shade->mesh = fz_realloc(shade->mesh, shade->mesh_cap, sizeof(float)); +} + +static void +pdf_add_vertex(fz_shade *shade, struct vertex *v) +{ + int ncomp = shade->use_function ? 1 : shade->colorspace->n; + int i; + pdf_grow_mesh(shade, 2 + ncomp); + shade->mesh[shade->mesh_len++] = v->x; + shade->mesh[shade->mesh_len++] = v->y; + for (i = 0; i < ncomp; i++) + shade->mesh[shade->mesh_len++] = v->c[i]; +} + +static void +pdf_add_triangle(fz_shade *shade, + struct vertex *v0, + struct vertex *v1, + struct vertex *v2) +{ + pdf_add_vertex(shade, v0); + pdf_add_vertex(shade, v1); + pdf_add_vertex(shade, v2); +} + +static void +pdf_add_quad(fz_shade *shade, + struct vertex *v0, + struct vertex *v1, + struct vertex *v2, + struct vertex *v3) +{ + pdf_add_triangle(shade, v0, v1, v3); + pdf_add_triangle(shade, v1, v3, v2); +} + +/* Subdivide and tesselate tensor-patches */ + +typedef struct pdf_tensor_patch_s pdf_tensor_patch; + +struct pdf_tensor_patch_s +{ + fz_point pole[4][4]; + float color[4][FZ_MAX_COLORS]; +}; + +static void +triangulate_patch(pdf_tensor_patch p, fz_shade *shade) +{ + struct vertex v0, v1, v2, v3; + + v0.x = p.pole[0][0].x; + v0.y = p.pole[0][0].y; + memcpy(v0.c, p.color[0], sizeof(v0.c)); + + v1.x = p.pole[0][3].x; + v1.y = p.pole[0][3].y; + memcpy(v1.c, p.color[1], sizeof(v1.c)); + + v2.x = p.pole[3][3].x; + v2.y = p.pole[3][3].y; + memcpy(v2.c, p.color[2], sizeof(v2.c)); + + v3.x = p.pole[3][0].x; + v3.y = p.pole[3][0].y; + memcpy(v3.c, p.color[3], sizeof(v3.c)); + + pdf_add_quad(shade, &v0, &v1, &v2, &v3); +} + +static inline void midcolor(float *c, float *c1, float *c2) +{ + int i; + for (i = 0; i < FZ_MAX_COLORS; i++) + c[i] = (c1[i] + c2[i]) * 0.5f; +} + +static void +split_curve(fz_point *pole, fz_point *q0, fz_point *q1, int polestep) +{ + /* + split bezier curve given by control points pole[0]..pole[3] + using de casteljau algo at midpoint and build two new + bezier curves q0[0]..q0[3] and q1[0]..q1[3]. all indices + should be multiplies by polestep == 1 for vertical bezier + curves in patch and == 4 for horizontal bezier curves due + to C's multi-dimensional matrix memory layout. + */ + + float x12 = (pole[1 * polestep].x + pole[2 * polestep].x) * 0.5f; + float y12 = (pole[1 * polestep].y + pole[2 * polestep].y) * 0.5f; + + q0[1 * polestep].x = (pole[0 * polestep].x + pole[1 * polestep].x) * 0.5f; + q0[1 * polestep].y = (pole[0 * polestep].y + pole[1 * polestep].y) * 0.5f; + q1[2 * polestep].x = (pole[2 * polestep].x + pole[3 * polestep].x) * 0.5f; + q1[2 * polestep].y = (pole[2 * polestep].y + pole[3 * polestep].y) * 0.5f; + + q0[2 * polestep].x = (q0[1 * polestep].x + x12) * 0.5f; + q0[2 * polestep].y = (q0[1 * polestep].y + y12) * 0.5f; + q1[1 * polestep].x = (x12 + q1[2 * polestep].x) * 0.5f; + q1[1 * polestep].y = (y12 + q1[2 * polestep].y) * 0.5f; + + q0[3 * polestep].x = (q0[2 * polestep].x + q1[1 * polestep].x) * 0.5f; + q0[3 * polestep].y = (q0[2 * polestep].y + q1[1 * polestep].y) * 0.5f; + q1[0 * polestep].x = (q0[2 * polestep].x + q1[1 * polestep].x) * 0.5f; + q1[0 * polestep].y = (q0[2 * polestep].y + q1[1 * polestep].y) * 0.5f; + + q0[0 * polestep].x = pole[0 * polestep].x; + q0[0 * polestep].y = pole[0 * polestep].y; + q1[3 * polestep].x = pole[3 * polestep].x; + q1[3 * polestep].y = pole[3 * polestep].y; +} + +static void +split_stripe(pdf_tensor_patch *p, pdf_tensor_patch *s0, pdf_tensor_patch *s1) +{ + /* + split all horizontal bezier curves in patch, + creating two new patches with half the width. + */ + split_curve(&p->pole[0][0], &s0->pole[0][0], &s1->pole[0][0], 4); + split_curve(&p->pole[0][1], &s0->pole[0][1], &s1->pole[0][1], 4); + split_curve(&p->pole[0][2], &s0->pole[0][2], &s1->pole[0][2], 4); + split_curve(&p->pole[0][3], &s0->pole[0][3], &s1->pole[0][3], 4); + + /* interpolate the colors for the two new patches. */ + memcpy(s0->color[0], p->color[0], sizeof(s0->color[0])); + memcpy(s0->color[1], p->color[1], sizeof(s0->color[1])); + midcolor(s0->color[2], p->color[1], p->color[2]); + midcolor(s0->color[3], p->color[0], p->color[3]); + + memcpy(s1->color[0], s0->color[3], sizeof(s1->color[0])); + memcpy(s1->color[1], s0->color[2], sizeof(s1->color[1])); + memcpy(s1->color[2], p->color[2], sizeof(s1->color[2])); + memcpy(s1->color[3], p->color[3], sizeof(s1->color[3])); +} + +static void +draw_stripe(pdf_tensor_patch *p, fz_shade *shade, int depth) +{ + pdf_tensor_patch s0, s1; + + /* split patch into two half-height patches */ + split_stripe(p, &s0, &s1); + + depth--; + if (depth == 0) + { + /* if no more subdividing, draw two new patches... */ + triangulate_patch(s0, shade); + triangulate_patch(s1, shade); + } + else + { + /* ...otherwise, continue subdividing. */ + draw_stripe(&s0, shade, depth); + draw_stripe(&s1, shade, depth); + } +} + +static void +split_patch(pdf_tensor_patch *p, pdf_tensor_patch *s0, pdf_tensor_patch *s1) +{ + /* + split all vertical bezier curves in patch, + creating two new patches with half the height. + */ + split_curve(p->pole[0], s0->pole[0], s1->pole[0], 1); + split_curve(p->pole[1], s0->pole[1], s1->pole[1], 1); + split_curve(p->pole[2], s0->pole[2], s1->pole[2], 1); + split_curve(p->pole[3], s0->pole[3], s1->pole[3], 1); + + /* interpolate the colors for the two new patches. */ + memcpy(s0->color[0], p->color[0], sizeof(s0->color[0])); + midcolor(s0->color[1], p->color[0], p->color[1]); + midcolor(s0->color[2], p->color[2], p->color[3]); + memcpy(s0->color[3], p->color[3], sizeof(s0->color[3])); + + memcpy(s1->color[0], s0->color[1], sizeof(s1->color[0])); + memcpy(s1->color[1], p->color[1], sizeof(s1->color[1])); + memcpy(s1->color[2], p->color[2], sizeof(s1->color[2])); + memcpy(s1->color[3], s0->color[2], sizeof(s1->color[3])); +} + +static void +draw_patch(fz_shade *shade, pdf_tensor_patch *p, int depth, int origdepth) +{ + pdf_tensor_patch s0, s1; + + /* split patch into two half-width patches */ + split_patch(p, &s0, &s1); + + depth--; + if (depth == 0) + { + /* if no more subdividing, draw two new patches... */ + draw_stripe(&s0, shade, origdepth); + draw_stripe(&s1, shade, origdepth); + } + else + { + /* ...otherwise, continue subdividing. */ + draw_patch(shade, &s0, depth, origdepth); + draw_patch(shade, &s1, depth, origdepth); + } +} + +static fz_point +pdf_compute_tensor_interior( + fz_point a, fz_point b, fz_point c, fz_point d, + fz_point e, fz_point f, fz_point g, fz_point h) +{ + fz_point pt; + + /* see equations at page 330 in pdf 1.7 */ + + pt.x = -4 * a.x; + pt.x += 6 * (b.x + c.x); + pt.x += -2 * (d.x + e.x); + pt.x += 3 * (f.x + g.x); + pt.x += -1 * h.x; + pt.x /= 9; + + pt.y = -4 * a.y; + pt.y += 6 * (b.y + c.y); + pt.y += -2 * (d.y + e.y); + pt.y += 3 * (f.y + g.y); + pt.y += -1 * h.y; + pt.y /= 9; + + return pt; +} + +static void +pdf_make_tensor_patch(pdf_tensor_patch *p, int type, fz_point *pt) +{ + if (type == 6) + { + /* see control point stream order at page 325 in pdf 1.7 */ + + p->pole[0][0] = pt[0]; + p->pole[0][1] = pt[1]; + p->pole[0][2] = pt[2]; + p->pole[0][3] = pt[3]; + p->pole[1][3] = pt[4]; + p->pole[2][3] = pt[5]; + p->pole[3][3] = pt[6]; + p->pole[3][2] = pt[7]; + p->pole[3][1] = pt[8]; + p->pole[3][0] = pt[9]; + p->pole[2][0] = pt[10]; + p->pole[1][0] = pt[11]; + + /* see equations at page 330 in pdf 1.7 */ + + p->pole[1][1] = pdf_compute_tensor_interior( + p->pole[0][0], p->pole[0][1], p->pole[1][0], p->pole[0][3], + p->pole[3][0], p->pole[3][1], p->pole[1][3], p->pole[3][3]); + + p->pole[1][2] = pdf_compute_tensor_interior( + p->pole[0][3], p->pole[0][2], p->pole[1][3], p->pole[0][0], + p->pole[3][3], p->pole[3][2], p->pole[1][0], p->pole[3][0]); + + p->pole[2][1] = pdf_compute_tensor_interior( + p->pole[3][0], p->pole[3][1], p->pole[2][0], p->pole[3][3], + p->pole[0][0], p->pole[0][1], p->pole[2][3], p->pole[0][3]); + + p->pole[2][2] = pdf_compute_tensor_interior( + p->pole[3][3], p->pole[3][2], p->pole[2][3], p->pole[3][0], + p->pole[0][3], p->pole[0][2], p->pole[2][0], p->pole[0][0]); + } + else if (type == 7) + { + /* see control point stream order at page 330 in pdf 1.7 */ + + p->pole[0][0] = pt[0]; + p->pole[0][1] = pt[1]; + p->pole[0][2] = pt[2]; + p->pole[0][3] = pt[3]; + p->pole[1][3] = pt[4]; + p->pole[2][3] = pt[5]; + p->pole[3][3] = pt[6]; + p->pole[3][2] = pt[7]; + p->pole[3][1] = pt[8]; + p->pole[3][0] = pt[9]; + p->pole[2][0] = pt[10]; + p->pole[1][0] = pt[11]; + p->pole[1][1] = pt[12]; + p->pole[1][2] = pt[13]; + p->pole[2][2] = pt[14]; + p->pole[2][1] = pt[15]; + } +} + +/* Sample various functions into lookup tables */ + +static void +pdf_sample_composite_shade_function(fz_shade *shade, pdf_function *func, float t0, float t1) +{ + int i; + float t; + + for (i = 0; i < 256; i++) + { + t = t0 + (i / 255.0f) * (t1 - t0); + pdf_eval_function(func, &t, 1, shade->function[i], shade->colorspace->n); + shade->function[i][shade->colorspace->n] = 1; + } +} + +static void +pdf_sample_component_shade_function(fz_shade *shade, int funcs, pdf_function **func, float t0, float t1) +{ + int i, k; + float t; + + for (i = 0; i < 256; i++) + { + t = t0 + (i / 255.0f) * (t1 - t0); + for (k = 0; k < funcs; k++) + pdf_eval_function(func[k], &t, 1, &shade->function[i][k], 1); + shade->function[i][k] = 1; + } +} + +static void +pdf_sample_shade_function(fz_shade *shade, int funcs, pdf_function **func, float t0, float t1) +{ + shade->use_function = 1; + if (funcs == 1) + pdf_sample_composite_shade_function(shade, func[0], t0, t1); + else + pdf_sample_component_shade_function(shade, funcs, func, t0, t1); +} + +/* Type 1-3 -- Function-based, axial and radial shadings */ + +static void +pdf_load_function_based_shading(fz_shade *shade, pdf_xref *xref, fz_obj *dict, pdf_function *func) +{ + fz_obj *obj; + float x0, y0, x1, y1; + fz_matrix matrix; + struct vertex v[4]; + int xx, yy; + float x, y; + float xn, yn; + int i; + + x0 = y0 = 0; + x1 = y1 = 1; + obj = fz_dict_gets(dict, "Domain"); + if (fz_array_len(obj) == 4) + { + x0 = fz_to_real(fz_array_get(obj, 0)); + x1 = fz_to_real(fz_array_get(obj, 1)); + y0 = fz_to_real(fz_array_get(obj, 2)); + y1 = fz_to_real(fz_array_get(obj, 3)); + } + + matrix = fz_identity; + obj = fz_dict_gets(dict, "Matrix"); + if (fz_array_len(obj) == 6) + matrix = pdf_to_matrix(obj); + + for (yy = 0; yy < FUNSEGS; yy++) + { + y = y0 + (y1 - y0) * yy / FUNSEGS; + yn = y0 + (y1 - y0) * (yy + 1) / FUNSEGS; + + for (xx = 0; xx < FUNSEGS; xx++) + { + x = x0 + (x1 - x0) * xx / FUNSEGS; + xn = x0 + (x1 - x0) * (xx + 1) / FUNSEGS; + + v[0].x = x; v[0].y = y; + v[1].x = xn; v[1].y = y; + v[2].x = xn; v[2].y = yn; + v[3].x = x; v[3].y = yn; + + for (i = 0; i < 4; i++) + { + fz_point pt; + float fv[2]; + + fv[0] = v[i].x; + fv[1] = v[i].y; + pdf_eval_function(func, fv, 2, v[i].c, shade->colorspace->n); + + pt.x = v[i].x; + pt.y = v[i].y; + pt = fz_transform_point(matrix, pt); + v[i].x = pt.x; + v[i].y = pt.y; + } + + pdf_add_quad(shade, &v[0], &v[1], &v[2], &v[3]); + } + } +} + +static void +pdf_load_axial_shading(fz_shade *shade, pdf_xref *xref, fz_obj *dict, int funcs, pdf_function **func) +{ + fz_obj *obj; + float d0, d1; + int e0, e1; + float x0, y0, x1, y1; + struct vertex p1, p2; + + obj = fz_dict_gets(dict, "Coords"); + x0 = fz_to_real(fz_array_get(obj, 0)); + y0 = fz_to_real(fz_array_get(obj, 1)); + x1 = fz_to_real(fz_array_get(obj, 2)); + y1 = fz_to_real(fz_array_get(obj, 3)); + + d0 = 0; + d1 = 1; + obj = fz_dict_gets(dict, "Domain"); + if (fz_array_len(obj) == 2) + { + d0 = fz_to_real(fz_array_get(obj, 0)); + d1 = fz_to_real(fz_array_get(obj, 1)); + } + + e0 = e1 = 0; + obj = fz_dict_gets(dict, "Extend"); + if (fz_array_len(obj) == 2) + { + e0 = fz_to_bool(fz_array_get(obj, 0)); + e1 = fz_to_bool(fz_array_get(obj, 1)); + } + + pdf_sample_shade_function(shade, funcs, func, d0, d1); + + shade->type = FZ_LINEAR; + + shade->extend[0] = e0; + shade->extend[1] = e1; + + p1.x = x0; + p1.y = y0; + p1.c[0] = 0; + pdf_add_vertex(shade, &p1); + + p2.x = x1; + p2.y = y1; + p2.c[0] = 0; + pdf_add_vertex(shade, &p2); +} + +static void +pdf_load_radial_shading(fz_shade *shade, pdf_xref *xref, fz_obj *dict, int funcs, pdf_function **func) +{ + fz_obj *obj; + float d0, d1; + int e0, e1; + float x0, y0, r0, x1, y1, r1; + struct vertex p1, p2; + + obj = fz_dict_gets(dict, "Coords"); + x0 = fz_to_real(fz_array_get(obj, 0)); + y0 = fz_to_real(fz_array_get(obj, 1)); + r0 = fz_to_real(fz_array_get(obj, 2)); + x1 = fz_to_real(fz_array_get(obj, 3)); + y1 = fz_to_real(fz_array_get(obj, 4)); + r1 = fz_to_real(fz_array_get(obj, 5)); + + d0 = 0; + d1 = 1; + obj = fz_dict_gets(dict, "Domain"); + if (fz_array_len(obj) == 2) + { + d0 = fz_to_real(fz_array_get(obj, 0)); + d1 = fz_to_real(fz_array_get(obj, 1)); + } + + e0 = e1 = 0; + obj = fz_dict_gets(dict, "Extend"); + if (fz_array_len(obj) == 2) + { + e0 = fz_to_bool(fz_array_get(obj, 0)); + e1 = fz_to_bool(fz_array_get(obj, 1)); + } + + pdf_sample_shade_function(shade, funcs, func, d0, d1); + + shade->type = FZ_RADIAL; + + shade->extend[0] = e0; + shade->extend[1] = e1; + + p1.x = x0; + p1.y = y0; + p1.c[0] = r0; + pdf_add_vertex(shade, &p1); + + p2.x = x1; + p2.y = y1; + p2.c[0] = r1; + pdf_add_vertex(shade, &p2); +} + +/* Type 4-7 -- Triangle and patch mesh shadings */ + +static inline float read_sample(fz_stream *stream, int bits, float min, float max) +{ + /* we use pow(2,x) because (1<<x) would overflow the math on 32-bit samples */ + float bitscale = 1 / (powf(2, bits) - 1); + return min + fz_read_bits(stream, bits) * (max - min) * bitscale; +} + +struct mesh_params +{ + int vprow; + int bpflag; + int bpcoord; + int bpcomp; + float x0, x1; + float y0, y1; + float c0[FZ_MAX_COLORS]; + float c1[FZ_MAX_COLORS]; +}; + +static void +pdf_load_mesh_params(pdf_xref *xref, fz_obj *dict, struct mesh_params *p) +{ + fz_obj *obj; + int i, n; + + p->x0 = p->y0 = 0; + p->x1 = p->y1 = 1; + for (i = 0; i < FZ_MAX_COLORS; i++) + { + p->c0[i] = 0; + p->c1[i] = 1; + } + + p->vprow = fz_to_int(fz_dict_gets(dict, "VerticesPerRow")); + p->bpflag = fz_to_int(fz_dict_gets(dict, "BitsPerFlag")); + p->bpcoord = fz_to_int(fz_dict_gets(dict, "BitsPerCoordinate")); + p->bpcomp = fz_to_int(fz_dict_gets(dict, "BitsPerComponent")); + + obj = fz_dict_gets(dict, "Decode"); + if (fz_array_len(obj) >= 6) + { + n = (fz_array_len(obj) - 4) / 2; + p->x0 = fz_to_real(fz_array_get(obj, 0)); + p->x1 = fz_to_real(fz_array_get(obj, 1)); + p->y0 = fz_to_real(fz_array_get(obj, 2)); + p->y1 = fz_to_real(fz_array_get(obj, 3)); + for (i = 0; i < n; i++) + { + p->c0[i] = fz_to_real(fz_array_get(obj, 4 + i * 2)); + p->c1[i] = fz_to_real(fz_array_get(obj, 5 + i * 2)); + } + } + + if (p->vprow < 2) + p->vprow = 2; + + if (p->bpflag != 2 && p->bpflag != 4 && p->bpflag != 8) + p->bpflag = 8; + + if (p->bpcoord != 1 && p->bpcoord != 2 && p->bpcoord != 4 && + p->bpcoord != 8 && p->bpcoord != 12 && p->bpcoord != 16 && + p->bpcoord != 24 && p->bpcoord != 32) + p->bpcoord = 8; + + if (p->bpcomp != 1 && p->bpcomp != 2 && p->bpcomp != 4 && + p->bpcomp != 8 && p->bpcomp != 12 && p->bpcomp != 16) + p->bpcomp = 8; +} + +static void +pdf_load_type4_shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, + int funcs, pdf_function **func, fz_stream *stream) +{ + struct mesh_params p; + struct vertex va, vb, vc, vd; + int ncomp; + int flag; + int i; + + pdf_load_mesh_params(xref, dict, &p); + + if (funcs > 0) + { + ncomp = 1; + pdf_sample_shade_function(shade, funcs, func, p.c0[0], p.c1[0]); + } + else + ncomp = shade->colorspace->n; + + while (!fz_is_eof_bits(stream)) + { + flag = fz_read_bits(stream, p.bpflag); + vd.x = read_sample(stream, p.bpcoord, p.x0, p.x1); + vd.y = read_sample(stream, p.bpcoord, p.y0, p.y1); + for (i = 0; i < ncomp; i++) + vd.c[i] = read_sample(stream, p.bpcomp, p.c0[i], p.c1[i]); + + switch (flag) + { + case 0: /* start new triangle */ + va = vd; + + fz_read_bits(stream, p.bpflag); + vb.x = read_sample(stream, p.bpcoord, p.x0, p.x1); + vb.y = read_sample(stream, p.bpcoord, p.y0, p.y1); + for (i = 0; i < ncomp; i++) + vb.c[i] = read_sample(stream, p.bpcomp, p.c0[i], p.c1[i]); + + fz_read_bits(stream, p.bpflag); + vc.x = read_sample(stream, p.bpcoord, p.x0, p.x1); + vc.y = read_sample(stream, p.bpcoord, p.y0, p.y1); + for (i = 0; i < ncomp; i++) + vc.c[i] = read_sample(stream, p.bpcomp, p.c0[i], p.c1[i]); + + pdf_add_triangle(shade, &va, &vb, &vc); + break; + + case 1: /* Vb, Vc, Vd */ + va = vb; + vb = vc; + vc = vd; + pdf_add_triangle(shade, &va, &vb, &vc); + break; + + case 2: /* Va, Vc, Vd */ + vb = vc; + vc = vd; + pdf_add_triangle(shade, &va, &vb, &vc); + break; + } + } +} + +static void +pdf_load_type5_shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, + int funcs, pdf_function **func, fz_stream *stream) +{ + struct mesh_params p; + struct vertex *buf, *ref; + int first; + int ncomp; + int i, k; + + pdf_load_mesh_params(xref, dict, &p); + + if (funcs > 0) + { + ncomp = 1; + pdf_sample_shade_function(shade, funcs, func, p.c0[0], p.c1[0]); + } + else + ncomp = shade->colorspace->n; + + ref = fz_calloc(p.vprow, sizeof(struct vertex)); + buf = fz_calloc(p.vprow, sizeof(struct vertex)); + first = 1; + + while (!fz_is_eof_bits(stream)) + { + for (i = 0; i < p.vprow; i++) + { + buf[i].x = read_sample(stream, p.bpcoord, p.x0, p.x1); + buf[i].y = read_sample(stream, p.bpcoord, p.y0, p.y1); + for (k = 0; k < ncomp; k++) + buf[i].c[k] = read_sample(stream, p.bpcomp, p.c0[k], p.c1[k]); + } + + if (!first) + for (i = 0; i < p.vprow - 1; i++) + pdf_add_quad(shade, + &ref[i], &ref[i+1], &buf[i+1], &buf[i]); + + memcpy(ref, buf, p.vprow * sizeof(struct vertex)); + first = 0; + } + + free(ref); + free(buf); +} + +/* Type 6 & 7 -- Patch mesh shadings */ + +static void +pdf_load_type6_shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, + int funcs, pdf_function **func, fz_stream *stream) +{ + struct mesh_params p; + int haspatch, hasprevpatch; + float prevc[4][FZ_MAX_COLORS]; + fz_point prevp[12]; + int ncomp; + int i, k; + + pdf_load_mesh_params(xref, dict, &p); + + if (funcs > 0) + { + ncomp = 1; + pdf_sample_shade_function(shade, funcs, func, p.c0[0], p.c1[0]); + } + else + ncomp = shade->colorspace->n; + + hasprevpatch = 0; + + while (!fz_is_eof_bits(stream)) + { + float c[4][FZ_MAX_COLORS]; + fz_point v[12]; + int startcolor; + int startpt; + int flag; + + flag = fz_read_bits(stream, p.bpflag); + + if (flag == 0) + { + startpt = 0; + startcolor = 0; + } + else + { + startpt = 4; + startcolor = 2; + } + + for (i = startpt; i < 12; i++) + { + v[i].x = read_sample(stream, p.bpcoord, p.x0, p.x1); + v[i].y = read_sample(stream, p.bpcoord, p.y0, p.y1); + } + + for (i = startcolor; i < 4; i++) + { + for (k = 0; k < ncomp; k++) + c[i][k] = read_sample(stream, p.bpcomp, p.c0[k], p.c1[k]); + } + + haspatch = 0; + + if (flag == 0) + { + haspatch = 1; + } + else if (flag == 1 && hasprevpatch) + { + v[0] = prevp[3]; + v[1] = prevp[4]; + v[2] = prevp[5]; + v[3] = prevp[6]; + memcpy(c[0], prevc[1], ncomp * sizeof(float)); + memcpy(c[1], prevc[2], ncomp * sizeof(float)); + + haspatch = 1; + } + else if (flag == 2 && hasprevpatch) + { + v[0] = prevp[6]; + v[1] = prevp[7]; + v[2] = prevp[8]; + v[3] = prevp[9]; + memcpy(c[0], prevc[2], ncomp * sizeof(float)); + memcpy(c[1], prevc[3], ncomp * sizeof(float)); + + haspatch = 1; + } + else if (flag == 3 && hasprevpatch) + { + v[0] = prevp[ 9]; + v[1] = prevp[10]; + v[2] = prevp[11]; + v[3] = prevp[ 0]; + memcpy(c[0], prevc[3], ncomp * sizeof(float)); + memcpy(c[1], prevc[0], ncomp * sizeof(float)); + + haspatch = 1; + } + + if (haspatch) + { + pdf_tensor_patch patch; + + pdf_make_tensor_patch(&patch, 6, v); + + for (i = 0; i < 4; i++) + memcpy(patch.color[i], c[i], ncomp * sizeof(float)); + + draw_patch(shade, &patch, SUBDIV, SUBDIV); + + for (i = 0; i < 12; i++) + prevp[i] = v[i]; + + for (i = 0; i < 4; i++) + memcpy(prevc[i], c[i], ncomp * sizeof(float)); + + hasprevpatch = 1; + } + } +} + +static void +pdf_load_type7_shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, + int funcs, pdf_function **func, fz_stream *stream) +{ + struct mesh_params p; + int haspatch, hasprevpatch; + float prevc[4][FZ_MAX_COLORS]; + fz_point prevp[16]; + int ncomp; + int i, k; + + pdf_load_mesh_params(xref, dict, &p); + + if (funcs > 0) + { + ncomp = 1; + pdf_sample_shade_function(shade, funcs, func, p.c0[0], p.c1[0]); + } + else + ncomp = shade->colorspace->n; + + hasprevpatch = 0; + + while (!fz_is_eof_bits(stream)) + { + float c[4][FZ_MAX_COLORS]; + fz_point v[16]; + int startcolor; + int startpt; + int flag; + + flag = fz_read_bits(stream, p.bpflag); + + if (flag == 0) + { + startpt = 0; + startcolor = 0; + } + else + { + startpt = 4; + startcolor = 2; + } + + for (i = startpt; i < 16; i++) + { + v[i].x = read_sample(stream, p.bpcoord, p.x0, p.x1); + v[i].y = read_sample(stream, p.bpcoord, p.y0, p.y1); + } + + for (i = startcolor; i < 4; i++) + { + for (k = 0; k < ncomp; k++) + c[i][k] = read_sample(stream, p.bpcomp, p.c0[k], p.c1[k]); + } + + haspatch = 0; + + if (flag == 0) + { + haspatch = 1; + } + else if (flag == 1 && hasprevpatch) + { + v[0] = prevp[3]; + v[1] = prevp[4]; + v[2] = prevp[5]; + v[3] = prevp[6]; + memcpy(c[0], prevc[1], ncomp * sizeof(float)); + memcpy(c[1], prevc[2], ncomp * sizeof(float)); + + haspatch = 1; + } + else if (flag == 2 && hasprevpatch) + { + v[0] = prevp[6]; + v[1] = prevp[7]; + v[2] = prevp[8]; + v[3] = prevp[9]; + memcpy(c[0], prevc[2], ncomp * sizeof(float)); + memcpy(c[1], prevc[3], ncomp * sizeof(float)); + + haspatch = 1; + } + else if (flag == 3 && hasprevpatch) + { + v[0] = prevp[ 9]; + v[1] = prevp[10]; + v[2] = prevp[11]; + v[3] = prevp[ 0]; + memcpy(c[0], prevc[3], ncomp * sizeof(float)); + memcpy(c[1], prevc[0], ncomp * sizeof(float)); + + haspatch = 1; + } + + if (haspatch) + { + pdf_tensor_patch patch; + + pdf_make_tensor_patch(&patch, 7, v); + + for (i = 0; i < 4; i++) + memcpy(patch.color[i], c[i], ncomp * sizeof(float)); + + draw_patch(shade, &patch, SUBDIV, SUBDIV); + + for (i = 0; i < 16; i++) + prevp[i] = v[i]; + + for (i = 0; i < 4; i++) + memcpy(prevc[i], c[i], FZ_MAX_COLORS * sizeof(float)); + + hasprevpatch = 1; + } + } +} + +/* Load all of the shading dictionary parameters, then switch on the shading type. */ + +static fz_error +pdf_load_shading_dict(fz_shade **shadep, pdf_xref *xref, fz_obj *dict, fz_matrix transform) +{ + fz_error error; + fz_shade *shade; + pdf_function *func[FZ_MAX_COLORS] = { NULL }; + fz_stream *stream = NULL; + fz_obj *obj; + int funcs; + int type; + int i; + + shade = fz_malloc(sizeof(fz_shade)); + shade->refs = 1; + shade->type = FZ_MESH; + shade->use_background = 0; + shade->use_function = 0; + shade->matrix = transform; + shade->bbox = fz_infinite_rect; + shade->extend[0] = 0; + shade->extend[1] = 0; + + shade->mesh_len = 0; + shade->mesh_cap = 0; + shade->mesh = NULL; + + shade->colorspace = NULL; + + funcs = 0; + + obj = fz_dict_gets(dict, "ShadingType"); + type = fz_to_int(obj); + + obj = fz_dict_gets(dict, "ColorSpace"); + if (!obj) + { + fz_drop_shade(shade); + return fz_throw("shading colorspace is missing"); + } + error = pdf_load_colorspace(&shade->colorspace, xref, obj); + if (error) + { + fz_drop_shade(shade); + return fz_rethrow(error, "cannot load colorspace (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + } + + obj = fz_dict_gets(dict, "Background"); + if (obj) + { + shade->use_background = 1; + for (i = 0; i < shade->colorspace->n; i++) + shade->background[i] = fz_to_real(fz_array_get(obj, i)); + } + + obj = fz_dict_gets(dict, "BBox"); + if (fz_is_array(obj)) + { + shade->bbox = pdf_to_rect(obj); + } + + obj = fz_dict_gets(dict, "Function"); + if (fz_is_dict(obj)) + { + funcs = 1; + + error = pdf_load_function(&func[0], xref, obj); + if (error) + { + error = fz_rethrow(error, "cannot load shading function (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + goto cleanup; + } + } + else if (fz_is_array(obj)) + { + funcs = fz_array_len(obj); + if (funcs != 1 && funcs != shade->colorspace->n) + { + error = fz_throw("incorrect number of shading functions"); + goto cleanup; + } + + for (i = 0; i < funcs; i++) + { + error = pdf_load_function(&func[i], xref, fz_array_get(obj, i)); + if (error) + { + error = fz_rethrow(error, "cannot load shading function (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + goto cleanup; + } + } + } + + if (type >= 4 && type <= 7) + { + error = pdf_open_stream(&stream, xref, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + error = fz_rethrow(error, "cannot open shading stream (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + goto cleanup; + } + } + + switch (type) + { + case 1: pdf_load_function_based_shading(shade, xref, dict, func[0]); break; + case 2: pdf_load_axial_shading(shade, xref, dict, funcs, func); break; + case 3: pdf_load_radial_shading(shade, xref, dict, funcs, func); break; + case 4: pdf_load_type4_shade(shade, xref, dict, funcs, func, stream); break; + case 5: pdf_load_type5_shade(shade, xref, dict, funcs, func, stream); break; + case 6: pdf_load_type6_shade(shade, xref, dict, funcs, func, stream); break; + case 7: pdf_load_type7_shade(shade, xref, dict, funcs, func, stream); break; + default: + error = fz_throw("unknown shading type: %d", type); + goto cleanup; + } + + if (stream) + fz_close(stream); + for (i = 0; i < funcs; i++) + if (func[i]) + pdf_drop_function(func[i]); + + *shadep = shade; + return fz_okay; + +cleanup: + if (stream) + fz_close(stream); + for (i = 0; i < funcs; i++) + if (func[i]) + pdf_drop_function(func[i]); + fz_drop_shade(shade); + + return fz_rethrow(error, "cannot load shading type %d (%d %d R)", type, fz_to_num(dict), fz_to_gen(dict)); +} + +fz_error +pdf_load_shading(fz_shade **shadep, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + fz_matrix mat; + fz_obj *obj; + + if ((*shadep = pdf_find_item(xref->store, fz_drop_shade, dict))) + { + fz_keep_shade(*shadep); + return fz_okay; + } + + /* Type 2 pattern dictionary */ + if (fz_dict_gets(dict, "PatternType")) + { + obj = fz_dict_gets(dict, "Matrix"); + if (obj) + mat = pdf_to_matrix(obj); + else + mat = fz_identity; + + obj = fz_dict_gets(dict, "ExtGState"); + if (obj) + { + if (fz_dict_gets(obj, "CA") || fz_dict_gets(obj, "ca")) + { + fz_warn("shading with alpha not supported"); + } + } + + obj = fz_dict_gets(dict, "Shading"); + if (!obj) + return fz_throw("syntaxerror: missing shading dictionary"); + + error = pdf_load_shading_dict(shadep, xref, obj, mat); + if (error) + return fz_rethrow(error, "cannot load shading dictionary (%d %d R)", fz_to_num(obj), fz_to_gen(obj)); + } + + /* Naked shading dictionary */ + else + { + error = pdf_load_shading_dict(shadep, xref, dict, fz_identity); + if (error) + return fz_rethrow(error, "cannot load shading dictionary (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + + pdf_store_item(xref->store, fz_keep_shade, fz_drop_shade, dict, *shadep); + + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_store.c b/contrib/media/updf/pdf/pdf_store.c new file mode 100644 index 0000000000..a57f839a88 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_store.c @@ -0,0 +1,222 @@ +#include "fitz.h" +#include "mupdf.h" + +typedef struct pdf_item_s pdf_item; + +struct pdf_item_s +{ + void *drop_func; + fz_obj *key; + void *val; + int age; + pdf_item *next; +}; + +struct refkey +{ + void *drop_func; + int num; + int gen; +}; + +struct pdf_store_s +{ + fz_hash_table *hash; /* hash for num/gen keys */ + pdf_item *root; /* linked list for everything else */ +}; + +pdf_store * +pdf_new_store(void) +{ + pdf_store *store; + store = fz_malloc(sizeof(pdf_store)); + store->hash = fz_new_hash_table(4096, sizeof(struct refkey)); + store->root = NULL; + return store; +} + +void +pdf_store_item(pdf_store *store, void *keepfunc, void *drop_func, fz_obj *key, void *val) +{ + pdf_item *item; + + if (!store) + return; + + item = fz_malloc(sizeof(pdf_item)); + item->drop_func = drop_func; + item->key = fz_keep_obj(key); + item->val = ((void*(*)(void*))keepfunc)(val); + item->age = 0; + item->next = NULL; + + if (fz_is_indirect(key)) + { + struct refkey refkey; + refkey.drop_func = drop_func; + refkey.num = fz_to_num(key); + refkey.gen = fz_to_gen(key); + fz_hash_insert(store->hash, &refkey, item); + } + else + { + item->next = store->root; + store->root = item; + } +} + +void * +pdf_find_item(pdf_store *store, void *drop_func, fz_obj *key) +{ + struct refkey refkey; + pdf_item *item; + + if (!store) + return NULL; + + if (key == NULL) + return NULL; + + if (fz_is_indirect(key)) + { + refkey.drop_func = drop_func; + refkey.num = fz_to_num(key); + refkey.gen = fz_to_gen(key); + item = fz_hash_find(store->hash, &refkey); + if (item) + { + item->age = 0; + return item->val; + } + } + else + { + for (item = store->root; item; item = item->next) + { + if (item->drop_func == drop_func && !fz_objcmp(item->key, key)) + { + item->age = 0; + return item->val; + } + } + } + + return NULL; +} + +void +pdf_remove_item(pdf_store *store, void *drop_func, fz_obj *key) +{ + struct refkey refkey; + pdf_item *item, *prev, *next; + + if (fz_is_indirect(key)) + { + refkey.drop_func = drop_func; + refkey.num = fz_to_num(key); + refkey.gen = fz_to_gen(key); + item = fz_hash_find(store->hash, &refkey); + if (item) + { + fz_hash_remove(store->hash, &refkey); + ((void(*)(void*))item->drop_func)(item->val); + fz_drop_obj(item->key); + fz_free(item); + } + } + else + { + prev = NULL; + for (item = store->root; item; item = next) + { + next = item->next; + if (item->drop_func == drop_func && !fz_objcmp(item->key, key)) + { + if (!prev) + store->root = next; + else + prev->next = next; + ((void(*)(void*))item->drop_func)(item->val); + fz_drop_obj(item->key); + fz_free(item); + } + else + prev = item; + } + } +} + +void +pdf_age_store(pdf_store *store, int maxage) +{ + struct refkey *refkey; + pdf_item *item, *prev, *next; + int i; + + for (i = 0; i < fz_hash_len(store->hash); i++) + { + refkey = fz_hash_get_key(store->hash, i); + item = fz_hash_get_val(store->hash, i); + if (item && ++item->age > maxage) + { + fz_hash_remove(store->hash, refkey); + ((void(*)(void*))item->drop_func)(item->val); + fz_drop_obj(item->key); + fz_free(item); + i--; /* items with same hash may move into place */ + } + } + + prev = NULL; + for (item = store->root; item; item = next) + { + next = item->next; + if (++item->age > maxage) + { + if (!prev) + store->root = next; + else + prev->next = next; + ((void(*)(void*))item->drop_func)(item->val); + fz_drop_obj(item->key); + fz_free(item); + } + else + prev = item; + } +} + +void +pdf_free_store(pdf_store *store) +{ + pdf_age_store(store, 0); + fz_free_hash(store->hash); + fz_free(store); +} + +void +pdf_debug_store(pdf_store *store) +{ + pdf_item *item; + pdf_item *next; + struct refkey *refkey; + int i; + + printf("-- resource store contents --\n"); + + for (i = 0; i < fz_hash_len(store->hash); i++) + { + refkey = fz_hash_get_key(store->hash, i); + item = fz_hash_get_val(store->hash, i); + if (item) + printf("store[%d] (%d %d R) = %p\n", i, refkey->num, refkey->gen, item->val); + } + + for (item = store->root; item; item = next) + { + next = item->next; + printf("store[*] "); + fz_debug_obj(item->key); + printf(" = %p\n", item->val); + } +} diff --git a/contrib/media/updf/pdf/pdf_stream.c b/contrib/media/updf/pdf/pdf_stream.c new file mode 100644 index 0000000000..c2dd857835 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_stream.c @@ -0,0 +1,385 @@ +#include "fitz.h" +#include "mupdf.h" + +/* + * Check if an object is a stream or not. + */ +int +pdf_is_stream(pdf_xref *xref, int num, int gen) +{ + fz_error error; + + if (num < 0 || num >= xref->len) + return 0; + + error = pdf_cache_object(xref, num, gen); + if (error) + { + fz_catch(error, "cannot load object, ignoring error"); + return 0; + } + + return xref->table[num].stm_ofs > 0; +} + +/* + * Scan stream dictionary for an explicit /Crypt filter + */ +static int +pdf_stream_has_crypt(fz_obj *stm) +{ + fz_obj *filters; + fz_obj *obj; + int i; + + filters = fz_dict_getsa(stm, "Filter", "F"); + if (filters) + { + if (!strcmp(fz_to_name(filters), "Crypt")) + return 1; + if (fz_is_array(filters)) + { + for (i = 0; i < fz_array_len(filters); i++) + { + obj = fz_array_get(filters, i); + if (!strcmp(fz_to_name(obj), "Crypt")) + return 1; + } + } + } + return 0; +} + +/* + * Create a filter given a name and param dictionary. + */ +static fz_stream * +build_filter(fz_stream *chain, pdf_xref * xref, fz_obj * f, fz_obj * p, int num, int gen) +{ + fz_error error; + char *s; + + s = fz_to_name(f); + + if (!strcmp(s, "ASCIIHexDecode") || !strcmp(s, "AHx")) + return fz_open_ahxd(chain); + + else if (!strcmp(s, "ASCII85Decode") || !strcmp(s, "A85")) + return fz_open_a85d(chain); + + else if (!strcmp(s, "CCITTFaxDecode") || !strcmp(s, "CCF")) + return fz_open_faxd(chain, p); + + else if (!strcmp(s, "DCTDecode") || !strcmp(s, "DCT")) + return fz_open_dctd(chain, p); + + else if (!strcmp(s, "RunLengthDecode") || !strcmp(s, "RL")) + return fz_open_rld(chain); + + else if (!strcmp(s, "FlateDecode") || !strcmp(s, "Fl")) + { + fz_obj *obj = fz_dict_gets(p, "Predictor"); + if (fz_to_int(obj) > 1) + return fz_open_predict(fz_open_flated(chain), p); + return fz_open_flated(chain); + } + + else if (!strcmp(s, "LZWDecode") || !strcmp(s, "LZW")) + { + fz_obj *obj = fz_dict_gets(p, "Predictor"); + if (fz_to_int(obj) > 1) + return fz_open_predict(fz_open_lzwd(chain, p), p); + return fz_open_lzwd(chain, p); + } + + else if (!strcmp(s, "JBIG2Decode")) + { + fz_obj *obj = fz_dict_gets(p, "JBIG2Globals"); + if (obj) + { + fz_buffer *globals; + error = pdf_load_stream(&globals, xref, fz_to_num(obj), fz_to_gen(obj)); + if (error) + fz_catch(error, "cannot load jbig2 global segments"); + chain = fz_open_jbig2d(chain, globals); + fz_drop_buffer(globals); + return chain; + } + return fz_open_jbig2d(chain, NULL); + } + + else if (!strcmp(s, "JPXDecode")) + return chain; /* JPX decoding is special cased in the image loading code */ + + else if (!strcmp(s, "Crypt")) + { + fz_obj *name; + + if (!xref->crypt) + { + fz_warn("crypt filter in unencrypted document"); + return chain; + } + + name = fz_dict_gets(p, "Name"); + if (fz_is_name(name)) + return pdf_open_crypt_with_filter(chain, xref->crypt, fz_to_name(name), num, gen); + + return chain; + } + + fz_warn("unknown filter name (%s)", s); + return chain; +} + +/* + * Build a chain of filters given filter names and param dicts. + * If head is given, start filter chain with it. + * Assume ownership of head. + */ +static fz_stream * +build_filter_chain(fz_stream *chain, pdf_xref *xref, fz_obj *fs, fz_obj *ps, int num, int gen) +{ + fz_obj *f; + fz_obj *p; + int i; + + for (i = 0; i < fz_array_len(fs); i++) + { + f = fz_array_get(fs, i); + p = fz_array_get(ps, i); + chain = build_filter(chain, xref, f, p, num, gen); + } + + return chain; +} + +/* + * Build a filter for reading raw stream data. + * This is a null filter to constrain reading to the + * stream length, followed by a decryption filter. + */ +static fz_stream * +pdf_open_raw_filter(fz_stream *chain, pdf_xref *xref, fz_obj *stmobj, int num, int gen) +{ + int hascrypt; + int len; + + /* don't close chain when we close this filter */ + fz_keep_stream(chain); + + len = fz_to_int(fz_dict_gets(stmobj, "Length")); + chain = fz_open_null(chain, len); + + hascrypt = pdf_stream_has_crypt(stmobj); + if (xref->crypt && !hascrypt) + chain = pdf_open_crypt(chain, xref->crypt, num, gen); + + return chain; +} + +/* + * Construct a filter to decode a stream, constraining + * to stream length and decrypting. + */ +static fz_stream * +pdf_open_filter(fz_stream *chain, pdf_xref *xref, fz_obj *stmobj, int num, int gen) +{ + fz_obj *filters; + fz_obj *params; + + filters = fz_dict_getsa(stmobj, "Filter", "F"); + params = fz_dict_getsa(stmobj, "DecodeParms", "DP"); + + chain = pdf_open_raw_filter(chain, xref, stmobj, num, gen); + + if (fz_is_name(filters)) + return build_filter(chain, xref, filters, params, num, gen); + if (fz_array_len(filters) > 0) + return build_filter_chain(chain, xref, filters, params, num, gen); + + return chain; +} + +/* + * Construct a filter to decode a stream, without + * constraining to stream length, and without decryption. + */ +fz_stream * +pdf_open_inline_stream(fz_stream *chain, pdf_xref *xref, fz_obj *stmobj, int length) +{ + fz_obj *filters; + fz_obj *params; + + filters = fz_dict_getsa(stmobj, "Filter", "F"); + params = fz_dict_getsa(stmobj, "DecodeParms", "DP"); + + /* don't close chain when we close this filter */ + fz_keep_stream(chain); + + if (fz_is_name(filters)) + return build_filter(chain, xref, filters, params, 0, 0); + if (fz_array_len(filters) > 0) + return build_filter_chain(chain, xref, filters, params, 0, 0); + + return fz_open_null(chain, length); +} + +/* + * Open a stream for reading the raw (compressed but decrypted) data. + * Using xref->file while this is open is a bad idea. + */ +fz_error +pdf_open_raw_stream(fz_stream **stmp, pdf_xref *xref, int num, int gen) +{ + pdf_xref_entry *x; + fz_error error; + + if (num < 0 || num >= xref->len) + return fz_throw("object id out of range (%d %d R)", num, gen); + + x = xref->table + num; + + error = pdf_cache_object(xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load stream object (%d %d R)", num, gen); + + if (x->stm_ofs) + { + *stmp = pdf_open_raw_filter(xref->file, xref, x->obj, num, gen); + fz_seek(xref->file, x->stm_ofs, 0); + return fz_okay; + } + + return fz_throw("object is not a stream"); +} + +/* + * Open a stream for reading uncompressed data. + * Put the opened file in xref->stream. + * Using xref->file while a stream is open is a Bad idea. + */ +fz_error +pdf_open_stream(fz_stream **stmp, pdf_xref *xref, int num, int gen) +{ + pdf_xref_entry *x; + fz_error error; + + if (num < 0 || num >= xref->len) + return fz_throw("object id out of range (%d %d R)", num, gen); + + x = xref->table + num; + + error = pdf_cache_object(xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load stream object (%d %d R)", num, gen); + + if (x->stm_ofs) + { + *stmp = pdf_open_filter(xref->file, xref, x->obj, num, gen); + fz_seek(xref->file, x->stm_ofs, 0); + return fz_okay; + } + + return fz_throw("object is not a stream"); +} + +fz_error +pdf_open_stream_at(fz_stream **stmp, pdf_xref *xref, int num, int gen, fz_obj *dict, int stm_ofs) +{ + if (stm_ofs) + { + *stmp = pdf_open_filter(xref->file, xref, dict, num, gen); + fz_seek(xref->file, stm_ofs, 0); + return fz_okay; + } + return fz_throw("object is not a stream"); +} + +/* + * Load raw (compressed but decrypted) contents of a stream into buf. + */ +fz_error +pdf_load_raw_stream(fz_buffer **bufp, pdf_xref *xref, int num, int gen) +{ + fz_error error; + fz_stream *stm; + fz_obj *dict; + int len; + + error = pdf_load_object(&dict, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load stream dictionary (%d %d R)", num, gen); + + len = fz_to_int(fz_dict_gets(dict, "Length")); + + fz_drop_obj(dict); + + error = pdf_open_raw_stream(&stm, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot open raw stream (%d %d R)", num, gen); + + error = fz_read_all(bufp, stm, len); + if (error) + { + fz_close(stm); + return fz_rethrow(error, "cannot read raw stream (%d %d R)", num, gen); + } + + fz_close(stm); + return fz_okay; +} + +static int +pdf_guess_filter_length(int len, char *filter) +{ + if (!strcmp(filter, "ASCIIHexDecode")) + return len / 2; + if (!strcmp(filter, "ASCII85Decode")) + return len * 4 / 5; + if (!strcmp(filter, "FlateDecode")) + return len * 3; + if (!strcmp(filter, "RunLengthDecode")) + return len * 3; + if (!strcmp(filter, "LZWDecode")) + return len * 2; + return len; +} + +/* + * Load uncompressed contents of a stream into buf. + */ +fz_error +pdf_load_stream(fz_buffer **bufp, pdf_xref *xref, int num, int gen) +{ + fz_error error; + fz_stream *stm; + fz_obj *dict, *obj; + int i, len; + + error = pdf_open_stream(&stm, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot open stream (%d %d R)", num, gen); + + error = pdf_load_object(&dict, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load stream dictionary (%d %d R)", num, gen); + + len = fz_to_int(fz_dict_gets(dict, "Length")); + obj = fz_dict_gets(dict, "Filter"); + len = pdf_guess_filter_length(len, fz_to_name(obj)); + for (i = 0; i < fz_array_len(obj); i++) + len = pdf_guess_filter_length(len, fz_to_name(fz_array_get(obj, i))); + + fz_drop_obj(dict); + + error = fz_read_all(bufp, stm, len); + if (error) + { + fz_close(stm); + return fz_rethrow(error, "cannot read raw stream (%d %d R)", num, gen); + } + + fz_close(stm); + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_type3.c b/contrib/media/updf/pdf/pdf_type3.c new file mode 100644 index 0000000000..1d851ebe67 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_type3.c @@ -0,0 +1,158 @@ +#include "fitz.h" +#include "mupdf.h" + +static fz_error +pdf_run_glyph_func(void *xref, fz_obj *rdb, fz_buffer *contents, fz_device *dev, fz_matrix ctm) +{ + return pdf_run_glyph(xref, rdb, contents, dev, ctm); +} + +fz_error +pdf_load_type3_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict) +{ + fz_error error; + char buf[256]; + char *estrings[256]; + pdf_font_desc *fontdesc; + fz_obj *encoding; + fz_obj *widths; + fz_obj *charprocs; + fz_obj *obj; + int first, last; + int i, k, n; + fz_rect bbox; + fz_matrix matrix; + + obj = fz_dict_gets(dict, "Name"); + if (fz_is_name(obj)) + fz_strlcpy(buf, fz_to_name(obj), sizeof buf); + else + sprintf(buf, "Unnamed-T3"); + + fontdesc = pdf_new_font_desc(); + + obj = fz_dict_gets(dict, "FontMatrix"); + matrix = pdf_to_matrix(obj); + + obj = fz_dict_gets(dict, "FontBBox"); + bbox = pdf_to_rect(obj); + + fontdesc->font = fz_new_type3_font(buf, matrix); + + fz_set_font_bbox(fontdesc->font, bbox.x0, bbox.y0, bbox.x1, bbox.y1); + + /* Encoding */ + + for (i = 0; i < 256; i++) + estrings[i] = NULL; + + encoding = fz_dict_gets(dict, "Encoding"); + if (!encoding) + { + error = fz_throw("syntaxerror: Type3 font missing Encoding"); + goto cleanup; + } + + if (fz_is_name(encoding)) + pdf_load_encoding(estrings, fz_to_name(encoding)); + + if (fz_is_dict(encoding)) + { + fz_obj *base, *diff, *item; + + base = fz_dict_gets(encoding, "BaseEncoding"); + if (fz_is_name(base)) + pdf_load_encoding(estrings, fz_to_name(base)); + + diff = fz_dict_gets(encoding, "Differences"); + if (fz_is_array(diff)) + { + n = fz_array_len(diff); + k = 0; + for (i = 0; i < n; i++) + { + item = fz_array_get(diff, i); + if (fz_is_int(item)) + k = fz_to_int(item); + if (fz_is_name(item)) + estrings[k++] = fz_to_name(item); + if (k < 0) k = 0; + if (k > 255) k = 255; + } + } + } + + fontdesc->encoding = pdf_new_identity_cmap(0, 1); + + error = pdf_load_to_unicode(fontdesc, xref, estrings, NULL, fz_dict_gets(dict, "ToUnicode")); + if (error) + goto cleanup; + + /* Widths */ + + pdf_set_default_hmtx(fontdesc, 0); + + first = fz_to_int(fz_dict_gets(dict, "FirstChar")); + last = fz_to_int(fz_dict_gets(dict, "LastChar")); + + widths = fz_dict_gets(dict, "Widths"); + if (!widths) + { + error = fz_throw("syntaxerror: Type3 font missing Widths"); + goto cleanup; + } + + for (i = first; i <= last; i++) + { + float w = fz_to_real(fz_array_get(widths, i - first)); + w = fontdesc->font->t3matrix.a * w * 1000; + fontdesc->font->t3widths[i] = w * 0.001f; + pdf_add_hmtx(fontdesc, i, i, w); + } + + pdf_end_hmtx(fontdesc); + + /* Resources -- inherit page resources if the font doesn't have its own */ + + fontdesc->font->t3resources = fz_dict_gets(dict, "Resources"); + if (!fontdesc->font->t3resources) + fontdesc->font->t3resources = rdb; + if (fontdesc->font->t3resources) + fz_keep_obj(fontdesc->font->t3resources); + if (!fontdesc->font->t3resources) + fz_warn("no resource dictionary for type 3 font!"); + + fontdesc->font->t3xref = xref; + fontdesc->font->t3run = pdf_run_glyph_func; + + /* CharProcs */ + + charprocs = fz_dict_gets(dict, "CharProcs"); + if (!charprocs) + { + error = fz_throw("syntaxerror: Type3 font missing CharProcs"); + goto cleanup; + } + + for (i = 0; i < 256; i++) + { + if (estrings[i]) + { + obj = fz_dict_gets(charprocs, estrings[i]); + if (pdf_is_stream(xref, fz_to_num(obj), fz_to_gen(obj))) + { + error = pdf_load_stream(&fontdesc->font->t3procs[i], xref, fz_to_num(obj), fz_to_gen(obj)); + if (error) + goto cleanup; + } + } + } + + *fontdescp = fontdesc; + return fz_okay; + +cleanup: + fz_drop_font(fontdesc->font); + fz_free(fontdesc); + return fz_rethrow(error, "cannot load type3 font (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); +} diff --git a/contrib/media/updf/pdf/pdf_unicode.c b/contrib/media/updf/pdf/pdf_unicode.c new file mode 100644 index 0000000000..2b28b608cf --- /dev/null +++ b/contrib/media/updf/pdf/pdf_unicode.c @@ -0,0 +1,83 @@ +#include "fitz.h" +#include "mupdf.h" + +/* Load or synthesize ToUnicode map for fonts */ + +fz_error +pdf_load_to_unicode(pdf_font_desc *font, pdf_xref *xref, + char **strings, char *collection, fz_obj *cmapstm) +{ + fz_error error = fz_okay; + pdf_cmap *cmap; + int cid; + int ucsbuf[8]; + int ucslen; + int i; + + if (pdf_is_stream(xref, fz_to_num(cmapstm), fz_to_gen(cmapstm))) + { + error = pdf_load_embedded_cmap(&cmap, xref, cmapstm); + if (error) + return fz_rethrow(error, "cannot load embedded cmap (%d %d R)", fz_to_num(cmapstm), fz_to_gen(cmapstm)); + + font->to_unicode = pdf_new_cmap(); + + for (i = 0; i < (strings ? 256 : 65536); i++) + { + cid = pdf_lookup_cmap(font->encoding, i); + if (cid >= 0) + { + ucslen = pdf_lookup_cmap_full(cmap, i, ucsbuf); + if (ucslen == 1) + pdf_map_range_to_range(font->to_unicode, cid, cid, ucsbuf[0]); + if (ucslen > 1) + pdf_map_one_to_many(font->to_unicode, cid, ucsbuf, ucslen); + } + } + + pdf_sort_cmap(font->to_unicode); + + pdf_drop_cmap(cmap); + } + + else if (collection) + { + error = fz_okay; + + if (!strcmp(collection, "Adobe-CNS1")) + error = pdf_load_system_cmap(&font->to_unicode, "Adobe-CNS1-UCS2"); + else if (!strcmp(collection, "Adobe-GB1")) + error = pdf_load_system_cmap(&font->to_unicode, "Adobe-GB1-UCS2"); + else if (!strcmp(collection, "Adobe-Japan1")) + error = pdf_load_system_cmap(&font->to_unicode, "Adobe-Japan1-UCS2"); + else if (!strcmp(collection, "Adobe-Korea1")) + error = pdf_load_system_cmap(&font->to_unicode, "Adobe-Korea1-UCS2"); + + if (error) + return fz_rethrow(error, "cannot load ToUnicode system cmap %s-UCS2", collection); + } + + if (strings) + { + /* TODO one-to-many mappings */ + + font->cid_to_ucs_len = 256; + font->cid_to_ucs = fz_calloc(256, sizeof(unsigned short)); + + for (i = 0; i < 256; i++) + { + if (strings[i]) + font->cid_to_ucs[i] = pdf_lookup_agl(strings[i]); + else + font->cid_to_ucs[i] = '?'; + } + } + + if (!font->to_unicode && !font->cid_to_ucs) + { + /* TODO: synthesize a ToUnicode if it's a freetype font with + * cmap and/or post tables or if it has glyph names. */ + } + + return fz_okay; +} diff --git a/contrib/media/updf/pdf/pdf_xobject.c b/contrib/media/updf/pdf/pdf_xobject.c new file mode 100644 index 0000000000..6228377f59 --- /dev/null +++ b/contrib/media/updf/pdf/pdf_xobject.c @@ -0,0 +1,96 @@ +#include "fitz.h" +#include "mupdf.h" + +fz_error +pdf_load_xobject(pdf_xobject **formp, pdf_xref *xref, fz_obj *dict) +{ + fz_error error; + pdf_xobject *form; + fz_obj *obj; + + if ((*formp = pdf_find_item(xref->store, pdf_drop_xobject, dict))) + { + pdf_keep_xobject(*formp); + return fz_okay; + } + + form = fz_malloc(sizeof(pdf_xobject)); + form->refs = 1; + form->resources = NULL; + form->contents = NULL; + form->colorspace = NULL; + + /* Store item immediately, to avoid possible recursion if objects refer back to this one */ + pdf_store_item(xref->store, pdf_keep_xobject, pdf_drop_xobject, dict, form); + + obj = fz_dict_gets(dict, "BBox"); + form->bbox = pdf_to_rect(obj); + + obj = fz_dict_gets(dict, "Matrix"); + if (obj) + form->matrix = pdf_to_matrix(obj); + else + form->matrix = fz_identity; + + form->isolated = 0; + form->knockout = 0; + form->transparency = 0; + + obj = fz_dict_gets(dict, "Group"); + if (obj) + { + fz_obj *attrs = obj; + + form->isolated = fz_to_bool(fz_dict_gets(attrs, "I")); + form->knockout = fz_to_bool(fz_dict_gets(attrs, "K")); + + obj = fz_dict_gets(attrs, "S"); + if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "Transparency")) + form->transparency = 1; + + obj = fz_dict_gets(attrs, "CS"); + if (obj) + { + error = pdf_load_colorspace(&form->colorspace, xref, obj); + if (error) + fz_catch(error, "cannot load xobject colorspace"); + } + } + + form->resources = fz_dict_gets(dict, "Resources"); + if (form->resources) + fz_keep_obj(form->resources); + + error = pdf_load_stream(&form->contents, xref, fz_to_num(dict), fz_to_gen(dict)); + if (error) + { + pdf_remove_item(xref->store, pdf_drop_xobject, dict); + pdf_drop_xobject(form); + return fz_rethrow(error, "cannot load xobject content stream (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + } + + *formp = form; + return fz_okay; +} + +pdf_xobject * +pdf_keep_xobject(pdf_xobject *xobj) +{ + xobj->refs ++; + return xobj; +} + +void +pdf_drop_xobject(pdf_xobject *xobj) +{ + if (xobj && --xobj->refs == 0) + { + if (xobj->colorspace) + fz_drop_colorspace(xobj->colorspace); + if (xobj->resources) + fz_drop_obj(xobj->resources); + if (xobj->contents) + fz_drop_buffer(xobj->contents); + fz_free(xobj); + } +} diff --git a/contrib/media/updf/pdf/pdf_xref.c b/contrib/media/updf/pdf/pdf_xref.c new file mode 100644 index 0000000000..bd25004ecb --- /dev/null +++ b/contrib/media/updf/pdf/pdf_xref.c @@ -0,0 +1,940 @@ +#include "fitz.h" +#include "mupdf.h" + +static inline int iswhite(int ch) +{ + return + ch == '\000' || ch == '\011' || ch == '\012' || + ch == '\014' || ch == '\015' || ch == '\040'; +} + +/* + * magic version tag and startxref + */ + +static fz_error +pdf_load_version(pdf_xref *xref) +{ + char buf[20]; + + fz_seek(xref->file, 0, 0); + fz_read_line(xref->file, buf, sizeof buf); + if (memcmp(buf, "%PDF-", 5) != 0) + return fz_throw("cannot recognize version marker"); + + xref->version = atoi(buf + 5) * 10 + atoi(buf + 7); + + return fz_okay; +} + +static fz_error +pdf_read_start_xref(pdf_xref *xref) +{ + unsigned char buf[1024]; + int t, n; + int i; + + fz_seek(xref->file, 0, 2); + + xref->file_size = fz_tell(xref->file); + + t = MAX(0, xref->file_size - (int)sizeof buf); + fz_seek(xref->file, t, 0); + + n = fz_read(xref->file, buf, sizeof buf); + if (n < 0) + return fz_rethrow(n, "cannot read from file"); + + for (i = n - 9; i >= 0; i--) + { + if (memcmp(buf + i, "startxref", 9) == 0) + { + i += 9; + while (iswhite(buf[i]) && i < n) + i ++; + xref->startxref = atoi((char*)(buf + i)); + return fz_okay; + } + } + + return fz_throw("cannot find startxref"); +} + +/* + * trailer dictionary + */ + +static fz_error +pdf_read_old_trailer(pdf_xref *xref, char *buf, int cap) +{ + fz_error error; + int len; + char *s; + int n; + int t; + int tok; + int c; + + fz_read_line(xref->file, buf, cap); + if (strncmp(buf, "xref", 4) != 0) + return fz_throw("cannot find xref marker"); + + while (1) + { + c = fz_peek_byte(xref->file); + if (!(c >= '0' && c <= '9')) + break; + + fz_read_line(xref->file, buf, cap); + s = buf; + fz_strsep(&s, " "); /* ignore ofs */ + if (!s) + return fz_throw("invalid range marker in xref"); + len = atoi(fz_strsep(&s, " ")); + + /* broken pdfs where the section is not on a separate line */ + if (s && *s != '\0') + fz_seek(xref->file, -(2 + (int)strlen(s)), 1); + + t = fz_tell(xref->file); + if (t < 0) + return fz_throw("cannot tell in file"); + + fz_seek(xref->file, t + 20 * len, 0); + } + + error = pdf_lex(&tok, xref->file, buf, cap, &n); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + if (tok != PDF_TOK_TRAILER) + return fz_throw("expected trailer marker"); + + error = pdf_lex(&tok, xref->file, buf, cap, &n); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + if (tok != PDF_TOK_OPEN_DICT) + return fz_throw("expected trailer dictionary"); + + error = pdf_parse_dict(&xref->trailer, xref, xref->file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + return fz_okay; +} + +static fz_error +pdf_read_new_trailer(pdf_xref *xref, char *buf, int cap) +{ + fz_error error; + error = pdf_parse_ind_obj(&xref->trailer, xref, xref->file, buf, cap, NULL, NULL, NULL); + if (error) + return fz_rethrow(error, "cannot parse trailer (compressed)"); + return fz_okay; +} + +static fz_error +pdf_read_trailer(pdf_xref *xref, char *buf, int cap) +{ + fz_error error; + int c; + + fz_seek(xref->file, xref->startxref, 0); + + while (iswhite(fz_peek_byte(xref->file))) + fz_read_byte(xref->file); + + c = fz_peek_byte(xref->file); + if (c == 'x') + { + error = pdf_read_old_trailer(xref, buf, cap); + if (error) + return fz_rethrow(error, "cannot read trailer"); + } + else if (c >= '0' && c <= '9') + { + error = pdf_read_new_trailer(xref, buf, cap); + if (error) + return fz_rethrow(error, "cannot read trailer"); + } + else + { + return fz_throw("cannot recognize xref format: '%c'", c); + } + + return fz_okay; +} + +/* + * xref tables + */ + +void +pdf_resize_xref(pdf_xref *xref, int newlen) +{ + int i; + + xref->table = fz_realloc(xref->table, newlen, sizeof(pdf_xref_entry)); + for (i = xref->len; i < newlen; i++) + { + xref->table[i].type = 0; + xref->table[i].ofs = 0; + xref->table[i].gen = 0; + xref->table[i].stm_ofs = 0; + xref->table[i].obj = NULL; + } + xref->len = newlen; +} + +static fz_error +pdf_read_old_xref(fz_obj **trailerp, pdf_xref *xref, char *buf, int cap) +{ + fz_error error; + int ofs, len; + char *s; + int n; + int tok; + int i; + int c; + + fz_read_line(xref->file, buf, cap); + if (strncmp(buf, "xref", 4) != 0) + return fz_throw("cannot find xref marker"); + + while (1) + { + c = fz_peek_byte(xref->file); + if (!(c >= '0' && c <= '9')) + break; + + fz_read_line(xref->file, buf, cap); + s = buf; + ofs = atoi(fz_strsep(&s, " ")); + len = atoi(fz_strsep(&s, " ")); + + /* broken pdfs where the section is not on a separate line */ + if (s && *s != '\0') + { + fz_warn("broken xref section. proceeding anyway."); + fz_seek(xref->file, -(2 + (int)strlen(s)), 1); + } + + /* broken pdfs where size in trailer undershoots entries in xref sections */ + if (ofs + len > xref->len) + { + fz_warn("broken xref section, proceeding anyway."); + pdf_resize_xref(xref, ofs + len); + } + + for (i = ofs; i < ofs + len; i++) + { + n = fz_read(xref->file, (unsigned char *) buf, 20); + if (n < 0) + return fz_rethrow(n, "cannot read xref table"); + if (!xref->table[i].type) + { + s = buf; + + /* broken pdfs where line start with white space */ + while (*s != '\0' && iswhite(*s)) + s++; + + xref->table[i].ofs = atoi(s); + xref->table[i].gen = atoi(s + 11); + xref->table[i].type = s[17]; + if (s[17] != 'f' && s[17] != 'n' && s[17] != 'o') + return fz_throw("unexpected xref type: %#x (%d %d R)", s[17], i, xref->table[i].gen); + } + } + } + + error = pdf_lex(&tok, xref->file, buf, cap, &n); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + if (tok != PDF_TOK_TRAILER) + return fz_throw("expected trailer marker"); + + error = pdf_lex(&tok, xref->file, buf, cap, &n); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + if (tok != PDF_TOK_OPEN_DICT) + return fz_throw("expected trailer dictionary"); + + error = pdf_parse_dict(trailerp, xref, xref->file, buf, cap); + if (error) + return fz_rethrow(error, "cannot parse trailer"); + return fz_okay; +} + +static fz_error +pdf_read_new_xref_section(pdf_xref *xref, fz_stream *stm, int i0, int i1, int w0, int w1, int w2) +{ + int i, n; + + if (i0 < 0 || i0 + i1 > xref->len) + return fz_throw("xref stream has too many entries"); + + for (i = i0; i < i0 + i1; i++) + { + int a = 0; + int b = 0; + int c = 0; + + if (fz_is_eof(stm)) + return fz_throw("truncated xref stream"); + + for (n = 0; n < w0; n++) + a = (a << 8) + fz_read_byte(stm); + for (n = 0; n < w1; n++) + b = (b << 8) + fz_read_byte(stm); + for (n = 0; n < w2; n++) + c = (c << 8) + fz_read_byte(stm); + + if (!xref->table[i].type) + { + int t = w0 ? a : 1; + xref->table[i].type = t == 0 ? 'f' : t == 1 ? 'n' : t == 2 ? 'o' : 0; + xref->table[i].ofs = w1 ? b : 0; + xref->table[i].gen = w2 ? c : 0; + } + } + + return fz_okay; +} + +static fz_error +pdf_read_new_xref(fz_obj **trailerp, pdf_xref *xref, char *buf, int cap) +{ + fz_error error; + fz_stream *stm; + fz_obj *trailer; + fz_obj *index; + fz_obj *obj; + int num, gen, stm_ofs; + int size, w0, w1, w2; + int t; + + error = pdf_parse_ind_obj(&trailer, xref, xref->file, buf, cap, &num, &gen, &stm_ofs); + if (error) + return fz_rethrow(error, "cannot parse compressed xref stream object"); + + obj = fz_dict_gets(trailer, "Size"); + if (!obj) + { + fz_drop_obj(trailer); + return fz_throw("xref stream missing Size entry (%d %d R)", num, gen); + } + size = fz_to_int(obj); + + if (size > xref->len) + { + pdf_resize_xref(xref, size); + } + + if (num < 0 || num >= xref->len) + { + fz_drop_obj(trailer); + return fz_throw("object id (%d %d R) out of range (0..%d)", num, gen, xref->len - 1); + } + + obj = fz_dict_gets(trailer, "W"); + if (!obj) { + fz_drop_obj(trailer); + return fz_throw("xref stream missing W entry (%d %d R)", num, gen); + } + w0 = fz_to_int(fz_array_get(obj, 0)); + w1 = fz_to_int(fz_array_get(obj, 1)); + w2 = fz_to_int(fz_array_get(obj, 2)); + + index = fz_dict_gets(trailer, "Index"); + + error = pdf_open_stream_at(&stm, xref, num, gen, trailer, stm_ofs); + if (error) + { + fz_drop_obj(trailer); + return fz_rethrow(error, "cannot open compressed xref stream (%d %d R)", num, gen); + } + + if (!index) + { + error = pdf_read_new_xref_section(xref, stm, 0, size, w0, w1, w2); + if (error) + { + fz_close(stm); + fz_drop_obj(trailer); + return fz_rethrow(error, "cannot read xref stream (%d %d R)", num, gen); + } + } + else + { + for (t = 0; t < fz_array_len(index); t += 2) + { + int i0 = fz_to_int(fz_array_get(index, t + 0)); + int i1 = fz_to_int(fz_array_get(index, t + 1)); + error = pdf_read_new_xref_section(xref, stm, i0, i1, w0, w1, w2); + if (error) + { + fz_close(stm); + fz_drop_obj(trailer); + return fz_rethrow(error, "cannot read xref stream section (%d %d R)", num, gen); + } + } + } + + fz_close(stm); + + *trailerp = trailer; + + return fz_okay; +} + +static fz_error +pdf_read_xref(fz_obj **trailerp, pdf_xref *xref, int ofs, char *buf, int cap) +{ + fz_error error; + int c; + + fz_seek(xref->file, ofs, 0); + + while (iswhite(fz_peek_byte(xref->file))) + fz_read_byte(xref->file); + + c = fz_peek_byte(xref->file); + if (c == 'x') + { + error = pdf_read_old_xref(trailerp, xref, buf, cap); + if (error) + return fz_rethrow(error, "cannot read xref (ofs=%d)", ofs); + } + else if (c >= '0' && c <= '9') + { + error = pdf_read_new_xref(trailerp, xref, buf, cap); + if (error) + return fz_rethrow(error, "cannot read xref (ofs=%d)", ofs); + } + else + { + return fz_throw("cannot recognize xref format"); + } + + return fz_okay; +} + +static fz_error +pdf_read_xref_sections(pdf_xref *xref, int ofs, char *buf, int cap) +{ + fz_error error; + fz_obj *trailer; + fz_obj *prev; + fz_obj *xrefstm; + + error = pdf_read_xref(&trailer, xref, ofs, buf, cap); + if (error) + return fz_rethrow(error, "cannot read xref section"); + + /* FIXME: do we overwrite free entries properly? */ + xrefstm = fz_dict_gets(trailer, "XRefStm"); + if (xrefstm) + { + error = pdf_read_xref_sections(xref, fz_to_int(xrefstm), buf, cap); + if (error) + { + fz_drop_obj(trailer); + return fz_rethrow(error, "cannot read /XRefStm xref section"); + } + } + + prev = fz_dict_gets(trailer, "Prev"); + if (prev) + { + error = pdf_read_xref_sections(xref, fz_to_int(prev), buf, cap); + if (error) + { + fz_drop_obj(trailer); + return fz_rethrow(error, "cannot read /Prev xref section"); + } + } + + fz_drop_obj(trailer); + return fz_okay; +} + +/* + * load xref tables from pdf + */ + +static fz_error +pdf_load_xref(pdf_xref *xref, char *buf, int bufsize) +{ + fz_error error; + fz_obj *size; + int i; + + error = pdf_load_version(xref); + if (error) + return fz_rethrow(error, "cannot read version marker"); + + error = pdf_read_start_xref(xref); + if (error) + return fz_rethrow(error, "cannot read startxref"); + + error = pdf_read_trailer(xref, buf, bufsize); + if (error) + return fz_rethrow(error, "cannot read trailer"); + + size = fz_dict_gets(xref->trailer, "Size"); + if (!size) + return fz_throw("trailer missing Size entry"); + + pdf_resize_xref(xref, fz_to_int(size)); + + error = pdf_read_xref_sections(xref, xref->startxref, buf, bufsize); + if (error) + return fz_rethrow(error, "cannot read xref"); + + /* broken pdfs where first object is not free */ + if (xref->table[0].type != 'f') + return fz_throw("first object in xref is not free"); + + /* broken pdfs where object offsets are out of range */ + for (i = 0; i < xref->len; i++) + { + if (xref->table[i].type == 'n') + if (xref->table[i].ofs <= 0 || xref->table[i].ofs >= xref->file_size) + return fz_throw("object offset out of range: %d (%d 0 R)", xref->table[i].ofs, i); + if (xref->table[i].type == 'o') + if (xref->table[i].ofs <= 0 || xref->table[i].ofs >= xref->len || xref->table[xref->table[i].ofs].type != 'n') + return fz_throw("invalid reference to an objstm that does not exist: %d (%d 0 R)", xref->table[i].ofs, i); + } + + return fz_okay; +} + +/* + * Initialize and load xref tables. + * If password is not null, try to decrypt. + */ + +fz_error +pdf_open_xref_with_stream(pdf_xref **xrefp, fz_stream *file, char *password) +{ + pdf_xref *xref; + fz_error error; + fz_obj *encrypt, *id; + fz_obj *dict, *obj; + int i, repaired = 0; + + /* install pdf specific callback */ + fz_resolve_indirect = pdf_resolve_indirect; + + xref = fz_malloc(sizeof(pdf_xref)); + + memset(xref, 0, sizeof(pdf_xref)); + + xref->file = fz_keep_stream(file); + + error = pdf_load_xref(xref, xref->scratch, sizeof xref->scratch); + if (error) + { + fz_catch(error, "trying to repair"); + if (xref->table) + { + fz_free(xref->table); + xref->table = NULL; + xref->len = 0; + } + if (xref->trailer) + { + fz_drop_obj(xref->trailer); + xref->trailer = NULL; + } + error = pdf_repair_xref(xref, xref->scratch, sizeof xref->scratch); + if (error) + { + pdf_free_xref(xref); + return fz_rethrow(error, "cannot repair document"); + } + repaired = 1; + } + + encrypt = fz_dict_gets(xref->trailer, "Encrypt"); + id = fz_dict_gets(xref->trailer, "ID"); + if (fz_is_dict(encrypt)) + { + error = pdf_new_crypt(&xref->crypt, encrypt, id); + if (error) + { + pdf_free_xref(xref); + return fz_rethrow(error, "cannot decrypt document"); + } + } + + if (pdf_needs_password(xref)) + { + /* Only care if we have a password */ + if (password) + { + int okay = pdf_authenticate_password(xref, password); + if (!okay) + { + pdf_free_xref(xref); + return fz_throw("invalid password"); + } + } + } + + if (repaired) + { + int hasroot, hasinfo; + + error = pdf_repair_obj_stms(xref); + if (error) + { + pdf_free_xref(xref); + return fz_rethrow(error, "cannot repair document"); + } + + hasroot = fz_dict_gets(xref->trailer, "Root") != NULL; + hasinfo = fz_dict_gets(xref->trailer, "Info") != NULL; + + for (i = 1; i < xref->len; i++) + { + if (xref->table[i].type == 0 || xref->table[i].type == 'f') + continue; + + error = pdf_load_object(&dict, xref, i, 0); + if (error) + { + fz_catch(error, "ignoring broken object (%d 0 R)", i); + continue; + } + + if (!hasroot) + { + obj = fz_dict_gets(dict, "Type"); + if (fz_is_name(obj) && !strcmp(fz_to_name(obj), "Catalog")) + { + obj = fz_new_indirect(i, 0, xref); + fz_dict_puts(xref->trailer, "Root", obj); + fz_drop_obj(obj); + } + } + + if (!hasinfo) + { + if (fz_dict_gets(dict, "Creator") || fz_dict_gets(dict, "Producer")) + { + obj = fz_new_indirect(i, 0, xref); + fz_dict_puts(xref->trailer, "Info", obj); + fz_drop_obj(obj); + } + } + + fz_drop_obj(dict); + } + } + + *xrefp = xref; + return fz_okay; +} + +void +pdf_free_xref(pdf_xref *xref) +{ + int i; + + if (xref->store) + pdf_free_store(xref->store); + + if (xref->table) + { + for (i = 0; i < xref->len; i++) + { + if (xref->table[i].obj) + { + fz_drop_obj(xref->table[i].obj); + xref->table[i].obj = NULL; + } + } + fz_free(xref->table); + } + + if (xref->page_objs) + { + for (i = 0; i < xref->page_len; i++) + fz_drop_obj(xref->page_objs[i]); + fz_free(xref->page_objs); + } + + if (xref->page_refs) + { + for (i = 0; i < xref->page_len; i++) + fz_drop_obj(xref->page_refs[i]); + fz_free(xref->page_refs); + } + + if (xref->file) + fz_close(xref->file); + if (xref->trailer) + fz_drop_obj(xref->trailer); + if (xref->crypt) + pdf_free_crypt(xref->crypt); + + fz_free(xref); +} + +void +pdf_debug_xref(pdf_xref *xref) +{ + int i; + printf("xref\n0 %d\n", xref->len); + for (i = 0; i < xref->len; i++) + { + printf("%05d: %010d %05d %c (stm_ofs=%d)\n", i, + xref->table[i].ofs, + xref->table[i].gen, + xref->table[i].type ? xref->table[i].type : '-', + xref->table[i].stm_ofs); + } +} + +/* + * compressed object streams + */ + +static fz_error +pdf_load_obj_stm(pdf_xref *xref, int num, int gen, char *buf, int cap) +{ + fz_error error; + fz_stream *stm; + fz_obj *objstm; + int *numbuf; + int *ofsbuf; + + fz_obj *obj; + int first; + int count; + int i, n; + int tok; + + error = pdf_load_object(&objstm, xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load object stream object (%d %d R)", num, gen); + + count = fz_to_int(fz_dict_gets(objstm, "N")); + first = fz_to_int(fz_dict_gets(objstm, "First")); + + numbuf = fz_calloc(count, sizeof(int)); + ofsbuf = fz_calloc(count, sizeof(int)); + + error = pdf_open_stream(&stm, xref, num, gen); + if (error) + { + error = fz_rethrow(error, "cannot open object stream (%d %d R)", num, gen); + goto cleanupbuf; + } + + for (i = 0; i < count; i++) + { + error = pdf_lex(&tok, stm, buf, cap, &n); + if (error || tok != PDF_TOK_INT) + { + error = fz_rethrow(error, "corrupt object stream (%d %d R)", num, gen); + goto cleanupstm; + } + numbuf[i] = atoi(buf); + + error = pdf_lex(&tok, stm, buf, cap, &n); + if (error || tok != PDF_TOK_INT) + { + error = fz_rethrow(error, "corrupt object stream (%d %d R)", num, gen); + goto cleanupstm; + } + ofsbuf[i] = atoi(buf); + } + + fz_seek(stm, first, 0); + + for (i = 0; i < count; i++) + { + fz_seek(stm, first + ofsbuf[i], 0); + + error = pdf_parse_stm_obj(&obj, xref, stm, buf, cap); + if (error) + { + error = fz_rethrow(error, "cannot parse object %d in stream (%d %d R)", i, num, gen); + goto cleanupstm; + } + + if (numbuf[i] < 1 || numbuf[i] >= xref->len) + { + fz_drop_obj(obj); + error = fz_throw("object id (%d 0 R) out of range (0..%d)", numbuf[i], xref->len - 1); + goto cleanupstm; + } + + if (xref->table[numbuf[i]].type == 'o' && xref->table[numbuf[i]].ofs == num) + { + if (xref->table[numbuf[i]].obj) + fz_drop_obj(xref->table[numbuf[i]].obj); + xref->table[numbuf[i]].obj = obj; + } + else + { + fz_drop_obj(obj); + } + } + + fz_close(stm); + fz_free(ofsbuf); + fz_free(numbuf); + fz_drop_obj(objstm); + return fz_okay; + +cleanupstm: + fz_close(stm); +cleanupbuf: + fz_free(ofsbuf); + fz_free(numbuf); + fz_drop_obj(objstm); + return error; /* already rethrown */ +} + +/* + * object loading + */ + +fz_error +pdf_cache_object(pdf_xref *xref, int num, int gen) +{ + fz_error error; + pdf_xref_entry *x; + int rnum, rgen; + + if (num < 0 || num >= xref->len) + return fz_throw("object out of range (%d %d R); xref size %d", num, gen, xref->len); + + x = &xref->table[num]; + + if (x->obj) + return fz_okay; + + if (x->type == 'f') + { + x->obj = fz_new_null(); + return fz_okay; + } + else if (x->type == 'n') + { + fz_seek(xref->file, x->ofs, 0); + + error = pdf_parse_ind_obj(&x->obj, xref, xref->file, xref->scratch, sizeof xref->scratch, + &rnum, &rgen, &x->stm_ofs); + if (error) + return fz_rethrow(error, "cannot parse object (%d %d R)", num, gen); + + if (rnum != num) + return fz_throw("found object (%d %d R) instead of (%d %d R)", rnum, rgen, num, gen); + + if (xref->crypt) + pdf_crypt_obj(xref->crypt, x->obj, num, gen); + } + else if (x->type == 'o') + { + if (!x->obj) + { + error = pdf_load_obj_stm(xref, x->ofs, 0, xref->scratch, sizeof xref->scratch); + if (error) + return fz_rethrow(error, "cannot load object stream containing object (%d %d R)", num, gen); + if (!x->obj) + return fz_throw("object (%d %d R) was not found in its object stream", num, gen); + } + } + else + { + return fz_throw("assert: corrupt xref struct"); + } + + return fz_okay; +} + +fz_error +pdf_load_object(fz_obj **objp, pdf_xref *xref, int num, int gen) +{ + fz_error error; + + error = pdf_cache_object(xref, num, gen); + if (error) + return fz_rethrow(error, "cannot load object (%d %d R) into cache", num, gen); + + assert(xref->table[num].obj); + + *objp = fz_keep_obj(xref->table[num].obj); + + return fz_okay; +} + +fz_obj * +pdf_resolve_indirect(fz_obj *ref) +{ + if (fz_is_indirect(ref)) + { + pdf_xref *xref = fz_get_indirect_xref(ref); + int num = fz_to_num(ref); + int gen = fz_to_gen(ref); + if (xref) + { + fz_error error = pdf_cache_object(xref, num, gen); + if (error) + { + fz_catch(error, "cannot load object (%d %d R) into cache", num, gen); + return ref; + } + if (xref->table[num].obj) + return xref->table[num].obj; + } + } + return ref; +} + +/* Replace numbered object -- for use by pdfclean and similar tools */ +void +pdf_update_object(pdf_xref *xref, int num, int gen, fz_obj *newobj) +{ + pdf_xref_entry *x; + + if (num < 0 || num >= xref->len) + { + fz_warn("object out of range (%d %d R); xref size %d", num, gen, xref->len); + return; + } + + x = &xref->table[num]; + + if (x->obj) + fz_drop_obj(x->obj); + + x->obj = fz_keep_obj(newobj); + x->type = 'n'; + x->ofs = 0; +} + +/* + * Convenience function to open a file then call pdf_open_xref_with_stream. + */ + +fz_error +pdf_open_xref(pdf_xref **xrefp, const char *filename, char *password) +{ + fz_error error; + fz_stream *file; + + file = fz_open_file(filename); + if (!file) + return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); + + error = pdf_open_xref_with_stream(xrefp, file, password); + if (error) + return fz_rethrow(error, "cannot load document '%s'", filename); + + fz_close(file); + return fz_okay; +} diff --git a/contrib/media/updf/pdf/snprintf.c b/contrib/media/updf/pdf/snprintf.c new file mode 100644 index 0000000000..86f42e90df --- /dev/null +++ b/contrib/media/updf/pdf/snprintf.c @@ -0,0 +1,1025 @@ +/* + * snprintf.c - a portable implementation of snprintf + * + * AUTHOR + * Mark Martinec <mark.martinec@ijs.si>, April 1999. + * + * Copyright 1999, Mark Martinec. All rights reserved. + * + * TERMS AND CONDITIONS + * This program is free software; you can redistribute it and/or modify + * it under the terms of the "Frontier Artistic License" which comes + * with this Kit. + * + * 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 Frontier Artistic License for more details. + * + * You should have received a copy of the Frontier Artistic License + * with this Kit in the file named LICENSE.txt . + * If not, I'll be glad to provide one. + * + * FEATURES + * - careful adherence to specs regarding flags, field width and precision; + * - good performance for large string handling (large format, large + * argument or large paddings). Performance is similar to system's sprintf + * and in several cases significantly better (make sure you compile with + * optimizations turned on, tell the compiler the code is strict ANSI + * if necessary to give it more freedom for optimizations); + * - return value semantics per ISO/IEC 9899:1999 ("ISO C99"); + * - written in standard ISO/ANSI C - requires an ANSI C compiler. + * + * SUPPORTED CONVERSION SPECIFIERS AND DATA TYPES + * + * This snprintf only supports the following conversion specifiers: + * s, c, d, u, o, x, X, p (and synonyms: i, D, U, O - see below) + * with flags: '-', '+', ' ', '0' and '#'. + * An asterisk is supported for field width as well as precision. + * + * Length modifiers 'h' (short int), 'l' (long int), + * and 'll' (long long int) are supported. + * NOTE: + * If macro SNPRINTF_LONGLONG_SUPPORT is not defined (default) the + * length modifier 'll' is recognized but treated the same as 'l', + * which may cause argument value truncation! Defining + * SNPRINTF_LONGLONG_SUPPORT requires that your system's sprintf also + * handles length modifier 'll'. long long int is a language extension + * which may not be portable. + * + * Conversion of numeric data (conversion specifiers d, u, o, x, X, p) + * with length modifiers (none or h, l, ll) is left to the system routine + * sprintf, but all handling of flags, field width and precision as well as + * c and s conversions is done very carefully by this portable routine. + * If a string precision (truncation) is specified (e.g. %.8s) it is + * guaranteed the string beyond the specified precision will not be referenced. + * + * Length modifiers h, l and ll are ignored for c and s conversions (data + * types wint_t and wchar_t are not supported). + * + * The following common synonyms for conversion characters are supported: + * - i is a synonym for d + * - D is a synonym for ld, explicit length modifiers are ignored + * - U is a synonym for lu, explicit length modifiers are ignored + * - O is a synonym for lo, explicit length modifiers are ignored + * The D, O and U conversion characters are nonstandard, they are supported + * for backward compatibility only, and should not be used for new code. + * + * The following is specifically NOT supported: + * - flag ' (thousands' grouping character) is recognized but ignored + * - numeric conversion specifiers: f, e, E, g, G and synonym F, + * as well as the new a and A conversion specifiers + * - length modifier 'L' (long double) and 'q' (quad - use 'll' instead) + * - wide character/string conversions: lc, ls, and nonstandard + * synonyms C and S + * - writeback of converted string length: conversion character n + * - the n$ specification for direct reference to n-th argument + * - locales + * + * It is permitted for str_m to be zero, and it is permitted to specify NULL + * pointer for resulting string argument if str_m is zero (as per ISO C99). + * + * The return value is the number of characters which would be generated + * for the given input, excluding the trailing null. If this value + * is greater or equal to str_m, not all characters from the result + * have been stored in str, output bytes beyond the (str_m-1) -th character + * are discarded. If str_m is greater than zero it is guaranteed + * the resulting string will be null-terminated. + * + * NOTE that this matches the ISO C99, OpenBSD, and GNU C library 2.1, + * but is different from some older and vendor implementations, + * and is also different from XPG, XSH5, SUSv2 specifications. + * For historical discussion on changes in the semantics and standards + * of snprintf see printf(3) man page in the Linux programmers manual. + * + * Routines asprintf and vasprintf return a pointer (in the ptr argument) + * to a buffer sufficiently large to hold the resulting string. This pointer + * should be passed to free(3) to release the allocated storage when it is + * no longer needed. If sufficient space cannot be allocated, these functions + * will return -1 and set ptr to be a NULL pointer. These two routines are a + * GNU C library extensions (glibc). + * + * Routines asnprintf and vasnprintf are similar to asprintf and vasprintf, + * yet, like snprintf and vsnprintf counterparts, will write at most str_m-1 + * characters into the allocated output string, the last character in the + * allocated buffer then gets the terminating null. If the formatted string + * length (the return value) is greater than or equal to the str_m argument, + * the resulting string was truncated and some of the formatted characters + * were discarded. These routines present a handy way to limit the amount + * of allocated memory to some sane value. + * + * AVAILABILITY + * http://www.ijs.si/software/snprintf/ + * + * REVISION HISTORY + * 1999-04 V0.9 Mark Martinec + * - initial version, some modifications after comparing printf + * man pages for Digital Unix 4.0, Solaris 2.6 and HPUX 10, + * and checking how Perl handles sprintf (differently!); + * 1999-04-09 V1.0 Mark Martinec <mark.martinec@ijs.si> + * - added main test program, fixed remaining inconsistencies, + * added optional (long long int) support; + * 1999-04-12 V1.1 Mark Martinec <mark.martinec@ijs.si> + * - support the 'p' conversion (pointer to void); + * - if a string precision is specified + * make sure the string beyond the specified precision + * will not be referenced (e.g. by strlen); + * 1999-04-13 V1.2 Mark Martinec <mark.martinec@ijs.si> + * - support synonyms %D=%ld, %U=%lu, %O=%lo; + * - speed up the case of long format string with few conversions; + * 1999-06-30 V1.3 Mark Martinec <mark.martinec@ijs.si> + * - fixed runaway loop (eventually crashing when str_l wraps + * beyond 2^31) while copying format string without + * conversion specifiers to a buffer that is too short + * (thanks to Edwin Young <edwiny@autonomy.com> for + * spotting the problem); + * - added macros PORTABLE_SNPRINTF_VERSION_(MAJOR|MINOR) + * to snprintf.h + * 2000-02-14 V2.0 (never released) Mark Martinec <mark.martinec@ijs.si> + * - relaxed license terms: The Artistic License now applies. + * You may still apply the GNU GENERAL PUBLIC LICENSE + * as was distributed with previous versions, if you prefer; + * - changed REVISION HISTORY dates to use ISO 8601 date format; + * - added vsnprintf (patch also independently proposed by + * Caolan McNamara 2000-05-04, and Keith M Willenson 2000-06-01) + * 2000-06-27 V2.1 Mark Martinec <mark.martinec@ijs.si> + * - removed POSIX check for str_m<1; value 0 for str_m is + * allowed by ISO C99 (and GNU C library 2.1) - (pointed out + * on 2000-05-04 by Caolan McNamara, caolan@ csn dot ul dot ie). + * Besides relaxed license this change in standards adherence + * is the main reason to bump up the major version number; + * - added nonstandard routines asnprintf, vasnprintf, asprintf, + * vasprintf that dynamically allocate storage for the + * resulting string; these routines are not compiled by default, + * see comments where NEED_V?ASN?PRINTF macros are defined; + * - autoconf contributed by Caolan McNamara + * 2000-10-06 V2.2 Mark Martinec <mark.martinec@ijs.si> + * - BUG FIX: the %c conversion used a temporary variable + * that was no longer in scope when referenced, + * possibly causing incorrect resulting character; + * - BUG FIX: make precision and minimal field width unsigned + * to handle huge values (2^31 <= n < 2^32) correctly; + * also be more careful in the use of signed/unsigned/size_t + * internal variables - probably more careful than many + * vendor implementations, but there may still be a case + * where huge values of str_m, precision or minimal field + * could cause incorrect behaviour; + * - use separate variables for signed/unsigned arguments, + * and for short/int, long, and long long argument lengths + * to avoid possible incompatibilities on certain + * computer architectures. Also use separate variable + * arg_sign to hold sign of a numeric argument, + * to make code more transparent; + * - some fiddling with zero padding and "0x" to make it + * Linux compatible; + * - systematically use macros fast_memcpy and fast_memset + * instead of case-by-case hand optimization; determine some + * breakeven string lengths for different architectures; + * - terminology change: 'format' -> 'conversion specifier', + * 'C9x' -> 'ISO/IEC 9899:1999 ("ISO C99")', + * 'alternative form' -> 'alternate form', + * 'data type modifier' -> 'length modifier'; + * - several comments rephrased and new ones added; + * - make compiler not complain about 'credits' defined but + * not used; + */ + + +/* Define HAVE_SNPRINTF if your system already has snprintf and vsnprintf. + * + * If HAVE_SNPRINTF is defined this module will not produce code for + * snprintf and vsnprintf, unless PREFER_PORTABLE_SNPRINTF is defined as well, + * causing this portable version of snprintf to be called portable_snprintf + * (and portable_vsnprintf). + */ +/* #define HAVE_SNPRINTF */ + +/* Define PREFER_PORTABLE_SNPRINTF if your system does have snprintf and + * vsnprintf but you would prefer to use the portable routine(s) instead. + * In this case the portable routine is declared as portable_snprintf + * (and portable_vsnprintf) and a macro 'snprintf' (and 'vsnprintf') + * is defined to expand to 'portable_v?snprintf' - see file snprintf.h . + * Defining this macro is only useful if HAVE_SNPRINTF is also defined, + * but does does no harm if defined nevertheless. + */ +/* #define PREFER_PORTABLE_SNPRINTF */ + +/* Define SNPRINTF_LONGLONG_SUPPORT if you want to support + * data type (long long int) and length modifier 'll' (e.g. %lld). + * If undefined, 'll' is recognized but treated as a single 'l'. + * + * If the system's sprintf does not handle 'll' + * the SNPRINTF_LONGLONG_SUPPORT must not be defined! + * + * This is off by default as (long long int) is a language extension. + */ +/* #define SNPRINTF_LONGLONG_SUPPORT */ + +/* Define NEED_SNPRINTF_ONLY if you only need snprintf, and not vsnprintf. + * If NEED_SNPRINTF_ONLY is defined, the snprintf will be defined directly, + * otherwise both snprintf and vsnprintf routines will be defined + * and snprintf will be a simple wrapper around vsnprintf, at the expense + * of an extra procedure call. + */ +/* #define NEED_SNPRINTF_ONLY */ + +/* Define NEED_V?ASN?PRINTF macros if you need library extension + * routines asprintf, vasprintf, asnprintf, vasnprintf respectively, + * and your system library does not provide them. They are all small + * wrapper routines around portable_vsnprintf. Defining any of the four + * NEED_V?ASN?PRINTF macros automatically turns off NEED_SNPRINTF_ONLY + * and turns on PREFER_PORTABLE_SNPRINTF. + * + * Watch for name conflicts with the system library if these routines + * are already present there. + * + * NOTE: vasprintf and vasnprintf routines need va_copy() from stdarg.h, as + * specified by C99, to be able to traverse the same list of arguments twice. + * I don't know of any other standard and portable way of achieving the same. + * With some versions of gcc you may use __va_copy(). You might even get away + * with "ap2 = ap", in this case you must not call va_end(ap2) ! + * #define va_copy(ap2,ap) ap2 = ap + */ +/* #define NEED_ASPRINTF */ +/* #define NEED_ASNPRINTF */ +/* #define NEED_VASPRINTF */ +/* #define NEED_VASNPRINTF */ + + +/* Define the following macros if desired: + * SOLARIS_COMPATIBLE, SOLARIS_BUG_COMPATIBLE, + * HPUX_COMPATIBLE, HPUX_BUG_COMPATIBLE, LINUX_COMPATIBLE, + * DIGITAL_UNIX_COMPATIBLE, DIGITAL_UNIX_BUG_COMPATIBLE, + * PERL_COMPATIBLE, PERL_BUG_COMPATIBLE, + * + * - For portable applications it is best not to rely on peculiarities + * of a given implementation so it may be best not to define any + * of the macros that select compatibility and to avoid features + * that vary among the systems. + * + * - Selecting compatibility with more than one operating system + * is not strictly forbidden but is not recommended. + * + * - 'x'_BUG_COMPATIBLE implies 'x'_COMPATIBLE . + * + * - 'x'_COMPATIBLE refers to (and enables) a behaviour that is + * documented in a sprintf man page on a given operating system + * and actually adhered to by the system's sprintf (but not on + * most other operating systems). It may also refer to and enable + * a behaviour that is declared 'undefined' or 'implementation specific' + * in the man page but a given implementation behaves predictably + * in a certain way. + * + * - 'x'_BUG_COMPATIBLE refers to (and enables) a behaviour of system's sprintf + * that contradicts the sprintf man page on the same operating system. + * + * - I do not claim that the 'x'_COMPATIBLE and 'x'_BUG_COMPATIBLE + * conditionals take into account all idiosyncrasies of a particular + * implementation, there may be other incompatibilities. + */ + + + +/* ============================================= */ +/* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */ +/* ============================================= */ + +#define PORTABLE_SNPRINTF_VERSION_MAJOR 2 +#define PORTABLE_SNPRINTF_VERSION_MINOR 2 + +#if defined(NEED_ASPRINTF) || defined(NEED_ASNPRINTF) || defined(NEED_VASPRINTF) || defined(NEED_VASNPRINTF) +# if defined(NEED_SNPRINTF_ONLY) +# undef NEED_SNPRINTF_ONLY +# endif +# if !defined(PREFER_PORTABLE_SNPRINTF) +# define PREFER_PORTABLE_SNPRINTF +# endif +#endif + +#if defined(SOLARIS_BUG_COMPATIBLE) && !defined(SOLARIS_COMPATIBLE) +#define SOLARIS_COMPATIBLE +#endif + +#if defined(HPUX_BUG_COMPATIBLE) && !defined(HPUX_COMPATIBLE) +#define HPUX_COMPATIBLE +#endif + +#if defined(DIGITAL_UNIX_BUG_COMPATIBLE) && !defined(DIGITAL_UNIX_COMPATIBLE) +#define DIGITAL_UNIX_COMPATIBLE +#endif + +#if defined(PERL_BUG_COMPATIBLE) && !defined(PERL_COMPATIBLE) +#define PERL_COMPATIBLE +#endif + +#if defined(LINUX_BUG_COMPATIBLE) && !defined(LINUX_COMPATIBLE) +#define LINUX_COMPATIBLE +#endif + +#include <sys/types.h> +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include <assert.h> +#include <errno.h> + +#ifdef isdigit +#undef isdigit +#endif +#define isdigit(c) ((c) >= '0' && (c) <= '9') + +/* For copying strings longer or equal to 'breakeven_point' + * it is more efficient to call memcpy() than to do it inline. + * The value depends mostly on the processor architecture, + * but also on the compiler and its optimization capabilities. + * The value is not critical, some small value greater than zero + * will be just fine if you don't care to squeeze every drop + * of performance out of the code. + * + * Small values favor memcpy, large values favor inline code. + */ +#if defined(__alpha__) || defined(__alpha) +# define breakeven_point 2 /* AXP (DEC Alpha) - gcc or cc or egcs */ +#endif +#if defined(__i386__) || defined(__i386) +# define breakeven_point 12 /* Intel Pentium/Linux - gcc 2.96 */ +#endif +#if defined(__hppa) +# define breakeven_point 10 /* HP-PA - gcc */ +#endif +#if defined(__sparc__) || defined(__sparc) +# define breakeven_point 33 /* Sun Sparc 5 - gcc 2.8.1 */ +#endif + +/* some other values of possible interest: */ +/* #define breakeven_point 8 */ /* VAX 4000 - vaxc */ +/* #define breakeven_point 19 */ /* VAX 4000 - gcc 2.7.0 */ + +#ifndef breakeven_point +# define breakeven_point 6 /* some reasonable one-size-fits-all value */ +#endif + +#define fast_memcpy(d,s,n) \ + { register size_t nn = (size_t)(n); \ + if (nn >= breakeven_point) memcpy((d), (s), nn); \ + else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ + register char *dd; register const char *ss; \ + for (ss=(s), dd=(d); nn>0; nn--) *dd++ = *ss++; } } + +#define fast_memset(d,c,n) \ + { register size_t nn = (size_t)(n); \ + if (nn >= breakeven_point) memset((d), (int)(c), nn); \ + else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ + register char *dd; register const int cc=(int)(c); \ + for (dd=(d); nn>0; nn--) *dd++ = cc; } } + +/* prototypes */ + +#if defined(NEED_ASPRINTF) +int asprintf (char **ptr, const char *fmt, /*args*/ ...); +#endif +#if defined(NEED_VASPRINTF) +int vasprintf (char **ptr, const char *fmt, va_list ap); +#endif +#if defined(NEED_ASNPRINTF) +int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...); +#endif +#if defined(NEED_VASNPRINTF) +int vasnprintf (char **ptr, size_t str_m, const char *fmt, va_list ap); +#endif + +#if defined(HAVE_SNPRINTF) +/* declare our portable snprintf routine under name portable_snprintf */ +/* declare our portable vsnprintf routine under name portable_vsnprintf */ +#else +/* declare our portable routines under names snprintf and vsnprintf */ +#define portable_snprintf snprintf +#if !defined(NEED_SNPRINTF_ONLY) +#define portable_vsnprintf vsnprintf +#endif +#endif + +#if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF) +int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...); +#if !defined(NEED_SNPRINTF_ONLY) +int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap); +#endif +#endif + +/* declarations */ + +static char credits[] = "\n\ +@(#)snprintf.c, v2.2: Mark Martinec, <mark.martinec@ijs.si>\n\ +@(#)snprintf.c, v2.2: Copyright 1999, Mark Martinec. Frontier Artistic License applies.\n\ +@(#)snprintf.c, v2.2: http://www.ijs.si/software/snprintf/\n"; + +#if defined(NEED_ASPRINTF) +int asprintf(char **ptr, const char *fmt, /*args*/ ...) { + va_list ap; + size_t str_m; + int str_l; + + *ptr = NULL; + va_start(ap, fmt); /* measure the required size */ + str_l = portable_vsnprintf(NULL, (size_t)0, fmt, ap); + va_end(ap); + assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */ + *ptr = (char *) malloc(str_m = (size_t)str_l + 1); + if (*ptr == NULL) { errno = ENOMEM; str_l = -1; } + else { + int str_l2; + va_start(ap, fmt); + str_l2 = portable_vsnprintf(*ptr, str_m, fmt, ap); + va_end(ap); + assert(str_l2 == str_l); + } + return str_l; +} +#endif + +#if defined(NEED_VASPRINTF) +int vasprintf(char **ptr, const char *fmt, va_list ap) { + size_t str_m; + int str_l; + + *ptr = NULL; + { va_list ap2; + va_copy(ap2, ap); /* don't consume the original ap, we'll need it again */ + str_l = portable_vsnprintf(NULL, (size_t)0, fmt, ap2);/*get required size*/ + va_end(ap2); + } + assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */ + *ptr = (char *) malloc(str_m = (size_t)str_l + 1); + if (*ptr == NULL) { errno = ENOMEM; str_l = -1; } + else { + int str_l2 = portable_vsnprintf(*ptr, str_m, fmt, ap); + assert(str_l2 == str_l); + } + return str_l; +} +#endif + +#if defined(NEED_ASNPRINTF) +int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...) { + va_list ap; + int str_l; + + *ptr = NULL; + va_start(ap, fmt); /* measure the required size */ + str_l = portable_vsnprintf(NULL, (size_t)0, fmt, ap); + va_end(ap); + assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */ + if ((size_t)str_l + 1 < str_m) str_m = (size_t)str_l + 1; /* truncate */ + /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */ + if (str_m == 0) { /* not interested in resulting string, just return size */ + } else { + *ptr = (char *) malloc(str_m); + if (*ptr == NULL) { errno = ENOMEM; str_l = -1; } + else { + int str_l2; + va_start(ap, fmt); + str_l2 = portable_vsnprintf(*ptr, str_m, fmt, ap); + va_end(ap); + assert(str_l2 == str_l); + } + } + return str_l; +} +#endif + +#if defined(NEED_VASNPRINTF) +int vasnprintf (char **ptr, size_t str_m, const char *fmt, va_list ap) { + int str_l; + + *ptr = NULL; + { va_list ap2; + va_copy(ap2, ap); /* don't consume the original ap, we'll need it again */ + str_l = portable_vsnprintf(NULL, (size_t)0, fmt, ap2);/*get required size*/ + va_end(ap2); + } + assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */ + if ((size_t)str_l + 1 < str_m) str_m = (size_t)str_l + 1; /* truncate */ + /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */ + if (str_m == 0) { /* not interested in resulting string, just return size */ + } else { + *ptr = (char *) malloc(str_m); + if (*ptr == NULL) { errno = ENOMEM; str_l = -1; } + else { + int str_l2 = portable_vsnprintf(*ptr, str_m, fmt, ap); + assert(str_l2 == str_l); + } + } + return str_l; +} +#endif + +/* + * If the system does have snprintf and the portable routine is not + * specifically required, this module produces no code for snprintf/vsnprintf. + */ +#if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF) + +#if !defined(NEED_SNPRINTF_ONLY) +int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) { + va_list ap; + int str_l; + + va_start(ap, fmt); + str_l = portable_vsnprintf(str, str_m, fmt, ap); + va_end(ap); + return str_l; +} +#endif + +#if defined(NEED_SNPRINTF_ONLY) +int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) { +#else +int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { +#endif + +#if defined(NEED_SNPRINTF_ONLY) + va_list ap; +#endif + size_t str_l = 0; + const char *p = fmt; + +/* In contrast with POSIX, the ISO C99 now says + * that str can be NULL and str_m can be 0. + * This is more useful than the old: if (str_m < 1) return -1; */ + +#if defined(NEED_SNPRINTF_ONLY) + va_start(ap, fmt); +#endif + if (!p) p = ""; + while (*p) { + if (*p != '%') { + /* if (str_l < str_m) str[str_l++] = *p++; -- this would be sufficient */ + /* but the following code achieves better performance for cases + * where format string is long and contains few conversions */ + const char *q = strchr(p+1,'%'); + size_t n = !q ? strlen(p) : (q-p); + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memcpy(str+str_l, p, (n>avail?avail:n)); + } + p += n; str_l += n; + } else { + const char *starting_p; + size_t min_field_width = 0, precision = 0; + int zero_padding = 0, precision_specified = 0, justify_left = 0; + int alternate_form = 0, force_sign = 0; + int space_for_positive = 1; /* If both the ' ' and '+' flags appear, + the ' ' flag should be ignored. */ + char length_modifier = '\0'; /* allowed values: \0, h, l, L */ + char tmp[32];/* temporary buffer for simple numeric->string conversion */ + + const char *str_arg; /* string address in case of string argument */ + size_t str_arg_l; /* natural field width of arg without padding + and sign */ + unsigned char uchar_arg; + /* unsigned char argument value - only defined for c conversion. + N.B. standard explicitly states the char argument for + the c conversion is unsigned */ + + size_t number_of_zeros_to_pad = 0; + /* number of zeros to be inserted for numeric conversions + as required by the precision or minimal field width */ + + size_t zero_padding_insertion_ind = 0; + /* index into tmp where zero padding is to be inserted */ + + char fmt_spec = '\0'; + /* current conversion specifier character */ + + str_arg = credits;/* just to make compiler happy (defined but not used)*/ + str_arg = NULL; + starting_p = p; p++; /* skip '%' */ + /* parse flags */ + while (*p == '0' || *p == '-' || *p == '+' || + *p == ' ' || *p == '#' || *p == '\'') { + switch (*p) { + case '0': zero_padding = 1; break; + case '-': justify_left = 1; break; + case '+': force_sign = 1; space_for_positive = 0; break; + case ' ': force_sign = 1; + /* If both the ' ' and '+' flags appear, the ' ' flag should be ignored */ +#ifdef PERL_COMPATIBLE + /* ... but in Perl the last of ' ' and '+' applies */ + space_for_positive = 1; +#endif + break; + case '#': alternate_form = 1; break; + case '\'': break; + } + p++; + } + /* If the '0' and '-' flags both appear, the '0' flag should be ignored. */ + + /* parse field width */ + if (*p == '*') { + int j; + p++; j = va_arg(ap, int); + if (j >= 0) min_field_width = j; + else { min_field_width = -j; justify_left = 1; } + } else if (isdigit((int)(*p))) { + /* size_t could be wider than unsigned int; + make sure we treat argument like common implementations do */ + unsigned int uj = *p++ - '0'; + while (isdigit((int)(*p))) uj = 10*uj + (unsigned int)(*p++ - '0'); + min_field_width = uj; + } + /* parse precision */ + if (*p == '.') { + p++; precision_specified = 1; + if (*p == '*') { + int j = va_arg(ap, int); + p++; + if (j >= 0) precision = j; + else { + precision_specified = 0; precision = 0; + /* NOTE: + * Solaris 2.6 man page claims that in this case the precision + * should be set to 0. Digital Unix 4.0, HPUX 10 and BSD man page + * claim that this case should be treated as unspecified precision, + * which is what we do here. + */ + } + } else if (isdigit((int)(*p))) { + /* size_t could be wider than unsigned int; + make sure we treat argument like common implementations do */ + unsigned int uj = *p++ - '0'; + while (isdigit((int)(*p))) uj = 10*uj + (unsigned int)(*p++ - '0'); + precision = uj; + } + } + /* parse 'h', 'l' and 'll' length modifiers */ + if (*p == 'h' || *p == 'l') { + length_modifier = *p; p++; + if (length_modifier == 'l' && *p == 'l') { /* double l = long long */ +#ifdef SNPRINTF_LONGLONG_SUPPORT + length_modifier = '2'; /* double l encoded as '2' */ +#else + length_modifier = 'l'; /* treat it as a single 'l' */ +#endif + p++; + } + } + fmt_spec = *p; + /* common synonyms: */ + switch (fmt_spec) { + case 'i': fmt_spec = 'd'; break; + case 'D': fmt_spec = 'd'; length_modifier = 'l'; break; + case 'U': fmt_spec = 'u'; length_modifier = 'l'; break; + case 'O': fmt_spec = 'o'; length_modifier = 'l'; break; + default: break; + } + /* get parameter value, do initial processing */ + switch (fmt_spec) { + case '%': /* % behaves similar to 's' regarding flags and field widths */ + case 'c': /* c behaves similar to 's' regarding flags and field widths */ + case 's': + length_modifier = '\0'; /* wint_t and wchar_t not supported */ + /* the result of zero padding flag with non-numeric conversion specifier*/ + /* is undefined. Solaris and HPUX 10 does zero padding in this case, */ + /* Digital Unix and Linux does not. */ +#if !defined(SOLARIS_COMPATIBLE) && !defined(HPUX_COMPATIBLE) + zero_padding = 0; /* turn zero padding off for string conversions */ +#endif + str_arg_l = 1; + switch (fmt_spec) { + case '%': + str_arg = p; break; + case 'c': { + int j = va_arg(ap, int); + uchar_arg = (unsigned char) j; /* standard demands unsigned char */ + str_arg = (const char *) &uchar_arg; + break; + } + case 's': + str_arg = va_arg(ap, const char *); + if (!str_arg) str_arg_l = 0; + /* make sure not to address string beyond the specified precision !!! */ + else if (!precision_specified) str_arg_l = strlen(str_arg); + /* truncate string if necessary as requested by precision */ + else if (precision == 0) str_arg_l = 0; + else { + /* memchr on HP does not like n > 2^31 !!! */ + const char *q = memchr(str_arg, '\0', + precision <= 0x7fffffff ? precision : 0x7fffffff); + str_arg_l = !q ? precision : (q-str_arg); + } + break; + default: break; + } + break; + case 'd': case 'u': case 'o': case 'x': case 'X': case 'p': { + /* NOTE: the u, o, x, X and p conversion specifiers imply + the value is unsigned; d implies a signed value */ + + int arg_sign = 0; + /* 0 if numeric argument is zero (or if pointer is NULL for 'p'), + +1 if greater than zero (or nonzero for unsigned arguments), + -1 if negative (unsigned argument is never negative) */ + + int int_arg = 0; unsigned int uint_arg = 0; + /* only defined for length modifier h, or for no length modifiers */ + + long int long_arg = 0; unsigned long int ulong_arg = 0; + /* only defined for length modifier l */ + + void *ptr_arg = NULL; + /* pointer argument value -only defined for p conversion */ + +#ifdef SNPRINTF_LONGLONG_SUPPORT + long long int long_long_arg = 0; + unsigned long long int ulong_long_arg = 0; + /* only defined for length modifier ll */ +#endif + if (fmt_spec == 'p') { + /* HPUX 10: An l, h, ll or L before any other conversion character + * (other than d, i, u, o, x, or X) is ignored. + * Digital Unix: + * not specified, but seems to behave as HPUX does. + * Solaris: If an h, l, or L appears before any other conversion + * specifier (other than d, i, u, o, x, or X), the behavior + * is undefined. (Actually %hp converts only 16-bits of address + * and %llp treats address as 64-bit data which is incompatible + * with (void *) argument on a 32-bit system). + */ +#ifdef SOLARIS_COMPATIBLE +# ifdef SOLARIS_BUG_COMPATIBLE + /* keep length modifiers even if it represents 'll' */ +# else + if (length_modifier == '2') length_modifier = '\0'; +# endif +#else + length_modifier = '\0'; +#endif + ptr_arg = va_arg(ap, void *); + if (ptr_arg != NULL) arg_sign = 1; + } else if (fmt_spec == 'd') { /* signed */ + switch (length_modifier) { + case '\0': + case 'h': + /* It is non-portable to specify a second argument of char or short + * to va_arg, because arguments seen by the called function + * are not char or short. C converts char and short arguments + * to int before passing them to a function. + */ + int_arg = va_arg(ap, int); + if (int_arg > 0) arg_sign = 1; + else if (int_arg < 0) arg_sign = -1; + break; + case 'l': + long_arg = va_arg(ap, long int); + if (long_arg > 0) arg_sign = 1; + else if (long_arg < 0) arg_sign = -1; + break; +#ifdef SNPRINTF_LONGLONG_SUPPORT + case '2': + long_long_arg = va_arg(ap, long long int); + if (long_long_arg > 0) arg_sign = 1; + else if (long_long_arg < 0) arg_sign = -1; + break; +#endif + } + } else { /* unsigned */ + switch (length_modifier) { + case '\0': + case 'h': + uint_arg = va_arg(ap, unsigned int); + if (uint_arg) arg_sign = 1; + break; + case 'l': + ulong_arg = va_arg(ap, unsigned long int); + if (ulong_arg) arg_sign = 1; + break; +#ifdef SNPRINTF_LONGLONG_SUPPORT + case '2': + ulong_long_arg = va_arg(ap, unsigned long long int); + if (ulong_long_arg) arg_sign = 1; + break; +#endif + } + } + str_arg = tmp; str_arg_l = 0; + /* NOTE: + * For d, i, u, o, x, and X conversions, if precision is specified, + * the '0' flag should be ignored. This is so with Solaris 2.6, + * Digital UNIX 4.0, HPUX 10, Linux, FreeBSD, NetBSD; but not with Perl. + */ +#ifndef PERL_COMPATIBLE + if (precision_specified) zero_padding = 0; +#endif + if (fmt_spec == 'd') { + if (force_sign && arg_sign >= 0) + tmp[str_arg_l++] = space_for_positive ? ' ' : '+'; + /* leave negative numbers for sprintf to handle, + to avoid handling tricky cases like (short int)(-32768) */ +#ifdef LINUX_COMPATIBLE + } else if (fmt_spec == 'p' && force_sign && arg_sign > 0) { + tmp[str_arg_l++] = space_for_positive ? ' ' : '+'; +#endif + } else if (alternate_form) { + if (arg_sign != 0 && (fmt_spec == 'x' || fmt_spec == 'X') ) + { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = fmt_spec; } + /* alternate form should have no effect for p conversion, but ... */ +#ifdef HPUX_COMPATIBLE + else if (fmt_spec == 'p' + /* HPUX 10: for an alternate form of p conversion, + * a nonzero result is prefixed by 0x. */ +#ifndef HPUX_BUG_COMPATIBLE + /* Actually it uses 0x prefix even for a zero value. */ + && arg_sign != 0 +#endif + ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = 'x'; } +#endif + } + zero_padding_insertion_ind = str_arg_l; + if (!precision_specified) precision = 1; /* default precision is 1 */ + if (precision == 0 && arg_sign == 0 +#if defined(HPUX_BUG_COMPATIBLE) || defined(LINUX_COMPATIBLE) + && fmt_spec != 'p' + /* HPUX 10 man page claims: With conversion character p the result of + * converting a zero value with a precision of zero is a null string. + * Actually HP returns all zeroes, and Linux returns "(nil)". */ +#endif + ) { + /* converted to null string */ + /* When zero value is formatted with an explicit precision 0, + the resulting formatted string is empty (d, i, u, o, x, X, p). */ + } else { + char f[5]; int f_l = 0; + f[f_l++] = '%'; /* construct a simple format string for sprintf */ + if (!length_modifier) { } + else if (length_modifier=='2') { f[f_l++] = 'l'; f[f_l++] = 'l'; } + else f[f_l++] = length_modifier; + f[f_l++] = fmt_spec; f[f_l++] = '\0'; + if (fmt_spec == 'p') str_arg_l += sprintf(tmp+str_arg_l, f, ptr_arg); + else if (fmt_spec == 'd') { /* signed */ + switch (length_modifier) { + case '\0': + case 'h': str_arg_l+=sprintf(tmp+str_arg_l, f, int_arg); break; + case 'l': str_arg_l+=sprintf(tmp+str_arg_l, f, long_arg); break; +#ifdef SNPRINTF_LONGLONG_SUPPORT + case '2': str_arg_l+=sprintf(tmp+str_arg_l,f,long_long_arg); break; +#endif + } + } else { /* unsigned */ + switch (length_modifier) { + case '\0': + case 'h': str_arg_l+=sprintf(tmp+str_arg_l, f, uint_arg); break; + case 'l': str_arg_l+=sprintf(tmp+str_arg_l, f, ulong_arg); break; +#ifdef SNPRINTF_LONGLONG_SUPPORT + case '2': str_arg_l+=sprintf(tmp+str_arg_l,f,ulong_long_arg);break; +#endif + } + } + /* include the optional minus sign and possible "0x" + in the region before the zero padding insertion point */ + if (zero_padding_insertion_ind < str_arg_l && + tmp[zero_padding_insertion_ind] == '-') { + zero_padding_insertion_ind++; + } + if (zero_padding_insertion_ind+1 < str_arg_l && + tmp[zero_padding_insertion_ind] == '0' && + (tmp[zero_padding_insertion_ind+1] == 'x' || + tmp[zero_padding_insertion_ind+1] == 'X') ) { + zero_padding_insertion_ind += 2; + } + } + { size_t num_of_digits = str_arg_l - zero_padding_insertion_ind; + if (alternate_form && fmt_spec == 'o' +#ifdef HPUX_COMPATIBLE /* ("%#.o",0) -> "" */ + && (str_arg_l > 0) +#endif +#ifdef DIGITAL_UNIX_BUG_COMPATIBLE /* ("%#o",0) -> "00" */ +#else + /* unless zero is already the first character */ + && !(zero_padding_insertion_ind < str_arg_l + && tmp[zero_padding_insertion_ind] == '0') +#endif + ) { /* assure leading zero for alternate-form octal numbers */ + if (!precision_specified || precision < num_of_digits+1) { + /* precision is increased to force the first character to be zero, + except if a zero value is formatted with an explicit precision + of zero */ + precision = num_of_digits+1; precision_specified = 1; + } + } + /* zero padding to specified precision? */ + if (num_of_digits < precision) + number_of_zeros_to_pad = precision - num_of_digits; + } + /* zero padding to specified minimal field width? */ + if (!justify_left && zero_padding) { + int n = min_field_width - (str_arg_l+number_of_zeros_to_pad); + if (n > 0) number_of_zeros_to_pad += n; + } + break; + } + default: /* unrecognized conversion specifier, keep format string as-is*/ + zero_padding = 0; /* turn zero padding off for non-numeric convers. */ +#ifndef DIGITAL_UNIX_COMPATIBLE + justify_left = 1; min_field_width = 0; /* reset flags */ +#endif +#if defined(PERL_COMPATIBLE) || defined(LINUX_COMPATIBLE) + /* keep the entire format string unchanged */ + str_arg = starting_p; str_arg_l = p - starting_p; + /* well, not exactly so for Linux, which does something inbetween, + * and I don't feel an urge to imitate it: "%+++++hy" -> "%+y" */ +#else + /* discard the unrecognized conversion, just keep * + * the unrecognized conversion character */ + str_arg = p; str_arg_l = 0; +#endif + if (*p) str_arg_l++; /* include invalid conversion specifier unchanged + if not at end-of-string */ + break; + } + if (*p) p++; /* step over the just processed conversion specifier */ + /* insert padding to the left as requested by min_field_width; + this does not include the zero padding in case of numerical conversions*/ + if (!justify_left) { /* left padding with blank or zero */ + int n = min_field_width - (str_arg_l+number_of_zeros_to_pad); + if (n > 0) { + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memset(str+str_l, (zero_padding?'0':' '), (n>avail?avail:n)); + } + str_l += n; + } + } + /* zero padding as requested by the precision or by the minimal field width + * for numeric conversions required? */ + if (number_of_zeros_to_pad <= 0) { + /* will not copy first part of numeric right now, * + * force it to be copied later in its entirety */ + zero_padding_insertion_ind = 0; + } else { + /* insert first part of numerics (sign or '0x') before zero padding */ + int n = zero_padding_insertion_ind; + if (n > 0) { + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memcpy(str+str_l, str_arg, (n>avail?avail:n)); + } + str_l += n; + } + /* insert zero padding as requested by the precision or min field width */ + n = number_of_zeros_to_pad; + if (n > 0) { + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memset(str+str_l, '0', (n>avail?avail:n)); + } + str_l += n; + } + } + /* insert formatted string + * (or as-is conversion specifier for unknown conversions) */ + { int n = str_arg_l - zero_padding_insertion_ind; + if (n > 0) { + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memcpy(str+str_l, str_arg+zero_padding_insertion_ind, + (n>avail?avail:n)); + } + str_l += n; + } + } + /* insert right padding */ + if (justify_left) { /* right blank padding to the field width */ + int n = min_field_width - (str_arg_l+number_of_zeros_to_pad); + if (n > 0) { + if (str_l < str_m) { + size_t avail = str_m-str_l; + fast_memset(str+str_l, ' ', (n>avail?avail:n)); + } + str_l += n; + } + } + } + } +#if defined(NEED_SNPRINTF_ONLY) + va_end(ap); +#endif + if (str_m > 0) { /* make sure the string is null-terminated + even at the expense of overwriting the last character + (shouldn't happen, but just in case) */ + str[str_l <= str_m-1 ? str_l : str_m-1] = '\0'; + } + /* Return the number of characters formatted (excluding trailing null + * character), that is, the number of characters that would have been + * written to the buffer if it were large enough. + * + * The value of str_l should be returned, but str_l is of unsigned type + * size_t, and snprintf is int, possibly leading to an undetected + * integer overflow, resulting in a negative return value, which is illegal. + * Both XSH5 and ISO C99 (at least the draft) are silent on this issue. + * Should errno be set to EOVERFLOW and EOF returned in this case??? + */ + return (int) str_l; +} +#endif diff --git a/contrib/media/updf/pdf/snprintf.h b/contrib/media/updf/pdf/snprintf.h new file mode 100644 index 0000000000..70ec84157b --- /dev/null +++ b/contrib/media/updf/pdf/snprintf.h @@ -0,0 +1,26 @@ +#ifndef _PORTABLE_SNPRINTF_H_ +#define _PORTABLE_SNPRINTF_H_ + +#define PORTABLE_SNPRINTF_VERSION_MAJOR 2 +#define PORTABLE_SNPRINTF_VERSION_MINOR 2 + +#ifdef HAVE_SNPRINTF +#include <stdio.h> +#else +extern int snprintf(char *, size_t, const char *, /*args*/ ...); +extern int vsnprintf(char *, size_t, const char *, va_list); +#endif + +#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF) +extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...); +extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap); +#define snprintf portable_snprintf +#define vsnprintf portable_vsnprintf +#endif + +extern int asprintf (char **ptr, const char *fmt, /*args*/ ...); +extern int vasprintf (char **ptr, const char *fmt, va_list ap); +extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...); +extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap); + +#endif diff --git a/contrib/media/updf/scripts/cmapdump b/contrib/media/updf/scripts/cmapdump new file mode 100755 index 0000000000..f0b5c07e1a Binary files /dev/null and b/contrib/media/updf/scripts/cmapdump differ diff --git a/contrib/media/updf/scripts/cmapdump.c b/contrib/media/updf/scripts/cmapdump.c new file mode 100644 index 0000000000..16ef1b8a62 --- /dev/null +++ b/contrib/media/updf/scripts/cmapdump.c @@ -0,0 +1,157 @@ +/* cmapdump.c -- parse a CMap file and dump it as a c-struct */ + +#include <stdio.h> +#include <string.h> + +#include "fitz.h" +#include "mupdf.h" + +#include "../fitz/base_error.c" +#include "../fitz/base_memory.c" +#include "../fitz/base_string.c" +#include "../fitz/stm_buffer.c" +#include "../fitz/stm_open.c" +#include "../fitz/stm_read.c" + +#include "../pdf/pdf_lex.c" +#include "../pdf/pdf_cmap.c" +#include "../pdf/pdf_cmap_parse.c" + +static void +clean(char *p) +{ + while (*p) + { + if ((*p == '/') || (*p == '.') || (*p == '\\') || (*p == '-')) + *p = '_'; + p ++; + } +} + +int +main(int argc, char **argv) +{ + pdf_cmap *cmap; + fz_error error; + fz_stream *fi; + FILE *fo; + char name[256]; + char *realname; + int i, k; + + if (argc < 3) + { + fprintf(stderr, "usage: cmapdump output.c lots of cmap files\n"); + return 1; + } + + fo = fopen(argv[1], "wb"); + if (!fo) + { + fprintf(stderr, "cmapdump: could not open output file '%s'\n", argv[1]); + return 1; + } + + fprintf(fo, "/* This is an automatically generated file. Do not edit. */\n"); + + for (i = 2; i < argc; i++) + { + realname = strrchr(argv[i], '/'); + if (!realname) + realname = strrchr(argv[i], '\\'); + if (realname) + realname ++; + else + realname = argv[i]; + + if (strlen(realname) > (sizeof name - 1)) + { + fprintf(stderr, "cmapdump: file name too long\n"); + return 1; + } + + strcpy(name, realname); + clean(name); + + fi = fz_open_file(argv[i]); + if (!fi) + fz_throw("cmapdump: could not open input file '%s'\n", argv[i]); + + error = pdf_parse_cmap(&cmap, fi); + if (error) + { + fz_catch(error, "cmapdump: could not parse input cmap '%s'\n", argv[i]); + return 1; + } + + fprintf(fo, "\n/* %s */\n\n", cmap->cmap_name); + + fprintf(fo, "static const pdf_range cmap_%s_ranges[] = {", name); + if (cmap->rlen == 0) + { + fprintf(fo, " {0,%d,0}", PDF_CMAP_RANGE); + } + for (k = 0; k < cmap->rlen; k++) + { + if (k % 4 == 0) + fprintf(fo, "\n"); + fprintf(fo, "{%d,%d,%d},", + cmap->ranges[k].low, cmap->ranges[k].extent_flags, cmap->ranges[k].offset); + } + fprintf(fo, "\n};\n\n"); + + if (cmap->tlen == 0) + { + fprintf(fo, "static const unsigned short cmap_%s_table[] = { 0 };\n\n", name); + } + else + { + fprintf(fo, "static const unsigned short cmap_%s_table[%d] = {", + name, cmap->tlen); + for (k = 0; k < cmap->tlen; k++) + { + if (k % 12 == 0) + fprintf(fo, "\n"); + fprintf(fo, "%d,", cmap->table[k]); + } + fprintf(fo, "\n};\n\n"); + } + + fprintf(fo, "static pdf_cmap cmap_%s = {\n", name); + fprintf(fo, "\t-1, "); + fprintf(fo, "\"%s\", ", cmap->cmap_name); + fprintf(fo, "\"%s\", 0, ", cmap->usecmap_name); + fprintf(fo, "%d, ", cmap->wmode); + fprintf(fo, "%d,\n\t{ ", cmap->codespace_len); + if (cmap->codespace_len == 0) + { + fprintf(fo, "{0,0,0},"); + } + for (k = 0; k < cmap->codespace_len; k++) + { + fprintf(fo, "{%d,%d,%d},", + cmap->codespace[k].n, cmap->codespace[k].low, cmap->codespace[k].high); + } + fprintf(fo, " },\n"); + + fprintf(fo, "\t%d, %d, (pdf_range*) cmap_%s_ranges,\n", + cmap->rlen, cmap->rlen, name); + + fprintf(fo, "\t%d, %d, (unsigned short*) cmap_%s_table,\n", + cmap->tlen, cmap->tlen, name); + + fprintf(fo, "};\n"); + + printf("\t{\"%s\",&cmap_%s},\n", cmap->cmap_name, name); + + fz_close(fi); + } + + if (fclose(fo)) + { + fprintf(stderr, "cmapdump: could not close output file '%s'\n", argv[1]); + return 1; + } + + return 0; +} diff --git a/contrib/media/updf/scripts/fontdump.c b/contrib/media/updf/scripts/fontdump.c new file mode 100644 index 0000000000..e40bf4aba3 --- /dev/null +++ b/contrib/media/updf/scripts/fontdump.c @@ -0,0 +1,115 @@ +/* fontdump.c -- an "xxd -i" workalike for dumping binary fonts as source code */ + +#include <stdio.h> +#include <string.h> + +static int +hexdump(FILE *fo, FILE *fi) +{ + int c, n; + + n = 0; + c = fgetc(fi); + while (c != -1) + { + n += fprintf(fo, "%d,", c); + if (n > 72) { + fprintf(fo, "\n"); + n = 0; + } + c = fgetc(fi); + } + + return n; +} + +int +main(int argc, char **argv) +{ + FILE *fo; + FILE *fi; + char fontname[256]; + char origname[256]; + char *basename; + char *p; + int i, len; + + if (argc < 3) + { + fprintf(stderr, "usage: fontdump output.c input.dat\n"); + return 1; + } + + fo = fopen(argv[1], "wb"); + if (!fo) + { + fprintf(stderr, "fontdump: could not open output file '%s'\n", argv[1]); + return 1; + } + + fprintf(fo, "#ifndef __STRICT_ANSI__\n"); + fprintf(fo, "#if defined(__linux__) || defined(__FreeBSD__)\n"); + fprintf(fo, "#define HAVE_INCBIN\n"); + fprintf(fo, "#endif\n"); + fprintf(fo, "#endif\n"); + + for (i = 2; i < argc; i++) + { + fi = fopen(argv[i], "rb"); + if (!fi) + { + fclose(fo); + fprintf(stderr, "fontdump: could not open input file '%s'\n", argv[i]); + return 1; + } + + basename = strrchr(argv[i], '/'); + if (!basename) + basename = strrchr(argv[i], '\\'); + if (basename) + basename++; + else + basename = argv[i]; + + strcpy(origname, basename); + p = strrchr(origname, '.'); + if (p) *p = 0; + strcpy(fontname, origname); + + p = fontname; + while (*p) + { + if (*p == '/' || *p == '.' || *p == '\\' || *p == '-') + *p = '_'; + p ++; + } + + fseek(fi, 0, SEEK_END); + len = ftell(fi); + fseek(fi, 0, SEEK_SET); + + printf("\t{\"%s\",pdf_font_%s,%d},\n", origname, fontname, len); + + fprintf(fo, "\n#ifdef HAVE_INCBIN\n"); + fprintf(fo, "extern const unsigned char pdf_font_%s[%d];\n", fontname, len); + fprintf(fo, "asm(\".globl pdf_font_%s\");\n", fontname); + fprintf(fo, "asm(\".balign 8\");\n"); + fprintf(fo, "asm(\"pdf_font_%s:\");\n", fontname); + fprintf(fo, "asm(\".incbin \\\"%s\\\"\");\n", argv[i]); + fprintf(fo, "#else\n"); + fprintf(fo, "static const unsigned char pdf_font_%s[%d] = {\n", fontname, len); + hexdump(fo, fi); + fprintf(fo, "};\n"); + fprintf(fo, "#endif\n"); + + fclose(fi); + } + + if (fclose(fo)) + { + fprintf(stderr, "fontdump: could not close output file '%s'\n", argv[1]); + return 1; + } + + return 0; +} diff --git a/contrib/media/updf/scripts/glyphdump.py b/contrib/media/updf/scripts/glyphdump.py new file mode 100755 index 0000000000..a63df95fb6 --- /dev/null +++ b/contrib/media/updf/scripts/glyphdump.py @@ -0,0 +1,77 @@ +#!/usr/bin/python + +import sys + +agl = [] +agltab = [] +aglmap = {} + +print "/*" + +f = open("glyphlist.txt", "r") +for line in f.readlines(): + if line[0] == '#': + print line.strip() + continue + line = line[:-1] + name, list = line.split(';') + list = map(lambda x: int(x, 16), list.split(' ')) + agl.append((name, list)) + +for name, ucslist in agl: + num = len(ucslist) + ucs = ucslist[0] + agltab.append((name, ucs)) + if ucs not in aglmap: + aglmap[ucs] = [] + aglmap[ucs].append(name) + +print "*/" +print + +def dumplist(list): + n = 0; + for item in list: + n += len(item) + 1 + if n > 78: + sys.stdout.write("\n") + n = len(item) + 1 + sys.stdout.write(item) + sys.stdout.write(",") + sys.stdout.write("\n") + +agltab.sort() +namelist = [] +codelist = [] +for name, ucs in agltab: + namelist.append("\"%s\"" % name) + codelist.append("%d" % ucs) + +keys = aglmap.keys() +keys.sort() +dupoffsets = [] +dupnames = [] +for ucs in keys: + list = aglmap[ucs] + ofs = len(dupnames) + if len(list) > 1: + dupoffsets.append("%d,%d" % (ucs, ofs)) + for name in list: + dupnames.append("\"%s\"" % name) + dupnames.append("0") + +print "static const char *agl_name_list[] = {" +dumplist(namelist) +print "};" +print +print "static const unsigned short agl_code_list[] = {" +dumplist(codelist) +print "};" +print +print "static const unsigned short agl_dup_offsets[] = {" +dumplist(dupoffsets) +print "};" +print +print "static const char *agl_dup_names[] = {" +dumplist(dupnames) +print "};" diff --git a/contrib/media/updf/scripts/glyphlist.txt b/contrib/media/updf/scripts/glyphlist.txt new file mode 100644 index 0000000000..b21e977dc7 --- /dev/null +++ b/contrib/media/updf/scripts/glyphlist.txt @@ -0,0 +1,4291 @@ +# Name: Adobe Glyph List +# Table version: 2.0 +# Date: September 20, 2002 +# +# See http://partners.adobe.com/asn/developer/typeforum/unicodegn.html +# +# Format: Semicolon-delimited fields: +# (1) glyph name +# (2) Unicode scalar value +A;0041 +AE;00C6 +AEacute;01FC +AEmacron;01E2 +AEsmall;F7E6 +Aacute;00C1 +Aacutesmall;F7E1 +Abreve;0102 +Abreveacute;1EAE +Abrevecyrillic;04D0 +Abrevedotbelow;1EB6 +Abrevegrave;1EB0 +Abrevehookabove;1EB2 +Abrevetilde;1EB4 +Acaron;01CD +Acircle;24B6 +Acircumflex;00C2 +Acircumflexacute;1EA4 +Acircumflexdotbelow;1EAC +Acircumflexgrave;1EA6 +Acircumflexhookabove;1EA8 +Acircumflexsmall;F7E2 +Acircumflextilde;1EAA +Acute;F6C9 +Acutesmall;F7B4 +Acyrillic;0410 +Adblgrave;0200 +Adieresis;00C4 +Adieresiscyrillic;04D2 +Adieresismacron;01DE +Adieresissmall;F7E4 +Adotbelow;1EA0 +Adotmacron;01E0 +Agrave;00C0 +Agravesmall;F7E0 +Ahookabove;1EA2 +Aiecyrillic;04D4 +Ainvertedbreve;0202 +Alpha;0391 +Alphatonos;0386 +Amacron;0100 +Amonospace;FF21 +Aogonek;0104 +Aring;00C5 +Aringacute;01FA +Aringbelow;1E00 +Aringsmall;F7E5 +Asmall;F761 +Atilde;00C3 +Atildesmall;F7E3 +Aybarmenian;0531 +B;0042 +Bcircle;24B7 +Bdotaccent;1E02 +Bdotbelow;1E04 +Becyrillic;0411 +Benarmenian;0532 +Beta;0392 +Bhook;0181 +Blinebelow;1E06 +Bmonospace;FF22 +Brevesmall;F6F4 +Bsmall;F762 +Btopbar;0182 +C;0043 +Caarmenian;053E +Cacute;0106 +Caron;F6CA +Caronsmall;F6F5 +Ccaron;010C +Ccedilla;00C7 +Ccedillaacute;1E08 +Ccedillasmall;F7E7 +Ccircle;24B8 +Ccircumflex;0108 +Cdot;010A +Cdotaccent;010A +Cedillasmall;F7B8 +Chaarmenian;0549 +Cheabkhasiancyrillic;04BC +Checyrillic;0427 +Chedescenderabkhasiancyrillic;04BE +Chedescendercyrillic;04B6 +Chedieresiscyrillic;04F4 +Cheharmenian;0543 +Chekhakassiancyrillic;04CB +Cheverticalstrokecyrillic;04B8 +Chi;03A7 +Chook;0187 +Circumflexsmall;F6F6 +Cmonospace;FF23 +Coarmenian;0551 +Csmall;F763 +D;0044 +DZ;01F1 +DZcaron;01C4 +Daarmenian;0534 +Dafrican;0189 +Dcaron;010E +Dcedilla;1E10 +Dcircle;24B9 +Dcircumflexbelow;1E12 +Dcroat;0110 +Ddotaccent;1E0A +Ddotbelow;1E0C +Decyrillic;0414 +Deicoptic;03EE +Delta;2206 +Deltagreek;0394 +Dhook;018A +Dieresis;F6CB +DieresisAcute;F6CC +DieresisGrave;F6CD +Dieresissmall;F7A8 +Digammagreek;03DC +Djecyrillic;0402 +Dlinebelow;1E0E +Dmonospace;FF24 +Dotaccentsmall;F6F7 +Dslash;0110 +Dsmall;F764 +Dtopbar;018B +Dz;01F2 +Dzcaron;01C5 +Dzeabkhasiancyrillic;04E0 +Dzecyrillic;0405 +Dzhecyrillic;040F +E;0045 +Eacute;00C9 +Eacutesmall;F7E9 +Ebreve;0114 +Ecaron;011A +Ecedillabreve;1E1C +Echarmenian;0535 +Ecircle;24BA +Ecircumflex;00CA +Ecircumflexacute;1EBE +Ecircumflexbelow;1E18 +Ecircumflexdotbelow;1EC6 +Ecircumflexgrave;1EC0 +Ecircumflexhookabove;1EC2 +Ecircumflexsmall;F7EA +Ecircumflextilde;1EC4 +Ecyrillic;0404 +Edblgrave;0204 +Edieresis;00CB +Edieresissmall;F7EB +Edot;0116 +Edotaccent;0116 +Edotbelow;1EB8 +Efcyrillic;0424 +Egrave;00C8 +Egravesmall;F7E8 +Eharmenian;0537 +Ehookabove;1EBA +Eightroman;2167 +Einvertedbreve;0206 +Eiotifiedcyrillic;0464 +Elcyrillic;041B +Elevenroman;216A +Emacron;0112 +Emacronacute;1E16 +Emacrongrave;1E14 +Emcyrillic;041C +Emonospace;FF25 +Encyrillic;041D +Endescendercyrillic;04A2 +Eng;014A +Enghecyrillic;04A4 +Enhookcyrillic;04C7 +Eogonek;0118 +Eopen;0190 +Epsilon;0395 +Epsilontonos;0388 +Ercyrillic;0420 +Ereversed;018E +Ereversedcyrillic;042D +Escyrillic;0421 +Esdescendercyrillic;04AA +Esh;01A9 +Esmall;F765 +Eta;0397 +Etarmenian;0538 +Etatonos;0389 +Eth;00D0 +Ethsmall;F7F0 +Etilde;1EBC +Etildebelow;1E1A +Euro;20AC +Ezh;01B7 +Ezhcaron;01EE +Ezhreversed;01B8 +F;0046 +Fcircle;24BB +Fdotaccent;1E1E +Feharmenian;0556 +Feicoptic;03E4 +Fhook;0191 +Fitacyrillic;0472 +Fiveroman;2164 +Fmonospace;FF26 +Fourroman;2163 +Fsmall;F766 +G;0047 +GBsquare;3387 +Gacute;01F4 +Gamma;0393 +Gammaafrican;0194 +Gangiacoptic;03EA +Gbreve;011E +Gcaron;01E6 +Gcedilla;0122 +Gcircle;24BC +Gcircumflex;011C +Gcommaaccent;0122 +Gdot;0120 +Gdotaccent;0120 +Gecyrillic;0413 +Ghadarmenian;0542 +Ghemiddlehookcyrillic;0494 +Ghestrokecyrillic;0492 +Gheupturncyrillic;0490 +Ghook;0193 +Gimarmenian;0533 +Gjecyrillic;0403 +Gmacron;1E20 +Gmonospace;FF27 +Grave;F6CE +Gravesmall;F760 +Gsmall;F767 +Gsmallhook;029B +Gstroke;01E4 +H;0048 +H18533;25CF +H18543;25AA +H18551;25AB +H22073;25A1 +HPsquare;33CB +Haabkhasiancyrillic;04A8 +Hadescendercyrillic;04B2 +Hardsigncyrillic;042A +Hbar;0126 +Hbrevebelow;1E2A +Hcedilla;1E28 +Hcircle;24BD +Hcircumflex;0124 +Hdieresis;1E26 +Hdotaccent;1E22 +Hdotbelow;1E24 +Hmonospace;FF28 +Hoarmenian;0540 +Horicoptic;03E8 +Hsmall;F768 +Hungarumlaut;F6CF +Hungarumlautsmall;F6F8 +Hzsquare;3390 +I;0049 +IAcyrillic;042F +IJ;0132 +IUcyrillic;042E +Iacute;00CD +Iacutesmall;F7ED +Ibreve;012C +Icaron;01CF +Icircle;24BE +Icircumflex;00CE +Icircumflexsmall;F7EE +Icyrillic;0406 +Idblgrave;0208 +Idieresis;00CF +Idieresisacute;1E2E +Idieresiscyrillic;04E4 +Idieresissmall;F7EF +Idot;0130 +Idotaccent;0130 +Idotbelow;1ECA +Iebrevecyrillic;04D6 +Iecyrillic;0415 +Ifraktur;2111 +Igrave;00CC +Igravesmall;F7EC +Ihookabove;1EC8 +Iicyrillic;0418 +Iinvertedbreve;020A +Iishortcyrillic;0419 +Imacron;012A +Imacroncyrillic;04E2 +Imonospace;FF29 +Iniarmenian;053B +Iocyrillic;0401 +Iogonek;012E +Iota;0399 +Iotaafrican;0196 +Iotadieresis;03AA +Iotatonos;038A +Ismall;F769 +Istroke;0197 +Itilde;0128 +Itildebelow;1E2C +Izhitsacyrillic;0474 +Izhitsadblgravecyrillic;0476 +J;004A +Jaarmenian;0541 +Jcircle;24BF +Jcircumflex;0134 +Jecyrillic;0408 +Jheharmenian;054B +Jmonospace;FF2A +Jsmall;F76A +K;004B +KBsquare;3385 +KKsquare;33CD +Kabashkircyrillic;04A0 +Kacute;1E30 +Kacyrillic;041A +Kadescendercyrillic;049A +Kahookcyrillic;04C3 +Kappa;039A +Kastrokecyrillic;049E +Kaverticalstrokecyrillic;049C +Kcaron;01E8 +Kcedilla;0136 +Kcircle;24C0 +Kcommaaccent;0136 +Kdotbelow;1E32 +Keharmenian;0554 +Kenarmenian;053F +Khacyrillic;0425 +Kheicoptic;03E6 +Khook;0198 +Kjecyrillic;040C +Klinebelow;1E34 +Kmonospace;FF2B +Koppacyrillic;0480 +Koppagreek;03DE +Ksicyrillic;046E +Ksmall;F76B +L;004C +LJ;01C7 +LL;F6BF +Lacute;0139 +Lambda;039B +Lcaron;013D +Lcedilla;013B +Lcircle;24C1 +Lcircumflexbelow;1E3C +Lcommaaccent;013B +Ldot;013F +Ldotaccent;013F +Ldotbelow;1E36 +Ldotbelowmacron;1E38 +Liwnarmenian;053C +Lj;01C8 +Ljecyrillic;0409 +Llinebelow;1E3A +Lmonospace;FF2C +Lslash;0141 +Lslashsmall;F6F9 +Lsmall;F76C +M;004D +MBsquare;3386 +Macron;F6D0 +Macronsmall;F7AF +Macute;1E3E +Mcircle;24C2 +Mdotaccent;1E40 +Mdotbelow;1E42 +Menarmenian;0544 +Mmonospace;FF2D +Msmall;F76D +Mturned;019C +Mu;039C +N;004E +NJ;01CA +Nacute;0143 +Ncaron;0147 +Ncedilla;0145 +Ncircle;24C3 +Ncircumflexbelow;1E4A +Ncommaaccent;0145 +Ndotaccent;1E44 +Ndotbelow;1E46 +Nhookleft;019D +Nineroman;2168 +Nj;01CB +Njecyrillic;040A +Nlinebelow;1E48 +Nmonospace;FF2E +Nowarmenian;0546 +Nsmall;F76E +Ntilde;00D1 +Ntildesmall;F7F1 +Nu;039D +O;004F +OE;0152 +OEsmall;F6FA +Oacute;00D3 +Oacutesmall;F7F3 +Obarredcyrillic;04E8 +Obarreddieresiscyrillic;04EA +Obreve;014E +Ocaron;01D1 +Ocenteredtilde;019F +Ocircle;24C4 +Ocircumflex;00D4 +Ocircumflexacute;1ED0 +Ocircumflexdotbelow;1ED8 +Ocircumflexgrave;1ED2 +Ocircumflexhookabove;1ED4 +Ocircumflexsmall;F7F4 +Ocircumflextilde;1ED6 +Ocyrillic;041E +Odblacute;0150 +Odblgrave;020C +Odieresis;00D6 +Odieresiscyrillic;04E6 +Odieresissmall;F7F6 +Odotbelow;1ECC +Ogoneksmall;F6FB +Ograve;00D2 +Ogravesmall;F7F2 +Oharmenian;0555 +Ohm;2126 +Ohookabove;1ECE +Ohorn;01A0 +Ohornacute;1EDA +Ohorndotbelow;1EE2 +Ohorngrave;1EDC +Ohornhookabove;1EDE +Ohorntilde;1EE0 +Ohungarumlaut;0150 +Oi;01A2 +Oinvertedbreve;020E +Omacron;014C +Omacronacute;1E52 +Omacrongrave;1E50 +Omega;2126 +Omegacyrillic;0460 +Omegagreek;03A9 +Omegaroundcyrillic;047A +Omegatitlocyrillic;047C +Omegatonos;038F +Omicron;039F +Omicrontonos;038C +Omonospace;FF2F +Oneroman;2160 +Oogonek;01EA +Oogonekmacron;01EC +Oopen;0186 +Oslash;00D8 +Oslashacute;01FE +Oslashsmall;F7F8 +Osmall;F76F +Ostrokeacute;01FE +Otcyrillic;047E +Otilde;00D5 +Otildeacute;1E4C +Otildedieresis;1E4E +Otildesmall;F7F5 +P;0050 +Pacute;1E54 +Pcircle;24C5 +Pdotaccent;1E56 +Pecyrillic;041F +Peharmenian;054A +Pemiddlehookcyrillic;04A6 +Phi;03A6 +Phook;01A4 +Pi;03A0 +Piwrarmenian;0553 +Pmonospace;FF30 +Psi;03A8 +Psicyrillic;0470 +Psmall;F770 +Q;0051 +Qcircle;24C6 +Qmonospace;FF31 +Qsmall;F771 +R;0052 +Raarmenian;054C +Racute;0154 +Rcaron;0158 +Rcedilla;0156 +Rcircle;24C7 +Rcommaaccent;0156 +Rdblgrave;0210 +Rdotaccent;1E58 +Rdotbelow;1E5A +Rdotbelowmacron;1E5C +Reharmenian;0550 +Rfraktur;211C +Rho;03A1 +Ringsmall;F6FC +Rinvertedbreve;0212 +Rlinebelow;1E5E +Rmonospace;FF32 +Rsmall;F772 +Rsmallinverted;0281 +Rsmallinvertedsuperior;02B6 +S;0053 +SF010000;250C +SF020000;2514 +SF030000;2510 +SF040000;2518 +SF050000;253C +SF060000;252C +SF070000;2534 +SF080000;251C +SF090000;2524 +SF100000;2500 +SF110000;2502 +SF190000;2561 +SF200000;2562 +SF210000;2556 +SF220000;2555 +SF230000;2563 +SF240000;2551 +SF250000;2557 +SF260000;255D +SF270000;255C +SF280000;255B +SF360000;255E +SF370000;255F +SF380000;255A +SF390000;2554 +SF400000;2569 +SF410000;2566 +SF420000;2560 +SF430000;2550 +SF440000;256C +SF450000;2567 +SF460000;2568 +SF470000;2564 +SF480000;2565 +SF490000;2559 +SF500000;2558 +SF510000;2552 +SF520000;2553 +SF530000;256B +SF540000;256A +Sacute;015A +Sacutedotaccent;1E64 +Sampigreek;03E0 +Scaron;0160 +Scarondotaccent;1E66 +Scaronsmall;F6FD +Scedilla;015E +Schwa;018F +Schwacyrillic;04D8 +Schwadieresiscyrillic;04DA +Scircle;24C8 +Scircumflex;015C +Scommaaccent;0218 +Sdotaccent;1E60 +Sdotbelow;1E62 +Sdotbelowdotaccent;1E68 +Seharmenian;054D +Sevenroman;2166 +Shaarmenian;0547 +Shacyrillic;0428 +Shchacyrillic;0429 +Sheicoptic;03E2 +Shhacyrillic;04BA +Shimacoptic;03EC +Sigma;03A3 +Sixroman;2165 +Smonospace;FF33 +Softsigncyrillic;042C +Ssmall;F773 +Stigmagreek;03DA +T;0054 +Tau;03A4 +Tbar;0166 +Tcaron;0164 +Tcedilla;0162 +Tcircle;24C9 +Tcircumflexbelow;1E70 +Tcommaaccent;0162 +Tdotaccent;1E6A +Tdotbelow;1E6C +Tecyrillic;0422 +Tedescendercyrillic;04AC +Tenroman;2169 +Tetsecyrillic;04B4 +Theta;0398 +Thook;01AC +Thorn;00DE +Thornsmall;F7FE +Threeroman;2162 +Tildesmall;F6FE +Tiwnarmenian;054F +Tlinebelow;1E6E +Tmonospace;FF34 +Toarmenian;0539 +Tonefive;01BC +Tonesix;0184 +Tonetwo;01A7 +Tretroflexhook;01AE +Tsecyrillic;0426 +Tshecyrillic;040B +Tsmall;F774 +Twelveroman;216B +Tworoman;2161 +U;0055 +Uacute;00DA +Uacutesmall;F7FA +Ubreve;016C +Ucaron;01D3 +Ucircle;24CA +Ucircumflex;00DB +Ucircumflexbelow;1E76 +Ucircumflexsmall;F7FB +Ucyrillic;0423 +Udblacute;0170 +Udblgrave;0214 +Udieresis;00DC +Udieresisacute;01D7 +Udieresisbelow;1E72 +Udieresiscaron;01D9 +Udieresiscyrillic;04F0 +Udieresisgrave;01DB +Udieresismacron;01D5 +Udieresissmall;F7FC +Udotbelow;1EE4 +Ugrave;00D9 +Ugravesmall;F7F9 +Uhookabove;1EE6 +Uhorn;01AF +Uhornacute;1EE8 +Uhorndotbelow;1EF0 +Uhorngrave;1EEA +Uhornhookabove;1EEC +Uhorntilde;1EEE +Uhungarumlaut;0170 +Uhungarumlautcyrillic;04F2 +Uinvertedbreve;0216 +Ukcyrillic;0478 +Umacron;016A +Umacroncyrillic;04EE +Umacrondieresis;1E7A +Umonospace;FF35 +Uogonek;0172 +Upsilon;03A5 +Upsilon1;03D2 +Upsilonacutehooksymbolgreek;03D3 +Upsilonafrican;01B1 +Upsilondieresis;03AB +Upsilondieresishooksymbolgreek;03D4 +Upsilonhooksymbol;03D2 +Upsilontonos;038E +Uring;016E +Ushortcyrillic;040E +Usmall;F775 +Ustraightcyrillic;04AE +Ustraightstrokecyrillic;04B0 +Utilde;0168 +Utildeacute;1E78 +Utildebelow;1E74 +V;0056 +Vcircle;24CB +Vdotbelow;1E7E +Vecyrillic;0412 +Vewarmenian;054E +Vhook;01B2 +Vmonospace;FF36 +Voarmenian;0548 +Vsmall;F776 +Vtilde;1E7C +W;0057 +Wacute;1E82 +Wcircle;24CC +Wcircumflex;0174 +Wdieresis;1E84 +Wdotaccent;1E86 +Wdotbelow;1E88 +Wgrave;1E80 +Wmonospace;FF37 +Wsmall;F777 +X;0058 +Xcircle;24CD +Xdieresis;1E8C +Xdotaccent;1E8A +Xeharmenian;053D +Xi;039E +Xmonospace;FF38 +Xsmall;F778 +Y;0059 +Yacute;00DD +Yacutesmall;F7FD +Yatcyrillic;0462 +Ycircle;24CE +Ycircumflex;0176 +Ydieresis;0178 +Ydieresissmall;F7FF +Ydotaccent;1E8E +Ydotbelow;1EF4 +Yericyrillic;042B +Yerudieresiscyrillic;04F8 +Ygrave;1EF2 +Yhook;01B3 +Yhookabove;1EF6 +Yiarmenian;0545 +Yicyrillic;0407 +Yiwnarmenian;0552 +Ymonospace;FF39 +Ysmall;F779 +Ytilde;1EF8 +Yusbigcyrillic;046A +Yusbigiotifiedcyrillic;046C +Yuslittlecyrillic;0466 +Yuslittleiotifiedcyrillic;0468 +Z;005A +Zaarmenian;0536 +Zacute;0179 +Zcaron;017D +Zcaronsmall;F6FF +Zcircle;24CF +Zcircumflex;1E90 +Zdot;017B +Zdotaccent;017B +Zdotbelow;1E92 +Zecyrillic;0417 +Zedescendercyrillic;0498 +Zedieresiscyrillic;04DE +Zeta;0396 +Zhearmenian;053A +Zhebrevecyrillic;04C1 +Zhecyrillic;0416 +Zhedescendercyrillic;0496 +Zhedieresiscyrillic;04DC +Zlinebelow;1E94 +Zmonospace;FF3A +Zsmall;F77A +Zstroke;01B5 +a;0061 +aabengali;0986 +aacute;00E1 +aadeva;0906 +aagujarati;0A86 +aagurmukhi;0A06 +aamatragurmukhi;0A3E +aarusquare;3303 +aavowelsignbengali;09BE +aavowelsigndeva;093E +aavowelsigngujarati;0ABE +abbreviationmarkarmenian;055F +abbreviationsigndeva;0970 +abengali;0985 +abopomofo;311A +abreve;0103 +abreveacute;1EAF +abrevecyrillic;04D1 +abrevedotbelow;1EB7 +abrevegrave;1EB1 +abrevehookabove;1EB3 +abrevetilde;1EB5 +acaron;01CE +acircle;24D0 +acircumflex;00E2 +acircumflexacute;1EA5 +acircumflexdotbelow;1EAD +acircumflexgrave;1EA7 +acircumflexhookabove;1EA9 +acircumflextilde;1EAB +acute;00B4 +acutebelowcmb;0317 +acutecmb;0301 +acutecomb;0301 +acutedeva;0954 +acutelowmod;02CF +acutetonecmb;0341 +acyrillic;0430 +adblgrave;0201 +addakgurmukhi;0A71 +adeva;0905 +adieresis;00E4 +adieresiscyrillic;04D3 +adieresismacron;01DF +adotbelow;1EA1 +adotmacron;01E1 +ae;00E6 +aeacute;01FD +aekorean;3150 +aemacron;01E3 +afii00208;2015 +afii08941;20A4 +afii10017;0410 +afii10018;0411 +afii10019;0412 +afii10020;0413 +afii10021;0414 +afii10022;0415 +afii10023;0401 +afii10024;0416 +afii10025;0417 +afii10026;0418 +afii10027;0419 +afii10028;041A +afii10029;041B +afii10030;041C +afii10031;041D +afii10032;041E +afii10033;041F +afii10034;0420 +afii10035;0421 +afii10036;0422 +afii10037;0423 +afii10038;0424 +afii10039;0425 +afii10040;0426 +afii10041;0427 +afii10042;0428 +afii10043;0429 +afii10044;042A +afii10045;042B +afii10046;042C +afii10047;042D +afii10048;042E +afii10049;042F +afii10050;0490 +afii10051;0402 +afii10052;0403 +afii10053;0404 +afii10054;0405 +afii10055;0406 +afii10056;0407 +afii10057;0408 +afii10058;0409 +afii10059;040A +afii10060;040B +afii10061;040C +afii10062;040E +afii10063;F6C4 +afii10064;F6C5 +afii10065;0430 +afii10066;0431 +afii10067;0432 +afii10068;0433 +afii10069;0434 +afii10070;0435 +afii10071;0451 +afii10072;0436 +afii10073;0437 +afii10074;0438 +afii10075;0439 +afii10076;043A +afii10077;043B +afii10078;043C +afii10079;043D +afii10080;043E +afii10081;043F +afii10082;0440 +afii10083;0441 +afii10084;0442 +afii10085;0443 +afii10086;0444 +afii10087;0445 +afii10088;0446 +afii10089;0447 +afii10090;0448 +afii10091;0449 +afii10092;044A +afii10093;044B +afii10094;044C +afii10095;044D +afii10096;044E +afii10097;044F +afii10098;0491 +afii10099;0452 +afii10100;0453 +afii10101;0454 +afii10102;0455 +afii10103;0456 +afii10104;0457 +afii10105;0458 +afii10106;0459 +afii10107;045A +afii10108;045B +afii10109;045C +afii10110;045E +afii10145;040F +afii10146;0462 +afii10147;0472 +afii10148;0474 +afii10192;F6C6 +afii10193;045F +afii10194;0463 +afii10195;0473 +afii10196;0475 +afii10831;F6C7 +afii10832;F6C8 +afii10846;04D9 +afii299;200E +afii300;200F +afii301;200D +afii57381;066A +afii57388;060C +afii57392;0660 +afii57393;0661 +afii57394;0662 +afii57395;0663 +afii57396;0664 +afii57397;0665 +afii57398;0666 +afii57399;0667 +afii57400;0668 +afii57401;0669 +afii57403;061B +afii57407;061F +afii57409;0621 +afii57410;0622 +afii57411;0623 +afii57412;0624 +afii57413;0625 +afii57414;0626 +afii57415;0627 +afii57416;0628 +afii57417;0629 +afii57418;062A +afii57419;062B +afii57420;062C +afii57421;062D +afii57422;062E +afii57423;062F +afii57424;0630 +afii57425;0631 +afii57426;0632 +afii57427;0633 +afii57428;0634 +afii57429;0635 +afii57430;0636 +afii57431;0637 +afii57432;0638 +afii57433;0639 +afii57434;063A +afii57440;0640 +afii57441;0641 +afii57442;0642 +afii57443;0643 +afii57444;0644 +afii57445;0645 +afii57446;0646 +afii57448;0648 +afii57449;0649 +afii57450;064A +afii57451;064B +afii57452;064C +afii57453;064D +afii57454;064E +afii57455;064F +afii57456;0650 +afii57457;0651 +afii57458;0652 +afii57470;0647 +afii57505;06A4 +afii57506;067E +afii57507;0686 +afii57508;0698 +afii57509;06AF +afii57511;0679 +afii57512;0688 +afii57513;0691 +afii57514;06BA +afii57519;06D2 +afii57534;06D5 +afii57636;20AA +afii57645;05BE +afii57658;05C3 +afii57664;05D0 +afii57665;05D1 +afii57666;05D2 +afii57667;05D3 +afii57668;05D4 +afii57669;05D5 +afii57670;05D6 +afii57671;05D7 +afii57672;05D8 +afii57673;05D9 +afii57674;05DA +afii57675;05DB +afii57676;05DC +afii57677;05DD +afii57678;05DE +afii57679;05DF +afii57680;05E0 +afii57681;05E1 +afii57682;05E2 +afii57683;05E3 +afii57684;05E4 +afii57685;05E5 +afii57686;05E6 +afii57687;05E7 +afii57688;05E8 +afii57689;05E9 +afii57690;05EA +afii57694;FB2A +afii57695;FB2B +afii57700;FB4B +afii57705;FB1F +afii57716;05F0 +afii57717;05F1 +afii57718;05F2 +afii57723;FB35 +afii57793;05B4 +afii57794;05B5 +afii57795;05B6 +afii57796;05BB +afii57797;05B8 +afii57798;05B7 +afii57799;05B0 +afii57800;05B2 +afii57801;05B1 +afii57802;05B3 +afii57803;05C2 +afii57804;05C1 +afii57806;05B9 +afii57807;05BC +afii57839;05BD +afii57841;05BF +afii57842;05C0 +afii57929;02BC +afii61248;2105 +afii61289;2113 +afii61352;2116 +afii61573;202C +afii61574;202D +afii61575;202E +afii61664;200C +afii63167;066D +afii64937;02BD +agrave;00E0 +agujarati;0A85 +agurmukhi;0A05 +ahiragana;3042 +ahookabove;1EA3 +aibengali;0990 +aibopomofo;311E +aideva;0910 +aiecyrillic;04D5 +aigujarati;0A90 +aigurmukhi;0A10 +aimatragurmukhi;0A48 +ainarabic;0639 +ainfinalarabic;FECA +aininitialarabic;FECB +ainmedialarabic;FECC +ainvertedbreve;0203 +aivowelsignbengali;09C8 +aivowelsigndeva;0948 +aivowelsigngujarati;0AC8 +akatakana;30A2 +akatakanahalfwidth;FF71 +akorean;314F +alef;05D0 +alefarabic;0627 +alefdageshhebrew;FB30 +aleffinalarabic;FE8E +alefhamzaabovearabic;0623 +alefhamzaabovefinalarabic;FE84 +alefhamzabelowarabic;0625 +alefhamzabelowfinalarabic;FE88 +alefhebrew;05D0 +aleflamedhebrew;FB4F +alefmaddaabovearabic;0622 +alefmaddaabovefinalarabic;FE82 +alefmaksuraarabic;0649 +alefmaksurafinalarabic;FEF0 +alefmaksurainitialarabic;FEF3 +alefmaksuramedialarabic;FEF4 +alefpatahhebrew;FB2E +alefqamatshebrew;FB2F +aleph;2135 +allequal;224C +alpha;03B1 +alphatonos;03AC +amacron;0101 +amonospace;FF41 +ampersand;0026 +ampersandmonospace;FF06 +ampersandsmall;F726 +amsquare;33C2 +anbopomofo;3122 +angbopomofo;3124 +angkhankhuthai;0E5A +angle;2220 +anglebracketleft;3008 +anglebracketleftvertical;FE3F +anglebracketright;3009 +anglebracketrightvertical;FE40 +angleleft;2329 +angleright;232A +angstrom;212B +anoteleia;0387 +anudattadeva;0952 +anusvarabengali;0982 +anusvaradeva;0902 +anusvaragujarati;0A82 +aogonek;0105 +apaatosquare;3300 +aparen;249C +apostrophearmenian;055A +apostrophemod;02BC +apple;F8FF +approaches;2250 +approxequal;2248 +approxequalorimage;2252 +approximatelyequal;2245 +araeaekorean;318E +araeakorean;318D +arc;2312 +arighthalfring;1E9A +aring;00E5 +aringacute;01FB +aringbelow;1E01 +arrowboth;2194 +arrowdashdown;21E3 +arrowdashleft;21E0 +arrowdashright;21E2 +arrowdashup;21E1 +arrowdblboth;21D4 +arrowdbldown;21D3 +arrowdblleft;21D0 +arrowdblright;21D2 +arrowdblup;21D1 +arrowdown;2193 +arrowdownleft;2199 +arrowdownright;2198 +arrowdownwhite;21E9 +arrowheaddownmod;02C5 +arrowheadleftmod;02C2 +arrowheadrightmod;02C3 +arrowheadupmod;02C4 +arrowhorizex;F8E7 +arrowleft;2190 +arrowleftdbl;21D0 +arrowleftdblstroke;21CD +arrowleftoverright;21C6 +arrowleftwhite;21E6 +arrowright;2192 +arrowrightdblstroke;21CF +arrowrightheavy;279E +arrowrightoverleft;21C4 +arrowrightwhite;21E8 +arrowtableft;21E4 +arrowtabright;21E5 +arrowup;2191 +arrowupdn;2195 +arrowupdnbse;21A8 +arrowupdownbase;21A8 +arrowupleft;2196 +arrowupleftofdown;21C5 +arrowupright;2197 +arrowupwhite;21E7 +arrowvertex;F8E6 +asciicircum;005E +asciicircummonospace;FF3E +asciitilde;007E +asciitildemonospace;FF5E +ascript;0251 +ascriptturned;0252 +asmallhiragana;3041 +asmallkatakana;30A1 +asmallkatakanahalfwidth;FF67 +asterisk;002A +asteriskaltonearabic;066D +asteriskarabic;066D +asteriskmath;2217 +asteriskmonospace;FF0A +asterisksmall;FE61 +asterism;2042 +asuperior;F6E9 +asymptoticallyequal;2243 +at;0040 +atilde;00E3 +atmonospace;FF20 +atsmall;FE6B +aturned;0250 +aubengali;0994 +aubopomofo;3120 +audeva;0914 +augujarati;0A94 +augurmukhi;0A14 +aulengthmarkbengali;09D7 +aumatragurmukhi;0A4C +auvowelsignbengali;09CC +auvowelsigndeva;094C +auvowelsigngujarati;0ACC +avagrahadeva;093D +aybarmenian;0561 +ayin;05E2 +ayinaltonehebrew;FB20 +ayinhebrew;05E2 +b;0062 +babengali;09AC +backslash;005C +backslashmonospace;FF3C +badeva;092C +bagujarati;0AAC +bagurmukhi;0A2C +bahiragana;3070 +bahtthai;0E3F +bakatakana;30D0 +bar;007C +barmonospace;FF5C +bbopomofo;3105 +bcircle;24D1 +bdotaccent;1E03 +bdotbelow;1E05 +beamedsixteenthnotes;266C +because;2235 +becyrillic;0431 +beharabic;0628 +behfinalarabic;FE90 +behinitialarabic;FE91 +behiragana;3079 +behmedialarabic;FE92 +behmeeminitialarabic;FC9F +behmeemisolatedarabic;FC08 +behnoonfinalarabic;FC6D +bekatakana;30D9 +benarmenian;0562 +bet;05D1 +beta;03B2 +betasymbolgreek;03D0 +betdagesh;FB31 +betdageshhebrew;FB31 +bethebrew;05D1 +betrafehebrew;FB4C +bhabengali;09AD +bhadeva;092D +bhagujarati;0AAD +bhagurmukhi;0A2D +bhook;0253 +bihiragana;3073 +bikatakana;30D3 +bilabialclick;0298 +bindigurmukhi;0A02 +birusquare;3331 +blackcircle;25CF +blackdiamond;25C6 +blackdownpointingtriangle;25BC +blackleftpointingpointer;25C4 +blackleftpointingtriangle;25C0 +blacklenticularbracketleft;3010 +blacklenticularbracketleftvertical;FE3B +blacklenticularbracketright;3011 +blacklenticularbracketrightvertical;FE3C +blacklowerlefttriangle;25E3 +blacklowerrighttriangle;25E2 +blackrectangle;25AC +blackrightpointingpointer;25BA +blackrightpointingtriangle;25B6 +blacksmallsquare;25AA +blacksmilingface;263B +blacksquare;25A0 +blackstar;2605 +blackupperlefttriangle;25E4 +blackupperrighttriangle;25E5 +blackuppointingsmalltriangle;25B4 +blackuppointingtriangle;25B2 +blank;2423 +blinebelow;1E07 +block;2588 +bmonospace;FF42 +bobaimaithai;0E1A +bohiragana;307C +bokatakana;30DC +bparen;249D +bqsquare;33C3 +braceex;F8F4 +braceleft;007B +braceleftbt;F8F3 +braceleftmid;F8F2 +braceleftmonospace;FF5B +braceleftsmall;FE5B +bracelefttp;F8F1 +braceleftvertical;FE37 +braceright;007D +bracerightbt;F8FE +bracerightmid;F8FD +bracerightmonospace;FF5D +bracerightsmall;FE5C +bracerighttp;F8FC +bracerightvertical;FE38 +bracketleft;005B +bracketleftbt;F8F0 +bracketleftex;F8EF +bracketleftmonospace;FF3B +bracketlefttp;F8EE +bracketright;005D +bracketrightbt;F8FB +bracketrightex;F8FA +bracketrightmonospace;FF3D +bracketrighttp;F8F9 +breve;02D8 +brevebelowcmb;032E +brevecmb;0306 +breveinvertedbelowcmb;032F +breveinvertedcmb;0311 +breveinverteddoublecmb;0361 +bridgebelowcmb;032A +bridgeinvertedbelowcmb;033A +brokenbar;00A6 +bstroke;0180 +bsuperior;F6EA +btopbar;0183 +buhiragana;3076 +bukatakana;30D6 +bullet;2022 +bulletinverse;25D8 +bulletoperator;2219 +bullseye;25CE +c;0063 +caarmenian;056E +cabengali;099A +cacute;0107 +cadeva;091A +cagujarati;0A9A +cagurmukhi;0A1A +calsquare;3388 +candrabindubengali;0981 +candrabinducmb;0310 +candrabindudeva;0901 +candrabindugujarati;0A81 +capslock;21EA +careof;2105 +caron;02C7 +caronbelowcmb;032C +caroncmb;030C +carriagereturn;21B5 +cbopomofo;3118 +ccaron;010D +ccedilla;00E7 +ccedillaacute;1E09 +ccircle;24D2 +ccircumflex;0109 +ccurl;0255 +cdot;010B +cdotaccent;010B +cdsquare;33C5 +cedilla;00B8 +cedillacmb;0327 +cent;00A2 +centigrade;2103 +centinferior;F6DF +centmonospace;FFE0 +centoldstyle;F7A2 +centsuperior;F6E0 +chaarmenian;0579 +chabengali;099B +chadeva;091B +chagujarati;0A9B +chagurmukhi;0A1B +chbopomofo;3114 +cheabkhasiancyrillic;04BD +checkmark;2713 +checyrillic;0447 +chedescenderabkhasiancyrillic;04BF +chedescendercyrillic;04B7 +chedieresiscyrillic;04F5 +cheharmenian;0573 +chekhakassiancyrillic;04CC +cheverticalstrokecyrillic;04B9 +chi;03C7 +chieuchacirclekorean;3277 +chieuchaparenkorean;3217 +chieuchcirclekorean;3269 +chieuchkorean;314A +chieuchparenkorean;3209 +chochangthai;0E0A +chochanthai;0E08 +chochingthai;0E09 +chochoethai;0E0C +chook;0188 +cieucacirclekorean;3276 +cieucaparenkorean;3216 +cieuccirclekorean;3268 +cieuckorean;3148 +cieucparenkorean;3208 +cieucuparenkorean;321C +circle;25CB +circlemultiply;2297 +circleot;2299 +circleplus;2295 +circlepostalmark;3036 +circlewithlefthalfblack;25D0 +circlewithrighthalfblack;25D1 +circumflex;02C6 +circumflexbelowcmb;032D +circumflexcmb;0302 +clear;2327 +clickalveolar;01C2 +clickdental;01C0 +clicklateral;01C1 +clickretroflex;01C3 +club;2663 +clubsuitblack;2663 +clubsuitwhite;2667 +cmcubedsquare;33A4 +cmonospace;FF43 +cmsquaredsquare;33A0 +coarmenian;0581 +colon;003A +colonmonetary;20A1 +colonmonospace;FF1A +colonsign;20A1 +colonsmall;FE55 +colontriangularhalfmod;02D1 +colontriangularmod;02D0 +comma;002C +commaabovecmb;0313 +commaaboverightcmb;0315 +commaaccent;F6C3 +commaarabic;060C +commaarmenian;055D +commainferior;F6E1 +commamonospace;FF0C +commareversedabovecmb;0314 +commareversedmod;02BD +commasmall;FE50 +commasuperior;F6E2 +commaturnedabovecmb;0312 +commaturnedmod;02BB +compass;263C +congruent;2245 +contourintegral;222E +control;2303 +controlACK;0006 +controlBEL;0007 +controlBS;0008 +controlCAN;0018 +controlCR;000D +controlDC1;0011 +controlDC2;0012 +controlDC3;0013 +controlDC4;0014 +controlDEL;007F +controlDLE;0010 +controlEM;0019 +controlENQ;0005 +controlEOT;0004 +controlESC;001B +controlETB;0017 +controlETX;0003 +controlFF;000C +controlFS;001C +controlGS;001D +controlHT;0009 +controlLF;000A +controlNAK;0015 +controlRS;001E +controlSI;000F +controlSO;000E +controlSOT;0002 +controlSTX;0001 +controlSUB;001A +controlSYN;0016 +controlUS;001F +controlVT;000B +copyright;00A9 +copyrightsans;F8E9 +copyrightserif;F6D9 +cornerbracketleft;300C +cornerbracketlefthalfwidth;FF62 +cornerbracketleftvertical;FE41 +cornerbracketright;300D +cornerbracketrighthalfwidth;FF63 +cornerbracketrightvertical;FE42 +corporationsquare;337F +cosquare;33C7 +coverkgsquare;33C6 +cparen;249E +cruzeiro;20A2 +cstretched;0297 +curlyand;22CF +curlyor;22CE +currency;00A4 +cyrBreve;F6D1 +cyrFlex;F6D2 +cyrbreve;F6D4 +cyrflex;F6D5 +d;0064 +daarmenian;0564 +dabengali;09A6 +dadarabic;0636 +dadeva;0926 +dadfinalarabic;FEBE +dadinitialarabic;FEBF +dadmedialarabic;FEC0 +dagesh;05BC +dageshhebrew;05BC +dagger;2020 +daggerdbl;2021 +dagujarati;0AA6 +dagurmukhi;0A26 +dahiragana;3060 +dakatakana;30C0 +dalarabic;062F +dalet;05D3 +daletdagesh;FB33 +daletdageshhebrew;FB33 +dalethatafpatah;05D3 05B2 +dalethatafpatahhebrew;05D3 05B2 +dalethatafsegol;05D3 05B1 +dalethatafsegolhebrew;05D3 05B1 +dalethebrew;05D3 +dalethiriq;05D3 05B4 +dalethiriqhebrew;05D3 05B4 +daletholam;05D3 05B9 +daletholamhebrew;05D3 05B9 +daletpatah;05D3 05B7 +daletpatahhebrew;05D3 05B7 +daletqamats;05D3 05B8 +daletqamatshebrew;05D3 05B8 +daletqubuts;05D3 05BB +daletqubutshebrew;05D3 05BB +daletsegol;05D3 05B6 +daletsegolhebrew;05D3 05B6 +daletsheva;05D3 05B0 +daletshevahebrew;05D3 05B0 +dalettsere;05D3 05B5 +dalettserehebrew;05D3 05B5 +dalfinalarabic;FEAA +dammaarabic;064F +dammalowarabic;064F +dammatanaltonearabic;064C +dammatanarabic;064C +danda;0964 +dargahebrew;05A7 +dargalefthebrew;05A7 +dasiapneumatacyrilliccmb;0485 +dblGrave;F6D3 +dblanglebracketleft;300A +dblanglebracketleftvertical;FE3D +dblanglebracketright;300B +dblanglebracketrightvertical;FE3E +dblarchinvertedbelowcmb;032B +dblarrowleft;21D4 +dblarrowright;21D2 +dbldanda;0965 +dblgrave;F6D6 +dblgravecmb;030F +dblintegral;222C +dbllowline;2017 +dbllowlinecmb;0333 +dbloverlinecmb;033F +dblprimemod;02BA +dblverticalbar;2016 +dblverticallineabovecmb;030E +dbopomofo;3109 +dbsquare;33C8 +dcaron;010F +dcedilla;1E11 +dcircle;24D3 +dcircumflexbelow;1E13 +dcroat;0111 +ddabengali;09A1 +ddadeva;0921 +ddagujarati;0AA1 +ddagurmukhi;0A21 +ddalarabic;0688 +ddalfinalarabic;FB89 +dddhadeva;095C +ddhabengali;09A2 +ddhadeva;0922 +ddhagujarati;0AA2 +ddhagurmukhi;0A22 +ddotaccent;1E0B +ddotbelow;1E0D +decimalseparatorarabic;066B +decimalseparatorpersian;066B +decyrillic;0434 +degree;00B0 +dehihebrew;05AD +dehiragana;3067 +deicoptic;03EF +dekatakana;30C7 +deleteleft;232B +deleteright;2326 +delta;03B4 +deltaturned;018D +denominatorminusonenumeratorbengali;09F8 +dezh;02A4 +dhabengali;09A7 +dhadeva;0927 +dhagujarati;0AA7 +dhagurmukhi;0A27 +dhook;0257 +dialytikatonos;0385 +dialytikatonoscmb;0344 +diamond;2666 +diamondsuitwhite;2662 +dieresis;00A8 +dieresisacute;F6D7 +dieresisbelowcmb;0324 +dieresiscmb;0308 +dieresisgrave;F6D8 +dieresistonos;0385 +dihiragana;3062 +dikatakana;30C2 +dittomark;3003 +divide;00F7 +divides;2223 +divisionslash;2215 +djecyrillic;0452 +dkshade;2593 +dlinebelow;1E0F +dlsquare;3397 +dmacron;0111 +dmonospace;FF44 +dnblock;2584 +dochadathai;0E0E +dodekthai;0E14 +dohiragana;3069 +dokatakana;30C9 +dollar;0024 +dollarinferior;F6E3 +dollarmonospace;FF04 +dollaroldstyle;F724 +dollarsmall;FE69 +dollarsuperior;F6E4 +dong;20AB +dorusquare;3326 +dotaccent;02D9 +dotaccentcmb;0307 +dotbelowcmb;0323 +dotbelowcomb;0323 +dotkatakana;30FB +dotlessi;0131 +dotlessj;F6BE +dotlessjstrokehook;0284 +dotmath;22C5 +dottedcircle;25CC +doubleyodpatah;FB1F +doubleyodpatahhebrew;FB1F +downtackbelowcmb;031E +downtackmod;02D5 +dparen;249F +dsuperior;F6EB +dtail;0256 +dtopbar;018C +duhiragana;3065 +dukatakana;30C5 +dz;01F3 +dzaltone;02A3 +dzcaron;01C6 +dzcurl;02A5 +dzeabkhasiancyrillic;04E1 +dzecyrillic;0455 +dzhecyrillic;045F +e;0065 +eacute;00E9 +earth;2641 +ebengali;098F +ebopomofo;311C +ebreve;0115 +ecandradeva;090D +ecandragujarati;0A8D +ecandravowelsigndeva;0945 +ecandravowelsigngujarati;0AC5 +ecaron;011B +ecedillabreve;1E1D +echarmenian;0565 +echyiwnarmenian;0587 +ecircle;24D4 +ecircumflex;00EA +ecircumflexacute;1EBF +ecircumflexbelow;1E19 +ecircumflexdotbelow;1EC7 +ecircumflexgrave;1EC1 +ecircumflexhookabove;1EC3 +ecircumflextilde;1EC5 +ecyrillic;0454 +edblgrave;0205 +edeva;090F +edieresis;00EB +edot;0117 +edotaccent;0117 +edotbelow;1EB9 +eegurmukhi;0A0F +eematragurmukhi;0A47 +efcyrillic;0444 +egrave;00E8 +egujarati;0A8F +eharmenian;0567 +ehbopomofo;311D +ehiragana;3048 +ehookabove;1EBB +eibopomofo;311F +eight;0038 +eightarabic;0668 +eightbengali;09EE +eightcircle;2467 +eightcircleinversesansserif;2791 +eightdeva;096E +eighteencircle;2471 +eighteenparen;2485 +eighteenperiod;2499 +eightgujarati;0AEE +eightgurmukhi;0A6E +eighthackarabic;0668 +eighthangzhou;3028 +eighthnotebeamed;266B +eightideographicparen;3227 +eightinferior;2088 +eightmonospace;FF18 +eightoldstyle;F738 +eightparen;247B +eightperiod;248F +eightpersian;06F8 +eightroman;2177 +eightsuperior;2078 +eightthai;0E58 +einvertedbreve;0207 +eiotifiedcyrillic;0465 +ekatakana;30A8 +ekatakanahalfwidth;FF74 +ekonkargurmukhi;0A74 +ekorean;3154 +elcyrillic;043B +element;2208 +elevencircle;246A +elevenparen;247E +elevenperiod;2492 +elevenroman;217A +ellipsis;2026 +ellipsisvertical;22EE +emacron;0113 +emacronacute;1E17 +emacrongrave;1E15 +emcyrillic;043C +emdash;2014 +emdashvertical;FE31 +emonospace;FF45 +emphasismarkarmenian;055B +emptyset;2205 +enbopomofo;3123 +encyrillic;043D +endash;2013 +endashvertical;FE32 +endescendercyrillic;04A3 +eng;014B +engbopomofo;3125 +enghecyrillic;04A5 +enhookcyrillic;04C8 +enspace;2002 +eogonek;0119 +eokorean;3153 +eopen;025B +eopenclosed;029A +eopenreversed;025C +eopenreversedclosed;025E +eopenreversedhook;025D +eparen;24A0 +epsilon;03B5 +epsilontonos;03AD +equal;003D +equalmonospace;FF1D +equalsmall;FE66 +equalsuperior;207C +equivalence;2261 +erbopomofo;3126 +ercyrillic;0440 +ereversed;0258 +ereversedcyrillic;044D +escyrillic;0441 +esdescendercyrillic;04AB +esh;0283 +eshcurl;0286 +eshortdeva;090E +eshortvowelsigndeva;0946 +eshreversedloop;01AA +eshsquatreversed;0285 +esmallhiragana;3047 +esmallkatakana;30A7 +esmallkatakanahalfwidth;FF6A +estimated;212E +esuperior;F6EC +eta;03B7 +etarmenian;0568 +etatonos;03AE +eth;00F0 +etilde;1EBD +etildebelow;1E1B +etnahtafoukhhebrew;0591 +etnahtafoukhlefthebrew;0591 +etnahtahebrew;0591 +etnahtalefthebrew;0591 +eturned;01DD +eukorean;3161 +euro;20AC +evowelsignbengali;09C7 +evowelsigndeva;0947 +evowelsigngujarati;0AC7 +exclam;0021 +exclamarmenian;055C +exclamdbl;203C +exclamdown;00A1 +exclamdownsmall;F7A1 +exclammonospace;FF01 +exclamsmall;F721 +existential;2203 +ezh;0292 +ezhcaron;01EF +ezhcurl;0293 +ezhreversed;01B9 +ezhtail;01BA +f;0066 +fadeva;095E +fagurmukhi;0A5E +fahrenheit;2109 +fathaarabic;064E +fathalowarabic;064E +fathatanarabic;064B +fbopomofo;3108 +fcircle;24D5 +fdotaccent;1E1F +feharabic;0641 +feharmenian;0586 +fehfinalarabic;FED2 +fehinitialarabic;FED3 +fehmedialarabic;FED4 +feicoptic;03E5 +female;2640 +ff;FB00 +ffi;FB03 +ffl;FB04 +fi;FB01 +fifteencircle;246E +fifteenparen;2482 +fifteenperiod;2496 +figuredash;2012 +filledbox;25A0 +filledrect;25AC +finalkaf;05DA +finalkafdagesh;FB3A +finalkafdageshhebrew;FB3A +finalkafhebrew;05DA +finalkafqamats;05DA 05B8 +finalkafqamatshebrew;05DA 05B8 +finalkafsheva;05DA 05B0 +finalkafshevahebrew;05DA 05B0 +finalmem;05DD +finalmemhebrew;05DD +finalnun;05DF +finalnunhebrew;05DF +finalpe;05E3 +finalpehebrew;05E3 +finaltsadi;05E5 +finaltsadihebrew;05E5 +firsttonechinese;02C9 +fisheye;25C9 +fitacyrillic;0473 +five;0035 +fivearabic;0665 +fivebengali;09EB +fivecircle;2464 +fivecircleinversesansserif;278E +fivedeva;096B +fiveeighths;215D +fivegujarati;0AEB +fivegurmukhi;0A6B +fivehackarabic;0665 +fivehangzhou;3025 +fiveideographicparen;3224 +fiveinferior;2085 +fivemonospace;FF15 +fiveoldstyle;F735 +fiveparen;2478 +fiveperiod;248C +fivepersian;06F5 +fiveroman;2174 +fivesuperior;2075 +fivethai;0E55 +fl;FB02 +florin;0192 +fmonospace;FF46 +fmsquare;3399 +fofanthai;0E1F +fofathai;0E1D +fongmanthai;0E4F +forall;2200 +four;0034 +fourarabic;0664 +fourbengali;09EA +fourcircle;2463 +fourcircleinversesansserif;278D +fourdeva;096A +fourgujarati;0AEA +fourgurmukhi;0A6A +fourhackarabic;0664 +fourhangzhou;3024 +fourideographicparen;3223 +fourinferior;2084 +fourmonospace;FF14 +fournumeratorbengali;09F7 +fouroldstyle;F734 +fourparen;2477 +fourperiod;248B +fourpersian;06F4 +fourroman;2173 +foursuperior;2074 +fourteencircle;246D +fourteenparen;2481 +fourteenperiod;2495 +fourthai;0E54 +fourthtonechinese;02CB +fparen;24A1 +fraction;2044 +franc;20A3 +g;0067 +gabengali;0997 +gacute;01F5 +gadeva;0917 +gafarabic;06AF +gaffinalarabic;FB93 +gafinitialarabic;FB94 +gafmedialarabic;FB95 +gagujarati;0A97 +gagurmukhi;0A17 +gahiragana;304C +gakatakana;30AC +gamma;03B3 +gammalatinsmall;0263 +gammasuperior;02E0 +gangiacoptic;03EB +gbopomofo;310D +gbreve;011F +gcaron;01E7 +gcedilla;0123 +gcircle;24D6 +gcircumflex;011D +gcommaaccent;0123 +gdot;0121 +gdotaccent;0121 +gecyrillic;0433 +gehiragana;3052 +gekatakana;30B2 +geometricallyequal;2251 +gereshaccenthebrew;059C +gereshhebrew;05F3 +gereshmuqdamhebrew;059D +germandbls;00DF +gershayimaccenthebrew;059E +gershayimhebrew;05F4 +getamark;3013 +ghabengali;0998 +ghadarmenian;0572 +ghadeva;0918 +ghagujarati;0A98 +ghagurmukhi;0A18 +ghainarabic;063A +ghainfinalarabic;FECE +ghaininitialarabic;FECF +ghainmedialarabic;FED0 +ghemiddlehookcyrillic;0495 +ghestrokecyrillic;0493 +gheupturncyrillic;0491 +ghhadeva;095A +ghhagurmukhi;0A5A +ghook;0260 +ghzsquare;3393 +gihiragana;304E +gikatakana;30AE +gimarmenian;0563 +gimel;05D2 +gimeldagesh;FB32 +gimeldageshhebrew;FB32 +gimelhebrew;05D2 +gjecyrillic;0453 +glottalinvertedstroke;01BE +glottalstop;0294 +glottalstopinverted;0296 +glottalstopmod;02C0 +glottalstopreversed;0295 +glottalstopreversedmod;02C1 +glottalstopreversedsuperior;02E4 +glottalstopstroke;02A1 +glottalstopstrokereversed;02A2 +gmacron;1E21 +gmonospace;FF47 +gohiragana;3054 +gokatakana;30B4 +gparen;24A2 +gpasquare;33AC +gradient;2207 +grave;0060 +gravebelowcmb;0316 +gravecmb;0300 +gravecomb;0300 +gravedeva;0953 +gravelowmod;02CE +gravemonospace;FF40 +gravetonecmb;0340 +greater;003E +greaterequal;2265 +greaterequalorless;22DB +greatermonospace;FF1E +greaterorequivalent;2273 +greaterorless;2277 +greateroverequal;2267 +greatersmall;FE65 +gscript;0261 +gstroke;01E5 +guhiragana;3050 +guillemotleft;00AB +guillemotright;00BB +guilsinglleft;2039 +guilsinglright;203A +gukatakana;30B0 +guramusquare;3318 +gysquare;33C9 +h;0068 +haabkhasiancyrillic;04A9 +haaltonearabic;06C1 +habengali;09B9 +hadescendercyrillic;04B3 +hadeva;0939 +hagujarati;0AB9 +hagurmukhi;0A39 +haharabic;062D +hahfinalarabic;FEA2 +hahinitialarabic;FEA3 +hahiragana;306F +hahmedialarabic;FEA4 +haitusquare;332A +hakatakana;30CF +hakatakanahalfwidth;FF8A +halantgurmukhi;0A4D +hamzaarabic;0621 +hamzadammaarabic;0621 064F +hamzadammatanarabic;0621 064C +hamzafathaarabic;0621 064E +hamzafathatanarabic;0621 064B +hamzalowarabic;0621 +hamzalowkasraarabic;0621 0650 +hamzalowkasratanarabic;0621 064D +hamzasukunarabic;0621 0652 +hangulfiller;3164 +hardsigncyrillic;044A +harpoonleftbarbup;21BC +harpoonrightbarbup;21C0 +hasquare;33CA +hatafpatah;05B2 +hatafpatah16;05B2 +hatafpatah23;05B2 +hatafpatah2f;05B2 +hatafpatahhebrew;05B2 +hatafpatahnarrowhebrew;05B2 +hatafpatahquarterhebrew;05B2 +hatafpatahwidehebrew;05B2 +hatafqamats;05B3 +hatafqamats1b;05B3 +hatafqamats28;05B3 +hatafqamats34;05B3 +hatafqamatshebrew;05B3 +hatafqamatsnarrowhebrew;05B3 +hatafqamatsquarterhebrew;05B3 +hatafqamatswidehebrew;05B3 +hatafsegol;05B1 +hatafsegol17;05B1 +hatafsegol24;05B1 +hatafsegol30;05B1 +hatafsegolhebrew;05B1 +hatafsegolnarrowhebrew;05B1 +hatafsegolquarterhebrew;05B1 +hatafsegolwidehebrew;05B1 +hbar;0127 +hbopomofo;310F +hbrevebelow;1E2B +hcedilla;1E29 +hcircle;24D7 +hcircumflex;0125 +hdieresis;1E27 +hdotaccent;1E23 +hdotbelow;1E25 +he;05D4 +heart;2665 +heartsuitblack;2665 +heartsuitwhite;2661 +hedagesh;FB34 +hedageshhebrew;FB34 +hehaltonearabic;06C1 +heharabic;0647 +hehebrew;05D4 +hehfinalaltonearabic;FBA7 +hehfinalalttwoarabic;FEEA +hehfinalarabic;FEEA +hehhamzaabovefinalarabic;FBA5 +hehhamzaaboveisolatedarabic;FBA4 +hehinitialaltonearabic;FBA8 +hehinitialarabic;FEEB +hehiragana;3078 +hehmedialaltonearabic;FBA9 +hehmedialarabic;FEEC +heiseierasquare;337B +hekatakana;30D8 +hekatakanahalfwidth;FF8D +hekutaarusquare;3336 +henghook;0267 +herutusquare;3339 +het;05D7 +hethebrew;05D7 +hhook;0266 +hhooksuperior;02B1 +hieuhacirclekorean;327B +hieuhaparenkorean;321B +hieuhcirclekorean;326D +hieuhkorean;314E +hieuhparenkorean;320D +hihiragana;3072 +hikatakana;30D2 +hikatakanahalfwidth;FF8B +hiriq;05B4 +hiriq14;05B4 +hiriq21;05B4 +hiriq2d;05B4 +hiriqhebrew;05B4 +hiriqnarrowhebrew;05B4 +hiriqquarterhebrew;05B4 +hiriqwidehebrew;05B4 +hlinebelow;1E96 +hmonospace;FF48 +hoarmenian;0570 +hohipthai;0E2B +hohiragana;307B +hokatakana;30DB +hokatakanahalfwidth;FF8E +holam;05B9 +holam19;05B9 +holam26;05B9 +holam32;05B9 +holamhebrew;05B9 +holamnarrowhebrew;05B9 +holamquarterhebrew;05B9 +holamwidehebrew;05B9 +honokhukthai;0E2E +hookabovecomb;0309 +hookcmb;0309 +hookpalatalizedbelowcmb;0321 +hookretroflexbelowcmb;0322 +hoonsquare;3342 +horicoptic;03E9 +horizontalbar;2015 +horncmb;031B +hotsprings;2668 +house;2302 +hparen;24A3 +hsuperior;02B0 +hturned;0265 +huhiragana;3075 +huiitosquare;3333 +hukatakana;30D5 +hukatakanahalfwidth;FF8C +hungarumlaut;02DD +hungarumlautcmb;030B +hv;0195 +hyphen;002D +hypheninferior;F6E5 +hyphenmonospace;FF0D +hyphensmall;FE63 +hyphensuperior;F6E6 +hyphentwo;2010 +i;0069 +iacute;00ED +iacyrillic;044F +ibengali;0987 +ibopomofo;3127 +ibreve;012D +icaron;01D0 +icircle;24D8 +icircumflex;00EE +icyrillic;0456 +idblgrave;0209 +ideographearthcircle;328F +ideographfirecircle;328B +ideographicallianceparen;323F +ideographiccallparen;323A +ideographiccentrecircle;32A5 +ideographicclose;3006 +ideographiccomma;3001 +ideographiccommaleft;FF64 +ideographiccongratulationparen;3237 +ideographiccorrectcircle;32A3 +ideographicearthparen;322F +ideographicenterpriseparen;323D +ideographicexcellentcircle;329D +ideographicfestivalparen;3240 +ideographicfinancialcircle;3296 +ideographicfinancialparen;3236 +ideographicfireparen;322B +ideographichaveparen;3232 +ideographichighcircle;32A4 +ideographiciterationmark;3005 +ideographiclaborcircle;3298 +ideographiclaborparen;3238 +ideographicleftcircle;32A7 +ideographiclowcircle;32A6 +ideographicmedicinecircle;32A9 +ideographicmetalparen;322E +ideographicmoonparen;322A +ideographicnameparen;3234 +ideographicperiod;3002 +ideographicprintcircle;329E +ideographicreachparen;3243 +ideographicrepresentparen;3239 +ideographicresourceparen;323E +ideographicrightcircle;32A8 +ideographicsecretcircle;3299 +ideographicselfparen;3242 +ideographicsocietyparen;3233 +ideographicspace;3000 +ideographicspecialparen;3235 +ideographicstockparen;3231 +ideographicstudyparen;323B +ideographicsunparen;3230 +ideographicsuperviseparen;323C +ideographicwaterparen;322C +ideographicwoodparen;322D +ideographiczero;3007 +ideographmetalcircle;328E +ideographmooncircle;328A +ideographnamecircle;3294 +ideographsuncircle;3290 +ideographwatercircle;328C +ideographwoodcircle;328D +ideva;0907 +idieresis;00EF +idieresisacute;1E2F +idieresiscyrillic;04E5 +idotbelow;1ECB +iebrevecyrillic;04D7 +iecyrillic;0435 +ieungacirclekorean;3275 +ieungaparenkorean;3215 +ieungcirclekorean;3267 +ieungkorean;3147 +ieungparenkorean;3207 +igrave;00EC +igujarati;0A87 +igurmukhi;0A07 +ihiragana;3044 +ihookabove;1EC9 +iibengali;0988 +iicyrillic;0438 +iideva;0908 +iigujarati;0A88 +iigurmukhi;0A08 +iimatragurmukhi;0A40 +iinvertedbreve;020B +iishortcyrillic;0439 +iivowelsignbengali;09C0 +iivowelsigndeva;0940 +iivowelsigngujarati;0AC0 +ij;0133 +ikatakana;30A4 +ikatakanahalfwidth;FF72 +ikorean;3163 +ilde;02DC +iluyhebrew;05AC +imacron;012B +imacroncyrillic;04E3 +imageorapproximatelyequal;2253 +imatragurmukhi;0A3F +imonospace;FF49 +increment;2206 +infinity;221E +iniarmenian;056B +integral;222B +integralbottom;2321 +integralbt;2321 +integralex;F8F5 +integraltop;2320 +integraltp;2320 +intersection;2229 +intisquare;3305 +invbullet;25D8 +invcircle;25D9 +invsmileface;263B +iocyrillic;0451 +iogonek;012F +iota;03B9 +iotadieresis;03CA +iotadieresistonos;0390 +iotalatin;0269 +iotatonos;03AF +iparen;24A4 +irigurmukhi;0A72 +ismallhiragana;3043 +ismallkatakana;30A3 +ismallkatakanahalfwidth;FF68 +issharbengali;09FA +istroke;0268 +isuperior;F6ED +iterationhiragana;309D +iterationkatakana;30FD +itilde;0129 +itildebelow;1E2D +iubopomofo;3129 +iucyrillic;044E +ivowelsignbengali;09BF +ivowelsigndeva;093F +ivowelsigngujarati;0ABF +izhitsacyrillic;0475 +izhitsadblgravecyrillic;0477 +j;006A +jaarmenian;0571 +jabengali;099C +jadeva;091C +jagujarati;0A9C +jagurmukhi;0A1C +jbopomofo;3110 +jcaron;01F0 +jcircle;24D9 +jcircumflex;0135 +jcrossedtail;029D +jdotlessstroke;025F +jecyrillic;0458 +jeemarabic;062C +jeemfinalarabic;FE9E +jeeminitialarabic;FE9F +jeemmedialarabic;FEA0 +jeharabic;0698 +jehfinalarabic;FB8B +jhabengali;099D +jhadeva;091D +jhagujarati;0A9D +jhagurmukhi;0A1D +jheharmenian;057B +jis;3004 +jmonospace;FF4A +jparen;24A5 +jsuperior;02B2 +k;006B +kabashkircyrillic;04A1 +kabengali;0995 +kacute;1E31 +kacyrillic;043A +kadescendercyrillic;049B +kadeva;0915 +kaf;05DB +kafarabic;0643 +kafdagesh;FB3B +kafdageshhebrew;FB3B +kaffinalarabic;FEDA +kafhebrew;05DB +kafinitialarabic;FEDB +kafmedialarabic;FEDC +kafrafehebrew;FB4D +kagujarati;0A95 +kagurmukhi;0A15 +kahiragana;304B +kahookcyrillic;04C4 +kakatakana;30AB +kakatakanahalfwidth;FF76 +kappa;03BA +kappasymbolgreek;03F0 +kapyeounmieumkorean;3171 +kapyeounphieuphkorean;3184 +kapyeounpieupkorean;3178 +kapyeounssangpieupkorean;3179 +karoriisquare;330D +kashidaautoarabic;0640 +kashidaautonosidebearingarabic;0640 +kasmallkatakana;30F5 +kasquare;3384 +kasraarabic;0650 +kasratanarabic;064D +kastrokecyrillic;049F +katahiraprolongmarkhalfwidth;FF70 +kaverticalstrokecyrillic;049D +kbopomofo;310E +kcalsquare;3389 +kcaron;01E9 +kcedilla;0137 +kcircle;24DA +kcommaaccent;0137 +kdotbelow;1E33 +keharmenian;0584 +kehiragana;3051 +kekatakana;30B1 +kekatakanahalfwidth;FF79 +kenarmenian;056F +kesmallkatakana;30F6 +kgreenlandic;0138 +khabengali;0996 +khacyrillic;0445 +khadeva;0916 +khagujarati;0A96 +khagurmukhi;0A16 +khaharabic;062E +khahfinalarabic;FEA6 +khahinitialarabic;FEA7 +khahmedialarabic;FEA8 +kheicoptic;03E7 +khhadeva;0959 +khhagurmukhi;0A59 +khieukhacirclekorean;3278 +khieukhaparenkorean;3218 +khieukhcirclekorean;326A +khieukhkorean;314B +khieukhparenkorean;320A +khokhaithai;0E02 +khokhonthai;0E05 +khokhuatthai;0E03 +khokhwaithai;0E04 +khomutthai;0E5B +khook;0199 +khorakhangthai;0E06 +khzsquare;3391 +kihiragana;304D +kikatakana;30AD +kikatakanahalfwidth;FF77 +kiroguramusquare;3315 +kiromeetorusquare;3316 +kirosquare;3314 +kiyeokacirclekorean;326E +kiyeokaparenkorean;320E +kiyeokcirclekorean;3260 +kiyeokkorean;3131 +kiyeokparenkorean;3200 +kiyeoksioskorean;3133 +kjecyrillic;045C +klinebelow;1E35 +klsquare;3398 +kmcubedsquare;33A6 +kmonospace;FF4B +kmsquaredsquare;33A2 +kohiragana;3053 +kohmsquare;33C0 +kokaithai;0E01 +kokatakana;30B3 +kokatakanahalfwidth;FF7A +kooposquare;331E +koppacyrillic;0481 +koreanstandardsymbol;327F +koroniscmb;0343 +kparen;24A6 +kpasquare;33AA +ksicyrillic;046F +ktsquare;33CF +kturned;029E +kuhiragana;304F +kukatakana;30AF +kukatakanahalfwidth;FF78 +kvsquare;33B8 +kwsquare;33BE +l;006C +labengali;09B2 +lacute;013A +ladeva;0932 +lagujarati;0AB2 +lagurmukhi;0A32 +lakkhangyaothai;0E45 +lamaleffinalarabic;FEFC +lamalefhamzaabovefinalarabic;FEF8 +lamalefhamzaaboveisolatedarabic;FEF7 +lamalefhamzabelowfinalarabic;FEFA +lamalefhamzabelowisolatedarabic;FEF9 +lamalefisolatedarabic;FEFB +lamalefmaddaabovefinalarabic;FEF6 +lamalefmaddaaboveisolatedarabic;FEF5 +lamarabic;0644 +lambda;03BB +lambdastroke;019B +lamed;05DC +lameddagesh;FB3C +lameddageshhebrew;FB3C +lamedhebrew;05DC +lamedholam;05DC 05B9 +lamedholamdagesh;05DC 05B9 05BC +lamedholamdageshhebrew;05DC 05B9 05BC +lamedholamhebrew;05DC 05B9 +lamfinalarabic;FEDE +lamhahinitialarabic;FCCA +laminitialarabic;FEDF +lamjeeminitialarabic;FCC9 +lamkhahinitialarabic;FCCB +lamlamhehisolatedarabic;FDF2 +lammedialarabic;FEE0 +lammeemhahinitialarabic;FD88 +lammeeminitialarabic;FCCC +lammeemjeeminitialarabic;FEDF FEE4 FEA0 +lammeemkhahinitialarabic;FEDF FEE4 FEA8 +largecircle;25EF +lbar;019A +lbelt;026C +lbopomofo;310C +lcaron;013E +lcedilla;013C +lcircle;24DB +lcircumflexbelow;1E3D +lcommaaccent;013C +ldot;0140 +ldotaccent;0140 +ldotbelow;1E37 +ldotbelowmacron;1E39 +leftangleabovecmb;031A +lefttackbelowcmb;0318 +less;003C +lessequal;2264 +lessequalorgreater;22DA +lessmonospace;FF1C +lessorequivalent;2272 +lessorgreater;2276 +lessoverequal;2266 +lesssmall;FE64 +lezh;026E +lfblock;258C +lhookretroflex;026D +lira;20A4 +liwnarmenian;056C +lj;01C9 +ljecyrillic;0459 +ll;F6C0 +lladeva;0933 +llagujarati;0AB3 +llinebelow;1E3B +llladeva;0934 +llvocalicbengali;09E1 +llvocalicdeva;0961 +llvocalicvowelsignbengali;09E3 +llvocalicvowelsigndeva;0963 +lmiddletilde;026B +lmonospace;FF4C +lmsquare;33D0 +lochulathai;0E2C +logicaland;2227 +logicalnot;00AC +logicalnotreversed;2310 +logicalor;2228 +lolingthai;0E25 +longs;017F +lowlinecenterline;FE4E +lowlinecmb;0332 +lowlinedashed;FE4D +lozenge;25CA +lparen;24A7 +lslash;0142 +lsquare;2113 +lsuperior;F6EE +ltshade;2591 +luthai;0E26 +lvocalicbengali;098C +lvocalicdeva;090C +lvocalicvowelsignbengali;09E2 +lvocalicvowelsigndeva;0962 +lxsquare;33D3 +m;006D +mabengali;09AE +macron;00AF +macronbelowcmb;0331 +macroncmb;0304 +macronlowmod;02CD +macronmonospace;FFE3 +macute;1E3F +madeva;092E +magujarati;0AAE +magurmukhi;0A2E +mahapakhhebrew;05A4 +mahapakhlefthebrew;05A4 +mahiragana;307E +maichattawalowleftthai;F895 +maichattawalowrightthai;F894 +maichattawathai;0E4B +maichattawaupperleftthai;F893 +maieklowleftthai;F88C +maieklowrightthai;F88B +maiekthai;0E48 +maiekupperleftthai;F88A +maihanakatleftthai;F884 +maihanakatthai;0E31 +maitaikhuleftthai;F889 +maitaikhuthai;0E47 +maitholowleftthai;F88F +maitholowrightthai;F88E +maithothai;0E49 +maithoupperleftthai;F88D +maitrilowleftthai;F892 +maitrilowrightthai;F891 +maitrithai;0E4A +maitriupperleftthai;F890 +maiyamokthai;0E46 +makatakana;30DE +makatakanahalfwidth;FF8F +male;2642 +mansyonsquare;3347 +maqafhebrew;05BE +mars;2642 +masoracirclehebrew;05AF +masquare;3383 +mbopomofo;3107 +mbsquare;33D4 +mcircle;24DC +mcubedsquare;33A5 +mdotaccent;1E41 +mdotbelow;1E43 +meemarabic;0645 +meemfinalarabic;FEE2 +meeminitialarabic;FEE3 +meemmedialarabic;FEE4 +meemmeeminitialarabic;FCD1 +meemmeemisolatedarabic;FC48 +meetorusquare;334D +mehiragana;3081 +meizierasquare;337E +mekatakana;30E1 +mekatakanahalfwidth;FF92 +mem;05DE +memdagesh;FB3E +memdageshhebrew;FB3E +memhebrew;05DE +menarmenian;0574 +merkhahebrew;05A5 +merkhakefulahebrew;05A6 +merkhakefulalefthebrew;05A6 +merkhalefthebrew;05A5 +mhook;0271 +mhzsquare;3392 +middledotkatakanahalfwidth;FF65 +middot;00B7 +mieumacirclekorean;3272 +mieumaparenkorean;3212 +mieumcirclekorean;3264 +mieumkorean;3141 +mieumpansioskorean;3170 +mieumparenkorean;3204 +mieumpieupkorean;316E +mieumsioskorean;316F +mihiragana;307F +mikatakana;30DF +mikatakanahalfwidth;FF90 +minus;2212 +minusbelowcmb;0320 +minuscircle;2296 +minusmod;02D7 +minusplus;2213 +minute;2032 +miribaarusquare;334A +mirisquare;3349 +mlonglegturned;0270 +mlsquare;3396 +mmcubedsquare;33A3 +mmonospace;FF4D +mmsquaredsquare;339F +mohiragana;3082 +mohmsquare;33C1 +mokatakana;30E2 +mokatakanahalfwidth;FF93 +molsquare;33D6 +momathai;0E21 +moverssquare;33A7 +moverssquaredsquare;33A8 +mparen;24A8 +mpasquare;33AB +mssquare;33B3 +msuperior;F6EF +mturned;026F +mu;00B5 +mu1;00B5 +muasquare;3382 +muchgreater;226B +muchless;226A +mufsquare;338C +mugreek;03BC +mugsquare;338D +muhiragana;3080 +mukatakana;30E0 +mukatakanahalfwidth;FF91 +mulsquare;3395 +multiply;00D7 +mumsquare;339B +munahhebrew;05A3 +munahlefthebrew;05A3 +musicalnote;266A +musicalnotedbl;266B +musicflatsign;266D +musicsharpsign;266F +mussquare;33B2 +muvsquare;33B6 +muwsquare;33BC +mvmegasquare;33B9 +mvsquare;33B7 +mwmegasquare;33BF +mwsquare;33BD +n;006E +nabengali;09A8 +nabla;2207 +nacute;0144 +nadeva;0928 +nagujarati;0AA8 +nagurmukhi;0A28 +nahiragana;306A +nakatakana;30CA +nakatakanahalfwidth;FF85 +napostrophe;0149 +nasquare;3381 +nbopomofo;310B +nbspace;00A0 +ncaron;0148 +ncedilla;0146 +ncircle;24DD +ncircumflexbelow;1E4B +ncommaaccent;0146 +ndotaccent;1E45 +ndotbelow;1E47 +nehiragana;306D +nekatakana;30CD +nekatakanahalfwidth;FF88 +newsheqelsign;20AA +nfsquare;338B +ngabengali;0999 +ngadeva;0919 +ngagujarati;0A99 +ngagurmukhi;0A19 +ngonguthai;0E07 +nhiragana;3093 +nhookleft;0272 +nhookretroflex;0273 +nieunacirclekorean;326F +nieunaparenkorean;320F +nieuncieuckorean;3135 +nieuncirclekorean;3261 +nieunhieuhkorean;3136 +nieunkorean;3134 +nieunpansioskorean;3168 +nieunparenkorean;3201 +nieunsioskorean;3167 +nieuntikeutkorean;3166 +nihiragana;306B +nikatakana;30CB +nikatakanahalfwidth;FF86 +nikhahitleftthai;F899 +nikhahitthai;0E4D +nine;0039 +ninearabic;0669 +ninebengali;09EF +ninecircle;2468 +ninecircleinversesansserif;2792 +ninedeva;096F +ninegujarati;0AEF +ninegurmukhi;0A6F +ninehackarabic;0669 +ninehangzhou;3029 +nineideographicparen;3228 +nineinferior;2089 +ninemonospace;FF19 +nineoldstyle;F739 +nineparen;247C +nineperiod;2490 +ninepersian;06F9 +nineroman;2178 +ninesuperior;2079 +nineteencircle;2472 +nineteenparen;2486 +nineteenperiod;249A +ninethai;0E59 +nj;01CC +njecyrillic;045A +nkatakana;30F3 +nkatakanahalfwidth;FF9D +nlegrightlong;019E +nlinebelow;1E49 +nmonospace;FF4E +nmsquare;339A +nnabengali;09A3 +nnadeva;0923 +nnagujarati;0AA3 +nnagurmukhi;0A23 +nnnadeva;0929 +nohiragana;306E +nokatakana;30CE +nokatakanahalfwidth;FF89 +nonbreakingspace;00A0 +nonenthai;0E13 +nonuthai;0E19 +noonarabic;0646 +noonfinalarabic;FEE6 +noonghunnaarabic;06BA +noonghunnafinalarabic;FB9F +noonhehinitialarabic;FEE7 FEEC +nooninitialarabic;FEE7 +noonjeeminitialarabic;FCD2 +noonjeemisolatedarabic;FC4B +noonmedialarabic;FEE8 +noonmeeminitialarabic;FCD5 +noonmeemisolatedarabic;FC4E +noonnoonfinalarabic;FC8D +notcontains;220C +notelement;2209 +notelementof;2209 +notequal;2260 +notgreater;226F +notgreaternorequal;2271 +notgreaternorless;2279 +notidentical;2262 +notless;226E +notlessnorequal;2270 +notparallel;2226 +notprecedes;2280 +notsubset;2284 +notsucceeds;2281 +notsuperset;2285 +nowarmenian;0576 +nparen;24A9 +nssquare;33B1 +nsuperior;207F +ntilde;00F1 +nu;03BD +nuhiragana;306C +nukatakana;30CC +nukatakanahalfwidth;FF87 +nuktabengali;09BC +nuktadeva;093C +nuktagujarati;0ABC +nuktagurmukhi;0A3C +numbersign;0023 +numbersignmonospace;FF03 +numbersignsmall;FE5F +numeralsigngreek;0374 +numeralsignlowergreek;0375 +numero;2116 +nun;05E0 +nundagesh;FB40 +nundageshhebrew;FB40 +nunhebrew;05E0 +nvsquare;33B5 +nwsquare;33BB +nyabengali;099E +nyadeva;091E +nyagujarati;0A9E +nyagurmukhi;0A1E +o;006F +oacute;00F3 +oangthai;0E2D +obarred;0275 +obarredcyrillic;04E9 +obarreddieresiscyrillic;04EB +obengali;0993 +obopomofo;311B +obreve;014F +ocandradeva;0911 +ocandragujarati;0A91 +ocandravowelsigndeva;0949 +ocandravowelsigngujarati;0AC9 +ocaron;01D2 +ocircle;24DE +ocircumflex;00F4 +ocircumflexacute;1ED1 +ocircumflexdotbelow;1ED9 +ocircumflexgrave;1ED3 +ocircumflexhookabove;1ED5 +ocircumflextilde;1ED7 +ocyrillic;043E +odblacute;0151 +odblgrave;020D +odeva;0913 +odieresis;00F6 +odieresiscyrillic;04E7 +odotbelow;1ECD +oe;0153 +oekorean;315A +ogonek;02DB +ogonekcmb;0328 +ograve;00F2 +ogujarati;0A93 +oharmenian;0585 +ohiragana;304A +ohookabove;1ECF +ohorn;01A1 +ohornacute;1EDB +ohorndotbelow;1EE3 +ohorngrave;1EDD +ohornhookabove;1EDF +ohorntilde;1EE1 +ohungarumlaut;0151 +oi;01A3 +oinvertedbreve;020F +okatakana;30AA +okatakanahalfwidth;FF75 +okorean;3157 +olehebrew;05AB +omacron;014D +omacronacute;1E53 +omacrongrave;1E51 +omdeva;0950 +omega;03C9 +omega1;03D6 +omegacyrillic;0461 +omegalatinclosed;0277 +omegaroundcyrillic;047B +omegatitlocyrillic;047D +omegatonos;03CE +omgujarati;0AD0 +omicron;03BF +omicrontonos;03CC +omonospace;FF4F +one;0031 +onearabic;0661 +onebengali;09E7 +onecircle;2460 +onecircleinversesansserif;278A +onedeva;0967 +onedotenleader;2024 +oneeighth;215B +onefitted;F6DC +onegujarati;0AE7 +onegurmukhi;0A67 +onehackarabic;0661 +onehalf;00BD +onehangzhou;3021 +oneideographicparen;3220 +oneinferior;2081 +onemonospace;FF11 +onenumeratorbengali;09F4 +oneoldstyle;F731 +oneparen;2474 +oneperiod;2488 +onepersian;06F1 +onequarter;00BC +oneroman;2170 +onesuperior;00B9 +onethai;0E51 +onethird;2153 +oogonek;01EB +oogonekmacron;01ED +oogurmukhi;0A13 +oomatragurmukhi;0A4B +oopen;0254 +oparen;24AA +openbullet;25E6 +option;2325 +ordfeminine;00AA +ordmasculine;00BA +orthogonal;221F +oshortdeva;0912 +oshortvowelsigndeva;094A +oslash;00F8 +oslashacute;01FF +osmallhiragana;3049 +osmallkatakana;30A9 +osmallkatakanahalfwidth;FF6B +ostrokeacute;01FF +osuperior;F6F0 +otcyrillic;047F +otilde;00F5 +otildeacute;1E4D +otildedieresis;1E4F +oubopomofo;3121 +overline;203E +overlinecenterline;FE4A +overlinecmb;0305 +overlinedashed;FE49 +overlinedblwavy;FE4C +overlinewavy;FE4B +overscore;00AF +ovowelsignbengali;09CB +ovowelsigndeva;094B +ovowelsigngujarati;0ACB +p;0070 +paampssquare;3380 +paasentosquare;332B +pabengali;09AA +pacute;1E55 +padeva;092A +pagedown;21DF +pageup;21DE +pagujarati;0AAA +pagurmukhi;0A2A +pahiragana;3071 +paiyannoithai;0E2F +pakatakana;30D1 +palatalizationcyrilliccmb;0484 +palochkacyrillic;04C0 +pansioskorean;317F +paragraph;00B6 +parallel;2225 +parenleft;0028 +parenleftaltonearabic;FD3E +parenleftbt;F8ED +parenleftex;F8EC +parenleftinferior;208D +parenleftmonospace;FF08 +parenleftsmall;FE59 +parenleftsuperior;207D +parenlefttp;F8EB +parenleftvertical;FE35 +parenright;0029 +parenrightaltonearabic;FD3F +parenrightbt;F8F8 +parenrightex;F8F7 +parenrightinferior;208E +parenrightmonospace;FF09 +parenrightsmall;FE5A +parenrightsuperior;207E +parenrighttp;F8F6 +parenrightvertical;FE36 +partialdiff;2202 +paseqhebrew;05C0 +pashtahebrew;0599 +pasquare;33A9 +patah;05B7 +patah11;05B7 +patah1d;05B7 +patah2a;05B7 +patahhebrew;05B7 +patahnarrowhebrew;05B7 +patahquarterhebrew;05B7 +patahwidehebrew;05B7 +pazerhebrew;05A1 +pbopomofo;3106 +pcircle;24DF +pdotaccent;1E57 +pe;05E4 +pecyrillic;043F +pedagesh;FB44 +pedageshhebrew;FB44 +peezisquare;333B +pefinaldageshhebrew;FB43 +peharabic;067E +peharmenian;057A +pehebrew;05E4 +pehfinalarabic;FB57 +pehinitialarabic;FB58 +pehiragana;307A +pehmedialarabic;FB59 +pekatakana;30DA +pemiddlehookcyrillic;04A7 +perafehebrew;FB4E +percent;0025 +percentarabic;066A +percentmonospace;FF05 +percentsmall;FE6A +period;002E +periodarmenian;0589 +periodcentered;00B7 +periodhalfwidth;FF61 +periodinferior;F6E7 +periodmonospace;FF0E +periodsmall;FE52 +periodsuperior;F6E8 +perispomenigreekcmb;0342 +perpendicular;22A5 +perthousand;2030 +peseta;20A7 +pfsquare;338A +phabengali;09AB +phadeva;092B +phagujarati;0AAB +phagurmukhi;0A2B +phi;03C6 +phi1;03D5 +phieuphacirclekorean;327A +phieuphaparenkorean;321A +phieuphcirclekorean;326C +phieuphkorean;314D +phieuphparenkorean;320C +philatin;0278 +phinthuthai;0E3A +phisymbolgreek;03D5 +phook;01A5 +phophanthai;0E1E +phophungthai;0E1C +phosamphaothai;0E20 +pi;03C0 +pieupacirclekorean;3273 +pieupaparenkorean;3213 +pieupcieuckorean;3176 +pieupcirclekorean;3265 +pieupkiyeokkorean;3172 +pieupkorean;3142 +pieupparenkorean;3205 +pieupsioskiyeokkorean;3174 +pieupsioskorean;3144 +pieupsiostikeutkorean;3175 +pieupthieuthkorean;3177 +pieuptikeutkorean;3173 +pihiragana;3074 +pikatakana;30D4 +pisymbolgreek;03D6 +piwrarmenian;0583 +plus;002B +plusbelowcmb;031F +pluscircle;2295 +plusminus;00B1 +plusmod;02D6 +plusmonospace;FF0B +plussmall;FE62 +plussuperior;207A +pmonospace;FF50 +pmsquare;33D8 +pohiragana;307D +pointingindexdownwhite;261F +pointingindexleftwhite;261C +pointingindexrightwhite;261E +pointingindexupwhite;261D +pokatakana;30DD +poplathai;0E1B +postalmark;3012 +postalmarkface;3020 +pparen;24AB +precedes;227A +prescription;211E +primemod;02B9 +primereversed;2035 +product;220F +projective;2305 +prolongedkana;30FC +propellor;2318 +propersubset;2282 +propersuperset;2283 +proportion;2237 +proportional;221D +psi;03C8 +psicyrillic;0471 +psilipneumatacyrilliccmb;0486 +pssquare;33B0 +puhiragana;3077 +pukatakana;30D7 +pvsquare;33B4 +pwsquare;33BA +q;0071 +qadeva;0958 +qadmahebrew;05A8 +qafarabic;0642 +qaffinalarabic;FED6 +qafinitialarabic;FED7 +qafmedialarabic;FED8 +qamats;05B8 +qamats10;05B8 +qamats1a;05B8 +qamats1c;05B8 +qamats27;05B8 +qamats29;05B8 +qamats33;05B8 +qamatsde;05B8 +qamatshebrew;05B8 +qamatsnarrowhebrew;05B8 +qamatsqatanhebrew;05B8 +qamatsqatannarrowhebrew;05B8 +qamatsqatanquarterhebrew;05B8 +qamatsqatanwidehebrew;05B8 +qamatsquarterhebrew;05B8 +qamatswidehebrew;05B8 +qarneyparahebrew;059F +qbopomofo;3111 +qcircle;24E0 +qhook;02A0 +qmonospace;FF51 +qof;05E7 +qofdagesh;FB47 +qofdageshhebrew;FB47 +qofhatafpatah;05E7 05B2 +qofhatafpatahhebrew;05E7 05B2 +qofhatafsegol;05E7 05B1 +qofhatafsegolhebrew;05E7 05B1 +qofhebrew;05E7 +qofhiriq;05E7 05B4 +qofhiriqhebrew;05E7 05B4 +qofholam;05E7 05B9 +qofholamhebrew;05E7 05B9 +qofpatah;05E7 05B7 +qofpatahhebrew;05E7 05B7 +qofqamats;05E7 05B8 +qofqamatshebrew;05E7 05B8 +qofqubuts;05E7 05BB +qofqubutshebrew;05E7 05BB +qofsegol;05E7 05B6 +qofsegolhebrew;05E7 05B6 +qofsheva;05E7 05B0 +qofshevahebrew;05E7 05B0 +qoftsere;05E7 05B5 +qoftserehebrew;05E7 05B5 +qparen;24AC +quarternote;2669 +qubuts;05BB +qubuts18;05BB +qubuts25;05BB +qubuts31;05BB +qubutshebrew;05BB +qubutsnarrowhebrew;05BB +qubutsquarterhebrew;05BB +qubutswidehebrew;05BB +question;003F +questionarabic;061F +questionarmenian;055E +questiondown;00BF +questiondownsmall;F7BF +questiongreek;037E +questionmonospace;FF1F +questionsmall;F73F +quotedbl;0022 +quotedblbase;201E +quotedblleft;201C +quotedblmonospace;FF02 +quotedblprime;301E +quotedblprimereversed;301D +quotedblright;201D +quoteleft;2018 +quoteleftreversed;201B +quotereversed;201B +quoteright;2019 +quoterightn;0149 +quotesinglbase;201A +quotesingle;0027 +quotesinglemonospace;FF07 +r;0072 +raarmenian;057C +rabengali;09B0 +racute;0155 +radeva;0930 +radical;221A +radicalex;F8E5 +radoverssquare;33AE +radoverssquaredsquare;33AF +radsquare;33AD +rafe;05BF +rafehebrew;05BF +ragujarati;0AB0 +ragurmukhi;0A30 +rahiragana;3089 +rakatakana;30E9 +rakatakanahalfwidth;FF97 +ralowerdiagonalbengali;09F1 +ramiddlediagonalbengali;09F0 +ramshorn;0264 +ratio;2236 +rbopomofo;3116 +rcaron;0159 +rcedilla;0157 +rcircle;24E1 +rcommaaccent;0157 +rdblgrave;0211 +rdotaccent;1E59 +rdotbelow;1E5B +rdotbelowmacron;1E5D +referencemark;203B +reflexsubset;2286 +reflexsuperset;2287 +registered;00AE +registersans;F8E8 +registerserif;F6DA +reharabic;0631 +reharmenian;0580 +rehfinalarabic;FEAE +rehiragana;308C +rehyehaleflamarabic;0631 FEF3 FE8E 0644 +rekatakana;30EC +rekatakanahalfwidth;FF9A +resh;05E8 +reshdageshhebrew;FB48 +reshhatafpatah;05E8 05B2 +reshhatafpatahhebrew;05E8 05B2 +reshhatafsegol;05E8 05B1 +reshhatafsegolhebrew;05E8 05B1 +reshhebrew;05E8 +reshhiriq;05E8 05B4 +reshhiriqhebrew;05E8 05B4 +reshholam;05E8 05B9 +reshholamhebrew;05E8 05B9 +reshpatah;05E8 05B7 +reshpatahhebrew;05E8 05B7 +reshqamats;05E8 05B8 +reshqamatshebrew;05E8 05B8 +reshqubuts;05E8 05BB +reshqubutshebrew;05E8 05BB +reshsegol;05E8 05B6 +reshsegolhebrew;05E8 05B6 +reshsheva;05E8 05B0 +reshshevahebrew;05E8 05B0 +reshtsere;05E8 05B5 +reshtserehebrew;05E8 05B5 +reversedtilde;223D +reviahebrew;0597 +reviamugrashhebrew;0597 +revlogicalnot;2310 +rfishhook;027E +rfishhookreversed;027F +rhabengali;09DD +rhadeva;095D +rho;03C1 +rhook;027D +rhookturned;027B +rhookturnedsuperior;02B5 +rhosymbolgreek;03F1 +rhotichookmod;02DE +rieulacirclekorean;3271 +rieulaparenkorean;3211 +rieulcirclekorean;3263 +rieulhieuhkorean;3140 +rieulkiyeokkorean;313A +rieulkiyeoksioskorean;3169 +rieulkorean;3139 +rieulmieumkorean;313B +rieulpansioskorean;316C +rieulparenkorean;3203 +rieulphieuphkorean;313F +rieulpieupkorean;313C +rieulpieupsioskorean;316B +rieulsioskorean;313D +rieulthieuthkorean;313E +rieultikeutkorean;316A +rieulyeorinhieuhkorean;316D +rightangle;221F +righttackbelowcmb;0319 +righttriangle;22BF +rihiragana;308A +rikatakana;30EA +rikatakanahalfwidth;FF98 +ring;02DA +ringbelowcmb;0325 +ringcmb;030A +ringhalfleft;02BF +ringhalfleftarmenian;0559 +ringhalfleftbelowcmb;031C +ringhalfleftcentered;02D3 +ringhalfright;02BE +ringhalfrightbelowcmb;0339 +ringhalfrightcentered;02D2 +rinvertedbreve;0213 +rittorusquare;3351 +rlinebelow;1E5F +rlongleg;027C +rlonglegturned;027A +rmonospace;FF52 +rohiragana;308D +rokatakana;30ED +rokatakanahalfwidth;FF9B +roruathai;0E23 +rparen;24AD +rrabengali;09DC +rradeva;0931 +rragurmukhi;0A5C +rreharabic;0691 +rrehfinalarabic;FB8D +rrvocalicbengali;09E0 +rrvocalicdeva;0960 +rrvocalicgujarati;0AE0 +rrvocalicvowelsignbengali;09C4 +rrvocalicvowelsigndeva;0944 +rrvocalicvowelsigngujarati;0AC4 +rsuperior;F6F1 +rtblock;2590 +rturned;0279 +rturnedsuperior;02B4 +ruhiragana;308B +rukatakana;30EB +rukatakanahalfwidth;FF99 +rupeemarkbengali;09F2 +rupeesignbengali;09F3 +rupiah;F6DD +ruthai;0E24 +rvocalicbengali;098B +rvocalicdeva;090B +rvocalicgujarati;0A8B +rvocalicvowelsignbengali;09C3 +rvocalicvowelsigndeva;0943 +rvocalicvowelsigngujarati;0AC3 +s;0073 +sabengali;09B8 +sacute;015B +sacutedotaccent;1E65 +sadarabic;0635 +sadeva;0938 +sadfinalarabic;FEBA +sadinitialarabic;FEBB +sadmedialarabic;FEBC +sagujarati;0AB8 +sagurmukhi;0A38 +sahiragana;3055 +sakatakana;30B5 +sakatakanahalfwidth;FF7B +sallallahoualayhewasallamarabic;FDFA +samekh;05E1 +samekhdagesh;FB41 +samekhdageshhebrew;FB41 +samekhhebrew;05E1 +saraaathai;0E32 +saraaethai;0E41 +saraaimaimalaithai;0E44 +saraaimaimuanthai;0E43 +saraamthai;0E33 +saraathai;0E30 +saraethai;0E40 +saraiileftthai;F886 +saraiithai;0E35 +saraileftthai;F885 +saraithai;0E34 +saraothai;0E42 +saraueeleftthai;F888 +saraueethai;0E37 +saraueleftthai;F887 +sarauethai;0E36 +sarauthai;0E38 +sarauuthai;0E39 +sbopomofo;3119 +scaron;0161 +scarondotaccent;1E67 +scedilla;015F +schwa;0259 +schwacyrillic;04D9 +schwadieresiscyrillic;04DB +schwahook;025A +scircle;24E2 +scircumflex;015D +scommaaccent;0219 +sdotaccent;1E61 +sdotbelow;1E63 +sdotbelowdotaccent;1E69 +seagullbelowcmb;033C +second;2033 +secondtonechinese;02CA +section;00A7 +seenarabic;0633 +seenfinalarabic;FEB2 +seeninitialarabic;FEB3 +seenmedialarabic;FEB4 +segol;05B6 +segol13;05B6 +segol1f;05B6 +segol2c;05B6 +segolhebrew;05B6 +segolnarrowhebrew;05B6 +segolquarterhebrew;05B6 +segoltahebrew;0592 +segolwidehebrew;05B6 +seharmenian;057D +sehiragana;305B +sekatakana;30BB +sekatakanahalfwidth;FF7E +semicolon;003B +semicolonarabic;061B +semicolonmonospace;FF1B +semicolonsmall;FE54 +semivoicedmarkkana;309C +semivoicedmarkkanahalfwidth;FF9F +sentisquare;3322 +sentosquare;3323 +seven;0037 +sevenarabic;0667 +sevenbengali;09ED +sevencircle;2466 +sevencircleinversesansserif;2790 +sevendeva;096D +seveneighths;215E +sevengujarati;0AED +sevengurmukhi;0A6D +sevenhackarabic;0667 +sevenhangzhou;3027 +sevenideographicparen;3226 +seveninferior;2087 +sevenmonospace;FF17 +sevenoldstyle;F737 +sevenparen;247A +sevenperiod;248E +sevenpersian;06F7 +sevenroman;2176 +sevensuperior;2077 +seventeencircle;2470 +seventeenparen;2484 +seventeenperiod;2498 +seventhai;0E57 +sfthyphen;00AD +shaarmenian;0577 +shabengali;09B6 +shacyrillic;0448 +shaddaarabic;0651 +shaddadammaarabic;FC61 +shaddadammatanarabic;FC5E +shaddafathaarabic;FC60 +shaddafathatanarabic;0651 064B +shaddakasraarabic;FC62 +shaddakasratanarabic;FC5F +shade;2592 +shadedark;2593 +shadelight;2591 +shademedium;2592 +shadeva;0936 +shagujarati;0AB6 +shagurmukhi;0A36 +shalshelethebrew;0593 +shbopomofo;3115 +shchacyrillic;0449 +sheenarabic;0634 +sheenfinalarabic;FEB6 +sheeninitialarabic;FEB7 +sheenmedialarabic;FEB8 +sheicoptic;03E3 +sheqel;20AA +sheqelhebrew;20AA +sheva;05B0 +sheva115;05B0 +sheva15;05B0 +sheva22;05B0 +sheva2e;05B0 +shevahebrew;05B0 +shevanarrowhebrew;05B0 +shevaquarterhebrew;05B0 +shevawidehebrew;05B0 +shhacyrillic;04BB +shimacoptic;03ED +shin;05E9 +shindagesh;FB49 +shindageshhebrew;FB49 +shindageshshindot;FB2C +shindageshshindothebrew;FB2C +shindageshsindot;FB2D +shindageshsindothebrew;FB2D +shindothebrew;05C1 +shinhebrew;05E9 +shinshindot;FB2A +shinshindothebrew;FB2A +shinsindot;FB2B +shinsindothebrew;FB2B +shook;0282 +sigma;03C3 +sigma1;03C2 +sigmafinal;03C2 +sigmalunatesymbolgreek;03F2 +sihiragana;3057 +sikatakana;30B7 +sikatakanahalfwidth;FF7C +siluqhebrew;05BD +siluqlefthebrew;05BD +similar;223C +sindothebrew;05C2 +siosacirclekorean;3274 +siosaparenkorean;3214 +sioscieuckorean;317E +sioscirclekorean;3266 +sioskiyeokkorean;317A +sioskorean;3145 +siosnieunkorean;317B +siosparenkorean;3206 +siospieupkorean;317D +siostikeutkorean;317C +six;0036 +sixarabic;0666 +sixbengali;09EC +sixcircle;2465 +sixcircleinversesansserif;278F +sixdeva;096C +sixgujarati;0AEC +sixgurmukhi;0A6C +sixhackarabic;0666 +sixhangzhou;3026 +sixideographicparen;3225 +sixinferior;2086 +sixmonospace;FF16 +sixoldstyle;F736 +sixparen;2479 +sixperiod;248D +sixpersian;06F6 +sixroman;2175 +sixsuperior;2076 +sixteencircle;246F +sixteencurrencydenominatorbengali;09F9 +sixteenparen;2483 +sixteenperiod;2497 +sixthai;0E56 +slash;002F +slashmonospace;FF0F +slong;017F +slongdotaccent;1E9B +smileface;263A +smonospace;FF53 +sofpasuqhebrew;05C3 +softhyphen;00AD +softsigncyrillic;044C +sohiragana;305D +sokatakana;30BD +sokatakanahalfwidth;FF7F +soliduslongoverlaycmb;0338 +solidusshortoverlaycmb;0337 +sorusithai;0E29 +sosalathai;0E28 +sosothai;0E0B +sosuathai;0E2A +space;0020 +spacehackarabic;0020 +spade;2660 +spadesuitblack;2660 +spadesuitwhite;2664 +sparen;24AE +squarebelowcmb;033B +squarecc;33C4 +squarecm;339D +squarediagonalcrosshatchfill;25A9 +squarehorizontalfill;25A4 +squarekg;338F +squarekm;339E +squarekmcapital;33CE +squareln;33D1 +squarelog;33D2 +squaremg;338E +squaremil;33D5 +squaremm;339C +squaremsquared;33A1 +squareorthogonalcrosshatchfill;25A6 +squareupperlefttolowerrightfill;25A7 +squareupperrighttolowerleftfill;25A8 +squareverticalfill;25A5 +squarewhitewithsmallblack;25A3 +srsquare;33DB +ssabengali;09B7 +ssadeva;0937 +ssagujarati;0AB7 +ssangcieuckorean;3149 +ssanghieuhkorean;3185 +ssangieungkorean;3180 +ssangkiyeokkorean;3132 +ssangnieunkorean;3165 +ssangpieupkorean;3143 +ssangsioskorean;3146 +ssangtikeutkorean;3138 +ssuperior;F6F2 +sterling;00A3 +sterlingmonospace;FFE1 +strokelongoverlaycmb;0336 +strokeshortoverlaycmb;0335 +subset;2282 +subsetnotequal;228A +subsetorequal;2286 +succeeds;227B +suchthat;220B +suhiragana;3059 +sukatakana;30B9 +sukatakanahalfwidth;FF7D +sukunarabic;0652 +summation;2211 +sun;263C +superset;2283 +supersetnotequal;228B +supersetorequal;2287 +svsquare;33DC +syouwaerasquare;337C +t;0074 +tabengali;09A4 +tackdown;22A4 +tackleft;22A3 +tadeva;0924 +tagujarati;0AA4 +tagurmukhi;0A24 +taharabic;0637 +tahfinalarabic;FEC2 +tahinitialarabic;FEC3 +tahiragana;305F +tahmedialarabic;FEC4 +taisyouerasquare;337D +takatakana;30BF +takatakanahalfwidth;FF80 +tatweelarabic;0640 +tau;03C4 +tav;05EA +tavdages;FB4A +tavdagesh;FB4A +tavdageshhebrew;FB4A +tavhebrew;05EA +tbar;0167 +tbopomofo;310A +tcaron;0165 +tccurl;02A8 +tcedilla;0163 +tcheharabic;0686 +tchehfinalarabic;FB7B +tchehinitialarabic;FB7C +tchehmedialarabic;FB7D +tchehmeeminitialarabic;FB7C FEE4 +tcircle;24E3 +tcircumflexbelow;1E71 +tcommaaccent;0163 +tdieresis;1E97 +tdotaccent;1E6B +tdotbelow;1E6D +tecyrillic;0442 +tedescendercyrillic;04AD +teharabic;062A +tehfinalarabic;FE96 +tehhahinitialarabic;FCA2 +tehhahisolatedarabic;FC0C +tehinitialarabic;FE97 +tehiragana;3066 +tehjeeminitialarabic;FCA1 +tehjeemisolatedarabic;FC0B +tehmarbutaarabic;0629 +tehmarbutafinalarabic;FE94 +tehmedialarabic;FE98 +tehmeeminitialarabic;FCA4 +tehmeemisolatedarabic;FC0E +tehnoonfinalarabic;FC73 +tekatakana;30C6 +tekatakanahalfwidth;FF83 +telephone;2121 +telephoneblack;260E +telishagedolahebrew;05A0 +telishaqetanahebrew;05A9 +tencircle;2469 +tenideographicparen;3229 +tenparen;247D +tenperiod;2491 +tenroman;2179 +tesh;02A7 +tet;05D8 +tetdagesh;FB38 +tetdageshhebrew;FB38 +tethebrew;05D8 +tetsecyrillic;04B5 +tevirhebrew;059B +tevirlefthebrew;059B +thabengali;09A5 +thadeva;0925 +thagujarati;0AA5 +thagurmukhi;0A25 +thalarabic;0630 +thalfinalarabic;FEAC +thanthakhatlowleftthai;F898 +thanthakhatlowrightthai;F897 +thanthakhatthai;0E4C +thanthakhatupperleftthai;F896 +theharabic;062B +thehfinalarabic;FE9A +thehinitialarabic;FE9B +thehmedialarabic;FE9C +thereexists;2203 +therefore;2234 +theta;03B8 +theta1;03D1 +thetasymbolgreek;03D1 +thieuthacirclekorean;3279 +thieuthaparenkorean;3219 +thieuthcirclekorean;326B +thieuthkorean;314C +thieuthparenkorean;320B +thirteencircle;246C +thirteenparen;2480 +thirteenperiod;2494 +thonangmonthothai;0E11 +thook;01AD +thophuthaothai;0E12 +thorn;00FE +thothahanthai;0E17 +thothanthai;0E10 +thothongthai;0E18 +thothungthai;0E16 +thousandcyrillic;0482 +thousandsseparatorarabic;066C +thousandsseparatorpersian;066C +three;0033 +threearabic;0663 +threebengali;09E9 +threecircle;2462 +threecircleinversesansserif;278C +threedeva;0969 +threeeighths;215C +threegujarati;0AE9 +threegurmukhi;0A69 +threehackarabic;0663 +threehangzhou;3023 +threeideographicparen;3222 +threeinferior;2083 +threemonospace;FF13 +threenumeratorbengali;09F6 +threeoldstyle;F733 +threeparen;2476 +threeperiod;248A +threepersian;06F3 +threequarters;00BE +threequartersemdash;F6DE +threeroman;2172 +threesuperior;00B3 +threethai;0E53 +thzsquare;3394 +tihiragana;3061 +tikatakana;30C1 +tikatakanahalfwidth;FF81 +tikeutacirclekorean;3270 +tikeutaparenkorean;3210 +tikeutcirclekorean;3262 +tikeutkorean;3137 +tikeutparenkorean;3202 +tilde;02DC +tildebelowcmb;0330 +tildecmb;0303 +tildecomb;0303 +tildedoublecmb;0360 +tildeoperator;223C +tildeoverlaycmb;0334 +tildeverticalcmb;033E +timescircle;2297 +tipehahebrew;0596 +tipehalefthebrew;0596 +tippigurmukhi;0A70 +titlocyrilliccmb;0483 +tiwnarmenian;057F +tlinebelow;1E6F +tmonospace;FF54 +toarmenian;0569 +tohiragana;3068 +tokatakana;30C8 +tokatakanahalfwidth;FF84 +tonebarextrahighmod;02E5 +tonebarextralowmod;02E9 +tonebarhighmod;02E6 +tonebarlowmod;02E8 +tonebarmidmod;02E7 +tonefive;01BD +tonesix;0185 +tonetwo;01A8 +tonos;0384 +tonsquare;3327 +topatakthai;0E0F +tortoiseshellbracketleft;3014 +tortoiseshellbracketleftsmall;FE5D +tortoiseshellbracketleftvertical;FE39 +tortoiseshellbracketright;3015 +tortoiseshellbracketrightsmall;FE5E +tortoiseshellbracketrightvertical;FE3A +totaothai;0E15 +tpalatalhook;01AB +tparen;24AF +trademark;2122 +trademarksans;F8EA +trademarkserif;F6DB +tretroflexhook;0288 +triagdn;25BC +triaglf;25C4 +triagrt;25BA +triagup;25B2 +ts;02A6 +tsadi;05E6 +tsadidagesh;FB46 +tsadidageshhebrew;FB46 +tsadihebrew;05E6 +tsecyrillic;0446 +tsere;05B5 +tsere12;05B5 +tsere1e;05B5 +tsere2b;05B5 +tserehebrew;05B5 +tserenarrowhebrew;05B5 +tserequarterhebrew;05B5 +tserewidehebrew;05B5 +tshecyrillic;045B +tsuperior;F6F3 +ttabengali;099F +ttadeva;091F +ttagujarati;0A9F +ttagurmukhi;0A1F +tteharabic;0679 +ttehfinalarabic;FB67 +ttehinitialarabic;FB68 +ttehmedialarabic;FB69 +tthabengali;09A0 +tthadeva;0920 +tthagujarati;0AA0 +tthagurmukhi;0A20 +tturned;0287 +tuhiragana;3064 +tukatakana;30C4 +tukatakanahalfwidth;FF82 +tusmallhiragana;3063 +tusmallkatakana;30C3 +tusmallkatakanahalfwidth;FF6F +twelvecircle;246B +twelveparen;247F +twelveperiod;2493 +twelveroman;217B +twentycircle;2473 +twentyhangzhou;5344 +twentyparen;2487 +twentyperiod;249B +two;0032 +twoarabic;0662 +twobengali;09E8 +twocircle;2461 +twocircleinversesansserif;278B +twodeva;0968 +twodotenleader;2025 +twodotleader;2025 +twodotleadervertical;FE30 +twogujarati;0AE8 +twogurmukhi;0A68 +twohackarabic;0662 +twohangzhou;3022 +twoideographicparen;3221 +twoinferior;2082 +twomonospace;FF12 +twonumeratorbengali;09F5 +twooldstyle;F732 +twoparen;2475 +twoperiod;2489 +twopersian;06F2 +tworoman;2171 +twostroke;01BB +twosuperior;00B2 +twothai;0E52 +twothirds;2154 +u;0075 +uacute;00FA +ubar;0289 +ubengali;0989 +ubopomofo;3128 +ubreve;016D +ucaron;01D4 +ucircle;24E4 +ucircumflex;00FB +ucircumflexbelow;1E77 +ucyrillic;0443 +udattadeva;0951 +udblacute;0171 +udblgrave;0215 +udeva;0909 +udieresis;00FC +udieresisacute;01D8 +udieresisbelow;1E73 +udieresiscaron;01DA +udieresiscyrillic;04F1 +udieresisgrave;01DC +udieresismacron;01D6 +udotbelow;1EE5 +ugrave;00F9 +ugujarati;0A89 +ugurmukhi;0A09 +uhiragana;3046 +uhookabove;1EE7 +uhorn;01B0 +uhornacute;1EE9 +uhorndotbelow;1EF1 +uhorngrave;1EEB +uhornhookabove;1EED +uhorntilde;1EEF +uhungarumlaut;0171 +uhungarumlautcyrillic;04F3 +uinvertedbreve;0217 +ukatakana;30A6 +ukatakanahalfwidth;FF73 +ukcyrillic;0479 +ukorean;315C +umacron;016B +umacroncyrillic;04EF +umacrondieresis;1E7B +umatragurmukhi;0A41 +umonospace;FF55 +underscore;005F +underscoredbl;2017 +underscoremonospace;FF3F +underscorevertical;FE33 +underscorewavy;FE4F +union;222A +universal;2200 +uogonek;0173 +uparen;24B0 +upblock;2580 +upperdothebrew;05C4 +upsilon;03C5 +upsilondieresis;03CB +upsilondieresistonos;03B0 +upsilonlatin;028A +upsilontonos;03CD +uptackbelowcmb;031D +uptackmod;02D4 +uragurmukhi;0A73 +uring;016F +ushortcyrillic;045E +usmallhiragana;3045 +usmallkatakana;30A5 +usmallkatakanahalfwidth;FF69 +ustraightcyrillic;04AF +ustraightstrokecyrillic;04B1 +utilde;0169 +utildeacute;1E79 +utildebelow;1E75 +uubengali;098A +uudeva;090A +uugujarati;0A8A +uugurmukhi;0A0A +uumatragurmukhi;0A42 +uuvowelsignbengali;09C2 +uuvowelsigndeva;0942 +uuvowelsigngujarati;0AC2 +uvowelsignbengali;09C1 +uvowelsigndeva;0941 +uvowelsigngujarati;0AC1 +v;0076 +vadeva;0935 +vagujarati;0AB5 +vagurmukhi;0A35 +vakatakana;30F7 +vav;05D5 +vavdagesh;FB35 +vavdagesh65;FB35 +vavdageshhebrew;FB35 +vavhebrew;05D5 +vavholam;FB4B +vavholamhebrew;FB4B +vavvavhebrew;05F0 +vavyodhebrew;05F1 +vcircle;24E5 +vdotbelow;1E7F +vecyrillic;0432 +veharabic;06A4 +vehfinalarabic;FB6B +vehinitialarabic;FB6C +vehmedialarabic;FB6D +vekatakana;30F9 +venus;2640 +verticalbar;007C +verticallineabovecmb;030D +verticallinebelowcmb;0329 +verticallinelowmod;02CC +verticallinemod;02C8 +vewarmenian;057E +vhook;028B +vikatakana;30F8 +viramabengali;09CD +viramadeva;094D +viramagujarati;0ACD +visargabengali;0983 +visargadeva;0903 +visargagujarati;0A83 +vmonospace;FF56 +voarmenian;0578 +voicediterationhiragana;309E +voicediterationkatakana;30FE +voicedmarkkana;309B +voicedmarkkanahalfwidth;FF9E +vokatakana;30FA +vparen;24B1 +vtilde;1E7D +vturned;028C +vuhiragana;3094 +vukatakana;30F4 +w;0077 +wacute;1E83 +waekorean;3159 +wahiragana;308F +wakatakana;30EF +wakatakanahalfwidth;FF9C +wakorean;3158 +wasmallhiragana;308E +wasmallkatakana;30EE +wattosquare;3357 +wavedash;301C +wavyunderscorevertical;FE34 +wawarabic;0648 +wawfinalarabic;FEEE +wawhamzaabovearabic;0624 +wawhamzaabovefinalarabic;FE86 +wbsquare;33DD +wcircle;24E6 +wcircumflex;0175 +wdieresis;1E85 +wdotaccent;1E87 +wdotbelow;1E89 +wehiragana;3091 +weierstrass;2118 +wekatakana;30F1 +wekorean;315E +weokorean;315D +wgrave;1E81 +whitebullet;25E6 +whitecircle;25CB +whitecircleinverse;25D9 +whitecornerbracketleft;300E +whitecornerbracketleftvertical;FE43 +whitecornerbracketright;300F +whitecornerbracketrightvertical;FE44 +whitediamond;25C7 +whitediamondcontainingblacksmalldiamond;25C8 +whitedownpointingsmalltriangle;25BF +whitedownpointingtriangle;25BD +whiteleftpointingsmalltriangle;25C3 +whiteleftpointingtriangle;25C1 +whitelenticularbracketleft;3016 +whitelenticularbracketright;3017 +whiterightpointingsmalltriangle;25B9 +whiterightpointingtriangle;25B7 +whitesmallsquare;25AB +whitesmilingface;263A +whitesquare;25A1 +whitestar;2606 +whitetelephone;260F +whitetortoiseshellbracketleft;3018 +whitetortoiseshellbracketright;3019 +whiteuppointingsmalltriangle;25B5 +whiteuppointingtriangle;25B3 +wihiragana;3090 +wikatakana;30F0 +wikorean;315F +wmonospace;FF57 +wohiragana;3092 +wokatakana;30F2 +wokatakanahalfwidth;FF66 +won;20A9 +wonmonospace;FFE6 +wowaenthai;0E27 +wparen;24B2 +wring;1E98 +wsuperior;02B7 +wturned;028D +wynn;01BF +x;0078 +xabovecmb;033D +xbopomofo;3112 +xcircle;24E7 +xdieresis;1E8D +xdotaccent;1E8B +xeharmenian;056D +xi;03BE +xmonospace;FF58 +xparen;24B3 +xsuperior;02E3 +y;0079 +yaadosquare;334E +yabengali;09AF +yacute;00FD +yadeva;092F +yaekorean;3152 +yagujarati;0AAF +yagurmukhi;0A2F +yahiragana;3084 +yakatakana;30E4 +yakatakanahalfwidth;FF94 +yakorean;3151 +yamakkanthai;0E4E +yasmallhiragana;3083 +yasmallkatakana;30E3 +yasmallkatakanahalfwidth;FF6C +yatcyrillic;0463 +ycircle;24E8 +ycircumflex;0177 +ydieresis;00FF +ydotaccent;1E8F +ydotbelow;1EF5 +yeharabic;064A +yehbarreearabic;06D2 +yehbarreefinalarabic;FBAF +yehfinalarabic;FEF2 +yehhamzaabovearabic;0626 +yehhamzaabovefinalarabic;FE8A +yehhamzaaboveinitialarabic;FE8B +yehhamzaabovemedialarabic;FE8C +yehinitialarabic;FEF3 +yehmedialarabic;FEF4 +yehmeeminitialarabic;FCDD +yehmeemisolatedarabic;FC58 +yehnoonfinalarabic;FC94 +yehthreedotsbelowarabic;06D1 +yekorean;3156 +yen;00A5 +yenmonospace;FFE5 +yeokorean;3155 +yeorinhieuhkorean;3186 +yerahbenyomohebrew;05AA +yerahbenyomolefthebrew;05AA +yericyrillic;044B +yerudieresiscyrillic;04F9 +yesieungkorean;3181 +yesieungpansioskorean;3183 +yesieungsioskorean;3182 +yetivhebrew;059A +ygrave;1EF3 +yhook;01B4 +yhookabove;1EF7 +yiarmenian;0575 +yicyrillic;0457 +yikorean;3162 +yinyang;262F +yiwnarmenian;0582 +ymonospace;FF59 +yod;05D9 +yoddagesh;FB39 +yoddageshhebrew;FB39 +yodhebrew;05D9 +yodyodhebrew;05F2 +yodyodpatahhebrew;FB1F +yohiragana;3088 +yoikorean;3189 +yokatakana;30E8 +yokatakanahalfwidth;FF96 +yokorean;315B +yosmallhiragana;3087 +yosmallkatakana;30E7 +yosmallkatakanahalfwidth;FF6E +yotgreek;03F3 +yoyaekorean;3188 +yoyakorean;3187 +yoyakthai;0E22 +yoyingthai;0E0D +yparen;24B4 +ypogegrammeni;037A +ypogegrammenigreekcmb;0345 +yr;01A6 +yring;1E99 +ysuperior;02B8 +ytilde;1EF9 +yturned;028E +yuhiragana;3086 +yuikorean;318C +yukatakana;30E6 +yukatakanahalfwidth;FF95 +yukorean;3160 +yusbigcyrillic;046B +yusbigiotifiedcyrillic;046D +yuslittlecyrillic;0467 +yuslittleiotifiedcyrillic;0469 +yusmallhiragana;3085 +yusmallkatakana;30E5 +yusmallkatakanahalfwidth;FF6D +yuyekorean;318B +yuyeokorean;318A +yyabengali;09DF +yyadeva;095F +z;007A +zaarmenian;0566 +zacute;017A +zadeva;095B +zagurmukhi;0A5B +zaharabic;0638 +zahfinalarabic;FEC6 +zahinitialarabic;FEC7 +zahiragana;3056 +zahmedialarabic;FEC8 +zainarabic;0632 +zainfinalarabic;FEB0 +zakatakana;30B6 +zaqefgadolhebrew;0595 +zaqefqatanhebrew;0594 +zarqahebrew;0598 +zayin;05D6 +zayindagesh;FB36 +zayindageshhebrew;FB36 +zayinhebrew;05D6 +zbopomofo;3117 +zcaron;017E +zcircle;24E9 +zcircumflex;1E91 +zcurl;0291 +zdot;017C +zdotaccent;017C +zdotbelow;1E93 +zecyrillic;0437 +zedescendercyrillic;0499 +zedieresiscyrillic;04DF +zehiragana;305C +zekatakana;30BC +zero;0030 +zeroarabic;0660 +zerobengali;09E6 +zerodeva;0966 +zerogujarati;0AE6 +zerogurmukhi;0A66 +zerohackarabic;0660 +zeroinferior;2080 +zeromonospace;FF10 +zerooldstyle;F730 +zeropersian;06F0 +zerosuperior;2070 +zerothai;0E50 +zerowidthjoiner;FEFF +zerowidthnonjoiner;200C +zerowidthspace;200B +zeta;03B6 +zhbopomofo;3113 +zhearmenian;056A +zhebrevecyrillic;04C2 +zhecyrillic;0436 +zhedescendercyrillic;0497 +zhedieresiscyrillic;04DD +zihiragana;3058 +zikatakana;30B8 +zinorhebrew;05AE +zlinebelow;1E95 +zmonospace;FF5A +zohiragana;305E +zokatakana;30BE +zparen;24B5 +zretroflexhook;0290 +zstroke;01B6 +zuhiragana;305A +zukatakana;30BA +#--end diff --git a/contrib/media/updf/scripts/jconfig.h b/contrib/media/updf/scripts/jconfig.h new file mode 100644 index 0000000000..679404da4e --- /dev/null +++ b/contrib/media/updf/scripts/jconfig.h @@ -0,0 +1,45 @@ +/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ +/* see jconfig.txt for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Microsoft has setmode() */ +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/contrib/media/updf/scripts/opj_config.h b/contrib/media/updf/scripts/opj_config.h new file mode 100644 index 0000000000..d34edd22a4 --- /dev/null +++ b/contrib/media/updf/scripts/opj_config.h @@ -0,0 +1,41 @@ +/* If you want to build the library manually without using + * 'configure' or 'CMake' + * then copy this file + * 'opj_config.h.in.user' + * to + * 'opj_config.h' + * + * Open 'opj_config.h' and change the file contents + * if you want to define something because you know you have + * BOTH installed the library AND the header file(s). + * Then e.g. write +#define HAVE_LIBPNG 1 + * + * + * The file 'opj_config.h' will be included in some source files. + * ==== YOU CAN NOT COMPILE WITHOUT IT. ==== + * === DO NOT FOREGET TO CHANGE 'config.nix' APPROPRIATELY. ==== +*/ + +/* DO NOT DEFINE BOTH VERSIONS OF LCMS */ +/* define to 1 if you have both liblcms and lcms.h installed */ +#undef HAVE_LIBLCMS1 +/* #define HAVE_LIBLCMS1 1 */ + +/* define to 1 if you have both liblcms2 and lcms2.h installed */ +#undef HAVE_LIBLCMS2 +/* #define HAVE_LIBLCMS2 1 */ + +/* define to 1 if you have both libpng and png.h installed */ +#undef HAVE_LIBPNG +/* #define HAVE_LIBPNG 1 */ + +/* define to 1 if you have both libtiff and tiff.h installed */ +#undef HAVE_LIBTIFF +/* #define HAVE_LIBTIFF 1 */ + +/*---------------- DO NOT CHANGE BELOW THIS LINE ----------------*/ +#define PACKAGE_URL "http://www.openjpeg.org/" +#define PACKAGE_BUGREPORT "http://code.google.com/p/openjpeg/" + +#define PACKAGE_VERSION "1.4.0" diff --git a/contrib/media/updf/scripts/rename.sed b/contrib/media/updf/scripts/rename.sed new file mode 100644 index 0000000000..2949bf9250 --- /dev/null +++ b/contrib/media/updf/scripts/rename.sed @@ -0,0 +1,1135 @@ +s/\<FD_ALLCAP\>/FD_ALL_CAP/g +s/\<FD_FIXED\>/FD_FIXED_PITCH/g +s/\<FD_FORCEBOLD\>/FD_FORCE_BOLD/g +s/\<FD_SMALLCAP\>/FD_SMALL_CAP/g +s/\<FZ_BCOLOR\>/FZ_BLEND_COLOR/g +s/\<FZ_BCOLORBURN\>/FZ_BLEND_COLOR_BURN/g +s/\<FZ_BCOLORDODGE\>/FZ_BLEND_COLOR_DODGE/g +s/\<FZ_BDARKEN\>/FZ_BLEND_DARKEN/g +s/\<FZ_BDIFFERENCE\>/FZ_BLEND_DIFFERENCE/g +s/\<FZ_BEXCLUSION\>/FZ_BLEND_EXCLUSION/g +s/\<FZ_BHARDLIGHT\>/FZ_BLEND_HARD_LIGHT/g +s/\<FZ_BHUE\>/FZ_BLEND_HUE/g +s/\<FZ_BLIGHTEN\>/FZ_BLEND_LIGHTEN/g +s/\<FZ_BLUMINOSITY\>/FZ_BLEND_LUMINOSITY/g +s/\<FZ_BMULTIPLY\>/FZ_BLEND_MULTIPLY/g +s/\<FZ_BNORMAL\>/FZ_BLEND_NORMAL/g +s/\<FZ_BOVERLAY\>/FZ_BLEND_OVERLAY/g +s/\<FZ_BSATURATION\>/FZ_BLEND_SATURATION/g +s/\<FZ_BSCREEN\>/FZ_BLEND_SCREEN/g +s/\<FZ_BSOFTLIGHT\>/FZ_BLEND_SOFT_LIGHT/g +s/\<FZ_CLOSEPATH\>/FZ_CLOSE_PATH/g +s/\<FZ_CMDBEGINGROUP\>/FZ_CMD_BEGIN_GROUP/g +s/\<FZ_CMDBEGINMASK\>/FZ_CMD_BEGIN_MASK/g +s/\<FZ_CMDBEGINTILE\>/FZ_CMD_BEGIN_TILE/g +s/\<FZ_CMDCLIPIMAGEMASK\>/FZ_CMD_CLIP_IMAGE_MASK/g +s/\<FZ_CMDCLIPPATH\>/FZ_CMD_CLIP_PATH/g +s/\<FZ_CMDCLIPSTROKEPATH\>/FZ_CMD_CLIP_STROKE_PATH/g +s/\<FZ_CMDCLIPSTROKETEXT\>/FZ_CMD_CLIP_STROKE_TEXT/g +s/\<FZ_CMDCLIPTEXT\>/FZ_CMD_CLIP_TEXT/g +s/\<FZ_CMDENDGROUP\>/FZ_CMD_END_GROUP/g +s/\<FZ_CMDENDMASK\>/FZ_CMD_END_MASK/g +s/\<FZ_CMDENDTILE\>/FZ_CMD_END_TILE/g +s/\<FZ_CMDFILLIMAGE\>/FZ_CMD_FILL_IMAGE/g +s/\<FZ_CMDFILLIMAGEMASK\>/FZ_CMD_FILL_IMAGE_MASK/g +s/\<FZ_CMDFILLPATH\>/FZ_CMD_FILL_PATH/g +s/\<FZ_CMDFILLSHADE\>/FZ_CMD_FILL_SHADE/g +s/\<FZ_CMDFILLTEXT\>/FZ_CMD_FILL_TEXT/g +s/\<FZ_CMDIGNORETEXT\>/FZ_CMD_IGNORE_TEXT/g +s/\<FZ_CMDPOPCLIP\>/FZ_CMD_POP_CLIP/g +s/\<FZ_CMDSTROKEPATH\>/FZ_CMD_STROKE_PATH/g +s/\<FZ_CMDSTROKETEXT\>/FZ_CMD_STROKE_TEXT/g +s/\<FZ_IGNOREIMAGE\>/FZ_IGNORE_IMAGE/g +s/\<FZ_IGNORESHADE\>/FZ_IGNORE_SHADE/g +s/\<FZ_MAXCOLORS\>/FZ_MAX_COLORS/g +s/\<ISDELIM\>/IS_DELIM/g +s/\<ISHEX\>/IS_HEX/g +s/\<ISNUMBER\>/IS_NUMBER/g +s/\<ISWHITE\>/IS_WHITE/g +s/\<LINECOUNT\>/LINE_COUNT/g +s/\<LINEDIST\>/LINE_DIST/g +s/\<LINELEN\>/LINE_LEN/g +s/\<MAXBITS\>/MAX_BITS/g +s/\<MAXCACHESIZE\>/MAX_CACHE_SIZE/g +s/\<MAXDEPTH\>/MAX_DEPTH/g +s/\<MAXFONTSIZE\>/MAX_FONT_SIZE/g +s/\<MAXGLYPHSIZE\>/MAX_GLYPH_SIZE/g +s/\<MAXKEYLEN\>/MAX_KEY_LEN/g +s/\<MAXLENGTH\>/MAX_LENGTH/g +s/\<MINBITS\>/MIN_BITS/g +s/\<NUMCODES\>/NUM_CODES/g +s/\<PDF_LACTION\>/PDF_LINK_ACTION/g +s/\<PDF_LGOTO\>/PDF_LINK_GOTO/g +s/\<PDF_LLAUNCH\>/PDF_LINK_LAUNCH/g +s/\<PDF_LNAMED\>/PDF_LINK_NAMED/g +s/\<PDF_LURI\>/PDF_LINK_URI/g +s/\<PDF_MCOLOR\>/PDF_MAT_COLOR/g +s/\<PDF_MFILL\>/PDF_FILL/g +s/\<PDF_MNONE\>/PDF_MAT_NONE/g +s/\<PDF_MPATTERN\>/PDF_MAT_PATTERN/g +s/\<PDF_MSHADE\>/PDF_MAT_SHADE/g +s/\<PDF_MSTROKE\>/PDF_STROKE/g +s/\<PDF_NTOKENS\>/PDF_NUM_TOKENS/g +s/\<PDF_TCARRAY\>/PDF_TOK_CLOSE_ARRAY/g +s/\<PDF_TCBRACE\>/PDF_TOK_CLOSE_BRACE/g +s/\<PDF_TCDICT\>/PDF_TOK_CLOSE_DICT/g +s/\<PDF_TENDOBJ\>/PDF_TOK_ENDOBJ/g +s/\<PDF_TENDSTREAM\>/PDF_TOK_ENDSTREAM/g +s/\<PDF_TEOF\>/PDF_TOK_EOF/g +s/\<PDF_TERROR\>/PDF_TOK_ERROR/g +s/\<PDF_TFALSE\>/PDF_TOK_FALSE/g +s/\<PDF_TINT\>/PDF_TOK_INT/g +s/\<PDF_TKEYWORD\>/PDF_TOK_KEYWORD/g +s/\<PDF_TNAME\>/PDF_TOK_NAME/g +s/\<PDF_TNULL\>/PDF_TOK_NULL/g +s/\<PDF_TOARRAY\>/PDF_TOK_OPEN_ARRAY/g +s/\<PDF_TOBJ\>/PDF_TOK_OBJ/g +s/\<PDF_TOBRACE\>/PDF_TOK_OPEN_BRACE/g +s/\<PDF_TODICT\>/PDF_TOK_OPEN_DICT/g +s/\<PDF_TR\>/PDF_TOK_R/g +s/\<PDF_TREAL\>/PDF_TOK_REAL/g +s/\<PDF_TSTARTXREF\>/PDF_TOK_STARTXREF/g +s/\<PDF_TSTREAM\>/PDF_TOK_STREAM/g +s/\<PDF_TSTRING\>/PDF_TOK_STRING/g +s/\<PDF_TTRAILER\>/PDF_TOK_TRAILER/g +s/\<PDF_TTRUE\>/PDF_TOK_TRUE/g +s/\<PDF_TXREF\>/PDF_TOK_XREF/g +s/\<PSBLOCK\>/PS_BLOCK/g +s/\<PSBOOL\>/PS_BOOL/g +s/\<PSINT\>/PS_INT/g +s/\<PSOABS\>/PS_OP_ABS/g +s/\<PSOADD\>/PS_OP_ADD/g +s/\<PSOAND\>/PS_OP_AND/g +s/\<PSOATAN\>/PS_OP_ATAN/g +s/\<PSOBITSHIFT\>/PS_OP_BITSHIFT/g +s/\<PSOCEILING\>/PS_OP_CEILING/g +s/\<PSOCOPY\>/PS_OP_COPY/g +s/\<PSOCOS\>/PS_OP_COS/g +s/\<PSOCVI\>/PS_OP_CVI/g +s/\<PSOCVR\>/PS_OP_CVR/g +s/\<PSODIV\>/PS_OP_DIV/g +s/\<PSODUP\>/PS_OP_DUP/g +s/\<PSOEQ\>/PS_OP_EQ/g +s/\<PSOEXCH\>/PS_OP_EXCH/g +s/\<PSOEXP\>/PS_OP_EXP/g +s/\<PSOFALSE\>/PS_OP_FALSE/g +s/\<PSOFLOOR\>/PS_OP_FLOOR/g +s/\<PSOGE\>/PS_OP_GE/g +s/\<PSOGT\>/PS_OP_GT/g +s/\<PSOIDIV\>/PS_OP_IDIV/g +s/\<PSOIF\>/PS_OP_IF/g +s/\<PSOIFELSE\>/PS_OP_IFELSE/g +s/\<PSOINDEX\>/PS_OP_INDEX/g +s/\<PSOLE\>/PS_OP_LE/g +s/\<PSOLN\>/PS_OP_LN/g +s/\<PSOLOG\>/PS_OP_LOG/g +s/\<PSOLT\>/PS_OP_LT/g +s/\<PSOMOD\>/PS_OP_MOD/g +s/\<PSOMUL\>/PS_OP_MUL/g +s/\<PSONE\>/PS_OP_NE/g +s/\<PSONEG\>/PS_OP_NEG/g +s/\<PSONOT\>/PS_OP_NOT/g +s/\<PSOOR\>/PS_OP_OR/g +s/\<PSOPERATOR\>/PS_OPERATOR/g +s/\<PSOPOP\>/PS_OP_POP/g +s/\<PSORETURN\>/PS_OP_RETURN/g +s/\<PSOROLL\>/PS_OP_ROLL/g +s/\<PSOROUND\>/PS_OP_ROUND/g +s/\<PSOSIN\>/PS_OP_SIN/g +s/\<PSOSQRT\>/PS_OP_SQRT/g +s/\<PSOSUB\>/PS_OP_SUB/g +s/\<PSOTRUE\>/PS_OP_TRUE/g +s/\<PSOTRUNCATE\>/PS_OP_TRUNCATE/g +s/\<PSOXOR\>/PS_OP_XOR/g +s/\<PSREAL\>/PS_REAL/g +s/\<SDONE\>/STATE_DONE/g +s/\<SEOL\>/STATE_EOL/g +s/\<SH1\>/STATE_H1/g +s/\<SH2\>/STATE_H2/g +s/\<SMAKEUP\>/STATE_MAKEUP/g +s/\<SNORMAL\>/STATE_NORMAL/g +s/\<SPACEDIST\>/SPACE_DIST/g +s/\<STACKSIZE\>/STACK_SIZE/g +s/\<TBEGINBFCHAR\>/TOK_BEGIN_BF_CHAR/g +s/\<TBEGINBFRANGE\>/TOK_BEGIN_BF_RANGE/g +s/\<TBEGINCIDCHAR\>/TOK_BEGIN_CID_CHAR/g +s/\<TBEGINCIDRANGE\>/TOK_BEGIN_CID_RANGE/g +s/\<TBEGINCODESPACERANGE\>/TOK_BEGIN_CODESPACE_RANGE/g +s/\<TENDBFCHAR\>/TOK_END_BF_CHAR/g +s/\<TENDBFRANGE\>/TOK_END_BF_RANGE/g +s/\<TENDCIDCHAR\>/TOK_END_CID_CHAR/g +s/\<TENDCIDRANGE\>/TOK_END_CID_RANGE/g +s/\<TENDCMAP\>/TOK_END_CMAP/g +s/\<TENDCODESPACERANGE\>/TOK_END_CODESPACE_RANGE/g +s/\<TUSECMAP\>/TOK_USECMAP/g +s/\<addrange\>/add_range/g +s/\<addspan\>/add_span/g +s/\<addtable\>/add_table/g +s/\<adjdown\>/adj_down/g +s/\<adjup\>/adj_up/g +s/\<advanceael\>/advance_ael/g +s/\<aglcodes\>/agl_codes/g +s/\<agldupcodes\>/agl_dup_codes/g +s/\<agldupnames\>/agl_dup_names/g +s/\<aglnoname\>/agl_no_name/g +s/\<basefontnames\>/base_font_names/g +s/\<basefonts\>/base_fonts/g +s/\<begingroup\>/begin_group/g +s/\<beginmask\>/begin_mask/g +s/\<begintile\>/begin_tile/g +s/\<bgrtoxyz\>/bgr_to_xyz/g +s/\<blackis1\>/black_is_1/g +s/\<boundexpand\>/bound_expand/g +s/\<buildfilter\>/build_filter/g +s/\<buildfilterchain\>/build_filter_chain/g +s/\<capheight\>/cap_height/g +s/\<charspace\>/char_space/g +s/\<cidtogid\>/cid_to_gid/g +s/\<cidtoucs\>/cid_to_ucs/g +s/\<cleanfontname\>/clean_font_name/g +s/\<clipdepth\>/clip_depth/g +s/\<clipevenodd\>/clip_even_odd/g +s/\<clipimagemask\>/clip_image_mask/g +s/\<cliplerpx\>/clip_lerp_x/g +s/\<cliplerpy\>/clip_lerp_y/g +s/\<clippath\>/clip_path/g +s/\<clippoly\>/clip_poly/g +s/\<clipstrokepath\>/clip_stroke_path/g +s/\<clipstroketext\>/clip_stroke_text/g +s/\<cliptext\>/clip_text/g +s/\<closea85d\>/close_a85d/g +s/\<closeaesd\>/close_aesd/g +s/\<closeahxd\>/close_ahxd/g +s/\<closearc4\>/close_arc4/g +s/\<closebuffer\>/close_buffer/g +s/\<closedctd\>/close_dctd/g +s/\<closefaxd\>/close_faxd/g +s/\<closefile\>/close_file/g +s/\<closeflated\>/close_flated/g +s/\<closejbig2d\>/close_jbig2d/g +s/\<closelzwd\>/close_lzwd/g +s/\<closenull\>/close_null/g +s/\<closepredict\>/close_predict/g +s/\<closerld\>/close_rld/g +s/\<cmapname\>/cmap_name/g +s/\<cmyktoxyz\>/cmyk_to_xyz/g +s/\<codebits\>/code_bits/g +s/\<colortransform\>/color_transform/g +s/\<copyvert\>/copy_vert/g +s/\<cspace\>/codespace/g +s/\<dashlen\>/dash_len/g +s/\<dashlist\>/dash_list/g +s/\<dashphase\>/dash_phase/g +s/\<drawglyph\>/draw_glyph/g +s/\<drawpatch\>/draw_patch/g +s/\<drawstripe\>/draw_stripe/g +s/\<dropfunc\>/drop_func/g +s/\<earlychange\>/early_change/g +s/\<eatbits\>/eat_bits/g +s/\<els\>/items/g +s/\<encodedbytealign\>/encoded_byte_align/g +s/\<encryptmetadata\>/encrypt_metadata/g +s/\<endgroup\>/end_group/g +s/\<endmask\>/end_mask/g +s/\<endofblock\>/end_of_block/g +s/\<endofline\>/end_of_line/g +s/\<endtile\>/end_tile/g +s/\<errorcount\>/error_count/g +s/\<errormessage\>/error_message/g +s/\<evalexponentialfunc\>/eval_exponential_func/g +s/\<evalpostscriptfunc\>/eval_postscript_func/g +s/\<evalsamplefunc\>/eval_sample_func/g +s/\<evalstitchingfunc\>/eval_stitching_func/g +s/\<evenodd\>/even_odd/g +s/\<extentflags\>/extent_flags/g +s/\<fastbgrtocmyk\>/fast_bgr_to_cmyk/g +s/\<fastbgrtogray\>/fast_bgr_to_gray/g +s/\<fastcmyktobgr\>/fast_cmyk_to_bgr/g +s/\<fastcmyktogray\>/fast_cmyk_to_gray/g +s/\<fastcmyktorgb\>/fast_cmyk_to_rgb/g +s/\<fastgraytocmyk\>/fast_gray_to_cmyk/g +s/\<fastgraytorgb\>/fast_gray_to_rgb/g +s/\<fastrgbtobgr\>/fast_rgb_to_bgr/g +s/\<fastrgbtocmyk\>/fast_rgb_to_cmyk/g +s/\<fastrgbtogray\>/fast_rgb_to_gray/g +s/\<filesize\>/file_size/g +s/\<fillbits\>/fill_bits/g +s/\<fillimage\>/fill_image/g +s/\<fillimagemask\>/fill_image_mask/g +s/\<fillpath\>/fill_path/g +s/\<fillshade\>/fill_shade/g +s/\<filltext\>/fill_text/g +s/\<findchanging\>/find_changing/g +s/\<findchangingcolor\>/find_changing_color/g +s/\<findnext\>/find_next/g +s/\<firstchar\>/first_char/g +s/\<flagtoname\>/flag_to_name/g +s/\<fmtarray\>/fmt_array/g +s/\<fmtdict\>/fmt_dict/g +s/\<fmthex\>/fmt_hex/g +s/\<fmtindent\>/fmt_indent/g +s/\<fmtname\>/fmt_name/g +s/\<fmtobj\>/fmt_obj/g +s/\<fmtputc\>/fmt_putc/g +s/\<fmtputs\>/fmt_puts/g +s/\<fmtsep\>/fmt_sep/g +s/\<fmtstr\>/fmt_str/g +s/\<freedata\>/free_data/g +s/\<freeindexed\>/free_indexed/g +s/\<freesamples\>/free_samples/g +s/\<freeseparation\>/free_separation/g +s/\<freeuser\>/free_user/g +s/\<fromhex\>/from_hex/g +s/\<fromxyz\>/from_xyz/g +s/\<ft_errorstring\>/ft_error_string/g +s/\<ftcharindex\>/ft_char_index/g +s/\<ftcidtogid\>/ft_cid_to_gid/g +s/\<ftdata\>/ft_data/g +s/\<ftface\>/ft_face/g +s/\<ftfile\>/ft_file/g +s/\<fthint\>/ft_hint/g +s/\<ftkind\>/ft_kind/g +s/\<ftsize\>/ft_size/g +s/\<ftsubstitute\>/ft_substitute/g +s/\<ftwidth\>/ft_width/g +s/\<fz_acceleratearch\>/fz_accelerate_arch/g +s/\<fz_addarc\>/fz_add_arc/g +s/\<fz_addline\>/fz_add_line/g +s/\<fz_addtext\>/fz_add_text/g +s/\<fz_addtextchar\>/fz_add_text_char/g +s/\<fz_addtextcharimp\>/fz_add_text_char_imp/g +s/\<fz_addtextnewline\>/fz_add_text_newline/g +s/\<fz_adjustftglyphwidth\>/fz_adjust_ft_glyph_width/g +s/\<fz_alphafromgray\>/fz_alpha_from_gray/g +s/\<fz_appenddisplaynode\>/fz_append_display_node/g +s/\<fz_arc4encrypt\>/fz_arc4_encrypt/g +s/\<fz_arc4init\>/fz_arc4_init/g +s/\<fz_arc4next\>/fz_arc4_next/g +s/\<fz_arraydrop\>/fz_array_drop/g +s/\<fz_arrayget\>/fz_array_get/g +s/\<fz_arrayinsert\>/fz_array_insert/g +s/\<fz_arraylen\>/fz_array_len/g +s/\<fz_arraypush\>/fz_array_push/g +s/\<fz_arrayput\>/fz_array_put/g +s/\<fz_bboxdevice\>/fz_bbox_device/g +s/\<fz_bboxdevice_s\>/fz_bbox_device_s/g +s/\<fz_bboxfillimage\>/fz_bbox_fill_image/g +s/\<fz_bboxfillimagemask\>/fz_bbox_fill_image_mask/g +s/\<fz_bboxfillpath\>/fz_bbox_fill_path/g +s/\<fz_bboxfillshade\>/fz_bbox_fill_shade/g +s/\<fz_bboxfilltext\>/fz_bbox_fill_text/g +s/\<fz_bboxfreeuser\>/fz_bbox_free_user/g +s/\<fz_bboxstrokepath\>/fz_bbox_stroke_path/g +s/\<fz_bboxstroketext\>/fz_bbox_stroke_text/g +s/\<fz_blendnames\>/fz_blendmode_names/g +s/\<fz_blendnonseparable\>/fz_blend_nonseparable/g +s/\<fz_blendpixmap\>/fz_blend_pixmap/g +s/\<fz_blendseparable\>/fz_blend_separable/g +s/\<fz_boundgel\>/fz_bound_gel/g +s/\<fz_boundpath\>/fz_bound_path/g +s/\<fz_boundpixmap\>/fz_bound_pixmap/g +s/\<fz_boundshade\>/fz_bound_shade/g +s/\<fz_boundtext\>/fz_bound_text/g +s/\<fz_calcimagescale\>/fz_calc_image_scale/g +s/\<fz_catchimp\>/fz_catch_imp/g +s/\<fz_catchimpx\>/fz_catch_impx/g +s/\<fz_clearpixmap\>/fz_clear_pixmap/g +s/\<fz_clearpixmapwithcolor\>/fz_clear_pixmap_with_color/g +s/\<fz_clonepath\>/fz_clone_path/g +s/\<fz_clonestrokestate\>/fz_clone_stroke_state/g +s/\<fz_clonetext\>/fz_clone_text/g +s/\<fz_colorburn_byte\>/fz_color_burn_byte/g +s/\<fz_colordodge_byte\>/fz_color_dodge_byte/g +s/\<fz_convertcolor\>/fz_convert_color/g +s/\<fz_convertpixmap\>/fz_convert_pixmap/g +s/\<fz_copyarray\>/fz_copy_array/g +s/\<fz_copydict\>/fz_copy_dict/g +s/\<fz_dashbezier\>/fz_dash_bezier/g +s/\<fz_dashlineto\>/fz_dash_lineto/g +s/\<fz_dashmoveto\>/fz_dash_moveto/g +s/\<fz_dashpath\>/fz_dash_path/g +s/\<fz_debugfont\>/fz_debug_font/g +s/\<fz_debughash\>/fz_debug_hash/g +s/\<fz_debugobj\>/fz_debug_obj/g +s/\<fz_debugpath\>/fz_debug_path/g +s/\<fz_debugref\>/fz_debug_ref/g +s/\<fz_debugshade\>/fz_debug_shade/g +s/\<fz_debugtext\>/fz_debug_text/g +s/\<fz_debugtextspan\>/fz_debug_text_span/g +s/\<fz_debugtextspanxml\>/fz_debug_text_span_xml/g +s/\<fz_decodeindexedtile\>/fz_decode_indexed_tile/g +s/\<fz_decodetile\>/fz_decode_tile/g +s/\<fz_devicebgr\>/fz_device_bgr/g +s/\<fz_devicecmyk\>/fz_device_cmyk/g +s/\<fz_devicegray\>/fz_device_gray/g +s/\<fz_devicelab\>/fz_device_lab/g +s/\<fz_devicergb\>/fz_device_rgb/g +s/\<fz_dictdel\>/fz_dict_del/g +s/\<fz_dictdels\>/fz_dict_dels/g +s/\<fz_dictfinds\>/fz_dict_finds/g +s/\<fz_dictget\>/fz_dict_get/g +s/\<fz_dictgetkey\>/fz_dict_get_key/g +s/\<fz_dictgets\>/fz_dict_gets/g +s/\<fz_dictgetsa\>/fz_dict_getsa/g +s/\<fz_dictgetval\>/fz_dict_get_val/g +s/\<fz_dictlen\>/fz_dict_len/g +s/\<fz_dictput\>/fz_dict_put/g +s/\<fz_dictputs\>/fz_dict_puts/g +s/\<fz_displaycommand\>/fz_display_command/g +s/\<fz_displaycommand_e\>/fz_display_command_e/g +s/\<fz_displaylist\>/fz_display_list/g +s/\<fz_displaylist_s\>/fz_display_list_s/g +s/\<fz_displaynode\>/fz_display_node/g +s/\<fz_displaynode_s\>/fz_display_node_s/g +s/\<fz_dividetextchars\>/fz_divide_text_chars/g +s/\<fz_drawbegingroup\>/fz_draw_begin_group/g +s/\<fz_drawbeginmask\>/fz_draw_begin_mask/g +s/\<fz_drawbegintile\>/fz_draw_begin_tile/g +s/\<fz_drawclipimagemask\>/fz_draw_clip_image_mask/g +s/\<fz_drawclippath\>/fz_draw_clip_path/g +s/\<fz_drawclipstrokepath\>/fz_draw_clip_stroke_path/g +s/\<fz_drawclipstroketext\>/fz_draw_clip_stroke_text/g +s/\<fz_drawcliptext\>/fz_draw_clip_text/g +s/\<fz_drawdevice\>/fz_draw_device/g +s/\<fz_drawdevice_s\>/fz_draw_device_s/g +s/\<fz_drawendgroup\>/fz_draw_end_group/g +s/\<fz_drawendmask\>/fz_draw_end_mask/g +s/\<fz_drawendtile\>/fz_draw_end_tile/g +s/\<fz_drawfillimage\>/fz_draw_fill_image/g +s/\<fz_drawfillimagemask\>/fz_draw_fill_image_mask/g +s/\<fz_drawfillpath\>/fz_draw_fill_path/g +s/\<fz_drawfillshade\>/fz_draw_fill_shade/g +s/\<fz_drawfilltext\>/fz_draw_fill_text/g +s/\<fz_drawfreeuser\>/fz_draw_free_user/g +s/\<fz_drawignoretext\>/fz_draw_ignore_text/g +s/\<fz_drawpopclip\>/fz_draw_pop_clip/g +s/\<fz_drawstrokepath\>/fz_draw_stroke_path/g +s/\<fz_drawstroketext\>/fz_draw_stroke_text/g +s/\<fz_dropbuffer\>/fz_drop_buffer/g +s/\<fz_dropcolorspace\>/fz_drop_colorspace/g +s/\<fz_dropfont\>/fz_drop_font/g +s/\<fz_dropobj\>/fz_drop_obj/g +s/\<fz_droppixmap\>/fz_drop_pixmap/g +s/\<fz_dropshade\>/fz_drop_shade/g +s/\<fz_emiterror\>/fz_emit_error/g +s/\<fz_emptybbox\>/fz_empty_bbox/g +s/\<fz_emptyhash\>/fz_empty_hash/g +s/\<fz_emptyrect\>/fz_empty_rect/g +s/\<fz_evictglyphcache\>/fz_evict_glyph_cache/g +s/\<fz_executedisplaylist\>/fz_execute_display_list/g +s/\<fz_fillbuffer\>/fz_fill_buffer/g +s/\<fz_fillpath\>/fz_fill_path/g +s/\<fz_finalizefreetype\>/fz_finalize_freetype/g +s/\<fz_flushwarnings\>/fz_flush_warnings/g +s/\<fz_fprintobj\>/fz_fprint_obj/g +s/\<fz_freeael\>/fz_free_ael/g +s/\<fz_freearray\>/fz_free_array/g +s/\<fz_freedevice\>/fz_free_device/g +s/\<fz_freedict\>/fz_free_dict/g +s/\<fz_freedisplaylist\>/fz_free_display_list/g +s/\<fz_freedisplaynode\>/fz_free_display_node/g +s/\<fz_freegel\>/fz_free_gel/g +s/\<fz_freeglyphcache\>/fz_free_glyph_cache/g +s/\<fz_freehash\>/fz_free_hash/g +s/\<fz_freepath\>/fz_free_path/g +s/\<fz_freetext\>/fz_free_text/g +s/\<fz_freetextspan\>/fz_free_text_span/g +s/\<fz_geterrorcount\>/fz_get_error_count/g +s/\<fz_geterrorline\>/fz_get_error_line/g +s/\<fz_glyphcache\>/fz_glyph_cache/g +s/\<fz_glyphcache_s\>/fz_glyph_cache_s/g +s/\<fz_glyphkey\>/fz_glyph_key/g +s/\<fz_glyphkey_s\>/fz_glyph_key_s/g +s/\<fz_growbuffer\>/fz_grow_buffer/g +s/\<fz_growtext\>/fz_grow_text/g +s/\<fz_hardlight_byte\>/fz_hard_light_byte/g +s/\<fz_hashentry\>/fz_hash_entry/g +s/\<fz_hashentry_s\>/fz_hash_entry_s/g +s/\<fz_hashfind\>/fz_hash_find/g +s/\<fz_hashgetkey\>/fz_hash_get_key/g +s/\<fz_hashgetval\>/fz_hash_get_val/g +s/\<fz_hashinsert\>/fz_hash_insert/g +s/\<fz_hashlen\>/fz_hash_len/g +s/\<fz_hashremove\>/fz_hash_remove/g +s/\<fz_hashtable\>/fz_hash_table/g +s/\<fz_hashtable_s\>/fz_hash_table_s/g +s/\<fz_infinitebbox\>/fz_infinite_bbox/g +s/\<fz_infiniterect\>/fz_infinite_rect/g +s/\<fz_initfreetype\>/fz_init_freetype/g +s/\<fz_insertgel\>/fz_insert_gel/g +s/\<fz_insertgelraw\>/fz_insert_gel_raw/g +s/\<fz_intersectbbox\>/fz_intersect_bbox/g +s/\<fz_invertmatrix\>/fz_invert_matrix/g +s/\<fz_isarray\>/fz_is_array/g +s/\<fz_isbigendian\>/fz_is_big_endian/g +s/\<fz_isbool\>/fz_is_bool/g +s/\<fz_isdict\>/fz_is_dict/g +s/\<fz_isemptybbox\>/fz_is_empty_bbox/g +s/\<fz_isemptyrect\>/fz_is_empty_rect/g +s/\<fz_iseof\>/fz_is_eof/g +s/\<fz_iseofbits\>/fz_is_eof_bits/g +s/\<fz_isindirect\>/fz_is_indirect/g +s/\<fz_isinfinitebbox\>/fz_is_infinite_bbox/g +s/\<fz_isinfiniterect\>/fz_is_infinite_rect/g +s/\<fz_isint\>/fz_is_int/g +s/\<fz_isname\>/fz_is_name/g +s/\<fz_isnull\>/fz_is_null/g +s/\<fz_isreal\>/fz_is_real/g +s/\<fz_isrectgel\>/fz_is_rect_gel/g +s/\<fz_isrectilinear\>/fz_is_rectilinear/g +s/\<fz_isstring\>/fz_is_string/g +s/\<fz_keepbuffer\>/fz_keep_buffer/g +s/\<fz_keepcolorspace\>/fz_keep_colorspace/g +s/\<fz_keepfont\>/fz_keep_font/g +s/\<fz_keepobj\>/fz_keep_obj/g +s/\<fz_keeppixmap\>/fz_keep_pixmap/g +s/\<fz_keepshade\>/fz_keep_shade/g +s/\<fz_keepstream\>/fz_keep_stream/g +s/\<fz_listbegingroup\>/fz_list_begin_group/g +s/\<fz_listbeginmask\>/fz_list_begin_mask/g +s/\<fz_listbegintile\>/fz_list_begin_tile/g +s/\<fz_listclipimagemask\>/fz_list_clip_image_mask/g +s/\<fz_listclippath\>/fz_list_clip_path/g +s/\<fz_listclipstrokepath\>/fz_list_clip_stroke_path/g +s/\<fz_listclipstroketext\>/fz_list_clip_stroke_text/g +s/\<fz_listcliptext\>/fz_list_clip_text/g +s/\<fz_listendgroup\>/fz_list_end_group/g +s/\<fz_listendmask\>/fz_list_end_mask/g +s/\<fz_listendtile\>/fz_list_end_tile/g +s/\<fz_listfillimage\>/fz_list_fill_image/g +s/\<fz_listfillimagemask\>/fz_list_fill_image_mask/g +s/\<fz_listfillpath\>/fz_list_fill_path/g +s/\<fz_listfillshade\>/fz_list_fill_shade/g +s/\<fz_listfilltext\>/fz_list_fill_text/g +s/\<fz_listignoretext\>/fz_list_ignore_text/g +s/\<fz_listpopclip\>/fz_list_pop_clip/g +s/\<fz_liststrokepath\>/fz_list_stroke_path/g +s/\<fz_liststroketext\>/fz_list_stroke_text/g +s/\<fz_loadjpximage\>/fz_load_jpx_image/g +s/\<fz_matrixexpansion\>/fz_matrix_expansion/g +s/\<fz_md5final\>/fz_md5_final/g +s/\<fz_md5init\>/fz_md5_init/g +s/\<fz_md5update\>/fz_md5_update/g +s/\<fz_newael\>/fz_new_ael/g +s/\<fz_newarray\>/fz_new_array/g +s/\<fz_newbboxdevice\>/fz_new_bbox_device/g +s/\<fz_newbool\>/fz_new_bool/g +s/\<fz_newbuffer\>/fz_new_buffer/g +s/\<fz_newcolorspace\>/fz_new_colorspace/g +s/\<fz_newdevice\>/fz_new_device/g +s/\<fz_newdict\>/fz_new_dict/g +s/\<fz_newdisplaylist\>/fz_new_display_list/g +s/\<fz_newdisplaynode\>/fz_new_display_node/g +s/\<fz_newdrawdevice\>/fz_new_draw_device/g +s/\<fz_newfont\>/fz_new_font/g +s/\<fz_newfontfrombuffer\>/fz_new_font_from_memory/g +s/\<fz_newfontfromfile\>/fz_new_font_from_file/g +s/\<fz_newgel\>/fz_new_gel/g +s/\<fz_newglyphcache\>/fz_new_glyph_cache/g +s/\<fz_newhash\>/fz_new_hash_table/g +s/\<fz_newindirect\>/fz_new_indirect/g +s/\<fz_newint\>/fz_new_int/g +s/\<fz_newlistdevice\>/fz_new_list_device/g +s/\<fz_newname\>/fz_new_name/g +s/\<fz_newnull\>/fz_new_null/g +s/\<fz_newpath\>/fz_new_path/g +s/\<fz_newpixmap\>/fz_new_pixmap/g +s/\<fz_newpixmapwithdata\>/fz_new_pixmap_with_data/g +s/\<fz_newpixmapwithrect\>/fz_new_pixmap_with_rect/g +s/\<fz_newreal\>/fz_new_real/g +s/\<fz_newstream\>/fz_new_stream/g +s/\<fz_newstring\>/fz_new_string/g +s/\<fz_newtext\>/fz_new_text/g +s/\<fz_newtextdevice\>/fz_new_text_device/g +s/\<fz_newtextspan\>/fz_new_text_span/g +s/\<fz_newtracedevice\>/fz_new_trace_device/g +s/\<fz_newtype3font\>/fz_new_type3_font/g +s/\<fz_nullbegingroup\>/fz_null_begin_group/g +s/\<fz_nullbeginmask\>/fz_null_begin_mask/g +s/\<fz_nullbegintile\>/fz_null_begin_tile/g +s/\<fz_nullclipimagemask\>/fz_null_clip_image_mask/g +s/\<fz_nullclippath\>/fz_null_clip_path/g +s/\<fz_nullclipstrokepath\>/fz_null_clip_stroke_path/g +s/\<fz_nullclipstroketext\>/fz_null_clip_stroke_text/g +s/\<fz_nullcliptext\>/fz_null_clip_text/g +s/\<fz_nullendgroup\>/fz_null_end_group/g +s/\<fz_nullendmask\>/fz_null_end_mask/g +s/\<fz_nullendtile\>/fz_null_end_tile/g +s/\<fz_nullfillimage\>/fz_null_fill_image/g +s/\<fz_nullfillimagemask\>/fz_null_fill_image_mask/g +s/\<fz_nullfillpath\>/fz_null_fill_path/g +s/\<fz_nullfillshade\>/fz_null_fill_shade/g +s/\<fz_nullfilltext\>/fz_null_fill_text/g +s/\<fz_nullfreeuser\>/fz_null_free_user/g +s/\<fz_nullignoretext\>/fz_null_ignore_text/g +s/\<fz_nullpopclip\>/fz_null_pop_clip/g +s/\<fz_nullstrokepath\>/fz_null_stroke_path/g +s/\<fz_nullstroketext\>/fz_null_stroke_text/g +s/\<fz_opena85d\>/fz_open_a85d/g +s/\<fz_openaesd\>/fz_open_aesd/g +s/\<fz_openahxd\>/fz_open_ahxd/g +s/\<fz_openarc4\>/fz_open_arc4/g +s/\<fz_openbuffer\>/fz_open_buffer/g +s/\<fz_opencopy\>/fz_open_copy/g +s/\<fz_opendctd\>/fz_open_dctd/g +s/\<fz_openfaxd\>/fz_open_faxd/g +s/\<fz_openfd\>/fz_open_fd/g +s/\<fz_openfile\>/fz_open_file/g +s/\<fz_openfilew\>/fz_open_file_w/g +s/\<fz_openflated\>/fz_open_flated/g +s/\<fz_openjbig2d\>/fz_open_jbig2d/g +s/\<fz_openlzwd\>/fz_open_lzwd/g +s/\<fz_openmemory\>/fz_open_memory/g +s/\<fz_opennull\>/fz_open_null/g +s/\<fz_openpredict\>/fz_open_predict/g +s/\<fz_openrld\>/fz_open_rld/g +s/\<fz_paintaffineNlerp\>/fz_paint_affine_N_lerp/g +s/\<fz_paintaffineNnear\>/fz_paint_affine_N_near/g +s/\<fz_paintaffinealphaNlerp\>/fz_paint_affine_alpha_N_lerp/g +s/\<fz_paintaffinealphaNnear\>/fz_paint_affine_alpha_N_near/g +s/\<fz_paintaffinecolorNlerp\>/fz_paint_affine_color_N_lerp/g +s/\<fz_paintaffinecolorNnear\>/fz_paint_affine_color_N_near/g +s/\<fz_paintaffinecolorlerp\>/fz_paint_affine_color_lerp/g +s/\<fz_paintaffinecolornear\>/fz_paint_affine_color_near/g +s/\<fz_paintaffinelerp\>/fz_paint_affine_lerp/g +s/\<fz_paintaffinenear\>/fz_paint_affine_near/g +s/\<fz_paintannulus\>/fz_paint_annulus/g +s/\<fz_paintimage\>/fz_paint_image/g +s/\<fz_paintimagecolor\>/fz_paint_image_with_color/g +s/\<fz_paintimageimp\>/fz_paint_image_imp/g +s/\<fz_paintlinear\>/fz_paint_linear/g +s/\<fz_paintmesh\>/fz_paint_mesh/g +s/\<fz_paintpixmap\>/fz_paint_pixmap/g +s/\<fz_paintpixmapbbox\>/fz_paint_pixmap_with_rect/g +s/\<fz_paintpixmapmask\>/fz_paint_pixmap_with_mask/g +s/\<fz_paintquad\>/fz_paint_quad/g +s/\<fz_paintradial\>/fz_paint_radial/g +s/\<fz_paintshade\>/fz_paint_shade/g +s/\<fz_paintspan\>/fz_paint_span/g +s/\<fz_paintspan1\>/fz_paint_span_1/g +s/\<fz_paintspan2\>/fz_paint_span_2/g +s/\<fz_paintspan2alpha\>/fz_paint_span_2_alpha/g +s/\<fz_paintspan4\>/fz_paint_span_4/g +s/\<fz_paintspan4alpha\>/fz_paint_span_4_alpha/g +s/\<fz_paintspanN\>/fz_paint_span_N/g +s/\<fz_paintspanNalpha\>/fz_paint_span_N_alpha/g +s/\<fz_paintspancolor\>/fz_paint_span_with_color/g +s/\<fz_paintspancolor2\>/fz_paint_span_with_color_2/g +s/\<fz_paintspancolor4\>/fz_paint_span_with_color_4/g +s/\<fz_paintspancolorN\>/fz_paint_span_with_color_N/g +s/\<fz_paintspanmask\>/fz_paint_span_with_mask/g +s/\<fz_paintspanmask2\>/fz_paint_span_with_mask_2/g +s/\<fz_paintspanmask4\>/fz_paint_span_with_mask_4/g +s/\<fz_paintspanmaskN\>/fz_paint_span_with_mask_N/g +s/\<fz_painttriangle\>/fz_paint_triangle/g +s/\<fz_pathel\>/fz_path_item/g +s/\<fz_pathel_s\>/fz_path_item_s/g +s/\<fz_pathelkind\>/fz_path_item_kind/g +s/\<fz_pathelkind_e\>/fz_path_item_kind_e/g +s/\<fz_peekbyte\>/fz_peek_byte/g +s/\<fz_pointoncircle\>/fz_point_on_circle/g +s/\<fz_predictpng\>/fz_predict_png/g +s/\<fz_predicttiff\>/fz_predict_tiff/g +s/\<fz_premultiplypixmap\>/fz_premultiply_pixmap/g +s/\<fz_readall\>/fz_read_all/g +s/\<fz_readbits\>/fz_read_bits/g +s/\<fz_readbyte\>/fz_read_byte/g +s/\<fz_readline\>/fz_read_line/g +s/\<fz_renderftglyph\>/fz_render_ft_glyph/g +s/\<fz_renderftstrokedglyph\>/fz_render_ft_stroked_glyph/g +s/\<fz_renderglyph\>/fz_render_glyph/g +s/\<fz_renderstrokedglyph\>/fz_render_stroked_glyph/g +s/\<fz_rendert3glyph\>/fz_render_t3_glyph/g +s/\<fz_repairobj\>/pdf_repair_obj/g +s/\<fz_resetgel\>/fz_reset_gel/g +s/\<fz_resizebuffer\>/fz_resize_buffer/g +s/\<fz_resizehash\>/fz_resize_hash/g +s/\<fz_resolveindirect\>/fz_resolve_indirect/g +s/\<fz_rethrowimp\>/fz_rethrow_imp/g +s/\<fz_rethrowimpx\>/fz_rethrow_impx/g +s/\<fz_roundrect\>/fz_round_rect/g +s/\<fz_scalefilter\>/fz_scale_filter/g +s/\<fz_scalefilter_box\>/fz_scale_filter_box/g +s/\<fz_scalefilter_lanczos2\>/fz_scale_filter_lanczos2/g +s/\<fz_scalefilter_lanczos3\>/fz_scale_filter_lanczos3/g +s/\<fz_scalefilter_mitchell\>/fz_scale_filter_mitchell/g +s/\<fz_scalefilter_s\>/fz_scale_filter_s/g +s/\<fz_scalefilter_simple\>/fz_scale_filter_simple/g +s/\<fz_scalefilter_triangle\>/fz_scale_filter_triangle/g +s/\<fz_scalepixmap\>/fz_scale_pixmap/g +s/\<fz_scanconvert\>/fz_scan_convert/g +s/\<fz_setfontbbox\>/fz_set_font_bbox/g +s/\<fz_sha256final\>/fz_sha256_final/g +s/\<fz_sha256init\>/fz_sha256_init/g +s/\<fz_sha256update\>/fz_sha256_update/g +s/\<fz_smoothscalepixmap\>/fz_smooth_scale_pixmap/g +s/\<fz_smoothtransformpixmap\>/fz_smooth_transform_pixmap/g +s/\<fz_softlight_byte\>/fz_soft_light_byte/g +s/\<fz_sortdict\>/fz_sort_dict/g +s/\<fz_sortgel\>/fz_sort_gel/g +s/\<fz_splitbbox\>/fz_split_bbox/g +s/\<fz_sprintobj\>/fz_sprint_obj/g +s/\<fz_stdconvcolor\>/fz_std_conv_color/g +s/\<fz_stdconvpixmap\>/fz_std_conv_pixmap/g +s/\<fz_strokebezier\>/fz_stroke_bezier/g +s/\<fz_strokeclosepath\>/fz_stroke_closepath/g +s/\<fz_strokeflush\>/fz_stroke_flush/g +s/\<fz_strokelineto\>/fz_stroke_lineto/g +s/\<fz_strokemoveto\>/fz_stroke_moveto/g +s/\<fz_strokepath\>/fz_stroke_path/g +s/\<fz_strokestate\>/fz_stroke_state/g +s/\<fz_strokestate_s\>/fz_stroke_state_s/g +s/\<fz_syncbits\>/fz_sync_bits/g +s/\<fz_textchar\>/fz_text_char/g +s/\<fz_textchar_s\>/fz_text_char_s/g +s/\<fz_textclipstroketext\>/fz_text_clip_stroke_text/g +s/\<fz_textcliptext\>/fz_text_clip_text/g +s/\<fz_textdevice\>/fz_text_device/g +s/\<fz_textdevice_s\>/fz_text_device_s/g +s/\<fz_textel\>/fz_text_item/g +s/\<fz_textel_s\>/fz_text_item_s/g +s/\<fz_textextractspan\>/fz_text_extract_span/g +s/\<fz_textfilltext\>/fz_text_fill_text/g +s/\<fz_textfreeuser\>/fz_text_free_user/g +s/\<fz_textignoretext\>/fz_text_ignore_text/g +s/\<fz_textspan\>/fz_text_span/g +s/\<fz_textspan_s\>/fz_text_span_s/g +s/\<fz_textstroketext\>/fz_text_stroke_text/g +s/\<fz_throwimp\>/fz_throw_imp/g +s/\<fz_throwimpx\>/fz_throw_impx/g +s/\<fz_tobool\>/fz_to_bool/g +s/\<fz_togen\>/fz_to_gen/g +s/\<fz_toint\>/fz_to_int/g +s/\<fz_toname\>/fz_to_name/g +s/\<fz_tonum\>/fz_to_num/g +s/\<fz_toreal\>/fz_to_real/g +s/\<fz_tostrbuf\>/fz_to_str_buf/g +s/\<fz_tostrlen\>/fz_to_str_len/g +s/\<fz_tracebegingroup\>/fz_trace_begin_group/g +s/\<fz_tracebeginmask\>/fz_trace_begin_mask/g +s/\<fz_tracebegintile\>/fz_trace_begin_tile/g +s/\<fz_traceclipimagemask\>/fz_trace_clip_image_mask/g +s/\<fz_traceclippath\>/fz_trace_clip_path/g +s/\<fz_traceclipstrokepath\>/fz_trace_clip_stroke_path/g +s/\<fz_traceclipstroketext\>/fz_trace_clip_stroke_text/g +s/\<fz_tracecliptext\>/fz_trace_clip_text/g +s/\<fz_tracecolor\>/fz_trace_color/g +s/\<fz_traceendgroup\>/fz_trace_end_group/g +s/\<fz_traceendmask\>/fz_trace_end_mask/g +s/\<fz_traceendtile\>/fz_trace_end_tile/g +s/\<fz_tracefillimage\>/fz_trace_fill_image/g +s/\<fz_tracefillimagemask\>/fz_trace_fill_image_mask/g +s/\<fz_tracefillpath\>/fz_trace_fill_path/g +s/\<fz_tracefillshade\>/fz_trace_fill_shade/g +s/\<fz_tracefilltext\>/fz_trace_fill_text/g +s/\<fz_traceignoretext\>/fz_trace_ignore_text/g +s/\<fz_tracematrix\>/fz_trace_matrix/g +s/\<fz_tracepath\>/fz_trace_path/g +s/\<fz_tracepopclip\>/fz_trace_pop_clip/g +s/\<fz_tracestrokepath\>/fz_trace_stroke_path/g +s/\<fz_tracestroketext\>/fz_trace_stroke_text/g +s/\<fz_transformbbox\>/fz_transform_bbox/g +s/\<fz_transformpath\>/fz_transform_path/g +s/\<fz_transformpixmap\>/fz_transform_pixmap/g +s/\<fz_transformpoint\>/fz_transform_point/g +s/\<fz_transformrect\>/fz_transform_rect/g +s/\<fz_transformvector\>/fz_transform_vector/g +s/\<fz_unionbbox\>/fz_union_bbox/g +s/\<fz_unitbbox\>/fz_unit_bbox/g +s/\<fz_unitrect\>/fz_unit_rect/g +s/\<fz_unpacktile\>/fz_unpack_tile/g +s/\<fz_unreadbyte\>/fz_unread_byte/g +s/\<fz_writepam\>/fz_write_pam/g +s/\<fz_writepng\>/fz_write_png/g +s/\<fz_writepnm\>/fz_write_pnm/g +s/\<get1tab1\>/get1_tab_1/g +s/\<get1tab1p\>/get1_tab_1p/g +s/\<get1tab255\>/get1_tab_255/g +s/\<get1tab255p\>/get1_tab_255p/g +s/\<graytoxyz\>/gray_to_xyz/g +s/\<growpath\>/grow_path/g +s/\<hasrange\>/has_range/g +s/\<hmtxcap\>/hmtx_cap/g +s/\<idlength\>/id_length/g +s/\<idstring\>/id_string/g +s/\<ignoretext\>/ignore_text/g +s/\<inarray\>/in_array/g +s/\<indexedtoxyz\>/indexed_to_xyz/g +s/\<initget1tables\>/init_get1_tables/g +s/\<insertael\>/insert_ael/g +s/\<interpolatesample\>/interpolate_sample/g +s/\<intext\>/in_text/g +s/\<italicangle\>/italic_angle/g +s/\<kdevicebgr\>/k_device_bgr/g +s/\<kdevicecmyk\>/k_device_cmyk/g +s/\<kdevicegray\>/k_device_gray/g +s/\<kdevicelab\>/k_device_lab/g +s/\<kdevicergb\>/k_device_rgb/g +s/\<labtoxyz\>/lab_to_xyz/g +s/\<lexcomment\>/lex_comment/g +s/\<lexhexstring\>/lex_hex_string/g +s/\<lexname\>/lex_name/g +s/\<lexnumber\>/lex_number/g +s/\<lexstring\>/lex_string/g +s/\<lexwhite\>/lex_white/g +s/\<loadcidfont\>/load_cid_font/g +s/\<loadedge\>/load_edge/g +s/\<loadexponentialfunc\>/load_exponential_func/g +s/\<loadiccbased\>/load_icc_based/g +s/\<loadindexed\>/load_indexed/g +s/\<loadpostscriptfunc\>/load_postscript_func/g +s/\<loadsamplefunc\>/load_sample_func/g +s/\<loadseparation\>/load_separation/g +s/\<loadsimplefont\>/load_simple_font/g +s/\<loadstitchingfunc\>/load_stitching_func/g +s/\<loadsystemcidfont\>/load_system_cid_font/g +s/\<loadtile8_arm\>/load_tile8_arm/g +s/\<loadtype0\>/load_type0_font/g +s/\<meshcap\>/mesh_cap/g +s/\<meshlen\>/mesh_len/g +s/\<meshparams\>/mesh_params/g +s/\<missingwidth\>/missing_width/g +s/\<mrecode\>/mre_code/g +s/\<ncidtogid\>/cid_to_gid_len/g +s/\<ncidtoucs\>/cid_to_ucs_len/g +s/\<ncspace\>/codespace_len/g +s/\<newweights\>/new_weights/g +s/\<nextcode\>/next_code/g +s/\<nhmtx\>/hmtx_len/g +s/\<nil\>/NULL/g +s/\<nonzerowinding\>/non_zero_winding/g +s/\<nullfilter\>/null_filter/g +s/\<nvmtx\>/vmtx_len/g +s/\<oldcode\>/old_code/g +s/\<pagecap\>/page_cap/g +s/\<pagelen\>/page_len/g +s/\<pageobjs\>/page_objs/g +s/\<pagerefs\>/page_refs/g +s/\<paintscan\>/paint_scan/g +s/\<parsecode\>/parse_code/g +s/\<pdf_addcodespace\>/pdf_add_codespace/g +s/\<pdf_addhmtx\>/pdf_add_hmtx/g +s/\<pdf_addquad\>/pdf_add_quad/g +s/\<pdf_addtriangle\>/pdf_add_triangle/g +s/\<pdf_addvertex\>/pdf_add_vertex/g +s/\<pdf_addvmtx\>/pdf_add_vmtx/g +s/\<pdf_agestore\>/pdf_age_store/g +s/\<pdf_authenticateownerpassword\>/pdf_authenticate_owner_password/g +s/\<pdf_authenticatepassword\>/pdf_authenticate_password/g +s/\<pdf_authenticateuserpassword\>/pdf_authenticate_user_password/g +s/\<pdf_begingroup\>/pdf_begin_group/g +s/\<pdf_cacheobject\>/pdf_cache_object/g +s/\<pdf_clearstack\>/pdf_clear_stack/g +s/\<pdf_cmaptable\>/pdf_cmap_table/g +s/\<pdf_cmaptokenfromkeyword\>/pdf_cmap_token_from_keyword/g +s/\<pdf_codefromstring\>/pdf_code_from_string/g +s/\<pdf_computeencryptionkey\>/pdf_compute_encryption_key/g +s/\<pdf_computeencryptionkey_r5\>/pdf_compute_encryption_key_r5/g +s/\<pdf_computeobjectkey\>/pdf_compute_object_key/g +s/\<pdf_computetensorinterior\>/pdf_compute_tensor_interior/g +s/\<pdf_computeuserpassword\>/pdf_compute_user_password/g +s/\<pdf_cryptfilter\>/pdf_crypt_filter/g +s/\<pdf_cryptfilter_s\>/pdf_crypt_filter_s/g +s/\<pdf_cryptobj\>/pdf_crypt_obj/g +s/\<pdf_cryptobjimp\>/pdf_crypt_obj_imp/g +s/\<pdf_debugcmap\>/pdf_debug_cmap/g +s/\<pdf_debugcrypt\>/pdf_debug_crypt/g +s/\<pdf_debugfont\>/pdf_debug_font/g +s/\<pdf_debugfunction\>/pdf_debug_function/g +s/\<pdf_debugfunctionimp\>/pdf_debug_function_imp/g +s/\<pdf_debugindent\>/pdf_debug_indent/g +s/\<pdf_debugoutline\>/pdf_debug_outline/g +s/\<pdf_debugpsfunccode\>/pdf_debug_ps_func_code/g +s/\<pdf_debugpsstack\>/pdf_debug_ps_stack/g +s/\<pdf_debugstore\>/pdf_debug_store/g +s/\<pdf_debugxref\>/pdf_debug_xref/g +s/\<pdf_decodecmap\>/pdf_decode_cmap/g +s/\<pdf_docencoding\>/pdf_doc_encoding/g +s/\<pdf_dropcmap\>/pdf_drop_cmap/g +s/\<pdf_dropfont\>/pdf_drop_font/g +s/\<pdf_dropfunction\>/pdf_drop_function/g +s/\<pdf_dropmaterial\>/pdf_drop_material/g +s/\<pdf_droppattern\>/pdf_drop_pattern/g +s/\<pdf_dropxobject\>/pdf_drop_xobject/g +s/\<pdf_endgroup\>/pdf_end_group/g +s/\<pdf_endhmtx\>/pdf_end_hmtx/g +s/\<pdf_endvmtx\>/pdf_end_vmtx/g +s/\<pdf_evalfunction\>/pdf_eval_function/g +s/\<pdf_expandindexedpixmap\>/pdf_expand_indexed_pixmap/g +s/\<pdf_extgstateusesblending\>/pdf_extgstate_uses_blending/g +s/\<pdf_finditem\>/pdf_find_item/g +s/\<pdf_findpageobject\>/pdf_find_page_object/g +s/\<pdf_flushtext\>/pdf_flush_text/g +s/\<pdf_fontcidtogid\>/pdf_font_cid_to_gid/g +s/\<pdf_fontdesc\>/pdf_font_desc/g +s/\<pdf_fontdesc_s\>/pdf_font_desc_s/g +s/\<pdf_freeannot\>/pdf_free_annot/g +s/\<pdf_freecrypt\>/pdf_free_crypt/g +s/\<pdf_freecsi\>/pdf_free_csi/g +s/\<pdf_freelink\>/pdf_free_link/g +s/\<pdf_freeoutline\>/pdf_free_outline/g +s/\<pdf_freepage\>/pdf_free_page/g +s/\<pdf_freestore\>/pdf_free_store/g +s/\<pdf_freexref\>/pdf_free_xref/g +s/\<pdf_gethmtx\>/pdf_get_hmtx/g +s/\<pdf_getpagecount\>/pdf_get_page_count/g +s/\<pdf_getpageobject\>/pdf_get_page_object/g +s/\<pdf_getpageref\>/pdf_get_page_ref/g +s/\<pdf_getvmtx\>/pdf_get_vmtx/g +s/\<pdf_getwmode\>/pdf_get_wmode/g +s/\<pdf_growmesh\>/pdf_grow_mesh/g +s/\<pdf_guessfilterlength\>/pdf_guess_filter_length/g +s/\<pdf_initgstate\>/pdf_init_gstate/g +s/\<pdf_ishiddenocg\>/pdf_is_hidden_ocg/g +s/\<pdf_isjpximage\>/pdf_is_jpx_image/g +s/\<pdf_isstream\>/pdf_is_stream/g +s/\<pdf_keepcmap\>/pdf_keep_cmap/g +s/\<pdf_keepfont\>/pdf_keep_font/g +s/\<pdf_keepfunction\>/pdf_keep_function/g +s/\<pdf_keepmaterial\>/pdf_keep_material/g +s/\<pdf_keeppattern\>/pdf_keep_pattern/g +s/\<pdf_keepxobject\>/pdf_keep_xobject/g +s/\<pdf_lexcmap\>/pdf_lex_cmap/g +s/\<pdf_linkkind\>/pdf_link_kind/g +s/\<pdf_linkkind_e\>/pdf_link_kind_e/g +s/\<pdf_loadannots\>/pdf_load_annots/g +s/\<pdf_loadaxialshading\>/pdf_load_axial_shading/g +s/\<pdf_loadbuiltinfont\>/pdf_load_builtin_font/g +s/\<pdf_loadcolorspace\>/pdf_load_colorspace/g +s/\<pdf_loadcolorspaceimp\>/pdf_load_colorspace_imp/g +s/\<pdf_loadembeddedcmap\>/pdf_load_embedded_cmap/g +s/\<pdf_loadembeddedfont\>/pdf_load_embedded_font/g +s/\<pdf_loadencoding\>/pdf_load_encoding/g +s/\<pdf_loadfont\>/pdf_load_font/g +s/\<pdf_loadfontdescriptor\>/pdf_load_font_descriptor/g +s/\<pdf_loadfunction\>/pdf_load_function/g +s/\<pdf_loadfunctionbasedshading\>/pdf_load_function_based_shading/g +s/\<pdf_loadimage\>/pdf_load_image/g +s/\<pdf_loadimageimp\>/pdf_load_image_imp/g +s/\<pdf_loadinlineimage\>/pdf_load_inline_image/g +s/\<pdf_loadjpximage\>/pdf_load_jpx_image/g +s/\<pdf_loadlink\>/pdf_load_link/g +s/\<pdf_loadlinks\>/pdf_load_links/g +s/\<pdf_loadmeshparams\>/pdf_load_mesh_params/g +s/\<pdf_loadnametree\>/pdf_load_name_tree/g +s/\<pdf_loadnametreeimp\>/pdf_load_name_tree_imp/g +s/\<pdf_loadobject\>/pdf_load_object/g +s/\<pdf_loadobjstm\>/pdf_load_obj_stm/g +s/\<pdf_loadoutline\>/pdf_load_outline/g +s/\<pdf_loadoutlineimp\>/pdf_load_outline_imp/g +s/\<pdf_loadpage\>/pdf_load_page/g +s/\<pdf_loadpagecontents\>/pdf_load_page_contents/g +s/\<pdf_loadpagecontentsarray\>/pdf_load_page_contents_array/g +s/\<pdf_loadpagetree\>/pdf_load_page_tree/g +s/\<pdf_loadpagetreenode\>/pdf_load_page_tree_node/g +s/\<pdf_loadpattern\>/pdf_load_pattern/g +s/\<pdf_loadradialshading\>/pdf_load_radial_shading/g +s/\<pdf_loadrawstream\>/pdf_load_raw_stream/g +s/\<pdf_loadshading\>/pdf_load_shading/g +s/\<pdf_loadshadingdict\>/pdf_load_shading_dict/g +s/\<pdf_loadstream\>/pdf_load_stream/g +s/\<pdf_loadsystemcmap\>/pdf_load_system_cmap/g +s/\<pdf_loadsystemfont\>/pdf_load_system_font/g +s/\<pdf_loadtounicode\>/pdf_load_to_unicode/g +s/\<pdf_loadtype3font\>/pdf_load_type3_font/g +s/\<pdf_loadtype4shade\>/pdf_load_type4_shade/g +s/\<pdf_loadtype5shade\>/pdf_load_type5_shade/g +s/\<pdf_loadtype6shade\>/pdf_load_type6_shade/g +s/\<pdf_loadtype7shade\>/pdf_load_type7_shade/g +s/\<pdf_loadversion\>/pdf_load_version/g +s/\<pdf_loadxobject\>/pdf_load_xobject/g +s/\<pdf_loadxref\>/pdf_load_xref/g +s/\<pdf_logfont\>/pdf_log_font/g +s/\<pdf_logimage\>/pdf_log_image/g +s/\<pdf_logpage\>/pdf_log_page/g +s/\<pdf_logrsrc\>/pdf_log_rsrc/g +s/\<pdf_logshade\>/pdf_log_shade/g +s/\<pdf_logxref\>/pdf_log_xref/g +s/\<pdf_lookupagl\>/pdf_lookup_agl/g +s/\<pdf_lookupaglnames\>/pdf_lookup_agl_names/g +s/\<pdf_lookupcmap\>/pdf_lookup_cmap/g +s/\<pdf_lookupcmapfull\>/pdf_lookup_cmap_full/g +s/\<pdf_lookupdest\>/pdf_lookup_dest/g +s/\<pdf_lookupname\>/pdf_lookup_name/g +s/\<pdf_lookupnameimp\>/pdf_lookup_name_imp/g +s/\<pdf_macexpert\>/pdf_mac_expert/g +s/\<pdf_macroman\>/pdf_mac_roman/g +s/\<pdf_maketensorpatch\>/pdf_make_tensor_patch/g +s/\<pdf_makewidthtable\>/pdf_make_width_table/g +s/\<pdf_maponetomany\>/pdf_map_one_to_many/g +s/\<pdf_maprangetorange\>/pdf_map_range_to_range/g +s/\<pdf_maprangetotable\>/pdf_map_range_to_table/g +s/\<pdf_maskcolorkey\>/pdf_mask_color_key/g +s/\<pdf_needspassword\>/pdf_needs_password/g +s/\<pdf_newcmap\>/pdf_new_cmap/g +s/\<pdf_newcrypt\>/pdf_new_crypt/g +s/\<pdf_newcsi\>/pdf_new_csi/g +s/\<pdf_newfontdesc\>/pdf_new_font_desc/g +s/\<pdf_newidentitycmap\>/pdf_new_identity_cmap/g +s/\<pdf_newstore\>/pdf_new_store/g +s/\<pdf_opencrypt\>/pdf_open_crypt/g +s/\<pdf_openfilter\>/pdf_open_filter/g +s/\<pdf_openinlinestream\>/pdf_open_inline_stream/g +s/\<pdf_openrawfilter\>/pdf_open_raw_filter/g +s/\<pdf_openrawstream\>/pdf_open_raw_stream/g +s/\<pdf_openstream\>/pdf_open_stream/g +s/\<pdf_openstreamat\>/pdf_open_stream_at/g +s/\<pdf_openxref\>/pdf_open_xref/g +s/\<pdf_openxrefwithstream\>/pdf_open_xref_with_stream/g +s/\<pdf_parsearray\>/pdf_parse_array/g +s/\<pdf_parsebfchar\>/pdf_parse_bf_char/g +s/\<pdf_parsebfrange\>/pdf_parse_bf_range/g +s/\<pdf_parsebfrangearray\>/pdf_parse_bf_range_array/g +s/\<pdf_parsecidchar\>/pdf_parse_cid_char/g +s/\<pdf_parsecidrange\>/pdf_parse_cid_range/g +s/\<pdf_parsecmap\>/pdf_parse_cmap/g +s/\<pdf_parsecmapname\>/pdf_parse_cmap_name/g +s/\<pdf_parsecodespacerange\>/pdf_parse_codespace_range/g +s/\<pdf_parsecryptfilter\>/pdf_parse_crypt_filter/g +s/\<pdf_parsedict\>/pdf_parse_dict/g +s/\<pdf_parseindobj\>/pdf_parse_ind_obj/g +s/\<pdf_parsestmobj\>/pdf_parse_stm_obj/g +s/\<pdf_parsewmode\>/pdf_parse_wmode/g +s/\<pdf_patternusesblending\>/pdf_pattern_uses_blending/g +s/\<pdf_readnewtrailer\>/pdf_read_new_trailer/g +s/\<pdf_readnewxref\>/pdf_read_new_xref/g +s/\<pdf_readnewxrefsection\>/pdf_read_new_xref_section/g +s/\<pdf_readoldtrailer\>/pdf_read_old_trailer/g +s/\<pdf_readoldxref\>/pdf_read_old_xref/g +s/\<pdf_readstartxref\>/pdf_read_start_xref/g +s/\<pdf_readtrailer\>/pdf_read_trailer/g +s/\<pdf_readxref\>/pdf_read_xref/g +s/\<pdf_readxrefsections\>/pdf_read_xref_sections/g +s/\<pdf_removeitem\>/pdf_remove_item/g +s/\<pdf_repairobjstm\>/pdf_repair_obj_stm/g +s/\<pdf_repairobjstms\>/pdf_repair_obj_stms/g +s/\<pdf_repairxref\>/pdf_repair_xref/g +s/\<pdf_resizexref\>/pdf_resize_xref/g +s/\<pdf_resolveindirect\>/pdf_resolve_indirect/g +s/\<pdf_resourcesuseblending\>/pdf_resources_use_blending/g +s/\<pdf_run_s\>/pdf_run/g +s/\<pdf_runcsibuffer\>/pdf_run_csi_buffer/g +s/\<pdf_runcsifile\>/pdf_run_csi_file/g +s/\<pdf_runextgstate\>/pdf_run_extgstate/g +s/\<pdf_runglyph\>/pdf_run_glyph/g +s/\<pdf_runinlineimage\>/pdf_run_inline_image/g +s/\<pdf_runkeyword\>/pdf_run_keyword/g +s/\<pdf_runpage\>/pdf_run_page/g +s/\<pdf_runpagewithtarget\>/pdf_run_page_with_usage/g +s/\<pdf_runxobject\>/pdf_run_xobject/g +s/\<pdf_samplecomponentshadefunction\>/pdf_sample_component_shade_function/g +s/\<pdf_samplecompositeshadefunction\>/pdf_sample_composite_shade_function/g +s/\<pdf_sampleshadefunction\>/pdf_sample_shade_function/g +s/\<pdf_setcolor\>/pdf_set_color/g +s/\<pdf_setcolorspace\>/pdf_set_colorspace/g +s/\<pdf_setdefaulthmtx\>/pdf_set_default_hmtx/g +s/\<pdf_setdefaultvmtx\>/pdf_set_default_vmtx/g +s/\<pdf_setfontwmode\>/pdf_set_font_wmode/g +s/\<pdf_setpattern\>/pdf_set_pattern/g +s/\<pdf_setshade\>/pdf_set_shade/g +s/\<pdf_setusecmap\>/pdf_set_usecmap/g +s/\<pdf_setwmode\>/pdf_set_wmode/g +s/\<pdf_showglyph\>/pdf_show_glyph/g +s/\<pdf_showimage\>/pdf_show_image/g +s/\<pdf_showpath\>/pdf_show_path/g +s/\<pdf_showpattern\>/pdf_show_pattern/g +s/\<pdf_showshade\>/pdf_show_shade/g +s/\<pdf_showspace\>/pdf_show_space/g +s/\<pdf_showstring\>/pdf_show_string/g +s/\<pdf_showtext\>/pdf_show_text/g +s/\<pdf_sortcmap\>/pdf_sort_cmap/g +s/\<pdf_storeitem\>/pdf_store_item/g +s/\<pdf_streamhascrypt\>/pdf_stream_has_crypt/g +s/\<pdf_tensorpatch\>/pdf_tensor_patch/g +s/\<pdf_tensorpatch_s\>/pdf_tensor_patch_s/g +s/\<pdf_tokenfromkeyword\>/pdf_token_from_keyword/g +s/\<pdf_tomatrix\>/pdf_to_matrix/g +s/\<pdf_torect\>/pdf_to_rect/g +s/\<pdf_toucs2\>/pdf_to_ucs2/g +s/\<pdf_toutf8\>/pdf_to_utf8/g +s/\<pdf_toutf8name\>/pdf_to_utf8_name/g +s/\<pdf_transformannot\>/pdf_transform_annot/g +s/\<pdf_unsetpattern\>/pdf_unset_pattern/g +s/\<pdf_updateobject\>/pdf_update_object/g +s/\<pdf_winansi\>/pdf_win_ansi/g +s/\<pdf_xobjectusesblending\>/pdf_xobject_uses_blending/g +s/\<pdf_xrefentry\>/pdf_xref_entry/g +s/\<pdf_xrefentry_s\>/pdf_xref_entry_s/g +s/\<popclip\>/pop_clip/g +s/\<printbits\>/print_bits/g +s/\<printline\>/print_line/g +s/\<pscopy\>/ps_copy/g +s/\<psindex\>/ps_index/g +s/\<psinitstack\>/ps_init_stack/g +s/\<psistype\>/ps_is_type/g +s/\<psistype2\>/ps_is_type2/g +s/\<psopnames\>/ps_op_names/g +s/\<psoverflow\>/ps_overflow/g +s/\<pspopbool\>/ps_pop_bool/g +s/\<pspopint\>/ps_pop_int/g +s/\<pspopreal\>/ps_pop_real/g +s/\<pspushbool\>/ps_push_bool/g +s/\<pspushint\>/ps_push_int/g +s/\<pspushreal\>/ps_push_real/g +s/\<psroll\>/ps_roll/g +s/\<psrun\>/ps_run/g +s/\<psstack\>/ps_stack/g +s/\<psstack_s\>/ps_stack_s/g +s/\<psunderflow\>/ps_underflow/g +s/\<reada85d\>/read_a85d/g +s/\<readaesd\>/read_aesd/g +s/\<readahxd\>/read_ahxd/g +s/\<readarc4\>/read_arc4/g +s/\<readbuffer\>/read_buffer/g +s/\<readdctd\>/read_dctd/g +s/\<readfaxd\>/read_faxd/g +s/\<readfile\>/read_file/g +s/\<readflated\>/read_flated/g +s/\<readjbig2d\>/read_jbig2d/g +s/\<readlzwd\>/read_lzwd/g +s/\<readnull\>/read_null/g +s/\<readpredict\>/read_predict/g +s/\<readrld\>/read_rld/g +s/\<readsample\>/read_sample/g +s/\<resizecode\>/resize_code/g +s/\<resolvedest\>/resolve_dest/g +s/\<rgbtoxyz\>/rgb_to_xyz/g +s/\<samplenearest\>/sample_nearest/g +s/\<seekbuffer\>/seek_buffer/g +s/\<seekfile\>/seek_file/g +s/\<separationtoxyz\>/separation_to_xyz/g +s/\<softmaskbc\>/softmask_bc/g +s/\<softmaskctm\>/softmask_ctm/g +s/\<sortael\>/sort_ael/g +s/\<splitcurve\>/split_curve/g +s/\<splitpatch\>/split_patch/g +s/\<splitstripe\>/split_stripe/g +s/\<stepedge\>/step_edge/g +s/\<stmlen\>/stm_len/g +s/\<stmofs\>/stm_ofs/g +s/\<strcmpignorespace\>/strcmp_ignore_space/g +s/\<stringlen\>/string_len/g +s/\<strokepath\>/stroke_path/g +s/\<strokestate\>/stroke_state/g +s/\<stroketext\>/stroke_text/g +s/\<textmode\>/text_mode/g +s/\<topctm\>/top_ctm/g +s/\<tottfcmap\>/to_ttf_cmap/g +s/\<tounicode\>/to_unicode/g +s/\<toxyz\>/to_xyz/g +s/\<triangulatepatch\>/triangulate_patch/g +s/\<usebackground\>/use_background/g +s/\<usecmapname\>/usecmap_name/g +s/\<usefunction\>/use_function/g +s/\<vmtxcap\>/vmtx_cap/g +s/\<warncount\>/warn_count/g +s/\<warnmessage\>/warn_message/g +s/\<widthcount\>/width_count/g +s/\<widthtable\>/width_table/g +s/\<wordspace\>/word_space/g +s/\<xheight\>/x_height/g +s/\<xyztobgr\>/xyz_to_bgr/g +s/\<xyztocmyk\>/xyz_to_cmyk/g +s/\<xyztogray\>/xyz_to_gray/g +s/\<xyztolab\>/xyz_to_lab/g +s/\<xyztorgb\>/xyz_to_rgb/g diff --git a/contrib/media/updf/scripts/slimftmodules.h b/contrib/media/updf/scripts/slimftmodules.h new file mode 100644 index 0000000000..d03bbc592a --- /dev/null +++ b/contrib/media/updf/scripts/slimftmodules.h @@ -0,0 +1,20 @@ +/* custom ftmodule.h which selects the minimum features required by mupdf */ + +// FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +// FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +// FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) diff --git a/contrib/media/updf/scripts/slimftoptions.h b/contrib/media/updf/scripts/slimftoptions.h new file mode 100644 index 0000000000..066ee3774f --- /dev/null +++ b/contrib/media/updf/scripts/slimftoptions.h @@ -0,0 +1,14 @@ +/* custom ftoption.h which selects the minimum features needed by mupdf */ + +#include <freetype/config/ftoption.h> +#undef FT_CONFIG_OPTION_USE_LZW +#undef FT_CONFIG_OPTION_USE_ZLIB +#undef FT_CONFIG_OPTION_MAC_FONTS +#undef FT_CONFIG_OPTION_INCREMENTAL +#undef TT_CONFIG_OPTION_EMBEDDED_BITMAPS +#undef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#undef TT_CONFIG_OPTION_BDF +#undef T1_CONFIG_OPTION_NO_AFM +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + +#undef FT_CONFIG_OPTION_OLD_INTERNALS